/* web/t1_atlas.html — the consolidated atlas.
   ---------------------------------------------------------------------------
   Kept as its own file rather than extending t1_deep.css: this page replaces
   that one's bespoke SVG projection with Leaflet, so it shares no structural
   class with it. A shared stylesheet would be two stylesheets in one file with
   the risk that a tweak to the live page silently moves the retired one.

   ---------------------------------------------------------------------------
   WP4.2c, 2026-08-08 — THE PRIVATE PALETTE IS GONE, and with it the 24
   declarations and 42 literals this file was carrying. The block it replaces
   opened by claiming the greys were "MEASURED against --bg, not eyeballed",
   which was true of the values and irrelevant to the outcome: they were
   tokens.css's DARK values written out as literals, so the measurement held in
   dark and nothing at all held in light. The page rendered black-on-black the
   moment the map beside it went to paper. A palette that cannot follow the
   theme is not a palette, it is a hardcode with a variable name.

   THE MAP, IN ORDER, of what each retired name became. Recorded because the
   names were not synonyms — several of them were answering two questions, and
   the split is the interesting part:

     --bg, --line, --ink          kept: same name, tokens.css's value
     --panel      -> --surface    the raised card
     --panel2     -> --surface-2  the recessed strip a card sits on
     --dim        -> --ink-body   supporting text
     --faint      -> --ink-faint  captions and axis furniture
     --off        -> --ink-faint  a SECOND name for the same job; the two were
                                  within dL 4 of each other and no rule ever
                                  told them apart
     --cyan       -> gone         it was only ever the link colour, and R3.11
                                  says a link takes --ink and an underline
     --amber      -> --ink /      it painted eight headings, the product mark
                     --ink-body   and a selected row. R3.3 reserves amber for
                                  "unexplained or unresolved"; a section title
                                  is neither, and eight permanent amber
                                  headings are what makes the ONE amber thing
                                  on the page stop working (R3.13)
     --amber-dim  -> --line-strong it was a RULE, not a warning
     --withheld   -> --warn       the one genuine survivor: a value that was
                                  filed and suppressed
     --recv       -> --series-1   receipts, and see the R3.4 note below —
     --deliv      -> --series-3   these now paint MARKS, never text
     --stock      -> --series-6   matching hub_sd's stock-draw column
     --mono       -> --font-data

   DELIVERIES WAS --series-4 IN THAT MAP UNTIL WP5. The re-registered ramp put
   slot 4 at H 251.0, 1.5 degrees from slot 1 — so receipts and deliveries would
   have been two LIGHTNESSES of one blue, which encodes rank, not category. It
   moved to --series-3 (brick, dH 140.8 light / 140.3 dark from receipts), which
   is the only slot that also clears --warn and --accent-measured, both of which
   appear on this page. The full arithmetic, and the condition that would force
   another move, is in t1_deep.css's header — this page and that one MUST agree,
   because a reader carries the legend across from one to the other.

   R3.4, AND WHY THREE COLUMNS LOST THEIR COLOUR. `.kv .v.recv`, `.kv .v.deliv`
   and the three `<td style="color:var(--stock)">` sites in t1_atlas.js painted
   FIGURES in a series token. That is the case R3.4 names outright: it spends a
   hue on every row to say one thing the column head can say once, and it drags
   the six-hue ramp — built for 3:1 against a fill — to the 4.5:1 floor that
   governs text. The header carries the swatch now (app.css's --swatch pair);
   the figures are --ink like every other figure on the page.

   THE LEAFLET CHROME IS RE-THEMED, NOT HIDDEN. The attribution is a licence
   condition. Note the `.leaflet-container` prefix on its two rules: leaflet.css
   splits this widget across a bare `.leaflet-control-attribution` for `color`
   and a `.leaflet-container .leaflet-control-attribution` for `background`, so
   an unprefixed override wins the text and silently loses the strip — which is
   the half a reader sees. style.css learned this the expensive way on
   2026-08-07; the lesson is copied here rather than re-learned. */

