:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Pretendard Variable', 'Pretendard', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Pretendard Variable', 'Pretendard', sans-serif;
  --font-mono: 'SF Mono', ui-monospace, Menlo, monospace;
  --bg: #fbfbfa; --surface: #fff; --surface-2: #f4f4f2;
  --text: #171a18; --text-dim: #5c635e;
  --border: #dedfdb; --border-strong: #b6bcb7;
  --accent: #134538; --accent-on: #fff; --accent-soft: #eaf0ed;
  --backdrop: rgba(0, 0, 0, .45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #06080a; --surface: #0e1214; --surface-2: #151b1e;
    --text: #e9edeb; --text-dim: #a6b0a9;
    --border: #30383a; --border-strong: #58645e;
    --accent: #E985A2; --accent-on: #1a0f14; --accent-soft: #2c1d25;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06080a; --surface: #0e1214; --surface-2: #151b1e;
  --text: #e9edeb; --text-dim: #a6b0a9;
  --border: #30383a; --border-strong: #58645e;
  --accent: #E985A2; --accent-on: #1a0f14; --accent-soft: #2c1d25;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; scrollbar-width: thin; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-sans); -webkit-font-smoothing: antialiased; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button, .button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; padding: 8px 13px; font-size: .88rem; font-weight: 550; cursor: pointer; min-height: 42px; }
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
button:disabled { cursor: default; opacity: .45; }
.button { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 50%; }
.brand small { font-size: .75rem; font-weight: 500; color: var(--text-dim); }
.main-nav { display: flex; gap: 20px; margin-left: auto; font-size: .9rem; }
.main-nav a { color: var(--text-dim); text-decoration: none; padding: 12px 0; }
.main-nav [aria-current] { color: var(--accent); box-shadow: 0 2px var(--accent); font-weight: 650; }
.utilities { display: flex; gap: 6px; }
.utilities button { padding: 6px 10px; font-size: .78rem; }
.hero { padding: 54px 0 30px; max-width: 880px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font: .77rem var(--font-mono); margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; letter-spacing: -.025em; line-height: 1.25; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 720; margin: 0; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 680; margin: 0 0 14px; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 28px 0 10px; }
p { margin: 10px 0; }
.lead { color: var(--text-dim); font-size: 1.08rem; margin-top: 18px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 16px; }
.small { font-size: .84rem; }
.muted { color: var(--text-dim); }
.scope { max-width: 82ch; white-space: pre-wrap; margin: 8px 0 28px; }
.notice { padding: 20px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; }
.run-picker { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border-block: 1px solid var(--border); padding: 18px 0; }
.run-picker > label { font-weight: 650; font-size: .9rem; }
select, input { min-width: 0; width: 100%; max-width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); padding: 9px 12px; min-height: 44px; }
select { text-overflow: ellipsis; }
.section-nav { display: flex; gap: 16px; font-size: .85rem; }
.section-nav a { white-space: nowrap; }
.section { padding: 36px 0 40px; border-bottom: 1px solid var(--border); min-width: 0; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; }
.section-heading h2 { margin: 0; }
.badge { font-size: .75rem; font-weight: 600; border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; color: var(--text-dim); white-space: nowrap; background: var(--surface-2); }
.badge.completed { color: var(--accent); background: var(--accent-soft); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 88ch; margin: 18px 0; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 22px; font-size: .87rem; margin: 22px 0; }
.facts dt { color: var(--text-dim); }
.facts dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.limits { background: var(--surface-2); padding: 18px 22px; margin: 24px 0 32px; border-radius: 8px; }
.limits h3 { margin: 0 0 10px; }
.limits ul { margin: 0; padding-left: 20px; font-size: .91rem; }
.limits li + li { margin-top: 6px; }
.table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; margin-top: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
caption { text-align: left; padding: 12px 14px; color: var(--text-dim); font-size: .8rem; background: var(--surface); }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
thead th { background: var(--surface-2); color: var(--text-dim); font-size: .77rem; font-weight: 600; }
tbody th { font-weight: 600; }
td { overflow-wrap: anywhere; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.comparison-table { min-width: 940px; }
.identity-table { min-width: 660px; }
.check-table { min-width: 640px; }
.verification-table { min-width: 0; table-layout: fixed; }
.verification-table th { width: 30%; overflow-wrap: anywhere; }
.verification-table td { white-space: pre-wrap; }
.mono { font-family: var(--font-mono); font-size: .81rem; overflow-wrap: anywhere; }
.filters { display: grid; grid-template-columns: 1fr 1.35fr .75fr; gap: 14px; margin: 24px 0 16px; align-items: end; }
.filters label { min-width: 0; display: grid; gap: 6px; font-size: .85rem; }
.filters select, .filters input { font-size: 1rem; }
.search-field { grid-column: 1 / 3; }
.filters > button { justify-self: start; min-height: 44px; }
.response { margin-top: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.response summary { padding: 16px; cursor: pointer; font-size: .94rem; overflow-wrap: anywhere; }
.response summary .response-title { font-weight: 650; }
.response summary .summary-meta { display: block; margin: 6px 0 0 18px; font-size: .8rem; color: var(--text-dim); }
.response[open] > summary { border-bottom: 1px solid var(--border); }
.response-body { padding: 6px 20px 24px; min-width: 0; }
.response-body h3 { margin-top: 26px; }
.response-body h4 { font-size: .9rem; margin: 18px 0 10px; }
.source-block { margin: 12px 0 22px; }
.source-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.source-head h4 { margin: 0; }
.source-head button { font-size: .75rem; min-height: 36px; padding: 5px 10px; }
.source-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 4; font: .85rem/1.75 var(--font-mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 16px; max-height: 38rem; overflow: auto; margin: 10px 0 0; text-wrap: wrap; }
.judgment { border-top: 1px solid var(--border); margin-top: 18px; }
.judgment .prose { font-size: .9rem; }
.quote { margin: 12px 0; padding: 12px 16px; background: var(--surface-2); border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
.pagination { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: 22px; }
.empty { color: var(--text-dim); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 24px; }
footer { color: var(--text-dim); margin-top: 32px !important; padding-bottom: 40px !important; }
footer a { margin-left: 12px; }
dialog { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); background: var(--surface); padding: 24px; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: var(--backdrop); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin: 0; }
.command-list { display: grid; gap: 8px; margin: 20px 0; }
.command-list button { display: flex; justify-content: space-between; text-align: left; gap: 14px; }
kbd { font: .77rem var(--font-mono); color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; padding: 2px 5px; }
.gloss { text-decoration: underline dotted; text-underline-offset: 4px; cursor: help; }
#gloss-tip { position: fixed; z-index: 50; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 12px 14px; background: var(--text); color: var(--bg); border-radius: 6px; font-size: .8rem; line-height: 1.6; pointer-events: none; }
.table-wrap, .source-text { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.scrolling .table-wrap, .scrolling .source-text, .table-wrap:hover, .table-wrap:focus-visible, .source-text:hover, .source-text:focus-visible { scrollbar-color: var(--border-strong) transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 60; padding: 10px 16px; background: var(--accent); color: var(--accent-on); border-radius: 6px; }
.skip:focus { top: 10px; }
@media (max-width: 900px) {
  .header-row { flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; padding-bottom: 10px; }
  .utilities { margin-left: auto; }
  .main-nav { order: 3; margin-left: 0; width: 100%; gap: 24px; }
  .main-nav a { padding: 5px 0; }
  .run-picker { grid-template-columns: auto minmax(0, 1fr); }
  .section-nav { grid-column: 1 / -1; }
  html { scroll-padding-top: 128px; }
}
@media (max-width: 540px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand small { display: none; }
  .utilities { gap: 5px; }
  .utilities button { padding: 6px 8px; }
  .hero { padding-top: 34px; }
  .lead { font-size: 1rem; }
  .run-picker { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .section-nav { margin-top: 10px; gap: 20px; }
  .section { padding-top: 28px; }
  .filters { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .search-field { grid-column: auto; }
  .filters > button { width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .limits { padding: 16px; }
  .response-body { padding: 4px 12px 18px; }
  .response summary { padding: 14px; }
  .source-text { padding: 12px; font-size: .8rem; }
  .page-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
