/* AI News & Resets. Hand-drawn sheet: graph paper, marker type, highlighter, hatched marks.
   Latin is self-hosted Patrick Hand and Caveat. Han falls through to Kaiti / Songti.
   No request is made to fonts.googleapis.com. */

@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/patrick-hand-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/caveat-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f7f2;
  --surface: #fdfdf9;
  --sand: #eeefe8;
  --fg: #262e2b;
  --fg-2: #38443e;
  --pencil: #505a55;
  --muted: #5b665f;
  --border-soft: #e1e5dc;
  --grid: #e1e5dc;
  --rule: #d2d7cc;
  --highlight: #dce9e0;
  --note: #f4efdd;
  --accent: #567b6c;
  --accent-ink: #305a4c;
  --active-bg: #e5eee5;
  --active-fg: #315d43;
  --pending-bg: #f4eedc;
  --pending-fg: #72551e;
  --danger-bg: #f4e8e5;
  --danger-fg: #8d4338;
  --shadow: 0 6px 16px rgba(38, 46, 43, 0.12);
  --radius-card: 14px;
  --radius-tile: 10px;
  --radius-control: 8px;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "STSong", SimSun, "Noto Serif SC", Georgia, serif;
  --hand: "Patrick Hand", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --marker: "Caveat", "Patrick Hand", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --sans: var(--hand);
  --ui: "Source Sans 3", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --topbar: 64px;
  --rail-width: clamp(184px, 15vw, 224px);
  --gutter: clamp(24px, 4vw, 56px);
  --paper-grid:
    repeating-linear-gradient(0deg, transparent 0 23px, var(--grid) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, var(--grid) 23px 24px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent-ink);
}
::selection { background: var(--highlight); color: var(--fg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
strong, b { font-weight: 500; }
.summary, .prose, .article .dek, .article-body, .facts dd, .about :is(p, li), .faq p { font-family: var(--hand); }
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; }
p { overflow-wrap: break-word; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 80;
  background: var(--fg); color: var(--surface); padding: 8px 12px; border-radius: var(--radius-control);
}
.skip:focus { top: 12px; }

.shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
}
.workspace {
  min-width: 0;
  width: 100%;
  max-width: 1440px;
  justify-self: center;
  display: flex;
  flex-direction: column;
}
.sidebar {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--topbar));
  padding: 24px 16px 16px;
  border-inline-end: 1px solid var(--rule);
  overflow: auto;
}
.side-head { display: none; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
  color: var(--fg);
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name {
  font-family: var(--ui);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand:hover .brand-name { color: var(--accent-ink); }
.header-start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-label {
  margin: 0 12px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.section-nav + .side-label { margin-top: 22px; }
.section-nav { display: grid; gap: 3px; }
.section-nav a, .side-foot a, .side-foot button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}
.section-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: var(--sand); color: var(--fg); }
.section-nav a[aria-current="page"] {
  justify-content: space-between;
  gap: 8px;
  color: var(--accent-ink);
  background: var(--highlight);
  font-weight: 500;
}
.section-nav a[aria-current="page"]::after {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  flex: none;
}
.side-foot { margin-block-start: auto; padding-top: 20px; }
.side-foot a:first-child { border-top: 1px solid var(--rule); border-start-start-radius: 0; border-start-end-radius: 0; }
.side-foot button { width: 100%; cursor: pointer; }
.scrim { position: fixed; inset: 0; background: rgba(38, 46, 43, 0.32); z-index: 25; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: var(--topbar);
  gap: 12px;
  padding: 8px var(--gutter) 8px 28px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.nav-toggle, .nav-close {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-size: 16px;
}
.nav-close { font-size: 24px; }
.nav-toggle:hover, .nav-close:hover { background: var(--highlight); }
.menu-mark {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-block: 1.5px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}
.crumbs {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 16px var(--gutter) 0;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}
.crumbs:has(a:nth-of-type(2)) { display: flex; }
.crumbs a, .bc-sep { flex: none; }
.crumbs a { color: var(--accent-ink); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs .current {
  color: var(--fg);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; }
.lang-switch {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  color: var(--fg);
}
.lang-switch:hover { background: var(--highlight); color: var(--fg); border-color: var(--pencil); }
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--active-fg);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.online-window { margin-inline-start: 4px; }

.canvas { flex: 1; padding: 32px var(--gutter) 48px; min-width: 0; }
.crumbs:has(a:nth-of-type(2)) + .canvas { padding-top: 20px; }
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px var(--gutter) 24px;
  border-top: 1px solid var(--rule);
  color: var(--pencil);
  font-size: 15px;
}
.footer p { margin: 0; }
.footer time { white-space: nowrap; }
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px 24px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 0 0 28px;
}
.page-head h1, .panel h2, .panel h3, .login-card h1 { margin: 0; }
.page-head h1 {
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.page-head > div { min-width: 0; }
.page-head .head-actions { margin-top: 16px; }
.dek { margin: 8px 0 0; max-width: 40rem; color: var(--fg-2); font-size: 18px; line-height: 1.5; }
.hero-meta { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.prose { margin: 0 0 0.85em; max-width: 42rem; color: var(--fg-2); font-size: 17px; line-height: 1.55; }
.prose, .article-body p { text-wrap: pretty; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.timeline-head {
  display: block;
  margin-bottom: 28px;
  padding-block: 12px 24px;
  border-bottom: 1px solid var(--rule);
}
.timeline-head h1 { font-size: clamp(32px, 3vw, 42px); }
.timeline-head:has(+ .home-metrics) { border: 0; padding: 0; margin-bottom: 22px; }
.timeline-head .dek { margin-top: 10px; max-width: 56rem; }
.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 26%);
  gap: clamp(24px, 3.2vw, 48px);
  align-items: start;
}
.timeline-stream { min-width: 0; container-type: inline-size; }
.timeline-toolbar { padding-bottom: 12px; }
.timeline-toolbar-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.timeline-toolbar h2, .timeline-overview h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.timeline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 174px);
  align-items: center;
  gap: 8px;
}
.timeline-controls .type-filter { display: none; }
.timeline-controls select { font-size: 16px; text-overflow: ellipsis; }
.overview-jump { display: none; color: var(--accent-ink); text-underline-offset: 3px; white-space: nowrap; }
@container (max-width: 840px) {
  .timeline-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-controls .legend { display: none; }
  .timeline-controls .type-filter { display: flex; }
}
.timeline-overview {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
  background: var(--surface);
  scroll-margin-top: 16px;
}
.overview-totals, .overview-section { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--rule); }
.overview-total { display: flex; align-items: center; gap: 12px; }
.overview-number {
  color: var(--accent-ink);
  font-size: 40px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.overview-total h3, .overview-section h3 { margin: 0; font-family: var(--ui); font-weight: 500; font-size: 17px; line-height: 1.25; }
.overview-section h3 { margin: 0 0 12px; }
.overview-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 16px 0 0; }
.overview-counts div { display: flex; justify-content: space-between; gap: 4px; align-items: baseline; }
.overview-counts dt { color: var(--pencil); font-size: 15px; }
.overview-counts dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }

