/* Every style class the pages use, built only from tokens.css. */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
}
.page { max-width: var(--page-width); margin: 0 auto; padding: var(--space-4) var(--space-3) var(--space-5); }
.site-header { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
  margin-bottom: var(--space-4); }
.site-name { font-weight: 700; color: var(--color-text); text-decoration: none; }
.nav-link { color: var(--color-accent); font-size: var(--text-small); }
h1 { font-size: var(--text-title); line-height: 1.2; margin: 0 0 var(--space-3); }
h2 { font-size: var(--text-heading); margin: var(--space-4) 0 var(--space-2); }
p, ul { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); }
code { font-family: var(--font-mono); font-size: var(--text-small); }
.muted { color: var(--color-muted); font-size: var(--text-small); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: var(--space-4); margin-bottom: var(--space-4); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field-label { font-weight: 600; font-size: var(--text-small); }
.field-help { color: var(--color-muted); font-size: var(--text-small); }
.input { font: inherit; color: var(--color-text); background: var(--color-page); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: var(--space-2); width: 100%; }
.input-mono { font-family: var(--font-mono); }
.code-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.code-row .input { flex: 1 1 14rem; }
.button { font: inherit; font-weight: 600; background: var(--color-accent); color: var(--color-accent-text); border: 0;
  border-radius: var(--radius); padding: var(--space-2) var(--space-4); cursor: pointer; text-decoration: none;
  display: inline-block; }
.actions { margin-top: var(--space-4); }
.notice-error { background: var(--color-danger-bg); color: var(--color-danger-text); border-radius: var(--radius);
  padding: var(--space-3); margin-bottom: var(--space-4); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-3); }
.stat-value { font-size: var(--text-title); font-weight: 700; }
.stat-label { color: var(--color-muted); font-size: var(--text-small); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.table th, .table td { text-align: left; padding: var(--space-2); border-bottom: 1px solid var(--color-border); }
.table .number { text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--color-good); }
.down { color: var(--color-bad); }
.chart { width: 100%; height: auto; border-radius: var(--radius); background: var(--color-surface); }
.button-secondary { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
/* Next comes first in the page so Enter submits it; this shows Back on the left. */
.actions-wizard { flex-direction: row-reverse; justify-content: flex-end; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: 0 0 var(--space-4); }
.step { color: var(--color-muted); font-size: var(--text-small); display: flex; align-items: center; gap: var(--space-1); }
.step-number { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; align-items: center;
  justify-content: center; border: 1px solid var(--color-border); }
.step-current { color: var(--color-text); font-weight: 600; }
.step-current .step-number { background: var(--color-accent); color: var(--color-accent-text); border-color: var(--color-accent); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-2); }
.check { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; }
.check-label { display: block; font-weight: 600; }
.notice-info { background: var(--color-surface); border: 1px solid var(--color-accent); border-radius: var(--radius);
  padding: var(--space-3); margin-bottom: var(--space-4); }
/* Charts (web_app/charts.py): SVG drawn on the server; hovering needs no script. */
.chart text { font-family: var(--font-body); }
.chart-grid { stroke: var(--color-border); stroke-width: 1; }
.chart-axis { stroke: var(--color-muted); stroke-width: 1; }
.chart-tick, .chart-axis-label, .chart-item-label { fill: var(--color-muted); font-size: 12px;
  font-variant-numeric: tabular-nums; }
