/* =========================================================================
   portfolio / components.css
   ---------------------------------------------------------------------------
   The component layer of the three-tier token system. Reads SEMANTIC tokens
   from tokens.css (--color-*, --brand-*, --font-*, --space-*, --radius-*,
   --duration-*) and never raw primitives (--neutral-*, --lime-*).

   Every component below has:
     - A base class with semantic naming.
     - Optional modifier classes for variants.
     - A short comment block explaining the role and any unusual decision.
     - A live sample in the under-the-hood "Components" section.

   See docs/design-system.md section 9 for the component inventory and
   contribution rules. See tokens.css for the primitive + semantic layers.
   ========================================================================= */


/* -----------------------------------------------------------------------------
   Button
   ---
   Variants:
     .btn               base, never used alone; the default 44px size + transition
     .btn--primary      lime fill, ink glyph, brand-primary CTA
     .btn--secondary    transparent fill, ink border, secondary CTA
     .btn--icon         round, single icon glyph, hairline border
   Sizes (opt-in modifiers that wire the --btn-* tokens; base .btn equals md):
     .btn--sm   32px   compact: dense cards, toolbars, filters (WCAG 2.5.8 AA)
     .btn--md   44px   the default min-height, same as base .btn (WCAG 2.5.5 AAA);
                       note its padding is the tokenised 8px/16px while base .btn
                       keeps 10px/18px, so the class is not a strict no-op (DC-03)
     .btn--lg   52px   hero CTAs, primary conversion (WCAG 2.5.5 AAA)
   States: hover lifts via translateY(-1px) on primary, lime tint on
   icon; :active is the touch-visible press (background step, no transform,
   hover-independent); :disabled dims and blocks the pointer;
   prefers-reduced-motion collapses the transform. Hover fills are gated
   behind (hover: hover) because Chromium sticks :hover after a tap;
   :focus-visible keeps ungated duplicates so keyboard styling never
   changes.
   ----------------------------------------------------------------------------- */
.btn {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  min-height: var(--touch-target-min);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--btn-font);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  line-height: 1;
  /* A label wraps only when the button is narrower than it: a stretched
     button (width: 100%, flex: 1) in a narrow column at a large browser text
     size. Every button fits its label at the default size, so nothing wraps
     there; with nowrap the overflow was clipped by the card around it
     ("See my design system" lost 139px at 320 under a 200% text size, WCAG
     1.4.4, 2026-09-28). The tight line-height is the single-line one; a
     wrapped label is the exception, not the design. */
  white-space: normal;
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--btn-transition);
}
/* M-07: btn focus uses a positive 2px offset (--focus-ring-offset, +2px) so
   the ring sits OUTSIDE the button border instead of inset (an inset ring was
   hard to see on small icon buttons and clipped behind taller adjacent
   content). Contexts that legitimately want an INSET ring (carousel tabs,
   gallery thumbs, ap2-flink) set a literal outline-offset: -2px, not this
   token. */
.btn:focus-visible {
  outline: 2px solid var(--btn-focus-ring);
  outline-offset: var(--focus-ring-offset);
}
/* A button never wears an underline, in any state. It lived in the page sheet
   until 2026-09-08 (audit n-13), which this file is not: design-system.html and
   the npm package load components.css alone, so anyone taking the published
   button got the global a:hover underline back on a .btn wrapping a link. Held
   at (0,2,0), which beats a:hover at (0,1,1). */
.btn:hover,
.btn:focus,
.btn:focus-visible,
.btn:active {
  text-decoration: none;
}
.btn--primary, .btn--primary:hover {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}
/* Hover gated to hover-capable pointers: on touch, a tap applies and
   STICKS :hover (Chromium), freezing the ink fill on and swallowing the
   press cue below. The :focus-visible duplicate stays ungated so
   keyboard users keep the exact same styling (2026-07-02 review, group 4). */
@media (hover: hover) {
  .btn--primary:hover {
    background: var(--btn-primary-bg-hover);
    color: var(--btn-primary-fg-hover);
    border-color: var(--btn-primary-border);
    transform: translateY(-1px);
  }
}
.btn--primary:focus-visible {
  background: var(--btn-primary-bg-hover);
  color: var(--btn-primary-fg-hover);
  border-color: var(--btn-primary-border);
  transform: translateY(-1px);
}
/* Touch-visible press: distinct from BOTH the lime rest and the ink
   hover. Background step only, transform none: primary CTAs sit inside
   the Featured scroll-snap track, where a swipe-start brushes :active
   and a transform would flash mid-swipe. Declared after hover/focus so
   it wins while they apply. */
.btn--primary:active {
  background: var(--brand-primary-dim);
  color: var(--brand-ink);
  border-color: var(--btn-primary-border);
  transform: none;
}
.btn--secondary {
  background: transparent;
  color: var(--btn-secondary-fg);
  border-color: var(--btn-secondary-border);
}
/* ONE hover grammar for every transparent-at-rest button (2026-08-10):
   secondary now fills lime on hover exactly like .btn--icon below, ink glyphs
   included. It used to fill --color-surface-sunken (grey), which made it the
   only control in a row that did not answer in lime; the two grey-hover tokens
   it read are deleted from tokens.json, not left to rot. The colour trio is
   the same brand-fixed set .btn--icon uses, so both themes compute ink on
   lime. The fg flip is load bearing: without it dark mode keeps its
   near-white label and dies on the lime fill. */
@media (hover: hover) {
  .btn--secondary:hover {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-fg);
    border-color: var(--btn-primary-border);
  }
}
.btn--secondary:focus-visible {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}
/* Press: lime-dim step, same as .btn--icon:active, opaque for the gate. */
.btn--secondary:active {
  background: var(--brand-primary-dim);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}
/* The outline is a soft edge, not a contrast boundary (Nathan, W60 F,
   2026-10-08). --btn-icon-border aliases --btn-secondary-border, the border
   grey in light and the stronger border grey in dark. The glyph names the
   control, so the edge needs no 3:1 (W3C Understanding SC 1.4.11: a control
   identified by its text or icon needs no visible boundary); the glyph holds
   its own contrast, and hover, focus and press fill lime. This replaces the
   Task #87 rule that held the edge on --color-text-tertiary. */
/* Round is the canonical icon-button shape: every real consumer (header theme /
   menu / back controls, and the footer social marks) is a circle. This used to
   default to a rounded square that rendered nowhere but the under-the-hood demo,
   with a #site-header override supplying the circle. The circle now lives on the
   component itself, so there is one source of truth and the demo cannot drift. */
.btn--icon {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  padding: 0;
  border-radius: var(--btn-radius);
  border-color: var(--btn-icon-border);
  background: transparent;
  color: var(--btn-icon-fg);
}
/* Mobile button rule (design-system.md section 9, Button behaviour).
   Section-level primary CTAs (featured-card Read the case study / View on
   Figma, the under-the-hood teaser Explore the design system, and the
   accessibility-card See the full design system, and the nav drawer's Get in
   touch) expand to full width on mobile for a thumb-friendly tap area. Inline
   buttons (in-flow inside paragraphs) stay auto-width. This list is the single
   registry the mobile full-width gate checks (portfolio/tokens/mobile-consistency-lint.mjs);
   add a new section CTA here and to that gate's registry together.
   The 768 ceiling is the whole point of the list, not a detail of it: a CTA
   written full width with no upper bound keeps spanning on tablet, where the
   thumb argument does not hold and the button just reads broken. The drawer CTA
   joined on 2026-08-23 after doing exactly that, measured at 1155px wide. */
@media (max-width: 767.98px) {
  .feat-cta-corner .btn,
  .dsc-cta,
  .ap2-cta,
  .overlay-cta {
    width: 100%;
    justify-content: center;
  }
}
@media (hover: hover) {
  .btn--icon:hover {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-fg);
    border-color: var(--btn-primary-border);
  }
}
.btn--icon:focus-visible {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}
/* Press: lime-dim step so the tap reads even where the lime hover fill
   never fires (touch). Scoped colour: the dark-header override in
   sections.css carries the matching :active companion. */
.btn--icon:active {
  background: var(--brand-primary-dim);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}
/* Shared icon sizing for Lucide glyphs inside any .btn (arrow, external-link,
   download). Keeps icon-plus-text CTAs consistent without per-CTA overrides. */
.btn i,
.btn svg {
  width: var(--btn-glyph);
  height: var(--btn-glyph);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-default);
}
/* ONE icon-motion rule for every button on the site (moved here from
   sections.css, 2026-08-23). It has to live WITH the component: this file is
   what design-system.html loads and what the npm package publishes, so while
   the rule sat in the page stylesheet the shipped button had no arrow motion
   at all, and every new outbound control had to hand-copy the movement or
   silently go without it (the Kind words LinkedIn pill did exactly that).
   Nothing scales; only the external-link arrow moves, up and to the right,
   because that movement means something: this goes somewhere else. Target the
   element CARRYING data-lucide, never a descendant, since Lucide REPLACES the
   <i> tag rather than nesting an icon inside it. */
.btn:focus-visible [data-lucide="arrow-up-right"] {
  transform: translate(2px, -2px);
}
/* Hover half behind the capability query: on touch a tap synthesises hover and
   the arrow would stay nudged after the finger lifts. focus-visible stays
   OUTSIDE, keyboard focus is real on every device. */
@media (hover: hover) {
  .btn:hover [data-lucide="arrow-up-right"] {
    transform: translate(2px, -2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn i,
  .btn svg { transition: none; }
  .btn:hover [data-lucide="arrow-up-right"],
  .btn:focus-visible [data-lucide="arrow-up-right"] { transform: none; }
}
/* MAIL GLYPH, THE FOLD AND FLY (2026-09-20, Nathan, picked from a four
   direction bench).

   REPLACES the 2026-09-15 letter rise entirely; it does not join it, because
   the rule directly above says one icon-motion rule per glyph, site-wide.
   The letter rise had a fault nobody could see: it lifted the letter to four
   user units ABOVE the glyph's own 24 unit box and an SVG clips to its
   viewBox, so 40 percent of the letter was cut flat on every hover, on all
   three controls, for the life of the rule. Deleting the rule deletes the
   bug; there is nothing left to clip.

   On hover or keyboard focus the envelope FOLDS into a paper plane, the
   plane banks, pulls back for a beat and flies out up and to the right, and
   the envelope fades back in. One gesture, one shot, and it RETURNS: a
   button left with no icon at the end of a hover looks broken.

   FOUR THINGS ARE LOAD BEARING.
   1. The two shapes have the SAME COMMAND STRUCTURE, body M,L,L,L,Z and
      fold M,L,L. That is the condition for a browser to interpolate `d` at
      all; without it the paths jump. The point ORDER is what makes the fold
      a fold: the envelope's top right corner becomes the plane's tip, its
      top left becomes the far wing, its bottom left folds in to the notch
      and its bottom right becomes the tail, while the flap's V straightens
      into the crease.
   2. The plane's four points are read off LUCIDE'S OWN send path, not drawn
      by hand. A hand drawn dart shipped to review with its lower wing at 2
      units against Lucide's 3.6 and read as pinched at 16px.
   3. EVERY SEGMENT CARRIES ITS OWN CURVE. --ease-emphasized is a spring: it
      covers nearly all its distance in the first fraction of its time, so
      running the whole cycle on it put the plane at 1 percent opacity before
      the flight was half over. A thing leaving accelerates, so the departure
      is --ease-exit and only the fold and the return get the spring.
   4. overflow: visible on the glyph. The plane leaves its own 24 unit box,
      and without this it is clipped at the edge exactly as the old letter
      was.

   The paths are not in the markup: contact-cta.js swaps them into every mail
   glyph inside a .btn, the same way it used to add the letter. PROGRESSIVE
   ENHANCEMENT: with that script absent the button renders Lucide's envelope
   exactly as authored and simply does not move. The inline-SVG ruling is
   satisfied for the same reason it was before.

   Same shape as the arrow nudge above: the hover half behind the capability
   query, focus-visible outside it, reduced motion cancels. Held by
   tokens/component-behaviour-lint.mjs. */
.btn [data-lucide="mail"] {
  overflow: visible;
  /* --duration-expressive, the scale's "slow, cinematic entrance for one
     large hero moment". Nathan asked for about 1200ms and the token sits
     100ms away, so this follows the motion scale instead of drifting off it. */
  --btn-fly-dur: var(--duration-expressive);
}
@keyframes btn-mail-fold {
  0%        { d: path("M22 4 L2 4 L2 20 L22 20 Z"); animation-timing-function: var(--ease-emphasized); }
  26%, 70%  { d: path("M21.5 2.5 L2 9.1 L10.9 12.4 L14.5 21.7 Z"); }
  71%, 100% { d: path("M22 4 L2 4 L2 20 L22 20 Z"); }
}
@keyframes btn-mail-crease {
  0%        { d: path("M22 7 L12 12.9 L2 7"); animation-timing-function: var(--ease-emphasized); }
  26%, 70%  { d: path("M21.5 2.5 L16.2 7.8 L10.9 13.1"); }
  71%, 100% { d: path("M22 7 L12 12.9 L2 7"); }
}
@keyframes btn-mail-fly {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1;
         animation-timing-function: var(--ease-emphasized); }
  26%  { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1;
         animation-timing-function: var(--ease-default); }
  36%  { transform: translate(-2px, 2px) rotate(-16deg) scale(0.95); opacity: 1;
         animation-timing-function: var(--ease-exit); }
  70%  { transform: translate(30px, -30px) rotate(26deg) scale(0.62); opacity: 0; }
  71%  { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0;
         animation-timing-function: var(--ease-entrance); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
}
/* Resting shapes live here rather than on the element, because `d` is only
   animatable as a CSS property. The script writes them as attributes too, so
   a browser without CSS `d` still draws the envelope. */
.btn-mail-body { d: path("M22 4 L2 4 L2 20 L22 20 Z"); }
.btn-mail-crease { d: path("M22 7 L12 12.9 L2 7"); }
.btn:focus-visible [data-lucide="mail"],
.btn.is-pressed [data-lucide="mail"] { animation: btn-mail-fly var(--btn-fly-dur) var(--ease-linear); }
.btn:focus-visible [data-lucide="mail"] .btn-mail-body,
.btn.is-pressed [data-lucide="mail"] .btn-mail-body { animation: btn-mail-fold var(--btn-fly-dur) var(--ease-linear); }
.btn:focus-visible [data-lucide="mail"] .btn-mail-crease,
.btn.is-pressed [data-lucide="mail"] .btn-mail-crease { animation: btn-mail-crease var(--btn-fly-dur) var(--ease-linear); }
@media (hover: hover) {
  .btn:hover [data-lucide="mail"] { animation: btn-mail-fly var(--btn-fly-dur) var(--ease-linear); }
  .btn:hover [data-lucide="mail"] .btn-mail-body { animation: btn-mail-fold var(--btn-fly-dur) var(--ease-linear); }
  .btn:hover [data-lucide="mail"] .btn-mail-crease { animation: btn-mail-crease var(--btn-fly-dur) var(--ease-linear); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover [data-lucide="mail"],
  .btn.is-pressed [data-lucide="mail"],
  .btn:focus-visible [data-lucide="mail"],
  .btn:hover [data-lucide="mail"] .btn-mail-body,
  .btn.is-pressed [data-lucide="mail"] .btn-mail-body,
  .btn:focus-visible [data-lucide="mail"] .btn-mail-body,
  .btn:hover [data-lucide="mail"] .btn-mail-crease,
  .btn.is-pressed [data-lucide="mail"] .btn-mail-crease,
  .btn:focus-visible [data-lucide="mail"] .btn-mail-crease { animation: none; }
}

/* Size modifiers. Wire the --btn-* tokens. Base .btn is the 44px default (= md),
   so unmodified buttons are unchanged; opt in to --sm for dense UI or --lg for
   hero CTAs. min-height sets the height, padding scales the hit area, and the
   glyph nudges down at --sm and up at --lg. Every size clears WCAG 2.5.8 AA
   (24px); md and lg also clear the 2.5.5 AAA 44px enhanced target. */
.btn--sm { min-height: var(--btn-sm); padding: var(--space-100) var(--space-300); font-size: var(--size-xs); gap: var(--space-100); }
.btn--md { min-height: var(--btn-md); padding: var(--space-200) var(--space-400); font-size: var(--size-sm); }
.btn--lg { min-height: var(--btn-lg); padding: var(--space-300) var(--space-500); font-size: var(--size-base); }
.btn--sm i,
.btn--sm svg { width: var(--btn-glyph-sm); height: var(--btn-glyph-sm); }
.btn--lg i,
.btn--lg svg { width: var(--btn-glyph-lg); height: var(--btn-glyph-lg); }
/* Icon-only buttons stay 1:1 at every size; the full radius keeps them circular. */
.btn--icon.btn--sm { width: var(--btn-sm); height: var(--btn-sm); padding: 0; }
.btn--icon.btn--md { width: var(--btn-md); height: var(--btn-md); padding: 0; }
.btn--icon.btn--lg { width: var(--btn-lg); height: var(--btn-lg); padding: 0; }

/* Disabled. A real resting state (previously unstyled): dimmed, no pointer, no
   hover lift. Disabled controls are exempt from WCAG 1.4.3 contrast, so the
   dimmed glyph is acceptable. Covers <button disabled> and the .is-disabled /
   [aria-disabled="true"] hook for elements (links) that cannot carry the
   native attribute. CSS cannot DISABLE a link: pointer-events blocks the mouse
   only, so an <a href> stays in the tab order and Enter still navigates
   (SC 2.1.1, SC 4.1.2). The link case therefore has a MARKUP contract:
     <a class="btn is-disabled" role="link" aria-disabled="true">label</a>
   No href, so Enter has nothing to activate; role="link" because an href-less
   <a> has no implicit role; aria-disabled="true" so assistive tech announces
   the state. The attribute selector below styles identically to the class, so
   the ARIA state and the styling cannot drift apart. */
.btn:disabled,
.btn[disabled],
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
/* Link-case extra cue (SC 1.4.1): dimming alone is a single-channel signal, and
   the not-allowed cursor never renders on this rule anyway (pointer-events:
   none makes the element non-hit-testable, so the surface underneath supplies
   the cursor). The strike-through carries the disabled state visually and
   survives greyscale and forced-colors. :not(:disabled) keeps the native
   button-board specimen (a real <button disabled>) on its unchanged look. */
.btn.is-disabled:not(:disabled),
.btn[aria-disabled="true"]:not(:disabled) {
  text-decoration: line-through;
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn--primary:hover,
  .btn--primary:focus-visible { transform: none; }
}


/* -----------------------------------------------------------------------------
   Card
   ---
   .card                base, hairline border, soft radius, off-white surface
   .card--dark          dark-surface variant for dark slabs (ink bg, on-ink text)
   ----------------------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  color: var(--card-fg);
}

.card--dark {
  background: var(--card-dark-bg);
  color: var(--card-dark-fg);
  border-color: var(--card-dark-border);
}

/* -----------------------------------------------------------------------------
   Card variants (W48)
   ---
   The frame (surface, border, radius, padding) always renders; variants change
   only the inset or the inner content. Hover lives ONLY on .card--interactive:
   static cards keep the resting outline (the card hover taxonomy; guarded by
   the card rules in tokens/mobile-consistency-lint.mjs, rule 4).
     .card--compact / --spacious   padding tiers (16 / 32; base is standard 24)
     .card--interactive            clickable: pair with a real <a>/<button>
     .card--empty / --error        a centred message, frame still renders
     .card--loading                a skeleton matching card proportions
   ----------------------------------------------------------------------------- */

/* A card rendered as a link keeps the card's own foreground (so a theme-pinned
   card stays readable) and drops the underline. Using `inherit` here let the link
   pull the page text colour instead, which failed contrast on a light-pinned card
   in dark mode (.card--interactive title/body, caught by the WCAG gate). */
a.card { color: var(--card-fg); text-decoration: none; }
/* State companion, load bearing. The global `a:hover, a:focus-visible` in
   sections.css sets text-decoration: underline at (0,1,1); `a.card` is also
   (0,1,1) and LOSES on source order, so without this every card link grew an
   underline across its whole content the moment you hovered or tabbed to it.
   Same bug class as the .link-underline and .fab-chip notes. Ungated on
   purpose: the global rule is ungated, and a sticky :hover after a tap would
   otherwise leave phones underlined. */
a.card:hover,
a.card:focus-visible { text-decoration: none; }

/* Padding tiers: the --card-pad-* tokens as a modifier API (base = standard). */
.card--compact  { padding: var(--card-pad-compact); }
.card--spacious { padding: var(--card-pad-spacious); }

/* Interactive: THE clickable-card hover for the whole site. Border strengthens;
   the card lifts 2px on a fine pointer, dropped under reduced motion.
   Live consumers: the two award cards (#awards .award-card), plus the
   Component Playground specimen. Card-shaped surfaces lift; full-width LIST
   ROWS (the experience rows, the About discipline rows) answer with a
   background wash instead and are deliberately NOT on this variant. That
   two-family split is the card hover taxonomy in design-system.md Section 9. */
.card--interactive {
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-default),
              translate var(--duration-base) var(--ease-default);
}
.card--interactive:hover,
.card--interactive:focus-within { border-color: var(--color-border-strong); }
.card--interactive:focus-visible { outline: var(--border-focus); outline-offset: 3px; }
/* Touch-visible press: background step, no transform (cards can sit in
   scroll-snap tracks where a swipe-start brushes :active). The hover
   above is border-only (no fill flip), so it stays ungated. */
.card--interactive:active {
  border-color: var(--color-border-strong);
  background: var(--color-surface-sunken);
}
/* The LIFT answers :hover only, never :focus-within, and it is written as
   `translate`, not `transform`. Both halves of that are load bearing.

   :hover only, because :focus-within fires on a MOUSE click as well as a
   keyboard tab, and these cards hold a .disclosure-toggle chip, so every click
   on the chip shoved the whole card up 2px while its panel was opening. That
   is the reason the award cards forked this variant instead of using it. The
   border half above still answers :focus-within (a colour change moves
   nothing) and the keyboard ring is on :focus-visible, so nothing is lost.

   `translate`, because a clickable card can also be a scroll-reveal subject,
   and .nm-sr animates `transform` off a view() timeline. A running animation
   beats a normal declaration, so a transform-based lift on such a card is dead
   on arrival: it computes, it just never renders, which is the worst kind of
   dead code because it reads as working. `translate` is an INDEPENDENT
   transform property, so it composes with the animation instead of losing to
   it. Measured on #awards .award-card, which is exactly that case. */
@media (hover: hover) and (pointer: fine) {
  .card--interactive:hover { translate: 0 -2px; }
}
@media (prefers-reduced-motion: reduce) {
  .card--interactive { transition: none; }
  .card--interactive:hover { translate: none; }
}

/* Content states. Empty and error centre a message so the card is never a blank
   box; loading shows a skeleton sized to the card. */
.card--empty,
.card--error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-200);
  min-height: 132px;
  text-align: center;
}
/* Attribute only, never `i[data-lucide]`. The boot script REPLACES the authored
   <i data-lucide="x"> with an <svg data-lucide="x">, so a selector that pins the
   tag name matches only the split second before hydration and silently stops
   applying after it. That is why these icons had been rendering at the
   inherited text colour rather than the tertiary grey this rule asks for. */
