/* The three looks (Round 2, W3). Choose with ?look=a|b|c (remembered in localStorage `gn_look`; written to <html data-look="...">) or the
   "Look A B C" switch in the masthead (web/looks.js). Each look has a light and a dark theme: the VALUES are in web/looks-tokens.css (every colour
   literal of the looks lives there); this file is structure and type, written with tokens and kit classes only.
   The app's own design language: gn-house-style is not binding here. Kept: the Gourmet Nut wordmark and its colours (wine #882030, cocoa #502C2C,
   dark-surface wine #E8909D) as the anchor. The DOM order of content is identical in every look; a look never reorders what is read.
   Rules are prefixed html[data-look=..] so they beat the screens' own injected <style> blocks (buy.js, charts.js, w5-kit.js) without !important.

   A  "Terminal"      dark first. Dense, JetBrains Mono figures, hairline rules, no shadow, square corners, status as glyphs, keyboard-driven.
   B  "Studio"        light first. Editorial: Fraunces figures at 50px+, Inter text, soft layered elevation, 14px radius, top-bar navigation.
   C  "Control room"  neutral dark grey. Card grid, a status edge on every card, sparklines large, a strip of the data moments, motion only on change.

   DOM map (index.html, shell.js, looks.js):
     header.app-mast > .app-mast-in (.app-brand, .app-product, pills, .lk-switch, #themeBtn, .app-viewas) + .lk-timeline (C only)
     .app-body > nav#nav.app-nav > section.nav-group > h2 + div.lk-drop > a.nav-item[data-short][data-key]
     main.app-main (.is-frame when an iframe fills it)   .g-screen > .g-head, .g-tiles > .g-tile, .g-row > .gn-chart / .g-panel, table.by-table, aside.by-drill */

/* ======================================================================================== all looks */
html[data-look] body { background: var(--bg); color: var(--ink); font-family: var(--f-body); }
html[data-look] :focus-visible { outline: 2px solid var(--gn-wine); outline-offset: 2px; }
html[data-look] .app-main:focus, html[data-look] .app-main:focus-visible { outline: none; }   /* the screen itself takes focus on a route change: no ring around the page */

/* masthead: its own surface per look and theme (tokens), the wordmark on a light plate when the band is dark */
html[data-look] .gn-mast { background: var(--mast-bg); border-bottom: 1px solid var(--mast-line); color: var(--mast-ink); color-scheme: inherit; }
html[data-look] .app-brand { background: var(--plate); padding: 3px 9px; border-radius: min(var(--k-radius), 6px); }
html[data-look] .app-product { color: var(--mast-ink); border-left-color: var(--mast-line); }
html[data-look] .app-toplink { color: var(--gn-wine); }
html[data-look] .app-count { background: var(--gn-wine-soft); color: var(--gn-wine); }
html[data-look] .app-btn, html[data-look] .app-viewas select { background: var(--mast-btn-bg); color: var(--mast-btn-ink); border-color: var(--mast-btn-line); border-radius: min(var(--k-radius), 10px); }
html[data-look] .app-btn:hover, html[data-look] .app-viewas select:hover { border-color: var(--gn-wine); }
html[data-look] .app-viewas { color: var(--mast-muted); }
html[data-look] .app-main .app-btn { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
html[data-look] .app-main .app-btn:hover { border-color: var(--gn-wine); color: var(--gn-wine); }

html[data-look] body { grid-template-columns: minmax(0, 1fr); }   /* the one column may not grow with a nowrap child (the timeline strip scrolls inside itself) */
html[data-look] .gn-mast, html[data-look] .lk-timeline { min-width: 0; max-width: 100%; }

/* the Look switch */
.lk-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mast-muted); white-space: nowrap; }
.lk-set { display: inline-flex; }
.lk-switch button { font: 700 12.5px/1 var(--f-body); color: var(--mast-btn-ink); background: var(--mast-btn-bg); border: 1px solid var(--mast-btn-line); padding: 6px 10px; cursor: pointer; }
.lk-switch button + button { margin-left: -1px; }
.lk-switch button:first-child { border-radius: min(var(--k-radius), 8px) 0 0 min(var(--k-radius), 8px); }
.lk-switch button:last-child { border-radius: 0 min(var(--k-radius), 8px) min(var(--k-radius), 8px) 0; }
.lk-switch button:hover { border-color: var(--gn-wine); position: relative; }
.lk-switch button[aria-pressed="true"] { background: var(--gn-wine-soft); color: var(--gn-wine); border-color: var(--gn-wine); position: relative; z-index: 1; }

/* group links live in div.lk-drop; it is invisible to layout except in Studio */
.lk-drop { display: contents; }

/* long text cells: clamped, full text in `title` */
.lk-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; word-break: normal; }
.by-table td, .w5-table td.w5-wrap, .w5-table td.w5-desc { vertical-align: middle; }

/* per-look table/chart tools injected into the Buy screen's top line */
.lk-tools { display: inline-flex; gap: 14px; margin-left: auto; align-items: center; }
.lk-tool { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.lk-tool button { font: 600 13px/1.2 var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); padding: 5px 11px; cursor: pointer; }
.lk-tool button + button { margin-left: -1px; }
.lk-tool button:first-of-type { border-radius: min(var(--k-radius), 8px) 0 0 min(var(--k-radius), 8px); }
.lk-tool button:last-of-type { border-radius: 0 min(var(--k-radius), 8px) min(var(--k-radius), 8px) 0; }
.lk-tool button[aria-pressed="true"] { background: var(--gn-wine-soft); color: var(--gn-wine); border-color: var(--gn-wine); position: relative; z-index: 1; }
html[data-look="a"] .lk-tool[data-for="a"], .lk-tool[data-for="any"] { display: inline-flex; }
html[data-look="a"][data-lk-charts="off"] .by-charts { display: none; }