.home-metrics {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
  background: var(--surface);
  overflow: hidden;
}
.home-metric {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 3px;
  min-width: 0;
  padding: 12px clamp(10px, 1.35vw, 16px);
}
.home-metric:first-child {
  background: color-mix(in srgb, var(--highlight) 32%, var(--surface));
}
.home-metric + .home-metric { border-inline-start: 1px solid var(--rule); }
a.home-metric:hover { background: var(--sand); }
a.home-metric:hover .metric-label { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a.home-metric:focus-visible { outline-offset: -3px; }
.metric-label { font-size: 14px; color: var(--pencil); overflow-wrap: anywhere; }
.metric-value { font-size: 36px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.home-metric:first-child .metric-value { color: var(--accent-ink); }
.metric-meta { color: var(--muted); font-size: 12px; }

.timeline-layout.home-dashboard { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.home-dashboard .dashboard-rail {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(2, minmax(0, 1fr));
  max-width: none;
  padding: 0;
}
.dashboard-rail h2 {
  grid-column: 1 / -1;
  padding: 8px 16px 9px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 500;
}
.dashboard-rail .overview-section { margin: 0; min-width: 0; padding: 14px 16px; border-top: 0; }
.dashboard-rail .overview-section + .overview-section { border-inline-start: 1px solid var(--rule); }
.dashboard-rail .overview-section h3 { font-size: 15px; }
.dashboard-rail .bar-list {
  display: grid;
  grid-template-columns: max-content minmax(16px, 1fr) max-content;
  gap: 5px 9px;
}
.dashboard-rail .bar-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
.dashboard-rail .bar-label { font-size: 13px; }
.dashboard-rail .bar-track { height: 8px; border: 0; border-radius: 3px; background-color: var(--sand); }
.dashboard-rail .bar-row .count { min-width: 2.5ch; font-size: 13px; }
.dashboard-rail .month-chart { gap: 4px; }
.dashboard-rail .month-col .bar-track { height: 30px; }
.dashboard-rail .month-col .bar-value { font-size: 13px; }
.dashboard-rail .scribble { margin: 0 0 12px; max-height: 116px; }

.kpi-row, .panel-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.kpi-row { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi {
  position: relative;
  min-height: 96px;
  min-width: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
}
.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
}
.dashboard-kpis .kpi {
  min-height: 96px;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
}
.dashboard-kpis .kpi:last-child { border-right: 0; }
.dashboard-kpis .kpi-value { margin: 8px 0 0; }
.kpi-label { margin: 0; color: var(--pencil); font-size: 15px; }
.kpi-value {
  margin: auto 0 0;
  color: var(--fg);
  font-family: var(--ui);
  font-size: 38px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.kpi:first-child .kpi-value { color: var(--accent); }
.kpi-value-text { font-size: 28px; line-height: 1.15; color: var(--fg); }
.kpi-foot { margin: 4px 0 0; }
.delta { margin: 6px 0 0; font-size: 14px; color: var(--pencil); }
.delta.is-up { color: var(--active-fg); }
.delta.is-down { color: var(--danger-fg); }

.panel, .calendar {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
  box-shadow: none;
}
.canvas > .panel, .canvas > .admin-alert, .canvas > .calendar { margin-bottom: 16px; }
.panel-grid > .panel { margin-bottom: 0; }
.panel-head, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.panel-head h2, .section-head h2 {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.25;
  color: var(--fg);
}
.panel-head a, .section-head a { color: var(--accent-ink); font-size: 16px; white-space: nowrap; }
.panel-head a:hover, .section-head a:hover {
  color: oklch(from var(--accent-ink) calc(l - 0.06) c h);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.panel-body { padding: 14px 16px 16px; }
.panel-body:has(> .month-row) { display: flex; flex-direction: column; gap: 8px; }
.panel-note { margin: 0; color: var(--pencil); font-size: 15px; line-height: 1.45; }
.block-label {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pencil);
}

.scribble { width: 100%; height: auto; margin: 0 0 12px; background: var(--paper-grid); }
.scribble .axis { stroke: var(--pencil); stroke-width: 0.6; fill: none; }
.scribble .area { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: none; }
.scribble polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scribble circle { fill: var(--fg); stroke: var(--surface); stroke-width: 0.4; }

.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(max-content, 0.65fr) minmax(0, 1fr) minmax(1.75rem, auto);
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: inherit;
}
a.bar-row { min-height: 44px; padding-inline: 4px; border-radius: 4px; }
a.bar-row:hover { background: var(--bg); }
.bar-label { font-size: 16px; color: var(--fg); line-height: 1.3; white-space: nowrap; }
.bar-track {
  height: 12px;
  background: var(--surface);
  border: 1.5px solid var(--pencil);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background-color: var(--accent);
  background-image: repeating-linear-gradient(-45deg, rgba(38, 46, 43, 0.16) 0 2px, transparent 2px 6px);
}
.bar-row .count, .count {
  font-family: var(--ui);
  font-size: 16px;
  color: var(--fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1;
}
.month-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: end;

}
.month-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;

  min-width: 0;
}
.month-col .bar-value {
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  line-height: 1;
}
.month-col .bar-track {
  position: relative;
  width: 100%;
  max-width: 24px;
  height: 44px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 7px, var(--grid) 7px 8px);
  border-radius: 3px 3px 0 0;
}
.month-col .bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--h, 0%);
  border-radius: 2px 2px 0 0;
}
.month-col span:last-child {
  font-family: var(--ui);
  font-size: 11px;
  color: var(--pencil);
  text-align: center;
  letter-spacing: 0;
}

