:root {
  --canvas: oklch(0.965 0.008 135);
  --rail: oklch(0.915 0.014 145);
  --surface: oklch(0.995 0.003 135);
  --ink: oklch(0.255 0.018 145);
  --muted: oklch(0.49 0.014 145);
  --line: oklch(0.84 0.013 145);
  --forest: oklch(0.40 0.065 150);
  --sage: oklch(0.90 0.027 150);
  --amber: oklch(0.48 0.090 65);
  --danger: oklch(0.46 0.14 25);
  --radius-small: 4px;
  --radius-control: 8px;
  --radius-panel: 12px;
  --control-shadow: 0 1px 3px rgba(20, 40, 25, .10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select { font: inherit; color: inherit; }
button, a, summary, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, summary { transition: transform 120ms cubic-bezier(.16, 1, .3, 1); }
button:active:not(:disabled), summary:active { transform: scale(.97); }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, .table-scroll:focus-visible, main:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
a { color: var(--forest); text-underline-offset: 3px; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.25; letter-spacing: -.012em; }
h2 { font-size: 18px; font-weight: 650; line-height: 1.4; }
h3 { font-size: 17px; font-weight: 600; }
strong { font-weight: 650; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.masthead { min-height: 80px; padding: 18px 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); box-shadow: 0 1px 0 rgba(25, 50, 30, .08); position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--forest); flex: none; }
.brand-branches { fill: var(--canvas); stroke: var(--canvas); stroke-width: 1.7; }
.brand-branches path { fill: none; }
.brand strong { font-size: 17px; display: block; line-height: 1.3; }
.brand-subtitle { display: block; font-size: 9px; color: var(--muted); letter-spacing: .11em; margin-top: 4px; }
.masthead-actions { display: flex; align-items: center; gap: 16px; }
.private-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; display: inline-block; background: var(--forest); border-radius: 50%; flex: none; }
.button { min-height: 40px; padding: 9px 15px; border: 0; border-radius: var(--radius-control); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.button-primary { background: var(--forest); color: var(--surface); box-shadow: var(--control-shadow); }
.button-secondary { background: var(--surface); box-shadow: var(--control-shadow); }
.button-quiet { background: transparent; color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; padding: 12px 16px; background: var(--forest); color: var(--surface); border-radius: var(--radius-control); }
.skip-link:focus { top: 12px; }
.session-loading { min-height: 360px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.login-layout { min-height: calc(100vh - 80px); max-width: 1100px; margin: auto; padding: 72px 40px 88px; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 100px; }
.login-intro h1 { margin: 20px 0; font-size: 34px; letter-spacing: -.022em; line-height: 1.4; }
.login-intro > p:not(.eyebrow) { max-width: 360px; color: var(--muted); }
.login-facts { margin: 32px 0 0; padding: 16px 0; border-top: 1px solid var(--line); }
.login-facts div { display: flex; gap: 20px; margin: 12px 0; font-size: 12px; }
.login-facts dt { color: var(--muted); min-width: 64px; }
.login-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.login-panel { padding: 32px; background: var(--surface); border-radius: var(--radius-panel); box-shadow: var(--control-shadow); }
.panel-index { color: var(--forest); font-size: 11px; font-weight: 600; }
.login-panel h2 { margin-top: 24px; font-size: 23px; letter-spacing: -.012em; }
.login-panel > p { margin-top: 8px; font-size: 12px; }
.login-panel form { margin-top: 28px; }
.login-panel label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
input, select { min-height: 40px; max-width: 100%; border: 0; border-radius: var(--radius-control); padding: 9px 12px; background: var(--surface); box-shadow: var(--control-shadow); font-size: 12px; }
.login-panel input { display: block; width: 100%; background: var(--canvas); }
.login-panel .button-primary { width: 100%; justify-content: space-between; padding-left: 16px; padding-right: 16px; }
.form-error { font-size: 12px; color: var(--danger); min-height: 32px; padding: 5px 0; }
.login-panel .login-footnote { margin-top: 24px; font-size: 11px; color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: calc(100vh - 80px); max-width: 1600px; margin: 0 auto; }
.rail { background: var(--rail); padding: 34px 20px 24px; display: flex; flex-direction: column; gap: 32px; }
.rail-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 0 10px; }
.rail-cycle { font-size: 22px; font-weight: 650; color: var(--forest); font-variant-numeric: tabular-nums; line-height: 1; }
.rail-cycle span { font-size: 12px; margin-left: 1px; }
.navigation { display: flex; flex-direction: column; gap: 6px; }
.nav-item { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control); border: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; background: transparent; color: var(--muted); font-size: 13px; }
.nav-item[aria-current="page"] { color: var(--forest); font-weight: 600; background: var(--surface); box-shadow: var(--control-shadow); }
.nav-count { font-size: 11px; font-variant-numeric: tabular-nums; }
.rail-context { padding: 0 10px; }
.rail-context-label { color: var(--forest); font-size: 11px; font-weight: 600; }
.schedule-line { display: flex; justify-content: space-between; gap: 12px; position: relative; margin: 12px 0 16px; font: 11px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.schedule-line span { padding-bottom: 12px; position: relative; }
.schedule-line::after { content: ""; height: 1px; background: var(--forest); opacity: .35; position: absolute; left: 0; right: 0; bottom: 3px; }
.schedule-line span::after { content: ""; width: 5px; height: 5px; background: var(--forest); border-radius: 50%; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); }
.rail-context > p:last-child { font-size: 11px; color: var(--muted); line-height: 1.8; }
.rail-note { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding: 0 10px; }
.rail-note p { color: var(--muted); font-size: 10px; line-height: 1.8; }
.workspace { min-width: 0; padding: 36px 36px 28px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.workspace-heading h1 { margin-top: 7px; }
.report-subtitle { margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.round-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding-top: 1px; }
.round-actions .field { min-width: 0; }
.round-actions input { width: 155px; }
.candidate-sections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.candidate-sections [aria-pressed="true"] { background: var(--forest); color: var(--surface); }
.day-coverage { margin: -12px 0 28px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 11px; color: var(--muted); font-weight: 600; }
.round-field { width: 230px; }
.round-field select { width: 100%; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; padding: 10px 16px; background: oklch(.94 .018 75); border-radius: var(--radius-control); color: var(--amber); font-size: 12px; }
.notice .button { color: var(--amber); }
.status-strip { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.1fr; padding: 20px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 28px; gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 11px; color: var(--muted); }
.stat strong { font-size: 26px; line-height: 1.2; letter-spacing: -.012em; font-variant-numeric: tabular-nums; }
.stat-primary strong { color: var(--forest); }
.stat-caption { color: var(--muted); font-size: 10px; line-height: 1.6; }
.stat-denominator { font-size: 14px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.stat strong.stat-clock { font-size: 22px; }
.workspace-toolbar { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 28px; }
.search-field { flex: 1; min-width: 160px; }
.search-control { position: relative; }
.search-control input { width: 100%; padding-left: 34px; }
.search-control svg { position: absolute; left: 12px; top: 12px; stroke: var(--muted); stroke-width: 1.5; fill: none; pointer-events: none; }
.site-field { width: 165px; }
.signal-field { width: 150px; }
.export-button { margin-left: auto; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 5px; }
.section-heading p { font-size: 11px; color: var(--muted); }
.section-heading .result-count { padding-top: 6px; flex: none; font-variant-numeric: tabular-nums; }
.table-scroll { width: 100%; overflow-x: auto; background: var(--surface); border-radius: var(--radius-control); box-shadow: 0 1px 3px rgba(20, 40, 25, .10); scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 660px; table-layout: fixed; }
th { padding: 12px 16px; color: var(--muted); background: var(--canvas); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid oklch(.90 .009 145); font-size: 12px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.keyword-cell { font-size: 14px; font-weight: 600; }
.clue-title { display: block; margin-bottom: 4px; }
table[data-view="keywords"] th:nth-child(1) { width: 24%; }
table[data-view="keywords"] th:nth-child(2) { width: 9%; }
table[data-view="keywords"] th:nth-child(3) { width: 18%; }
table[data-view="keywords"] th:nth-child(4) { width: 22%; }
table[data-view="keywords"] th:nth-child(5) { width: 27%; }
table[data-view="changes"] th:nth-child(1) { width: 15%; }
table[data-view="changes"] th:nth-child(2) { width: 14%; }
table[data-view="changes"] th:nth-child(3) { width: 14%; }
table[data-view="changes"] th:nth-child(4) { width: 37%; }
table[data-view="changes"] th:nth-child(5) { width: 20%; }
table[data-view="templates"] th:nth-child(1) { width: 32%; }
table[data-view="templates"] th:nth-child(2) { width: 14%; }
table[data-view="templates"] th:nth-child(3) { width: 16%; }
table[data-view="templates"] th:nth-child(4) { width: 18%; }
table[data-view="templates"] th:nth-child(5) { width: 20%; }
table[data-view="sites"] th:nth-child(1) { width: 18%; }
table[data-view="sites"] th:nth-child(2) { width: 15%; }
table[data-view="sites"] th:nth-child(3) { width: 13%; }
table[data-view="sites"] th:nth-child(4) { width: 24%; }
table[data-view="sites"] th:nth-child(5) { width: 30%; }
.numeric { font-variant-numeric: tabular-nums; }
.score-cell { font-size: 15px; font-weight: 600; color: var(--forest); }
.cell-subtitle { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; font-weight: 400; }
.signal-list { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { display: inline-block; padding: 3px 6px; border-radius: var(--radius-small); font-size: 10px; white-space: nowrap; background: var(--canvas); color: var(--muted); }
.badge-green { background: var(--sage); color: var(--forest); }
.badge-amber { background: oklch(.94 .018 75); color: var(--amber); }
.badge-red { background: oklch(.94 .02 25); color: var(--danger); }
.badge-quiet { background: var(--canvas); color: var(--muted); }
.source-details { min-width: 0; }
summary { min-height: 40px; margin: -8px 0 0; padding: 8px 0; cursor: pointer; font-size: 11px; color: var(--forest); }
.source-list { margin: 4px 0 0; padding-left: 14px; font-size: 10px; }
.source-list li { margin-bottom: 6px; }
.source-link { font-family: var(--mono); font-size: 10px; }
.detail-block { margin-top: 6px; padding: 10px; background: var(--canvas); border-radius: var(--radius-small); font-size: 10px; line-height: 1.7; }
.detail-block p + p { margin-top: 6px; }
.detail-label { color: var(--muted); }
.empty-state { min-height: 280px; padding: 40px 24px; text-align: center; background: var(--surface); border-radius: var(--radius-control); box-shadow: var(--control-shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state p { max-width: 470px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.empty-state .button { margin-top: 20px; }
.empty-mark { display: flex; gap: 5px; width: 38px; height: 23px; align-items: flex-end; margin-bottom: 22px; }
.empty-mark span { width: 8px; height: 14px; background: var(--sage); border-radius: 2px; }
.empty-mark span:nth-child(2) { height: 23px; background: var(--forest); opacity: .45; }
.empty-mark span:nth-child(3) { height: 18px; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pagination > div { display: flex; gap: 8px; }
.report-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; color: var(--muted); font-size: 10px; padding-top: 24px; }
.report-footer p { max-width: 690px; }
.report-footer > span { flex: none; }
.footnote-symbol { color: var(--forest); margin-right: 4px; }
.noscript { margin: 40px; text-align: center; }
@media (hover: hover) {
  .button-primary:hover:not(:disabled) { background: oklch(.35 .06 150); }
  .button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) { background: var(--sage); color: var(--forest); }
  .nav-item:hover { background: oklch(.94 .012 145); color: var(--forest); }
  tbody tr:hover { background: oklch(.976 .007 135); }
  a:hover { color: var(--ink); }
}
@media (min-width: 1600px) { .app-shell { box-shadow: 1px 0 0 var(--line), -1px 0 0 var(--line); } }
@media (max-width: 1100px) {
  .workspace { padding: 32px 24px; }
  .workspace-heading { flex-direction: column; gap: 18px; }
  .round-actions { width: 100%; justify-content: flex-end; }
  .workspace-toolbar { flex-wrap: wrap; }
  .search-field { flex: 1 1 calc(100% - 190px); }
  .site-field { flex: 0 0 165px; }
  .signal-field { flex: 1 1 auto; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .rail { padding: 12px 24px; display: block; }
  .rail-heading, .rail-context, .rail-note { display: none; }
  .navigation { flex-direction: row; gap: 8px; }
  .nav-item { flex: 1; max-width: 210px; }
  .workspace-heading { flex-direction: row; }
  .round-actions { width: auto; }
  .round-field { width: 220px; }
  .login-layout { gap: 48px; padding: 56px 32px; }
  .login-intro h1 { font-size: 30px; }
}
@media (max-width: 700px) {
  .workspace-heading { flex-direction: column; }
  .round-actions { width: 100%; justify-content: flex-start; }
  .round-field { flex: 1; }
  .status-strip { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .report-footer { flex-direction: column; gap: 12px; }
  .login-layout { grid-template-columns: 1fr; gap: 32px; align-items: start; max-width: 500px; }
  .login-intro h1 { font-size: 26px; }
  .login-facts { display: none; }
}
@media (max-width: 600px) {
  .masthead { min-height: 72px; padding: 16px; gap: 8px; }
  .brand { gap: 9px; }
  .brand strong { font-size: 16px; }
  .brand-subtitle { font-size: 8px; }
  .masthead-actions { gap: 4px; }
  .private-label { font-size: 10px; gap: 5px; }
  .masthead-actions .button { padding: 9px 10px; }
  .rail { padding: 10px 16px; }
  .navigation { gap: 4px; }
  .nav-item { min-width: 0; padding: 10px 9px; font-size: 12px; gap: 6px; }
  .workspace { padding: 28px 16px calc(24px + env(safe-area-inset-bottom)); }
  h1 { font-size: 25px; }
  .workspace-heading { margin-bottom: 24px; }
  .status-strip { margin-bottom: 24px; padding: 18px 0 20px; }
  .stat strong { font-size: 24px; }
  .stat-caption { font-size: 10px; }
  .workspace-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
  .search-field { grid-column: 1 / -1; min-width: 0; }
  .site-field, .signal-field { width: auto; }
  .export-button { grid-column: 1 / -1; justify-self: end; }
  .section-heading { gap: 10px; }
  .section-heading .result-count { font-size: 10px; }
  .section-heading p { font-size: 10px; }
  .empty-state { padding: 32px 20px; min-height: 270px; }
  .empty-state p { font-size: 11px; }
  .notice { align-items: flex-start; padding: 10px 12px; }
  .login-layout { min-height: calc(100vh - 72px); padding: 32px 20px 40px; gap: 28px; }
  .login-intro h1 { font-size: 25px; margin-top: 12px; margin-bottom: 12px; }
  .login-intro > p:not(.eyebrow) { font-size: 12px; }
  .login-panel { padding: 24px; }
  .login-panel h2 { margin-top: 16px; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  button:active:not(:disabled), summary:active { transform: none; }
}