/* the kit and the charts take their corners, rule and lift from the tokens */
html[data-look] .gn-chart:not(.gn-spark) { border-radius: var(--k-radius); border-width: var(--k-rule); box-shadow: var(--k-elev); }
html[data-look] .g-sw[aria-checked="true"]::after { background: var(--bg); }
html[data-look] .by-btn, html[data-look] .app-btn, html[data-look] .g-btn { border-radius: min(var(--k-radius), 10px); }
html[data-look] .by-btn.primary { color: var(--bg); }
html[data-look] .by-btn.primary:hover:not(:disabled) { color: var(--bg); }
html[data-look] .by-tablewrap { border-radius: var(--k-radius); }
html[data-look] .g-tile .spark .gn-spark { display: block; width: 100%; }
html[data-look] .g-tile .spark svg { width: 100%; height: auto; max-height: 44px; }
html[data-look] .g-about, html[data-look] .by-drill { box-shadow: var(--pop-shadow); }
html[data-look] .by-modal { box-shadow: var(--pop-shadow); border-radius: var(--k-radius); }

/* the keyboard row cursor (j / k in Terminal) */
.kb-cur, .kb-cur > td { background: var(--surface-2) !important; }
.kb-cur { outline: 1px solid var(--gn-wine); outline-offset: -1px; }

/* the shortcut sheet (? in Terminal) */
.lk-sheet-scrim { position: fixed; inset: 0; z-index: 9000; background: color-mix(in srgb, var(--bg) 70%, transparent); display: grid; place-items: center; }
.lk-sheet-scrim[hidden] { display: none; }
.lk-sheet { width: min(520px, 94vw); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--pop-shadow); padding: 16px 20px 18px; font: 13px/1.5 var(--f-body); }
.lk-sheet h2 { margin: 0 0 10px; font: 500 12px/1 var(--f-title); letter-spacing: .1em; text-transform: uppercase; color: var(--gn-wine); }
.lk-sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.lk-sheet dt { font: 500 12.5px var(--f-num); color: var(--ink); white-space: nowrap; }
.lk-sheet dd { margin: 0; color: var(--muted); }
.lk-sheet kbd { font: 500 12px var(--f-num); border: 1px solid var(--line-strong); padding: 1px 6px; background: var(--surface-2); }
.lk-sheet .foot { margin-top: 12px; color: var(--muted); font-size: 12px; }

/* the timeline strip (Control room only): real data moments from /api/meta, drawn by looks.js */
.lk-timeline { display: none; }

/* motion only to show change: the kit's g-changed ring, per look (reduced motion keeps the ring, drops the animation) */
html[data-look="a"] .g-tile.g-changed { animation: none; box-shadow: 0 0 0 1px var(--gn-wine); }
html[data-look="b"] .g-tile.g-changed { box-shadow: var(--k-elev), 0 0 0 2px var(--gn-wine); }
html[data-look="c"] .g-tile.g-changed { box-shadow: var(--k-elev), 0 0 0 2px var(--gn-wine); animation: lk-pulse 1.6s ease-out; }
@keyframes lk-pulse { 0% { box-shadow: var(--k-elev), 0 0 0 0 var(--gn-wine); } 40% { box-shadow: var(--k-elev), 0 0 0 8px transparent; } 100% { box-shadow: var(--k-elev), 0 0 0 2px var(--gn-wine); } }
@media (prefers-reduced-motion: reduce) { html[data-look] .g-tile.g-changed { animation: none; } }

