/* =============================================================================
   Motion — the behaviour layer.

   The vocabulary (durations, easings, distances) lives in design-system.css
   with the other tokens; this file is the sentences. It is registered LAST in
   the wp_enqueue_scripts loop in ntc-port.php, after every section stylesheet,
   because the hover system below has to outrank the base component rules it
   extends without resorting to !important.

   Four behaviours, and deliberately only four — see
   docs/sdlc/design/specs/motion-reference-analysis.md section 5.2:

     1. Section reveal      rise + fade, ~80ms stagger, fires once at top 60%
     2. Split-word reveal   the Anton display headings only
     3. Media parallax      .ntc-panel images only, scrub 0.25
     4. Hover               one system at --motion-fast

   Plus the data-section-theme observer (5.3), which is state, not motion, and
   since issue #15 the compact masthead that consumes it — a fixed 64px bar
   that enters once the resting masthead has scrolled away and re-colours to
   whatever ground is under it. Its rules are section 6 at the bottom of this
   file; its threshold and its show/hide class are in animations.js.

   ---------------------------------------------------------------------------
   THE OXYGEN opacity: 1 -> 0.01 COMPILE BUG

   CLAUDE.md records this hitting ~13 selectors on the sibling project: a
   state-toggled element compiles to opacity: 0.01 in the generated
   uploads/oxygen/css/selectors.css and renders invisible. A reveal animation is
   exactly that shape, so NOTHING here is authored through the builder. Every
   start state is a rule in this file, gated on the html.ntc-motion class that
   animations.js adds, and removed by GSAP or by dropping that class. Oxygen has
   no opinion about any of it and nothing lands in selectors.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   The single source of truth for what animates.

   animations.js reads these two selector lists back off :root with
   getComputedStyle rather than carrying its own copy. That is not cleverness
   for its own sake: the CSS below pre-hides these elements before first paint,
   and if the JS list ever drifted from the CSS list the difference would be
   content that is hidden and never revealed. Single-sourcing makes that
   impossible, and it fails safe — if this stylesheet does not load, the
   properties are empty, so JS animates nothing AND nothing was hidden.

   Reveal targets are section BLOCKS, never individual rows or cells: the
   ladder, fixtures, results and squad tables use fixed-width slots and a
   transform on one cell would break the lane. Staggering whole blocks cannot.

   The hero is deliberately absent. It is the one section that is already on
   screen at load, and pre-hiding it would hold back the largest image on the
   page until JS runs — a self-inflicted LCP regression for a reveal nobody
   would see. It still gets parallax on its media.
   -------------------------------------------------------------------------- */
:root {
  --ntc-reveal-selector: ".ntc-sec__inner > *:not(.ntc-sechead), .ntc-sechead__lead > *, .ntc-sechead > .ntc-eyebrow, .ntc-sechead > .ntc-sechead__aside, .ntc-sechead > .ntc-sechead__link, .ntc-sechead > .ntc-sechead__note";
  --ntc-split-selector: ".ntc-sechead__title, .ntc-bigtitle, .ntc-statement__line, .ntc-sec h1";
}

/* --- 1 + 2. Reveal start states -------------------------------------------
   Applied only under html.ntc-motion, which animations.js adds in <head>
   before the body is parsed — so the start state is live at first paint and
   there is no flash of the final state. If GSAP fails to load, if the visitor
   asks for reduced motion, or if init throws, the class is never added or is
   removed again and every one of these rules evaporates.

   opacity and transform only. Neither affects layout, so reveals contribute
   nothing to CLS. */
html.ntc-motion .ntc-sec__inner > *:not(.ntc-sechead),
html.ntc-motion .ntc-sechead__lead > *,
html.ntc-motion .ntc-sechead > .ntc-eyebrow,
html.ntc-motion .ntc-sechead > .ntc-sechead__aside,
html.ntc-motion .ntc-sechead > .ntc-sechead__link,
html.ntc-motion .ntc-sechead > .ntc-sechead__note,
html.ntc-motion .ntc-sechead__title,
html.ntc-motion .ntc-bigtitle,
html.ntc-motion .ntc-statement__line,
html.ntc-motion .ntc-sec h1 {
  opacity: 0;
}

