
:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #202b25;
  background: #f4f2eb;
  --ink: #202b25;
  --muted: #536057;
  --green: #244638;
  --forest: #18352b;
  --green-soft: #e4ece0;
  --accent: #c79a53;
  --focus: #975600;
  --surface: #fffef9;
  --paper: #f4f2eb;
  --line: #d9dbcf;
  --radius: 13px;
  --sidebar: 228px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
body.dialog-open { overflow: hidden; }
h1,h2,h3,h4,p,ul,dl,dd { margin: 0; }
ul { list-style: none; padding: 0; }
h1 { font-family: Georgia, "Noto Serif SC", "Songti SC", SimSun, serif; line-height: 1.13; letter-spacing: -.04em; font-size: clamp(32px, 4vw, 53px); }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
h3 { font-size: 17px; line-height: 1.45; }
p, dd { line-height: 1.65; }
a { color: inherit; text-decoration: none; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .6; cursor: wait; }
img { display: block; max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline-offset: 3px; }
[tabindex="-1"][id^="loc-"] { scroll-margin-top: 76px; }
::selection { color: var(--ink); background: #ecd5ae; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 12px; z-index: 100; transform: translateY(-160%); background: var(--surface); padding: 12px 16px; border-radius: 6px; }
.skip-link:focus { transform: none; }
.noscript { text-align: center; padding: 30px; }

.quiet { color: var(--muted); font-size: .86rem; }
.eyebrow { font-size: .75rem; font-weight: 750; letter-spacing: .15em; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.section-stack { display: grid; gap: 15px; }
.chip-row, .badge, .button, .text-link { display: inline-flex; align-items: center; gap: 6px; }
.chip-row { flex-wrap: wrap; }
.button { min-height: 42px; justify-content: center; padding: 7px 13px; border-radius: 7px; border: 1px solid transparent; font-size: .86rem; font-weight: 650; line-height: 1.24; text-align: left; }
.button.primary { background: var(--forest); color: #fffef8; }
.button.primary:hover { background: #2e5242; }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.secondary:hover, .button.filled-soft { background: var(--green-soft); border-color: #b9c9b7; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; flex-shrink: 0; }
.icon-button:hover { background: #82948d24; }
.text-link { color: #295643; font-size: .87rem; font-weight: 670; min-height: 35px; line-height: 1.4; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.badge { min-height: 23px; flex-wrap: wrap; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; color: #4c594e; background: #f6f6f0; font-size: .72rem; font-weight: 650; line-height: 1.35; }
.badge.observed { border-color: #c3d2ba; background: #e6efe1; color: #2c5034; }
.badge.mentioned { border-color: #dccca6; background: #f5ecd5; color: #684b18; }
.badge.pending { border-color: #e2c6b9; background: #f8ede5; color: #784231; }
.badge.absent { border-color: #d1bd9d; background: #f7efdf; color: #634521; }
.badge.na, .badge.unrecorded { background: #efefea; }
.badge.evidence { white-space: normal; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 170px; text-align: center; padding: 24px; border: 1px dashed #c9ccbe; border-radius: var(--radius); background: #f8f8f1; color: var(--muted); }
.loading { flex-direction: row; }
.loader { display: inline-block; width: 18px; height: 18px; border: 2px solid #c7d3c6; border-right-color: var(--green); border-radius: 50%; animation: rotate .75s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.boot { margin: 10vh auto; max-width: 640px; padding: 24px; }
input:not([type=checkbox]), select, textarea { min-width: 0; border: 1px solid #bec4b8; border-radius: 7px; background: #fffef9; padding: 10px 12px; width: 100%; min-height: 42px; }
input::placeholder, textarea::placeholder { color: #627065; opacity: 1; }
input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--green); flex-shrink: 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: .86rem; font-weight: 600; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fdfcf6; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #f3deaf; border: 1px solid #86a19770; border-radius: 9px; background: #fbfbec11; }
.brand-title { font-weight: 740; letter-spacing: .02em; font-size: 16px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.login-context { background: radial-gradient(ellipse at 114% 104%, #35614d 0, transparent 60%), var(--forest); color: #fffdf2; padding: 48px clamp(28px,6vw,100px); display: flex; flex-direction: column; justify-content: space-between; gap: 36px; }
.login-intro { margin: auto 0; padding: 15vh 0 10vh; }
.login-intro .eyebrow { color: #e2c795; margin-bottom: 17px; }
.login-intro h1 { font-size: clamp(36px, 5.8vw, 80px); line-height: 1.14; }
.login-intro > p:not(.eyebrow) { margin-top: 18px; color: #e1eae0; letter-spacing: .015em; font-size: clamp(.95rem, 1.55vw, 1.2rem); }
.login-index { margin-top: 49px; border-top: 1px solid #9aae9980; max-width: 490px; font-size: .89rem; }
.login-index > div { display: grid; grid-template-columns: 28px 42px minmax(0,1fr); align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #9aae9956; }
.login-index svg { color: #e6cb9c; }
.login-index dt { font-weight: 700; }
.login-index dd { color: #d7e3d8; }
.login-side { align-self: center; justify-self: center; max-width: 520px; width: 100%; padding: 36px 42px; }
.login-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(22px,4vw,42px); box-shadow: 0 12px 32px #192e2010; }
.login-lock { width: 44px; height: 44px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); }
.login-panel h2 { font-size: 28px; }
.login-panel h2 + p { margin-top: 6px; }
#login-form { display: grid; gap: 7px; margin: 22px 0 14px; }
#login-form label, .gap-edit label { font-size: .87rem; font-weight: 650; }
#login-form input { margin-bottom: 9px; }
#login-form button { min-height: 46px; width: 100%; }
.form-error { color: #8c352b; font-weight: 650; font-size: .86rem; line-height: 1.5; }
.form-error:empty { display: none; }
.login-help { border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: .8rem; }

.workspace { display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--forest); color: #e4ece1; padding: 22px 16px; }
.sidebar .brand { padding-left: 6px; }
.sidebar nav { display: grid; gap: 4px; margin-top: 34px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: #dfebdf; font-size: .91rem; font-weight: 600; }
.sidebar .nav-link:hover { background: #f1f7eb16; }
.sidebar .nav-link.is-active { background: #e6ecd7; color: #1c3a2e; }
.sidebar :focus-visible, .login-context :focus-visible { outline-color: #edc47b; }
.account { margin-top: auto; padding: 15px 0 0; border-top: 1px solid #91a79a69; display: grid; grid-template-columns: 32px minmax(0,1fr) 36px; gap: 8px; align-items: center; }
.account-avatar { border-radius: 50%; display: grid; place-items: center; width: 32px; height: 32px; color: #233b2c; background: #ddc491; font-size: 13px; font-weight: 700; }
.account strong, .account small { display: block; }
.account strong { font-size: .83rem; overflow-wrap: anywhere; }
.account small { color: #c4d3c8; font-size: .72rem; margin-top: 2px; }
.topbar { min-height: 62px; padding: 10px clamp(16px,3vw,44px); background: #fdfcf5; border-bottom: 1px solid var(--line); display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: .87rem; }
.crumb { color: var(--ink); font-weight: 680; }
.crumb-home { min-height: 42px; display: inline-flex; align-items: center; }
.crumb-home:hover { color: var(--green); text-decoration: underline; }
.crumb-arrow { display: inline-flex; }
.top-search { margin-left: auto; color: var(--green); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.mobile-menu, .mobile-brand { display: none; }
.page { padding: clamp(18px,3vw,39px) clamp(16px,3.25vw,48px) 42px; width: 100%; max-width: 1720px; margin-inline: auto; }
.page-heading { margin-bottom: 21px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-heading p { margin-top: 7px; color: var(--muted); font-size: .96rem; }
#notice { position: fixed; z-index: 5; bottom: 22px; right: 22px; max-width: min(84vw,360px); background: #244333; color: #fffdf2; padding: 11px 15px; border-radius: 8px; box-shadow: 0 4px 16px #0003; font-size: .88rem; visibility: hidden; }
#notice.visible { visibility: visible; }
.dialog-notice { position: sticky; bottom: 0; margin-left: auto; width: fit-content; display: none; background: #244333; color: #fffdf2; padding: 10px 15px; border-radius: 8px 0 0; font-size: .86rem; }
.dialog-notice.visible { display: block; }

.filter-panel { padding: 15px 16px 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.search-field { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; color: var(--green); }
.search-field > svg { margin-left: 4px; }
.search-field input[type=search] { border: 0; background: transparent; padding: 9px 7px; font-size: .98rem; }
.search-field .button { min-width: 72px; }
.primary-facets, .facet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 12px; }
.primary-facets { grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; padding: 9px 0 4px; border-top: 1px solid var(--line); margin-top: 10px; }
.primary-facets > .facet:last-of-type { min-width: 0; }
.facet { display: grid; gap: 4px; min-width: 0; }
.facet > span { font-size: .74rem; font-weight: 680; color: var(--muted); }
.facet select { min-height: 37px; padding: 7px 8px; font-size: .86rem; background: #f9faf4; }
.advanced-filters summary { width: fit-content; cursor: pointer; color: var(--green); min-height: 33px; display: flex; align-items: center; gap: 7px; list-style: none; font-size: .84rem; font-weight: 650; }
.advanced-filters summary::after { content: "▾"; }
.advanced-filters[open] summary::after { content: "▴"; }
.advanced-filters[open] .facet-grid { margin-top: 6px; margin-bottom: 7px; }
.filter-pills, .preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-pills:not(:empty) { padding-top: 5px; }
.filter-pill, .preset { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; color: var(--green); border: 1px solid #c6d2c0; background: #f1f4eb; padding: 4px 9px; border-radius: 6px; font-weight: 650; font-size: .79rem; }
.filter-pill:hover, .preset:hover, .preset.is-active { background: var(--green-soft); border-color: #9caf96; }
.preset-row { padding-top: 10px; }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin: 18px 0 11px; }
.result-head h2 span { display: inline-flex; vertical-align: 1px; color: #42604a; background: var(--green-soft); padding: 1px 7px; border-radius: 6px; font: 650 .8rem/1.55 "Segoe UI",sans-serif; margin-left: 5px; }
.case-grid,.material-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.study-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.study-cover { display: grid; grid-template: repeat(2,minmax(0,1fr)) / minmax(0,2.05fr) minmax(0,1fr); gap: 3px; width: 100%; flex: none; aspect-ratio: 2 / 1; overflow: hidden; background: var(--surface); }
.study-cover .study-picture { height: 100%; min-height: 0; }
.study-cover .study-picture:first-child { grid-row: span 2; }
.study-cover .study-picture img { position: absolute; inset: 0; object-fit: cover; }
.study-cover .study-picture:first-child img { object-fit: contain; }
.study-card .case-card-body { grid-template-rows: auto auto 1fr auto; }
.study-card .case-card-label > span:last-child { flex-shrink: 1; text-align: right; }
.study-card .case-coverage { display: block; }
.study-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }
.study-sections { display: grid; gap: 32px; }
.study-section { padding-top: 12px; border-top: 1px solid var(--line); scroll-margin-top: 76px; }
.study-section-head { display: grid; gap: 8px; margin-bottom: 14px; }
.study-section-head p { color: var(--muted); max-width: 74ch; line-height: 1.7; }
.case-card, .material-card { display: flex; flex-direction: column; min-width: 0; min-height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; transition: border-color .15s, box-shadow .15s; }
.case-card:hover,.material-card:hover { border-color: #879a87; box-shadow: 0 5px 12px #29433213; }
.case-card h2 { font-size: 1.1rem; font-weight: 720; overflow-wrap: anywhere; }
.case-card-body, .material-body { display: grid; gap: 7px; padding: 13px 14px 12px; flex: 1; align-content: start; }
.case-card-body { grid-template-rows: auto auto auto 1fr auto; }
.case-meta,.case-coverage { color: var(--muted); font-size: .79rem; line-height: 1.5; }
.case-coverage { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.case-card-label { display: flex; justify-content: space-between; gap: 6px; color: #37523e; font-size: .72rem; font-weight: 730; line-height: 1.35; }
.case-card-label > span:last-child { flex-shrink: 0; }
.case-card-foot, .material-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding-top: 9px; border-top: 1px solid #e2e3d8; font-size: .74rem; line-height: 1.45; color: var(--muted); }
.case-card-foot strong { color: var(--ink); white-space: nowrap; }
.case-card-foot svg,.material-foot > svg { margin-left: auto; color: var(--green); }
.preview { position: relative; overflow: hidden; background: #e6e8de; width: 100%; }
.preview img { width: 100%; height: 100%; object-fit: contain; }
.cover,.document-cover { aspect-ratio: 16 / 9; }
.cover { background: #e2e7dd; }
.preview-fallback { min-height: 100%; display: grid; justify-items: center; align-content: center; gap: 8px; font-size: .83rem; color: var(--muted); padding: 15px; }
.document-cover { display: flex; gap: 17px; align-items: center; padding: 18px; background: linear-gradient(145deg,#dce8d8,#eef0e6); color: #2b4d3a; }
.document-cover small,.document-cover strong { display: block; }
.document-cover small { font-size: .79rem; margin-top: 4px; }
.document-icon { display: grid; place-items: center; width: 62px; height: 70px; border: 1px solid #98ae99; border-radius: 9px; background: #fcfef59c; }
.editorial-panel { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; padding: 18px 20px; border: 1px solid #cbd5c6; border-radius: var(--radius); background: #e8ede3; }
.editorial-panel h2 { margin-top: 3px; }
.dashboard-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 16px 0; }
.dashboard-sections .quiet { margin: 4px 0 9px; }
.bars a { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(35px,1fr) auto; align-items: center; gap: 8px; min-height: 39px; font-size: .83rem; }
.bars a:hover { color: #34664a; text-decoration: underline; }
progress { width: 100%; height: 8px; accent-color: var(--green); border: 0; border-radius: 20px; overflow: hidden; background: #dce4d8; }
progress::-webkit-progress-bar { background: #dce4d8; }
progress::-webkit-progress-value { background: #4f795c; }
progress::-moz-progress-bar { background: #4f795c; }

.detail-head { display: grid; gap: 8px; margin-bottom: 19px; }
.back-link { color: var(--green); font-weight: 650; width: fit-content; min-height: 33px; font-size: .86rem; }
.back-link:hover { text-decoration: underline; }
.detail-type { color: var(--green); font-size: .78rem; font-weight: 730; line-height: 1.5; }
.detail-head h1 { font-size: clamp(30px,3.6vw,47px); overflow-wrap: anywhere; }
.meta-line { color: var(--muted); font-size: .87rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; }
.detail-summary { max-width: 79ch; font-size: .94rem; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.metrics-strip, .metrics-complete { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit,minmax(118px,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.metric { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: start; gap: 4px; padding: 13px 14px; background: var(--surface); }
.metric strong { font: 650 clamp(1.22rem,2vw,1.63rem)/1.3 Georgia,"Times New Roman",serif; color: var(--forest); white-space: normal; }
.metric > span,.metric p { font-size: .77rem; color: var(--muted); }
.metric-refs { display: flex; gap: 5px; flex-wrap: wrap; }
.source-number { display: inline-grid; place-items: center; border-radius: 6px; background: var(--green-soft); color: #325b42; min-width: 24px; min-height: 24px; font-weight: 700; font-size: .78rem; padding: 1px 5px; }
a.source-number:hover { background: #c4d7bc; }
.phase-rail { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; margin: 12px 0 20px; }
.phase-rail a { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px; display: grid; gap: 4px; justify-items: start; }
.phase-rail a:hover { border-color: #819d82; }
.phase-code { font-size: .72rem; font-weight: 750; color: #4b6e55; }
.phase-rail strong { font-size: .88rem; line-height: 1.4; }
.section-tabs { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: end; margin: 12px 0 15px; border-bottom: 1px solid var(--line); }
.section-tabs a { padding: 11px 8px; min-height: 44px; border-bottom: 3px solid transparent; font-weight: 680; font-size: .89rem; color: var(--muted); }
.section-tabs a:hover,.section-tabs a.is-active { color: var(--green); }
.section-tabs a.is-active { border-color: var(--green); }
.result-head.agenda-head { margin-top: 1px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: #e7e9de; border: 1px solid var(--line); border-radius: 8px; font-size: .84rem; }
.segmented button { padding: 5px 11px; min-height: 33px; font-weight: 650; border-radius: 5px; }
.segmented button.is-active { background: var(--surface); color: var(--green); box-shadow: 0 1px 3px #28433322; }
.group-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 10px; }
.group-tabs button { min-height: 35px; font-size: .82rem; }
.group-tabs small { color: var(--muted); }
.agenda-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 13px; margin-top: 8px; }
.agenda-list { display: flex; flex-direction: column; gap: 5px; min-width: 0; align-items: stretch; }
.agenda-entry,.segment-detail { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); min-width: 0; }
.agenda-row { display: grid; grid-template-columns: minmax(72px,.53fr) minmax(0,1fr) 15px; align-items: center; text-align: left; gap: 8px; width: 100%; padding: 12px 10px; border-radius: 8px; min-height: 58px; }
.agenda-row.is-active { background: #e2ece0; box-shadow: inset 3px 0 #527b58; }
.agenda-row:hover { background: #e7ece2; }
.slot-time,.slot-main { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.slot-time strong { font-size: .8rem; font-variant-numeric: tabular-nums; color: #3c5746; }
.slot-main strong { font-size: .9rem; }
.slot-time small,.slot-main small { color: var(--muted); font-size: .73rem; }
.slot-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.segment-detail { padding: 16px; display: grid; gap: 9px; line-height: 1.6; }
.segment-detail h3 { font-size: 1.25rem; }
.segment-result { font-size: .88rem; }
.mobile-segment { display: none; }
.segment-refs { display: flex; gap: 5px 10px; flex-wrap: wrap; align-items: center; }
.source-locator { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.delivery-groups { display: grid; gap: 8px; }
.delivery-groups section { background: #f6f6ed; border-radius: 7px; padding: 9px; }
.delivery-groups h4 { font-size: .82rem; }
.delivery-groups h4 span { color: var(--muted); }
.asset-line { border-radius: 5px; padding: 4px 2px; min-height: 34px; display: flex; gap: 7px; align-items: center; text-align: left; justify-content: start; color: #2f5a42; font-size: .83rem; line-height: 1.35; width: 100%; }
.asset-line:hover { text-decoration: underline; }
.asset-line span { flex: 1 1 auto; }
.aside-note { background: #f1eddf; border-radius: 7px; padding: 9px 11px; color: #4d4938; line-height: 1.6; font-size: .82rem; }
.aside-note h4 { font-size: .85rem; }
.disclosure { padding: 12px 15px; margin-top: 12px; }
.disclosure summary { cursor: pointer; min-height: 38px; align-content: center; font-weight: 720; color: var(--green); }
.disclosure .metadata,.disclosure .metrics-complete { margin-top: 8px; }
.metadata { display: grid; gap: 7px; }
.metadata > div { display: grid; grid-template-columns: minmax(65px,.28fr) minmax(0,1fr); gap: 8px; font-size: .86rem; line-height: 1.55; }
.metadata dt { font-weight: 700; color: #3f5347; }
.metadata dd { overflow-wrap: anywhere; }
.source-group { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.source-group h3 { margin: 0 0 6px; }
.source-group li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 12px; padding: 11px 0; align-items: start; border-top: 1px solid var(--line); font-size: .86rem; }
.source-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.partner-panel ul { display: grid; gap: 9px; }
.partner-panel li { padding-top: 12px; border-top: 1px solid var(--line); font-size: .88rem; }
.partner-panel li h3 { margin-bottom: 4px; }
.partner-panel li p { margin-top: 7px; }

.material-image,.material-placeholder { aspect-ratio: 16 / 10; background: #e8e9df; }
.material-cover { position: relative; }
.video-mark { position: absolute; bottom: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: #18352be6; }
.material-placeholder { display: grid; justify-items: center; align-content: center; gap: 8px; color: #4f6459; }
.material-placeholder span { text-align: center; padding-inline: 5px; font-size: .8rem; }
.material-body { width: 100%; }
.material-body > strong { line-height: 1.45; font-size: .96rem; overflow-wrap: anywhere; }
.material-foot { justify-content: space-between; }
.material-group { margin-bottom: 16px; }
.material-group h2 { margin-bottom: 6px; }
.load-row { margin-top: 16px; text-align: center; }
.asset-dialog { position: fixed; width: min(1120px,calc(100% - 36px)); max-height: min(88vh,900px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: 0 18px 90px #0006; overflow: auto; }
.asset-dialog::backdrop { background: #102018a3; }
.dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; min-height: 53px; padding: 5px 12px 5px 16px; border-bottom: 1px solid var(--line); background: #f9f8f0; color: var(--green); font-size: .88rem; font-weight: 730; }
.dialog-controls { display: flex; align-items: center; gap: 6px; }
.dialog-content { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(0,1fr); }
.viewer { min-width: 0; background: #e8e9df; display: grid; align-content: start; }
.archive-video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #121a15; }
.video-launch { position: relative; display: grid; background: #111b15; color: #fff; }
.video-poster { aspect-ratio: 16 / 9; background: #111b15; }
.video-launch > a, .video-launch > button { position: absolute; left: 12px; bottom: 12px; padding: 10px 14px; border-radius: 7px; background: #fffef9; color: #17372a; max-width: calc(100% - 24px); }
.large-preview { min-height: min(54vh,520px); display: grid; place-items: center; background: #e7e9df; }
.large-preview img { width: auto; height: auto; max-height: min(68vh,740px); margin: 0 auto; object-fit: contain; }
.viewer.zoomed .large-preview { display: block; max-height: 73vh; overflow: auto; }
.viewer.zoomed .large-preview img { max-width: none; width: max(115%,900px); max-height: none; }
.viewer-empty { min-height: 250px; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; padding: 12px; color: var(--muted); }
.viewer-empty strong { font-size: 1.15rem; }
.viewer-empty p { font-size: .88rem; }
.viewer-caption { padding: 8px 14px; color: var(--muted); font-size: .79rem; text-align: center; }
.viewer.paired { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto auto; align-items: start; gap: 0 6px; }
.viewer.paired > .large-preview { grid-column: 1; grid-row: 1; }
.viewer.paired > .viewer-caption { grid-column: 1; grid-row: 2; align-self: end; }
.paired-variant { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.viewer.paired .large-preview { min-height: 0; max-height: 55vh; align-content: start; }
.viewer.paired .large-preview img { max-height: 55vh; }
.viewer.paired.zoomed .large-preview img { max-height: none; }
.evidence-panel { padding: 16px; display: grid; align-content: start; gap: 9px; }
.evidence-panel h2 { font-size: 1.38rem; overflow-wrap: anywhere; }
.evidence-panel section { font-size: .89rem; }
.evidence-panel section h3 { font-size: .95rem; }
.viewer-actions { display: flex; gap: 5px 9px; flex-wrap: wrap; align-items: center; }
.asset-origin { padding: 7px 8px; border: 1px solid #d9e0d1; background: #edf2e8; border-radius: 7px; font-size: .83rem; }
.asset-origin > span { display: block; }
.family-section { padding: 15px; border-top: 1px solid var(--line); }
.family-section h3 { margin-bottom: 9px; }
.family-section h3 span { font-weight: 500; font-size: .8rem; color: var(--muted); }
.family-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }

.compare-choices,.compare-headings,.compare-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.compare-choice { display: grid; gap: 6px; }
.compare-choice > label:first-child { font-size: .88rem; font-weight: 740; }
.compare-actions,.quick-pairs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; }
.compare-banner { margin: 16px 0 11px; display: flex; align-items: start; gap: 9px; padding: 12px; background: #e7ede1; color: #2c503c; border-radius: 8px; font-size: .88rem; }
.compare-headings section,.compare-stage-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; font-size: .87rem; }
.compare-headings h2 .text-link { font-size: 1rem; }
.comparison-line { padding: 10px 12px; margin-top: 8px; }
.comparison-line h3 { font-size: .96rem; margin-bottom: 7px; }
.compare-metrics .comparison-line { border-top: 1px solid var(--line); padding-inline: 0; }
.compare-pair p { font-size: .82rem; }
.compare-section-title { margin-top: 15px; }

.method-index { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,.55fr); gap: 10px; align-items: center; }
.dimension-nav { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.dimension-nav a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; color: var(--green); background: var(--surface); font-weight: 750; }
.dimension-nav a:hover { background: var(--green-soft); }
.method-group .result-head { margin: 0 0 4px; }
.method-group-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 10px; }
.method-group-grid article { padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
.method-group-grid h3 { font-size: .9rem; margin-bottom: 3px; color: var(--green); }
.method-group-grid li { padding: 4px 0; font-size: .82rem; display: flex; gap: 5px; align-items: baseline; }
.code { font: .75rem ui-monospace, "Cascadia Mono", monospace; color: #526554; }
.method-rules { margin-top: 12px; }
.method-rules h2 { margin-bottom: 6px; }
.finding-card { max-width: 990px; }
.finding-card .result-head { margin-top: 0; }
.finding-card h2 { font-size: 1.4rem; margin: 4px 0 10px; }
.finding-card h3 { margin-top: 14px; }
.finding-evidence li,.verification-card li { border-top: 1px solid var(--line); padding: 8px 0; }
.finding-evidence { margin-top: 7px; }
.finding-evidence strong,.verification-card strong { font-size: .88rem; }
.verification-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.verification-card { display: grid; gap: 7px; align-content: start; }
.verification-card > p { font-size: .86rem; }
.verification-card li { display: grid; gap: 4px; font-size: .83rem; }
.template-panel .chip-row { margin-top: 6px; }
.template-row { border-top: 1px solid var(--line); padding: 10px 0; }
.template-row .toggle { font-size: 1rem; }
.gap-card .result-head { margin-top: 0; }
.gap-card p { margin: 3px 0; }
.gap-edit { display: grid; gap: 8px; padding: 16px; max-width: 650px; margin-inline: auto; }
.gap-edit label { display: grid; gap: 5px; }
.gap-edit h2 { padding-bottom: 6px; }
[data-gap-filters] .facet-grid { margin: 9px 0 0; }
.member-list article { border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.member-list article:first-child { border-top: 0; }
.member-list h2 { font-size: 1rem; }

@media (max-width: 1130px) {
  :root { --sidebar: 194px; }
  .sidebar { padding-inline: 12px; }
  .phase-rail { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .case-card-foot { flex-wrap: wrap; }
  .compare-headings section { padding: 8px; }
}
@media (max-width: 990px) {
  .case-grid,.material-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .primary-facets { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .source-group li { grid-template-columns: 26px minmax(0,1fr); }
  .source-actions { grid-column: 2; }
  .agenda-layout { grid-template-columns: minmax(0,1fr); }
  .desktop-segment { display: none; }
  .mobile-segment { display: block; padding: 4px 8px 8px; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: minmax(0,1fr); }
  .login-context { padding: 17px; gap: 15px; }
  .login-intro { padding: 0 0 5px; }
  .login-intro .eyebrow { margin-bottom: 5px; }
  .login-intro h1 { font-size: 37px; }
  .login-intro > p:not(.eyebrow) { margin-top: 5px; }
  .login-index { display: none; }
  .login-side { padding: 18px 15px 26px; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; }
  .sidebar.menu-open { display: flex; position: fixed; top: 62px; left: 0; z-index: 3; width: min(80vw,260px); height: calc(100dvh - 62px); box-shadow: 15px 0 25px #0004; }
  .mobile-menu { display: grid; color: var(--green); }
  .mobile-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: .93rem; }
  .mobile-brand .brand-mark { width: 31px; height: 31px; border-color: #a9baa9; background: var(--green-soft); color: var(--green); }
  .crumb-home,.crumb-arrow,.crumb { display: none; }
  .topbar { gap: 6px; min-height: 62px; }
  .top-search { font-size: .78rem; }
  .button,.icon-button,.preset,.filter-pill,.segmented button,.group-tabs button,.advanced-filters summary,.text-link,.asset-line,.facet select,.source-number { min-height: 44px; }
  .icon-button { width: 44px; }
  .page-heading { margin-bottom: 15px; }
  .page-heading p { font-size: .85rem; }
  .facet-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-grid,.study-grid,.material-grid,.dashboard-sections,.verification-grid,.method-index { grid-template-columns: minmax(0,1fr); }
  .study-section .material-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .study-section .material-body { padding: 9px; }
  .study-section .case-card-label { flex-wrap: wrap; }
  .method-group-grid,.family-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dialog-content { grid-template-columns: minmax(0,1fr); }
  .asset-dialog { max-height: 95dvh; width: calc(100% - 14px); }
  .large-preview { min-height: min(37vh,330px); }
  .large-preview img { max-height: 48vh; }
  .viewer-empty { min-height: 160px; }
  .viewer.paired { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; }
  .viewer.paired > .large-preview,.viewer.paired > .viewer-caption,.paired-variant { grid-column: auto; grid-row: auto; }
  .metadata > div { grid-template-columns: minmax(63px,.37fr) minmax(0,1fr); font-size: .8rem; }
  .compare-headings .text-link,.compare-pair h3 { font-size: .86rem; }
  .segment-detail { padding: 10px; }
}
@media (max-width: 415px) {
  .page { padding: 17px 12px 34px; }
  .filter-panel,.panel { padding-inline: 11px; }
  .preset { min-height: 44px; }
  .badge { font-size: .68rem; }
  .method-group-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