/* ======================================================================================== A: Terminal */
html[data-look="a"] body { font-size: 13.5px; line-height: 1.45; }
html[data-look="a"] .gn-mast { border-bottom: 3px solid var(--gn-wine); }   /* the house masthead rule (gn-house-style .gn-mast: 3px wine) */
html[data-look="a"] .app-mast-in { padding-block: 4px; gap: 10px; }
html[data-look="a"] .app-mast img { height: 24px; }
html[data-look="a"] .app-product { font: 500 12px/1 var(--f-title); letter-spacing: .12em; text-transform: uppercase; color: var(--mast-muted); }
html[data-look="a"] .app-toplink { font: 500 12px var(--f-title); }
html[data-look="a"] .app-btn, html[data-look="a"] .app-viewas select, html[data-look="a"] .lk-switch button { font: 500 12px/1 var(--f-title); padding: 5px 8px; border-radius: 0; }
html[data-look="a"] .lk-switch button:first-child, html[data-look="a"] .lk-switch button:last-child, html[data-look="a"] .lk-tool button { border-radius: 0; }
html[data-look="a"] .gn-pill { font: 500 11.5px/1.4 var(--f-title); }
html[data-look="a"] :focus-visible { outline-offset: 1px; }
html[data-look="a"] .app-body { grid-template-columns: 188px minmax(0, 1fr); }
html[data-look="a"] .app-nav { background: var(--bg); border-right: 1px solid var(--line); padding: 6px 0 20px; }
html[data-look="a"] .nav-group h2 { font: 500 11px/1.2 var(--f-title); letter-spacing: .14em; color: var(--muted); border-bottom: 0; margin: 14px 12px 3px; }
html[data-look="a"] .nav-item { font-size: 13px; padding: 4px 12px; border-left-width: 2px; color: var(--ink); }
html[data-look="a"] .nav-item:hover { background: var(--surface-2); }
html[data-look="a"] .nav-item[aria-current="page"] { background: transparent; color: var(--gn-wine); font-weight: 600; }
html[data-look="a"] .nav-item[data-key]::after { content: attr(data-key); margin-left: auto; font: 500 10.5px var(--f-num); color: var(--muted); letter-spacing: .06em; }
html[data-look="a"] .app-main:not(.is-frame) { padding: 12px 16px 40px; }
html[data-look="a"] .app-main:not(.is-frame) > * + * { margin-top: 12px; }
html[data-look="a"] .g-head { gap: 8px 12px; }
html[data-look="a"] .g-head .gn-title { font: 500 15px/1.2 var(--f-title); letter-spacing: .1em; }
html[data-look="a"] .g-head .gn-title::before { content: "> "; color: var(--gn-wine); }
html[data-look="a"] .g-answer { font: 500 14px/1.4 var(--f-num); margin-top: 8px; }
html[data-look="a"] .g-chip, html[data-look="a"] .g-scn-tag { font: 500 12px/1 var(--f-num); padding: 5px 8px; }
html[data-look="a"] .g-ask, html[data-look="a"] .g-btn, html[data-look="a"] .g-seg button { font: 500 12px/1 var(--f-title); }
html[data-look="a"] .g-tiles { margin-top: 10px; }
html[data-look="a"] .g-tile .lbl { letter-spacing: .06em; }
html[data-look="a"] .g-tile .dlt, html[data-look="a"] .g-tile .was { font: 500 12px/1.3 var(--f-num); }
html[data-look="a"] .g-tile .sub { font: 400 12px/1.3 var(--f-num); }
html[data-look="a"] .g-tile .q { border-radius: 0; }
html[data-look="a"] .g-tile .spark svg { max-height: 26px; }
html[data-look="a"] .g-panel h3, html[data-look="a"] .g-scn-head h3 { font: 500 11.5px/1.2 var(--f-title); letter-spacing: .12em; color: var(--muted); }
html[data-look="a"] .g-list { font-size: 13px; }
html[data-look="a"] .g-list td { padding: 3px 6px; font-family: var(--f-num); font-size: 12.5px; }
html[data-look="a"] .g-list td.own { font-family: var(--f-body); }
html[data-look="a"] .gn-chart-title { font: 500 11.5px/1.2 var(--f-title); letter-spacing: .12em; color: var(--muted); }
html[data-look="a"] .gn-chart-sub, html[data-look="a"] .gn-axis-text, html[data-look="a"] .gn-val-text { font-family: var(--f-num); }
html[data-look="a"] .gn-chart { padding: 8px 10px; }
html[data-look="a"] .gn-pill { background: transparent; border-color: currentColor; border-radius: 0; }
html[data-look="a"] .gn-pill.bad::before { content: "\25A0\00a0"; }
html[data-look="a"] .gn-pill.warn::before { content: "\25C6\00a0"; }
html[data-look="a"] .gn-pill.ok::before { content: "\2713\00a0"; }
html[data-look="a"] .gn-pill.plain { border-color: var(--line); }
html[data-look="a"] .by-wrap { gap: 10px; }
html[data-look="a"] .by-run { font: 400 12.5px var(--f-num); }
html[data-look="a"] .by-charts { gap: 8px; }
html[data-look="a"] .by-filters label { font: 500 11px var(--f-title); text-transform: uppercase; letter-spacing: .08em; }
html[data-look="a"] .by-filters select, html[data-look="a"] .by-filters input { border-radius: 0; border-color: var(--line-strong); font: 13px var(--f-num); padding: 4px 6px; }
html[data-look="a"] .by-count { font: 500 13px var(--f-num); }
html[data-look="a"] .by-chip { border-radius: 0; }
html[data-look="a"] .by-tablewrap { max-height: calc(100vh - 300px); min-height: 240px; }
html[data-look="a"] .by-table { font-size: 12.5px; }
html[data-look="a"] .by-table th, html[data-look="a"] .by-table td { padding: 2px 8px; border: 1px solid var(--line); }   /* the full grid of the AR-email tables, A's tight padding */
html[data-look="a"] .by-table thead th { font: 500 10.5px/1.2 var(--f-title); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--head); padding-block: 5px; }
html[data-look="a"] .by-table td.num, html[data-look="a"] .by-table th.num { font-family: var(--f-num); font-feature-settings: "zero"; }
html[data-look="a"] .by-table td.wrap { min-width: 28ch; max-width: 56ch; }
html[data-look="a"] .by-table .lk-clamp { -webkit-line-clamp: 1; line-clamp: 1; }
html[data-look="a"] .by-table tbody tr.row:hover td, html[data-look="a"] .by-table tbody tr.sel td { background: var(--surface-2); }
html[data-look="a"] .by-table tbody tr.row:hover td:first-child, html[data-look="a"] .by-table tbody tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--gn-wine); }
html[data-look="a"] .by-btn { font: 500 12px/1.2 var(--f-title); border-color: var(--line-strong); }
html[data-look="a"] .by-drill { border-left-width: 1px; border-left-color: var(--gn-wine); }
html[data-look="a"] .by-drill-head h2 { font: 500 17px/1.2 var(--f-title); letter-spacing: .06em; color: var(--ink); }
html[data-look="a"] .by-h3 { font: 500 12px/1.2 var(--f-title); letter-spacing: .12em; border-bottom-width: 1px; }
html[data-look="a"] .by-kpi .v, html[data-look="a"] .gn-kpi b { font: 500 20px/1.15 var(--f-num); color: var(--ink); }
html[data-look="a"] .g-about h3, html[data-look="a"] .g-about-head h2 { font-family: var(--f-title); letter-spacing: .1em; }
/* F2 (audit 9a): on the Ship desk Backordered, Shipped so far, Ship-by and Days to ship sit in columns 10-13; column ORDER is unchanged, width only */
html[data-look="a"] #w5-lines .w5-table th, html[data-look="a"] #w5-lines .w5-table td { padding: 3px 5px; }
html[data-look="a"] #w5-lines .w5-table td { font-size: 12.5px; }
html[data-look="a"] #w5-lines .w5-table th { font-size: 10.5px; line-height: 1.15; white-space: normal; vertical-align: bottom; }
html[data-look="a"] #w5-lines .w5-table td.w5-desc { min-width: 78px; max-width: 86px; }
html[data-look="a"] #w5-lines .w5-table td.w5-wrap { min-width: 180px; }
html[data-look="a"] #w5-lines .w5-table td.w5-act, html[data-look="a"] #w5-lines .w5-table th.w5-act { width: 156px; min-width: 156px; max-width: 156px; white-space: normal; }
html[data-look="a"] #w5-lines .w5-table .w5-btn { margin: 0 2px 3px 0; padding: 2px 5px; font-size: 12px; }
html[data-look="a"] .app-main:not(.is-frame) .gn-table { font-size: 12.5px; }
html[data-look="a"] .app-main:not(.is-frame) .gn-table th, html[data-look="a"] .app-main:not(.is-frame) .gn-table td { padding: 3px 8px; }

