/* The Forge (Noble Made) — shared design tokens and base chrome.  (E10.2, 2026-09-01)
 * ===========================================================================
 *
 * WHY THIS FILE EXISTS
 *
 * There was no shared stylesheet. Every one of the nine pages repeated the same
 * base block -- reset, body, links, scrollbars, the PIN-gate shake keyframes --
 * and then spelled every colour as a hex literal inline. 2,754 hex literals,
 * 102 distinct values, across nine files. A colour could be fixed once per
 * board, or not at all, and calendar.html carried a standing warning about it:
 *
 *     Do not "tidy" this into variables unless the other five boards move at
 *     the same time.
 *
 * This is those boards moving at the same time.
 *
 * TOKENS ARE NAMED BY ROLE, NOT BY VALUE. That distinction is the whole point,
 * and #232327 is why. It is used 108 times as a BORDER, where a 1.1:1 contrast
 * against the page is exactly right, and once as TEXT -- calendar.html's
 * "nothing scheduled" -- where 1.1:1 makes it invisible. A token named for the
 * hex would force those to move together and E9.4 could not fix one without
 * wrecking the other. Named for the role, --text-ghost can be lightened and
 * --border-subtle left alone.
 *
 * E9.4 (contrast under shop lighting) LANDED HERE on 2026-09-01, and it was a
 * five-line edit to this file -- which is what E10.2 existed to make possible.
 * See the text scale below for what moved and why. Changing a colour here still
 * changes every board; nothing that merely shares an old hex value follows it.
 *
 * HOW IT IS LOADED. A plain <link> in each page's real <head>, before
 * support.js -- not inside <helmet>, which is hoisted at runtime and would
 * paint the page unstyled first. Page-specific rules stay in each page's own
 * <style> and still win, because they are parsed after this file.
 *
 * CUSTOM PROPERTIES WORK IN INLINE STYLES HERE. dc-runtime's cssToObj() splits
 * a style attribute on ";" and ":" and passes values through untouched, and
 * keeps `--x` keys as-is, so `style="color:var(--text-muted)"` reaches React
 * intact. Verified in support.js before this was written. Two things it cannot
 * take: a semicolon inside a value, and a quoted hex -- `color:'#6C665C'` is
 * JavaScript (Chart.js config in stats.html), NOT a style attribute, and must
 * keep its literal.
 */