.legend { display: flex; flex-wrap: wrap; gap: 4px; }
.legend-filter {
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  min-height: 44px;
  padding: 4px 8px;
  white-space: nowrap;
  border-radius: var(--radius-control);
  font-size: 15px;
  cursor: pointer;
}
.legend-filter:hover { background: var(--sand); }
.legend-filter.is-active { background: var(--highlight); color: var(--accent-ink); }
.filter-status { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.type, .status, .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  background: var(--sand);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.type { color: var(--pencil); background: var(--sand); }
.status::before, .pill.on::before, .pill.off::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status.s-landed, .status.s-available { color: var(--active-fg); background: var(--active-bg); }
.status.s-rolling { color: var(--accent-ink); background: var(--highlight); }
.status.s-info { color: var(--pencil); background: var(--sand); }
.status.s-reported, .status.s-upcoming { color: var(--pending-fg); background: var(--pending-bg); }
.status.s-expired { color: var(--danger-fg); background: var(--danger-bg); }
.pill.on { background: var(--active-bg); color: var(--active-fg); }
.pill.off { background: var(--danger-bg); color: var(--danger-fg); }

.pagination, .client-pagination, .month-nav, .pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.page-links { display: flex; flex-wrap: wrap; gap: 2px; }
.page-num, .page-prev, .page-next, .page-disabled, .month-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--fg);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.page-num:hover, .page-prev:hover, .page-next:hover, .month-nav a:hover { background: var(--highlight); color: var(--fg); }
.page-num.is-current { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.page-disabled { color: var(--muted); }
button.page-prev, button.page-next { cursor: pointer; }
button.page-prev:disabled, button.page-next:disabled { color: var(--muted); background: transparent; cursor: default; }
.empty, .empty-state { color: var(--pencil); }
.empty-state { padding: 28px 8px; text-align: center; }
.empty-state h2 { margin: 0 0 8px; font-size: 22px; color: var(--fg); }
.empty-state p { margin: 0 0 14px; }

.article { max-width: 980px; }
.article-back { gap: 8px; margin-bottom: 16px; }
.article-mast { max-width: 58rem; }
.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--pencil);
  font-size: 15px;
}
.article h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(34px, 3.2vw, 44px);
  line-height: 1.2;
}
.article .dek { margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--fg-2); }
.article-meta { margin: 12px 0 0; color: var(--pencil); font-size: 15px; }
.article-meta a, .article-body a, .article-facts a, .about a { color: var(--accent-ink); }
.article-meta a:hover, .article-body a:hover, .article-facts a:hover, .about a:hover {
  color: oklch(from var(--accent-ink) calc(l - 0.06) c h);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-rule { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }
.article-grid { display: grid; grid-template-columns: minmax(0, 38rem) minmax(180px, 240px); gap: 28px; align-items: start; }
.article-body { max-width: 38rem; overflow-wrap: anywhere; }
.article-body p { margin: 0 0 1.1em; font-size: 18px; line-height: 1.7; color: var(--fg); }
html[lang="en"] .article-body p { font-size: 18px; line-height: 1.6; }
.article-body ul, .article-body ol { margin: 0 0 1.1em; padding: 0; list-style: none; }
.article-body li { position: relative; padding-left: 1.1em; margin: 0.35em 0; font-size: 18px; line-height: 1.6; }
.article-body li::before { content: "\2013"; position: absolute; left: 0; color: var(--accent); }
.article-body blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.55;
}
.article-body figure { margin: 1.2em 0; }
.article-body figcaption { margin-top: 8px; color: var(--pencil); font-size: 14px; }
.article-facts {
  position: sticky;
  top: calc(var(--topbar) + 16px);
  padding: 14px 14px 16px;
  background: var(--note);
  border: 0;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.article-facts::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 20px;
  width: 44px;
  height: 12px;
  background: #d9d3b69e;
  transform: rotate(-3deg);
}
.article-facts h2 { margin: 0 0 12px; font-size: 17px; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--pencil); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; }
.facts dd { overflow-wrap: anywhere; margin: 0; font-size: 16px; line-height: 1.4; color: var(--fg); }
.related { margin-top: 8px; max-width: 42rem; }
.related h2 { font-family: var(--mono); font-size: 12px; margin: 0 0 8px; font-weight: 500; letter-spacing: 0.1em; color: var(--pencil); }
.related ul, ul.related { list-style: none; margin: 0; padding: 0; }
.related li + li { border-top: 1.5px dashed var(--rule); }
.related a {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 8px;
  border-radius: 8px;
  color: var(--fg);
  line-height: 1.4;
}
.related a:hover { background: var(--highlight); color: var(--fg); }
.related-date { color: var(--pencil); font-variant-numeric: tabular-nums; flex: none; font-size: 14px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 42rem; }
.pager-link, .pager-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
  background: var(--surface);
  color: var(--fg);
}
.pager-link:hover { background: var(--highlight); }
.pager-link:hover .pager-title { color: var(--fg); }
.pager-dir { color: var(--pencil); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.pager-title { overflow-wrap: anywhere; font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.3; }
.preview-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 2px;
  background: var(--note);
  color: var(--fg);
  font-size: 16px;
  box-shadow: var(--shadow);
}
.preview-banner a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.preview-banner a:hover { color: oklch(from var(--accent-ink) calc(l - 0.06) c h); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.product-card, .month-row {
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-tile);
  background: var(--surface);
  color: inherit;
}
.product-card { display: flex; flex-direction: column; min-height: 148px; }
.month-row { display: grid; grid-template-columns: minmax(10.5rem, max-content) minmax(3.5ch, max-content) minmax(56px, 1fr) minmax(0, 1.05fr); align-items: center; gap: 8px 16px; }
.product-card:hover, .month-row:hover { background: var(--highlight); color: inherit; }
.product-card-name, .month-name { font-family: var(--serif); font-weight: 700; font-size: 23px; color: var(--fg); line-height: 1.1; }
.product-card-vendor, .product-card-count, .month-mix { color: var(--pencil); font-size: 15px; }
.month-name, .product-card-count { white-space: nowrap; }
.month-count { color: var(--fg); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }

.rules-table, .status-table, .data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rules-table th, .rules-table td, .status-table th, .status-table td, .data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
  color: var(--fg-2);
}
.rules-table th, .status-table th, .data-table th {
  white-space: nowrap;
  color: var(--pencil);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 13px;
  background: var(--sand);
}
.data-table td { color: var(--fg); font-variant-numeric: tabular-nums; }
.data-table a { color: var(--accent-ink); }
.data-table a:hover {
  color: oklch(from var(--accent-ink) calc(l - 0.06) c h);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.data-table tbody tr:hover td { background: var(--bg); color: var(--fg); }
.data-table tbody tr:hover td a { color: oklch(from var(--accent-ink) calc(l - 0.06) c h); }
.table-scroll { overflow-x: auto; }
.rules-table tbody td:first-child, .status-table tbody td:first-child { white-space: nowrap; width: 1%; }
.table-scroll:focus-visible { outline-offset: -2px; }
.entries-table :is(td, th):first-child { padding-inline: 12px; }
.data-table .cell-nowrap, .source-status-label, .meta-token { white-space: nowrap; }
.data-table .cell-title { min-width: 12rem; overflow-wrap: anywhere; }
.data-table :is(.status, .pill) { white-space: nowrap; }
.row-actions { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.row-actions a { padding-block: 4px; }
.dashboard-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.source-table td:first-child { min-width: 8rem; overflow-wrap: anywhere; }
.source-url { min-width: 13rem; }
.source-terms, .source-status { min-width: 8rem; }
.source-status .panel-note, .run-log li { overflow-wrap: anywhere; }
.source-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.meta-token { display: inline-block; }
.faq details, .run-log { border-top: 1.5px dashed var(--rule); padding: 12px 0; }
.faq details:first-child, .panel-body > .run-log:first-child { border-top: 0; }
.faq summary, .run-log summary { cursor: pointer; color: var(--fg); }
.faq summary { min-height: 36px; align-content: center; overflow-wrap: anywhere; }
.faq summary::marker { color: var(--accent-ink); }
.run-log ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--fg-2); font-size: 15px; }
.calendar { overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span {
  padding: 10px 4px;
  text-align: center;
  color: var(--pencil);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  background: var(--sand);
  border-bottom: 1.5px solid var(--pencil);
}
.cal-cell {
  min-height: 76px;
  padding: 8px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  background: var(--surface);
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-day { font-family: var(--marker); font-size: 20px; font-weight: 700; line-height: 1; }
.cal-count { display: block; margin-top: 6px; color: var(--accent-ink); font-size: 13px; }
.cal-cell.has-entry {
  background-color: var(--highlight);
  background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) calc(5% + var(--heat, 1) * 3%), transparent) 0 3px, transparent 3px 7px);
}
.cal-cell.has-entry:hover { background-color: oklch(from var(--highlight) calc(l - 0.06) c h); color: var(--fg); }
.cal-cell.has-entry:hover .cal-count { color: var(--accent-ink); }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--fg); }
.cal-cell.is-empty { background: var(--sand); }
.cal-day-title { font-family: var(--marker); font-size: 26px; margin: 22px 0 8px; font-weight: 700; }
.cal-day-block { scroll-margin-top: 16px; }
.cal-day-title span { color: var(--pencil); font-family: var(--hand); font-weight: 400; font-size: 16px; }
.about { max-width: 42rem; }
.about h1 { margin-top: 0; font-size: 36px; }
.about h2 { margin: 1.4em 0 0.4em; font-family: var(--serif); font-size: 22px; }
.about p, .about li { font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.about .dek { color: var(--fg-2); }
.status-table { margin-top: 8px; }
.missing {
  max-width: 32rem;
  margin: 48px auto;
  padding: 28px;
  background: var(--note);
  border: 2px solid var(--pencil);
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
}
.missing h1 { margin: 8px 0; font-family: var(--marker); font-size: 48px; font-weight: 700; }
.back-to-top {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 15;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back-to-top:hover { background: var(--highlight); color: var(--fg); }
.back-to-top.is-visible { display: inline-flex; align-items: center; gap: 6px; }

.btn, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover, .text-button:hover { background: var(--highlight); color: var(--fg); }
.btn:active, .text-button:active { background: oklch(from var(--highlight) calc(l - 0.08) c h); color: var(--fg); }
.btn-primary { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.btn-primary:hover, .btn-primary:active, a.btn-primary:hover {
  background: color-mix(in oklch, var(--fg) 78%, white);
  border-color: color-mix(in oklch, var(--fg) 78%, white);
  color: var(--surface);
}
.btn-danger { color: var(--danger-fg); border-color: transparent; background: var(--danger-bg); }
.btn-danger:hover, .btn-danger:active {
  color: var(--danger-fg);
  background: oklch(from var(--danger-bg) calc(l - 0.06) c h);
}
.btn-ghost { background: transparent; border-color: var(--pencil); }
.btn-ghost:hover { background: var(--highlight); color: var(--fg); }
.btn[disabled], .btn:disabled {
  color: var(--muted);
  background: var(--sand);
  border-color: var(--rule);
  cursor: not-allowed;
}
.btn-primary[disabled], .btn-primary:disabled {
  background: var(--sand);
  border-color: var(--rule);
  color: var(--muted);
}
.admin-alert, .form-error {
  overflow-wrap: anywhere;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--note);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.45;
  border: 1.5px solid var(--pencil);
}
.admin-alert.is-ok { background: var(--active-bg); color: var(--active-fg); border-color: transparent; }
.form-error { background: var(--danger-bg); color: var(--danger-fg); border-color: transparent; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.source-settings { display: grid; grid-template-columns: max-content minmax(130px, 158px) max-content; gap: 8px 16px; }
.source-settings-note, .form-wide { grid-column: 1 / -1; }
#entry-filters .toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
#entry-filters .search-field { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--fg); min-width: 0; }
.field input, .field select, .field textarea, .stack-form input, .stack-form select, .stack-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--pencil);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--fg);
  font-weight: 400;
}
.field textarea, .stack-form textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.stack-form input:focus-visible, .stack-form select:focus-visible, .stack-form textarea:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
  border-color: var(--accent-ink);
}
.field input::placeholder, .field textarea::placeholder, .stack-form input::placeholder, .stack-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid,
.stack-form input:user-invalid, .stack-form textarea:user-invalid { border-color: var(--danger-fg); }
.check { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; color: var(--fg); font-size: 16px; font-weight: 400; }
.check input { width: auto; min-height: 0; }
.check input[type="checkbox"] { margin: 0; flex: none; }
.form-grid, .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stack-form, .editor-form { display: flex; flex-direction: column; gap: 12px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sticky-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
html:has(.sticky-actions) { scroll-padding-bottom: 72px; }
#product-form + form { margin-top: 24px; }
.kbd-hint { color: var(--pencil); font-size: 14px; margin-left: auto; }
kbd {
  font-family: var(--mono);
  font-size: 0.92em;
  border: 1.5px solid var(--pencil);
  border-radius: 4px;
  background: var(--sand);
  padding: 1px 5px;
}
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1.5px solid var(--pencil);
  background: var(--sand);
}
.segmented button {
  border: 1.5px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  min-height: 44px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--fg);
}
.segmented button:hover { color: var(--fg); background: oklch(from var(--highlight) calc(l + 0.04) c h); }
.segmented button[aria-selected="true"] {
  background: var(--highlight);
  color: var(--fg);
  border-color: var(--pencil);
}
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.preview-pane { position: sticky; top: calc(var(--topbar) + 16px); min-width: 0; }
.preview-kicker { display: flex; flex-wrap: wrap; gap: 8px; color: var(--pencil); font-size: 15px; }
.preview-pane h3 { margin: 10px 0; font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.15; }
.preview-pane p { margin: 0 0 8px; color: var(--fg-2); font-size: 16px; line-height: 1.45; }
.preview-meta { color: var(--pencil) !important; font-size: 14px !important; }
.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 16px 16px;
  padding: 10px 12px;
  background: var(--note);
  border: 1.5px solid var(--pencil);
}
.sort-link { color: inherit; }
.sort-link:hover { color: var(--fg); }
.sort-link.is-active { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.panel.is-loading { position: relative; }
.panel.is-loading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 35%;
  background: var(--accent);
  animation: load 0.9s var(--ease) infinite;
}
@keyframes load { 0% { transform: translateX(0); } 100% { transform: translateX(220%); } }
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper-grid), var(--bg);
}
.login-card {
  width: min(440px, 100%);
  padding: clamp(20px, 5vw, 36px);
  background: var(--surface);
  border: 1px solid var(--pencil);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: clamp(28px, 5vw, 36px); line-height: 1.2; margin-bottom: 20px; }