/* ======================================================================================== B: Studio */
html[data-look="b"] body { font-size: 15px; line-height: 1.55; }
html[data-look="b"] .gn-mast { box-shadow: 0 1px 0 var(--mast-line); }
html[data-look="b"] .app-mast-in { padding: 12px 28px; gap: 10px 12px; }
html[data-look="b"] .app-mast img { height: 32px; }
html[data-look="b"] .app-product { font: 500 15px/1 var(--f-title); text-transform: none; letter-spacing: 0; color: var(--mast-muted); }
html[data-look="b"] .app-btn, html[data-look="b"] .app-viewas select, html[data-look="b"] .lk-switch button { font: 500 13px/1 var(--f-body); padding: 7px 12px; }
html[data-look="b"] .lk-switch button:first-child { border-radius: 10px 0 0 10px; }
html[data-look="b"] .lk-switch button:last-child { border-radius: 0 10px 10px 0; }
html[data-look="b"] .gn-title { text-transform: none; letter-spacing: -.015em; font-weight: 500; }
html[data-look="b"] .gn-pill { border-radius: 999px; padding: 2px 10px; font-weight: 500; }
html[data-look="b"] .g-head .gn-title { font-size: 40px; line-height: 1.05; }
html[data-look="b"] .g-answer { font: 400 24px/1.35 var(--f-title); color: var(--ink); max-width: 880px; margin-top: 10px; }
html[data-look="b"] .g-chip, html[data-look="b"] .g-scn-tag, html[data-look="b"] .g-ask { padding: 8px 14px; font-weight: 500; }
html[data-look="b"] .g-seg { border-color: var(--line); background: var(--surface-2); padding: 3px; gap: 2px; border-radius: 10px; }
html[data-look="b"] .g-seg button { background: transparent; border-radius: 8px; border: 0; }
html[data-look="b"] .g-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--k-elev); }
html[data-look="b"] .g-tile, html[data-look="b"] .g-panel, html[data-look="b"] .g-scn, html[data-look="b"] .gn-chart:not(.gn-spark) { border-color: var(--line); }
html[data-look="b"] .g-tile { gap: 6px; }
html[data-look="b"] .g-tile .lbl { font-weight: 500; }
html[data-look="b"] .g-tile .val { font-size: clamp(34px, 24cqw, var(--k-tile-val-size)); letter-spacing: -.02em; line-height: 1.02; margin-top: 4px; }
html[data-look="b"] .g-tile .dlt { font-size: 13.5px; }
html[data-look="b"] .g-tile .sub { font-size: 13.5px; }
html[data-look="b"] .g-tile .spark svg { max-height: 40px; }
html[data-look="b"] .g-tile .q { top: 14px; right: 16px; }
html[data-look="b"] .g-panel h3, html[data-look="b"] .g-scn-head h3 { font: 600 17px/1.25 var(--f-title); text-transform: none; letter-spacing: -.005em; color: var(--ink); }
html[data-look="b"] .g-scn { border-top-width: var(--k-rule); }
html[data-look="b"] .gn-chart-title { font: 500 20px/1.2 var(--f-title); text-transform: none; letter-spacing: -.005em; color: var(--ink); }
html[data-look="b"] .gn-chart-sub { font-size: 13.5px; }
html[data-look="b"] .gn-chart { padding: 20px 24px 18px; }
html[data-look="b"] .g-panel { padding: 20px 24px; }
html[data-look="b"] .g-list { font-size: 14.5px; }
html[data-look="b"] .g-list td { padding: 10px 8px; }
@media (max-width: 560px) { html[data-look="b"] .g-list td:not(.step) { padding-left: 5px; padding-right: 5px; } }   /* ui-2 X5: the outward arrow on a NetSuite link (I2) widens the id cell by 11px; on a phone the cells beside the step give that room back, so a step stays within 4 lines */
html[data-look="b"] .nav-group h2, html[data-look="b"] .nav-home .nav-item { text-transform: none; }
html[data-look="b"] .g-about { border-radius: 16px 0 0 16px; border-left: 0; }
html[data-look="b"] .g-about-head h2 { font: 500 24px/1.2 var(--f-title); text-transform: none; }
html[data-look="b"] .g-about h3 { font-size: 12px; }
@media (min-width: 821px) and (max-width: 1599px) { html[data-look="b"] .app-product { display: none; } }
@media (min-width: 821px) {
  /* top bar: module groups are tabs, their screens drop down */
  html[data-look="b"] .app-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  html[data-look="b"] .app-nav { display: flex; align-items: stretch; gap: 4px; overflow: visible; padding: 0 34px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 40; }
  html[data-look="b"] .nav-group { position: relative; display: flex; align-items: stretch; }
  html[data-look="b"] .nav-group h2 { display: flex; align-items: center; gap: 7px; margin: 0; padding: 14px 14px 12px; border: 0; border-bottom: 2px solid transparent; font: 500 14.5px/1.2 var(--f-body); letter-spacing: 0; color: var(--muted); cursor: pointer; }
  html[data-look="b"] .nav-group h2::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; margin-top: 1px; opacity: .6; }
  html[data-look="b"] .nav-group:hover h2, html[data-look="b"] .nav-group:focus-within h2 { color: var(--ink); }
  html[data-look="b"] .nav-group:has(.nav-item[aria-current="page"]) h2 { color: var(--gn-wine); border-bottom-color: var(--gn-wine); }
  html[data-look="b"] .lk-drop { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 236px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop-shadow); z-index: 60; }
  html[data-look="b"] .nav-group:hover .lk-drop, html[data-look="b"] .nav-group:focus-within .lk-drop, html[data-look="b"] .nav-group.lk-open .lk-drop { display: block; }
  html[data-look="b"] .app-nav.lk-shut .lk-drop { display: none; }
  html[data-look="b"] .lk-drop .nav-item { padding: 9px 14px; font-size: 14.5px; white-space: nowrap; border-left: 0; border-radius: 9px; }
  html[data-look="b"] .lk-drop .nav-item[aria-current="page"] { background: var(--gn-wine-soft); }
  html[data-look="b"] .nav-home { display: flex; align-items: stretch; }
  html[data-look="b"] .nav-home .nav-item { padding: 14px 14px 12px; border-left: 0; border-bottom: 2px solid transparent; font: 500 14.5px/1.2 var(--f-body); color: var(--muted); border-radius: 0; }
  html[data-look="b"] .nav-home .nav-item[aria-current="page"] { background: transparent; color: var(--gn-wine); border-bottom-color: var(--gn-wine); }
  html[data-look="b"] .nav-home .nav-item:hover { background: transparent; color: var(--ink); }

  /* white space: the page is a centred 1040 px column; that content width (under 1,100 px) sets the 3 + 2 tile layout and stacks the chart rows, so figures are large and charts run wide */
  html[data-look="b"] .app-main:not(.is-frame) { padding: 36px max(48px, calc((100% - 1040px) / 2)) 96px; }
  html[data-look="b"] .app-main:not(.is-frame) > * + * { margin-top: 28px; }
  html[data-look="b"] .g-tiles { margin-top: 28px; }
  html[data-look="b"] .g-row { gap: 22px; margin-top: 22px; }
  html[data-look="b"] .by-wrap { gap: 22px; }
  html[data-look="b"] .by-run { font-size: 14px; }
  html[data-look="b"] .by-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; }
  html[data-look="b"] .by-charts > :nth-child(3) { grid-column: 1 / -1; }
  html[data-look="b"] .by-charts .gn-chart-title { font-size: 20px; }
  html[data-look="b"] .by-charts .gn-axis-text, html[data-look="b"] .by-charts .gn-val-text { font-size: 13.5px; }
  html[data-look="b"] .app-main:not(.is-frame) .gn-kpi { padding: 18px 20px; border-radius: 14px; box-shadow: var(--k-elev); }
  html[data-look="b"] .app-main:not(.is-frame) .gn-kpi b { font: 500 40px/1.1 var(--f-num); }
}
html[data-look="b"] .by-filters select, html[data-look="b"] .by-filters input { padding: 8px 12px; border-color: var(--line-strong); border-radius: 10px; }
html[data-look="b"] .by-filters label { font-size: 13px; }
html[data-look="b"] .by-chip { border-radius: 999px; }
html[data-look="b"] .by-tablewrap { border: 0; box-shadow: var(--k-elev); max-height: 70vh; }
html[data-look="b"] .by-table { font-size: 14px; }
html[data-look="b"] .by-table th, html[data-look="b"] .by-table td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); }
html[data-look="b"] .by-table thead th { font: 500 12.5px/1.2 var(--f-body); color: var(--muted); background: var(--surface); box-shadow: 0 1px 0 var(--line-strong); }
html[data-look="b"] .by-table td.wrap { min-width: 24ch; max-width: 38ch; }
html[data-look="b"] .by-table tbody tr.row:hover td, html[data-look="b"] .by-table tbody tr.sel td { background: var(--surface-2); }
html[data-look="b"] .by-btn { padding: 6px 14px; border-radius: 10px; border-color: var(--line-strong); font-weight: 500; }
html[data-look="b"] .by-btn.mini { padding: 4px 12px; }
html[data-look="b"] .by-drill { border-left: 0; border-radius: 18px 0 0 18px; width: min(1000px, 96vw); }
html[data-look="b"] .by-drill-head h2 { font: 500 30px/1.1 var(--f-title); text-transform: none; letter-spacing: -.01em; }
html[data-look="b"] .by-h3 { font: 600 17px/1.2 var(--f-title); text-transform: none; border-bottom: 1px solid var(--line); color: var(--ink); }
html[data-look="b"] .by-kpi { border-radius: 12px; box-shadow: var(--k-elev); border-color: var(--line); }
html[data-look="b"] .by-kpi .v { font: 500 26px/1.15 var(--f-num); }
html[data-look="b"] .app-main:not(.is-frame) .gn-table th, html[data-look="b"] .app-main:not(.is-frame) .gn-table td { padding: 10px 13px; border-left: 0; border-right: 0; }