/* --- 2. Split words -------------------------------------------------------
   animations.js rewrites a display heading's text into one span per word, with
   real space text nodes between them so the heading still reads correctly to a
   screen reader and still wraps between words. inline-block is what makes a
   transform apply at all; the rest is inherited.

   No overflow mask. A mask reads well on most faces, but Anton at -0.04em with
   a 197px cap height puts real ink outside the line box, and clipping it looks
   like a rendering fault rather than a reveal. */
.ntc-word {
  display: inline-block;
}

/* --- 3. Media parallax ----------------------------------------------------
   .ntc-panel already clips (overflow: hidden), which is what makes the travel
   possible: animations.js scales the image just enough to cover +/- the travel
   distance, so the panel's ground never shows through at the top or bottom of
   the stroke. Images only — never text, never a data row.
   -------------------------------------------------------------------------- */
html.ntc-motion .ntc-panel > .ntc-panel__img {
  will-change: transform;
}

/* --- 4. Hover -------------------------------------------------------------
   One system, at --motion-fast, rather than a transition per component. This
   is pure CSS on purpose: it needs no JavaScript, and because the duration is
   a token it already collapses to 0.01ms under reduced motion without a second
   code path.

   There were no :hover rules anywhere in the project before this file, so
   these are the site's hover states as well as its hover timing. They invent
   no colour: every value is either an existing token or the component's own
   :active colour, which keeps the contrast decisions recorded in
   design-system.css intact.
   -------------------------------------------------------------------------- */
.ntc-btn,
.ntc-chip,
.ntc-tile,
.ntc-squad__card,
.ntc-partners__link,
.ntc-partners__logo {
  transition:
    background-color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

/* Buttons take their pressed colour and do NOT lift: the Terrace spec (#67)
   removed the 2px lift because it moves the target under the cursor on its way
   to a click. A press scales to 0.97 over 80ms instead (#76). */
.ntc-btn:hover { background: var(--color-accent-press); }
.ntc-btn:active { transform: scale(.97); transition-duration: 80ms; }

.ntc-btn--ghost:hover { background: transparent; border-color: var(--color-white); }
.ntc-btn--secondary:hover { background: var(--color-secondary-dim); }

/* On bone the filled button is ink, not a dimmed accent — the rule in
   design-system.css. Hover has to respect that or the olive button nobody
   designed comes back on hover only. */
.ntc-on-light .ntc-btn:hover { background: var(--color-ink-raised); }
.ntc-on-light .ntc-btn--ghost:hover { background: transparent; border-color: var(--color-ink); }

/* Chips preview the selected state's border without committing its fill. */
.ntc-chip:hover { border-color: var(--color-accent); color: var(--color-white); }
.ntc-on-light .ntc-chip:hover { border-color: var(--color-ink); color: var(--color-text-on-light); }
.ntc-chip.is-selected:hover { border-color: var(--color-accent); }
.ntc-on-light .ntc-chip.is-selected:hover { border-color: var(--color-ink); }

/* Cards and tiles lift. 2px, not 8 — this design is hard-edged and square, and
   a card that floats reads as a different design system. (2025 cards only; the
   Terrace news card below does not move, its photo does.) */
.ntc-squad__card:hover { transform: translateY(-2px); }

/* Terrace card hover (#76): the headline turns accent over 160ms and the photo
   scales 1.03 over 400ms, on pointer devices only. The clip-path holds the
   photo inside its own box while it grows: 1.5% / 1.03 = 1.456% each side. */
@media (hover: hover) {
  .ntc-ncard__title { transition: color 160ms var(--ease-out); }
  .ntc-ncard__media::after { transition: transform 240ms cubic-bezier(.2, 0, 0, 1); }
  .ntc-ncard__img { transition: transform 400ms cubic-bezier(.2, 0, 0, 1), clip-path 400ms cubic-bezier(.2, 0, 0, 1); }
  .ntc-ncard__link:hover .ntc-ncard__title { color: var(--color-accent); }
  /* The shop card takes the same hover as the news card (#61). */
  .ntc-pgrid__name { transition: color 160ms var(--ease-out); }
  .ntc-pgrid__tile .ntc-tile__img { transition: transform 400ms cubic-bezier(.2, 0, 0, 1); }
  .ntc-pgrid__link:hover .ntc-pgrid__name { color: var(--color-accent); }
  .ntc-pgrid__link:hover .ntc-tile__img { transform: scale(1.03); }
  .ntc-ncard__link:hover .ntc-ncard__media::after { transform: scaleX(1); }
  .ntc-ncard__link:hover .ntc-ncard__img { transform: scale(1.03); clip-path: inset(1.456%); }
}

/* Nav link hover (#76): a 3px underline grows from the left, scaleX 0 to 1
   over 160ms. The current page keeps its static border instead. */
html .ntc-navlink { position: relative; }
html .ntc-navlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms cubic-bezier(.2, 0, 0, 1);
}
html .ntc-navlink:hover::after { transform: scaleX(1); }
html .ntc-navlink[aria-current="page"]::after { display: none; }