.card--empty [data-lucide],
.card--error [data-lucide] { width: 24px; height: 24px; color: var(--color-text-tertiary); }
.card--error .card-state-msg { color: var(--color-text-primary); }
.card-state-msg  { margin: 0; font-size: var(--size-sm); color: var(--color-text-secondary); }
.card-state-hint { margin: 0; font-size: var(--text-caption); color: var(--color-text-tertiary); line-height: var(--line-body); }

/* Loading skeleton: a media block plus title and body lines on the sunken
   surface. The shimmer sweep auto-disables under reduced motion, leaving static
   blocks that still read as loading. */
.card--loading { display: flex; flex-direction: column; gap: var(--space-300); }
.card-skel {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
}
.card-skel--media { height: 92px; }
.card-skel--title { height: 18px; width: 55%; }
.card-skel--line  { height: 12px; }
.card-skel--line.is-short { width: 78%; }
.card-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(var(--brand-ink-rgb) / var(--alpha-200)), transparent);
  animation: card-skel-sweep 1.4s var(--ease-default) infinite;
}
@keyframes card-skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .card-skel::after { display: none; }
}


/* -----------------------------------------------------------------------------
   Chip / Tag
   ---
   Used for skill tags, technology badges, status pills. Smaller and lighter
   than a button, no interactivity expected.
     .chip              ink ring on subtle bg
   ----------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--chip-gap);
  padding: var(--chip-pad-y) var(--chip-pad-x);
  font-family: var(--chip-font);
  font-feature-settings: var(--font-feature-mono);
  font-size: var(--chip-font-size);
  line-height: var(--chip-line);
  font-weight: var(--chip-font-weight);
  color: var(--chip-fg);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: var(--chip-radius);
}
.chip i[data-lucide],
.chip svg[data-lucide],
.chip svg.lucide {
  width: var(--chip-icon-size);
  height: var(--chip-icon-size);
  flex: 0 0 var(--chip-icon-size);
  display: block;
  color: var(--chip-fg);
  stroke-width: 2;
}
/* Outline variant (2026-07-19): the fill drops out for quieter contexts,
   the treatment the portfolio's featured-project cards wear. Same anatomy
   and tokens as the base chip; only the surface and ink change. */
.chip--outline {
  background: transparent;
  color: var(--color-text-secondary);
}
.chip--outline i[data-lucide],
.chip--outline svg[data-lucide],
.chip--outline svg.lucide {
  color: inherit;
}
/* Sandbox cherry-pick: normalizer wrapper for chips that need a raster or
   SVG-image icon instead of a Lucide stroke icon (e.g. brand logos). Pair
   it with `<span class="chip-icon"><img|svg ...></span>` so brand marks
   render at the same 14x14 footprint as Lucide icons. */
.chip .chip-icon {
  width: var(--chip-icon-size);
  height: var(--chip-icon-size);
  flex: 0 0 var(--chip-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.chip .chip-icon > img,
.chip .chip-icon > svg {
  width: var(--chip-icon-size);
  height: var(--chip-icon-size);
  display: block;
  object-fit: contain;
}
.chip:hover {
  border-color: var(--color-border-strong); /* the old --chip-border-hover, gone from the site tokens */
}
/* (No .chip:active: every chip in the site is a non-interactive <span>
   label; the old :active here was a visual no-op that read as a press
   precedent. Removed in the 2026-07-02 pressed-state pass.) */

/* -----------------------------------------------------------------------------
   Badge — a read-only status or count pill. Not interactive (no hover/focus).
   ---
   A badge reports a STATUS (In progress, Live at scale, In production) or a count;
   a chip carries a LABEL. Quiet hairline outline, secondary mono text, sentence
   case. An optional brand-lime status dot via .badge__dot, or a leading Lucide
   icon. Consumed by the skills discipline statuses. (The hero "Available for work"
   is a one-off, not a badge: it has no outline, just text and a pulsing dot.)
     .badge            hairline ring, quiet secondary text, mono, sentence case
     .badge__dot       leading brand-lime status dot
   ----------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--badge-gap);
  padding: var(--badge-pad-y) var(--badge-pad-x);
  font-family: var(--badge-font);
  font-feature-settings: var(--font-feature-mono);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  color: var(--badge-fg);
  background: transparent;
  border: 1px solid var(--badge-border);
  border-radius: var(--badge-radius);
  white-space: nowrap;
}
.badge i[data-lucide],
.badge svg[data-lucide],
.badge svg.lucide {
  width: var(--badge-icon-size);
  height: var(--badge-icon-size);
  flex: 0 0 var(--badge-icon-size);
  display: block;
  color: var(--badge-fg);
  stroke-width: 2;
}
.badge__dot {
  width: var(--badge-dot-size);
  height: var(--badge-dot-size);
  flex: 0 0 var(--badge-dot-size);
  border-radius: var(--dot-radius);
  background: var(--badge-dot);
}


/* -----------------------------------------------------------------------------
   Avatar
   ---
   .avatar              identity shape (--avatar-radius, a circle by default), sized via --size class, lime ring on hover
   ----------------------------------------------------------------------------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  border-radius: var(--avatar-radius);
  overflow: hidden;
  background: var(--color-surface-sunken);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  transition: border-color var(--duration-fast) var(--ease-default),
              transform var(--duration-fast) var(--ease-default);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar:hover,
.avatar:focus-visible {
  border-color: var(--color-border-brand);
}
/* Only the LIFT splits out; the border colour stays on both states. */
.avatar:focus-visible {
  transform: scale(1.04);
}
@media (hover: hover) {
  .avatar:hover {
    transform: scale(1.04);
  }
}


/* -----------------------------------------------------------------------------
   Profile mark
   ---
   .profile-mark        the brand portrait, composed live instead of flattened
   ---
   The header portrait used to be one baked 252px PNG with the lime baked in.
   It is now the same three parts the original was made of: the brand gradient,
   the transparent head, and a white rim. Two wins. The background is a token
   again, so a brand re-point moves it; and the head can be addressed on its
   own, which is what the hover echo needs.

   The geometry is measured off the old composite (Frame_225_isos63.png), not
   eyeballed: rebuilding with these numbers reproduces it to a mean 1.3/255, so
   the resting state is indistinguishable from what shipped before.

   Layers, bottom up: the gradient (on the box), the head, the two echo copies,
   then the rim on top. The rim being opaque and last is what clips the head, so
   the head needs no second circle of its own.
   ----------------------------------------------------------------------------- */
.profile-mark {
  /* Rim as a share of the RADIUS (3.208% of the diameter). It has to be a
     percentage because the mark renders at four sizes (44 mobile, 36 desktop,
     38/32 in the design-system pills) and the rim must scale with all of them.
     border-width rejects percentages, hence the radial-gradient below rather
     than the border you would reach for first. */
  --profile-mark-rim: 93.583%;
  /* How hard the glitch jumps. One number; the keyframes below multiply the
     house engine's own px figures by it. */
  --profile-mark-glitch: 4px;
  position: relative;
  /* Self-contained on purpose. In the header it sits on .avatar, which would
     supply these anyway, but the splash mark carries no .avatar and any future
     use should not have to know that. Size is the caller's business; the shape
     is the component's: --avatar-radius, full by default (a circle), and the
     one circle token the theme lab's corner tier drives, so the portrait
     squares with the icon buttons beside it (2026-09-02). */
  border-radius: var(--avatar-radius);
  overflow: hidden;
  background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-primary-vivid) 100%);
}
/* Beats .avatar img (which forces 100%/cover for the testimonial portraits)
   and .ld-av img, which did the same for the splash. */
.profile-mark .profile-mark__head {
  position: absolute;
  width: 124.7024%;
  height: auto;
  left: -0.873%;
  top: 4.0873%;
  object-fit: fill;
}
.profile-mark__glitch {
  position: absolute;
  /* Overhangs left and right so the jump never uncovers the disc edge. */
  inset: 0 -24%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-linear);
  /* Bands, not a wash. Two half-transparent discs of magenta and cyan simply
     stack into flat teal and the lime is gone; opaque strips keep both chromas
     true and leave the lime reading between them. Explicit stops rather than a
     repeating gradient so the two colours interleave instead of lining up. */
}
.profile-mark__glitch--magenta {
  background: linear-gradient(180deg,
    transparent 0 14%, var(--fx-glitch-magenta) 14% 23%,
    transparent 23% 46%, var(--fx-glitch-magenta) 46% 57%,
    transparent 57% 74%, var(--fx-glitch-magenta) 74% 82%,
    transparent 82% 100%);
}
.profile-mark__glitch--cyan {
  background: linear-gradient(180deg,
    transparent 0 28%, var(--fx-glitch-cyan) 28% 36%,
    transparent 36% 60%, var(--fx-glitch-cyan) 60% 70%,
    transparent 70% 88%, var(--fx-glitch-cyan) 88% 95%,
    transparent 95% 100%);
}
/* The same six-step 0.7s rhythm the .glitch-tgt engine already runs on the
   footer CTA and on "vibe coding". The px figures are that engine's own, times
   --profile-mark-glitch so one number drives how hard it jumps. steps(6) is
   what makes it jump rather than glide; an eased version reads as a wobble. */