/* ======================================================================================== C: Control room */
html[data-look="c"] body { font-size: 14px; }
html[data-look="c"] .gn-mast { border-bottom-width: 2px; }
html[data-look="c"] .app-mast-in { padding-block: 5px; gap: 10px; }
html[data-look="c"] .app-mast img { height: 26px; }
html[data-look="c"] .app-product { font: 700 14px/1 var(--f-title); letter-spacing: .1em; color: var(--mast-muted); }
html[data-look="c"] .app-btn, html[data-look="c"] .app-viewas select, html[data-look="c"] .lk-switch button { font: 600 12.5px/1 var(--f-body); padding: 6px 10px; }
html[data-look="c"] .gn-title { font-weight: 700; }
html[data-look="c"] .g-head .gn-title { font-size: 28px; letter-spacing: .03em; }
html[data-look="c"] .g-answer { font: 500 17px/1.4 var(--f-body); }
html[data-look="c"] .g-chip { border-width: 1px; border-left-width: 4px; border-radius: var(--k-radius); font-weight: 700; }
html[data-look="c"] .g-chip.current { border-left-color: var(--st-ok-mark); }
html[data-look="c"] .g-chip.behind { border-left-color: var(--st-warn-mark); }
html[data-look="c"] .g-chip.held { border-left-color: var(--st-bad-mark); }
html[data-look="c"] .g-chip.unknown { border-left-color: var(--st-watch-mark); }
/* every card carries a status edge in the mark colour; the shape and the word sit in its label, so colour is never alone */
html[data-look="c"] .g-tile { border-left: 5px solid var(--line-strong); }
html[data-look="c"] .g-tile:has(.lbl > .bad) { border-left-color: var(--st-bad-mark); background: linear-gradient(90deg, color-mix(in srgb, var(--st-bad-mark) 13%, transparent), transparent 55%), var(--surface); }
html[data-look="c"] .g-tile:has(.lbl > .warn) { border-left-color: var(--st-warn-mark); background: linear-gradient(90deg, color-mix(in srgb, var(--st-warn-mark) 12%, transparent), transparent 55%), var(--surface); }
html[data-look="c"] .g-tile:has(.lbl > .ok) { border-left-color: var(--st-ok-mark); background: linear-gradient(90deg, color-mix(in srgb, var(--st-ok-mark) 12%, transparent), transparent 55%), var(--surface); }
html[data-look="c"] .g-tile:has(.lbl > .watch) { border-left-color: var(--st-watch-mark); }
html[data-look="c"] .g-tile .lbl { letter-spacing: .07em; font-weight: 700; }
html[data-look="c"] .g-tile .lbl svg { width: 13px; height: 13px; }
html[data-look="c"] .g-tile .val { font-size: clamp(30px, 19cqw, var(--k-tile-val-size)); line-height: 1; letter-spacing: .01em; }
html[data-look="c"] .g-tile .spark svg { max-height: 40px; }
html[data-look="c"] .g-panel h3, html[data-look="c"] .g-scn-head h3 { letter-spacing: .06em; font-size: 14px; }
html[data-look="c"] .gn-chart-title { letter-spacing: .06em; }
html[data-look="c"] .gn-pill { border-radius: 4px; font-weight: 700; border-color: color-mix(in srgb, currentColor 45%, transparent); }
html[data-look="c"] .gn-pill.bad::before { content: "\25A0\00a0"; }
html[data-look="c"] .gn-pill.warn::before { content: "\25C6\00a0"; }
html[data-look="c"] .gn-pill.ok::before { content: "\2713\00a0"; }
html[data-look="c"] .by-chip { border-radius: 6px; }
html[data-look="c"] .by-kpi { border-radius: 8px; box-shadow: var(--k-elev); }
html[data-look="c"] .by-tablewrap { box-shadow: var(--k-elev); max-height: calc(100vh - 330px); min-height: 240px; }
html[data-look="c"] .by-table { font-size: 12.5px; }
html[data-look="c"] .by-table th, html[data-look="c"] .by-table td { padding: 3px 8px; border: 0; border-bottom: 1px solid var(--line); }
html[data-look="c"] .by-table thead th { font: 700 11.5px/1.2 var(--f-title); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--head); }
html[data-look="c"] .by-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
html[data-look="c"] .by-table tbody tr.row:hover td, html[data-look="c"] .by-table tbody tr.sel td { background: var(--surface-2); }
html[data-look="c"] .by-table tbody tr.row:hover td:first-child, html[data-look="c"] .by-table tbody tr.sel td:first-child { box-shadow: inset 4px 0 0 var(--gn-wine); }
html[data-look="c"] .by-table td.wrap { min-width: 24ch; max-width: 44ch; }
html[data-look="c"] .by-table .lk-clamp { -webkit-line-clamp: 1; line-clamp: 1; }
html[data-look="c"] .by-btn { min-height: 32px; font-weight: 600; border-color: var(--line-strong); }
html[data-look="c"] .by-table .by-btn.mini { min-height: 24px; }
html[data-look="c"] .by-drill { border-left-width: 4px; }
html[data-look="c"] .by-drill-head h2 { letter-spacing: .04em; }
html[data-look="c"] .app-main:not(.is-frame) .gn-table { font-size: 12.5px; }
html[data-look="c"] .app-main:not(.is-frame) .gn-table th, html[data-look="c"] .app-main:not(.is-frame) .gn-table td { padding: 3px 8px; }
html[data-look="c"] .app-main:not(.is-frame) .gn-kpi { border-radius: 8px; box-shadow: var(--k-elev); border-left: 5px solid var(--line-strong); }
html[data-look="c"] #w5-lines .w5-table td.w5-desc { min-width: 104px; max-width: 124px; }
html[data-look="c"] #w5-lines .w5-table th, html[data-look="c"] #w5-lines .w5-table td { padding-inline: 5px; }
html[data-look="c"] #w5-lines .w5-table th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
html[data-look="c"] #w5-lines .w5-table td.w5-act, html[data-look="c"] #w5-lines .w5-table th.w5-act { width: 176px; min-width: 176px; max-width: 176px; white-space: normal; }
html[data-look="c"] #w5-lines .w5-table .w5-btn { margin: 0 2px 2px 0; padding: 2px 6px; min-height: 0; }
html[data-look="c"] .w5-table .lk-clamp { -webkit-line-clamp: 1; line-clamp: 1; }
@media (min-width: 821px) {
  /* compact rail (100px) with short, unique labels that wrap at spaces; keyboard focus opens it to full labels over the page (ui-2 I2: not the pointer: a rail that opened under the pointer sat over the
     first tabs of the place's tab row and took the click meant for them; the full name is the entry's hover. Choosing an entry, Escape and a press elsewhere close it: .lk-shut) */
  html[data-look="c"] .app-body { position: relative; grid-template-columns: 100px minmax(0, 1fr); }
  html[data-look="c"] .app-nav { grid-column: 1; grid-row: 1; width: 100px; padding: 2px 0 12px; overflow-x: hidden; z-index: 70; background: var(--mast-bg); border-right: 1px solid var(--line); }
  html[data-look="c"] .app-main { grid-column: 2; grid-row: 1; }
  html[data-look="c"] .nav-group h2 { font-size: 0; margin: 8px 6px 1px; padding: 0 0 2px; text-align: center; border-bottom-color: var(--line); color: var(--muted); }
  html[data-look="c"] .nav-group h2::before { content: attr(data-short); font: 700 11px/1.2 var(--f-title); letter-spacing: .08em; text-transform: uppercase; }
  html[data-look="c"] .nav-item { font-size: 0; justify-content: center; text-align: center; padding: 6px 2px; border-left: 3px solid transparent; min-height: 34px; }
  html[data-look="c"] .nav-item::before { content: attr(data-short); font: 600 12.5px/1.15 var(--f-body); white-space: normal; hyphens: none; overflow-wrap: normal; text-align: center; }
  html[data-look="c"] .nav-item .nav-flag { display: none; }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within, html[data-look="c"] .app-nav.lk-open { position: absolute; top: 0; bottom: 0; left: 0; width: 236px; box-shadow: var(--pop-shadow); }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within .nav-group h2, html[data-look="c"] .app-nav.lk-open .nav-group h2 { font-size: 13px; text-align: left; margin: 12px 14px 2px; }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within .nav-group h2::before, html[data-look="c"] .app-nav.lk-open .nav-group h2::before { content: none; }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within .nav-item, html[data-look="c"] .app-nav.lk-open .nav-item { font-size: 14px; justify-content: flex-start; text-align: left; padding: 6px 14px; }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within .nav-item::before, html[data-look="c"] .app-nav.lk-open .nav-item::before { content: none; }
  html[data-look="c"] .app-nav:not(.lk-shut):focus-within .nav-item .nav-flag, html[data-look="c"] .app-nav.lk-open .nav-item .nav-flag { display: inline-block; }
  html[data-look="c"] .nav-item[aria-current="page"] { background: var(--gn-wine-soft); }
  html[data-look="c"] .app-main:not(.is-frame) { padding: 12px 16px var(--gn-float-h); }
  html[data-look="c"] .app-main:not(.is-frame) > * + * { margin-top: 10px; }
  html[data-look="c"] .by-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; align-items: start; }
  html[data-look="c"] .by-charts > :nth-child(3) { grid-column: auto; }
  html[data-look="c"] .by-charts .gn-chart { padding: 6px 10px 8px; }
}
/* the data strip (ui-1, A): one thin row of plain words: "Data feeds:", then a segment per state (a coloured bar, a count and its word, then the names). The bar's colour means
   what it means everywhere: red = failed a check or no date, amber = late, green = up to date, grey = anything else; the words say it, the colour only repeats it. */
