:root {
  --blue: #2563eb;
  --hover: #1d4ed8;
  --tint: #eff6ff;
  --page: #f6f8fb;
  --white: #fff;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --input: #8c9bb0;
  --radius: 14px;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--body);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; min-height: 100vh; }
body:has(.site-header) { display: flex; flex-direction: column; }
body > main { flex: 1; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink); }
h1 { font-size: clamp(29px, 3vw, 39px); line-height: 1.28; }
h2 { font-size: 23px; line-height: 1.4; }
h3 { font-size: 17px; line-height: 1.45; }
a { color: var(--hover); text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
img { display: block; }
svg { flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; left: 14px; top: -80px; z-index: 10; background: var(--white); padding: 12px; }
.skip:focus { top: 12px; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 39px; }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 9px; color: var(--ink); font-weight: 850; letter-spacing: .02em; }
.brand img { object-fit: contain; }
.brand span { border-left: 1px solid var(--line); padding-left: 11px; font-size: 19px; }
.header-inner nav { display: flex; align-items: stretch; gap: 27px; align-self: stretch; }
.header-inner nav a { color: var(--body); display: flex; align-items: center; position: relative; font-size: 14px; font-weight: 650; white-space: nowrap; }
.header-inner nav a:hover, .header-inner nav [aria-current] { color: var(--hover); }
.header-inner nav [aria-current]::after { content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); }
.header-action { margin-left: auto; display:flex; align-items:center; gap:12px; font-size:13px; white-space:nowrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; min-height: 42px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--tint); border-color: #afc8ff; }
.btn.primary { color: var(--white); background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--hover); border-color: var(--hover); }
.btn.danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.btn.danger:hover { background: #fee2e2; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hero {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 28px;
  min-height: 342px; display: flex; align-items: center; background: linear-gradient(105deg,#eff6ff 0%,#f6faff 54%,#fff 100%);
  border: 1px solid #dae6f7; border-radius: 22px;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 0 48%; z-index: -1;
  background: url("/assets/maoqi-hero.png") 98% 49% / max(740px, 133%) auto no-repeat;
  mix-blend-mode: multiply; mask-image: linear-gradient(90deg, transparent 0, black 25%);
}
.hero-copy { padding: 34px clamp(25px, 5vw, 64px); max-width: 64%; }
.hero-kicker { color: var(--hover); font-size: 13px; font-weight: 750; letter-spacing: .075em; margin-bottom: 13px; }
.hero-kicker span { display: inline-block; width: 8px; height: 8px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--blue); }
.hero h1 { font-weight: 850; font-size: clamp(36px, 4.65vw, 64px); line-height: 1.15; letter-spacing: -.055em; }
.hero h1 em { font-style: normal; color: var(--hover); }
.hero-desc { margin-top: 17px; color: var(--body); font-size: 15px; line-height: 1.75; }
.hero .actions { margin-top: 23px; }
.hero .btn { padding-inline: 20px; }