@keyframes profile-mark-chroma-top {
  0%, 100% { transform: translate(calc(var(--profile-mark-glitch) * -2), 0); }
  18% { transform: translate(calc(var(--profile-mark-glitch) * -5), calc(var(--profile-mark-glitch) * -1)); }
  36% { transform: translate(calc(var(--profile-mark-glitch) * 1), calc(var(--profile-mark-glitch) * 1)); }
  54% { transform: translate(calc(var(--profile-mark-glitch) * -3), 0); }
  72% { transform: translate(calc(var(--profile-mark-glitch) * -1), calc(var(--profile-mark-glitch) * -2)); }
  88% { transform: translate(calc(var(--profile-mark-glitch) * -4), calc(var(--profile-mark-glitch) * 1)); }
}
@keyframes profile-mark-chroma-bottom {
  0%, 100% { transform: translate(calc(var(--profile-mark-glitch) * 2), 0); }
  18% { transform: translate(calc(var(--profile-mark-glitch) * 5), calc(var(--profile-mark-glitch) * 1)); }
  36% { transform: translate(calc(var(--profile-mark-glitch) * -1), calc(var(--profile-mark-glitch) * -1)); }
  54% { transform: translate(calc(var(--profile-mark-glitch) * 3), 0); }
  72% { transform: translate(calc(var(--profile-mark-glitch) * 1), calc(var(--profile-mark-glitch) * 2)); }
  88% { transform: translate(calc(var(--profile-mark-glitch) * 4), calc(var(--profile-mark-glitch) * -1)); }
}
.profile-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  /* The rim follows the mark's own shape (2026-09-02). It was a radial
     gradient ring, which can only ever draw a circle; now that the corner
     tier can square the portrait through --avatar-radius, the ring is the
     pseudo painted solid white with its content box masked away. Percentage
     padding resolves against the mark's width, so the ring stays the same
     3.208% of the diameter the radial version drew, at every size, and
     border-radius: inherit keeps it on the mark's own corners. Only the
     mask's alpha matters, so the white token stands in for "opaque". */
  background: var(--color-static-white);
  box-sizing: border-box;
  padding: calc((100% - var(--profile-mark-rim)) / 2);
  -webkit-mask-image: linear-gradient(var(--color-static-white) 0 0), linear-gradient(var(--color-static-white) 0 0);
  -webkit-mask-clip: content-box, border-box;
  -webkit-mask-composite: xor;
  mask-image: linear-gradient(var(--color-static-white) 0 0), linear-gradient(var(--color-static-white) 0 0);
  mask-clip: content-box, border-box;
  mask-composite: exclude;
}
/* The glitch IS the movement, so reduced motion drops it rather than slowing
   it down. Same ruling as .heading-glitch and the .glitch-tgt engine. */
@media (prefers-reduced-motion: reduce) {
  .profile-mark__glitch { transition: none; animation: none !important; }
  .header-brand-link:hover .profile-mark__glitch,
  .header-brand-link:focus-visible .profile-mark__glitch { opacity: 0; }
}


/* -----------------------------------------------------------------------------
   SectionHead + label
   ---
   Every top-level section leads with the heading; the label sits a tier DOWN:
     h2.section-title : "Main heading."
     p.section-subtitle : "Optional supporting line." (only where it carries
                          real information; most sections have none)
     .section-label   : sub-section label ("Degree", "Top skills and tools")
                        and the design-system view's doc subheads.
   The EYEBROW use of .section-label (a label ABOVE the section h2) was
   retired 2026-08-16: it restated the heading or the nav. The class and its
   variants live on in the sub-tier roles listed above.
   (Audit C-07: example markup re-expressed as selector + text so no
   stray placeholder h2 appears in the source.)
   Light and dark surfaces share the same scale and weight; only colours
   flip via .section-dark on the parent or the element itself.

   The eyebrow is TEXT ONLY: no leading accent bar and no section number.
   Both were removed 2026-08-10. The bar was a 12x2px ::before that resolved
   to ink in light and lime in dark; the number was a JS-injected span. The
   numbers counted section-labels in document order, which did not match the
   hand-typed menu numbering (the same section read 03 in its eyebrow and 02
   in the menu), so they contradicted the navigation they appeared to index.
   With the bar gone the .section-label--no-bar variant went with it. The
   flex row stays: the --icon variant still needs the gap.
   ----------------------------------------------------------------------------- */
.section-label {
  font-family: var(--font-mono);
  font-feature-settings: var(--font-feature-mono);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-text-tertiary);
  margin: 0 0 var(--space-200);
  display: inline-flex;
  align-items: center;
  gap: var(--space-200);
  line-height: var(--chip-line);
}
.section-label--center {
  display: flex;
  justify-content: center;
}
/* Variant: heading ROW rather than an inline tag. Fills its container so a
   trailing count ("12 stops", "8 tokens") can be pushed to the right edge with
   margin-left: auto. Added 2026-08-10 when the two Under-the-Hood sub-heading
   classes (.uth-doc-subhead, .uthc-cg-sub) stopped hand-copying this recipe and
   started composing it. Those copies are why the text-only ruling above had to
   be applied three times by hand; consumers now inherit it once. Each keeps
   only its genuinely local values (rhythm, muted ink, tier weight) in
   sections.css, and the eyebrow-lookalike lint keeps a fourth copy from
   appearing. */
.section-label--row {
  display: flex;
  width: 100%;
}
/* Variant: icon-led eyebrow (audit M-23, 2026-07-10). The decorative glyph is
   sized to the label. Used by the accessibility proof card and the
   design-system teaser, which previously each minted their own eyebrow class
   (.ap2-eyebrow / .dsc-eyebrow) and had already drifted from the canon. */
.section-label--icon i,
.section-label--icon svg { width: 14px; height: 14px; flex: none; }
/* Variant: accent-emphasis colour for eyebrows sitting on marquee cards. */
.section-label--accent { color: var(--color-accent-emphasis); }

/* The section header block, and the ONE owner of the gap from a section heading
   to the first thing under it (2026-08-23). Before this, that gap was hand-typed
   as a margin-top on whatever container happened to come next: five classes
   across three files, which measured 12 / 24 / 32 / 40 / 48px on the same page.
   Two mechanics make this rule the single source rather than a sixth opinion:
     - PADDING, not margin. A margin here would collapse against the next
       container's own margin-top and the LARGER value would win, which is the
       exact failure being replaced.
     - flow-root, so the h2's own margin-bottom cannot escape the block and
       collapse through into that gap.
   Consumers must therefore declare NO margin-top on the content that follows a
   .section-head; a11y/section-head-gate.mjs (a browser gate, run by the deploy)
   fails if one reappears. */
.section-head {
  display: flow-root;
  padding-block-end: var(--section-head-gap);
}
.section-head > .section-title { margin-block-end: 0; }

/* Task #43: halve heading-to-body gap globally. Was var(--space-500) = 24px,
   now var(--space-300) = 12px. Tighter rhythm across every section.
   NOTE: inside a .section-head this margin is zeroed above; it still applies to
   the card-level .section-title consumers (featured cards, Under-the-Hood). */
.section-title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  /* display-section: Nathan's pick from the in-context type editor,
     2026-08-21, floor and cap raised 2026-10-01. The two About headings
     size themselves in sections.css; the featured-card override below this
     file keeps card titles on their own scale. */
  font-size: var(--display-section);
  line-height: var(--line-display);
  /* --tl-track-display: the portfolio theme lab's per-pairing override,
     unset everywhere else, so other consumers of this file always get the
     --display-tight fallback. */
  letter-spacing: var(--tl-track-display, var(--display-tight));
  margin: 0 0 var(--space-300);
  text-wrap: balance;
  /* A single word wider than the column breaks instead of running off the
     edge (WCAG 1.4.12, 2026-09-27: "Components" at 320 with a reader's letter
     spacing). break-word, not anywhere: it never changes how wide the heading
     asks to be, so no layout moves and a word that fits never breaks. */
  overflow-wrap: break-word;
  max-width: 22ch;
  color: var(--color-text-primary);
  font-style: normal;
}
/* Brand period accent. Rendered as generated content (not a DOM node) so it
   is treated as decoration on screen. Generated content IS exposed to the
   accessibility tree by default (measured in Chromium: the bare "." was
   appended to every .section-title accessible name), so the / "" alternative
   text below explicitly empties it for assistive tech. */
/* DRAWN, not typed (2026-08-24). This was `content: "."` in brand lime, which
   worked while the display face was Inter: Inter's full stop is a rounded square
   and passes as a dot. Anton's is a hard RECTANGLE, measured 1.20 wide to tall
   against Inter's 1.01, and its right sidebearing is tight enough that in "Work."
   the mark touched the k.
   The brand shape was always a circle anyway, the wordmark's dot and the portrait
   are both circles, so the glyph was only ever standing in for one. Drawing it in
   em keeps it tracking the heading at every clamp step, and its own left gap means
   it can never touch the last letter whatever the face does.
   content: "" / "" keeps the empty alt so assistive tech still skips it, exactly
   as the glyph version did; generated content IS exposed to the accessibility
   tree by default.
   NO LIFT (Nathan, 2026-08-25). The period is flat brand lime on every ground.
   The old --accent-period-shadow was authored for a text-shadow and carried a
   spread radius, which text-shadow rejects, so it had silently computed to none
   for the whole time the period was a typed glyph. Moving to a drawn box in the
   Anton migration made it render for the first time, and what it rendered was a
   hard 1px ring: zero offset, zero blur, one pixel of spread reads as a stroke on
   a drawn shape, not a shadow. The site had looked correct without it for three
   months, so it comes off rather than gets retuned. The token is deleted, not left
   at none, so nothing can reach for it again. */
.section-title::after {
  content: "" / "";
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.07em;
  border-radius: var(--dot-radius);
  background: var(--brand-primary);
  vertical-align: baseline;
}
/* (The legacy span.dot heading rule was deleted 2026-07-10, audit M-25: the
   last two heading spans are gone; every heading period is the ::after above.) */

/* Task #43: tighten subtitle-to-content gap from var(--space-700) = 48px down
   to var(--space-500) = 24px. Less wasted whitespace below every section's
   intro paragraph before content begins. */
.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-body);
  color: var(--color-text-secondary);
  max-width: 60ch;
  margin: 0 0 var(--space-500);
}

/* -----------------------------------------------------------------------------
   Lede
   ---
   How a block's opening line is shaped (W60 E, Nathan's picks 2026-10-04). The
   block stays ONE <p>, so a screen reader hears one paragraph: the first
   sentence in .lede-lead, the rest in .lede-body. The look is set ONCE per slot,
   by data-lede on the slot's container, never per block, so a pick reaches every
   block of that kind:
     accent   the lead in bold accent ink, one running paragraph
              (Top skills: .idx; a section intro, should one return)
     marker   the lead on the brand strip, the rest on its own line
              (Roles write-ups: .xp-list)
   Without data-lede the spans are plain text. tokens/lede-lint.mjs holds each
   slot to its look and lists blocks that still need a lead. Marker repeats the
   About "Hi, I'm Nate" strip (.about-hi-names in sections.css) until that
   section gets its own pass; fold the two then.
   ----------------------------------------------------------------------------- */
[data-lede="accent"] .lede-lead {
  color: var(--color-accent-emphasis);
  font-weight: var(--weight-semibold);
}
[data-lede="marker"] .lede-lead {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--display-intro);
  line-height: 1.9; /* lint-ok: the strip's own leading, as About's .about-hi-names; a second use, not yet a token */
  letter-spacing: var(--tl-track-tight, var(--display-tight));
  padding: 0.04em 0.3em; /* lint-ok: hugs the words like a highlighter, as About's strip */
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
[data-lede="marker"] .lede-body {
  display: block;
  margin-top: var(--space-300);
  text-wrap: balance;
}
/* Room for the strip at a soft wrap. Each cloned fragment carries its own end
   padding AFTER the space the line breaks on, and neither counts when the line is
   fitted, so a full first line ran up to 0.3em plus a space (about 11px) past the
   column (measured 2026-10-04: Bupa's lead, 2px past its panel at 320 wide). The
   paragraph keeps that much clear at its end. */
[data-lede="marker"] p { padding-inline-end: var(--space-300); }

/* -----------------------------------------------------------------------------
   RoleCard
   ---
   Timeline entry: company logo, role title, dates, bullets, tags. Light
   variant for default surfaces, dark variant inside dark slabs.
   ----------------------------------------------------------------------------- */
.role-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--space-500);
  padding: var(--space-600) 0;
  border-top: var(--border-hairline);
}
.role-card:first-of-type { border-top: 0; padding-top: 0; }
/* Audit C-27: removed .role-card__logo, .role-card__logo img, .role-card__head,
   .role-card__company, .role-card__dates, .role-card__body, .role-card__tags.
   These BEM modifiers had no markup consumers; visible role-card styling lives
   in sections.css under #recent-work selectors. */


/* -----------------------------------------------------------------------------
   FAQRow
   ---
   Native <details> based. Click summary to expand, no JS required.
   ----------------------------------------------------------------------------- */
/* Task #229: the border-bottom that used to live here stacked with the
   #faq .faq-list > li { border-bottom } rule further down. Two 1 px
   hairlines rendered 1 px apart between every row, reading as a doubled
   line. The list-li rule is canonical; this one was redundant. */
.faq-row {
  /* border handled by #faq .faq-list > li */
}
/* Audit C-28: removed .faq-row__summary, .faq-row__summary::-webkit-details-marker,
   .faq-row__summary::after, .faq-row[open] .faq-row__summary::after, .faq-row__body.
   These BEM modifiers had no markup consumers; visible FAQ toggle styling lives
   in sections.css under #faq selectors. */


/* -----------------------------------------------------------------------------
   LinkUnderline
   ---
   The standing text link whose underline is a real border rather than
   text-decoration: semibold label, lime rule beneath, optional arrow that
   travels on hover and on keyboard focus. Consolidated 2026-08-10 from three
   hand-authored copies that had drifted to two widths and two hover
   behaviours ([id="insights"] .faq-cta a, [id="recent-work"] .hc-cta, and the
   shared cert-credential-link / faq-see-also rule).

   Deliberately tag agnostic. It lands on <a>, on <button> (three certification
   links are real buttons that open a modal), and on a non-focusable <span>
   inside a card link, where the CARD owns the hover and this element never
   fires its own.

   TWO declarations here are load-bearing and must not be tidied away:

   1. `position: relative` in the base. The shared 44px hit-area ::after over
      in sections.css positions against it, and used to inherit it from the
      section rules this component replaced.

   2. `text-decoration: none` inside the :hover/:focus-visible companion. The
      global `a:hover, a:focus-visible` rule in sections.css sets
      text-decoration: underline at (0,1,1), which BEATS a bare .link-underline
      at (0,1,0). Without a (0,2,0) companion every link here would render its
      border AND a text underline the moment you hover or Tab to it: the same
      doubled-line defect this component exists to end, relocated into the
      hover state. Compare the doubled FAQ hairline noted above; this file has
      met this bug class before.

   Do NOT give this component an ::after. SUP-121 records that a second
   ::after merged in the cascade with the shared hit-area ::after and rendered
   two icons per link. Use ::before if generated content is ever needed.

   Font size is deliberately NOT set here: the prose consumer sits at body size
   mid-sentence while the others sit at --text-meta. Size stays with context.
   ----------------------------------------------------------------------------- */
.link-underline {
  position: relative;
  border: none;
  border-bottom: 1.5px solid var(--color-border-brand);
  border-radius: 0;
  padding-bottom: 1px;
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-normal);
  color: var(--color-text-primary);
  background: none;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
}
.link-underline:hover,
.link-underline:focus-visible {
  color: var(--color-accent);
  border-color: var(--color-accent);
  text-decoration: none;
}

/* Icon variant: label plus trailing arrow. Held off the base so the prose
   consumer stays a plain inline box and its baseline, and the full stop after
   it, do not shift mid-sentence. */
.link-underline--icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-200);
}
.link-underline--icon .icon-size-xs {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-default);
}
.link-underline--icon:focus-visible .icon-size-xs {
  transform: translate(3px, -3px);
}
/* Hover half capability-gated; focus-visible stays outside. */
@media (hover: hover) {
  .link-underline--icon:hover .icon-size-xs {
    transform: translate(3px, -3px);
  }
}

/* Prose variant: the single instance living mid-sentence inside a <p>, with no
   arrow. Its underline is the ONLY hover signal it has, so it keeps the
   ink-on-light / white-on-dark border flip instead of the accent hover. In
   dark, --color-accent resolves to the same lime as --color-border-brand, so
   the accent hover would leave this link's rule visually unchanged and the
   hover would read as dead. Every other consumer has a travelling arrow as a
   second signal, so accent is enough for them. */
.link-underline--prose:hover,
.link-underline--prose:focus-visible {
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}


/* -----------------------------------------------------------------------------
   Visually hidden (utility, not a component but used everywhere)
   ----------------------------------------------------------------------------- */
.sr-only:not(:focus):not(:active) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Mobile carousel component (.ds-carousel)
   Opt in by adding `ds-carousel` + `data-ds-carousel` to a grid
   container. Below 768px the container becomes a swipeable
   scroll-snap track (one card per view) with a single row of dots
   (built by the ds-carousel init in index.html). At 769px and up it
   is inert and the container keeps its own grid layout. Dots + swipe
   only, no arrows. Selector note (audit AR-06): the section grid rules
   used to live behind raw #id scopes that only !important could beat;
   they are now flattened to [id="..."] attribute selectors (class tier,
   no :where() involved), and this component wins with its own honest
   specificity, the class plus the data-ds-carousel opt-in
   attribute (0,2,0), which also outranks the container layout rule
   `main > section.container-* > *` (0,1,2). No !important needed.
   ============================================================ */