html[data-look="c"] .lk-timeline { display: flex; align-items: center; gap: 12px; height: 28px; padding: 0 12px; border-top: 1px solid var(--mast-line); background: var(--mast-bg); font: 12px/1 var(--f-body); color: var(--mast-muted); white-space: nowrap; position: relative; overflow: hidden; }
html[data-look="c"] .lk-timeline .tl-head { flex: none; font: 700 12px/1 var(--f-body); color: var(--mast-ink); }
html[data-look="c"] .lk-timeline .tl-segs { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
html[data-look="c"] .lk-timeline .tl-seg { display: inline-flex; align-items: baseline; padding-left: 7px; border-left: 3px solid var(--st-watch-mark); color: var(--mast-ink); font-variant-numeric: tabular-nums; }
html[data-look="c"] .lk-timeline .tl-seg.bad { border-left-color: var(--st-bad-mark); }
html[data-look="c"] .lk-timeline .tl-seg.warn { border-left-color: var(--st-warn-mark); }
html[data-look="c"] .lk-timeline .tl-seg.ok { border-left-color: var(--st-ok-mark); }
html[data-look="c"] .lk-timeline .tl-n { font-weight: 700; }
html[data-look="c"] .lk-timeline .tl-names { color: var(--mast-muted); font-weight: 500; margin-left: .4em; }
html[data-look="c"] .lk-timeline .tl-more { flex: none; margin-left: auto; font: 600 12px/1 var(--f-body); color: var(--mast-btn-ink); background: var(--mast-btn-bg); border: 1px solid var(--mast-btn-line); border-radius: min(var(--k-radius), 6px); padding: 4px 9px; cursor: pointer; }
html[data-look="c"] .lk-timeline .tl-more:hover, html[data-look="c"] .lk-timeline .tl-more[aria-expanded="true"] { border-color: var(--gn-wine); color: var(--gn-wine); }

/* ======================================================================================== phones: the shell's masthead gets out of the way */
@media (max-width: 820px) {
  html[data-look] .app-product { display: none; }   /* ui-1 A: the "Look" label stays on a phone, so A B C is never an unlabelled switch */
  html[data-look] .app-mast-in { padding: 6px 10px; gap: 4px 8px; }   /* 4px between the masthead's wrapped rows (was 6): with the tighter timeline strip below, Today's moves block starts above 400px on a phone in every look (polish-4 T1) */
  html[data-look] .app-mast img { height: 24px; }
  html[data-look] .app-toplink { font-size: 12.5px; }
  html[data-look] .app-nav { background: var(--surface); }
  html[data-look] .nav-item[data-key]::after { content: none; }
  html[data-look="a"] .g-list td { font-family: var(--f-body); font-size: 12.5px; }   /* the narrow face keeps a list step and its links inside the cell */
  html[data-look="b"], html[data-look="c"] { --k-pad: 14px 14px 12px; }
  html[data-look="b"] .nav-group h2 { font: 500 14px/1.2 var(--f-body); letter-spacing: 0; color: var(--muted); }
  html[data-look="b"] .g-tile .q { top: 10px; right: 10px; }
  html[data-look="c"] .g-tile .lbl { letter-spacing: .03em; font-size: 11px; }
  html[data-look="b"] .g-head .gn-title { font-size: 30px; }
  html[data-look="b"] .g-answer { font-size: 19px; }
  html[data-look="b"] .app-main:not(.is-frame) { padding: 20px 14px var(--gn-float-h); }
  html[data-look="b"] .g-tile .val { font-size: clamp(30px, 22cqw, 40px); }
  html[data-look="c"] .g-head .gn-title { font-size: 24px; }
  html[data-look="c"] .lk-timeline { padding-inline: 8px; gap: 8px; flex-wrap: wrap; height: auto; min-height: 28px; padding-block: 3px; row-gap: 2px; overflow: visible; }   /* ui-1 A: on a phone the strip may take two lines, never a sideways scroll */
  html[data-look="c"] .lk-timeline .tl-segs { flex-wrap: wrap; gap: 2px 10px; white-space: normal; }
  html[data-look="c"] .lk-timeline .tl-more { margin-left: 0; padding: 2px 8px; }
}

/* ui-2 I2 (L30): at 600px and under the data strip is ONE line of counts (Data feeds: 1 failed a check, 2 late, 7 up to date, List): it never wraps to a second row; what does not fit is cut at the end and the List button,
   which stays, opens every feed. */
@media (max-width: 600px) {
  html[data-look="c"] .lk-timeline { flex-wrap: nowrap; height: 30px; min-height: 0; padding-block: 0; overflow: hidden; }
  html[data-look="c"] .lk-timeline .tl-segs { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; gap: 10px; }
  html[data-look="c"] .lk-timeline .tl-more { margin-left: auto; }
  /* Control room has the strip, which says what the header pill says (the same words, the same List button): one of the two, so the masthead is the logo row, the links row and the strip, three rows */
  html[data-look="c"] #agePill { display: none; }
  html[data-look] .app-nav { scrollbar-width: none; }   /* the menu strip scrolls by touch; its own scroll bar was a 10px row of nothing */
  html[data-look] .app-nav::-webkit-scrollbar { display: none; }
}

/* ===== round-range2 (A): the date-range control (.g-range) and the band that holds it above a framed view ====================================================================
   The control's own base style (layout, the segmented row, the pressed preset in the one wine accent, the 3 x 2 grid under 600px) is injected by web/range.js, so a framed page that is
   opened alone draws the same control with no stylesheet of ours. What is here: the app band, the head row, and the three looks' small differences (tokens carry light and dark). */
.range-band { flex: none; box-sizing: border-box; min-height: 44px; padding: 6px 14px; display: flex; align-items: center; background: var(--surface); border-bottom: var(--k-rule, 1px) solid var(--line); }
.range-band[hidden] { display: none; }
.app-main.is-frame:not(.has-panel):has(> .range-band) { display: flex; flex-direction: column; overflow: hidden; }
.app-main.is-frame:not(.has-panel) > .range-band + .app-frame { flex: 1 1 auto; min-height: 0; height: auto; }
.g-head > .g-range { flex: 0 1 auto; }
html[data-look="a"] .g-range-seg button, html[data-look="a"] .g-range-custom select { font-family: var(--f-title); font-weight: 500; }
html[data-look="b"] .g-range-seg { padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); }
html[data-look="b"] .g-range-seg button { border: 0; border-radius: 8px; background: transparent; }
html[data-look="b"] .g-range-seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--k-elev), inset 0 -2px 0 var(--gn-wine); }
@media (max-width: 600px) {
  .range-band { min-height: 84px; padding: 6px 12px; align-items: flex-start; }
  html[data-look="b"] .g-range-seg { gap: 2px; }
  html[data-look="b"] .g-range-seg button { border-bottom: 0; }
}