*{box-sizing:border-box}
/* font-size ON `body`, NEVER ON `html` — a rem font-size on the ROOT re-bases
   every other rem on the page against itself (--t-data is .8rem, so the root
   goes 16px -> 12.8 and --t-label follows it down to 8.70px). Found on
   hub_sd.css 2026-08-08, where the long version of this note lives; it was the
   same single line in six sheets. */
html{background:var(--bg);margin:0}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:var(--font-data);font-size:var(--t-data);
  -webkit-font-smoothing:antialiased}
button,select,input{font-family:var(--font-data);font-size:var(--t-data)}
/* R3.11 — a navigation affordance is not a data channel and gets no hue. */
a{color:var(--ink);text-decoration:underline;text-underline-offset:2px;
  text-decoration-color:var(--line-strong)}
a:hover{text-decoration-color:var(--ink)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* ---------- top bar ---------- */
.top{display:flex;align-items:center;gap:var(--sp-3);padding:7px var(--sp-3);
  border-bottom:1px solid var(--line);background:var(--surface-2);flex-wrap:wrap;
  position:sticky;top:0;z-index:1200}
/* The product mark. --pine, the brand token, not --warn: a permanent amber
   block in the corner of every screenshot is a page that looks like it is
   complaining about itself. --on-pine for the text, NOT --bg: --pine is dark in
   BOTH themes, so its foreground must be light in both, and --bg inverts. This
   rule measured 14.68:1 on paper and 1.52:1 in dark, where the word inside the
   mark disappeared. A pair whose contrast is the invariant needs both halves
   named; see tokens.css. */
.top .tag{background:var(--pine);color:var(--on-pine);font-weight:700;
  padding:2px 9px;letter-spacing:.06em;border-radius:var(--r-ctl)}
.top h1{font-size:var(--t-data);font-weight:600;margin:0;letter-spacing:.04em}
.top .hint{color:var(--ink-body)}
.top .right{margin-left:auto;display:flex;gap:14px;align-items:center}
.top .stat b{color:var(--ink);font-weight:600}
.top .stat span{color:var(--ink-faint)}

/* ---------- section chrome ---------- */
section{border-bottom:1px solid var(--line)}
.shead{display:flex;align-items:baseline;gap:10px;padding:var(--sp-2) var(--sp-3);
  background:var(--surface-2);border-bottom:1px solid var(--line)}
.shead h2{margin:0;font-size:var(--t-label);letter-spacing:var(--label-tracking);
  text-transform:uppercase;color:var(--ink-body)}
.shead .sub{color:var(--ink-faint);font-size:var(--t-label)}
.shead .spacer{margin-left:auto}

/* ---------- core: map + relationship board side by side ---------- */
.core{display:grid;grid-template-columns:minmax(0,1fr) 400px;min-height:600px}
@media (max-width:1100px){.core{grid-template-columns:1fr}}
.mapwrap{position:relative;min-width:0;height:640px;background:var(--bg)}
#map{position:absolute;inset:0}
/* Overrides leaflet.css's `.leaflet-container{background:#ddd}` — the colour
   behind the tiles, seen on first paint and past the edge of the world. */
.leaflet-container{background:var(--bg);font-family:var(--font-data);
  font-size:var(--t-label)}
.leaflet-container .leaflet-control-attribution{background:var(--surface);
  color:var(--ink-body);border-top:1px solid var(--line)}
.leaflet-container .leaflet-control-attribution a{background:none;
  color:var(--ink)}
.leaflet-bar a{background:var(--surface);color:var(--ink);
  border-bottom:1px solid var(--line)}
.leaflet-bar a:hover{background:var(--surface-2);color:var(--ink)}
.leaflet-tooltip{background:var(--surface);border:1px solid var(--line-strong);
  color:var(--ink);box-shadow:var(--shadow-panel);font-family:var(--font-data);
  font-size:var(--t-label)}
.leaflet-tooltip::before{display:none}

/* max-width sized to the longest label + its count on one line. At 250px the
   count wrapped under the label and the checkbox column stopped scanning as a
   column, which is the only thing a legend has going for it. */
.legend{position:absolute;left:10px;bottom:26px;z-index:900;
  background:var(--surface);border:1px solid var(--line-strong);
  border-radius:var(--r-panel);padding:var(--sp-2) 10px;max-width:330px;
  box-shadow:var(--shadow-panel)}
.legend h4{margin:0 0 5px;font-size:var(--t-label);
  letter-spacing:var(--label-tracking);color:var(--ink-faint);
  text-transform:uppercase}
.legend h4:not(:first-child){margin-top:var(--sp-2)}
.legend label,.legend .key{display:flex;align-items:center;gap:6px;padding:1px 0;
  white-space:nowrap}
.legend label{cursor:pointer}
/* A .key row carries no checkbox, so without this it would sit one control to
   the left of the toggles above it and read as a separate list rather than as
   the same list's un-toggleable half. The indent is the checkbox's own width. */
.legend .key{padding-left:19px}
/* THE SWATCH IS AN <svg>, NOT A COLOURED BOX (R3.12). It is emitted by
   swatch() in t1_atlas.js from the same option bag Leaflet paints the mark
   with, so there is nothing here to colour it with — and that is the point: a
   `background` at this selector would be a second, silent opinion about what
   the map looks like, which is exactly the divergence R3.12 exists to stop.
   All this rule owns is the box the mark sits in.
   overflow:visible because the facility genre strokes a circle at r=5.3 inside
   a 13-high viewBox, and the outer half of its 1.4 stroke lands past the edge. */
.legend .sw{flex:0 0 14px;display:block;overflow:visible}
.legend .sub{color:var(--ink-faint)}
.legend .note{color:var(--ink-faint);margin-top:6px;line-height:1.4;
  font-size:var(--t-label);white-space:normal}
/* ON A PHONE THE ROWS WRAP. nowrap rows inside a 330px box spilled past it
   and widened the whole page to 618px at 375 (W QA, 2026-10-24). Below the
   one-column breakpoint the box is capped to the map's width and a row's
   count may drop under its label; desktop keeps the one-line column above. */
@media (max-width:820px){
  .legend{max-width:calc(100% - 20px)}
  .legend label,.legend .key{white-space:normal;align-items:flex-start}
  .legend .sw{margin-top:2px}
}
/* The dominant-side key under the Receipts & Deliveries minimap is drawn by
   the same helper, so it needs the same box — inline, because unlike the
   legend's rows it sits mid-sentence. */
#rd-sub .sw{display:inline-block;vertical-align:-2px;margin:0 3px 0 8px;
  overflow:visible}