.login-card .brand { width: fit-content; margin-bottom: 12px; }
.login-card .btn-primary { margin-top: 8px; }
.toaster {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100% - 32px));
}
.toast {
  background: var(--note);
  border: 1.5px solid var(--pencil);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  color: var(--fg);
}
.toast.is-leaving { opacity: 0; }
.toast-warn { background: var(--pending-bg); border-color: transparent; color: var(--pending-fg); }
.toast-ok { background: var(--active-bg); border-color: transparent; color: var(--active-fg); }
dialog {
  border: 3px solid var(--fg);
  border-radius: var(--radius-card);
  padding: 22px;
  width: min(440px, calc(100% - 32px));
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(38, 46, 43, 0.32); }
dialog h2 { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: 28px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.help-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--sand);
  border-radius: 4px;
  padding: 1px 5px;
}

@media (max-width: 1100px) {
  .timeline-layout, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-facts { position: relative; top: auto; max-width: 38rem; }
  .overview-jump { display: inline-flex; align-items: center; min-height: 44px; }
  .overview-jump:hover { text-decoration: underline; }
  .home-dashboard .overview-jump { display: none; }
  .timeline-overview { max-width: 40rem; }
}
@media (max-width: 960px) {
  :root { --topbar: 60px; --gutter: 24px; }
  .shell { display: block; }
  .topbar { padding-inline: var(--gutter); }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px var(--gutter);
    border-inline-end: 0;
    border-bottom: 1px solid var(--rule);
  }
  .js .nav-toggle, .js .nav-close { display: inline-flex; }
  .js .side-head {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: var(--topbar);
    border-bottom: 1px solid var(--rule);
    margin-bottom: 16px;
  }
  .js .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(320px, 90vw);
    height: 100dvh;
    padding: 0 16px 16px;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    box-shadow: var(--shadow);
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform var(--motion-base) var(--ease), visibility 0s linear var(--motion-base);
  }
  .js .sidebar.is-open { visibility: visible; transform: none; transition-delay: 0s; }
  body.nav-open { overflow: hidden; }
  .nav-open .back-to-top { display: none; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-pane { position: relative; top: auto; }
  .kpi-row, .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpis .kpi { border-bottom: 1px solid var(--rule); }
  .dashboard-kpis .kpi:nth-child(even) { border-right: 0; }
  .dashboard-kpis .kpi:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
@media (max-width: 760px) {
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
  .home-metric { padding: 8px 12px; }
  .home-metric:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
  }
  .home-metric:first-child .metric-value { grid-row: 1 / 3; grid-column: 2; }
  .home-metric:first-child .metric-meta { grid-row: 2; }
  .home-metric + .home-metric { border-top: 1px solid var(--rule); }
  .home-metric:nth-child(even) { border-inline-start: 0; }
  .metric-value { font-size: 28px; }
  .home-dashboard .overview-jump { display: inline-flex; }
  .home-dashboard .dashboard-rail { grid-row: auto; grid-template-columns: minmax(0, 1fr); max-width: 40rem; }
  .dashboard-rail .overview-section + .overview-section { border-inline-start: 0; border-top: 1px solid var(--rule); }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .source-table, .source-table thead, .source-table tbody, .source-table tr, .source-table td { display: block; }
  .source-table thead { display: none; }
  .source-table tr { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  .source-table td { border: 0; padding: 6px 0; }
  .source-table :is(td:first-child, .source-url, .source-terms, .source-status) { min-width: 0; }
  .source-field-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .canvas { padding-block: 20px 32px; }
  .topbar { gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: clamp(18px, 5vw, 22px); }
  .crumbs { gap: 6px; }
  .crumbs > a:first-child, .crumbs > a:first-child + .bc-sep { display: none; }
  .page-head { align-items: flex-start; margin-bottom: 20px; }
  .page-head h1, .article h1, .about h1 { font-size: clamp(26px, 7vw, 32px); }
  .timeline-head { padding-block: 4px 16px; }
  .timeline-toolbar h2, .timeline-overview h2 { font-size: 21px; }
  .timeline-toolbar-head { margin-bottom: 4px; }
  .timeline-overview:not(.dashboard-rail) { padding: 16px; }
  .timeline-controls select { padding-inline: 8px; }
  .article-body p, .article-body li, .article-body blockquote { font-size: 17px; }
  .kpi-value { font-size: 32px; }
  .kbd-hint { display: none; }
  .month-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .month-row .bar-track, .month-row .month-mix { grid-column: 1 / -1; }
  .cal-cell { min-height: 52px; padding: 5px; }
  .rules-table th, .rules-table td, .status-table th, .status-table td { padding-inline: 8px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .source-settings { grid-template-columns: minmax(0, 1fr) max-content; }
  .source-settings .check { grid-column: 1 / -1; }
  .data-table :is(th, td) { padding-inline: 10px; }
  .timeline-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .timeline-pagination .page-links { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .timeline-pagination > :first-child { justify-self: start; }
  .timeline-pagination > :last-child { justify-self: end; }
}
@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .month-chart { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --motion-fast: 0ms; --motion-base: 0ms; }
  html { scroll-behavior: auto; }
  .panel.is-loading::before { animation: none; }
  .toast.is-leaving { opacity: 1; }
}