:root {
  /* ── Surfaces ─────────────────────────────────────────────────────────── */
  --surface-page:    #08080A;  /* body */
  --surface-sunken:  #0A0A0C;  /* calendar grid wells */
  --surface-raised:  #0D0D0F;
  --surface-card:    #121215;
  --surface-panel:   #141417;
  --surface-input:   #16161a;

  /* ── Borders. Decoration, not reading matter -- these are NOT held to a
        text contrast ratio, which is exactly why they are separate from the
        text scale below. ───────────────────────────────────────────────── */
  --border-subtle:   #232327;
  --border-quiet:    #242428;
  /* The card hairline every board's stat/KPI tiles use. E10.2 tokenised the
     palette from the pages that linked tokens.css, and missed this one: it is
     still a literal #1b1b1e in 40 places across seven pages. Added by E2.5 so
     new cards match without adding a 41st. Converting the existing 40 is a
     mechanical follow-up, not a redesign -- it is one value with one role. */
  --border-card:     #1b1b1e;
  --border:          #2a2a2f;
  --border-strong:   #3a3a40;

  /* ── Text. The scale runs bright to dim; the bottom three are the ones the
        shop actually struggles with. ──────────────────────────────────── */
  --text-primary:    #F5ECDA;   /* Noble Made "Canvas" (was #ECEAE4, 2026-11-17) */
  --text-secondary:  #B9B4A6;   /* 9.03:1 on cards */
  --text-tertiary:   #A49B8E;   /* 6.82:1 on cards */

  /* Raised for legibility on the floor (E9.4, 2026-09-01). Every tier now
     clears 4.5:1 against --surface-card, which is the WORST surface any of
     them sits on -- cards are lighter than the page, so measuring against
     --surface-page alone (as the original story did) understated the problem
     by about 0.2. Run `node tools/contrast.mjs` to re-check.

     WHY THE WHOLE RAMP MOVED, not just the two failing tokens. --text-tertiary
     was 4.98:1 on cards -- passing, but only just. Raising --text-muted to
     clear 4.5 would have put it LIGHTER than tertiary and inverted the
     hierarchy. Fitting both muted and faint into the 4.5-4.98 gap instead made
     three tiers that were indistinguishable from each other. You cannot have
     five separable greys above 4.5:1 on a near-black background; the ramp had
     to be re-spaced upward to make room. Steps are now 19.3 / 9.0 / 7.0 / 4.6
     in L*, so each tier reads as a real step rather than a shade.

     Old values, for reference: secondary #9C978C, tertiary #8a8378,
     muted #6C665C (3.29:1 on cards), faint #4d483f (2.06:1),
     ghost #232327 (1.26:1 on --surface-sunken -- effectively invisible; it is
     calendar.html's "nothing scheduled" and the only TEXT use of that value).

     Do NOT raise --border-subtle to match --text-ghost. They shared a value and
     nothing else: a border at 1.1:1 is correct, a label at 1.1:1 is invisible.

     AA IS THE FLOOR, NOT THE SIGN-OFF. These are computed ratios on a desk
     monitor. The real test is a tablet at arm's length under shop lights, and
     tuning them is one line each. */
  --text-muted:      #91897B;   /* 5.40:1 on cards, 5.78:1 on page */
  --text-faint:      #867D6D;   /* 4.60:1 on cards, 4.92:1 on page */
  --text-ghost:      #797986;   /* 4.36:1 on cards, 4.61:1 on --surface-sunken */

  /* ── Brand and status ─────────────────────────────────────────────────── */
  --accent:          #C8505C;  /* brand red: Noble Made heritage red, lifted to read on dark (was #C6372B) */
  --accent-hot:      #D0707A;  /* (was #E24A3A) */
  /* Noble Made brand colours (2026-11-17). Fixed values for the shell below
     (header, logo block, sidebar) -- not part of the text scale. */
  --brand-canvas:    #F5ECDA;
  --brand-coal:      #212322;
  --brand-heritage:  #752330;
  --brand-crimson:   #551C25;
  --brand-suede:     #AC844B;
  --brand-suede-lt:  #C9A26A;  /* suede that reads on crimson, 5.6:1 */
  --ok:              #7FA644;
  --ok-border:       #3D5418;
  --ok-bg:           #18230D;
  --warn:            #C9923A;
  --warn-soft:       #E0B870;
  --danger-text:     #E8A89F;
  --danger-border:   #7A241C;
  --danger-bg:       #2A100D;
  /* ── print method identity ────────────────────────────────────────────
     One colour per method type, so a card says which press it belongs to
     before anyone reads it. Anthony, 2026-09-08: screen print green,
     embroidery purple, heat press orange.

     ⚠️ DELIBERATELY NOT --ok AND --warn, even though those are already a green
     and an orange. Those two carry MEANING on these boards -- --ok is "fine,
     on schedule, counted clean" and --warn is "watch this one". A method chip
     painted in the exact status green would read as a verdict on the job
     rather than a label for the press, and the whole point of this project's
     colour discipline is that a colour means one thing. These are neighbouring
     hues, clearly the colours asked for, and never the status tokens:

       --method-sp  a cooler emerald   vs --ok    #7FA644, a yellow-green
       --method-hp  a true orange      vs --warn  #C9923A, an amber/gold

     Embroidery takes --purple's value, which nothing status-related uses, and
     promo inherits the teal embroidery vacated -- so all four stay distinct
     from each other and from every status colour.

     All four clear 4.5:1 on --surface-page and --surface-card (they are used
     as text on the boards) and 3:1 on white, which is what the printed order
     sheet needs -- there they are only ever a 9px dot beside dark text. */
  --method-sp:       #4E9A6A;
  --method-em:       #9878C0;
  --method-hp:       #D2762F;
  --method-promo:    #5E9B9A;
  --teal:            #5E9B9A;
  --purple:          #9878C0;
}

/* ── Base chrome ─────────────────────────────────────────────────────────
   Byte-identical to the block that was repeated across the boards; it lived in
   seven to nine copies depending on the rule. Page-specific rules stay in each
   page and still override, being parsed later. */
* { box-sizing: border-box }

body {
  margin: 0;
  background: var(--surface-page);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
}

a { color: var(--accent-hot); text-decoration: none }
a:hover { color: var(--accent) }

.ti { font-size: inherit; line-height: 1; display: inline-block }

input, textarea { font-family: inherit }
input::placeholder, textarea::placeholder { color: var(--text-faint) }

::-webkit-scrollbar { width: 9px; height: 9px }
::-webkit-scrollbar-thumb { background: var(--h-2A2A2E); border-radius: 6px }
::-webkit-scrollbar-track { background: transparent }

/* The PIN gate's wrong-code shake, and the nav drawer's slide-in. Both were
   repeated in seven pages. */
@keyframes ca-shake {
  10%, 90% { transform: translateX(-2px) }
  20%, 80% { transform: translateX(4px) }
  30%, 50%, 70% { transform: translateX(-7px) }
  40%, 60% { transform: translateX(7px) }
}
@keyframes ca-slide-left {
  from { transform: translateX(-30px); opacity: 0 }
  to   { transform: translateX(0); opacity: 1 }
}