/* ---------- side / relationship board ---------- */
.side{border-left:1px solid var(--line);background:var(--surface);overflow-y:auto;
  max-height:640px;min-width:0}
@media (max-width:1100px){.side{border-left:0;border-top:1px solid var(--line)}}
.side .empty{padding:18px 14px;color:var(--ink-faint);line-height:1.6}
.blk{border-bottom:1px solid var(--line);padding:10px var(--sp-3)}
.blk h3{margin:0 0 3px;font-size:var(--t-data);color:var(--ink);
  letter-spacing:.03em}
.blk .who{color:var(--ink-faint);margin-bottom:7px;line-height:1.4}
.kv{display:flex;justify-content:space-between;gap:10px;padding:2px 0;
  border-bottom:1px dotted var(--line)}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--ink-body)}
.kv .v{color:var(--ink);text-align:right;white-space:nowrap;
  font-variant-numeric:tabular-nums}
/* R3.4 — the side that a figure belongs to is carried by a SWATCH before the
   label, not by painting the number. Same mechanism as app.css's table
   headers: --swatch sets the colour, --swatch-on is the switch, and both are
   needed because CSS cannot ask "is --swatch set". */
.kv .k::before{content:"";display:var(--swatch-on,none);width:.62em;
  height:.62em;margin-right:.45em;background:var(--swatch);
  border-radius:1px;vertical-align:baseline}