/* Menu popover (#76): in with opacity and translateY(-16px) over 240ms through
   @starting-style; out in 160ms, opacity only. display and overlay transition
   discretely so the closing fade is seen at all. Browsers without
   @starting-style open it instantly, as before. */
html .ntc-menu {
  opacity: 0;
  transition: opacity 160ms linear, display 160ms allow-discrete, overlay 160ms allow-discrete;
}
html .ntc-menu:popover-open {
  opacity: 1;
  transform: none;
  transition: opacity 240ms cubic-bezier(.2, 0, 0, 1), transform 240ms cubic-bezier(.2, 0, 0, 1),
              display 240ms allow-discrete, overlay 240ms allow-discrete;
}
@starting-style {
  html .ntc-menu:popover-open { opacity: 0; transform: translateY(-16px); }
}

/* --- On load (#76) ---------------------------------------------------------
   Hero settle: the photo scales 1.06 to 1 over 1400ms, once, from 768 up
   (phones skip it, M10). Scoreboard strip: each cell rolls up through its own
   box, 480ms, 80ms apart, from 200ms. Both wait for the session opening:
   while html.ntc-intro-on is set they hold their first frame, and they start
   when intro.php removes the class, so they are seen rather than played under
   the curtain. Neither is the LCP (the hero headline is), and both are
   transform and clip-path only. */
