/* Product theme: semantic colors and a shared rem-based geometry scale. */
:root {
  color-scheme: light;
  --background: #f8f9f7; --surface: #fff; --sidebar: #f0f2ee;
  --foreground: #252b28; --muted-foreground: #5e685f; --subtle-foreground: #657063;
  --border: #e2e6df; --input: #d9dfd6; --muted: #f3f5f1; --hover: #e8ede5;
  --primary: #344f3d; --primary-soft: #e2ebdc; --primary-foreground: #fff;
  --success: #517347; --success-soft: #edf3e7; --warning: #916022; --warning-soft: #f7f0e3;
  --focus: #628753; --banked: #929f87; --empty-cell: #edf0e9; --next-surface: #f2f6ed;
  --overlay: #17201955; --shadow: 0 1.5rem 5rem #18241822;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;
  --radius-sm: .375rem; --radius-md: .5rem; --radius-lg: .75rem; --radius-xl: 1rem;
  --text-xs: .75rem; --text-sm: .8125rem; --text-base: .875rem; --text-lg: 1.125rem;
  --sidebar-width: 13.5rem; --control: 2.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #151a17; --surface: #1c221e; --sidebar: #191e1a;
  --foreground: #e4e9e0; --muted-foreground: #a2ad9f; --subtle-foreground: #99a495;
  --border: #30392f; --input: #414d3e; --muted: #242d23; --hover: #303a2e;
  --primary: #c1d5af; --primary-soft: #34432c; --primary-foreground: #1b2517;
  --success: #b0c99a; --success-soft: #2a3824; --warning: #e3b66f; --warning-soft: #3c3020;
  --focus: #b6d69c; --banked: #71876a; --empty-cell: #2a3228; --next-surface: #222d20;
  --overlay: #070b0888; --shadow: 0 1.5rem 5rem #0005;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); font-size: var(--text-base); line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: default; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:not(:disabled):active { background: var(--hover); }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }
main:focus { outline: none; }
svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; vertical-align: middle; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -.045em; font-weight: 650; line-height: 1.4; }
h2 { font-size: .9375rem; font-weight: 650; letter-spacing: -.02em; }
p { color: var(--muted-foreground); }
strong { font-weight: 600; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -5rem; left: var(--s-4); z-index: 20; background: var(--surface); padding: var(--s-3); border: 1px solid var(--border); }
.skip:focus { top: var(--s-4); }
.sidebar { width: var(--sidebar-width); background: var(--sidebar); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: var(--s-6) var(--s-4) var(--s-3); }
.brand { display: flex; gap: var(--s-3); align-items: center; margin: 0 var(--s-2) 2.9rem; font-size: var(--text-lg); font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
.brand img { width: 2.125rem; height: 2.125rem; }
.brand span { display: block; margin-top: .2rem; font-size: .6875rem; font-weight: 500; letter-spacing: .02em; color: var(--muted-foreground); }
.sidebar-label { font-size: .6875rem; color: var(--muted-foreground); padding: 0 var(--s-3); margin-bottom: var(--s-3); }
nav { display: flex; flex-direction: column; gap: var(--s-1); }
.nav-button { min-height: 2.625rem; display: flex; align-items: center; width: 100%; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--radius-md); text-align: left; color: var(--muted-foreground); font-size: var(--text-sm); }
.nav-button svg { width: 1rem; height: 1rem; }
.nav-button:hover { background: var(--hover); }
.nav-button.selected { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-dot { display: none; width: .375rem; height: .375rem; border-radius: 50%; background: var(--primary); margin-left: auto; }
.selected .nav-dot { display: block; }
.nav-count { margin-left: auto; font-size: .6875rem; color: var(--muted-foreground); }
.sidebar-bottom { margin-top: auto; }
.source-note { display: flex; gap: var(--s-2); margin: var(--s-5) var(--s-3) var(--s-4); font-size: var(--text-xs); line-height: 1.4; }
.source-note .status-dot { margin-top: .25rem; }
.source-note small { display: block; color: var(--muted-foreground); margin-top: var(--s-2); font-size: .6875rem; }
.external-link { display: flex; align-items: center; justify-content: space-between; padding: var(--s-2) var(--s-3); font-size: .6875rem; color: var(--muted-foreground); }
.external-link svg { width: .875rem; height: .875rem; }
.sidebar-footer { border-top: 1px solid var(--border); margin-top: var(--s-5); padding: var(--s-3) 0 0 var(--s-3); display: flex; align-items: center; justify-content: space-between; font-size: .625rem; color: var(--muted-foreground); }
.workspace { margin-left: var(--sidebar-width); }
.topbar { height: 4rem; border-bottom: 1px solid var(--border); padding: 0 var(--s-6); display: flex; align-items: center; justify-content: space-between; background: var(--surface); }
.breadcrumb { display: flex; gap: var(--s-3); font-size: var(--text-xs); color: var(--muted-foreground); align-items: center; }
.breadcrumb > span { color: var(--input); }
.breadcrumb strong { color: var(--foreground); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: var(--s-3); }
.top-actions select { border: none; background-color: transparent; font-size: var(--text-xs); }
.top-divider { width: 1px; height: 1rem; background: var(--border); }
.button, .icon-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); border-radius: var(--radius-sm); min-height: var(--control); padding: .375rem var(--s-3); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; }
.button { border: 1px solid var(--input); background: var(--surface); }
.button:hover, .icon-button:hover, .text-button:hover { background: var(--hover); }
.button.subtle { border-color: transparent; background: transparent; color: var(--muted-foreground); }
.button.subtle:hover { background: var(--hover); color: var(--foreground); }
.icon-button { padding: var(--s-2); width: var(--control); flex-shrink: 0; }
.text-button { padding: var(--s-1) var(--s-2); color: var(--primary); }
select { min-height: var(--control); padding: var(--s-1) var(--s-2); border: 1px solid var(--input); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--text-xs); max-width: 100%; }
main { max-width: 79rem; margin: auto; padding: 2.625rem var(--s-6) 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); }
.eyebrow { font-size: .625rem; letter-spacing: .13em; color: var(--muted-foreground); margin-bottom: .625rem; }
.page-heading p { margin-top: var(--s-2); font-size: var(--text-sm); }
.feed-state { display: flex; align-items: flex-start; gap: var(--s-2); font-size: .6875rem; line-height: 1.6; color: var(--muted-foreground); flex-shrink: 0; padding-bottom: .2rem; }
.feed-state .status-dot { margin-top: .35rem; }
.feed-state small { display: block; font-size: .625rem; color: var(--subtle-foreground); margin-top: .125rem; }
.status-dot { width: .4375rem; height: .4375rem; background: var(--success); border-radius: 50%; flex-shrink: 0; display: inline-block; }
.feed-state.stale .status-dot { background: var(--warning); }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.18fr 1fr; gap: var(--s-4); margin-bottom: var(--s-5); }
.last-panel { padding: var(--s-5) var(--s-5) 0; }
.panel-label { display: flex; align-items: center; gap: var(--s-2); color: var(--muted-foreground); font-size: var(--text-xs); }
.small-muted { margin-left: auto; color: var(--muted-foreground); font-size: .6875rem; }
.elapsed { display: flex; align-items: baseline; gap: var(--s-5); margin: 1.375rem 0 .375rem; font-size: 3.125rem; font-weight: 500; line-height: 1.3; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.elapsed > span { white-space: nowrap; }
.elapsed small { font-size: 1rem; font-weight: 400; letter-spacing: -.02em; color: var(--muted-foreground); margin-left: .375rem; }
.elapsed .elapsed-caption { font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; color: var(--muted-foreground); margin-left: -.75rem; }
.elapsed .empty-value { font-size: 1.5rem; }
.last-meta { font-size: .6875rem; color: var(--muted-foreground); }
.hero-stats { border-top: 1px solid var(--border); margin-top: var(--s-5); padding: var(--s-4) 0; display: grid; grid-template-columns: 1fr 1fr 1.2fr; }
.hero-stats > div:not(:first-child) { padding-left: var(--s-5); border-left: 1px solid var(--border); }
.hero-stats span { display: block; color: var(--muted-foreground); font-size: .6875rem; }
.hero-stats strong { display: block; font-size: 1.375rem; font-weight: 550; letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: var(--s-1); }
.hero-stats small { font-size: var(--text-xs); color: var(--muted-foreground); margin-left: var(--s-1); font-weight: 400; }
.next-panel { padding: var(--s-5); background: var(--next-surface); display: flex; flex-direction: column; }
.next-panel .panel-label { color: var(--primary); }
.next-panel .badge { margin-left: auto; }
.badge { display: inline-flex; align-items: center; width: max-content; font-size: .625rem; font-weight: 500; padding: .125rem .4375rem; color: var(--primary); background: var(--success-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); white-space: nowrap; line-height: 1.7; }
.badge.banked { background: var(--muted); color: var(--muted-foreground); }
.badge.quiet { background: var(--surface); color: var(--muted-foreground); }
.next-date { margin-top: var(--s-5); font-size: 1.75rem; letter-spacing: -.04em; line-height: 1.3; font-weight: 550; }
.next-time { font-size: 1.375rem; font-weight: 450; margin-top: var(--s-1); font-variant-numeric: tabular-nums; }
.next-time span { font-size: var(--text-xs); color: var(--muted-foreground); font-weight: 400; margin-left: var(--s-1); }
.next-time.small { font-size: var(--text-sm); color: var(--muted-foreground); }
.next-panel > p { font-size: .6875rem; line-height: 1.8; margin-top: var(--s-3); max-width: 24rem; word-break: keep-all; }
.next-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: var(--s-4); font-size: .6875rem; gap: var(--s-2); }
.status-label { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--primary); }
.status-label svg { width: .875rem; height: .875rem; }
.source-link { color: var(--primary); display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--text-xs); text-decoration-thickness: 1px; }
.source-link svg { width: .875rem; height: .875rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5); }
.section-heading p { margin-top: var(--s-1); font-size: .6875rem; }
.activity-panel { margin-bottom: var(--s-5); }
.legend { display: flex; align-items: center; gap: var(--s-3); font-size: .625rem; color: var(--muted-foreground); }
.legend span { display: flex; align-items: center; gap: .375rem; }
.legend i { width: .5rem; height: .5rem; border-radius: .125rem; background: var(--empty-cell); border: 1px solid var(--border); }
.legend .regular { background: var(--success); border-color: var(--success); }
.legend .banked { background: var(--banked); border-color: var(--banked); }
.heat-scroll { overflow-x: auto; padding: 0 var(--s-5); scrollbar-width: thin; }
.heatmap { min-width: 52rem; }
.heat-months { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); margin-left: 1.75rem; color: var(--muted-foreground); font-size: .625rem; margin-bottom: var(--s-2); }
.heat-months span { white-space: nowrap; }
.heat-body { display: flex; gap: .625rem; }
.heat-labels { display: flex; flex-direction: column; justify-content: space-between; font-size: .5625rem; color: var(--muted-foreground); width: 1.125rem; flex-shrink: 0; line-height: 1.5rem; }
.heat-weeks { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: .375rem; width: 100%; }
.heat-week { display: grid; grid-template-rows: repeat(7, 1.5rem); gap: .25rem; }
.heat-cell { width: 100%; height: 1.5rem; padding: 0; border-radius: .1875rem; background: var(--empty-cell); display: block; }
.heat-cell.regular { background: var(--success); }
.heat-cell.banked { background: var(--banked); }
.heat-cell.future { opacity: .3; }
button.heat-cell:hover { outline: 1px solid var(--foreground); outline-offset: 2px; }
.heat-footer { display: flex; justify-content: space-between; padding: var(--s-4) var(--s-5) var(--s-5); font-size: .625rem; color: var(--muted-foreground); gap: var(--s-3); }
.heat-footer > span:last-child { display: inline-flex; align-items: center; gap: var(--s-1); }
.heat-footer svg { width: .75rem; height: .75rem; }
.count { margin-left: var(--s-2); color: var(--muted-foreground); font-size: var(--text-xs); font-weight: 450; }
.table-scroll { position: relative; overflow-x: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: var(--text-xs); }
th { text-align: left; padding: .625rem var(--s-3); font-size: .625rem; font-weight: 500; color: var(--muted-foreground); background: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { padding-left: var(--s-5); width: 10rem; }
th:nth-child(2) { width: 7.25rem; }
th:nth-child(4) { width: 6.5rem; }
th:last-child { width: 4rem; }
td { padding: .875rem var(--s-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--muted); }
.date-cell { font-variant-numeric: tabular-nums; }
.date-cell strong { display: block; font-weight: 450; font-size: .6875rem; }
.date-cell span { color: var(--muted-foreground); display: block; font-size: .625rem; margin-top: .125rem; }
.record-button { color: var(--foreground); font-size: .75rem; width: 100%; text-align: left; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: block; padding: .5rem 0; }
.source-cell { color: var(--muted-foreground); font-size: .6875rem; }
.x-icon { font-size: var(--text-base); margin-right: .25rem; }
.action-cell { padding-right: var(--s-4); }
.action-cell .icon-button { color: var(--muted-foreground); }
.bottom-note { display: flex; align-items: center; gap: var(--s-2); color: var(--muted-foreground); font-size: .6875rem; margin-top: var(--s-4); }
.bottom-note svg { width: .875rem; height: .875rem; }
.page-footer { display: flex; justify-content: space-between; gap: var(--s-4); color: var(--muted-foreground); font-size: .625rem; padding: var(--s-5) 0; margin-top: var(--s-5); border-top: 1px solid var(--border); }
.page-footer a { color: var(--foreground); }
.history-toolbar { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-5); padding-bottom: var(--s-4); }
.search-field { display: flex; align-items: center; gap: var(--s-2); border: 1px solid var(--input); border-radius: var(--radius-sm); padding: 0 var(--s-3); width: 22rem; max-width: 100%; color: var(--muted-foreground); background: var(--surface); }
.search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-field input { width: 100%; min-width: 0; min-height: var(--control); border: none; outline: none; background: transparent; font-size: var(--text-xs); }
.search-field input::placeholder { color: var(--muted-foreground); }
kbd { font: .6875rem ui-monospace, monospace; border: 1px solid var(--border); border-radius: .1875rem; padding: 0 .25rem; }
.history-controls { display: flex; gap: var(--s-2); }
.filter-row { padding: 0 var(--s-5) var(--s-4); display: flex; align-items: center; gap: var(--s-3); }
.segments { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--muted); padding: .1875rem; gap: .125rem; }
.segments button { min-height: 1.875rem; padding: var(--s-1) var(--s-3); font-size: .6875rem; border-radius: .25rem; color: var(--muted-foreground); }
.segments button:hover { background: var(--hover); }
.segments button.active { color: var(--foreground); background: var(--surface); font-weight: 600; }
.filter-help, #result-count { font-size: .6875rem; color: var(--muted-foreground); }
#result-count { margin-left: auto; }
.date-filter { display: inline-flex; gap: var(--s-1); align-items: center; background: var(--muted); padding: var(--s-1) var(--s-2); border-radius: var(--radius-sm); font-size: var(--text-xs); }
.date-filter svg { width: .75rem; height: .75rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: var(--text-xs); }
.insight-stats { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: var(--s-4); margin-bottom: var(--s-5); }
.insight-stats .panel { padding: var(--s-5); }
.insight-stats span { color: var(--muted-foreground); font-size: var(--text-xs); }
.insight-stats strong { display: block; font-size: 2rem; margin: var(--s-2) 0; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.insight-stats small { font-size: var(--text-sm); color: var(--muted-foreground); margin-left: var(--s-2); }
.insight-stats p { font-size: .6875rem; }
.chart-wrap { padding: 0 var(--s-5) var(--s-5); }
.interval-chart { width: 100%; height: auto; overflow: visible; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.median-line { stroke: var(--banked); stroke-width: 1; stroke-dasharray: 4 5; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2; }
.chart-point { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.axis-label, .value-label { font-family: inherit; font-size: 10px; fill: var(--muted-foreground); }
.chart-legend { display: flex; align-items: center; gap: var(--s-2); font-size: .6875rem; color: var(--muted-foreground); }
.chart-legend i { display: inline-block; width: 1.25rem; border-bottom: 1px dashed var(--banked); }
.method-grid, .source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-top: var(--s-5); }
.methodology { padding: var(--s-5); }
.methodology > p { margin-top: var(--s-4); font-size: var(--text-sm); line-height: 1.9; word-break: keep-all; }
.methodology ol { margin: var(--s-5) 0 0; padding-left: 1.25rem; }
.methodology li { font-size: var(--text-sm); padding-left: var(--s-2); margin-bottom: var(--s-4); }
.methodology li::marker { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.methodology li p { font-size: var(--text-xs); margin-top: var(--s-1); line-height: 1.8; }
.method-note { display: flex; align-items: flex-start; gap: var(--s-2); background: var(--muted); border-radius: var(--radius-md); padding: var(--s-4); margin-top: var(--s-5); color: var(--muted-foreground); font-size: var(--text-xs); }
.source-grid { margin-top: 0; margin-bottom: var(--s-5); }
.source-card { padding: var(--s-5); }
.source-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-5); }
.avatar { width: 2.75rem; height: 2.75rem; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; letter-spacing: -.02em; }
.source-symbol { width: 2.75rem; height: 2.75rem; border: 1px solid var(--border); background: var(--muted); color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); }
.source-card h2 { font-size: var(--text-lg); }
.source-card .handle { font-size: var(--text-xs); margin-top: var(--s-1); }
.source-card > p:not(.handle) { margin-top: var(--s-4); font-size: var(--text-sm); line-height: 1.9; word-break: keep-all; }
.source-card > a { margin-top: var(--s-5); }
.provenance dl { margin: 0; padding: 0 var(--s-5); }
.provenance dl div { border-top: 1px solid var(--border); display: grid; grid-template-columns: 9rem 1fr; gap: var(--s-4); padding: var(--s-4) 0; font-size: var(--text-xs); }
.provenance dt { font-weight: 550; }
.provenance dd { margin: 0; color: var(--muted-foreground); }
.loading-state, .empty-state { padding: 4rem var(--s-5); text-align: center; color: var(--muted-foreground); }
.empty-state p { margin: var(--s-2) 0 var(--s-5); font-size: var(--text-xs); }
.loading-dot { display: inline-block; width: .5rem; height: .5rem; background: var(--success); border-radius: 50%; margin-right: var(--s-2); }
.error-message { background: var(--warning-soft); color: var(--warning); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-5); font-size: var(--text-sm); }
.refreshing svg { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog { padding: 0; width: min(38rem, calc(100% - 2rem)); max-height: calc(100% - 3rem); color: var(--foreground); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
dialog::backdrop { background: var(--overlay); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
#dialog-body { padding: var(--s-5); }
.dialog-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: .6875rem; color: var(--muted-foreground); }
.author-line { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.avatar.small { width: 2.25rem; height: 2.25rem; font-size: var(--text-xs); }
.author-line strong, .author-line span { display: block; font-size: var(--text-sm); }
.author-line span { color: var(--muted-foreground); font-size: .6875rem; }
blockquote { margin: var(--s-5) 0; font-size: var(--text-base); white-space: pre-wrap; line-height: 1.9; overflow-wrap: anywhere; }
.dialog-bottom { padding-top: var(--s-4); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.dialog-bottom > span { font-size: .625rem; color: var(--muted-foreground); }
.muted { color: var(--muted-foreground); }
@media (min-width: 1600px) { main { padding-top: var(--s-7); } }
@media (max-width: 1100px) {
  :root { --sidebar-width: 11.75rem; }
  main { padding: var(--s-6) var(--s-5) 0; }
  .topbar { padding: 0 var(--s-5); }
  .hero-grid { grid-template-columns: 1.1fr 1fr; }
  .elapsed { font-size: 2.75rem; gap: var(--s-4); }
  .elapsed-caption { display: none; }
  .page-heading { align-items: flex-start; }
  .feed-state { margin-top: var(--s-1); }
  .feed-state small { max-width: 9rem; }
  .legend { gap: var(--s-2); }
  th:first-child, td:first-child { width: 8.5rem; }
  th:nth-child(2) { width: 6.5rem; }
  th:nth-child(4) { width: 5rem; }
  .history-toolbar { flex-direction: column; }
  .search-field { width: 100%; }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 4.5rem; }
  .sidebar { padding: var(--s-5) var(--s-2); }
  .brand { margin: 0 auto var(--s-6); }
  .brand > div, .sidebar-label, .source-note, .external-link, .sidebar-footer > span { display: none; }
  .nav-button { display: block; padding: var(--s-3) var(--s-1); font-size: .5625rem; text-align: center; line-height: 1.5; }
  .nav-button > span:first-child { display: block; margin-bottom: .375rem; }
  .nav-button .nav-dot, .nav-button .nav-count { display: none; }
  .sidebar-footer { padding: var(--s-3) 0 0; justify-content: center; }
  .page-heading { flex-direction: column; gap: var(--s-3); }
  .feed-state small { display: inline; max-width: none; margin-left: var(--s-2); }
  .hero-grid { gap: var(--s-3); }
  .last-panel, .next-panel { padding: var(--s-4); }
  .last-panel { padding-bottom: 0; }
  .hero-stats > div:not(:first-child) { padding-left: var(--s-3); }
  .hero-stats span { font-size: .625rem; }
  .next-date { font-size: 1.5rem; }
  .small-muted { display: none; }
  .next-panel > p { font-size: .6875rem; }
  .section-heading { align-items: flex-start; }
  .section-heading .legend { flex-wrap: wrap; justify-content: flex-end; max-width: 12rem; }
  .insight-stats { gap: var(--s-3); }
  .insight-stats .panel { padding: var(--s-4); }
  .insight-stats strong { font-size: 1.625rem; }
  .method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  :root { --sidebar-width: 0rem; --control: 2.5rem; }
  .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: var(--s-4) var(--s-4) 0; }
  .brand { margin: 0 0 var(--s-4); gap: var(--s-2); font-size: 1rem; }
  .brand img { width: 1.75rem; height: 1.75rem; }
  .brand > div { display: flex; gap: var(--s-2); align-items: baseline; }
  .brand span { margin: 0; }
  .sidebar nav { flex-direction: row; gap: var(--s-1); padding-bottom: var(--s-2); }
  .nav-button { display: flex; align-items: center; justify-content: center; padding: var(--s-2) var(--s-1); font-size: .6875rem; gap: .375rem; }
  .nav-button > span:first-child { display: inline-flex; margin: 0; }
  .nav-button svg { width: .875rem; height: .875rem; }
  .sidebar-bottom { position: absolute; right: var(--s-4); top: .75rem; }
  .sidebar-footer { border: 0; padding: 0; margin: 0; }
  .topbar { height: 3.25rem; padding: 0 var(--s-4); }
  .breadcrumb { font-size: .625rem; }
  .breadcrumb > span { margin: 0 -.25rem; }
  .top-actions { gap: var(--s-1); }
  .top-actions .button { padding: var(--s-1) var(--s-2); }
  .top-actions .button > span:last-child { display: none; }
  .top-actions select { font-size: .6875rem; max-width: 10rem; }
  main { padding: var(--s-5) var(--s-4) 0; }
  .page-heading { margin-bottom: var(--s-5); }
  h1 { font-size: 1.5rem; }
  .eyebrow { font-size: .5625rem; }
  .page-heading p { font-size: var(--text-xs); }
  .feed-state { font-size: .625rem; }
  .feed-state small { font-size: .5625rem; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .last-panel, .next-panel { padding: var(--s-5); }
  .last-panel { padding-bottom: 0; }
  .elapsed { font-size: 3rem; gap: var(--s-5); }
  .elapsed .elapsed-caption { display: inline; }
  .small-muted { display: inline; }
  .next-date { font-size: 1.75rem; margin-top: var(--s-4); }
  .section-heading { padding: var(--s-4); gap: var(--s-2); }
  .section-heading h2 { font-size: var(--text-base); }
  .section-heading p { font-size: .625rem; }
  .section-heading .legend { max-width: 8rem; font-size: .5625rem; gap: .375rem; }
  .heat-scroll { padding: 0 var(--s-4); }
  .heatmap { min-width: 52rem; }
  .heat-footer { padding: var(--s-4); flex-direction: column; gap: var(--s-1); }
  .heat-footer > span:last-child { font-size: .5625rem; }
  table { min-width: 34rem; }
  th:first-child, td:first-child { padding-left: var(--s-4); }
  .bottom-note { align-items: flex-start; font-size: .625rem; }
  .bottom-note svg { margin-top: .125rem; }
  .page-footer { flex-direction: column; gap: var(--s-2); font-size: .5625rem; }
  .history-toolbar { padding: var(--s-4); gap: var(--s-3); }
  .history-controls { justify-content: space-between; }
  .filter-row { flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
  .segments button { padding: var(--s-1) .625rem; min-height: 2rem; }
  .filter-help { display: none; }
  .pagination { padding: var(--s-4); font-size: .6875rem; }
  .insight-stats { grid-template-columns: 1fr 1fr; }
  .insight-stats .panel:last-child { grid-column: 1 / -1; }
  .chart-wrap { padding: 0 var(--s-4) var(--s-4); overflow-x: auto; }
  .interval-chart { min-width: 34rem; }
  .source-grid { grid-template-columns: 1fr; }
  .provenance dl { padding: 0 var(--s-4); }
  .provenance dl div { grid-template-columns: 1fr; gap: var(--s-1); }
  .dialog-meta { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