.kv.recv{--swatch:var(--series-1);--swatch-on:inline-block}
.kv.deliv{--swatch:var(--series-3);--swatch-on:inline-block}
.caveat{color:var(--ink-faint);line-height:1.5;margin-top:7px;
  border-left:2px solid var(--line-strong);padding-left:var(--sp-2)}

/* The relationship board: the selected place in the middle, receipts entering
   from the left and deliveries leaving to the right. Not a geography — it is
   the same wire diagram t1.html draws, re-centred on whatever the map
   selected, which is what makes it "alongside" the map rather than a second
   page. */
.relwrap{padding:var(--sp-2) 0}
svg#rel{display:block;width:100%;height:auto}
#rel .wire{fill:none;stroke-linecap:round}
#rel .wire.r{stroke:var(--series-1)} #rel .wire.d{stroke:var(--series-3)}
#rel .wire.self{stroke-dasharray:2 3}
#rel text{font-family:var(--font-data);font-size:9px;fill:var(--ink-body)}
#rel text.core{fill:var(--ink);font-size:var(--t-label)}
#rel text.vol{fill:var(--ink-faint);font-size:8px}
/* The hub is the selected place. --map-selected is the token the map's own
   selection ring uses, so clicking a dot and reading this board agree. */
#rel .hub{fill:var(--surface);stroke:var(--map-selected);stroke-width:1.4}
#rel .node{stroke-width:1}
#rel .node.r{fill:var(--surface);stroke:var(--series-1)}
#rel .node.d{fill:var(--surface);stroke:var(--series-3)}

/* ---------- deep dive ---------- */
.deep{padding:0}
.deepgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  border-bottom:1px solid var(--line)}
@media (max-width:900px){.deepgrid{grid-template-columns:1fr}}
.pane{min-width:0;border-right:1px solid var(--line);background:var(--surface-2)}
.pane:last-child{border-right:0}
.pane .phead{padding:7px 11px;border-bottom:1px solid var(--line);
  display:flex;align-items:baseline;gap:var(--sp-2);flex-wrap:wrap}
.pane .phead h3{margin:0;font-size:var(--t-label);
  letter-spacing:var(--label-tracking);
  text-transform:uppercase;color:var(--ink-body)}
.pane .phead .sub{color:var(--ink-faint);font-size:var(--t-label)}
.pane .phead .spacer{margin-left:auto}
.pane .body{padding:9px 11px}
.minimap{height:330px;position:relative;background:var(--bg)}
.minimap .m{position:absolute;inset:0}

.chartbox{padding:10px var(--sp-3);background:var(--surface-2)}
.chartbox canvas{max-height:290px}
.chartbox .cap{color:var(--ink-faint);line-height:1.5;margin-top:var(--sp-2)}

/* table-layout:fixed, and every column given a width.
   With auto layout the browser sizes columns to their CONTENT, and in a 50%
   pane the two name columns ("Enterprise Crude Pipeline") take everything they
   ask for and the numeric columns are squeezed to nothing — "-19 MBBL" renders
   as "-1" and the date column falls off the pane entirely. Truncating a name
   costs a few characters of a string the reader can still recognise; truncating
   a figure changes it. So the names are the ones that give way, and every
   numeric column is wide enough for its longest real value. */