@keyframes ntc-fx-settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes ntc-fx-rollin {
  from { transform: translateY(100%); clip-path: inset(0 0 100% 0); }
  to   { transform: none; clip-path: inset(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .ntc-scoreboard__cell { animation: ntc-fx-rollin 480ms cubic-bezier(.2, 0, 0, 1) 200ms both; }
  .ntc-scoreboard__cell:nth-child(2) { animation-delay: 280ms; }
  .ntc-scoreboard__cell:nth-child(3) { animation-delay: 360ms; }
  .ntc-scoreboard__cell:nth-child(4) { animation-delay: 440ms; }
  html.ntc-intro-on .ntc-scoreboard__cell { animation-play-state: paused; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .ntc-lhero { overflow: clip; }
  .ntc-lhero__img { animation: ntc-fx-settle 1400ms cubic-bezier(.2, 0, 0, 1) both; }
  html.ntc-intro-on .ntc-lhero__img { animation-play-state: paused; }
}

/* The arrival zoom (#100) starts the hero headline far bigger than the
   screen; the hero clips it at every width, so a phone never scrolls sideways.
   html.ntc-hero-deep is put on by the inline script after the headline in
   landing.php, before the first paint, and taken off by animations.js once
   its tweens own the same values (or by the script's own fallback). */
html.ntc-motion .ntc-lhero,
html.ntc-hero-deep .ntc-lhero { overflow: clip; }
html.ntc-hero-deep .ntc-lhero { --ntc-hero-shade: 0.12; }
html.ntc-hero-deep .ntc-lhero__title {
  transform-origin: var(--ntc-hero-ox) var(--ntc-hero-oy);
  transform: scale(var(--ntc-hero-deep));
}
html.ntc-hero-deep .ntc-lhero__place,
html.ntc-hero-deep .ntc-lhero .ntc-scoreboard { opacity: 0; }

/* Floodlights (#98): animations.js adds .is-lit to the gold hero line,
   after the arrival zoom, for one 1400ms sweep of a light band across it, then removes it. Only applied
   where text can take a background; the class is never set anywhere else. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  html.ntc-motion .ntc-lhero__line--gold.is-lit {
    background-image: linear-gradient(100deg,
      var(--color-accent-base) 0 40%, #fff3b0 46%, #ffffff 50%, #fff3b0 54%, var(--color-accent-base) 60% 100%);
    background-size: 220% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Form sent (#76): the confirmation fades in over 240ms with no travel. It
   arrives with the page after the POST, so this runs on load. */
@keyframes ntc-fx-fade { from { opacity: 0; } to { opacity: 1; } }
.ntc-form__flash { animation: ntc-fx-fade 240ms cubic-bezier(.2, 0, 0, 1) both; }

/* Countdown digit roll (#76, the scoreboard signature): countdown.js replays
   this on a value whenever it changes. Same roll as the strip, 360ms (280ms
   on a phone). countdown.js checks reduced motion itself as well. */
.ntc-countdown__value.is-rolling { animation: ntc-fx-rollin 360ms cubic-bezier(.2, 0, 0, 1); }
/* The scoreboard (#58): a cell whose text changes rolls 400ms, one at a time. */
.ntc-scoreboard__cell.is-rolling { animation: ntc-fx-rollin 400ms cubic-bezier(.2, 0, 0, 1) 0ms; }
@media (max-width: 767px) {
  .ntc-countdown__value.is-rolling { animation-duration: 280ms; }
}

/* Partner logos are the real supplied assets and are the one place on the site
   where the brand is somebody else's, so they get the quietest hover there is. */
.ntc-partners__link:hover .ntc-partners__logo { opacity: 0.7; }

/* Text links: a rule that grows from the left rather than a colour change.
   currentColor means it is correct on ink, on purple and on bone without
   knowing which ground it is over — which matters for the masthead nav, whose
   bone ground is painted by the Oxygen header and carries no .ntc-on-light, so
   var(--color-accent) there would resolve to the raw gold at 1.72:1. */
.ntc-masthead__navlink,
.ntc-masthead-compact__navlink,
.ntc-sechead__link,
.ntc-partners__cta,
.ntc-alertbar__cta {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size var(--motion-fast) var(--ease-out);
}

.ntc-masthead__navlink:hover,
.ntc-masthead-compact__navlink:hover,
.ntc-sechead__link:hover,
.ntc-partners__cta:hover,
.ntc-alertbar__cta:hover { background-size: 100% 1px; }

/* Keyboard parity: everything above is reachable by tab, and a hover-only
   affordance is invisible to anyone who never touches a mouse.

   Two rules rather than one, because outline-offset draws the ring 3px CLEAR
   of the element — it paints on the ground behind the control, never on the
   control. For a link, `color` is already chosen against that same ground, so
   currentColor is contrast-correct by construction on ink, on purple and on
   bone, and stays correct on any ground added later. The masthead nav is
   exactly why it has to be: its bone ground is painted by the Oxygen header
   and carries no .ntc-on-light, so the accent token is never remapped there
   and var(--color-accent) painted the raw gold at 1.72:1 — a WCAG 2.2 1.4.11
   failure (3:1 minimum) on the one affordance only keyboard users ever see.
   The underline twenty lines above already used currentColor for this reason;
   the outline simply did not carry it. */
/* THE BASE RULE IS A LIST OF ELEMENTS, NOT A LIST OF COMPONENTS — issue #28.

   This started as the six component classes below and that was the bug. A
   sweep of every focusable element on all nine routes at 1440 and 390 (#28)
   found NINE more still on the browser's default ring, three of them
   effectively invisible: the computed `outline-color` of Chrome's `auto` ring
   is #101010, which is 1.01:1 on the ink footer (`.ntc-sitefooter__link` and
   any bare `<a>`) and 1.03:1 on the raised news lead (`.ntc-newslead__link`).
   That is worse than the 1.72:1 the PR #16 split was written to fix.

   Enumerating components is what let that happen: a component added later
   gets no ring and nothing says so. Keying off the ELEMENT closes the class of
   defect instead of the instances, and it is the same move `html a { color:
   var(--color-link); }` already makes for link colour (#21).

   `html` is on the front for the same reason it is there: it lifts the rule
   over Oxygen's `global-settings.css`, which loads after every mu-plugin
   sheet, while still losing to any class-based rule in `selectors.css`.

   currentColor is correct here BY CONSTRUCTION, and the reasoning is PR #16's:
   `outline-offset` draws the ring clear of the element, so it paints on the
   ground BEHIND — and a link's own `color` is already chosen against that same
   ground. It stays correct on ink, on raised, on black, on purple and on bone,
   and on any ground added later. The wrapper links that declare `color:
   inherit` (`.ntc-ncard__link`, `.ntc-pgrid__link`,
   `.ntc-masthead__wordmark` — CLAUDE.md) inherit the section's text colour,
   which is chosen against that ground too, so they self-correct as well.

   The filled-control exception is the next rule and MUST stay: it is (0,2,0)
   against this rule's (0,1,2), so it still wins.

   DO NOT write this as `html a:not(.oxy-skip-link):focus-visible`. `:not()`
   contributes the specificity of its argument, so that spelling is (0,2,2) —
   which BEATS `.ntc-btn:focus-visible` at (0,2,0) and hands every filled
   button a currentColor ring. Measured when it was written that way: .ntc-btn
   1.05:1 on ink and 1.00:1 on bone, i.e. exactly the invisible-ring failure
   the split below exists to prevent. The skip link gets its own rule instead,
   further down, which is the shape that does not disturb anything else. */
html a:focus-visible,
html button:focus-visible,
html input:focus-visible,
html select:focus-visible,
html textarea:focus-visible,
html summary:focus-visible,
html [tabindex]:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

/* Kept explicitly rather than folded into the rule above. These six are the
   ones PR #16 measured one by one, and naming them documents that they were
   deliberate rather than swept up. Same declaration, so no override. */
.ntc-masthead__navlink:focus-visible,
.ntc-sechead__link:focus-visible,
.ntc-partners__cta:focus-visible,
.ntc-alertbar__cta:focus-visible,
.ntc-ncard__link:focus-visible,
.ntc-partners__link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

/* A filled control is the opposite case and must NOT take currentColor: its
   `color` is the colour of type sitting ON the fill, so currentColor would put
   an ink ring on the ink ground behind a gold button, and a bone ring on bone
   behind an ink one — both invisible. The accent token is the right ring here
   precisely because it IS remapped: gold on ink, accent-dim on bone through
   .ntc-on-light. Neither .ntc-btn nor .ntc-chip appears on the masthead, which
   is the one light ground outside that mechanism. */
.ntc-btn:focus-visible,
.ntc-chip:focus-visible,
/* The gallery dot belongs with the filled controls, not the links. It is an
   8px target whose own colour describes its border rather than its ground,
   and it sits on a translucent ink panel over photography — so the ring has
   to be a known-contrasting token rather than whatever currentColor happens
   to be. The accent is remapped by .ntc-on-light like the others. */
.ntc-gallery__dot:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

/* Oxygen's skip link keeps ITS OWN focus treatment, and this is measured, not
   deference. Focused, it paints an opaque white 239x62 box on the ink page:
   its text is #111827 on white at 17.74:1, and the panel appearing out of
   nowhere IS the focus indication. Our ring made it worse — `outline-offset`
   draws 3px OUTSIDE that white box, so currentColor put #111827 into a 3px gap
   on the #0E0E0E page at 1.09:1, replacing the browser's adaptive ring with a
   fixed dark one. `revert` hands it back to Oxygen's stylesheet and the UA.
   (0,2,0), so it clears the base rule's (0,1,2) without touching anything
   else. */
html a.oxy-skip-link:focus-visible {
  outline: revert;
  outline-offset: revert;
}

.ntc-masthead__navlink:focus-visible,
.ntc-masthead-compact__navlink:focus-visible,
.ntc-sechead__link:focus-visible,
.ntc-partners__cta:focus-visible,
.ntc-alertbar__cta:focus-visible { background-size: 100% 1px; }

/* --- 5. data-section-theme ------------------------------------------------
   animations.js writes the ground currently under the top of the viewport onto
   <html> as data-section-ground (the literal ground name) and data-section-theme
   ("light" or "dark"). It is state, not motion, so it runs even under reduced
   motion — the consumer's transition is token-driven and collapses on its own.

   NTC has three grounds where the reference had two, so the useful attribute
   is the ground name; "light"/"dark" is the convenience roll-up. These two
   custom properties are the ready-made contract for any chrome that needs to
   re-colour as the page moves under it.
   -------------------------------------------------------------------------- */
:root[data-section-theme] {
  --ntc-theme-bg: var(--color-ink);
  --ntc-theme-fg: var(--color-white);
  --ntc-theme-accent: var(--color-accent-base);
}

/* The three dark grounds that are NOT the default ink. Until issue #15 the
   mechanism had no consumer, so every dark ground could safely collapse onto
   the ink base above; a bar that PAINTS --ntc-theme-bg cannot, because the
   value is what makes it invisible against the section it is over. Ink under a
   #141414 raised band or a #000000 article hero is a seam, not a match.

   Gold is never remapped on any of them. On secondary in particular
   --color-accent-dim #946100 is only 3.02:1 against #301934, so the "light"
   remap below must never be allowed to reach it. Measured on the base gold:
   9.46:1 on raised, 10.78:1 on black, 8.20:1 on secondary. */
:root[data-section-ground="raised"] {
  --ntc-theme-bg: var(--color-ink-raised);
  --ntc-theme-fg: var(--color-white);
  --ntc-theme-accent: var(--color-accent-base);
}

:root[data-section-ground="black"] {
  --ntc-theme-bg: var(--color-black);
  --ntc-theme-fg: var(--color-white);
  --ntc-theme-accent: var(--color-accent-base);
}

:root[data-section-ground="secondary"] {
  --ntc-theme-bg: var(--color-secondary);
  --ntc-theme-fg: var(--color-white);
  --ntc-theme-accent: var(--color-accent-base);
}

:root[data-section-theme="light"] {
  --ntc-theme-bg: var(--color-bone);
  --ntc-theme-fg: var(--color-text-on-light);
  --ntc-theme-accent: var(--color-accent-dim);
}

/* Gold (the Terrace bands on Home, Matches and Shop) is a LIGHT ground with
   its own fill. It has to come after the light rule above, which it refines:
   ink type and an ink rule on gold, never gold on gold. Ink on #FFBC01 is
   11.6:1. Until #61 the observer did not know this ground, so the compact bar
   painted ink over every gold band. */
:root[data-section-ground="gold"] {
  --ntc-theme-bg: var(--color-accent-base);
  --ntc-theme-fg: var(--color-ink);
  --ntc-theme-accent: var(--color-ink);
}

/* --- 6. The compact masthead (issue #15) ----------------------------------
   THE CONSUMER THE OBSERVER ABOVE HAS BEEN WAITING FOR.

   A separate fixed element, not a transformation of the resting masthead: the
   resting one stays in flow and scrolls away, and this appears once it has.
   Its markup is built into the ntc-header template by
   tools/provision-templates.php, which declares each class in a <style> block
   because html-to-page silently drops a class no rule defines. Every rule that
   MATTERS is here, `html`-prefixed at 0,1,1 so it outranks the 0,1,0 copies
   Oxygen writes into selectors.css from that block.

   The colours are the three custom properties published above and nothing else
   — deliberately no muted text, because --color-text-muted is 3.61:1 on bone
   and 3.92:1 on secondary and would fail on two of the five grounds.

   THE 2px BOTTOM BORDER IS LOAD-BEARING, not trim. The bar paints
   --ntc-theme-bg, which is BY DEFINITION the colour of the section underneath
   it, so with no border the bar is invisible against its own ground. Every
   value --ntc-theme-accent can take clears the 3:1 non-text threshold: 9.91:1
   on ink, 9.46 on raised, 10.78 on black, 8.20 on secondary, and 4.68 for
   --color-accent-dim on bone.

   THE ADMIN-BAR OFFSET IS NOT OPTIONAL. Without it the bar slides under the
   WordPress admin bar for every logged-in user — correct to a logged-out
   reviewer and broken to the client, who is logged in. The variable resolves
   to 0px for visitors, so it is safe everywhere.

   z-index 100 sits far below ntc-port/review-notice.php's 2147483000. They
   occupy opposite edges of the viewport and must not be given competing
   stacking values.

   The hidden state is NOT gated on html.ntc-motion, unlike the reveals above.
   That rule exists so content is never hidden when the engine is not running;
   this bar is not content — it is a duplicate of navigation that is already on
   the page in full, and an overlay that appeared with no way to dismiss it
   would be the failure, not its absence. No JS, no GSAP, an exception in init:
   every one of those leaves the resting masthead doing its job.
   -------------------------------------------------------------------------- */
html .ntc-masthead-compact {
  position: fixed;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 0px);
  left: 0;
  right: 0;
  z-index: 100;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding-inline: 20px;
  background-color: var(--ntc-theme-bg, var(--color-ink));
  border-bottom: 2px solid var(--ntc-theme-accent, var(--color-accent-base));

  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-in-out),
    border-color var(--motion-fast) var(--ease-in-out),
    color var(--motion-fast) var(--ease-in-out),
    visibility 0s linear var(--motion-fast);
}

/* visibility, not just opacity: a bar parked off-screen at opacity 0 is still
   in the tab order, so a keyboard visitor at the top of the page would tab into
   four links they cannot see. The delay on the way out is what lets the exit
   transition finish before it leaves the tree; on the way in it is immediate.

   Both states restate the whole transition list rather than sharing it, because
   the visibility timing is the one property that differs between them. */
html .ntc-masthead-compact.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-in-out),
    border-color var(--motion-fast) var(--ease-in-out),
    color var(--motion-fast) var(--ease-in-out),
    visibility 0s;
}