.chart-legend, .chart-marker-label { fill: var(--color-text); font-size: 12px; }
.chart-marker-label { font-weight: 600; }
.chart-line { fill: none; stroke: var(--chart-1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-item { fill: var(--color-muted); stroke: var(--color-surface); stroke-width: 2; }
.chart-best { fill: var(--chart-2); stroke: var(--color-surface); stroke-width: 2; }
.chart-current { fill: var(--chart-3); stroke: var(--color-surface); stroke-width: 2; }
.chart-bar-weight { fill: var(--chart-1); }
.chart-bar-risk { fill: var(--chart-2); }
.chart-hit { fill: transparent; pointer-events: all; }
.chart-probe:hover .chart-row { fill: var(--color-border); fill-opacity: 0.35; }
.chart-probe-show { opacity: 0; pointer-events: none; transition: opacity 80ms; }
.chart-probe:hover .chart-probe-show { opacity: 1; }
.chart-crosshair { stroke: var(--color-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-focus { fill: var(--chart-1); stroke: var(--color-surface); stroke-width: 2; }
.chart-readout { fill: var(--color-surface); stroke: var(--color-border); stroke-width: 1; }
.chart-readout-text { fill: var(--color-muted); font-size: 13px; }
.chart-readout-value { fill: var(--color-text); font-weight: 700; }
/* Home page */
.page-wide { max-width: var(--page-width-wide); }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-5);
  align-items: center; padding: var(--space-5) 0; border-bottom: 1px solid var(--color-border); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--text-eyebrow); font-weight: 600;
  color: var(--color-accent); margin-bottom: var(--space-3); }
.hero-title { font-size: var(--text-hero); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 var(--space-3); }
.hero-lead { font-size: var(--text-lead); color: var(--color-muted); max-width: 34rem; margin-bottom: var(--space-4); }
.hero-form { display: flex; gap: var(--space-2); flex-wrap: wrap; max-width: 30rem; margin-bottom: var(--space-2); }
.hero-form .input { flex: 1 1 15rem; }
.hero-visual { position: relative; border-radius: calc(var(--radius) * 2); padding: var(--space-3);
  background: radial-gradient(closest-side, var(--color-accent-soft), transparent); }
.hero-mark { width: 100%; height: auto; display: block; }
.example-card { position: absolute; right: 0; bottom: calc(-1 * var(--space-4)); width: 16.5rem;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: var(--space-3); font-size: var(--text-small); }
.example-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--text-eyebrow);
  font-weight: 600; color: var(--color-muted); margin: 0 0 var(--space-2); }
.example-split { display: flex; gap: 2px; height: 0.6rem; border-radius: 999px; overflow: hidden;
  margin-bottom: var(--space-2); }
.example-part-1 { background: var(--chart-1); }
.example-part-2 { background: var(--chart-3); }
.example-part-3 { background: var(--chart-2); }
.example-split .example-part-1 { flex: 55; }
.example-split .example-part-2 { flex: 30; }
.example-split .example-part-3 { flex: 15; }
.example-legend { list-style: none; padding: 0; margin: 0 0 var(--space-2); display: flex; flex-wrap: wrap;
  gap: var(--space-1) var(--space-3); color: var(--color-muted); }
.example-key { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 2px; margin-right: var(--space-1); }
.example-line { margin: 0; color: var(--color-muted); }
.example-line strong { color: var(--color-text); }
.pillar-icon { width: 2.5rem; height: 2.5rem; padding: 0.55rem; border-radius: var(--radius);
  background: var(--color-accent-soft); fill: none; stroke: var(--color-accent); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; margin-bottom: var(--space-2); }
.hero-mark-grid circle { fill: var(--color-border); }
.hero-mark-curve { fill: none; stroke: var(--chart-1); stroke-width: 3; stroke-linecap: round; }
.hero-mark-dot { fill: var(--color-muted); stroke: var(--color-page); stroke-width: 2; }
.hero-mark-star { fill: var(--chart-2); stroke: var(--color-page); stroke-width: 2; stroke-linejoin: round; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-4);
  padding: var(--space-5) 0; }
.pillar h2 { font-size: var(--text-body); margin: 0 0 var(--space-1); }
.pillar p { color: var(--color-muted); margin: 0; }
.maker { display: flex; align-items: center; gap: var(--space-3); padding: 0 0 var(--space-4); }
.maker-mark { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
  flex: none; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent);
  font-size: var(--text-heading); font-weight: 700; }
.maker-text { margin: 0; font-size: var(--text-lead); }
.site-footer { border-top: 1px solid var(--color-border); padding-top: var(--space-3); color: var(--color-muted);
  font-size: var(--text-small); }
@media (max-width: 44rem) {
  .hero { grid-template-columns: 1fr; padding-top: var(--space-4); }
  .hero-visual { max-width: 26rem; }
  .example-card { position: static; width: auto; margin-top: var(--space-2); }
}
/* Feedback */
.feedback-invite { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  flex-wrap: wrap; margin-top: var(--space-4); }
.feedback-invite h2 { margin-top: 0; }
.feedback-invite p { margin: 0; }
.field-spaced { margin-top: var(--space-3); }
textarea.input { resize: vertical; }
