/*
 * Validation page styles (spec section 9). Tokens are lifted from
 * docs/design/v1.3/tokens.json so the page and the client cannot disagree
 * about what measured green or rejected rust means.
 *
 * Light theme only: the token set is a deliberate single look.
 */

:root {
  --canvas: #f4f2ea;
  --card: #fcfbf6;
  --card-alt: #f4f2ea;
  --divider: #edebe0;
  --border: #e4e1d3;
  --banner-neutral-surface: #f1ede0;

  --text-primary: #20261f;
  --text-secondary: #4c565f;
  --text-tertiary: #6e7468;

  --measured: oklch(0.45 0.1 160);
  --forecast: oklch(0.52 0.04 250);
  --rejected: oklch(0.5 0.13 40);
  --stale: oklch(0.45 0.07 70);
  --stale-glyph: oklch(0.52 0.07 70);
  --stale-fill: rgba(147, 116, 74, 0.12);

  --font-body: -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;

  --radius-card: 18px;
  --radius-inner: 16px;
  --shadow-card: 0 6px 24px rgba(32, 38, 31, 0.1);
  --content-max: 720px;
  --pad-x: 18px;
  --pad-y: 14px;
  --gap: 12px;
}

html {
  background: var(--canvas);
}

body {
  margin: 0 auto;
  padding: 24px var(--pad-x) 64px;
  max-width: var(--content-max);
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.page-header {
  margin-bottom: 20px;
}

.subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.card {
  margin-bottom: var(--gap);
  padding: var(--pad-y) 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.figure,
.day-table td,
.aggregates .figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.figure {
  font-size: 17px;
  font-weight: 700;
}

.provenance-measured {
  color: var(--measured);
}

.provenance-forecast {
  color: var(--forecast);
}

.provenance-rejected {
  color: var(--rejected);
}

.stale-banner {
  margin-bottom: var(--gap);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--stale-fill);
  color: var(--stale);
  font-size: 13px;
}

.stale-banner::before {
  content: "\2022";
  margin-right: 6px;
  color: var(--stale-glyph);
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.day-table {
  min-width: 520px;
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.day-table caption {
  padding-bottom: 6px;
  color: var(--text-tertiary);
  font-size: 12px;
  text-align: left;
}

.day-table th,
.day-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: baseline;
}

.day-table th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.day-table th.numeric,
.day-table td.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.sheet {
  margin: 8px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--card-alt);
  font-size: 12.5px;
}

.sheet > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.sheet dl {
  margin: 8px 0 0;
}

.sheet dt {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.sheet dd {
  margin: 0 0 6px;
}

.aggregates {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap) 24px;
  margin: 0;
  padding: var(--pad-y) 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--banner-neutral-surface);
}

.aggregates dt {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.aggregates dd {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 700;
}

.methodology {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 12.5px;
}

.methodology dt {
  margin-top: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.methodology dd {
  margin: 2px 0 0;
}

small,
.meta {
  font-size: 12px;
}

/* Component styles added for the P0.8 renderer (render.ts). */

.band {
  margin-bottom: 20px;
}

.band:last-child {
  margin-bottom: 0;
}

.sheet-section {
  margin-bottom: 10px;
}

.sheet-section:last-child {
  margin-bottom: 0;
}

.sheet-section h4 {
  margin: 0 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sheet ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.sheet li {
  margin-bottom: 6px;
}

.disagreement {
  margin: 8px 0;
}