/* THE BRAND, issue #64. The 2026 Terrace bar carries the 5th-anniversary badge
   and the name in Anton, the same lockup as the resting masthead, in place of
   the #27 wordmark image. The badge is a raster with its own navy keyline, so
   it reads on all five grounds and is never recoloured; the name takes
   --ntc-theme-fg like the links. */
html .ntc-masthead-compact__wordmark, html .ntc-masthead-compact__wordmark:hover {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  color: var(--ntc-theme-fg, var(--color-white));
  text-decoration: none;
}

html .ntc-masthead-compact__badge { display: block; width: 44px; height: auto; }

html .ntc-masthead-compact__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

html .ntc-masthead-compact__nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

html .ntc-masthead-compact__navlink, html .ntc-masthead-compact__navlink:hover {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  justify-content: center;
  padding-top: 3px;
  border-bottom: 3px solid transparent;
  color: var(--ntc-theme-fg, var(--color-white));
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

html .ntc-masthead-compact__navlink[aria-current="page"] {
  border-bottom-color: var(--ntc-theme-accent, var(--color-accent-base));
}

html .ntc-masthead-compact__actions { display: flex; align-items: center; gap: 12px; }
html .ntc-masthead-compact__actions .ntc-btn { min-height: var(--tap-min); padding-inline: 20px; }
html .ntc-masthead-compact__menu { display: none; }

/* On a light ground the gold Join button would be gold on bone, which the
   design never allows; it goes navy, the same rule as .ntc-on-light .ntc-btn,
   and the outlined Menu follows the theme colour. */
html[data-section-theme="light"] .ntc-masthead-compact__join, html[data-section-theme="light"] .ntc-masthead-compact__join:hover {
  background: var(--color-ink);
  color: var(--color-bone);
}

html .ntc-masthead-compact__menu {
  border-color: var(--ntc-theme-fg, var(--color-white));
  color: var(--ntc-theme-fg, var(--color-white));
}

/* The focus ring here is the accent token, not currentColor. currentColor is
   right for a link whose own colour was chosen against a KNOWN ground; this
   bar's ground changes under it, and the accent is the one role already proved
   against all five (see the contrast note above). */
html .ntc-masthead-compact__wordmark:focus-visible,
html .ntc-masthead-compact__navlink:focus-visible,
html .ntc-masthead-compact__actions .ntc-btn:focus-visible {
  outline: 3px solid var(--ntc-theme-accent, var(--color-accent-base));
  outline-offset: 2px;
}

/* Same steps as the resting masthead (chrome.css): the six links from 1200,
   Join and Menu below. Under 768 the bar does not show at all — the thumb bar
   fixed to the bottom of the screen is the persistent chrome on a phone, and
   two fixed bars would cost 128px of a 844px screen. */
@media (max-width: 1199px) {
  html .ntc-masthead-compact { height: 56px; }
  html .ntc-masthead-compact__nav { display: none; }
  html .ntc-masthead-compact__menu { display: inline-flex; }
}

@media (max-width: 767px) {
  html .ntc-masthead-compact { display: none; }
}

/* --- The live dot ---------------------------------------------------------
   Two rules about these keyframes, and both are load-bearing.

   THEY BEGIN AND END AT THE RESTING STATE. The sweep below forces
   animation-duration: 0.01ms and animation-iteration-count: 1 under reduced
   motion, which lands the element on its 100% frame. Author 100% as the
   enlarged, half-faded frame and reduced-motion visitors get a permanently
   swollen dot rather than no animation.

   THE DOT IS DECORATION. The word LIVE carries the meaning, and the dot is
   aria-hidden. Colour and motion never carry meaning alone in this system, so
   nothing is lost when this does not run.
   -------------------------------------------------------------------------- */
@keyframes ntc-live-pulse {
  0%   { transform: scale(1);    opacity: 1; }
  50%  { transform: scale(1.35); opacity: 0.35; }
  100% { transform: scale(1);    opacity: 1; }
}

.ntc-alertbar__dot {
  animation: ntc-live-pulse 1.6s var(--ease-in-out) infinite;
}

/* --- Reduced motion: the sweep --------------------------------------------
   The tokens are already zeroed in design-system.css and animations.js never
   starts, so this is the belt-and-braces pass for anything that got a literal
   duration anyway — a third-party stylesheet, Oxygen's own selectors.css, a
   future section file that forgot the rule. It is last in the last stylesheet
   and it uses !important, which is the one place in this project where that is
   the correct tool: it has to beat sheets we do not author.

   scroll-behavior is in here for the same reason: a smooth scroll is motion
   the visitor did not ask for. It is also why Lenis is not loaded — see the
   PR for that decision. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  /* If the class were somehow present, nothing may stay hidden. */
  html.ntc-motion .ntc-sec__inner > *:not(.ntc-sechead),
  html.ntc-motion .ntc-sechead__lead > *,
  html.ntc-motion .ntc-sechead > .ntc-eyebrow,
  html.ntc-motion .ntc-sechead > .ntc-sechead__aside,
  html.ntc-motion .ntc-sechead > .ntc-sechead__link,
  html.ntc-motion .ntc-sechead > .ntc-sechead__note,
  html.ntc-motion .ntc-sechead__title,
  html.ntc-motion .ntc-bigtitle,
  html.ntc-motion .ntc-statement__line,
  html.ntc-motion .ntc-sec h1,
  html.ntc-motion .ntc-word {
    opacity: 1 !important;
    transform: none !important;
  }
}