@media (max-width: 767.98px) {
  /* Base carousel chrome at the component's natural specificity, so
     section-scoped rules (now [id=...] class-tier) can still tune margins
     and spacing the way they always did. */
  .ds-carousel[data-ds-carousel] {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Full-bleed the scroll track to the screen edges so a card slides off the
       viewport edge instead of vanishing at the section gutter. The negative
       inline margin cancels the section's var(--space-400) gutter (which is the
       full gutter at <=768px); padding-inline + scroll-padding-inline re-inset
       the cards so they rest and snap aligned to that gutter. Card width
       (flex: 0 0 100%) is unchanged because 100% now resolves against the
       padded content box, so it stays one card per view with no next-card peek.
       padding-block plus a matching negative margin-block gives vertical room
       so a card's hover lift + shadow are not clipped by overflow-y, which is
       forced to clip here because overflow-x is auto (CSS does not allow one
       axis to scroll while the other stays visible). Net vertical footprint is
       unchanged. */
    padding-inline: var(--space-400);
    scroll-padding-inline: var(--space-400);
    padding-block: var(--space-300);
    margin-block: calc(var(--space-300) * -1);
  }
  /* The doubled attribute is a deliberate specificity bump (0,3,0), carrying
     exactly the declarations that used to be !important: the carousel layout
     must beat the [id=...]-scoped section grid rules (0,2,0) that load after
     this file, and the container layout rule main > section.container-* > *
     (0,1,3). Everything else stays at natural specificity above (AR-06). */
  .ds-carousel[data-ds-carousel][data-ds-carousel] {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    gap: var(--space-300);
    /* Parent-agnostic full-bleed: force the track to the viewport width and
       centre it on the viewport, regardless of the parent's width/max-width
       (the #skills track is a direct .container-base child with an explicit
       width:100%, which a negative inline margin alone only shifts, not
       widens). width:100vw + margin-inline:calc(50% - 50vw) spans edge to edge;
       padding-inline + scroll-padding-inline re-inset cards to the text gutter.
       Only applies <=768px where the carousel is active; desktop is inert. */
    width: 100vw;
    max-width: none;
    margin-inline: calc(50% - 50vw);
  }
  .ds-carousel[data-ds-carousel]::-webkit-scrollbar { display: none; }
  .ds-carousel[data-ds-carousel] > * {
    min-width: 0;
    scroll-snap-align: start;
  }
  .ds-carousel[data-ds-carousel][data-ds-carousel] > * {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* The .ds-dots pagination component was deleted 2026-07-12 (deep-audit M-08):
   zero consumers since the unified .ds-carousel-nav shipped. */
@media (prefers-reduced-motion: reduce) {
  .ds-carousel { scroll-behavior: auto; }
}

/* The study's copy took the site's final carousel nav block on 1 Nov 2026 (chat VA STUDY BUILDER 1 NOV, SCROLL
   PATTERN's lock "one carousel look": the .ds-carousel-nav of PR #1223 itself, never a lookalike), replacing the
   old rail and counter. Copied from portfolio/assets/components.css; keep the two in step. */
/* ============================================================
   Carousel nav (.ds-carousel-nav)
   The one control under every carousel on the site, phones and strips
   alike (Nathan's final picks, 28 Oct 2026, chat CAROUSEL ALL): dots on
   the left, two round arrows on the right. It replaced the progress rail
   and the "N/total" counter. Both colours are the ink of whatever band
   the carousel sits on (--color-text-primary), so the Kind words lime
   band, dark mode and the Theme lab themes need no re-map.
   Dots: one per card, the current one stretched from 8px to 24px with
   the Glide motion (--duration-slow, --ease-emphasized, no overshoot).
   They are a picture of the position, aria-hidden like the rail they
   replace; a pointer may click one, and the arrows, the arrow keys and
   the polite live region ("Project 3 of 6") are the accessible route
   (WCAG 2.5.8's equivalent-control exception covers their size).
   Arrows: 44px circles, a 12% tint of the ink (--alpha-300), Apple's
   round paddles. Only the back arrow disables at the first card; the
   forward one rewinds from the last (the engine in index.html).
   ============================================================ */
.ds-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-400);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--color-text-primary);
}
.ds-carousel-nav__dots {
  display: flex;
  align-items: center;
  gap: var(--space-100);
  min-width: 0;
}
.ds-carousel-nav__dot {
  position: relative;
  flex: none;
  width: var(--space-200);
  height: var(--space-200);
  border-radius: var(--dot-radius);
  /* The resting dot is the 3:1 dot grey (5.1:1 light, 7.7:1 dark, 3.5:1 on the ink band),
     not 30% currentColor (2.0:1 light, 2.5:1 dark): WCAG 1.4.11 asks 3:1 for the parts that
     show a control's state. Nathan's pick 8 Nov 2026, chat A11Y COMPONENTS. In the study
     (8 Nov 2026, chat VIRGIN DOTS): 5.1:1 on The client's pink and 5.3:1 on the Four sizes
     blush, both from 2.0:1. */
  background: var(--color-dot-inactive);
  cursor: pointer;
  transition: width var(--duration-slow) var(--ease-emphasized),
              background-color var(--duration-slow) var(--ease-emphasized);
}
/* A taller pointer area that never overlaps the next dot. */
.ds-carousel-nav__dot::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-200)) calc(-1 * var(--space-50));
}
.ds-carousel-nav__dot[data-on] {
  width: var(--space-500);
  background: currentColor;
  cursor: default;
}
.ds-carousel-nav__pager {
  display: flex;
  align-items: center;
  gap: var(--space-300);
  flex: none;
  margin-inline-start: auto;
}
.ds-carousel-nav__arrow {
  position: relative;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--btn-radius);
  background: color-mix(in srgb, currentColor calc(var(--alpha-300) * 100%), transparent);
  color: inherit;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-default),
              opacity var(--duration-fast) var(--ease-default),
              transform var(--duration-fast) var(--ease-default);
}
/* The tint deepens on hover, behind the capability gate so a tap on a
   phone never leaves it latched. */
@media (hover: hover) {
  .ds-carousel-nav__arrow:hover:not(:disabled) { background: color-mix(in srgb, currentColor calc(var(--alpha-400) * 100%), transparent); }
}
.ds-carousel-nav__arrow:active:not(:disabled) { transform: scale(0.94); }
.ds-carousel-nav__arrow:focus-visible {
  outline: var(--border-focus);
  outline-offset: var(--focus-ring-offset);
}
/* Disabled controls are exempt from WCAG 1.4.3, so the low opacity is fine. */
.ds-carousel-nav__arrow:disabled { opacity: var(--opacity-disabled); cursor: default; }
.ds-carousel-nav__arrow i,
.ds-carousel-nav__arrow svg {
  width: var(--size-xl);
  height: var(--size-xl);
}
@media (prefers-reduced-motion: reduce) {
  .ds-carousel-nav__dot, .ds-carousel-nav__arrow { transition: none; }
}
@media (forced-colors: active) {
  /* Forced colours drop author backgrounds, which is all a dot is drawn
     with; the system pair keeps the current one readable. */
  /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- system colour keywords are the whole point under forced colours */
  .ds-carousel-nav__dot { forced-color-adjust: none; background: GrayText; }
  /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- system colour keywords are the whole point under forced colours */
  .ds-carousel-nav__dot[data-on] { background: CanvasText; }
  /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- system colour keywords are the whole point under forced colours */
  .ds-carousel-nav__arrow { border: 1px solid ButtonText; }
}
/* The nav the engine builds for a .ds-carousel (the phone carousels):
   phones only, unless its track is also a strip, where it serves 768 and
   up as well. The engine puts it straight after the track. */
.ds-carousel-nav--full { display: none; margin-top: var(--space-400); }
@media (max-width: 767.98px) {
  .ds-carousel-nav--full { display: flex; }
}
@media (min-width: 768px) {
  .ds-carousel--strip + .ds-carousel-nav--full { display: flex; }
}

/* The .placeholder component family was deleted 2026-07-12 (deep-audit n-29):
   zero consumers, never documented. */

/* (Audit M-49's inset focus rule deleted 2026-09-08, audit n-17: it named
   .glb-thumb, which went with the photo lightbox, and .full-track .f-card,
   which went with the testimonials rebuild to .kw-*. Zero consumers for
   either. The technique is
   still right where it is needed: negative outline-offset paints the halo
   inside an overflow:hidden parent instead of letting it be clipped.) */


/* -----------------------------------------------------------------------------
   Social badge (.sbtn)
   ---
   The hero's three outbound links: LinkedIn, GitHub, Figma. Replaces the round
   .btn--icon row that used Lucide's redrawn brand glyphs. Two reasons for the
   change, one legal and one editorial. LinkedIn's brand policy forbids modifying
   the [in] mark, and a stroke redraw is a modification; and a bare icon says
   nothing about what is on the other side, where "CONNECT ON / LinkedIn" does.

   Anatomy follows the app-store badge convention: official mark on the left, a
   small mono eyebrow over a bold wordmark on the right. The plate FOLLOWS the
   page (surface in both themes) rather than opposing it, so the row sits with
   the WCAG mark beside it instead of shouting over the hero.

   Namespaced --sbtn-* because --badge-* already belongs to the mono pill above.
   Marks live in assets/logos/ as official artwork; the [in] bug ships in three
   colourways because it is a FILE swap, not a tint.
   ----------------------------------------------------------------------------- */
.sbtn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sbtn-row-gap);
}
.sbtn {
  /* Hover repoints these three; every child reads them, so the eyebrow, the
     octocat and the arrow all follow without enumerating combinations. */
  --sbtn-bg: var(--color-surface);
  --sbtn-fg: var(--color-text-primary);
  --sbtn-eyebrow-fg: var(--color-text-tertiary);
  display: inline-flex;
  align-items: center;
  gap: var(--sbtn-gap);
  padding: var(--sbtn-pad-y) var(--sbtn-pad-x);
  min-height: var(--sbtn-min-h);
  border-radius: var(--sbtn-radius);
  background: var(--sbtn-bg);
  color: var(--sbtn-fg);
  /* The secondary button's outline, so the badges, the buttons and the WCAG
     badge share one soft edge (Nathan, W60 F, 2026-10-08). The name and the
     brand mark identify the link, so the edge needs no 3:1 (see .btn--icon). */
  border: 1px solid var(--btn-secondary-border);
  text-decoration: none;
  transition: var(--btn-transition);
}
/* The mark cell takes the shared mark height. With one line of text the MARK
   is the tallest thing in the pill, and Figma's mark is deliberately a size
   down (the only portrait mark, see .sbtn-m svg below). Measured without the
   height: LinkedIn and GitHub 46px, Figma 44px, three pills at two heights in
   one row. The Figma tower keeps its optical step down INSIDE a cell that
   agrees with the other two. */
.sbtn-m { display: grid; place-items: center; flex: none; height: var(--sbtn-mark); }
.sbtn-t {
  display: flex;
  flex-direction: column;
  gap: var(--sbtn-stack-gap);
  line-height: 1;
  text-align: left;
}
.sbtn-t small {
  font-family: var(--font-mono);
  font-size: var(--sbtn-eyebrow-size);
  font-weight: var(--sbtn-eyebrow-weight);
  letter-spacing: var(--tracking-wide);
  color: var(--sbtn-eyebrow-fg);
  /* Caps are a STYLE, not the content (audit n-11, 2026-09-08). Typed in
     capitals the source read CONNECT ON, which some screen readers spell out
     letter by letter. */
  text-transform: uppercase;
}
.sbtn-t strong {
  font-family: var(--font-display);
  font-size: var(--sbtn-label-size);
  font-weight: var(--sbtn-label-weight);
  letter-spacing: var(--tracking-tight);
}
/* Visible new-tab cue. aria-describedby="new-tab-note" carries this for screen
   readers; sighted users get the same arrow every other external link uses. */
/* Centred beside the name. The row badges are the name alone (Nathan, W60 F,
   2026-10-08: no Connect / View code / My plugin line); only the labelled
   variant keeps a lead line, and it lifts the arrow level with it below. */
.sbtn-arr {
  width: var(--btn-glyph-sm);
  height: var(--btn-glyph-sm);
  flex: none;
  align-self: center;
  opacity: 0.5;
  transition: transform var(--duration-fast) var(--ease-default),
              opacity var(--duration-fast) var(--ease-default);
}
/* One hover grammar, the same lime fill every transparent-at-rest control on the
   site answers with (see .btn--secondary, 2026-08-10). Gated to hover-capable
   pointers because Chromium sticks :hover after a tap. */
@media (hover: hover) {
  .sbtn:hover {
    --sbtn-bg: var(--brand-primary);
    --sbtn-fg: var(--brand-ink);
    --sbtn-eyebrow-fg: var(--brand-ink);
    --sbtn-gh-fg: var(--brand-ink);
    --sbtn-li-fg: var(--brand-ink);
    border-color: var(--color-border-brand);
  }
  .sbtn:hover .sbtn-arr { opacity: 1; transform: translate(2px, -2px); }
}
/* The global a:hover in sections.css sets colour AND an underline at (0,1,1),
   which outranks .sbtn at (0,1,0) and repainted the label with --color-link-hover
   mid-hover. Re-asserting at (0,2,1) takes the component's own colour back. That
   rule's own comment says affordances which already signal interactivity should
   not be double-marked, so dropping the underline here is the intended behaviour. */
.sbtn:hover,
.sbtn:focus-visible {
  color: var(--sbtn-fg);
  text-decoration: none;
}
.sbtn:focus-visible {
  --sbtn-bg: var(--brand-primary);
  --sbtn-fg: var(--brand-ink);
  --sbtn-eyebrow-fg: var(--brand-ink);
  --sbtn-gh-fg: var(--brand-ink);
  --sbtn-li-fg: var(--brand-ink);
  outline: 2px solid var(--btn-focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-color: var(--color-border-brand);
}
/* Press: the lime-dim step, the same one .btn--secondary:active and
   .btn--icon:active take, for the same stated reason: it is the cue that reads
   on TOUCH, where the lime hover fill above never fires. This component was the
   only interactive family on the site without one (2026-09-07). Every .btn had
   it; .sbtn shipped hover, focus and rest and simply stopped there, so the three
   hero badges were the one place a finger got no paint back. Found while giving
   the LinkedIn mark its moment: the mark moved and the plate under it did not.

   Declared AFTER the hover and focus blocks so it wins the (0,2,0) tie while
   they apply, exactly as the note on .btn--primary:active says. It repoints the
   same five custom properties the other two states do rather than setting
   background and color directly, which is what carries the eyebrow, the octocat
   and the [in] glyph with it without enumerating combinations. Dim, not full
   lime: a press is a step DOWN from the hover fill, not a second copy of it,
   and the value is opaque because the state-contrast gate's background walk
   cannot composite alpha. */
.sbtn:active {
  --sbtn-bg: var(--brand-primary-dim);
  --sbtn-fg: var(--brand-ink);
  --sbtn-eyebrow-fg: var(--brand-ink);
  --sbtn-gh-fg: var(--brand-ink);
  --sbtn-li-fg: var(--brand-ink);
  border-color: var(--color-border-brand);
}
/* Marks. One optical target for all three. The [in] bug is cropped to its rounded
   square (the (R) sat outside it and made the mark render ~15% short of the
   others). Figma is the exception and carries its own height: it is the only
   portrait mark here (2:3), and a tower matched by HEIGHT to a square glyph and
   a circular one reads a size larger than both, so it takes the optical step
   down --sbtn-mark-figma instead of the shared --sbtn-mark. */
.sbtn-m svg { width: var(--sbtn-mark); height: var(--sbtn-mark); display: block; }
.sbtn-m svg.sbtn-fg { width: auto; height: var(--sbtn-mark-figma); }
.sbtn-gh { color: var(--sbtn-gh-fg); }
.sbtn-li { display: none; width: auto; height: var(--sbtn-mark); flex: none; }
.sbtn-li--blue { display: block; }
[data-theme="dark"] .sbtn-li--blue { display: none; }
[data-theme="dark"] .sbtn-li--white { display: block; }
@media (hover: hover) {
  .sbtn:hover .sbtn-li--blue,
  .sbtn:hover .sbtn-li--white,
  [data-theme="dark"] .sbtn:hover .sbtn-li--white { display: none; }
  .sbtn:hover .sbtn-li--black,
  [data-theme="dark"] .sbtn:hover .sbtn-li--black { display: block; }
}
/* The mark's colourway follows every lit state, press included. Above 768 a
   touch device shows the PNG set and gets no hover, so without the press pair
   here a tap would paint brand blue on the lime-dim fill, which is the one
   pairing the three files exist to avoid. (0,3,0) clears the per-theme rules
   at (0,2,0); the hover half needs its (0,4,0) dark twin, these do not. */
.sbtn:focus-visible .sbtn-li--blue,
.sbtn:focus-visible .sbtn-li--white,
.sbtn:active .sbtn-li--blue,
.sbtn:active .sbtn-li--white { display: none; }
.sbtn:focus-visible .sbtn-li--black,
.sbtn:active .sbtn-li--black { display: block; }
/* The boxless glyph is mobile only, see the mark-only block below. Its mask
   image lives in the portfolio's sections.css, not here: this sheet is shared
   with other projects and must not reach for an asset only the portfolio
   ships. */
.sbtn-li-set { display: contents; }
.sbtn-li-glyph { display: none; }
/* -----------------------------------------------------------------------------
   WCAG conformance mark (.wcagm)
   ---
   Was a flat SVG export, so it could not agree with anything around it: its
   corner radius and its height were baked into the artwork, and next to the
   social badges at the foot of the hero it read as a different kind of object
   (Nathan 2026-08-20). Rebuilt as two cells in a shell that takes its geometry
   from the SOCIAL BADGE tokens rather than numbers of its own, so the two are
   the same height and the same radius by construction and cannot drift apart:
   change --sbtn-radius and both move together.
   The W3C mark stays vector artwork; "WCAG 2.2 AA" is real text on the same
   type tokens as a badge's eyebrow and wordmark, which is what makes the two
   text stacks resolve to the same height.
   The plate stays light in both themes, exactly like the artwork it replaces:
   this is a conformance mark, not a themed surface.
   ----------------------------------------------------------------------------- */
.wcagm {
  display: inline-flex;
  align-items: stretch;
  min-height: var(--sbtn-min-h);
  border-radius: var(--sbtn-radius);
  /* The same soft edge as .sbtn beside it (Nathan, W60 F, 2026-10-08). */
  border: 1px solid var(--btn-secondary-border);
  overflow: hidden;
}
.wcagm-w3c {
  display: grid;
  place-items: center;
  padding-inline: var(--sbtn-pad-x);
  background: var(--color-on-ink-emphasis);
}
/* Bigger than a social badge's mark on purpose: the W3C lockup is dense, and
   the artwork this replaces let it fill the plate. Still under the text cell's
   height, so the badge keeps taking its overall height from the badge tokens. */
.wcagm-w3c svg { height: var(--wcagm-mark); width: auto; display: block; }
/* Height: the same sum a social badge makes, its block padding either side of
   the mark cell (.sbtn and .sbtn-m), so the two stand the same height beside
   each other. Since the row badges lost their lead line (W60 F, 2026-10-08)
   the MARK sets their height, and this two-line stack under the full badge
   padding stood 3px taller (49 against 46). The stack centres in that height
   on a smaller step of padding, which only matters when larger text grows it
   past the badge. */
.wcagm-txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sbtn-stack-gap);
  min-height: calc(var(--sbtn-mark) + 2 * var(--sbtn-pad-y));
  padding: var(--space-100) var(--sbtn-pad-x);
  background: var(--ext-brand-wcag-amber);
  color: var(--brand-ink);
  line-height: 1;
}
.wcagm-txt b {
  font-family: var(--font-display);
  font-size: var(--sbtn-label-size);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
}
/* Display face and bold, not the mono eyebrow the social badges use: on the
   artwork this replaces the second line carries almost as much weight as the
   first, and a light mono line read as a caption hanging off the mark. The SIZE
   still comes from the badge's eyebrow token, the one the labelled badge's lead
   line uses, so the two-line stacks in the system share one second-line size. */
