:root {
  --bg: #f5f6f3;
  --bg-soft: #eef1ec;
  --surface: #ffffff;
  --surface-2: #f9faf8;
  --ink: #15211d;
  --ink-soft: #33423c;
  --muted: #68756f;
  --line: #dde3de;
  --line-strong: #c9d2cb;
  --accent: #14665d;
  --accent-strong: #0e4d46;
  --accent-soft: #e3f1ee;
  --gold: #b4863b;
  --danger: #a5433b;
  --danger-soft: #f8e9e7;
  --warn: #8b6426;
  --warn-soft: #f7efdf;
  --ok: #256b4f;
  --ok-soft: #e5f2ea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(21, 33, 29, 0.06);
  --shadow-soft: 0 4px 14px rgba(21, 33, 29, 0.05);
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --maxw: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(20, 102, 93, 0.08), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(180, 134, 59, 0.07), transparent 26rem),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.25; margin: 0 0 .55em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.wrap { overflow-wrap: anywhere; }
.container { width: min(100% - 2.2rem, var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: .8rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { margin: 0 0 .6rem; color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.lede { color: var(--ink-soft); font-size: 1.06rem; max-width: 62ch; }
.slogan { margin: 0 0 .8rem; color: var(--gold); font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; letter-spacing: .14em; }
.hero .slogan { font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: .18em; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(245, 246, 243, .86); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(201, 210, 203, .7); }
.header-inner { display: flex; align-items: center; gap: 1.1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--accent), #0a3e39); font-family: var(--font-serif); font-size: 1.35rem; box-shadow: var(--shadow-soft); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.02rem; }
.brand-text small { color: var(--muted); font-size: .68rem; letter-spacing: .04em; }
.main-nav { display: flex; gap: .2rem; }
.main-nav a { color: var(--ink-soft); padding: .45rem .7rem; border-radius: 8px; font-size: .93rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: var(--accent-soft); color: var(--accent-strong); }
.search-form { margin-left: auto; display: flex; align-items: center; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .2rem .25rem .2rem .7rem; }
.search-form input { border: 0; background: transparent; padding: .35rem 0; width: 10.5rem; font: inherit; font-size: .88rem; outline: none; }
.search-form button { border: 0; background: var(--accent-soft); color: var(--accent-strong); border-radius: 7px; padding: .35rem .6rem; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.account { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.account-name { color: var(--ink-soft); white-space: nowrap; }
.account-name em { font-style: normal; margin-left: .35rem; padding: .05rem .35rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .68rem; }
.inline-form { display: inline; }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: .18s ease; }
.button:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-strong); color: #fff; }
.button.ghost { background: transparent; border-color: transparent; color: inherit; }
.button.small { min-height: 32px; padding: .35rem .7rem; font-size: .82rem; border-radius: 8px; }
.button.block { width: 100%; }
.link-button { border: 0; background: none; color: var(--accent); font: inherit; font-size: .88rem; cursor: pointer; padding: .2rem; }
.link-button:hover { text-decoration: underline; }
.text-link { font-size: .9rem; font-weight: 600; }
.button-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .7rem; }
.button-row.compact { margin: 0; justify-content: flex-end; }
.button-row.center { justify-content: center; }

/* flash */
.flash-wrap { margin-top: 1rem; }
.flash { border-radius: 10px; padding: .7rem 1rem; border: 1px solid transparent; font-size: .9rem; }
.flash.success { background: var(--ok-soft); border-color: #b9dec9; color: var(--ok); }
.flash.error { background: var(--danger-soft); border-color: #ecc8c3; color: var(--danger); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 2.2rem; align-items: stretch; padding: clamp(2.2rem, 6vw, 5rem) 0 2.4rem; }
.hero-copy { padding: 1rem 0; }
.hero h1 { max-width: 36ch; margin-bottom: .8rem; }
.hero .lede { font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; }
.hero-tags span { padding: .22rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .76rem; font-weight: 600; letter-spacing: .02em; }
.hero-panel { align-self: center; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--radius); background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric { background: rgba(255, 255, 255, .86); padding: 1.3rem 1.1rem; min-height: 118px; display: flex; flex-direction: column; justify-content: center; }
.metric span { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2.15rem); color: var(--accent-strong); line-height: 1; }
.metric small { color: var(--muted); margin-top: .45rem; font-size: .8rem; }

/* sections */
.section { margin: 2.4rem 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.1rem; }
.section-head h2 { margin-bottom: .35rem; }
.section-head p { margin: 0; max-width: 60ch; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 1.3rem; }
.prose { max-width: 68ch; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 1.1rem; }
.stat-strip > div { background: var(--surface); padding: .95rem 1rem; display: flex; flex-direction: column; }
.stat-strip strong { font-family: var(--font-serif); font-size: 1.35rem; color: var(--accent-strong); }
.stat-strip span { color: var(--muted); font-size: .78rem; }
.stat-strip.compact { margin: 0 0 1.4rem; }
.stat-strip.compact strong { font-size: 1.2rem; }

/* year heatmap */
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .6rem 0 1rem; color: var(--muted); font-size: .8rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.dot.covered { background: var(--accent); }
.dot.partial { background: #d9b46e; }
.dot.missing { background: #ddd9d0; }
.dot.suspended { background: #cfd5cf; }
.year-heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .42rem; }
.year-cell { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 52px; border-radius: 9px; font-size: .78rem; font-weight: 600; border: 1px solid transparent; transition: .16s ease; }
.year-cell small { font-weight: 500; opacity: .7; font-size: .66rem; }
.year-cell.covered { background: var(--accent); color: #fff; }
.year-cell.partial { background: #f0dfbd; color: #6d5126; }
.year-cell.missing { background: #ecebe6; color: #8b8b83; }
.year-cell.suspended { background: repeating-linear-gradient(135deg, #e6e8e4, #e6e8e4 5px, #dfe2dd 5px, #dfe2dd 10px); color: #8a918b; }
a.year-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); color: #fff; }
a.year-cell.partial:hover { color: #4d3919; }

/* cards */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.feature-card, .info-card, .action-card, .notice-card, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-soft); }
.feature-card h3 { color: var(--accent-strong); }
.feature-card p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.thanks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.thanks-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-soft); }
.thanks-card h2 { margin-bottom: .2rem; font-size: 1.15rem; color: var(--accent-strong); }
.thanks-card .muted { margin-bottom: .7rem; font-size: .8rem; }
.thanks-card p:last-child { margin-bottom: 0; color: var(--ink-soft); font-size: .92rem; }
.notice-card ul { margin: .2rem 0 1rem; color: var(--ink-soft); font-size: .92rem; }
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.paper-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; transition: .2s ease; }
.paper-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.paper-preview { display: block; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; position: relative; }
.paper-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.paper-card:hover .paper-preview img { transform: scale(1.025); }
.paper-preview.large { aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.paper-preview.large img { object-fit: contain; background: #fff; }
.preview-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: .85rem; }
.paper-card-body { padding: 1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.paper-card-head { display: flex; align-items: start; justify-content: space-between; gap: .6rem; }
.paper-card-head h3 { font-size: 1.05rem; margin: 0; }
.paper-meta { display: flex; flex-wrap: wrap; gap: .25rem .8rem; color: var(--muted); font-size: .8rem; margin: 0; }
.paper-provinces { margin: 0; color: var(--ink-soft); font-size: .8rem; }
.paper-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .35rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .35rem; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: .2rem; padding: .14rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: var(--bg-soft); color: var(--ink-soft); border: 1px solid transparent; }
.badge.good, .badge.status-已完成 { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.status-待人工核验, .badge.status-素材就绪, .badge.status-待核对 { background: var(--warn-soft); color: var(--warn); }
.badge.muted, .badge.status-无源, .badge.status-未记录 { background: #eceeea; color: #6d7770; }
.badge.status-校对中, .badge.status-待复核, .badge.status-claimed, .badge.status-submitted { background: #e6eff7; color: #2c5b84; }
.badge.status-open { background: var(--accent-soft); color: var(--accent-strong); }
.badge.status-done { background: var(--ok-soft); color: var(--ok); }
.badge.status-cancelled { background: #eceeea; color: #6d7770; }
.badge.large { font-size: .82rem; padding: .35rem .75rem; }

/* pages */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; color: var(--muted); font-size: .82rem; padding-top: 1.3rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; padding: 1.6rem 0 .6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.page-header h1 { margin-bottom: .3rem; }
.pager { display: flex; gap: .45rem; flex-wrap: wrap; }
.activity-list { display: flex; flex-direction: column; gap: .45rem; }
.activity-item { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: .16s ease; }
.activity-item:hover { border-color: var(--accent); transform: translateX(2px); box-shadow: var(--shadow-soft); }
.activity-date { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.activity-main { display: flex; flex-direction: column; min-width: 0; }
.activity-main strong { font-family: var(--font-serif); font-size: .98rem; }
.activity-main small { color: var(--muted); font-size: .8rem; }
.year-list { display: flex; flex-direction: column; gap: .45rem; }
.year-row { display: grid; grid-template-columns: 4.4rem minmax(0, 2fr) minmax(0, 2fr) 1.2rem; gap: .9rem; align-items: center; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: .16s ease; }
.year-row:hover { border-color: var(--accent); transform: translateX(2px); box-shadow: var(--shadow-soft); }
.year-row.empty { opacity: .72; }
.year-row-year { font-family: var(--font-serif); font-size: 1.2rem; color: var(--accent-strong); }
.year-row-main { display: flex; flex-direction: column; }
.year-row-main small { color: var(--muted); }
.year-row-regions { color: var(--muted); font-size: .8rem; }
.chevron { color: var(--accent); }
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.region-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; color: var(--ink); transition: .16s ease; }
.region-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.region-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.region-card-head h2 { font-size: 1.08rem; margin: 0; }
.region-card-head span { color: var(--accent); font-size: .8rem; font-weight: 700; }
.region-card p { margin: .35rem 0 0; font-size: .84rem; }
.region-years { color: var(--muted); font-size: .78rem; line-height: 1.55; }

/* coverage */
.coverage-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-soft); }
.coverage-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.subhead { font-family: var(--font-sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.2rem 0 .5rem; }
.compact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.compact-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .32rem .6rem; padding: .42rem 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.compact-list li:last-child { border-bottom: 0; }
.compact-list small { color: var(--muted); flex-basis: 100%; }
.details-block { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.details-block summary { cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 600; }
.details-block[open] summary { margin-bottom: .7rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 560px; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.note-cell { max-width: 34rem; color: var(--ink-soft); }
.inline-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.inline-actions.wrap { max-width: 28rem; }
.inline-actions select, .inline-actions input { min-height: 30px; padding: .2rem .35rem; font-size: .8rem; }
.small-link { font-size: .8rem; }

/* paper page */
.paper-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.4rem 0 1.1rem; }
.paper-header h1 { margin-bottom: .3rem; }
.paper-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.paper-visual { position: sticky; top: 94px; }
.paper-side { display: flex; flex-direction: column; gap: 1rem; }
.action-card h2 { font-size: 1.1rem; }
.action-card.locked { background: linear-gradient(135deg, #fff, #f6f8f4); border-style: dashed; }
.hint { color: var(--muted); font-size: .84rem; margin: .7rem 0 0; }
.file-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.file-list li:last-child { border-bottom: 0; }
.file-actions { display: flex; gap: .6rem; font-size: .82rem; }
.meta-list { display: grid; gap: .45rem; margin: 0; }
.meta-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .8rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.meta-list > div:last-child { border-bottom: 0; }
.meta-list dt { color: var(--muted); font-size: .84rem; }
.meta-list dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.tag { display: inline-block; padding: .2rem .55rem; background: var(--bg-soft); border-radius: 999px; font-size: .78rem; color: var(--ink-soft); }
.tag:hover { background: var(--accent-soft); color: var(--accent-strong); }

/* pdf viewer */
.inline-viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-soft); }
.pdf-viewer { margin-top: .9rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); min-height: 240px; }
.pdf-viewer iframe { width: 100%; height: 72vh; min-height: 480px; border: 0; display: block; background: #fff; }
.pdf-placeholder { margin: 0; padding: 3rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* tasks & comments */
.task-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.task-list li { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.task-list small { display: block; color: var(--muted); margin-top: .2rem; }
.inline-submit { display: flex; flex-direction: column; gap: .4rem; min-width: 240px; }
.inline-submit textarea { min-height: 64px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.comment-head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; font-size: .86rem; }
.comment-head .muted { font-size: .76rem; }
.comment-body { margin: .5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.form-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* forms */
input, textarea, select { width: 100%; font: inherit; font-size: .9rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: .55rem .65rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(20, 102, 93, .2); border-color: var(--accent); }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: .7rem 0 .3rem; }
.stack-form { display: flex; flex-direction: column; gap: .15rem; }
.stack-form.narrow { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .8rem; }
.checkbox { display: flex; align-items: center; gap: .45rem; font-weight: 500; }
.checkbox input { width: auto; }
.search-page-form { display: flex; gap: .6rem; max-width: 620px; margin-bottom: 1.2rem; }
.search-page-form input { flex: 1; }

/* auth */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 2rem; align-items: start; padding: 2.4rem 0; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-direction: column; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.auth-card { padding: 1.5rem; }
.auth-card h2 { margin-bottom: 1rem; }
.contribute-note { margin-top: 1.1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); }
.contribute-note h2 { margin-bottom: .5rem; font-size: 1.05rem; color: var(--accent-strong); }
.contribute-note p:last-child { margin-bottom: 0; }

/* empty */
.empty-state { text-align: center; padding: 4rem 1rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state h1, .empty-state h2 { margin-bottom: .5rem; }
.error-state { margin: 3rem 0; }

/* footer */
.site-footer { margin-top: 4rem; background: #12201b; color: #dbe5df; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 2.6rem 0 1.6rem; }
.footer-grid strong { color: #fff; font-family: var(--font-serif); }
.footer-grid p { color: #aab9b2; font-size: .86rem; margin-top: .5rem; }
.footer-grid a { color: #d8c08a; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding: 1rem 0 1.6rem; color: #93a39c; font-size: .78rem; }

/* responsive */
@media (max-width: 1040px) {
  .header-inner { flex-wrap: wrap; padding: .65rem 0; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .search-form { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 1.2rem; }
  .hero h1 { max-width: 36ch; }
  .two-col, .auth-layout { grid-template-columns: 1fr; }
  .coverage-columns { grid-template-columns: 1fr; }
  .paper-layout { grid-template-columns: 1fr; }
  .paper-visual { position: static; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { width: min(100% - 1.4rem, var(--maxw)); }
  .brand-text small { display: none; }
  .search-form { order: 2; flex: 1; }
  .search-form input { width: 100%; }
  .account { order: 2; }
  .main-nav { order: 4; }
  .main-nav a { padding: .4rem .5rem; font-size: .85rem; }
  .hero h1 { font-size: clamp(1.45rem, 6.4vw, 1.95rem); }
  .page-header { align-items: start; flex-direction: column; }
  .year-row { grid-template-columns: 3.6rem minmax(0, 1fr) 1.2rem; }
  .year-row-regions { display: none; }
  .activity-item { grid-template-columns: 7.6rem minmax(0, 1fr) auto; gap: .6rem; padding: .7rem .8rem; }
  .form-grid { grid-template-columns: 1fr; }
  .meta-list > div { grid-template-columns: 1fr; gap: .1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; flex-direction: column; }
  .button-row.compact { justify-content: flex-start; }
  .task-list li { flex-direction: column; }
  .inline-submit { width: 100%; }
  .pdf-viewer iframe { height: 62vh; }
  .paper-header { align-items: start; flex-direction: column; }
}
@media (max-width: 460px) {
  .year-heatmap { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: .3rem; }
  .year-cell { min-height: 46px; font-size: .72rem; }
  .paper-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .button { width: 100%; }
  .button-row .button { width: auto; }
  .search-page-form { flex-direction: column; }
}
.year-row.suspended-row { background: repeating-linear-gradient(135deg, #f1f2ee, #f1f2ee 8px, #eceee9 8px, #eceee9 16px); }
.year-row.suspended-row .year-row-year { color: var(--muted); }
.doc-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem); box-shadow: var(--shadow-soft); max-width: 100%; }
.doc-content h1, .doc-content h2, .doc-content h3 { margin-top: 1.4em; }
.doc-content table { min-width: 100%; font-size: .82rem; }
.doc-content th, .doc-content td { padding: .45rem .55rem; }
.doc-content code { background: var(--bg-soft); padding: .1rem .3rem; border-radius: 5px; }
.doc-content pre, .doc-content .doc-raw { overflow-x: auto; background: var(--surface-2); padding: 1rem; border-radius: 10px; }
.doc-content blockquote { margin: 1rem 0; padding: .4rem 1rem; border-left: 3px solid var(--gold); color: var(--muted); background: var(--surface-2); }

.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stage-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.stage-card h3 { margin: 0 0 .45rem; font-family: var(--font-sans); font-size: .86rem; color: var(--muted); }
.stage-card p { margin: .25rem 0; font-size: .84rem; }
.small-note { color: var(--ink-soft); font-size: .82rem; }

/* paper multi-select */
.admin-wide-card { width: 100%; }
.paper-picker { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .6rem; }
.paper-picker input[type="search"] { width: 100%; }
.paper-picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.paper-picker-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: .35rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .2rem; }
.paper-picker-item { display: flex; align-items: center; gap: .4rem; padding: .28rem .45rem; border-radius: 8px; font-size: .82rem; cursor: pointer; }
.paper-picker-item:hover { background: var(--bg-soft); }
.paper-picker-item[hidden] { display: none; }
.paper-picker-item input { flex: none; }
.exception-table td { vertical-align: top; font-size: .82rem; }
.exception-table td:nth-child(3), .exception-table td:nth-child(4) { min-width: 14rem; }
.exception-group + .exception-group { margin-top: .2rem; }
@media (max-width: 720px) {
  .paper-picker-list { grid-template-columns: 1fr; max-height: 220px; }
}
.paper-picker-filters { display: grid; grid-template-columns: 8rem 12rem minmax(8rem, 1fr); gap: .4rem; }
@media (max-width: 720px) {
  .paper-picker-filters { grid-template-columns: 1fr; }
}
.paper-picker-item { margin: 0; font-weight: 500; }
.paper-picker-item input[type="checkbox"] { width: auto; margin: 0; flex: none; }
.paper-picker-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-picker-hint { margin: 0 0 .2rem; font-size: .8rem; }
.button.danger { background: var(--danger-soft); border-color: #e3bcb7; color: var(--danger); }
.button.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.delete-form input[name="confirm_text"] { width: 7.5rem; min-height: 32px; padding: .3rem .5rem; font-size: .78rem; }