table.grid{width:100%;border-collapse:collapse;table-layout:fixed}
#rd-table  th:nth-child(1){width:40%} #rd-table  th:nth-child(4){width:14%}
#stk-table th:nth-child(1){width:22%} #stk-table th:nth-child(2){width:24%}
#stk-table th:nth-child(3){width:16%} #stk-table th:nth-child(4){width:16%}
#stk-table th:nth-child(5){width:22%}
/* Three columns since the repeated-reason column went. The 44% that column
   held goes to the filer NAMES, which is the content the reason was crowding
   out: at the old 10% "Reported By" got 111px and clipped every row to about
   one word, which under table-layout:fixed is a silent cut rather than a
   layout that visibly complains. */
#dock-table th:nth-child(1){width:34%} #dock-table th:nth-child(2){width:16%}
#dock-table th:nth-child(3){width:50%}
#cov-table th:nth-child(1){width:26%} #cov-table th:nth-child(2){width:22%}
table.grid th{text-align:left;color:var(--ink-faint);font-weight:500;
  font-size:var(--t-label);letter-spacing:var(--label-tracking);
  text-transform:uppercase;padding:3px 6px 4px;
  border-bottom:1px solid var(--line);position:sticky;top:0;
  background:var(--surface-2)}
/* The three columns that used to paint their figures a series colour. */
table.grid th::before{content:"";display:var(--swatch-on,none);width:.62em;
  height:.62em;margin-right:.45em;background:var(--swatch);border-radius:1px;
  vertical-align:baseline}
#rd-table  th:nth-child(2){--swatch:var(--series-1);--swatch-on:inline-block}
#rd-table  th:nth-child(3){--swatch:var(--series-3);--swatch-on:inline-block}
#stk-table th:nth-child(3){--swatch:var(--series-6);--swatch-on:inline-block}
table.grid td{padding:2px 6px;border-bottom:1px solid var(--line);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table.grid td.num{text-align:right;font-variant-numeric:tabular-nums}
table.grid tr.clk{cursor:pointer}
table.grid tr.clk:hover td{background:var(--surface-2)}
/* R3.11 — selection is an interaction state and takes the neutral ramp. It was
   an amber text colour on a blue-grey fill, i.e. a hue saying "you clicked
   this" in a table where hue means "which side of the trade". */
table.grid tr.sel td{background:var(--surface);color:var(--ink)}
.scroll{max-height:280px;overflow:auto}

/* The exception marker on an unplaced facility. It appears on the FEW rows
   whose refusal is not the one stated in the panel copy, so it has to read as
   an aside rather than as a column: faint, label-sized, and dotted-underlined
   because the sentence itself is in the title attribute. Deliberately not a
   hue — hue on this page means which side of a trade, and "this row was
   refused differently" is not a direction. The same class is used once in the
   panel copy, to show a reader what they are looking for. */
.dock-note{color:var(--ink-faint);font-size:var(--t-label);
  border-bottom:1px dotted var(--line);cursor:help}

.pill{display:inline-block;padding:0 5px;border:1px solid var(--line);
  color:var(--ink-faint);font-size:var(--t-label);letter-spacing:.05em;
  border-radius:var(--r-ctl)}
.pill.ok{color:var(--accent-measured-ink);border-color:var(--accent-measured)}
/* R3.13: `.warn` here is written only onto a section whose coverage ladder came
   back `withheld` — a value the filer reported and the parser could not write.
   The healthy pill above is the other branch. */
.pill.warn{color:var(--warn);border-color:var(--warn)}
.bar{height:7px;background:var(--line);position:relative;overflow:hidden;
  border-radius:1px}
.bar i{position:absolute;left:0;top:0;bottom:0;display:block}
.bar i.recv{background:var(--series-1)} .bar i.deliv{background:var(--series-3)}
.bar i.stock{background:var(--series-6)}

.err{color:var(--ink-body);padding:14px var(--sp-3);line-height:1.6;
  background:var(--surface-2);border-left:3px solid var(--ink-faint)}
.foot{padding:var(--sp-3);color:var(--ink-faint);line-height:1.6}