.listing { margin-block: 32px 52px; }
.home-categories { margin-top: 20px; }
.project-grid.featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.heading h1, .heading h2 { font-weight: 800; font-size: 27px; }
.count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.categories { display: flex; align-items: center; gap: 7px; padding: 6px; border: 1px solid var(--line); background: var(--white); border-radius: 11px; overflow: auto; }
.categories a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 5px 14px; color: var(--body); font-size: 14px; font-weight: 650; border-radius: 7px; white-space: nowrap; }
.categories a svg { color: var(--muted); }
.categories a:hover, .categories a[aria-current] { background: var(--tint); color: var(--hover); }
.categories a[aria-current] svg, .categories a:hover svg { color: var(--blue); }
.filters { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin: 14px 0 17px; }
select, input, textarea { min-width: 0; border: 1px solid var(--input); background: var(--white); border-radius: 7px; padding: 10px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select { padding-right: 26px; min-height: 42px; }
.filters select { font-size: 13px; }
.clear { font-size: 13px; padding: 6px 4px; }
.search { display: flex; align-items: stretch; gap: 7px; min-width: 0; }
.search input { width: clamp(160px, 19vw, 270px); font-size: 14px; }
.search .btn { padding-inline: 12px; }
.filters .search { margin-left: auto; }
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.project-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 4px #17304e07; transition: box-shadow .15s, border-color .15s; }
.project-card:hover, .project-card:focus-within { border-color: #adc4f0; box-shadow: 0 6px 20px #17304e14; }
.card-link { display: flex; min-height: 100%; flex-direction: column; color: var(--body); border-radius: var(--radius); overflow: hidden; }
.cover {
  aspect-ratio: 1.77; background-color: #dbeafe;
  background-image: url("/assets/project-covers.png"), url("/assets/maoqi-hero.png");
  background-size: 300% 200%, cover; background-repeat: no-repeat;
}
.cover-app { background-position: left top, right center; }
.cover-field { background-position: center top, right center; }
.cover-online { background-position: right top, right center; }
.cover-channel { background-position: left bottom, right center; }
.cover-event { background-position: center bottom, right center; }
.cover-campus { background-position: right bottom, right center; }
.card-content { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 15px 15px 12px; }
.card-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; width: max-content; border-radius: 5px; color: var(--hover); background: var(--tint); padding: 3px 7px; font-size: 12px; font-weight: 700; line-height: 1.4; }
.tag.sample, .tag.status-closed { color: #475569; background: #f1f5f9; }
.tag.status-pending { color: #b45309; background: #fffbeb; }
.tag.status-approved { color: #15803d; background: #f0fdf4; }
.tag.status-rejected { color: #b91c1c; background: #fef2f2; }
.card-content h3, .card-content p { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-content p { color: var(--muted); font-size: 13px; line-height: 1.68; margin-bottom: 4px; }
.card-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; color: var(--muted); font-size: 12px; }
.card-meta svg, .channel-card .muted svg { margin-right: 4px; width: 15px; height: 15px; }
.card-open { display: flex; align-items: center; justify-content: space-between; color: var(--hover); font-size: 13px; font-weight: 700; padding-top: 11px; border-top: 1px solid var(--line); }
.card-open svg { width: 16px; }
.empty { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; padding: 42px 24px; }
.empty p { margin: 10px 0 17px; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 23px; font-size: 14px; }
.footer { background: var(--white); border-top: 1px solid var(--line); margin-top: 12px; }
.footer-inner { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.footer-inner p, .footer-inner nav { color: var(--muted); font-size: 13px; line-height: 1.65; }
.footer-inner p { margin-top: 4px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 14px; }

.inner { padding-block: 28px 52px; }
.narrow { max-width: 760px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 15px; }
.back:hover, .footer a:not(.brand):hover { text-decoration: underline; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr); align-items: start; gap: 19px; }
.detail { overflow: hidden; }
.detail .cover { aspect-ratio: 2.75; }
.detail-copy { padding: clamp(20px, 3vw, 34px); }
.detail h1 { margin: 9px 0 18px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 13px; background: var(--page); border-radius: 9px; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 5px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.detail-section h2 { font-size: 18px; margin-bottom: 7px; }
.user-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.form-panel { padding: clamp(20px, 3vw, 31px); }
.muted { color: var(--muted); font-size: 14px; line-height: 1.75; }
.form-panel > .muted { margin: 8px 0 17px; }
.fields { display: grid; gap: 15px; margin-top: 17px; }
.fields > .btn { justify-self: start; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; font-size: 14px; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; font-weight: 400; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.notice { padding: 11px 13px; border-radius: 8px; margin: 12px 0; font-size: 14px; background: var(--tint); color: var(--hover); }
.notice.success { color: #15803d; background: #f0fdf4; }
.notice.error { color: #b91c1c; background: #fef2f2; }
.page-intro { display: flex; gap: 16px; justify-content: space-between; align-items: end; margin-bottom: 19px; }
.page-intro p { margin-top: 9px; color: var(--muted); line-height: 1.65; }
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.channel-card { padding: 21px; }
.channel-icon { color: var(--blue); background: var(--tint); border-radius: 9px; padding: 10px; width: max-content; margin-bottom: 13px; }
.channel-card h2 { font-size: 20px; margin-top: 8px; overflow-wrap: anywhere; }
.channel-card p { margin: 8px 0; }
.guide-steps { padding-left: 25px; line-height: 1.9; }
.chain { margin: 12px 0; padding: 12px; background: var(--tint); border-radius: 8px; color: var(--hover); line-height: 1.7; }

.workbench { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.workbench.nav-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.workbench.nav-hidden .side { display: none; }
.side { background: var(--white); border-right: 1px solid var(--line); }
.side-brand { border-bottom: 1px solid var(--line); padding: 16px; }
.side-brand p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.side nav { display: grid; gap: 6px; padding: 13px; }
.side nav a { padding: 10px 12px; border-radius: 7px; color: var(--body); }
.side nav a[aria-current], .side nav a:hover { color: var(--hover); background: var(--tint); }
.workbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 22px; border-bottom: 1px solid var(--line); background: var(--white); }
.workbar > div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.workbar .menu-toggle { min-width: 42px; padding: 8px; }
.work-main { padding: 18px clamp(15px, 3vw, 36px) 50px; }
.breadcrumb { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.review-panel { padding: 14px; }
.review-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 3px 0 12px; }
.review-tools h1 { font-size: 23px; }
.review-tools > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.density-toggle { min-height: 34px; padding: 5px 9px; font-size: 12px; }
.density-toggle[aria-pressed="true"] { color: var(--hover); background: var(--tint); }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; min-width: 90px; }
td:first-child { min-width: 176px; }
.review-panel.dense td, .review-panel.dense th { padding-block: 7px; }
td { overflow-wrap: anywhere; }
th { color: var(--ink); background: var(--page); }
.table-count { font-size: 13px; color: var(--muted); margin: 13px 4px 2px; }
.review-detail { max-width: 790px; }
.review-detail h1 { margin-top: 10px; overflow-wrap: anywhere; }
.owner-projects { display: grid; gap: 14px; min-width: 0; }
.ledger-form { margin-top: 16px; }
.ledger-form > .actions { margin-top: 18px; }
.ledger-form details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger-form summary { cursor: pointer; font-weight: 700; }
.ledger-facts { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
.record { display: grid; gap: 12px; }
.record > div { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.login { display: grid; place-items: center; width: min(430px, calc(100% - 34px)); min-height: 100vh; margin: auto; padding-block: 20px; }
.login > section { width: 100%; }
.login h1 { margin-top: 16px; font-size: 28px; }
.login .back { margin: 20px 0 0; }

.project-finder { min-height: 250px; }
.project-finder h1 { font-size: clamp(36px,4vw,54px); }
.finder-search { display: flex; gap: 8px; margin: 16px 0 12px; max-width: 490px; }
.finder-search input { width: 100%; }
.finder-links, .project-byline, .entry-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.finder-links a, .heading > a, .project-report { display: inline-flex; gap: 5px; align-items: center; font-size: 14px; font-weight: 650; }
.card-open { display: flex; justify-content: space-between; gap: 5px; flex-wrap: wrap; }
.card-open > span:first-child { color: #173c72; }
.project-overview { overflow: hidden; display: grid; grid-template-columns: 190px 1fr auto; align-items: center; }
.project-overview > .cover { width: 100%; height: 100%; min-height: 150px; }
.project-overview-copy { padding: 20px 28px; }
.project-overview h1 { font-size: clamp(25px,2.6vw,38px); margin: 7px 0 9px; overflow-wrap: anywhere; }
.project-byline, .project-rate small, .project-rate span, .entry-top + p + small { color: #52647a; font-size: 13px; }
.project-rate { display: grid; gap: 7px; padding: 12px 30px; border-left: 1px solid var(--line); }
.project-rate strong { color: #174e9b; font-size: 22px; font-variant-numeric: tabular-nums; }
.project-rate a { font-size: 13px; }
.demo-records { margin-top: 12px; }
.project-columns { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,1fr); gap: 20px; align-items: start; margin-top: 20px; }
.project-primary { display: grid; gap: 18px; min-width: 0; }
.project-hub .heading { align-items: center; }
.project-hub .heading h2, .project-brief h2 { font-size: 21px; }
.project-brief, .activity-panel { padding: clamp(18px,2.3vw,30px); min-width: 0; }
.project-brief .user-text, .project-entries .user-text { margin-top: 9px; overflow-wrap: anywhere; line-height: 1.65; }
.project-brief .detail-section h2 { font-size: 16px; }
.project-material { margin-top: 12px; }
.data-form-row { display: grid; grid-template-columns: 2fr minmax(100px,1fr); gap: 14px; }
.project-data textarea { min-height: 82px; }
.project-data > button { justify-self: start; }
.estimate-line { display: flex; justify-content: space-between; align-items: baseline; color: #204064; background: #f0f6ff; padding: 12px 15px; border-radius: 8px; }
.estimate-line output { font-variant-numeric: tabular-nums; font-weight: 700; }
.code-login { margin-block: 12px 2px; color: var(--hover); font-size: 14px; }
.code-login summary { cursor: pointer; }
.project-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 0 16px; padding: 15px; background: var(--page); border-radius: 8px; gap: 12px; }
.project-totals dt, .entry-top + p + small { font-size: 12px; }
.project-totals dd { margin: 6px 0 0; font-weight: 750; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.project-entries article { padding: 14px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.entry-top { justify-content: space-between; }
.review-reply { margin-top: 8px; color: var(--muted); }
.project-report { margin-top: 14px; }
@media (max-width: 820px) {
  .project-overview { grid-template-columns: 124px 1fr auto; }
  .project-overview-copy, .project-rate { padding: 14px; }
  .project-columns { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 540px) {
  .project-overview { grid-template-columns: minmax(0,1fr); }
  .project-overview > .cover { display: none; }
  .project-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; padding: 10px 14px; border: 0; background: #f0f6ff; }
  .project-rate a { flex-basis: 100%; }
  .project-rate strong { font-size: 17px; }
  .project-rate span { margin-left: auto; }
  .data-form-row { grid-template-columns: minmax(0,1fr); }
  .project-totals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-hub .form-panel { padding: 18px; }
  .project-finder .hero-copy { width: 100%; }
}

.publish-preview { display: grid; gap: 18px; }
.work-main > .panel + .panel { margin-top: 18px; }
.publish-section-title { margin: 24px 0 12px; }
.project-management-actions { margin: 18px 0; }
.employee-row { display: grid; grid-template-columns: minmax(160px,1.2fr) minmax(140px,1fr) minmax(160px,1.3fr) auto; gap: 14px; align-items: end; padding: 18px 0; border-bottom: 1px solid var(--line); }
.employee-row small { display: block; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.employee-row .field { margin: 0; }
@media (max-width: 780px) { .employee-row { grid-template-columns: 1fr; } }
@media (max-width: 1050px) {
  .wrap { width: calc(100% - 38px); }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero::before { background-size: 675px auto; }
  .filters .search input { width: 175px; }
}
@media (max-width: 780px) {
  .header-inner nav { overflow-x: auto; }
  .header-inner { gap: 18px; }
  .header-inner { min-height: 58px; gap: 17px; }
  .header-inner nav { gap: 14px; }
  .header-inner nav a { font-size: 13px; }
  .hero { min-height: 290px; }
  .hero-copy { max-width: 72%; }
  .hero::before { inset-inline-start: 42%; background-size: 540px auto; opacity: .75; }
  .categories { gap: 4px; }
  .categories a { padding-inline: 8px; gap: 5px; font-size: 13px; }
  .categories a svg { width: 17px; height: 17px; }
  .project-grid, .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .workbench, .workbench.nav-hidden { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .workspace { display: contents; }
  .workbar { grid-row: 1; }
  .side { grid-row: 2; border-right: 0; border-bottom: 1px solid var(--line); }
  .work-main { grid-row: 3; }
  .side nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side-brand { display: none; }
}
@media (max-width: 540px) {
  .project-grid.featured-grid { grid-template-columns: minmax(0, 1fr); }
  html { scroll-padding-top: 108px; }
  .wrap { width: calc(100% - 28px); }
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .header-inner nav { order: 3; width: 100%; gap: 22px; justify-content: flex-start; }
  .header-inner nav a { min-height: 34px; }
  .header-action .btn { min-height: 36px; padding: 5px 9px; }
  .hero { min-height: 0; margin-top: 16px; border-radius: 16px; }
  .hero-copy { max-width: none; padding: 25px 18px; }
  .hero h1 { font-size: clamp(32px,9vw,44px); }
  .hero::before { display: none; }
  .hero-desc { margin-top: 11px; }
  .hero .actions { margin-top: 16px; }
  .listing { margin-top: 23px; }
  .categories a { padding-inline: 10px; }
  .filters { gap: 7px; }
  .filters select { flex: 1 1 95px; }
  .filters .search { width: 100%; margin-left: 0; }
  .filters .search input { flex: 1; width: auto; }
  .project-grid { gap: 9px; }
  .card-content { padding: 10px 9px; gap: 6px; }
  .card-content h3 { font-size: 15px; }
  .card-content p { font-size: 12px; }
  .card-meta { flex-wrap: wrap; gap: 3px; }
  .card-open { padding-top: 7px; }
  .channel-grid, .form-row { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { align-items: start; flex-direction: column; }
  .workbar { padding-inline: 10px; }
  .workbar > div { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