/* 2026-11-04 (Anthony): every board's order card is a CENTERED modal, not a side drawer
   (Production Dashboard, Pre-Production, Calendar; shipping.css .drawer does the same).
   Centred with the individual `translate` property so the pop-in animation (opacity +
   `scale`) never fights it. Header and footer stay put; the body (flex:1, overflow-y:auto
   inline on each page) scrolls inside. */
.ca-order-modal {
  position: fixed; top: 50%; left: 50%; translate: -50% -50%; z-index: 61;
  width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  background: var(--h-0C0C0E); border: 1px solid var(--h-2A2A2F); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.85);
  display: flex; flex-direction: column; animation: ca-pop .18s ease;
}
.ca-order-modal > * { flex-shrink: 0 }
@keyframes ca-pop {
  from { opacity: 0; scale: .97 }
  to   { opacity: 1; scale: 1 }
}
/* Noble Made motion (2026-11-19, with motion.js): the order card rises into place, and cards
   lift a touch under the pointer. Off with reduced motion (motion.js sets data-nm-motion). */
html[data-nm-motion="on"] .ca-order-modal { animation: nm-modal .34s cubic-bezier(.2,.7,.2,1) }
@keyframes nm-modal {
  from { opacity: 0; scale: .96; transform: translateY(14px) }
  to   { opacity: 1; scale: 1; transform: none }
}
html[data-nm-motion="on"] .ca-ocard { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s }
html[data-nm-motion="on"] .ca-ocard:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -18px rgba(0,0,0,.55) }
html[data-nm-motion="on"] .ca-side nav a { transition: background .25s }

/* Station order blocks (station.html, 2026-11-19): a thin bar that fills as the order's cards
   are done, growing in from the left the first time it shows. */
.nm-progress { height: 3px; border-radius: 2px; background: var(--h-24262B); margin: 0 2px 12px; overflow: hidden }
.nm-progress i { display: block; height: 100%; background: var(--nm-accent); border-radius: 2px; transition: width .8s cubic-bezier(.2,.7,.2,1) }
html[data-nm-motion="on"] .nm-progress i { animation: nm-grow 1s cubic-bezier(.2,.7,.2,1) both; transform-origin: left }
@keyframes nm-grow { from { transform: scaleX(0) } to { transform: scaleX(1) } }

/* Production board stage reel (index.html, 2026-11-19). A dark coal band in both themes, like
   noblemade.com's letter section. Only shown when motion.js is running (data-nm-motion="on");
   motion.js sets html[data-nm-reel] to the stage the scroll is on. */
