/* The join and admin pages (plan/29) and the other small pages; colour
   tokens and the shared control styles come from tokens.css (plan/60 A2),
   linked before this file. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 20px 0 6px; }
a { color: var(--accent); }
.sub { color: var(--ink-2); font-size: 14px; }
.muted { color: var(--muted); }
.rights { color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 24px; }  /* plan/37 R3, as board.html */
.err { color: var(--critical); }
.ok { color: var(--good-text); }
.panel { background: var(--surface); border: 1px solid var(--grid); border-radius: 10px; padding: 12px 14px; margin: 12px 0; overflow-wrap: anywhere; }
.btn { font: inherit; padding: 6px 12px; border-radius: 8px; cursor: pointer; }  /* colours: tokens.css */
input, select { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); max-width: 100%; }
label { display: inline-block; margin: 4px 10px 4px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
td, th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--grid); vertical-align: top; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.topnav { margin: 4px 0 8px; }
/* The designer intake page (upload.js, plan/40 §8.1) and the legal pages. */
.draft { border: 1px solid var(--critical); color: var(--ink); background: var(--surface); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; font-size: 14px; }
label.tick { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
label.tick input { margin-top: 4px; flex: none; }
label.tick.off { color: var(--muted); }
label.block { display: block; margin: 10px 0; }
.helper { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.agree { background: var(--surface); border: 1px solid var(--grid); border-radius: 10px; padding: 10px 12px; }
details.clause { background: var(--surface); border: 1px solid var(--grid); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
details.clause summary { cursor: pointer; font-weight: 600; }
.diagram { font-size: 11px; overflow-x: auto; white-space: pre; }
.tablewrap { overflow-x: auto; }
#legal h2 { font-size: 22px; }
#legal p { overflow-wrap: anywhere; } /* the 64-character sha256 line pushed a phone-width page sideways */
/* A light touch of Seat Zero (seatzero.app's site.css) on the designer pages
   only (body.sz, ticket _006we5r): its ink-and-amber palette, its heading
   weight, the logo self-hosted (no font or script from elsewhere). */
.sz { --sz-ink: #1E2B55; --sz-amber: #FFB627; --accent: var(--sz-ink); --page: #F4F6FB; --grid: #DCE1EC; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sz { --accent: var(--sz-amber); --page: #0F1630; --surface: #141D3B; --grid: #2A3560; }
}
:root[data-theme="dark"] .sz { --accent: var(--sz-amber); --page: #0F1630; --surface: #141D3B; --grid: #2A3560; }
.sz h1, .sz h2, .sz h3 { font-weight: 750; letter-spacing: -0.015em; }
.sz h1, .sz h2 { color: var(--accent); }
.sz .btn.primary { background: var(--sz-amber); color: var(--sz-ink); border: 2px solid var(--sz-ink); font-weight: 700; box-shadow: 0 2px 0 var(--sz-ink); }
.sz .btn.primary:disabled { opacity: 0.5; }
.sz-bar { background: var(--surface); border-bottom: 1px solid var(--grid); }
.sz-brand { display: block; max-width: 860px; margin: 0 auto; padding: 10px 16px; line-height: 0; }
.sz-brand img { height: 36px; width: auto; }
.sz-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sz-logo { display: none; }
  :root:not([data-theme="light"]) .sz-logo-dark { display: inline; }
}
:root[data-theme="dark"] .sz-logo { display: none; }
:root[data-theme="dark"] .sz-logo-dark { display: inline; }
.sz-foot { max-width: 860px; margin: 8px auto 0; padding: 14px 16px 24px; border-top: 1px solid var(--grid); color: var(--ink-2); font-size: 13px; }
.sz .topnav { max-width: 860px; margin: 8px auto 0; padding: 0 16px; }
/* The admin's write-up reader (writeups.js, ticket _00748a9): rendered
   markdown that fits a phone; wide tables and code scroll in their own box. */
.md { overflow-wrap: anywhere; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3, .md h4, .md h5, .md h6 { font-size: 15px; margin: 14px 0 4px; }
.md pre { white-space: pre; overflow-x: auto; background: var(--page); border: 1px solid var(--grid); border-radius: 6px; padding: 8px; }
.md code { font-size: 13px; background: var(--page); border-radius: 4px; padding: 0 3px; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 8px 0; padding-left: 10px; border-left: 3px solid var(--grid); color: var(--ink-2); }
.md ul, .md ol { padding-left: 22px; }
.md .tablewrap table { width: auto; min-width: 60%; }
.md hr { border: 0; border-top: 1px solid var(--grid); }
.files li { margin: 6px 0; }
/* Statistics tables (lib/table.js, plan/63 T1): numbers right-aligned in
   tabular figures, a value with its interval and n as a quiet second line,
   a sticky header (long tables scroll in their own box) and first column. */
.mdblock { display: contents; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tablewrap.stat { margin: 6px 0 12px; }
.tablewrap.stat.long { max-height: 70vh; overflow: auto; border: 1px solid var(--grid); border-radius: 6px; }
.tablewrap.stat table { width: auto; min-width: 60%; }
.tablewrap.stat th { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 2px solid var(--axis); white-space: nowrap; vertical-align: bottom; }
.tablewrap.stat td:first-child, .tablewrap.stat th:first-child { position: sticky; left: 0; background: var(--surface); }
.tablewrap.stat th:first-child { z-index: 3; }
.tablewrap.stat .num { font-variant-numeric: tabular-nums; text-align: right; }
.tablewrap.stat td { padding: 5px 8px; }
.cell-main { display: block; font-size: 16px; font-weight: 650; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
td.wide .cell-main { color: var(--ink-2); }
th .sort { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: inherit; }
th .sort-mark { color: var(--muted); font-weight: 400; }
/* Statistics charts (lib/charts.js, plan/63 T3): inline SVG coloured only
   from tokens.css; text wears the text tokens, never a series colour. */
.figure { margin: 12px 0 18px; }
.figure-title { font-weight: 650; font-size: 15px; margin: 0 0 4px; }
.chart-box { position: relative; width: 100%; }
svg.chart { display: block; max-width: 100%; height: auto; overflow: visible; }
svg.chart text { font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; }
svg.chart .label { fill: var(--ink-2); }
svg.chart .value { fill: var(--ink); font-weight: 600; }
svg.chart .tick, svg.chart .note { fill: var(--muted); }
svg.chart .grid { stroke: var(--grid); stroke-width: 1; }
svg.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
svg.chart .hit { fill: transparent; }
svg.chart .whisker { stroke: var(--ink-2); stroke-width: 1.5; }
svg.chart .baseline line { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
svg.chart .median line, svg.chart .median-tick { stroke: var(--ink); stroke-width: 2; }
svg.chart .dot { stroke: var(--surface); stroke-width: 2; }
svg.chart .box { fill-opacity: 0.35; stroke-width: 1.5; }
svg.chart .iqr { fill-opacity: 0.12; stroke: none; }
svg.chart .faded { opacity: 0.45; }
svg.chart .hatch-bg { fill: var(--surface); }
svg.chart .hatch-line { stroke: var(--series-1); stroke-width: 2.5; }
svg.chart .mark:focus { outline: none; }
svg.chart .mark:focus-visible .hit, svg.chart .mark:hover .hit { fill: var(--ring); }
.s1 { fill: var(--series-1); stroke: var(--series-1); } .s2 { fill: var(--series-2); stroke: var(--series-2); }
.s3 { fill: var(--series-3); stroke: var(--series-3); } .s4 { fill: var(--series-4); stroke: var(--series-4); }
.s5 { fill: var(--series-5); stroke: var(--series-5); } .s6 { fill: var(--series-6); stroke: var(--series-6); }
svg.chart .bar, svg.chart .seg { stroke: none; }
.legend { list-style: none; padding: 0; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .sw.s1 { background: var(--series-1); } .legend .sw.s2 { background: var(--series-2); } .legend .sw.s3 { background: var(--series-3); }
.legend .sw.s4 { background: var(--series-4); } .legend .sw.s5 { background: var(--series-5); } .legend .sw.s6 { background: var(--series-6); }
.legend b { color: var(--ink); }
.chart-tip { position: absolute; transform: translateX(-50%); max-width: 280px; padding: 4px 8px; border-radius: 6px; font-size: 13px; pointer-events: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--control-border); box-shadow: 0 2px 8px var(--ring); z-index: 5; }
.figure-table summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
@media (forced-colors: active) { svg.chart .s1, svg.chart .s2, svg.chart .s3, svg.chart .s4, svg.chart .s5, svg.chart .s6 { fill: CanvasText; stroke: CanvasText; } }
.figure-actions { margin: 2px 0 6px; }
.btn.small { font-size: 13px; padding: 3px 9px; border-radius: 6px; }
/* plan/63 T4: on a wide screen a chart and its table side by side. */
@media (min-width: 1024px) {
  .figure { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 24px; align-items: start;
    grid-template-areas: "title title" "chart table" "legend table" "note table" "actions table" ". table";
    grid-template-rows: auto auto auto auto auto 1fr; }
  .figure > .figure-title { grid-area: title; } .figure > .figure-chart { grid-area: chart; } .figure > .legend { grid-area: legend; }
  .figure > .figure-note { grid-area: note; } .figure > .figure-actions { grid-area: actions; }
  .figure > .figure-table { grid-area: table; }
  .figure > .figure-table .tablewrap.stat table { width: 100%; }
}
/* plan/63 T4: printing a statistics page or document — no navigation or
   buttons, charts kept with their tables, long tables in full. The light
   theme and the opened tables are set by lib/charts.js before printing. */
@media print {
  body { background: #fff; }
  .topnav, .sz-bar, .sz-foot, #navmsg, .figure-actions, button, select, .btn, .viewas { display: none !important; }
  main { max-width: none; padding: 0; }
  .panel { border: 0; padding: 0; margin: 0; box-shadow: none; }
  .figure, .tablewrap, tr, .figure-fallback { break-inside: avoid; }
  h1, h2, h3, .figure-title { break-after: avoid; }
  .tablewrap.stat.long { max-height: none; overflow: visible; border: 0; }
  .tablewrap.stat th, .tablewrap.stat td:first-child, .tablewrap.stat th:first-child { position: static; }
  details.figure-table > summary { display: none; }
  .chart-tip { display: none; }
  svg.chart .mark:hover .hit { fill: transparent; }
  svg.chart .hatch-line { stroke-width: 2; }
}