.wcagm-txt span {
  font-family: var(--font-display);
  font-size: var(--sbtn-eyebrow-size);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

/* Phone: mark only, below 600. Three labelled badges ate the fold, and a logo
   already says which service it is. The label stays in the DOM, clipped rather than removed,
   so the accessible name survives independently of the aria-label. Square, so
   the 44px target is met on both axes.
   36px visual + ghost target (Nathan 2026-08-27): the row plus the WCAG badge
   measured roughly 292px against roughly 288px available at 320px wide, which
   wrapped the third icon to its own line. --sbtn-min-h-sm buys the space back;
   --touch-target-min never moves, restored by the centred ::after below (same
   C42 pattern as the header icon buttons, gate-checked by touch-target-lint).
   nowrap on the row is a second, independent guard: even a future fourth icon
   should never internally wrap this row again.
   First pass shrank the icons to 32 and collapsed the badge to a bare W3C mark;
   Nathan rejected both (rectangles, not squares, because the mobile override
   set height but left the base rule's min-height:44 standing over it; and a
   redesigned badge rather than the same one at a smaller size). Corrected:
   min-height is overridden alongside height everywhere below, and the badge
   keeps its full mark+text composition, uniformly scaled to the SAME 36px
   the icons use via the wcagm.*-sm token group, never simplified. */
/* Name-and-arrow tier, 600 to 768 (Nathan 2026-09-12). The row badges carry
   no lead line at any width now (W60 F, 2026-10-08), so this tier is only the
   row guard: at 769 the row is three name pills, and this band must never wrap
   one of them onto a second line. 600 and not the 560 the first sketch
   suggested: with the web fonts blocked (a real first paint, before Anton and
   Work Sans arrive) the row and the WCAG badge only fit with room to spare
   from 600. 600 is a raw number because a media query cannot read a custom
   property. It is registered in tokens/breakpoints.shared.mjs with this
   reasoning, which is the gate that checks it. */
@media (min-width: 600px) and (max-width: 768px) {
  .sbtn-row { flex-wrap: nowrap; }
}

@media (max-width: 599.98px) {
  .sbtn-row { flex-wrap: nowrap; }
  .sbtn {
    padding: 0;
    width: var(--sbtn-min-h-sm);
    height: var(--sbtn-min-h-sm);
    min-height: var(--sbtn-min-h-sm);
    /* The corner gets its own phone value (2026-09-06, Nathan). A radius does not
       scale with its box: the shared 14px is 29% of the 49px plate on tablet, and
       was 39% of the old 36px square here, which read as a circle rather than as
       the same component one breakpoint down. --sbtn-radius-sm restores the
       PROPORTION rather than repeating the number. */
    border-radius: var(--sbtn-radius-sm);
    justify-content: center;
    flex: 0 0 auto;
    position: relative;
  }
  .sbtn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    transform: translate(-50%, -50%);
  }
  .sbtn-t,
  .sbtn-arr {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  /* The box comes off (Nathan 2026-08-20). With the wordmark clipped away, a
     solid blue tile sits next to a bare GitHub glyph and a bare Figma glyph and
     reads as the odd one out; the "in" on its own matches them.
     display: block on the SET, not on each image: the per-theme and per-hover
     rules above reach (0,4,0) and a media query adds no specificity of its own,
     so hiding the three files individually would mean out-specifying every one
     of those states. The wrapper has no competing rule at all. */
  .sbtn-li-set { display: none; }
  .sbtn-li-glyph {
    display: block;
    width: var(--sbtn-mark-sm);
    height: var(--sbtn-mark-sm);
  }
  /* Figma and GitHub stay plain <svg> at every width (only LinkedIn swaps to the
     boxless glyph above), so their size lives on the shared .sbtn-m svg rule. The
     phone override that used to sit here was deleted 2026-09-06: with the phone box
     back at the full 44px, --sbtn-mark-sm now aliases --sbtn-mark and the rule
     restated the base value. The tokens stay separate names so the phone mark can
     diverge again; the rule does not, because a rule that changes nothing is a rule
     someone later has to prove is dead. */

  /* WCAG badge shrinks to the SAME 36px height as the icons beside it (Nathan
     2026-08-27), keeping its exact desktop composition: W3C mark cell + amber
     "WCAG / 2.2 AA" text cell, side by side, nothing hidden. Every property
     that drives its size gets an explicit *-sm counterpart (mark height,
     padding, stack gap, both type sizes) rather than a single scale factor, so
     the badge stays crisp text at every size instead of a blurry CSS zoom.
     Width is left alone: unlike the square icons, this badge stays a rectangle
     at every size, so only height/min-height are pinned to match the icons. */
  .wcagm {
    height: var(--sbtn-min-h-sm);
    min-height: var(--sbtn-min-h-sm);
    /* Same phone corner as the icons beside it, for the same reason. The badge
       takes its geometry from the social-badge tokens by construction, so the two
       cannot drift apart: change --sbtn-radius-sm and both move. */
    border-radius: var(--sbtn-radius-sm);
  }
  .wcagm-w3c { padding-inline: var(--wcagm-pad-x-sm); }
  .wcagm-w3c svg { height: var(--wcagm-mark-sm); }
  .wcagm-txt {
    gap: var(--wcagm-stack-gap-sm);
    min-height: auto;
    padding: var(--wcagm-pad-y-sm) var(--wcagm-pad-x-sm);
  }
  .wcagm-txt b { font-size: var(--wcagm-label-size-sm); }
  .wcagm-txt span { font-size: var(--wcagm-eyebrow-size-sm); }
}

/* Labelled variant (.sbtn--labelled): the full pill at EVERY width (Nathan,
   2026-09-28). The row badges are the name alone and fall to the bare mark
   under 600, because the hero and footer rows must fit three badges and the
   WCAG mark on one line; a badge that is a card's only action has its column
   to itself, so it keeps its lead line ("View code") and its name on a phone.
   It hugs its words like the base pill, and max-width keeps a long line inside
   a narrow column. Declared after both tiers so it wins their ties at the same
   specificity. */
.sbtn--labelled { max-width: 100%; }
.sbtn--labelled .sbtn-t { min-width: 0; }
/* Level with the lead line, the way the two-line pill was drawn. */
.sbtn--labelled .sbtn-arr { align-self: flex-start; }
@media (max-width: 599.98px) {
  .sbtn.sbtn--labelled {
    width: auto;
    height: auto;
    min-height: var(--sbtn-min-h);
    padding: var(--sbtn-pad-y) var(--sbtn-pad-x);
    border-radius: var(--sbtn-radius);
    justify-content: flex-start;
  }
  /* Undo the tier's visually-hidden clip on the words and the arrow. */
  .sbtn--labelled :is(.sbtn-t, .sbtn-arr) {
    position: static;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: nowrap;
  }
  .sbtn--labelled .sbtn-t { display: flex; width: auto; height: auto; }
  .sbtn--labelled .sbtn-arr { width: var(--btn-glyph-sm); height: var(--btn-glyph-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .sbtn:hover .sbtn-arr { transform: none; }
}


/* ---------------------------------------------------------------------------
   THIS BLOCK MUST STAY LAST IN THE FILE.
   It sets border-WIDTH only, at the same (0,1,0) specificity as the component
   rules it covers, so anything declaring a `border:` SHORTHAND after it wins
   and silently resets the width back to 1px. That is not hypothetical: the
   .sbtn section was appended below this block, so adding .sbtn to the list
   above changed nothing until the block moved down here (measured 2026-08-25:
   .sbtn still computed 1px at 1.25/1.333/1.5 with the selector added but the
   block still sitting mid-file). If you add a component below this point, move
   this block down again rather than adding a second copy.
   --------------------------------------------------------------------------- */
/* ============================================================
   Fractional-DPR outline crispness (2026-07-02 review, group 2).
   On screens whose devicePixelRatio is fractional (Windows laptops at
   125%/150% scaling report 1.25/1.5; a 16in in-car display measured
   1.333), a 1px border maps onto one-and-a-fraction
   physical pixels and anti-aliases into an uneven, fractured line.
   A whole 2px keeps control outlines crisp in that window; true 1x
   and integer 2x (Retina) screens are excluded and keep the 1px look.
   Deliberate trade-offs:
   - Desktop browser zoom (roughly 110-175% on a 1x screen) also lands
     in the window, so outlines thicken while zoomed. Accepted.
   - Controls only: cards and dividers stay 1px (the --border-hairline
     composite is NOT touched; it has ~44 consumers).
   - Bumping the BASE .btn is deliberate: border-box keeps geometry
     stable, the primary's lime-on-lime border stays invisible, and
     side-by-side primary + secondary CTAs keep identical text metrics.
   - Any later `border:` SHORTHAND on these controls silently resets
     the width inside this window; override with border-color /
     border-style instead.
   - .sbtn joined 2026-08-25. It carries a load-bearing 1px control
     boundary of its own and used to be covered here as the portfolio's
     `.icon-row a`; PR #396 rebuilt that row as .sbtn, which carries no
     .btn class, so the bump quietly stopped applying to the hero social
     badges. Measured on the live page before the fix: .btn--secondary
     (same border token) read 2px at 1.25/1.333/1.5 while .sbtn read 1px
     at every one of them.
   min/max-resolution dppx form (not range syntax) for Safari reach. */
@media (min-resolution: 1.1dppx) and (max-resolution: 1.9dppx) {
  .btn,
  .chip,
  .badge,
  .sbtn {
    border-width: 2px;
  }
}

/* -----------------------------------------------------------------------------
   Glyph moments
   ---
   TWO TIERS (2026-09-07). Every interactive glyph moves; how much it moves
   depends on whether its own shape has something to say.

   1. The shared default, gm-perk: a quick scale up with a tilt, settling past
      centre. Inherited by every glyph with no signature of its own, so no
      icon on the site is ever silent and a NEW icon needs no decision to feel
      alive. It is the safety net, not the ambition. A glyph opts out by
      setting --gm-perk: none on itself, which is how the signature list below
      declines it; keep the opt-out next to the signature that replaces it.
   2. A signature, told by the glyph's own parts, 300 to 500ms, back to rest
      on leave: the back arrow draws a bow, a carousel chevron nudges in its
      direction of travel, the chip's sparkles twinkle, a document's
      text lines write themselves in, the download arrow bobs into a dipping
      tray, Figma's five pieces burst and reassemble, the octocat nods,
      LinkedIn's dot drops onto its bar, the design system's four parts
      take a quarter turn into each other's places, the moon tips back and
      the sun's rays tick round one step. Picked by Nathan from the
      glyph-lab mockup (2026-09-06), the icon-motion lab (2026-09-07) and
      the theme-hover lab (2026-10-09), after the theme-lab flask set the bar.

   The external arrow keeps its nudge above and the mail glyph keeps its
   shake, so both decline the default too. The WCAG mark and the book glyph
   deliberately stay still. Logos move, never recolour.

   The hamburger is the one STATE morph rather than a hover moment: the button
   used to hold a menu glyph and an x glyph and swap which was visible, so
   opening the drawer had nothing to animate and the click read as a glitch.
   Now the three bars ARE the X. It is driven by the button's own
   aria-expanded, so what a screen reader hears and what the eye sees cannot
   drift apart, and it kept its Lucide glyph (no hand-drawn svg) because
   translate and rotate are separate properties and can carry their own delay
   on one element. Its old hover wave is deleted: a second, unrelated hover
   move competed with the morph that is the actual interaction.

   Mechanism: any hovered, focused or PRESSED link or button sets one custom
   property per moment; each glyph part declares its animation ONCE and reads
   that property for its name. Leave the host and the property is gone, the
   animation is removed, the part is back on its rest frame. Parts are
   addressed by their position inside the Lucide svg (checked against the
   vendored 0.474.0 build), so the site's icon re-render needs no re-wiring.
   The hover setter sits behind the capability gate (a tap must not latch
   it); focus-visible sits outside it, and so does .is-pressed.

   .is-pressed is the TOUCH way in, and it is why this block was half dead
   (2026-09-07, Nathan, from a phone). A phone has no hover, so the capability
   gate correctly withholds the hover setter; it also does not fire
   focus-visible on a tap, because a tap is not keyboard navigation. Between
   the two, every moment below had NO trigger on the device most people read
   the site on: the theme-lab flask sat still when it was tapped while doing
   the full shake-and-bubble on a desktop an arm's length away. The hamburger
   was the only header control that answered a tap, and only because it is a
   state morph off aria-expanded rather than a pointer moment, which is
   exactly why Nathan reads it as the one that works.

   The class is added on pointerdown and removed one beat later by the
   press-moment script in index.html. It is a script and not plain :active
   because :active is only true while the finger is DOWN: a tap is over in
   under 100ms, the property vanishes with the state, and the animation is
   removed mid-flight and snaps to its rest frame. What you see is a twitch,
   which is worse than nothing. Latching for one beat is what makes a press
   read as the same moment a hover gives, and it cannot stick the way a
   hover does, because nothing waits on the finger coming back off.

   Every duration is a multiple of --duration-slow, so reduced motion
   collapses the lot with the site. Overshoots are written into the keyframes
   rather than a spring curve, so the timing stays on the tokenised curves.
   ----------------------------------------------------------------------------- */
:root {
  --gm-t1: calc(var(--duration-slow) * 0.75);
  --gm-t2: var(--duration-slow);
  --gm-t3: calc(var(--duration-slow) * 1.25);
  --gm-beat: calc(var(--duration-fast) * 0.4);
  /* The gap between the hamburger's two beats: travel, then rotate. */
  --gm-menu-stage: calc(var(--gm-t1) * 0.45);
}
@media (hover: hover) {
  :is(a, button):not(:disabled):hover {
    --gm-perk: gm-perk;
    --gm-back: gm-bow; --gm-back-shaft: gm-stretch;
    --gm-spark: gm-pop; --gm-spark-small: gm-blink;
    --gm-doc: gm-write; --gm-doc-page: gm-lift;
    --gm-dl: gm-bob; --gm-dl-tray: gm-dip;
    --gm-fig: gm-burst;
    --gm-gh: gm-nod;
    --gm-li-dot: gm-ping-dot; --gm-li-bar: gm-ping-bar; --gm-li-arch: gm-ping-arch;
    --gm-li-mark: gm-li-mark;
    --gm-ds: gm-index;
    --gm-moon: gm-tip; --gm-sun-ray: gm-tick; --gm-sun-core: gm-squeeze;
  }
}
:is(a, button):not(:disabled):focus-visible,
:is(a, button):not(:disabled).is-pressed {
  --gm-perk: gm-perk;
  --gm-back: gm-bow; --gm-back-shaft: gm-stretch;
  --gm-spark: gm-pop; --gm-spark-small: gm-blink;
  --gm-doc: gm-write; --gm-doc-page: gm-lift;
  --gm-dl: gm-bob; --gm-dl-tray: gm-dip;
  --gm-fig: gm-burst;
  --gm-gh: gm-nod;
  --gm-li-dot: gm-ping-dot; --gm-li-bar: gm-ping-bar; --gm-li-arch: gm-ping-arch;
  --gm-li-mark: gm-li-mark;
  --gm-ds: gm-index;
  --gm-moon: gm-tip; --gm-sun-ray: gm-tick; --gm-sun-core: gm-squeeze;
}

/* A root <svg> clips to its viewBox by default, and these glyphs are drawn
   right up to that edge: LinkedIn's dot has its stroke at y=1 with a 3.5px
   lift to make, and Figma's top pieces sit at y=1 and travel 2px up. So the
   moment a part moves outward it gets sliced off mid-gesture, which reads as
   a rendering fault rather than motion. Every glyph with a moving part opts
   out of the clip. Nothing here travels more than a few px, so the parts stay
   well inside the 44px button around them. */
[data-lucide="arrow-left"],
[data-lucide="component"],
[data-lucide="download"],
[data-lucide="figma"],
[data-lucide="file-text"],
[data-lucide="github"],
[data-lucide="linkedin"],
[data-lucide="sparkles"],
.sbtn-fg, .sbtn-gh { overflow: visible; }

/* SVG children pivot on the icon's top-left corner unless told otherwise;
   every animated part states its origin in view-box units. */
[data-lucide="arrow-left"] > path,
[data-lucide="menu"] > line,
[data-lucide="sparkles"] > path,
[data-lucide="file-text"] > path,
[data-lucide="download"] > *,
[data-lucide="figma"] > path,
[data-lucide="linkedin"] > *,
[data-lucide="component"] > path,
[data-lucide="moon"] > path,
[data-lucide="sun"] > *,
.sbtn-fg > path { transform-box: view-box; }

/* TIER 1, the shared default. Every glyph reads it; the ones with a signature
   or an existing moment of their own decline it on the next line. The root
   <svg> is a replaced element in HTML flow, so it takes the usual 50% 50%
   origin and needs no transform-box. */
[data-lucide] { animation: var(--gm-perk, none) var(--gm-t2) var(--ease-default) both; }
[data-lucide="arrow-left"],
[data-lucide="arrow-up-right"],
[data-lucide="chevron-left"],
[data-lucide="chevron-right"],
[data-lucide="component"],
[data-lucide="download"],
[data-lucide="figma"],
[data-lucide="file-text"],
[data-lucide="github"],
[data-lucide="linkedin"],
[data-lucide="mail"],
[data-lucide="menu"],
/* moon + sun decline it because they already have a moment, and the perk was
   EATING it (2026-09-07). Both glyphs live in the theme toggle's cross-fade,
   which animates transform (a rotate and a scale) through a transition; the
   perk is an animation on the same element and the same property, and a
   running animation beats a transition outright. With `both` fill it also
   holds its last frame for as long as the host is hovered, so the toggle's
   rotation was suppressed for the whole hover rather than just during the
   perk. What was left was an opacity-and-blur cross-fade, which is precisely
   the "it does it, but it's very quick" Nathan reported. The swap is their
   click; see .theme-toggle-swap .theme-toggle-icon in sections.css. Their
   hover signature (the moon's tip, the sun's tick, below) moves the PARTS
   inside the svg, never the root, for the same reason. */
[data-lucide="moon"],
[data-lucide="sun"],
[data-lucide="sparkles"] { --gm-perk: none; }
@keyframes gm-perk {
  0%   { transform: scale(1) rotate(0); }
  40%  { transform: scale(1.14) rotate(-8deg); }
  72%  { transform: scale(0.98) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}
/* A press runs the shared default one tier longer than a hover does. A finger
   COVERS the glyph it is pressing and lifts around 100ms in, so a --gm-t2
   moment is mostly spent under the fingertip and the tap reads as dead: this
   is Nathan's "if it's too quick, your finger's still there and you don't see
   it". --gm-t3 is the hamburger's own rotate beat, the one control he reads as
   landing right on a phone, so the whole set now answers a press on that beat.
   Only the root svg is touched, which is where the shared perk lives; every
   signature is declared on the glyph's PARTS and already runs at t1 to t3. */
:is(a, button):not(:disabled).is-pressed [data-lucide] { animation-duration: var(--gm-t3); }

/* Back arrow: pulled back while its shaft stretches, released past rest.
   The floating back chip keeps its own wind-and-shoot on the svg; the shaft
   stretch below rides on top of it. */
[data-lucide="arrow-left"] { animation: var(--gm-back, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="arrow-left"] > path:nth-child(2) { transform-origin: 5px 12px; animation: var(--gm-back-shaft, none) var(--gm-t3) var(--ease-default) both; }
@keyframes gm-bow     { 0% { transform: translateX(0); } 30% { transform: translateX(3px); } 62% { transform: translateX(-4px); } 100% { transform: translateX(0); } }
@keyframes gm-stretch { 0% { transform: scaleX(1); } 30% { transform: scaleX(1.28); } 62% { transform: scaleX(0.92); } 100% { transform: scaleX(1); } }

/* Carousel chevrons have NO glyph-level moment. They shipped with a nudge in
   the direction of travel (2026-09-06), lost a drop-shadow ghost on
   2026-09-07 because the smear read as a rendering fault, and lost the nudge
   itself the same day: a bare arrow travelling toward the edge of its own tap
   target reads as the control backing away from the cursor. The whole button
   now scales instead, in .ds-carousel-nav__arrow above, so the moment belongs
   to the control rather than to the glyph inside it. They keep the --gm-perk
   opt-out below: the shared default adds an 8deg tilt, and a tilted chevron
   stops pointing where it points. */

/* Hamburger, the cross fold. The middle bar dissolves while the outer two
   travel to the centre, then rotate into the X; closing runs the beats
   backwards. Lucide draws the middle bar first, then the top, then the
   bottom, and each bar pivots on its OWN midpoint so the rotate happens in
   place before the travel moves it.

   translate and rotate are individual transform properties, not a transform
   list, for two reasons. They compose as translate * rotate, so the rotate
   lands first and pivots in place; and each takes its own transition-delay,
   which is what buys the two beats on a single element and keeps this a
   Lucide glyph instead of a hand-drawn svg with wrapper groups.

   Reversal is the delay list, not a second animation: the base rule is the
   CLOSING state (rotate unwinds first, then the bars travel home) and the
   open rule swaps the two delays. The state comes from the button's own
   aria-expanded, already set by Alpine, so the visual and the announced
   state are the same fact and there is no second flag to keep in step. */
[data-lucide="menu"] > line {
  transition: translate var(--gm-t1) var(--ease-emphasized) var(--gm-menu-stage),
              rotate var(--gm-t3) var(--ease-emphasized) 0ms,
              opacity var(--gm-t1) var(--ease-default) var(--gm-menu-stage),
              scale var(--gm-t1) var(--ease-default) var(--gm-menu-stage);
}
[data-lucide="menu"] > line:nth-child(1) { transform-origin: 12px 12px; }
[data-lucide="menu"] > line:nth-child(2) { transform-origin: 12px 6px; }
[data-lucide="menu"] > line:nth-child(3) { transform-origin: 12px 18px; }
button[aria-expanded="true"] [data-lucide="menu"] > line {
  transition-delay: 0ms, var(--gm-menu-stage), 0ms, 0ms;
}
button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(1) { opacity: 0; scale: 0.15 1; }
button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(2) { translate: 0 6px; rotate: 45deg; }
button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(3) { translate: 0 -6px; rotate: -45deg; }

/* Sparkles: the big star shrinks, then pops back past size with a small
   twist; the two little sparks blink off and on after it, a beat apart. */
[data-lucide="sparkles"] > path:nth-child(1) { transform-origin: 12px 12px; animation: var(--gm-spark, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="sparkles"] > path:nth-child(2),
[data-lucide="sparkles"] > path:nth-child(3) { transform-origin: 20px 5px; animation: var(--gm-spark-small, none) var(--gm-t2) var(--ease-emphasized) both; animation-delay: calc(var(--gm-beat) * 2); }
[data-lucide="sparkles"] > path:nth-child(4),
[data-lucide="sparkles"] > path:nth-child(5) { transform-origin: 4px 18px; animation: var(--gm-spark-small, none) var(--gm-t2) var(--ease-emphasized) both; animation-delay: calc(var(--gm-beat) * 4); }
@keyframes gm-pop   { 0% { transform: scale(1) rotate(0); } 28% { transform: scale(0.68) rotate(-10deg); } 66% { transform: scale(1.16) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes gm-blink { 0% { transform: scale(1); } 25% { transform: scale(0); } 65% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* Moon and sun, a hint of the click's own turn (Nathan's Turn pick from the
   theme-hover lab, 2026-10-09). The moon tips back and settles past rest;
   the sun's eight rays tick round one step while its middle dips. The rays
   land on 45deg, which draws exactly like rest, so holding the last frame
   while hovered and dropping it on leave are both invisible. Parts only: the
   root svg carries the click swap as a transition, and an animation on the
   root's transform would beat it (the perk opt-out above). Lucide's sun is
   the core circle then eight ray paths, so `> *` is the whole glyph. */
[data-lucide="moon"] > path { transform-origin: 12px 12px; animation: var(--gm-moon, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="sun"] > path { transform-origin: 12px 12px; animation: var(--gm-sun-ray, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="sun"] > circle { transform-origin: 12px 12px; animation: var(--gm-sun-core, none) var(--gm-t3) var(--ease-default) both; }
@keyframes gm-tip     { 0% { transform: rotate(0); } 35% { transform: rotate(-22deg); } 70% { transform: rotate(7deg); } 100% { transform: rotate(0); } }
@keyframes gm-tick    { 0% { transform: rotate(0); } 65% { transform: rotate(53deg); } 100% { transform: rotate(45deg); } }
@keyframes gm-squeeze { 0% { transform: scale(1); } 40% { transform: scale(0.82); } 100% { transform: scale(1); } }

/* Document: the three text lines write themselves in from the left, one
   after another, while the page lifts a hair. Dash lengths are the lines'
   real lengths in view-box units (2, 8, 8), so no pathLength is needed. At
   the 13px certificate links the glyph grows a fifth for the moment instead
   of taking the shared up-right nudge, which belongs to the arrow. */
[data-lucide="file-text"] > path:nth-child(1) { transform-origin: 4px 22px; animation: var(--gm-doc-page, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="file-text"] > path:nth-child(n+3) { stroke-dasharray: var(--gm-len); animation: var(--gm-doc, none) var(--gm-t1) var(--ease-exit) both; }
[data-lucide="file-text"] > path:nth-child(3) { --gm-len: 2; }
[data-lucide="file-text"] > path:nth-child(4) { --gm-len: 8; animation-delay: calc(var(--gm-beat) * 1.5); }
[data-lucide="file-text"] > path:nth-child(5) { --gm-len: 8; animation-delay: calc(var(--gm-beat) * 3); }
@keyframes gm-write { 0% { stroke-dashoffset: calc(var(--gm-len) * -1); } 100% { stroke-dashoffset: 0; } }
@keyframes gm-lift  { 0% { transform: translateY(0); } 45% { transform: translateY(-1px); } 100% { transform: translateY(0); } }
.link-underline--icon:focus-visible [data-lucide="file-text"] { transform: scale(1.2); }
@media (hover: hover) {
  .link-underline--icon:hover [data-lucide="file-text"] { transform: scale(1.2); }
}

/* Download: the arrow bobs toward the tray and springs back; the tray dips
   under it a beat later. */
[data-lucide="download"] > polyline,
[data-lucide="download"] > line { animation: var(--gm-dl, none) var(--gm-t2) var(--ease-default) both; }
[data-lucide="download"] > path { animation: var(--gm-dl-tray, none) var(--gm-t2) var(--ease-default) both; }
@keyframes gm-bob { 0% { transform: translateY(0); } 40% { transform: translateY(3px); } 72% { transform: translateY(-0.6px); } 100% { transform: translateY(0); } }
@keyframes gm-dip { 0%, 30% { transform: translateY(0); } 55% { transform: translateY(1.2px); } 80% { transform: translateY(-0.4px); } 100% { transform: translateY(0); } }

/* Figma: the five pieces move apart along their own axes and snap back
   together. Each piece keeps its shape and colour. The official mark on the
   hero badge is the same five pieces in a different order and a 300-unit
   view box, hence the role mapping and --gm-u (units per px). */
[data-lucide="figma"] { --gm-u: 1; }
.sbtn-fg { --gm-u: 12.5; }
[data-lucide="figma"] > path, .sbtn-fg > path { animation: var(--gm-fig, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="figma"] > path:nth-child(1), .sbtn-fg > path:nth-child(3) { --gm-bx: -2; --gm-by: -2; }
[data-lucide="figma"] > path:nth-child(2), .sbtn-fg > path:nth-child(4) { --gm-bx: 2;  --gm-by: -2; }
[data-lucide="figma"] > path:nth-child(3), .sbtn-fg > path:nth-child(5) { --gm-bx: 2;  --gm-by: 0; }
[data-lucide="figma"] > path:nth-child(4), .sbtn-fg > path:nth-child(1) { --gm-bx: -2; --gm-by: 2; }
[data-lucide="figma"] > path:nth-child(5), .sbtn-fg > path:nth-child(2) { --gm-bx: -2; --gm-by: 0; }
@keyframes gm-burst {
  0%   { transform: translate(0, 0); }
  38%  { transform: translate(calc(var(--gm-bx) * var(--gm-u) * 1px), calc(var(--gm-by) * var(--gm-u) * 1px)); }
  70%  { transform: translate(calc(var(--gm-bx) * var(--gm-u) * -0.25px), calc(var(--gm-by) * var(--gm-u) * -0.25px)); }
  100% { transform: translate(0, 0); }
}

/* GitHub: the octocat nods, whether it is Lucide's outline or the official
   one-path mark on the hero badge. */
[data-lucide="github"], .sbtn-gh { transform-origin: 50% 100%; animation: var(--gm-gh, none) var(--gm-t3) var(--ease-default) both; }
@keyframes gm-nod { 0% { transform: rotate(0) translateY(0); } 35% { transform: rotate(-16deg) translateY(-2px); } 70% { transform: rotate(7deg); } 100% { transform: rotate(0) translateY(0); } }

/* LinkedIn: the dot lifts and drops, the bar squashes under the landing, and
   the arch answers a beat later. The mark's own three parts, the way Figma's
   burst uses its five. Lucide draws the arch path, then the bar rect, then
   the dot circle. Until now this glyph was the only one in the footer row
   that did nothing at all. */
[data-lucide="linkedin"] > path   { transform-origin: 16px 21px; animation: var(--gm-li-arch, none) var(--gm-t3) var(--ease-default) both; animation-delay: var(--gm-beat); }
[data-lucide="linkedin"] > rect   { transform-origin: 4px 21px;  animation: var(--gm-li-bar, none) var(--gm-t3) var(--ease-default) both; }
[data-lucide="linkedin"] > circle { transform-origin: 4px 4px;   animation: var(--gm-li-dot, none) var(--gm-t3) var(--ease-default) both; }
@keyframes gm-ping-dot {
  0%   { transform: translateY(0) scale(1); }
  36%  { transform: translateY(-3.5px) scale(1.08); }
  64%  { transform: translateY(0) scale(0.86); }
  82%  { transform: translateY(-0.6px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes gm-ping-bar {
  0%, 46% { transform: scaleY(1); }
  66%     { transform: scaleY(0.9); }
  86%     { transform: scaleY(1.03); }
  100%    { transform: scaleY(1); }
}
@keyframes gm-ping-arch {
  0%   { transform: translateY(0); }
  44%  { transform: translateY(-1.4px); }
  100% { transform: translateY(0); }
}
/* The hero badge's LinkedIn mark takes the same ping WHOLE (2026-09-07). It was
   the last mark on the site that did nothing on any device, and after the press
   moment landed it was the only one of the three hero badges that stayed still
   under a finger: Figma bursts and the octocat nods, both inline svg with parts
   to move, and LinkedIn had none to move.

   It has none because it is not a drawing here, and deliberately so. Above 768
   the mark is one of three official PNG colourways swapped by display; at 768
   and below it is a single masked box painted with --sbtn-li-fg (the boxless
   glyph, see .sbtn-li-glyph in the portfolio's sections.css). Both are real
   boxes, so both take a transform even though neither has parts, and one
   selector covers the two: only ever one of them is displayed at a time.

   No squash and no scale, unlike the dot this borrows its timing from. The
   house rule is that logos move but are never recoloured, squashed or
   mirrored, and squashing an official mark is exactly what that forbids; the
   keyframes here are the 36/64/82 rhythm of gm-ping-dot with the scale terms
   dropped, so the hero badge and the footer's Lucide glyph read as one idea
   (a notification landing) without the trademark being deformed to say it.
   3px on a 28px mark, well inside the 44px plate around it, so nothing clips. */
.sbtn-li,
.sbtn-li-glyph { animation: var(--gm-li-mark, none) var(--gm-t3) var(--ease-default) both; }
@keyframes gm-li-mark {
  0%   { transform: translateY(0); }
  36%  { transform: translateY(-3px); }
  64%  { transform: translateY(0); }
  82%  { transform: translateY(-0.8px); }
  100% { transform: translateY(0); }
}

/* Design system: the four parts take a quarter turn around the centre,
   gathering in and fanning back out, and land in each other's places.
   Interchangeable parts, one shape, which is the whole argument for a system
   and the reason this glyph earns a signature rather than the default.
   The glyph has 4-fold symmetry about 12,12, so a 90deg landing is the rest
   frame again and the animation can drop cleanly on leave. Lucide draws the
   parts right, left, bottom, top, so the stagger below runs them clockwise
   from the top rather than in document order, which would jump across the
   glyph and read as noise. */
[data-lucide="component"] > path { transform-origin: 12px 12px; animation: var(--gm-ds, none) var(--gm-t3) var(--ease-emphasized) both; }
[data-lucide="component"] > path:nth-child(4) { animation-delay: 0ms; }
[data-lucide="component"] > path:nth-child(1) { animation-delay: var(--gm-beat); }
[data-lucide="component"] > path:nth-child(3) { animation-delay: calc(var(--gm-beat) * 2); }
[data-lucide="component"] > path:nth-child(2) { animation-delay: calc(var(--gm-beat) * 3); }
@keyframes gm-index {
  0%   { transform: rotate(0) scale(1); }
  46%  { transform: rotate(50deg) scale(0.82); }
  100% { transform: rotate(90deg) scale(1); }
}

/* Reduced motion: the durations already collapse to 1ms with the tokens;
   this holds every part on its rest frame outright. */
@media (prefers-reduced-motion: reduce) {
  [data-lucide],
  :is(a, button):not(:disabled).is-pressed [data-lucide],
  [data-lucide="arrow-left"], [data-lucide="arrow-left"] > path,
  [data-lucide="menu"] > line, [data-lucide="sparkles"] > path,
  [data-lucide="file-text"] > path, [data-lucide="download"] > *,
  [data-lucide="figma"] > path, .sbtn-fg > path,
  [data-lucide="linkedin"] > *, [data-lucide="component"] > path,
  [data-lucide="moon"] > path, [data-lucide="sun"] > *,
  .sbtn-li, .sbtn-li-glyph,
  [data-lucide="github"], .sbtn-gh { animation: none; transition: none; }
  .link-underline--icon:hover [data-lucide="file-text"],
  .link-underline--icon:focus-visible [data-lucide="file-text"] { transform: none; }
  /* The hamburger still has to READ as open, it just gets there in one
     frame: the transition above is gone, these are the landed positions. */
  button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(1) { opacity: 0; scale: 0.15 1; }
  button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(2) { translate: 0 6px; rotate: 45deg; }
  button[aria-expanded="true"] [data-lucide="menu"] > line:nth-child(3) { translate: 0 -6px; rotate: -45deg; }
}

/* ===========================================================================
   ORBIT, the contact circle (2026-09-15)

   The one bespoke contact control, and deliberately the only one. Everywhere a
   button will do, the site uses .btn; the orbit exists for the two places with
   room for a piece of drawn type: the hero, beside the WCAG badge, and the
   footer slab on a desktop. Below 1024 both of those compositions stack and the
   orbit is not rendered at all, so there is no small-screen variant to design.

   It is a real <a href="mailto:">, not a styled div, and it carries a visually
   hidden label because its visible type rides an SVG path.

   Structure, outside in: the rotating ring of three phrases and their dots, the
   ink disc, a plate under the glyph, then the mail glyph itself. No hairline
   rim: the words hug the disc, the About print's badge drawn at this size
   (Nathan, W60 F, 2026-10-08). The plate is load bearing on the footer, where a
   lime glyph on a lime slab would otherwise vanish.

   THE DRAWING HAS ONE SOURCE. renderOrbit in tokens/components.manifest.js
   writes both circles, and it sets four custom properties on the anchor from
   the same numbers: --orbit-type (the word size, in drawing units),
   --orbit-ring (the words' baseline radius), --orbit-disc (the disc's
   diameter) and --orbit-glyph (the envelope's width), the last three as shares
   of the control. The rules below, hero-intro.js and the Theme lab's ring
   fitter read those, so none of them hard-codes the geometry.
   ========================================================================= */
.nm-orbit {
  --orbit-size: var(--space-1000);
  /* HOW FAR IT SWELLS, in one place, because the pointer half and the keyboard
     half have to agree and they are declared apart (the pointer one sits behind
     @media (hover: hover), the keyboard one must not). Was 1.75, which took the
     128px control to 224px and, in Nathan's words, "expands too large and it's
     interfering with things" (2026-09-16). 1.25 is 160px, a 29% smaller footprint
     at the same rest size, which is the ~30% he asked for. */
  --orbit-swell: 1.25;
  position: relative;
  z-index: 2;
  display: block;
  width: var(--orbit-size);
  height: var(--orbit-size);
  border-radius: var(--btn-radius);
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--duration-slow) var(--ease-emphasized);
}
.nm-orbit,
.nm-orbit:hover,
.nm-orbit:focus,
.nm-orbit:active { text-decoration: none; }
/* The focus half of the swell lives HERE, in the one :focus-visible rule, not
   beside its hover twin further down: the swell is a transform, so the pointer
   half has to sit behind @media (hover: hover) and the keyboard half must not.
   Written as two rules it was the same selector twice, which is a lint error
   and, more to the point, two places to change one state. */
.nm-orbit:focus-visible {
  outline: var(--border-focus);
  outline-offset: var(--space-200);
  transform: scale(var(--orbit-swell));
}
.nm-orbit-svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* NO will-change HERE, deliberately. A `will-change: transform` on :hover was
   tried as a fix for the rim type and is gone again: it promotes a layer at the
   moment the pointer arrives, which is itself a repaint, so it risks causing
   the very thing it was meant to cure, and nothing measured it as a win. The
   swell alone was measured at 0.064 degrees of angular jitter per frame at rest
   against 0.057 while swelling, so the scale was never the cause. */

.nm-orbit-type {
  fill: var(--color-text-primary);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: var(--orbit-type);
  letter-spacing: var(--tracking-label);
}
.nm-orbit-sep { fill: var(--brand-primary-dim); }
.nm-orbit-core { fill: var(--color-accent); stroke: var(--color-accent); }
.nm-orbit-pad { fill: var(--color-accent); }
.nm-orbit-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: calc(var(--orbit-size) * var(--orbit-glyph));
  height: calc(var(--orbit-size) * var(--orbit-glyph));
  margin: calc(var(--orbit-size) * var(--orbit-glyph) / -2) 0 0 calc(var(--orbit-size) * var(--orbit-glyph) / -2);
  color: var(--color-on-accent);
  pointer-events: none;
}
.nm-orbit-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

/* ---------------------------------------------------------------------------
   THE ORBIT'S FOIL (2026-09-20)

   The disc is the same material as the award plaques. Every gradient, size,
   blend and filter below is the one in sections.css, copied rather than
   re-derived, so the two surfaces cannot drift apart. The engine is
   assets/orbit-foil.js, fetched at idle, and without it none of this paints:
   the layers only exist once that file has added them.

   Two things differ from the award rules, both forced by the host. There is no
   plate mask, because a disc has no artwork to cut one from and IS the shape.
   And there is no background and no isolation on the host: the award tile
   isolates because the mark's pixels are painted inside it for the shine to
   blend with, and this one has nothing inside, so it blends with the drawn disc
   underneath instead. Giving it a ground of its own put an opaque circle over
   the real one and the whole effect read as a dark tint.
   ------------------------------------------------------------------------- */
.nm-orbit.af-host {
  --af-opacity: 0;
  --af-x: 50%; --af-y: 50%;
  --af-bx: 50%; --af-by: 50%;
  --af-sx: 50%; --af-sy: 50%;
  --af-fx: 0%; --af-fy: 0%; --af-fscale: 1;
  --af-left: .5;
  --af-band: -40%;
}
.nm-orbit-foil {
  position: absolute;
  /* The drawn disc's own size, centred on it (--orbit-disc, see the head of
     this block). A % margin resolves against the control's width, so half the
     share pulls it back to the centre on both axes. */
  left: 50%;
  top: 50%;
  width: calc(var(--orbit-disc) * 100%);
  height: calc(var(--orbit-disc) * 100%);
  margin: calc(var(--orbit-disc) * -50%) 0 0 calc(var(--orbit-disc) * -50%);
  /* The shape tier, not the primitive: this plate has to stay exactly as round
     as the disc it sits on, and --dot-radius is the tier that means "a circle
     whatever the radius scale does". */
  border-radius: var(--dot-radius);
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  --af-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.34' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23g)' opacity='.85'/><rect width='140' height='140' fill='white' opacity='.45'/></svg>");
  /* Spectrum, Nathan's pick. Like the award palette these six are a MATERIAL
     and not brand colour, which is why they are rgb() and not tokens: they
     appear in one effect on one component and a theme must never repaint them. */
  --af-c1: rgb(255 84 112); --af-c2: rgb(255 209 102); --af-c3: rgb(140 233 154);
  --af-c4: rgb(99 230 226);  --af-c5: rgb(122 162 255); --af-c6: rgb(209 139 255);
}
.nm-orbit-foil > .af-shine,
.nm-orbit-foil > .af-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  display: none;
}
.nm-orbit-foil[data-af-tone] > .af-shine,
.nm-orbit-foil[data-af-tone] > .af-glare { display: block; }

/* The resting glint (orbit-foil.js, 2026-09-30): the whole foil is masked down to
   ONE slim diagonal band, whose centre --af-band the script drives across the disc.
   The mask is alpha only, so no colour is set here. */
.nm-orbit-foil[data-af-glint] {
  -webkit-mask-image: linear-gradient(105deg, transparent calc(var(--af-band, -40%) - 30%), rgb(0 0 0) var(--af-band, -40%), transparent calc(var(--af-band, -40%) + 30%));
  mask-image: linear-gradient(105deg, transparent calc(var(--af-band, -40%) - 30%), rgb(0 0 0) var(--af-band, -40%), transparent calc(var(--af-band, -40%) + 30%));
}

.nm-orbit-foil > .af-shine {
  z-index: 2;
  overflow: hidden;
  /* .75 is the award's own value; the 3 is Nathan's brightness. */
  opacity: calc(var(--af-opacity) * .75 * 3);
  -webkit-mask-image: var(--af-grain); mask-image: var(--af-grain);
  -webkit-mask-size: 140px; mask-size: 140px;
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
.nm-orbit-foil > .af-shine::before,
.nm-orbit-foil > .af-shine::after { content: ""; position: absolute; inset: 0; }

/* The operator follows the GROUND, and the ground is not the theme: both discs
   are ink in both themes, but a Theme lab preset repaints the hero's in light. */
.nm-orbit-foil[data-af-tone="light"] > .af-shine {
  mix-blend-mode: multiply;
  filter: saturate(1.9) contrast(1.15);
}
.nm-orbit-foil[data-af-tone="deep"] > .af-shine {
  mix-blend-mode: screen;
  filter: saturate(1.35) contrast(1.15);
}

.nm-orbit-foil > .af-shine::before {
  background:
    radial-gradient(circle at 30% 30%, rgb(255 255 255) 0 22%, transparent 24%),
    radial-gradient(circle at 70% 68%, rgb(255 255 255) 0 18%, transparent 20%),
    conic-gradient(from calc(var(--af-left) * 120deg) at 50% 50%,
      var(--af-c6), var(--af-c2), var(--af-c4), var(--af-c5), var(--af-c6));
  background-size: 14px 14px, 14px 14px, cover;
  background-position: 45% 45%, 55% 55%, center;
  background-blend-mode: soft-light, hard-light, normal;
}
.nm-orbit-foil > .af-shine::after {
  background:
    linear-gradient(100deg, transparent 34%, rgb(255 255 255 / var(--alpha-500)) 48%, var(--af-c3) 52%, transparent 68%),
    radial-gradient(circle at 0 100%, transparent 8%, var(--af-c5) 22%, var(--af-c1) 38%, var(--af-c3) 52%, transparent 64%);
  background-size: 240% 240%,
                   calc(300% * var(--af-fscale, 1)) calc(300% * var(--af-fscale, 1));
  background-position: var(--af-sx, var(--af-bx)) var(--af-sy, var(--af-by)),
                       calc(var(--af-bx) + var(--af-fx, 0%)) calc(var(--af-by) + var(--af-fy, 0%));
  background-blend-mode: overlay;
  mix-blend-mode: soft-light;
}

.nm-orbit-foil > .af-glare {
  z-index: 3;
  opacity: calc(var(--af-opacity) * .6 * 3);
  background: radial-gradient(farthest-corner circle at var(--af-x) var(--af-y),
    rgb(255 253 247 / var(--alpha-700)) 8%, rgb(255 248 238 / var(--alpha-500)) 22%, rgb(0 0 0 / var(--alpha-600)) 92%);
  mix-blend-mode: overlay;
}
.nm-orbit-foil[data-af-tone="light"] > .af-glare {
  background: radial-gradient(farthest-corner circle at var(--af-x) var(--af-y),
    rgb(255 255 255 / var(--alpha-700)) 4%, rgb(255 255 255 / var(--alpha-500)) 26%, rgb(255 255 255 / 0) 62%);
  mix-blend-mode: soft-light;
}
.nm-orbit-foil[data-af-tone="deep"] > .af-glare {
  /* Nothing to model on black, and overlay's dark end only darkens it further,
     so this adds a highlight and nothing else. */
  background: radial-gradient(farthest-corner circle at var(--af-x) var(--af-y),
    rgb(255 253 247 / var(--alpha-600)) 6%, rgb(255 248 238 / var(--alpha-400)) 30%, rgb(255 255 255 / 0) 70%);
  mix-blend-mode: screen;
}

/* ------------------------------------------------------------- THE GLYPH --
   The envelope is still the resting glyph and still what anyone without the
   engine sees. It steps aside for a drawn hand rather than being replaced.
   The engine wraps it in a span (orbit-foil.js) so the layer out of play can
   carry inert, which an SVG ignores; the span fills the glyph box like the
   envelope did. */
.nm-orbit-swap {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 180ms linear, scale var(--duration-moderate) var(--ease-emphasized);
}
.nm-orbit-swap[data-orbit-out="1"] { opacity: 0; scale: 0.7; }

.nm-orbit-anim {
  position: absolute;
  /* The animations carry their own transparent margin, so the box is bled out
     past the glyph's to land the drawing at the size the envelope sits at. */
  inset: -40%;
  opacity: 0;
  scale: 0.8;
  transition: opacity 200ms linear, scale var(--duration-moderate) var(--ease-emphasized);
  pointer-events: none;
}
.nm-orbit-anim[data-orbit-in="1"] { opacity: 1; scale: 1; }
/* Two stacked pictures (orbit-foil.js): the icon on show, and the next one
   loading behind it so a visit never paints the last visit's icon. Only the one
   marked data-on shows. visibility, not opacity, so the reveal-liveness gate
   reads the pair as stacked frames, one on show, and sets the waiting one aside. */
.nm-orbit-anim img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; visibility: hidden; }
.nm-orbit-anim img[data-on] { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .nm-orbit-swap, .nm-orbit-anim { transition: none; }
  .nm-orbit-foil > .af-shine, .nm-orbit-foil > .af-glare { display: none; }
}

/* Ink in dark too (Nathan, 2026-10-09, email circle lab, "Dark disc: Ink"): the
   disc was --color-accent, lime in dark, and a bright lime disc read as glare.
   In dark it takes the surface ink, the same value as the footer's disc, and
   the envelope takes the accent, so a Theme lab preset still colours it. The
   footer's pinned rules below match at the same weight and come later, so they
   win there. */
[data-theme="dark"] .nm-orbit-core { fill: var(--color-surface); stroke: var(--color-surface); }
[data-theme="dark"] .nm-orbit-pad { fill: var(--color-surface); }
[data-theme="dark"] .nm-orbit-icon { color: var(--color-accent); }
/* No-script twin, the form described at the logo inversions in sections.css:
   keyed on NO data-theme, at the same weight, and above the footer's pins so
   they still win there. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme])) .nm-orbit-core { fill: var(--color-surface); stroke: var(--color-surface); }
  :root:where(:not([data-theme])) .nm-orbit-pad { fill: var(--color-surface); }
  :root:where(:not([data-theme])) .nm-orbit-icon { color: var(--color-accent); }
}

/* The footer slab is flat lime in BOTH themes, so --color-accent (ink in light,
   lime in dark) cannot be trusted there: in dark mode it would put lime on
   lime. The footer's own identity is ink carrying lime, the same as its pill,
   so the orbit is pinned to brand values rather than theme-reactive ones. This
   is the same reasoning as the documented lime-on-lime ban for .btn--primary. */
[id="site-footer"] .nm-orbit-type { fill: var(--brand-ink); }
[id="site-footer"] .nm-orbit-sep { fill: var(--brand-ink); }
[id="site-footer"] .nm-orbit-core,
[id="site-footer"] .nm-orbit-pad { fill: var(--brand-ink); stroke: var(--brand-ink); }
[id="site-footer"] .nm-orbit-icon { color: var(--brand-primary); }
[id="site-footer"] .nm-orbit:focus-visible { outline-color: var(--brand-ink); }

/* The rim turns forever and settles under the pointer, which is the point: the
   words are decorative while it spins and readable the moment you reach for it.
   --duration-marquee is the site's existing forever-loop duration, shared with
   the experience marquee, so the two never drift apart. */
@keyframes nm-orbit-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.nm-orbit-ring {
  transform-box: view-box;
  transform-origin: 100px 100px;
  animation: nm-orbit-turn var(--duration-marquee) var(--ease-linear) infinite;
}
@media (hover: hover) {
  .nm-orbit:hover .nm-orbit-ring { animation-play-state: paused; }
}
.nm-orbit:focus-visible .nm-orbit-ring { animation-play-state: paused; }
/* Held through the shrink, so the rim does not restart while the control is
   still moving. orbit-foil.js carries the attribute for the transition's own
   length; see the note on `leave` there. */
.nm-orbit[data-orbit-settling] .nm-orbit-ring { animation-play-state: paused; }

/* THE HOUSE PAUSE CONTRACT. A region with a pause toggle carries
   data-motion-paused="1" while it is pressed, and everything looping inside it
   has to answer to that. The ring turns forever and #678 put one inside #hero,
   whose toggle then read "Pause the skill pillars ticker" (the ticker and its
   toggle were removed 2026-09-25), and one in the footer: neither toggle knew
   about it, so both buttons said they had stopped their
   region while this kept turning. Measured by motion-truth-gate: PASS at #677,
   FAIL at #678, two findings, one per instance. A pause control that lies is
   worse than none. */
[data-motion-paused="1"] .nm-orbit-ring { animation-play-state: paused; }

/* The control swells under the pointer so the type is legible at reading size
   without holding that footprint at rest. The disc's own movement is the light
   crossing it, from assets/orbit-foil.js; the turbulence that used to warp its
   edge here was removed 2026-09-20. */
@media (hover: hover) {
  .nm-orbit:hover { transform: scale(var(--orbit-swell)); }
}

/* Also still with scripting off: the ring turns for ever and the pause control
   over its region is script-driven, so nothing could stop it (2026-09-24,
   held by a11y/noscript-gate.mjs). */
@media (prefers-reduced-motion: reduce), (scripting: none) {
  .nm-orbit-ring,
  .nm-orbit:hover .nm-orbit-ring,
  .nm-orbit:focus-visible .nm-orbit-ring { animation: none; }
  .nm-orbit,
  .nm-orbit:hover,
  .nm-orbit:focus-visible { transform: none; transition: none; }
}

/* -----------------------------------------------------------------------------
   PILL, the contact pill (2026-09-20)
   The orbit's small twin. The circle needs room for drawn type and only has it
   on desktop; below 1024 both circles are hidden and this carries the same job
   in the two places a phone actually has one, the about section's closing line
   and the footer slab. Only ever one of the pair is rendered, so neither the
   accessibility tree nor the tab order sees a duplicate mail link.

   Shape, all measured off the approved review build rather than re-derived:
     height   42px
     art      44px, its centre 12px in, so it hangs 10px past the leading edge
     hand     offset 7px right and 8px up INSIDE that box; the letter is not
              offset at all, which is the whole reason the two are separate
     label    starts clear of the art, which sets the leading padding

   No hologram and no disc. The foil belongs to the circle, where there is a
   plate wide enough to show it; at this size the drawing covers the plate
   almost entirely, so the material would be paid for and never seen.
   -------------------------------------------------------------------------- */
.nm-pill {
  --pill-h: 42px;
  --pill-art: 44px;
  --pill-art-x: 11px;   /* from the padding box, so 12px from the border box */
  /* How far the drawing hangs past the leading edge. Named because it is not
     just decoration: it eats into whatever gap sits to the left of the button,
     and anything spacing this control has to pay it back. */
  --pill-bleed: calc(var(--pill-art) / 2 - var(--pill-art-x));

  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--pill-h);
  padding-block: 0;
  /* Both sides written as LONGHANDS, on purpose. This was a `padding-inline`
     shorthand whose two values are start then end; it was carrying the review
     build's physical `0 16px 0 4px`, whose 16px is the RIGHT side, so the port
     put 16 on the start and ZERO on the end and the word ran to the edge of the
     button on every instance. A shorthand plus an override of one of its own
     sides is the shape that hid it: the start looked deliberate, the end was
     never mentioned again. Nothing to reverse if there is no shorthand. */
  padding-inline-start: calc(var(--pill-art-x) + var(--pill-art) / 2 + var(--space-300));
  padding-inline-end: var(--space-400);
  border-radius: var(--btn-radius);
  /* OUTLINE is the resting shape, because the about section is the home this
     lives in at every width and a light page wants the quieter control there.
     The footer slab fills, below. */
  border: 1px solid var(--btn-secondary-border);
  background: none;
  color: var(--btn-secondary-fg);
  transition: var(--btn-transition);
}

/* THE TARGET IS 44, THE SHAPE IS 42. Nathan picked 42 for the look and both
   controls this replaces were 44 (--touch-target-min), so the difference is
   carried by a centred ghost rather than by making him live with a smaller
   button. touch-target-lint cannot see this rule, because it reads .btn and the
   size tokens and the pill is neither, which is why the ghost is spelled out
   here instead of being left implied. */
.nm-pill::before {
  content: '';
  position: absolute;
  /* An absolute child is placed against the PADDING box, 40 inside the 1px
     borders, so the ghost reaches 1px past the border edge: 40 + 2 + 2 = 44. */
  inset: calc((var(--pill-h) - var(--touch-target-min)) / 2 - 1px) 0;
  border-radius: inherit;
}

/* The global `a:hover, a:focus-visible { text-decoration: underline }` sits at
   (0,1,1) and beats a bare class at (0,1,0), so cancelling this only at rest
   hands the underline straight back on hover or Tab. Invisible in the resting
   page, which is why a11y/underline-run.sh drives both. */
.nm-pill,
.nm-pill:hover,
.nm-pill:focus-visible,
.nm-pill:active { text-decoration: none; }

.nm-pill-label {
  font-family: var(--font-display);
  font-size: var(--text-body);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}

/* The two drawings, stacked and cross-faded. Absolute, so the art is free to be
   taller than the button and to hang past its leading edge. */
.nm-pill-art {
  position: absolute;
  left: var(--pill-art-x);
  top: 50%;
  translate: -50% -50%;
  width: var(--pill-art);
  height: var(--pill-art);
  pointer-events: none;
}
.nm-pill-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity var(--duration-slow) var(--ease-default);
}
.nm-pill-art img[data-off] { opacity: 0; }
/* The hand alone carries the offset. It sat on the box holding BOTH drawings
   once, which dragged the letter off a position that was already signed off. */
.nm-pill-hand { translate: 7px -8px; }

/* States, and they differ BY HOME, because the two homes start from opposite
   places and sit on opposite grounds.

   THE ABOUT SECTION is the .btn--secondary this replaces, so it takes that
   button's exact grammar: transparent at rest, and the site has ONE hover
   answer for a transparent button, which is to fill lime with ink on top
   (components.css, "one hover grammar", 2026-08-10). Press steps to the
   lime-dim. Nothing bespoke, so it answers like every other button beside it.

   THE FOOTER sits on the lime slab and fills ink at rest, because lime on lime
   is banned there, the same reason .btn--primary is. It cannot use the lime
   hover for the same reason, so it answers in a fixed white and presses to that
   white's darker twin, both theme-invariant because the footer never changes.

   The white pair was briefly the answer for BOTH homes. On the about section's
   --color-bg (#f5f5f5 in light) white measures 1.09:1, so the fill and the 1px
   border both vanished and the button dissolved with the word left floating.
   That is the same defect as the padding was: a value settled in one home and
   carried into a second it was never checked against. Scoped by home now. */
@media (hover: hover) {
  .nm-pill:hover {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-border);
    color: var(--btn-primary-fg);
  }
}
.nm-pill:focus-visible {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--btn-primary-fg);
  outline: var(--border-focus);
  outline-offset: var(--space-200);
}
.nm-pill:active {
  background: var(--brand-primary-dim);
  border-color: var(--brand-primary-dim);
  color: var(--btn-primary-fg);
  scale: .975;
}

[id="site-footer"] .nm-pill {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: var(--brand-primary);
}
@media (hover: hover) {
  [id="site-footer"] .nm-pill:hover {
    background: var(--color-static-white);
    border-color: var(--color-static-white);
    color: var(--brand-ink);
  }
}
[id="site-footer"] .nm-pill:focus-visible {
  background: var(--color-static-white);
  border-color: var(--color-static-white);
  color: var(--brand-ink);
  /* An ink ring on the lime slab, the same adaptation the icon row makes: the
     theme-flipping focus ring would vanish against lime in dark. */
  outline: 2px solid var(--brand-ink);
  outline-offset: var(--focus-ring-offset);
}
[id="site-footer"] .nm-pill:active {
  background: var(--color-static-white-hover);
  border-color: var(--color-static-white-hover);
  color: var(--brand-ink);
}

@media (prefers-reduced-motion: reduce) {
  .nm-pill,
  .nm-pill-art img { transition: none; }
  .nm-pill:active { scale: none; }
}

/* Tabs, added 27 Oct 2026 (chat EVERY STATE) as written in design-system/components.css: this study copy
   predates it, and Every state's phone tabs use .tabs--compact. Keep it in step with the master. */
/* -----------------------------------------------------------------------------
   Tabs
   ---
   One row of tabs that switches panels in the same place (W3C APG tabs
   pattern: role="tablist" on .tabs, role="tab" on each .tab, role="tabpanel"
   on each panel, aria-selected on the chosen tab). Two sizes, one behaviour:
     .tabs              base row; never used without a size
     .tabs--lg          display-face tabs that head a whole view (the Component
                        Playground); the selected tab is marked by a bar the
                        page draws, so the tab itself only changes colour
     .tabs--compact     mono caption tabs inside a card (Tokens / CSS / JSON);
                        each selected tab draws its own 2px accent underline
     .tab               one tab: a <button type="button">
   States: rest is tertiary text; hover and selected are primary text;
   :focus-visible draws the system ring INSET (-2px, the carousel-tab rule in
   the Button notes above), so a ring on a tab in a clipped, scrolling row is
   never shaved; forced-colors marks the selected tab with Highlight. Added
   2026-10-21 (drift audit): the two tab bars on the design-system view shared
   one keyboard script but wrote their look twice, with focus offsets of -2px
   and -3px. Slide pickers are not tabs: a carousel's picker is a group of
   buttons (.ds-carousel-nav, APG grouped carousel).
   ----------------------------------------------------------------------------- */
.tabs { display: flex; }
.tab {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-default);
}
.tab:hover,
.tab[aria-selected="true"] { color: var(--color-text-primary); }
.tab:focus-visible { outline: var(--border-focus); outline-offset: calc(-1 * var(--focus-ring-offset)); border-radius: var(--radius-sm); }
.tabs--lg .tab {
  position: relative;
  white-space: nowrap; /* one scrolling row; the page fades the cut edge */
  padding: var(--space-200) var(--space-400) var(--space-400);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--size-lg);
}
.tabs--compact .tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-200);
  min-height: var(--tab-compact-min-h);
  margin-bottom: -1px;
  padding: 0 var(--space-400);
  border-bottom: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}
/* Theme-aware accent (ink on light, lime on dark): brand lime fails contrast on light. */
.tabs--compact .tab[aria-selected="true"] { border-bottom-color: var(--color-accent); }
@media (forced-colors: active) {
  /* The selected tab carries its state in author colour alone, which forced
     colours replace (audit M-01); Highlight / HighlightText is the system pair. */
  /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- system colour keywords are the whole point under forced colours */
  .tab[aria-selected="true"] { background: Highlight; color: HighlightText; }
}

/* -----------------------------------------------------------------------------
   Bottom blur strip (.edge-fade), on the Virgin study (SITE MOTION step 4,
   2 Nov 2026, chat VA STUDY BUILDER 2 NOV). A copy of the shared component in
   design-system/components.css, which this frame does not load (it keeps its
   own sheet); keep the two in step until step 5 brings the shared sheet's
   rule here. The why, the rule and the stack are written there and in
   design-system.md, "Bottom blur strip". The markup is in index.html, the
   gates in /assets/edge-fade.js; the frame marks the study's intro
   data-edge-fade-intro. Virgin only for now: the other studies this frame
   draws keep their look until step 5.
   -------------------------------------------------------------------------- */
.edge-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--edge-fade-height);
  z-index: var(--z-dropdown);
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-default);
}
body:not([data-past-intro]) .edge-fade,
body[data-control-in-band] .edge-fade,
body[data-scroll-end] .edge-fade,
body[data-footer-near] .edge-fade { opacity: 0; }
.edge-fade > span {
  position: absolute;
  inset: 0;
  display: block;
  -webkit-backdrop-filter: blur(var(--edge-fade-layer-blur));
  backdrop-filter: blur(var(--edge-fade-layer-blur));
  -webkit-mask-image: linear-gradient(to top,
    rgb(0 0 0) 0%, rgb(0 0 0) var(--edge-fade-layer-hold), rgb(0 0 0 / 0) var(--edge-fade-layer-reach));
  mask-image: linear-gradient(to top,
    rgb(0 0 0) 0%, rgb(0 0 0) var(--edge-fade-layer-hold), rgb(0 0 0 / 0) var(--edge-fade-layer-reach));
}
/* Softest layer covers the whole height, hardest only the bottom third. */
.edge-fade > span:nth-child(1) { --edge-fade-layer-blur: calc(var(--edge-fade-blur) / 3); --edge-fade-layer-hold: 35%; --edge-fade-layer-reach: 100%; }
.edge-fade > span:nth-child(2) { --edge-fade-layer-blur: calc(var(--edge-fade-blur) / 3 * 2); --edge-fade-layer-hold: 23%; --edge-fade-layer-reach: 67%; }
.edge-fade > span:nth-child(3) { --edge-fade-layer-blur: var(--edge-fade-blur); --edge-fade-layer-hold: 12%; --edge-fade-layer-reach: 33%; }
@media (prefers-reduced-transparency: reduce) {
  .edge-fade { display: none; }
}
/* Paper has no bottom edge to soften into. */
@media print {
  .edge-fade { display: none; }
}
:root:not([data-study="virgin-australia"]) .edge-fade { display: none; }

/* -----------------------------------------------------------------------------
   MotionPauseControl (.strip-motion-toggle), WCAG 2.2.2, on the Virgin study
   (14 Nov 2026, chat VA PAUSE TOGGLE, audit 2026-11-12 finding 6). A copy of
   the shared block in design-system/components.css, which this frame does not
   load; keep the two in step. The why and the markup are written there and in
   design-system.md. media/media.js builds the toggles (window.vaPause) and
   media.css lays the cloud sections' pair under their words and links.
   -------------------------------------------------------------------------- */
[data-motion-region] { position: relative; }
.strip-motion-toggle {
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.strip-motion-toggle:focus-visible {
  outline: var(--border-focus);
  outline-offset: calc(-1 * var(--focus-ring-offset));
}
@media (prefers-reduced-motion: reduce), (scripting: none) {
  .strip-motion-toggle { display: none; }
}