.nm-reel { display: none }
html[data-nm-motion="on"] .nm-reel { display: block; position: relative; height: 340vh; flex-shrink: 0 }
.nm-reel-stage { position: sticky; top: 90px; height: calc(100vh - 110px); min-height: 460px; border-radius: 14px; overflow: hidden;
  background: #1E201F; color: #F3E9D6; transition: background .7s ease }
html[data-nm-reel="1"] .nm-reel-stage { background: #3A1219 }
html[data-nm-reel="2"] .nm-reel-stage { background: #2C2416 }
html[data-nm-reel="3"] .nm-reel-stage { background: #1E2A22 }
.nm-reel-panel { position: absolute; inset: 0 0 64px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); align-items: center; gap: 32px;
  padding: 0 clamp(20px, 4vw, 60px); opacity: 0; pointer-events: none; transition: opacity .5s ease }
html:not([data-nm-reel]) .nm-reel-panel[data-nm-stage="0"], html[data-nm-reel="0"] .nm-reel-panel[data-nm-stage="0"], html[data-nm-reel="1"] .nm-reel-panel[data-nm-stage="1"],
html[data-nm-reel="2"] .nm-reel-panel[data-nm-stage="2"], html[data-nm-reel="3"] .nm-reel-panel[data-nm-stage="3"] { opacity: 1; pointer-events: auto }
.nm-reel-txt { position: relative; z-index: 2; transform: translateY(16px); transition: transform .6s cubic-bezier(.2,.7,.2,1) }
.nm-reel-panel:is([data-nm-stage="0"],[data-nm-stage="1"],[data-nm-stage="2"],[data-nm-stage="3"]) .nm-reel-txt { }
html:not([data-nm-reel]) [data-nm-stage="0"] .nm-reel-txt, html[data-nm-reel="0"] [data-nm-stage="0"] .nm-reel-txt, html[data-nm-reel="1"] [data-nm-stage="1"] .nm-reel-txt,
html[data-nm-reel="2"] [data-nm-stage="2"] .nm-reel-txt, html[data-nm-reel="3"] [data-nm-stage="3"] .nm-reel-txt { transform: none }
.nm-reel-lab { font: 600 12px/1 'Oswald', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #CFC4B2 }
.nm-reel-h { margin: 16px 0 14px; font: 400 clamp(42px, 5.4vw, 84px)/1.02 'Playfair Display', Georgia, serif; color: #F3E9D6 }
.nm-reel-h em { font-style: italic; color: #E9B97A }
.nm-reel-p { margin: 0 0 24px; max-width: 440px; font: 400 16px/1.55 'DM Sans', sans-serif; color: #CFC4B2 }
.nm-reel-btn, .nm-reel-skip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 600 12px/1 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase }
.nm-reel-btn { background: #F3E9D6; color: #1E201F; border: 0 }
.nm-reel-btn:hover { background: #fff }
.nm-reel-fan { position: relative; height: min(56vh, 460px) }
.nm-reel-card { position: absolute; left: 50%; top: 50%; width: min(300px, 78%); background: #FBF6EC; color: #1E201F; border-radius: 8px; padding: 18px 20px;
  box-shadow: 0 30px 60px -22px rgba(0,0,0,.6); opacity: 0; z-index: calc(10 - var(--a));
  transform: translate(-50%, -38%) rotate(0deg); transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .5s }
html:not([data-nm-reel]) [data-nm-stage="0"] .nm-reel-card, html[data-nm-reel="0"] [data-nm-stage="0"] .nm-reel-card, html[data-nm-reel="1"] [data-nm-stage="1"] .nm-reel-card,
html[data-nm-reel="2"] [data-nm-stage="2"] .nm-reel-card, html[data-nm-reel="3"] [data-nm-stage="3"] .nm-reel-card {
  opacity: 1; transform: translate(calc(-50% + var(--o) * 150px), calc(-50% + var(--a) * 22px)) rotate(calc(var(--o) * 7deg)) }
.nm-reel-card-top, .nm-reel-card-foot { display: flex; justify-content: space-between; gap: 10px; font: 600 11px/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6B645B }
.nm-reel-card-name { margin: 14px 0 16px; font: 500 24px/1.15 'Playfair Display', Georgia, serif; color: #1E201F }
.nm-reel-card-foot { border-top: 1px solid #E0D3BB; padding-top: 12px; color: #7D1B2B }
.nm-reel-empty { position: absolute; inset: 0; display: grid; place-items: center; font: italic 400 22px/1.3 'Playfair Display', serif; color: #A79E8F }
.nm-reel-big { position: absolute; right: 3%; bottom: -8%; font: italic 400 min(50vh, 34vw)/1 'Playfair Display', Georgia, serif; color: transparent;
  -webkit-text-stroke: 1.5px rgba(233,185,122,.32); pointer-events: none; z-index: 0 }
.nm-reel-chips { position: absolute; left: clamp(20px, 4vw, 60px); right: clamp(20px, 4vw, 60px); bottom: 14px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap }
.nm-reel-chip { position: relative; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer;
  font: 600 13px/1 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8F877B }
.nm-reel-chip::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: #E9B97A; transform: scaleX(0); transition: transform .35s cubic-bezier(.2,.7,.2,1) }
html:not([data-nm-reel]) .nm-reel-chip[data-nm-chip="0"], html[data-nm-reel="0"] .nm-reel-chip[data-nm-chip="0"], html[data-nm-reel="1"] .nm-reel-chip[data-nm-chip="1"],
html[data-nm-reel="2"] .nm-reel-chip[data-nm-chip="2"], html[data-nm-reel="3"] .nm-reel-chip[data-nm-chip="3"] { color: #F3E9D6 }
html:not([data-nm-reel]) .nm-reel-chip[data-nm-chip="0"]::after, html[data-nm-reel="0"] .nm-reel-chip[data-nm-chip="0"]::after, html[data-nm-reel="1"] .nm-reel-chip[data-nm-chip="1"]::after,
html[data-nm-reel="2"] .nm-reel-chip[data-nm-chip="2"]::after, html[data-nm-reel="3"] .nm-reel-chip[data-nm-chip="3"]::after { transform: scaleX(1) }
.nm-reel-skip { background: transparent; color: #F3E9D6; border: 1px solid rgba(243,233,214,.45) }
.nm-reel-skip--first { margin-left: auto }
.nm-reel-skip:hover { background: rgba(243,233,214,.12) }
@media (max-width: 900px) {
  .nm-reel-panel { grid-template-columns: minmax(0,1fr) }
  .nm-reel-fan, .nm-reel-big { display: none }
  html[data-nm-motion="on"] .nm-reel { height: 260vh }
}
@media (max-width: 600px) {
  .ca-order-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px }
}

/* ---------------------------------------------------------------------------
 * Seasonal / holiday theme (2026-10). seasonal.js works out the theme and sets
 * --ca-season-* on <html>, then adds [data-ca-season] once the photo has
 * LOADED. Every rule below is gated on that attribute, so if seasonal.js is
 * missing, errors, or the photo 404s, nothing changes and the banner + card
 * stay hidden. Text comes from CSS content: so the script never writes into
 * an element the board's React tree owns. Placed BEFORE the responsive block
 * on purpose: the <=1180px "hide the tagline" rule must still win.
 * ------------------------------------------------------------------------- */
.ca-season-banner, .ca-season-card { display: none !important }
html[data-ca-season] .ca-season-banner { display: flex !important;
  background-image: linear-gradient(90deg, rgba(10,11,13,.94) 0%, rgba(10,11,13,.80) 38%, rgba(10,11,13,.25) 75%, rgba(10,11,13,.45) 100%), var(--ca-season-img) !important;
  background-size: cover !important; background-position: var(--ca-season-pos, center) !important }
html[data-ca-season] .ca-season-card { display: flex !important;
  background-image: linear-gradient(180deg, rgba(10,11,13,.05) 0%, rgba(10,11,13,.40) 45%, rgba(10,11,13,.94) 100%), var(--ca-season-img) !important;
  background-size: cover !important; background-position: var(--ca-season-pos, center) !important }
html[data-ca-season] .ca-hdr-tag { align-self: stretch; flex: 1 1 auto !important; line-height: 74px !important; padding: 0 28px !important; color: var(--h-F4F2EC) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,.75);
  background-image: linear-gradient(90deg, var(--h-0E0F12) 0%, rgba(14,15,18,.84) 30%, rgba(14,15,18,.40) 70%, var(--h-0E0F12) 100%), var(--ca-season-img) !important;
  background-size: cover !important; background-position: var(--ca-season-pos, center) !important }
.ca-season-name::after  { content: var(--ca-season-name, "") }
.ca-season-range::after { content: var(--ca-season-range, "") }
.ca-season-fxbtn::after { content: var(--ca-season-fx, "") }
.ca-season-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ca-season-accent, var(--h-91897B)); box-shadow: 0 0 8px var(--ca-season-accent, transparent) }
/* Boards that already have a title row (station, counting, shipping, calendar,
   stats, pre-production management) don't get a second banner -- the
   existing row takes the photo instead. NOT hidden by default: without the
   theme it is just the normal title row. The season chip is the row's own
   ::after, so no element is added. */
html[data-ca-season] .ca-season-row { position: relative; min-height: 84px; padding: 14px 22px !important; border: 1px solid var(--h-2A2C32); border-radius: 10px;
  background-image: linear-gradient(90deg, rgba(10,11,13,.94) 0%, rgba(10,11,13,.80) 40%, rgba(10,11,13,.30) 78%, rgba(10,11,13,.50) 100%), var(--ca-season-img) !important;
  background-size: cover !important; background-position: var(--ca-season-pos, center) !important }
html[data-ca-season] .ca-season-row--inset { margin: 18px var(--pad-x, 20px) 4px !important }
html[data-ca-season] .ca-season-row::after { content: var(--ca-season-name, "") "  \00B7  " var(--ca-season-range, ""); order: 99; flex-shrink: 0;
  font: 600 11px/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--h-F4F2EC); white-space: nowrap;
  background: rgba(10,11,13,.6); border: 1px solid rgba(255,255,255,.18); border-left: 3px solid var(--ca-season-accent, var(--h-91897B)); border-radius: 100px; padding: 8px 14px }
@media (max-width: 760px) { html[data-ca-season] .ca-season-row::after { display: none }
  /* Same for the banner's season badge: it is nowrap, so on a phone it squeezed
     the board title to ~28px and clipped it (index + pre-production, 10-05). */
  .ca-season-badge { display: none !important } }
@media print { .ca-season-fx, .ca-season-banner, .ca-season-card { display: none !important } }

/* ---------------------------------------------------------------------------
 * Responsive shell (2026-10-05). The 10-05 redesign gave every board a fixed
 * 220px logo block, a 220px sidebar and a one-row header, all as inline
 * styles. On a phone that made every page scroll sideways and cut off the
 * clock and the worker's name. The shell elements carry these classes so the
 * rules can live here once; !important is needed because the base styles are
 * inline. The sidebar also starts CLOSED under 900px when the worker has never
 * chosen (caSideClosed unset) -- see the sideOpen / onToggleSide expressions.
 *   .ca-hdr        the sticky header          .ca-hdr-logo   logo block
 *   .ca-hdr-tag    "QUALITY MERCH." tagline   .ca-hdr-right  right cluster
 *   .ca-hdr-clock  clock / date / live        .ca-hdr-name   worker name
 *   .ca-side       left sidebar               .ca-row-*      board rows (index)
 * ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .ca-hdr-tag { display: none !important }
}
/* 2026-11-23 (Anthony, screenshot at ~1270px: "it's going over the line"): the right cluster wrapped
   to a second row between 1024px and ~1440px -- Reload / Light-Dark cut off at the top, the Salesforce pill
   and the name hanging below the header rule. It now stays ONE row at every width: labels give way first
   (theme + reload to icons, then the name beside the avatar), and the tagline takes what is left. */
.ca-hdr-right { flex-wrap: nowrap !important; flex-shrink: 0 }
.ca-hdr-tag { min-width: 0 }
@media (max-width: 1500px) {
  .ca-theme-opt span, .ca-reload-btn span { display: none }
  .ca-theme-opt { padding: 0 9px } .ca-reload-btn { padding: 0 10px }
  .ca-hdr-right { gap: 10px !important }
}
@media (max-width: 1366px) {
  .ca-hdr-name { display: none !important }
}
/* Portrait tablets (761-900px): the logo block gives up its fixed 220px, so the one-row cluster fits
   (the Production Dashboard ran 8-28px wide there before 11-23). */
@media (max-width: 900px) {
  .ca-hdr-logo { width: auto !important }
  .ca-hdr-clock { padding-right: 12px !important }
}
@media (max-width: 1024px) {
  .ca-hdr-right { flex-wrap: nowrap !important; gap: 10px !important }
  .ca-hdr-name  { display: none !important }
}
@media (max-width: 760px) {
  .ca-hdr       { gap: 10px !important; padding-right: 12px !important }
  .ca-hdr-logo  { width: auto !important; padding: 0 12px !important }
  .ca-hdr-logo > div { display: none !important }   /* keep the mark, drop the wordmark */
  .ca-hdr-clock { display: none !important }
  .ca-hdr-right { min-width: 0; overflow: hidden }
  /* Sidebar floats over the page instead of squeezing it. */
  .ca-side {
    position: fixed !important; left: 0; top: 74px !important; bottom: 0;
    height: auto !important; z-index: 50;   /* under every drawer/modal (55-96), over page content (1-4) */
    box-shadow: 30px 0 60px -20px rgba(0,0,0,.8);
  }
}

/* Production board (index.html) rows -- same reason as above. */
@media (max-width: 1100px) {
  .ca-row-main { flex-direction: column !important; align-items: stretch !important }
  .ca-act      { width: 100% !important; position: static !important; max-height: none !important }
  .ca-row-kpi  { flex-wrap: wrap !important }
  .ca-row-kpi > * { flex: 1 1 calc(33.333% - 10px) !important }
  .ca-row-cols { grid-template-columns: repeat(2, minmax(0, 1fr)) !important }
}
@media (max-width: 760px) {
  .ca-row-kpi > * { flex: 1 1 calc(50% - 10px) !important }
  .ca-row-deco { flex: 1 1 100% !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 12px }
  .ca-row-deco > div { padding: 4px 6px !important; border-left: none !important }
  .ca-row-cols { grid-template-columns: minmax(0, 1fr) !important }
}

/* ---------------------------------------------------------------------------
 * Noble Made rebrand, stage 1: the shell (2026-11-17, Anthony).
 * The shop is now Noble Made; the app keeps its own name, The Forge.
 *
 * FONTS. Barlow Condensed replaces Oswald and Barlow replaces Archivo. The
 * boards name 'Oswald' and 'Archivo' inline hundreds of times (ca-api.js's
 * React styles too), so instead of rewriting every one, those two family
 * NAMES point at the Barlow files here. The pages no longer load Oswald or
 * Archivo from Google, so these are the only 'Oswald' / 'Archivo' the browser
 * has. Renaming the inline references is a mechanical follow-up.
 * ------------------------------------------------------------------------- */
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/barlowcondensed/v13/HTx3L3I-JCGChYJ8VI-L6OO_au7B6xHT2lv0tKk.woff2) format('woff2') }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 500; font-display: swap; src: url(https://fonts.gstatic.com/s/barlowcondensed/v13/HTxwL3I-JCGChYJ8VI-L6OO_au7B4-Lwz3bWuYMBYro.woff2) format('woff2') }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 600; font-display: swap; src: url(https://fonts.gstatic.com/s/barlowcondensed/v13/HTxwL3I-JCGChYJ8VI-L6OO_au7B4873z3bWuYMBYro.woff2) format('woff2') }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/barlowcondensed/v13/HTxwL3I-JCGChYJ8VI-L6OO_au7B46r2z3bWuYMBYro.woff2) format('woff2') }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v13/7cHpv4kjgoGqM7E_DMs5ynghnQ.woff2) format('woff2') }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v13/7cHqv4kjgoGqM7E3_-gs51ostz0rdg.woff2) format('woff2') }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v13/7cHqv4kjgoGqM7E30-8s51ostz0rdg.woff2) format('woff2') }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/barlow/v13/7cHqv4kjgoGqM7E3t-4s51ostz0rdg.woff2) format('woff2') }

/* Header band: Coal with a heritage-red rule; the logo block is Crimson. */
.ca-hdr { background: var(--brand-coal) !important; border-bottom-color: var(--brand-heritage) !important }
.ca-hdr-logo { background: var(--brand-crimson) !important; border-right-color: var(--h-6A2430) !important; gap: 10px !important }

/* Noble Made monogram and wordmark: the logo files in /brand used as masks, so
   one file can be any brand colour. Each page sets the mark's size inline. */
.nm-mark { display: inline-block; flex-shrink: 0; background: var(--brand-suede-lt);
  -webkit-mask: url(/brand/nm-monogram-gold.png) center / contain no-repeat;
          mask: url(/brand/nm-monogram-gold.png) center / contain no-repeat }
.nm-wordmark { display: inline-block; width: 60px; height: 13px; background: var(--brand-suede-lt);
  -webkit-mask: url(/brand/nm-horizontal-dark-maroon.png) center / contain no-repeat;
          mask: url(/brand/nm-horizontal-dark-maroon.png) center / contain no-repeat }
.nm-by { display: flex !important; align-items: center; justify-content: center; gap: 5px;
  font-family: 'Barlow', 'Archivo', sans-serif !important; color: var(--h-E4D6BE) !important; margin-top: 6px !important }

/* The Forge wordmark keeps its shape; its colours follow the brand. */
.nm-mark:not(.nm-mark--ink) + div svg[aria-label="The Forge"] g { fill: var(--brand-canvas) }
.nm-mark:not(.nm-mark--ink) + div svg[aria-label="The Forge"] rect { fill: var(--brand-suede-lt) }

/* On paper (the order sheet): heritage red on white. */
.nm-mark--ink, .nm-mark--ink + div .nm-wordmark { background: var(--brand-heritage) }
.nm-mark--ink + div .nm-by { color: var(--h-5E574B) !important }
.nm-mark--ink + div svg[aria-label="The Forge"] rect { fill: var(--brand-heritage) }
@media print { .nm-mark, .nm-wordmark { -webkit-print-color-adjust: exact; print-color-adjust: exact } }

/* Sidebar: Crimson, with a suede marker and a heritage fill on the active board. */
.ca-side { background: var(--brand-crimson) !important; border-right-color: var(--h-3E141B) !important }
.ca-side > div { border-top-color: var(--h-6A2430) !important }
.ca-side nav a { background: transparent !important }   /* the board list sits on the crimson, not in dark boxes */
.ca-side nav a:hover { background: var(--h-6A2430) !important }
.ca-side nav a:has(> span:first-child:not(:last-child)) { background: var(--brand-heritage) !important }
.ca-side nav a > span:first-child:not(:last-child) { background: var(--brand-suede-lt) !important }
.ca-side .ti-shield-half-filled { color: var(--brand-suede-lt) !important }

/* ---------------------------------------------------------------------------
 * Noble Made rebrand, stage 3: the real light theme and Noble Made type
 * (2026-11-19, Anthony: "keep all of that and build it into the forge's styles").
 *
 * Replaces stage 2's invert-the-whole-page filter. Every inline colour on the
 * boards is now var(--h-XXXXXX), defined in palette.css (GENERATED by
 * tools/palette-gen.py): dark keeps each colour exactly as it was written;
 * light gives it its Noble Made value -- cream paper, coal ink, burgundy and
 * gold, every status colour at the same hue in a shade that reads on cream.
 * No filter any more, so photos and mockups always show as they are.
 *
 * theme.js: light is the default, except the floor stations (station.html,
 * counting.html), which default dark. Each device keeps its own choice.
 * ------------------------------------------------------------------------- */
:root { --nm-accent: #D46A7B; color-scheme: dark }
html[data-theme="light"] { --nm-accent: var(--brand-heritage); color-scheme: light }

/* Type: DM Sans to read, Barlow Condensed for labels (still spelled 'Oswald'
   inline, see stage 1), Playfair Display for board titles, names and big
   figures. The boards spell 'Archivo' inline hundreds of times; the attribute
   rule moves every one of them to DM Sans without touching the markup. */
body { font-family: 'DM Sans', system-ui, sans-serif }
[style*="Archivo"] { font-family: 'DM Sans', system-ui, sans-serif !important }
.nm-title { font-family: 'Playfair Display', Georgia, serif !important; font-weight: 400 !important; text-transform: none !important;
  letter-spacing: 0 !important; font-size: clamp(26px, 2.6vw, 34px) !important; line-height: 1.05 !important }
.nm-title em, .nm-em { font-style: italic; color: var(--nm-accent) }
.nm-figure { font-family: 'Playfair Display', Georgia, serif !important; font-weight: 400 !important; letter-spacing: 0 !important }
.nm-name { font-family: 'Playfair Display', Georgia, serif !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important }

/* Light shell: a cream header with the heritage rule, a paper sidebar with a
   burgundy marker. The logo block stays crimson in both. */
html[data-theme="light"] .ca-hdr { background: #F3E7D2 !important }
html[data-theme="light"] .ca-side { background: #F1E4CD !important; border-right-color: #DCCDB3 !important }
html[data-theme="light"] .ca-side > div { border-top-color: #DCCDB3 !important }
html[data-theme="light"] .ca-side nav a:hover { background: #E8D8BC !important }
html[data-theme="light"] .ca-side nav a:has(> span:first-child:not(:last-child)) { background: #E6D3B3 !important }
html[data-theme="light"] .ca-side nav a > span:first-child:not(:last-child) { background: var(--brand-heritage) !important }
html[data-theme="light"] .ca-side .ti-shield-half-filled { color: var(--brand-heritage) !important }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #D8CAB2 }
/* Seasonal photo rows in light: a cream wash over the photo instead of a dark
   one, so the (now coal) text on them still reads. */
html[data-theme="light"][data-ca-season] :is(.ca-season-banner, .ca-season-row) {
  background-image: linear-gradient(90deg, rgba(246,236,218,.96) 0%, rgba(246,236,218,.86) 40%, rgba(246,236,218,.35) 78%, rgba(246,236,218,.55) 100%), var(--ca-season-img) !important }
html[data-theme="light"][data-ca-season] .ca-season-card {
  background-image: linear-gradient(180deg, rgba(246,236,218,.05) 0%, rgba(246,236,218,.55) 45%, rgba(246,236,218,.96) 100%), var(--ca-season-img) !important }
html[data-theme="light"][data-ca-season] .ca-hdr-tag { text-shadow: none;
  background-image: linear-gradient(90deg, #F3E7D2 0%, rgba(243,231,210,.84) 30%, rgba(243,231,210,.40) 70%, #F3E7D2 100%), var(--ca-season-img) !important }
html[data-theme="light"][data-ca-season] .ca-season-row::after { background: rgba(251,246,236,.85); border-color: rgba(30,32,31,.18) }
html[data-theme="light"] .ca-season-badge { background: rgba(251,246,236,.85) !important; border-color: rgba(30,32,31,.18) !important }

/* The light / dark switch in the header. */
.ca-theme-btn { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 100px;
  background: var(--h-161716); border: 1px solid var(--h-34362F); cursor: pointer; flex-shrink: 0 }
.ca-theme-opt { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 100px;
  font: 700 11px/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--h-CFC5B2); white-space: nowrap }
.ca-theme-opt .ti { font-size: 14px }
html:not([data-theme="light"]) .ca-theme-opt--dark,
html[data-theme="light"] .ca-theme-opt--light { background: var(--brand-canvas); color: var(--brand-coal) }
@media (max-width: 1180px) { .ca-theme-opt span { display: none } .ca-theme-opt { padding: 0 9px } }

/* 2026-11-19: Reload button in the header (theme.js handles the click). Hidden in a browser tab, which
   has its own reload; shown when the Forge runs as an installed app (manifest "display":"standalone").
   A teal dot appears once a newer build is out (ca-api.js sets html[data-ca-update="ready"]). */
.ca-reload-btn { display: none; position: relative; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 100px;
  background: var(--h-161716); border: 1px solid var(--h-34362F); color: var(--h-CFC5B2); cursor: pointer; flex-shrink: 0;
  font: 700 11px/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap }
.ca-reload-btn .ti { font-size: 15px }
.ca-reload-btn:hover { border-color: var(--h-5E9B9A); color: var(--h-CFF3F1) }
@media (display-mode: standalone), (display-mode: minimal-ui), (display-mode: window-controls-overlay), (display-mode: fullscreen) {
  .ca-reload-btn { display: inline-flex }
}
html[data-ca-standalone] .ca-reload-btn { display: inline-flex }
html[data-ca-update="ready"] .ca-reload-btn { border-color: var(--h-5E9B9A); color: var(--h-CFF3F1) }
html[data-ca-update="ready"] .ca-reload-btn::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--h-5EC9C4); box-shadow: 0 0 6px var(--h-5EC9C4) }
@media (max-width: 1180px) { .ca-reload-btn span { display: none } .ca-reload-btn { padding: 0 10px } }
