:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --paper: #f5f2e9;
  --surface: #ffffff;
  --line: #d8d6cd;
  --teal: #087e8b;
  --teal-dark: #075e68;
  --amber: #d89c2b;
  --shadow: 0 18px 48px rgba(16, 42, 67, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.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; }
.muted { color: var(--ink-soft); }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .18em; }

.brand-mark { display: inline-flex; align-items: center; gap: 4px; height: 44px; }
.brand-mark span { display: block; width: 5px; border-radius: 5px; background: var(--teal); }
.brand-mark span:nth-child(1) { height: 20px; }
.brand-mark span:nth-child(2) { height: 36px; }
.brand-mark span:nth-child(3) { height: 27px; background: var(--amber); }
.brand-mark-small { gap: 3px; height: 32px; }
.brand-mark-small span { width: 4px; }
.brand-mark-small span:nth-child(1) { height: 15px; }
.brand-mark-small span:nth-child(2) { height: 27px; }
.brand-mark-small span:nth-child(3) { height: 20px; }

.login-page { background: var(--ink); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); }
.login-intro { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 9vw, 140px); color: white; position: relative; overflow: hidden; }
.login-intro::after { content: ""; position: absolute; right: -10vw; bottom: -28vw; width: 45vw; height: 45vw; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 7vw rgba(255,255,255,.025), 0 0 0 14vw rgba(255,255,255,.018); }
.login-intro h1 { margin: 6px 0 16px; font-family: Georgia, "Songti SC", serif; font-size: clamp(2.7rem, 5vw, 5.6rem); font-weight: 600; letter-spacing: -.04em; }
.login-lead { max-width: 610px; margin: 0; color: #bcccdc; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.85; }
.signal-rule { width: min(340px, 70%); height: 1px; margin: 38px 0 18px; background: linear-gradient(90deg, var(--teal), var(--amber), transparent); }
.login-note { margin: 0; color: #829ab1; font-size: .82rem; letter-spacing: .08em; }
.login-panel { display: flex; flex-direction: column; justify-content: center; gap: 30px; padding: clamp(36px, 7vw, 100px); background: var(--surface); }
.login-panel h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 600; }
.login-panel .muted { margin: 10px 0 0; line-height: 1.7; }
.login-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 700; }
.field input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #bcccdc; border-radius: 8px; color: var(--ink); background: #fbfcfd; outline: none; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,139,.14); }
.primary-button { min-height: 52px; margin-top: 4px; padding: 12px 18px; border: 0; border-radius: 8px; color: white; background: var(--teal-dark); font-weight: 750; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.primary-button:hover { background: #064f57; }
.form-alert { padding: 12px 14px; border-left: 3px solid #b33a3a; background: #fff1f1; color: #7f1d1d; font-size: .9rem; }

.site-header { height: 72px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: white; background: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-family: Georgia, "Songti SC", serif; font-size: 1.08rem; }
.brand small { color: #9fb3c8; font-size: .58rem; letter-spacing: .12em; }
.account-area { display: flex; align-items: center; gap: 12px; }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; color: #bcccdc; font-size: .82rem; }
.account-area form { margin: 0; }
.text-button { padding: 8px 0 8px 12px; border: 0; border-left: 1px solid #486581; color: white; background: transparent; font-size: .82rem; cursor: pointer; }
.header-link { color: #d9e2ec; font-size: .82rem; text-decoration: none; }

.app-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 32px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.hero h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(2rem, 5vw, 3.7rem); font-weight: 600; letter-spacing: -.035em; }
.hero p:last-child { max-width: 680px; margin: 14px 0 0; color: var(--ink-soft); line-height: 1.75; }
.hero-stat { flex: 0 0 auto; display: grid; grid-template-columns: auto auto 1px auto auto; align-items: baseline; gap: 7px; padding: 17px 20px; border: 1px solid var(--line); background: rgba(255,255,255,.55); }
.hero-stat strong { font-family: Georgia, serif; font-size: 1.55rem; }
.hero-stat span { color: var(--ink-soft); font-size: .76rem; }
.hero-stat i { width: 1px; height: 24px; margin: 0 8px; background: var(--line); }
.tool-row { display: grid; grid-template-columns: 1fr 150px 180px; gap: 12px; margin-bottom: 18px; }
.catalog-search { min-height: 54px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 0 7px 0 16px; border: 1px solid #b8c2ca; border-radius: 9px; background: white; box-shadow: 0 6px 20px rgba(16,42,67,.04); }
.catalog-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,139,.12); }
.catalog-search svg { width: 21px; fill: none; stroke: var(--ink-soft); stroke-width: 1.7; stroke-linecap: round; }
.catalog-search input { min-width: 0; height: 46px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.catalog-search button { height: 40px; padding: 0 20px; border: 0; border-radius: 7px; color: white; background: var(--teal-dark); font-weight: 700; cursor: pointer; }
.future-tool { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px dashed #9fb3c8; border-radius: 9px; color: var(--ink-soft); background: transparent; }
.future-tool small { padding: 3px 6px; border-radius: 4px; background: #e8e6df; font-size: .66rem; }
.active-tool { text-decoration: none; border-style: solid; background: rgba(255,255,255,.45); }
.active-tool:hover { border-color: var(--teal); }
.filter-summary { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--teal); background: #e8f4f4; color: var(--teal-dark); font-size: .86rem; }
.filter-summary a { font-weight: 700; }
.weekly-panel { margin: 0 0 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); }
.weekly-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.weekly-heading h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 1.35rem; }
.weekly-heading a { color: var(--teal-dark); font-size: .78rem; font-weight: 750; }
.weekly-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid #e7e5dd; }
.weekly-list li { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eceae4; }
.weekly-list a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-size: .84rem; font-weight: 700; }
.weekly-list a:hover { color: var(--teal-dark); }
.weekly-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; color: #075e68; background: #dceeee; font-size: .64rem; }
.weekly-badge.is-update { color: #865b08; background: #fff2cf; }

.catalog { display: grid; gap: 16px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.root-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.root-card > summary { min-height: 78px; display: grid; grid-template-columns: 42px 1fr auto 18px; align-items: center; gap: 14px; padding: 14px 22px; }
.root-card[open] > summary { border-bottom: 1px solid var(--line); }
.root-index { color: var(--teal); font-family: Georgia, serif; font-size: 1.35rem; }
.root-title { display: grid; gap: 3px; }
.root-title strong { font-family: Georgia, "Songti SC", serif; font-size: 1.27rem; }
.root-title small { color: var(--ink-soft); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.root-count { color: var(--ink-soft); font-size: .78rem; }
.chevron { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
details[open] > summary .chevron { transform: rotate(225deg); }
.group-list { display: grid; gap: 1px; padding: 8px 22px 18px 78px; background: #fafaf7; }
.group-card { border-bottom: 1px solid #e7e5dd; }
.group-card:last-child { border-bottom: 0; }
.group-card > summary { min-height: 58px; display: grid; grid-template-columns: 22px 1fr 18px; align-items: center; gap: 12px; padding: 8px 6px; }
.group-summary-text { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.group-heading { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.group-card > summary strong { font-size: .94rem; }
.group-card > summary small { color: var(--ink-soft); font-size: .75rem; }
.group-en { color: var(--ink-soft); font-size: .7rem; letter-spacing: .025em; }
.group-en::before { content: "·"; margin-right: 8px; color: #9fb3c8; }
.folder-icon { width: 18px; height: 13px; border: 1.5px solid var(--teal); border-radius: 2px; position: relative; }
.folder-icon::before { content: ""; position: absolute; left: -1.5px; top: -5px; width: 8px; height: 5px; border: 1.5px solid var(--teal); border-bottom: 0; border-radius: 2px 2px 0 0; }
.leaf-list { margin: 0 0 10px; padding: 0 0 0 34px; list-style: none; border-left: 1px solid #d8e4e5; }
.leaf-list li { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 10px 10px 14px; border-bottom: 1px solid #eceae4; }
.leaf-list li:last-child { border-bottom: 0; }
.leaf-main { min-width: 0; display: flex; align-items: flex-start; gap: 11px; }
.leaf-link { color: inherit; text-decoration: none; }
.leaf-link:hover .leaf-zh { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.document-icon { flex: 0 0 auto; width: 15px; height: 18px; margin-top: 2px; border: 1.4px solid #829ab1; border-radius: 1px; position: relative; }
.document-icon::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 1px; background: #829ab1; box-shadow: 0 4px 0 #829ab1; }
.leaf-label { min-width: 0; }
.leaf-identity { min-width: 0; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; line-height: 1.45; }
.leaf-zh { font-size: .88rem; }
.leaf-abbr { color: var(--teal-dark); font-size: .72rem; font-weight: 800; letter-spacing: .025em; white-space: nowrap; }
.leaf-en { color: var(--ink-soft); font-size: .73rem; }
.leaf-abbr::before, .leaf-en::before { content: "·"; margin-right: 7px; color: #9fb3c8; font-weight: 400; }
.leaf-meta { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.status, .source-count { padding: 4px 7px; border-radius: 4px; color: var(--ink-soft); background: #edf1f4; font-size: .66rem; white-space: nowrap; }
.status-pending { color: #865b08; background: #fff2cf; }
.status-historical, .status-renamed { color: #755424; background: #f4e9d7; }
.no-results { padding: 56px 24px; border: 1px dashed #9fb3c8; border-radius: 12px; text-align: center; background: rgba(255,255,255,.55); }
.no-results strong { font-family: Georgia, "Songti SC", serif; font-size: 1.4rem; }
.no-results p { color: var(--ink-soft); }
.no-results a { color: var(--teal-dark); font-weight: 750; }
.empty-row { color: var(--ink-soft); font-size: .84rem; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; padding: 18px 2px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .72rem; }

.compact-hero { margin-bottom: 24px; }
.search-panel { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.search-primary { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-primary input { min-width: 0; min-height: 50px; padding: 0 15px; border: 1px solid #b8c2ca; border-radius: 8px; outline: 0; }
.search-primary input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,139,.12); }
.search-primary button { min-width: 96px; border: 0; border-radius: 8px; color: white; background: var(--teal-dark); font-weight: 750; cursor: pointer; }
.search-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; }
.search-filters label { display: grid; gap: 6px; color: var(--ink-soft); font-size: .73rem; font-weight: 700; }
.search-filters select, .search-filters input[type="text"], .search-filters input[name="year"] { width: 100%; min-height: 42px; padding: 7px 10px; border: 1px solid #cbd2d8; border-radius: 7px; color: var(--ink); background: white; }
.search-filters .history-toggle { min-height: 42px; display: flex; flex-direction: row; align-items: center; gap: 7px; white-space: nowrap; }
.search-results { min-width: 0; display: grid; gap: 12px; margin-top: 22px; }
.result-heading { min-width: 0; display: flex; justify-content: space-between; gap: 16px; padding: 0 2px 4px; }
.result-heading span { color: var(--ink-soft); font-size: .75rem; }
.result-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.result-card h2 { min-width: 0; margin: 9px 0 3px; font-family: Georgia, "Songti SC", serif; font-size: 1.2rem; }
.result-card h2 a { min-width: 0; overflow-wrap: anywhere; text-decoration: none; }
.result-card h2 a:hover { color: var(--teal-dark); }
.result-meta, .result-footer { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: .72rem; }
.result-meta strong { color: var(--teal-dark); }
.result-title-zh { margin: 0; color: var(--ink-soft); font-size: .86rem; }
.result-snippet { margin: 14px 0; color: #243b53; line-height: 1.72; overflow-wrap: anywhere; }
.result-footer { min-width: 0; justify-content: space-between; padding-top: 11px; border-top: 1px solid #eceae4; }
.result-footer span { min-width: 0; overflow-wrap: anywhere; }
.reader-shell { max-width: 900px; }
.pdf-reader-shell { max-width: 1180px; }
.document-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.document-heading h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(2rem, 5vw, 3.2rem); }
.document-heading > p:not(.eyebrow) { color: var(--ink-soft); }
.document-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.document-actions a { color: var(--teal-dark); font-weight: 750; }
.document-actions .primary-link { padding: 11px 16px; border-radius: 7px; color: white; background: var(--teal-dark); text-decoration: none; }
.pdf-reader { margin-top: 24px; border: 1px solid #c6cbd0; border-radius: 10px; background: #30363d; box-shadow: var(--shadow); overflow: hidden; }
.pdf-reader-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; color: white; background: var(--ink); }
.pdf-reader-toolbar > div { min-width: 0; }
.pdf-reader-toolbar .section-kicker { margin-bottom: 3px; color: #75d6dc; font-size: .62rem; }
.pdf-reader-toolbar h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 1.12rem; font-weight: 600; }
.pdf-reader-controls { display: flex; align-items: center; gap: 6px; }
.pdf-reader-controls button { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid #829ab1; border-radius: 5px; color: white; background: transparent; font-weight: 750; cursor: pointer; }
.pdf-reader-controls button:hover:not(:disabled), .pdf-reader-controls button:focus-visible { border-color: white; background: rgba(255,255,255,.1); }
.pdf-reader-controls button:disabled { opacity: .4; cursor: default; }
.pdf-page-control { display: flex; align-items: center; gap: 5px; color: #d9e2ec; font-size: .75rem; }
.pdf-page-control input { width: 50px; height: 34px; padding: 0 5px; border: 1px solid #829ab1; border-radius: 5px; color: white; background: #243b53; text-align: center; }
.pdf-control-divider { width: 1px; height: 24px; margin: 0 3px; background: #486581; }
.pdf-reader-stage { height: min(78dvh, 920px); min-height: 560px; display: grid; place-items: start center; padding: 16px; overflow: auto; position: relative; background: #525659; outline: none; }
.pdf-reader-stage:focus-visible { box-shadow: inset 0 0 0 3px #75d6dc; }
.pdf-reader-canvas { display: block; max-width: none; background: white; box-shadow: 0 4px 18px rgba(0,0,0,.28); }
.pdf-reader-status, .pdf-reader-error { position: absolute; top: 50%; left: 50%; max-width: min(460px, calc(100% - 40px)); margin: 0; padding: 12px 16px; border-radius: 6px; color: white; background: rgba(16,42,67,.92); text-align: center; transform: translate(-50%, -50%); }
.pdf-reader-error a { color: white; font-weight: 750; }
.pdf-reader:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.pdf-reader:fullscreen .pdf-reader-stage { height: calc(100vh - 64px); max-height: none; }
.document-image { margin: 24px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.document-image img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.document-image figcaption { margin-top: 8px; color: var(--ink-soft); font-size: .76rem; text-align: center; }
.web-article { margin-top: 24px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.web-article > header { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.web-article > header h2 { margin: 3px 0 0; font-family: Georgia, "Songti SC", serif; font-size: 1.35rem; }
.web-article-body { max-width: 72ch; margin: 0 auto; padding: clamp(24px, 5vw, 48px); }
.web-article-body h2 { margin: 2.2em 0 .65em; font-family: Georgia, "Songti SC", serif; font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.35; }
.web-article-body h2:first-child { margin-top: 0; }
.web-article-body p { margin: 0 0 1.15em; color: #243b53; font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
.transcript-panel { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); overflow: hidden; }
.transcript-panel > summary { min-height: 70px; display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 16px; padding: 14px 18px; }
.transcript-panel[open] > summary { border-bottom: 1px solid var(--line); background: white; }
.transcript-panel > summary > span:first-child { display: grid; gap: 3px; }
.transcript-panel > summary strong { font-family: Georgia, "Songti SC", serif; font-size: 1.08rem; }
.transcript-panel > summary small, .transcript-count { color: var(--ink-soft); font-size: .73rem; }
.chunk-list { display: grid; gap: 14px; padding: 16px; }
.chunk-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.chunk-card.is-focused { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,126,139,.12); }
.chunk-card p { margin: 12px 0 0; line-height: 1.8; overflow-wrap: anywhere; }
.text-pagination { min-height: 58px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .8rem; }
.text-pagination a { color: var(--teal-dark); font-weight: 750; }
.text-pagination a:last-child { justify-self: end; }
.document-summary { max-width: 72ch; }
.document-keywords { color: var(--teal-dark) !important; font-size: .9rem; }
.secondary-button { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--teal); border-radius: 8px; background: transparent; color: var(--teal-dark); cursor: pointer; }
.translation-result { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--teal); background: #eef7f6; }
.catalog-identity { display: flex; flex-wrap: wrap; gap: 10px; }
.source-panel, .sub-library-documents { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.source-panel h2, .sub-library-documents h2 { margin-top: 0; font-family: Georgia, "Songti SC", serif; }
.source-list, .document-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.source-list li, .document-list li { display: grid; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.source-list li:last-child, .document-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.source-list a { width: fit-content; color: var(--teal-dark); }
.document-list a { display: grid; gap: 3px; }
.document-list a span, .document-list small { color: var(--ink-soft); }
.ask-form { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.ask-form label { font-weight: 750; }
.ask-form textarea { width: 100%; min-height: 130px; resize: vertical; padding: 13px; border: 1px solid #b8c2ca; border-radius: 8px; font: inherit; line-height: 1.6; }
.ask-form button { justify-self: end; min-height: 44px; padding: 0 18px; border: 0; border-radius: 7px; color: white; background: var(--teal-dark); font-weight: 750; }
.scope-note { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .82rem; }
.scope-note a, .scope-action a { color: var(--teal-dark); font-weight: 750; }
.scope-action { margin: 14px 2px 0; text-align: right; }
.ask-alert { margin-top: 14px; }
.answer-card { margin-top: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.answer-card h2 { margin-top: 0; font-family: Georgia, "Songti SC", serif; }
.answer-card p { line-height: 1.8; }
.citation-list { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.citation-list a { color: var(--teal-dark); font-size: .82rem; }
.citation-item { display: grid; gap: 8px; }
.citation-thumbnail { width: fit-content; }
.citation-thumbnail img { display: block; width: 120px; max-height: 90px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.qa-history { margin-top: 32px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.history-heading h2, .history-heading form { margin: 0; }
.answer-heading { display: flex; justify-content: space-between; gap: 15px; }
.answer-heading form { margin: 0; }
.text-danger { border: 0; color: #9b2c2c; background: transparent; cursor: pointer; }

@media (max-width: 760px) {
  .login-shell { display: block; background: white; }
  .login-intro { min-height: 38vh; padding: 42px 24px 36px; justify-content: end; }
  .login-intro h1 { font-size: 2.7rem; }
  .login-lead { font-size: .95rem; line-height: 1.65; }
  .signal-rule { margin: 24px 0 14px; }
  .login-panel { min-height: 62vh; padding: 36px 24px 54px; justify-content: start; gap: 24px; }
  .site-header { height: 64px; padding: 0 16px; }
  .brand small, .account-name { display: none; }
  .app-shell { width: min(100% - 28px, 1180px); padding-top: 34px; }
  .hero { display: block; margin-bottom: 24px; }
  .hero-stat { display: none; }
  .hero h1 { font-size: 2.15rem; }
  .hero p:last-child { font-size: .88rem; }
  .tool-row { grid-template-columns: 1fr; }
  .future-tool { min-height: 44px; }
  .catalog-search { grid-template-columns: 21px 1fr auto; padding-left: 12px; }
  .catalog-search button { padding: 0 14px; }
  .root-card > summary { min-height: 70px; grid-template-columns: 32px 1fr 16px; gap: 10px; padding: 12px 14px; }
  .root-count { display: none; }
  .root-title strong { font-size: 1.12rem; }
  .group-list { padding: 5px 12px 12px 38px; }
  .group-card > summary { grid-template-columns: 20px 1fr 14px; gap: 9px; }
  .group-summary-text { align-items: flex-start; }
  .group-heading { display: grid; gap: 2px; }
  .group-en::before { display: none; }
  .leaf-list { padding-left: 12px; }
  .leaf-list li { display: grid; gap: 8px; padding: 11px 4px 11px 10px; }
  .leaf-identity { max-width: calc(100vw - 92px); }
  .leaf-meta { justify-content: flex-start; padding-left: 26px; flex-wrap: wrap; }
  .source-count { display: none; }
  .filter-summary { font-size: .78rem; }
  .weekly-panel { padding: 17px 16px; }
  .weekly-heading { align-items: flex-start; }
  .weekly-heading a { display: none; }
  .weekly-list { grid-template-columns: 1fr; }
  .site-footer { display: grid; gap: 6px; }
  .search-primary { grid-template-columns: 1fr; }
  .search-primary button { min-height: 46px; }
  .search-filters { grid-template-columns: 1fr 1fr; }
  .search-filters label:nth-child(3), .search-filters .history-toggle { grid-column: 1 / -1; }
  .result-heading { display: grid; gap: 4px; }
  .result-card { padding: 16px; }
  .result-footer { display: grid; gap: 5px; }
  .document-heading h1 { font-size: 1.75rem; overflow-wrap: anywhere; }
  .document-heading > p:not(.eyebrow) { font-size: .86rem; line-height: 1.65; }
  .document-actions { align-items: stretch; gap: 9px 14px; flex-wrap: wrap; }
  .document-actions a { display: inline-flex; align-items: center; min-height: 42px; font-size: .82rem; }
  .web-article { margin-right: -4px; margin-left: -4px; }
  .web-article > header { padding: 15px 16px; }
  .web-article-body { padding: 22px 17px; }
  .web-article-body p { font-size: .94rem; line-height: 1.78; }
  .pdf-reader { margin-right: -14px; margin-left: -14px; border-right: 0; border-left: 0; border-radius: 0; }
  .pdf-reader-toolbar { min-height: 58px; align-items: flex-start; padding: 10px; }
  .pdf-reader-toolbar > div:first-child { display: none; }
  .pdf-reader-controls { width: 100%; justify-content: center; gap: 4px; }
  .pdf-reader-controls button { min-width: 33px; height: 36px; padding: 0 6px; font-size: .75rem; }
  .pdf-page-control input { width: 42px; }
  .pdf-control-divider { margin: 0; }
  .pdf-reader-stage { height: 72dvh; min-height: 430px; padding: 10px; }
  .transcript-panel > summary { grid-template-columns: 1fr 16px; gap: 10px; padding: 12px 14px; }
  .transcript-count { display: none; }
  .chunk-list { padding: 10px; }
  .chunk-card { padding: 15px; }
  .chunk-card p { font-size: .88rem; line-height: 1.7; }
  .text-pagination { padding: 10px 14px; gap: 8px; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
