/* The dashboard of one run: the atlas's paper and ink (docs/ATLAS.md), phone first.
   Colours are tokens; the dark set is chosen, not flipped, and every series colour was
   checked for colour-blind readers on these surfaces (docs/ANALYSIS.md, "The dashboard"). */

@font-face { font-family: "Plate Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/plate-text.woff2) format("woff2"); }
@font-face { font-family: "Plate Text"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/plate-text-italic.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f6efdd;          /* the atlas's paper */
  --surface: #f9f4e7;     /* a chart's own ground */
  --ink: #2c1f18;         /* the atlas's ink */
  --ink-2: #54453a;
  --muted: #74655a;
  --grid: #e4dac4;
  --axis: #c6b89f;
  --rule: #d9cdb3;
  --other: #b3a790;       /* "all other groups": always this gray */
  --wash: rgba(44, 31, 24, 0.06);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --seq-0: #f9f4e7; --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --warn-bg: #f1e2b8;
  --serif: "Plate Text", Baskerville, "Libre Baskerville", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #221d19; --surface: #2a241f; --ink: #efe6d2; --ink-2: #cdbfa6; --muted: #a29380;
    --grid: #39312a; --axis: #4d443a; --rule: #3f362e; --other: #6f6457; --wash: rgba(239, 230, 210, 0.07);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
    --seq-0: #2a241f; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --warn-bg: #3d3220;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #221d19; --surface: #2a241f; --ink: #efe6d2; --ink-2: #cdbfa6; --muted: #a29380;
  --grid: #39312a; --axis: #4d443a; --rule: #3f362e; --other: #6f6457; --wash: rgba(239, 230, 210, 0.07);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
  --seq-0: #2a241f; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --warn-bg: #3d3220;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--serif); }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px 56px; }
a { color: inherit; text-underline-offset: 2px; text-decoration-thickness: 1px; }
h1 { font-weight: 400; font-size: 26px; line-height: 1.2; margin: 4px 0 6px; letter-spacing: 0.005em; }
h1 .name { font-style: italic; overflow-wrap: anywhere; }
h2 { font-weight: 400; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2);
  margin: 0 0 6px; display: flex; align-items: center; gap: 12px; }
h2::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
h3 { font-weight: 400; font-style: italic; font-size: 17px; margin: 18px 0 4px; }
.kicker { margin: 0; font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.kicker a { text-decoration: none; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.topline button[data-manner] { flex: none; margin-right: -8px; color: var(--ink-2); }
.journal-door { margin: 0 0 10px; font-size: 15px; font-style: italic; color: var(--ink-2); }
.journal-door a { font-style: normal; }
.links { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.links a { margin-right: 14px; white-space: nowrap; }
.lead p { font-size: 17px; line-height: 1.55; margin: 6px 0 4px; text-wrap: pretty; }
.n { font-variant-numeric: lining-nums; white-space: nowrap; }
section.part { margin: 34px 0 0; }
.say { margin: 4px 0 10px; color: var(--ink-2); text-wrap: pretty; }
.cannot { font-style: italic; font-size: 14px; color: var(--muted); margin: 6px 0 0; text-wrap: pretty; }
.note { background: var(--warn-bg); border-radius: 6px; padding: 8px 12px; margin: 10px 0; font-size: 15px; }
.note strong { font-weight: 400; font-style: italic; }
.notes { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; padding-left: 18px; }

/* the dial */
.dial { margin: 8px 0 4px; }
.dial label { display: block; font-size: 14px; color: var(--ink-2); }
.dial input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--ink); height: 28px; }
.ticks, .ends { padding: 0 9px; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.ends { display: flex; justify-content: space-between; font-size: 12px; font-style: italic; color: var(--muted); margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 16px; margin: 12px 0 6px; }
.stat { border-top: 1px solid var(--rule); padding-top: 4px; }
.stat b { display: block; font-weight: 400; font-size: 22px; line-height: 1.2; font-variant-numeric: lining-nums; }
.stat span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; }

/* charts (charts.js) */
.chart { position: relative; margin: 6px 0 2px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart text { font-family: var(--serif); fill: var(--muted); font-size: 11.5px; font-variant-numeric: lining-nums tabular-nums; }
.chart text.label { fill: var(--ink-2); font-size: 12.5px; }
.chart text.title { fill: var(--ink-2); font-size: 12.5px; font-style: italic; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .band { fill: var(--wash); }
.chart .mark { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: none; }
.chart .dot { stroke: var(--surface); stroke-width: 1; }
.chart .ring { stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 6px; padding: 6px 9px; font-size: 13px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  min-width: 120px; max-width: 240px; z-index: 5; font-variant-numeric: lining-nums tabular-nums; }
.tip .h { font-style: italic; color: var(--ink-2); margin-bottom: 2px; }
.tip .r { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tip .r .k { display: flex; gap: 6px; align-items: center; color: var(--ink-2); }
.key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.key li { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sw.line { height: 3px; border-radius: 2px; }
details.numbers { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
details.numbers summary { cursor: pointer; padding: 6px 0; }
.tablewrap { max-height: 320px; overflow: auto; border: 1px solid var(--rule); border-radius: 6px; }
table.t { border-collapse: collapse; width: 100%; font-size: 12.5px; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
table.t th, table.t td { padding: 3px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
table.t th { position: sticky; top: 0; background: var(--surface); font-weight: 400; font-style: italic; color: var(--ink-2); }
table.t th:first-child, table.t td:first-child { text-align: left; }

/* groups */
.groups { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
@media (min-width: 620px) { .groups { grid-template-columns: 1fr 1fr; } }
.group { display: grid; grid-template-columns: 112px 1fr; gap: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
.group .pic { width: 112px; height: 112px; border-radius: 4px; background: #f6efdd; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.group .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.group .pic.none { font-size: 12px; font-style: italic; color: #8a7a6a; text-align: center; padding: 8px; line-height: 1.3; }
.group h3 { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group h3 .nm { font-weight: normal; color: var(--muted); }
.group dl { display: grid; grid-template-columns: max-content 1fr; gap: 0 10px; margin: 2px 0 6px; font-size: 13.5px; }
.group dt { color: var(--muted); }
.group dd { margin: 0; font-variant-numeric: lining-nums; }
.seg { display: flex; gap: 2px; height: 8px; margin: 4px 0 2px; }
.seg i { display: block; height: 100%; border-radius: 4px; min-width: 0; }
.segkey { font-size: 12.5px; color: var(--muted); }

/* the feed */
ol.feed { list-style: none; padding: 0; margin: 8px 0 0; }
ol.feed li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--grid); font-size: 14.5px; }
ol.feed .d { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: lining-nums tabular-nums; padding-top: 1px; }
ol.feed .sw { vertical-align: -1px; margin-right: 4px; }
.more { font-size: 13px; font-style: italic; color: var(--muted); }
ul.cannot-list { padding-left: 18px; font-size: 14.5px; color: var(--ink-2); }
ul.cannot-list li { margin: 4px 0; }
footer { margin-top: 40px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 10px; }
.tells { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.tells td { padding: 5px 0; border-top: 1px solid var(--grid); vertical-align: middle; }
.tells td.v { text-align: right; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; padding-left: 8px; }
.meter { position: relative; height: 8px; background: var(--grid); border-radius: 4px; margin: 4px 0 0; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--s1); }
.meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); border-radius: 1px; }
.chart .hl { fill: var(--wash); }

/* The batch report (batch.js): wide tables, claims, pictures of worlds and bodies. */
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.86em; overflow-wrap: anywhere; }
pre { font: 12.5px/1.45 ui-monospace, Menlo, monospace; background: var(--wash); border-radius: 6px; padding: 8px 10px; overflow-x: auto; white-space: pre; }
.est { color: var(--muted); }
.tablewrap.wide { max-height: none; overflow-x: auto; margin: 8px 0 4px; -webkit-overflow-scrolling: touch; }
.tablewrap.wide table.t td { white-space: nowrap; }
.tablewrap.wide table.t td:last-child { white-space: normal; min-width: 12em; }
ol.claims { padding-left: 20px; margin: 8px 0; }
ol.claims li { margin: 0 0 12px; }
ol.claims p { margin: 2px 0; }
.verdict { display: inline-block; font-size: 13px; font-style: italic; padding: 0 8px; border-radius: 9px; border: 1px solid var(--axis); color: var(--ink-2); margin-right: 4px; }
.verdict.v-contradicted { background: var(--warn-bg); border-color: var(--warn-bg); color: var(--ink); font-style: normal; }
.verdict.v-not-settled, .verdict.v-nothing-to-compare { border-style: dashed; }
figure { margin: 10px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; background: #05121f; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plates img { background: #f6efdd; aspect-ratio: 4 / 5; object-fit: contain; }
details.world-more { margin: 4px 0; font-size: 14px; }
details.world-more summary { cursor: pointer; padding: 4px 0; color: var(--ink-2); }
ul.batches { list-style: none; padding: 0; }
ul.batches li { border-top: 1px solid var(--rule); padding: 8px 0; }
ul.batches .q { display: block; color: var(--ink-2); font-size: 14.5px; }

/* hbars: a bar's name, over the grid lines (charts.js paintH) */
.chart text.name { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.t .nw { white-space: nowrap; }  /* a list in the last column: the table scrolls, rows stay one line */
/* How this world was made, and what stands out (T-087) */
dl.setup { display: grid; grid-template-columns: minmax(7em, 40%) 1fr; gap: 6px 12px; margin: 8px 0 4px; font-size: 14.5px; }
dl.setup dt { color: var(--ink-2); }
dl.setup dd { margin: 0; font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
dl.setup code { display: block; font-size: 11.5px; color: var(--muted); }
.std { color: var(--muted); }
.group.standout { grid-template-columns: 112px 1fr; }
.group.standout.nopic { grid-template-columns: 1fr; }
.group.standout .say { font-size: 14.5px; margin: 2px 0 6px; }
ul.feed { list-style: none; padding: 0; margin: 8px 0 0; }
ul.feed li { padding: 6px 0; border-top: 1px solid var(--grid); font-size: 14.5px; text-wrap: pretty; }
