/* Generated by tools/build-i18n.mjs from tokens/base.css, tokens/brands/*.css and site-src/css/site.css. Edit those, not this file. */
/* BTD Dev design tokens, base layer (AB#282). Every brand shares these: type scale, space, radius, motion and states
   built from the brand roles. A brand file (tokens/brands/<name>.css) sets the roles listed in tokens/roles.json;
   nothing here sets a role. tools/build-i18n.mjs joins this file, the brand files and site-src/css/site.css into
   site/css/site.css (one stylesheet, AB#286). node tools/tokens.mjs lint checks all of it.

   Two attributes on <html>, both set before paint by the head script:
   - data-theme picks the brand (no attribute or "btd" = BTD Dev). One attribute change switches every color, shadow and font.
   - data-mode is the Light / Dark / System choice; colors use light-dark() and the pinned <meta name="color-scheme">. */

:root {
  color-scheme: light dark;

  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
}

/* [data-theme] too, so the derived tokens below follow a brand set on any element. */
:root, [data-theme] {
  /* ---------- States built from the brand roles (c2 coverage) ---------- */
  --surface-hover:     var(--surface-2);              /* secondary button, nav link, icon button hover */
  --line-hover:        var(--text-3);                 /* input and icon button border on hover */
  --disabled-opacity:  0.5;                           /* disabled controls; exempt from contrast (WCAG 1.4.3) */
  --focus-width:       2px;
  --focus-offset:      3px;
  --ring:              0 0 0 4px var(--accent-soft);  /* hover and open ring around a control group */
  --shadow-lift:       0 12px 24px -14px color-mix(in srgb, var(--accent) 80%, transparent); /* primary button hover */
  --shadow-cue-start:  0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);  /* idle cue ring, first frame */
  --shadow-cue-end:    0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); /* idle cue ring, last frame */
  --mask-solid:        #000;                          /* mask-image: only the alpha counts, never painted */

  /* ---------- Type (g2) ---------- */
  --text-xs: 0.75rem;    /* 12 mono labels */
  --text-sm: 0.875rem;   /* 14 captions */
  --text-md: 1rem;       /* 16 body */
  --text-lg: 1.125rem;   /* 18 lead on mobile */
  --text-xl: 1.375rem;   /* 22 lead on desktop, card titles */
  --text-2xl: 1.75rem;   /* 28 section titles mobile */
  --text-3xl: 2.5rem;    /* 40 section titles desktop */
  --text-hero: clamp(2.5rem, 1.45rem + 4.3vw, 4.75rem); /* 40 at 390, 76 at 1440 */

  --leading-tight: 1.04;
  --leading-snug: 1.25;
  --leading-body: 1.55;
  --tracking-display: -0.035em;
  --tracking-label: 0.08em;
  --tracking-button: -0.01em;   /* buttons, card titles */
  --tracking-card: -0.015em;    /* featured card and step titles */
  --tracking-wordmark: -0.02em; /* "BTD Dev" */
  --tracking-title: -0.025em;   /* section titles */
  --leading-display: 1.05;      /* page titles */
  --leading-heading: 1.1;       /* section titles, feed numbers */
  --leading-title: 1.2;         /* dialog title */
  --leading-compact: 1.3;       /* menu links */
  --leading-small: 1.4;         /* feed text, mono labels */
  --leading-lead: 1.45;         /* hero lead */
  --text-body-sm: 0.9375rem;    /* 15 email address */
  --text-wordmark: 1.0625rem;   /* 17 "BTD Dev" */
  --text-lead: clamp(var(--text-lg), 1rem + 0.5vw, var(--text-xl));                 /* hero lead */
  --text-section: clamp(var(--text-2xl), 1.2rem + 2.2vw, var(--text-3xl));          /* section titles */
  --text-display-sm: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);                         /* privacy and 404 titles */
  --text-stat: clamp(28px, 4vw, 52px);                                              /* overnight feed numbers */

  /* ---------- Space (g2): 4 px base ---------- */
  --hairline: 1px;
  --space-0-5: 2px;
  --space-0-75: 3px;   /* inset of the theme switch */
  --space-1: 0.25rem;  /* 4 */
  --space-1-5: 6px;
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */
  --space-hero: clamp(3rem, 1.5rem + 6vw, 7rem);    /* above the hero and page titles */
  --space-figure: clamp(2.5rem, 1.5rem + 4vw, 5rem); /* above the workflow picture */
  --space-frame: clamp(0.75rem, 0.4rem + 1.4vw, 1.5rem); /* inside the workflow frame */
  --space-panel: clamp(2rem, 1rem + 4vw, 4.5rem);   /* inside the contact panel */
  --space-photo: clamp(11rem, 4rem + 18vw, 16rem);  /* room for the desk photo above the contact text */
  --scroll-offset: 5rem;                            /* anchor targets clear the sticky header */
  --section-gap: clamp(4rem, 2.6rem + 5.6vw, 8rem);
  --gutter: clamp(1rem, 0.6rem + 2.6vw, 3rem); /* 16 px at 390 (brief), 48 px at 1440 */
  --content-max: 76rem; /* 1216 */

  /* ---------- Radius (g2) ---------- */
  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ---------- Motion (c2 tokens; g2 names kept as aliases) ---------- */
  --motion-fast: 120ms;      /* hover, color changes */
  --motion-standard: 180ms;  /* press, small moves */
  --motion-large: 240ms;     /* panels, toggles */
  --ease-enter: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: var(--motion-fast);
  --dur-med: var(--motion-large);

  /* Loop (v3; since v4 only the hero workflow loops): it steps through its parts with these transitions (motion.js).
     Step lengths live on the picture (data-steps); the last step is the ~3.4 s hold on the final still. */
  --loop-fade: 360ms;   /* a part fades in or out */
  --loop-move: 520ms;   /* a part rises or slides 10-16 px */
  --loop-pop: 420ms;    /* a marker or check scales in from 50% */
  --loop-draw: 640ms;   /* a line draws on */
  --loop-reset: 600ms;  /* final still -> start of the next cycle */
}

/* Higher contrast (v5): every brand gets the thicker focus ring; each brand file overrides its own colors. */
@media (prefers-contrast: more) {
  :root { --focus-width: 3px; }
}

/* Brand: BTD Dev (AB#335 hybrid values; split out of tokens.css in AB#282). The default brand: it applies with no
   data-theme attribute too. Sets exactly the roles in tokens/roles.json. Contrast: node tools/contrast.mjs. */

:root, [data-theme="btd"] {
  /* ---------- Color (g2): light value first, dark value second ---------- */
  --bg:            light-dark(#F7F6F3, #0A0C10);
  --surface:       light-dark(#FFFFFF, #10131A);
  --surface-2:     light-dark(#F0EEE9, #161A23);
  --line:          light-dark(#E2DFD8, #232834); /* decorative borders */
  --line-strong:   light-dark(#80848E, #5E6779); /* input and secondary button borders, 3:1+ */
  --text:          light-dark(#11141A, #ECEEF2);
  --text-2:        light-dark(#454B57, #A4ABB9);
  --text-3:        light-dark(#5A606C, #858D9E);
  --accent:        light-dark(#0B6E5E, #2EE6C5); /* primary button fill */
  --on-accent:     light-dark(#FFFFFF, #03241D);
  --accent-text:   light-dark(#0A6656, #4DEBCF); /* links, labels, Paid */
  --accent-soft:   light-dark(#DDF3EE, rgb(46 230 197 / 0.12));
  --accent-line:   light-dark(#9ED9CD, rgb(46 230 197 / 0.38));
  --warn-text:     light-dark(#8A5300, #F2B65A);
  --warn-soft:     light-dark(#FBEBD0, rgb(242 182 90 / 0.14));
  --focus:         light-dark(#0B6E5E, #8AF5E3);
  --paper:         light-dark(#FBF8F0, #1B1C21); /* notebook and receipt in the illustration */
  --ink:           light-dark(#3B3F4A, #C9CCD4); /* handwriting on --paper */

  /* ---------- State colors (c2 coverage, g2 values) ---------- */
  --accent-hover:      light-dark(#085A4D, #5CEFD5); /* primary button hover */
  --accent-active:     light-dark(#064A40, #22CBAE); /* primary button pressed */
  --accent-text-hover: light-dark(#074C40, #8AF5E3); /* link hover and pressed */
  --surface-active:    light-dark(#E6E3DC, #1D2230); /* secondary button pressed */

  /* ---------- Futuristic details (g2): on in dark, almost off in light ---------- */
  --grid-line:     light-dark(rgb(17 20 26 / 0.05), rgb(236 238 242 / 0.06));
  --glow-ring:     light-dark(transparent, rgb(46 230 197 / 0.35));
  --glow-haze:     light-dark(transparent, rgb(46 230 197 / 0.40));
  --card-shadow:   light-dark(rgb(17 20 26 / 0.07), rgb(46 230 197 / 0.16));
  --glow:          0 0 0 1px var(--glow-ring), 0 8px 32px -8px var(--glow-haze);
  --glow-soft:     0 1px 2px var(--card-shadow), 0 24px 64px -28px var(--card-shadow);
  --shadow-pop:    0 24px 64px -16px rgb(0 0 0 / 0.35); /* consent dialog */
  --shadow-float:  0 24px 64px -16px rgb(0 0 0 / 0.45); /* section menu panel */
  --shadow-button: 0 14px 32px -14px rgb(0 0 0 / 0.45); /* floating section menu button */

  /* ---------- Type (g2) ---------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; /* illustration notebook only */
}

/* ---------- Higher contrast (v5): the visitor's OS asks for more contrast ----------
   Token overrides only, both modes. Borders reach 3:1, secondary text and labels reach 7:1 or more,
   links and status words go darker in light mode. Forced colors (site.css) still win.
   Measured in DESIGN.md "Contrast, higher contrast" (node tools/contrast.mjs). */
@media (prefers-contrast: more) {
  :root, [data-theme="btd"] {
    --line:              light-dark(#8F939B, #5A6375); /* decorative borders become real edges: 3:1 */
    --line-strong:       light-dark(#5C616B, #8A93A6);
    --line-hover:        var(--text-2);
    --text-2:            light-dark(#343944, #C6CBD5);
    --text-3:            light-dark(#40454F, #AEB5C3);
    --accent:            light-dark(#085A4D, #2EE6C5);
    --accent-hover:      light-dark(#064A40, #5CEFD5);
    --accent-active:     light-dark(#053D35, #22CBAE);
    --accent-text:       light-dark(#075347, #4DEBCF);
    --accent-text-hover: light-dark(#053D35, #8AF5E3);
    --accent-line:       light-dark(#0B6E5E, rgb(46 230 197 / 0.75));
    --warn-text:         light-dark(#6B4000, #F2B65A);
    --focus:             light-dark(#064A40, #8AF5E3);
  }
}

/* Brand: Café pilot (AB#392). The design system pipeline's pilot run, steps 2 to 6 on a made-up small café, so the
   per-client time is measured on a brand that is not BTD Dev. Not a real client: replace it with the first real
   café's file (copy it, keep the role list). Warm coffee accent from a made-up logo, cream neutrals, rounded display face.
   Record: wiki /Projects/Agency website/Agency disciplines/Art direction and visual design/Design system pipeline. */

[data-theme="cafe"] {
  --bg:            light-dark(#FAF6F0, #14100D);
  --surface:       light-dark(#FFFFFF, #1C1713);
  --surface-2:     light-dark(#F2EBE1, #251E19);
  --line:          light-dark(#E5DACB, #3A2F27);
  --line-strong:   light-dark(#857868, #786A5B);
  --text:          light-dark(#1F1712, #F3ECE4);
  --text-2:        light-dark(#54473D, #C2B4A6);
  --text-3:        light-dark(#64564A, #A39384);
  --accent:        light-dark(#8C3B12, #F2A06B);
  --on-accent:     light-dark(#FFFFFF, #2A1306);
  --accent-text:   light-dark(#8A3A12, #F5AE80);
  --accent-soft:   light-dark(#F6E3D6, rgb(242 160 107 / 0.14));
  --accent-line:   light-dark(#E0B49A, rgb(242 160 107 / 0.40));
  --warn-text:     light-dark(#6E5200, #E8C45A);
  --warn-soft:     light-dark(#F7EDC8, rgb(232 196 90 / 0.14));
  --focus:         light-dark(#8C3B12, #F7C3A0);
  --paper:         light-dark(#FBF7EE, #1E1915);
  --ink:           light-dark(#3F342B, #D5CABF);

  --accent-hover:      light-dark(#73300E, #F5B48A);
  --accent-active:     light-dark(#5E270B, #E08A52);
  --accent-text-hover: light-dark(#6E2E0D, #F8C4A2);
  --surface-active:    light-dark(#EAE0D3, #2C241E);

  --grid-line:     light-dark(rgb(31 23 18 / 0.05), rgb(243 236 228 / 0.06));
  --glow-ring:     light-dark(transparent, rgb(242 160 107 / 0.30));
  --glow-haze:     light-dark(transparent, rgb(242 160 107 / 0.30));
  --card-shadow:   light-dark(rgb(31 23 18 / 0.08), rgb(242 160 107 / 0.12));
  --glow:          0 0 0 1px var(--glow-ring), 0 8px 32px -8px var(--glow-haze);
  --glow-soft:     0 1px 2px var(--card-shadow), 0 24px 64px -28px var(--card-shadow);
  --shadow-pop:    0 24px 64px -16px rgb(20 16 13 / 0.35);
  --shadow-float:  0 24px 64px -16px rgb(20 16 13 / 0.45);
  --shadow-button: 0 14px 32px -14px rgb(20 16 13 / 0.45);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

/* Brand: Sample client (AB#282). A second brand that proves the theme switch: set <html data-theme="sample"> and
   every color, shadow and font changes with no component edit. Indigo accent, slate neutrals, a serif display face.
   Not shipped to a client; replace it with a real client's file (copy it, keep the role list). */

[data-theme="sample"] {
  --bg:            light-dark(#F5F6FA, #0B0C14);
  --surface:       light-dark(#FFFFFF, #12131F);
  --surface-2:     light-dark(#ECEEF5, #191B2A);
  --line:          light-dark(#DCDFEA, #262A3D);
  --line-strong:   light-dark(#7C8196, #5F6684);
  --text:          light-dark(#141627, #ECEDF5);
  --text-2:        light-dark(#474B63, #A7ABC2);
  --text-3:        light-dark(#5B6079, #8A8FA8);
  --accent:        light-dark(#4338CA, #A5B4FC);
  --on-accent:     light-dark(#FFFFFF, #1E1B4B);
  --accent-text:   light-dark(#4338CA, #B4C0FD);
  --accent-soft:   light-dark(#E7E6FB, rgb(165 180 252 / 0.14));
  --accent-line:   light-dark(#B9B5F2, rgb(165 180 252 / 0.40));
  --warn-text:     light-dark(#8A4B00, #F5B871);
  --warn-soft:     light-dark(#FCE9D6, rgb(245 184 113 / 0.14));
  --focus:         light-dark(#4338CA, #C7D2FE);
  --paper:         light-dark(#FBF9F4, #1C1C24);
  --ink:           light-dark(#3A3D52, #CACCDA);

  --accent-hover:      light-dark(#3730A3, #C7D2FE);
  --accent-active:     light-dark(#312E81, #8B9CF8);
  --accent-text-hover: light-dark(#3730A3, #C7D2FE);
  --surface-active:    light-dark(#E2E5EF, #20233A);

  --grid-line:     light-dark(rgb(20 22 39 / 0.05), rgb(236 237 245 / 0.06));
  --glow-ring:     light-dark(transparent, rgb(165 180 252 / 0.35));
  --glow-haze:     light-dark(transparent, rgb(165 180 252 / 0.40));
  --card-shadow:   light-dark(rgb(20 22 39 / 0.07), rgb(165 180 252 / 0.16));
  --glow:          0 0 0 1px var(--glow-ring), 0 8px 32px -8px var(--glow-haze);
  --glow-soft:     0 1px 2px var(--card-shadow), 0 24px 64px -28px var(--card-shadow);
  --shadow-pop:    0 24px 64px -16px rgb(11 12 20 / 0.35);
  --shadow-float:  0 24px 64px -16px rgb(11 12 20 / 0.45);
  --shadow-button: 0 14px 32px -14px rgb(11 12 20 / 0.45);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

/* BTD Dev hybrid homepage (AB#335). Tokens: tokens/base.css and tokens/brands/*.css (AB#282); node tools/tokens.mjs lint keeps raw colors, sizes and shadows out of this file.
   Layout and components: g2. States: c2. Illustration: c1. Motion: x1. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--scroll-offset); }
html.motion-ok { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-md)/var(--leading-body) var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }

/* .is-focus, .is-hover, .is-active: the same states, pinned for the style page (style.html, AB#392). */
:focus-visible, .is-focus {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: calc(-1 * var(--hairline));
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 50;
  background: var(--surface); color: var(--text); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); border: 1px solid var(--line-strong);
}
.skip-link { transition: top var(--motion-standard) var(--ease-out); }
.skip-link:focus-visible { top: var(--space-3); }

.wrap { width: min(100% - 2 * var(--gutter), var(--content-max)); margin-inline: auto; }

/* ---------- Links (states: c2; v2 motion: the underline thickens and drops a little) ---------- */
a {
  color: var(--accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  transition: color var(--motion-fast) var(--ease-enter), text-decoration-color var(--motion-fast) var(--ease-enter),
              text-decoration-thickness var(--motion-standard) var(--ease-out), text-underline-offset var(--motion-standard) var(--ease-out);
}
a:hover, a:focus-visible, a:active, a.is-hover { color: var(--accent-text-hover); text-decoration-thickness: 2px; text-underline-offset: 0.28em; }

.link-btn { /* a button that reads as an inline link (Analytics preferences) */
  font: inherit; color: var(--accent-text); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  transition: color var(--motion-fast) var(--ease-enter), text-decoration-thickness var(--motion-standard) var(--ease-out), text-underline-offset var(--motion-standard) var(--ease-out);
}
.link-btn:hover, .link-btn:focus-visible, .link-btn:active { color: var(--accent-text-hover); text-decoration-thickness: 2px; text-underline-offset: 0.28em; }

/* ---------- Buttons (g2 look, c2 states; v2 motion) ----------
   Hover and keyboard focus get the same cue: new fill, a 2 px lift, the icon nudges.
   Press (also the touch cue): darker fill, pressed down. `translate` is kept free for the magnetic pull (site.js). */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  font: 600 var(--text-md)/1 var(--font-sans); letter-spacing: var(--tracking-button);
  border-radius: var(--radius-pill); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter),
              color var(--motion-fast) var(--ease-enter), box-shadow var(--motion-standard) var(--ease-enter),
              transform var(--motion-standard) var(--ease-out), translate 320ms var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: translate var(--motion-standard) var(--ease-out), rotate var(--motion-standard) var(--ease-out); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn-primary:hover, .btn-primary:focus-visible, .btn-primary.is-hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: var(--glow), var(--shadow-lift); }
.btn-primary:active, .btn-primary.is-active { background: var(--accent-active); color: var(--on-accent); box-shadow: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover, .btn-secondary:focus-visible, .btn-secondary.is-hover { background: var(--surface-hover); color: var(--text); border-color: var(--line-hover); }
.btn-secondary:active, .btn-secondary.is-active { background: var(--surface-active); color: var(--text); }
.motion-ok .btn:hover, .motion-ok .btn:focus-visible { transform: translateY(-2px); }
.motion-ok .btn:hover svg, .motion-ok .btn:focus-visible svg { translate: 2px -1px; rotate: -6deg; }
.motion-ok .btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: var(--disabled-opacity); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary:disabled:hover { background: var(--accent); }
.btn-secondary:disabled:hover { background: transparent; border-color: var(--line-strong); }

/* Idle cue (v2, optional per Royer's motion notes): the hero "Email BTD Dev" sends out two soft rings
   a moment after load (under 5 s in all), then stays still. Never the only cue; off under reduced motion. */
.motion-ok .btn-cue::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  animation: cue-ring 2.2s var(--ease-out) 2.6s 2;
}
.motion-ok .btn-cue:hover::after, .motion-ok .btn-cue:focus-visible::after { animation: none; }
@keyframes cue-ring {
  0% { opacity: 1; box-shadow: var(--shadow-cue-start); }
  75%, 100% { opacity: 0; box-shadow: var(--shadow-cue-end); }
}

/* Magnetic pull (v2): site.js sets --mx / --my on [data-magnet] and .btn-primary when a fine pointer is near.
   Transform only, at most 6 px; off for touch and under reduced motion. data-magnet="off" opts an element out. */
@media (hover: hover) and (pointer: fine) {
.motion-ok [data-magnet], .motion-ok .btn-primary { translate: var(--mx, 0px) var(--my, 0px); }
.motion-ok [data-magnet="off"] { translate: none; }
}

/* Focus ring (v2): it settles in from a wider offset, so keyboard focus moves visibly. */
.motion-ok :focus-visible { animation: focus-in var(--motion-large) var(--ease-out); }
@keyframes focus-in { from { outline-offset: calc(var(--focus-offset) + 6px); outline-color: transparent; } }

.label {
  font: 500 var(--text-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-3);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--text); text-decoration: none; font: 650 var(--text-wordmark)/1 var(--font-display); letter-spacing: var(--tracking-wordmark);
  white-space: nowrap; flex: none;
}
.wordmark:hover, .wordmark:focus-visible { color: var(--text); }
/* Mark (v5, logo direction 03 "Two states", Royer Nov 25): a hollow ring (the idea, waiting) linked to a solid
   teal dot (the thing you can touch, done). Inline SVG in the site tokens, so it follows Light and Dark.
   Hover and focus: the ring takes the accent (a color cue, kept under Reduce motion); with motion the dot swells. */
.wordmark-mark { width: 32px; height: 15px; flex: none; overflow: visible; }
.wm-ring, .wm-link { fill: none; stroke: var(--text); stroke-width: 2.5; transition: stroke var(--motion-fast) var(--ease-enter); }
.wm-dot { fill: var(--accent); transform-box: fill-box; transform-origin: center; transition: scale var(--motion-large) var(--ease-out); }
.wordmark:hover .wm-ring, .wordmark:focus-visible .wm-ring, .wordmark:hover .wm-link, .wordmark:focus-visible .wm-link { stroke: var(--accent-text); }
.motion-ok .wordmark:hover .wm-dot, .motion-ok .wordmark:focus-visible .wm-dot { scale: 1.14; }
.motion-ok .wordmark:active .wm-dot { scale: 0.9; }
@media (forced-colors: active) { .wm-ring, .wm-link { stroke: LinkText; } .wm-dot { fill: LinkText; } }
/* Under 360 px the header is full (wordmark, Contact, theme switch): a smaller mark keeps an 8 px gap at 320. */
@media (max-width: 359.98px) { .wordmark { gap: var(--space-1-5); } .wordmark-mark { width: 26px; height: 12px; } .site-nav .nav-link { padding-inline: var(--space-2); } }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: var(--text-sm);
  padding: 0 var(--space-3); border-radius: var(--radius-pill);
  transition: background-color var(--motion-fast) var(--ease-enter), color var(--motion-fast) var(--ease-enter);
}
.nav-link::after { /* accent bar that grows in under the word on hover and focus */
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 9px; height: 2px;
  border-radius: var(--radius-xs); background: var(--accent-text); scale: 0 1; transform-origin: left center;
  transition: scale var(--motion-large) var(--ease-out);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--text); background: var(--surface-hover); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link:active::after { scale: 1 1; }
.nav-link:active { color: var(--text); background: var(--surface-active); }
/* Header links (v3; v6: three sections): every section from 960 px; under 960 only Contact (the section menu has the rest).
   The section in view gets aria-current="true": accent text and the bar stays. */
.site-nav { display: flex; align-items: center; gap: var(--space-0-5); }
.nav-link[aria-current="true"] { color: var(--accent-text); }
.nav-link[aria-current="true"]::after { scale: 1 1; }
@media (max-width: 959.98px) { .nav-wide { display: none; } }

/* Theme switch (v2): Light, Dark, System as a radiogroup. The thumb slides to the choice.
   The head script sets <html data-mode> before paint, so the thumb never jumps on load. */
.theme-switch {
  --i: 2; --seg: 34px;
  position: relative; display: inline-flex; padding: var(--space-0-75); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
  transition: border-color var(--motion-fast) var(--ease-enter), box-shadow var(--motion-standard) var(--ease-enter);
}
:root[data-mode="light"] .theme-switch { --i: 0; }
:root[data-mode="dark"] .theme-switch { --i: 1; }
.theme-switch:hover, .theme-switch:focus-within { border-color: var(--line-hover); box-shadow: var(--ring); }
.theme-switch-thumb {
  position: absolute; top: 3px; left: 3px; width: var(--seg); height: var(--seg);
  border-radius: var(--radius-pill); background: var(--accent-soft); border: 1px solid var(--accent-line);
  translate: calc(var(--i) * var(--seg)) 0;
  transition: translate var(--motion-large) var(--ease-out);
}
.theme-switch button {
  position: relative; display: grid; place-items: center; width: var(--seg); height: var(--seg); padding: 0;
  color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  transition: color var(--motion-fast) var(--ease-enter), background-color var(--motion-fast) var(--ease-enter);
}
.theme-switch button:hover, .theme-switch button:focus-visible { color: var(--text); background: var(--surface-hover); }
.theme-switch button[aria-checked="true"] { color: var(--accent-text); background: transparent; }
.theme-switch button:focus-visible { outline-offset: 1px; }
.theme-switch button:active { background: var(--surface-active); }
.theme-switch svg { width: 17px; height: 17px; transition: rotate var(--motion-large) var(--ease-out), scale var(--motion-standard) var(--ease-out), translate var(--motion-standard) var(--ease-out); }
.motion-ok .theme-switch button:hover .ts-sun, .motion-ok .theme-switch button:focus-visible .ts-sun { rotate: 45deg; }
.motion-ok .theme-switch button:hover .ts-moon, .motion-ok .theme-switch button:focus-visible .ts-moon { rotate: -18deg; }
.motion-ok .theme-switch button:hover .ts-system, .motion-ok .theme-switch button:focus-visible .ts-system { translate: 0 -1.5px; }
.motion-ok .theme-switch button:active svg { scale: 0.86; }
:root:not(.motion-ok) .theme-switch-thumb { transition: none; }
@media (max-width: 359.98px) { .theme-switch { --seg: 32px; } .header-actions { gap: var(--space-1); } }

/* Header control group (v5, Royer Nov 25: Reduce motion "as soon as possible"): theme + Reduce motion in one pill.
   The group carries the pill border; the theme switch inside drops its own. Under 960 px only the theme switch
   shows, so the header looks as in v4; Reduce motion stays in the section menu and the footer (same state). */
.header-controls {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
  transition: border-color var(--motion-fast) var(--ease-enter), box-shadow var(--motion-standard) var(--ease-enter);
}
.header-controls:hover, .header-controls:focus-within { border-color: var(--line-hover); box-shadow: var(--ring); }
.header-controls .theme-switch, .header-controls .theme-switch:hover, .header-controls .theme-switch:focus-within { border: 0; background: transparent; box-shadow: none; }
.header-controls-sep { width: 1px; height: 20px; background: var(--line); }
.hdr-motion.motion-switch {
  min-height: 34px; height: 34px; margin: var(--space-0-75); padding: 0 var(--space-2); gap: var(--space-1-5);
  border: 0; color: var(--text-2);
}
.hdr-motion.motion-switch:hover, .hdr-motion.motion-switch:focus-visible { color: var(--text); background: var(--surface-hover); }
.hdr-motion.motion-switch:focus-visible { outline-offset: 1px; }
.hdr-motion .hdr-motion-icon { width: 17px; height: 17px; flex: none; transition: translate var(--motion-standard) var(--ease-out); }
.motion-ok .hdr-motion:hover .hdr-motion-icon, .motion-ok .hdr-motion:focus-visible .hdr-motion-icon { translate: 1.5px 0; }
.hdr-motion[aria-checked="true"] { color: var(--accent-text); }
.hdr-motion .motion-switch-track { width: 28px; height: 16px; }
.hdr-motion .motion-switch-knob { top: 2px; left: 2px; width: 10px; height: 10px; }
.hdr-motion.motion-switch[aria-checked="true"] .motion-switch-knob { translate: 12px 0; }
@media (max-width: 959.98px) { .header-controls-sep, .hdr-motion.motion-switch { display: none; } }
@media (forced-colors: active) { .header-controls { border-color: CanvasText; } .header-controls-sep { background: CanvasText; } }

/* Tooltip island (AB#422, islands/tooltip.tsx): the header's icon-only controls. Zag positions .tip-positioner;
   with no JS or a failed load the native title shows instead. Inverted colors, so it reads on any surface. */
.tip-positioner { z-index: 30; }
.tip {
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-size: var(--text-xs); font-weight: 500; line-height: var(--leading-small); white-space: nowrap;
  box-shadow: var(--shadow-float);
}
.motion-ok .tip[data-state="open"] { animation: tip-in 120ms var(--ease-enter); }
@keyframes tip-in { from { opacity: 0; translate: 0 -2px; } }
@media (forced-colors: active) { .tip { border: 1px solid CanvasText; } }

/* Menu island (AB#422, islands/menu.tsx): a button and a list of links. No JS: a native popover. With the island:
   Zag's menu, positioned under the button; the highlighted item follows the arrow keys and the pointer. */
.menu-island { position: relative; display: inline-block; }
.menu-list {
  margin: 0; padding: var(--space-2); list-style: none; min-width: 12rem;
  border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float);
}
.menu-list:focus-visible { outline: none; }
.menu-list a {
  display: flex; align-items: center; min-height: 44px; padding-inline: var(--space-3);
  border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 500;
}
.menu-list a:hover, .menu-list a:focus-visible, .menu-list a[data-highlighted] { background: var(--surface-hover); color: var(--text); }
.menu-list a[data-highlighted] { outline: var(--focus-width) solid var(--focus); outline-offset: -2px; }
@media (forced-colors: active) { .menu-list { border-color: CanvasText; } .menu-list a[data-highlighted] { outline-color: Highlight; } }

/* Theme change animation (v2): a circular reveal from the control (View Transitions API).
   Fallback without the API: a short color cross-fade. Reduced motion: instant (set in site.js). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color 360ms var(--ease-enter), color 360ms var(--ease-enter), border-color 360ms var(--ease-enter),
              fill 360ms var(--ease-enter), stroke 360ms var(--ease-enter), box-shadow 360ms var(--ease-enter) !important;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--space-hero) 0; isolation: isolate; }
.hero::before { /* hairline grid, a Futuristic detail that fades out */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, var(--mask-solid) 30%, transparent 75%);
}
.hero-copy { max-width: 60rem; }
.hero h1 {
  font: 650 var(--text-hero)/var(--leading-tight) var(--font-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.hero .lead {
  margin-top: var(--space-5); max-width: 38rem;
  font-size: var(--text-lead); line-height: var(--leading-lead); color: var(--text-2);
  text-wrap: pretty;
}
.cta-row { margin-top: var(--space-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.cta-email { color: var(--text-2); font-size: var(--text-sm); }
.cta-email a { color: var(--text); font-family: var(--font-mono); font-size: var(--text-body-sm); }
.cta-email a:hover { color: var(--accent-text-hover); }
@media (min-width: 1100px) {
  .hero-copy { max-width: none; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: var(--space-8); align-items: end; }
  .hero h1 { grid-row: span 2; }
  .hero .lead { margin-top: 0; }
  .cta-row { margin-top: var(--space-5); }
}

/* ---------- Workflow figure (g2 frame, v7 overnight feed) ---------- */
.workflow { margin-top: var(--space-figure); }
.workflow-frame {
  position: relative; padding: var(--space-frame);
  border-radius: var(--radius-xl);
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(140deg, var(--accent-line), var(--line) 35%, var(--line) 70%, var(--accent-line)) border-box;
  border: 1px solid transparent;
  box-shadow: var(--glow-soft);
}
/* HTML cards reflow; only the time labels share a grid cell. */
.overnight { display: grid; gap: var(--space-4); }
.night-panel {
  display: flex; flex-direction: column; justify-content: center; gap: var(--space-5);
  min-width: 0; padding: var(--space-6) var(--space-4);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.night-clock {
  display: grid; color: var(--text); font: 600 var(--text-stat)/var(--leading-heading) var(--font-sans);
  font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-display); white-space: nowrap;
}
.night-clock > span { grid-area: 1 / 1; }
.night-track { width: 100%; }
.night-segments { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-1); }
.night-segments > span { height: 4px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.night-segments i { display: block; height: 100%; background: var(--accent); }
.night-ends, .feed-time {
  font: 500 var(--text-xs)/var(--leading-small) var(--font-mono); letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-3);
}
.night-ends { display: flex; justify-content: space-between; margin-top: var(--space-3); }
.overnight-feed { display: grid; gap: var(--space-2); padding: 0; list-style: none; min-width: 0; }
.feed-card {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: var(--space-3); row-gap: var(--space-1);
  padding: var(--space-3); min-width: 0; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-md);
}
.feed-icon {
  grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); border-radius: var(--radius-md);
}
.feed-icon svg { width: 20px; height: 20px; }
.feed-body { min-width: 0; }
.feed-title { font-size: var(--text-sm); line-height: var(--leading-small); font-weight: 600; color: var(--text); }
.feed-reaction { display: flex; align-items: start; gap: var(--space-1); margin-top: var(--space-1); color: var(--accent-text); font-size: var(--text-sm); line-height: var(--leading-small); }
.feed-reaction svg { width: 16px; height: 16px; flex: none; margin-top: var(--space-0-5); }
.feed-summary { background: var(--accent-soft); border-color: var(--accent-line); }
.feed-summary .feed-time { color: var(--text-2); } /* text-3 on accent-soft is 4.75:1 in dark; text-2 keeps the hero's margin */
.feed-total { color: var(--accent-text); font-size: var(--text-sm); line-height: var(--leading-small); margin-top: var(--space-1); }
@media (min-width: 768px) {
  .overnight { grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .feed-card { grid-template-columns: 34px 76px minmax(0, 1fr); align-items: center; }
  .feed-icon { grid-row: auto; }
}
.workflow figcaption {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4); color: var(--text-2); font-size: var(--text-sm);
}
.workflow figcaption strong { color: var(--text); font-weight: 600; }
/* Pause / Play for every looping illustration (WCAG 2.2.2). Both buttons share one state. */
.motion-toggle {
  display: none; align-items: center; gap: var(--space-2); min-height: 44px; flex: none;
  font: 500 var(--text-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--text-2); background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 0 var(--space-4); cursor: pointer;
  transition: color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter),
              background-color var(--motion-fast) var(--ease-enter), transform var(--motion-standard) var(--ease-out);
}
.motion-toggle svg { width: 12px; height: 12px; transition: scale var(--motion-standard) var(--ease-out); }
.motion-toggle .ic-play { display: none; }
.motion-toggle[data-paused] .ic-play { display: block; }
.motion-toggle[data-paused] .ic-pause { display: none; }
.motion-toggle:hover, .motion-toggle:focus-visible { color: var(--text); border-color: var(--line-hover); background: var(--surface-hover); }
.motion-toggle:active { background: var(--surface-active); }
.motion-ok .motion-toggle { display: inline-flex; }
.motion-ok .motion-toggle:hover svg, .motion-ok .motion-toggle:focus-visible svg { scale: 1.2; }
.motion-ok .motion-toggle:active { transform: scale(0.96); }

/* Phones keep the frame edge to edge, with full-width cards below the clock. */
@media (max-width: 767.98px) {
  .workflow { margin-inline: calc(var(--gutter) * -1); }
  .workflow-frame { border-radius: 0; border-inline: 0; padding: var(--space-2); }
  .workflow figcaption { padding-inline: var(--gutter); }
}

/* Illustration classes map to tokens, so the theme toggle recolors it. */
.wf-svg { width: 100%; height: auto; font-family: var(--font-sans); }
.wf-svg .c-bubble { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.wf-svg .c-bubble-out { fill: var(--line); }
.wf-svg .c-hair { fill: none; stroke: var(--line); stroke-width: 1; }
.wf-svg .c-card { fill: var(--surface); stroke: var(--accent-line); stroke-width: 1.25; }
.wf-svg .c-text { fill: var(--text); }
.wf-svg .c-muted { fill: var(--text-2); }
.wf-svg .c-subtle { fill: var(--text-3); }
.wf-svg .c-accent { fill: var(--accent); }
.wf-svg .c-accent-t { fill: var(--accent-text); }
.wf-svg .c-onaccent { fill: var(--on-accent); }
.wf-svg .c-ok { fill: var(--accent-text); }
.wf-svg .c-okbg { fill: var(--accent-soft); }
.wf-svg .c-warn { fill: var(--warn-text); }
.wf-svg .c-warnbg { fill: var(--warn-soft); }
.wf-svg .c-mono { font-family: var(--font-mono); }
.wf-svg .c-check { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pictures: one loop (the hero workflow) and still pictures (v4) ----------
   v4 (Royer, Nov 25): only the hero workflow loops. The section pictures (v6: What we can build for you) are [data-still]: CSS alone shows
   their final still ("after") and never animates them. Their data-at / data-until / data-steps stay in the markup, so
   renaming data-still back to data-loop="<group>" restores a loop.
   The loop ([data-loop]) steps through its parts' data-at / data-until (motion.js). Default, no JS, before the script runs,
   and Reduce motion: the complete final still: parts with data-until are hidden, every other part shows.
   [data-stepping] is set once motion.js owns a loop; only then are parts not yet reached hidden.
   Only opacity, translate, scale and stroke-dashoffset change. */
[data-loop] [data-at], [data-loop] [data-until] { transform-box: fill-box; transform-origin: center; }
[data-loop] [data-until], [data-still] [data-until] { opacity: 0; }
[data-loop] [data-fx="draw"], [data-still] [data-fx="draw"] { stroke-dasharray: 1; stroke-dashoffset: 0; }
[data-stepping] [data-at]:not(.on):not([data-fx="draw"]) { opacity: 0; }
[data-stepping] [data-until].on { opacity: 1; }
[data-stepping] [data-fx="draw"]:not(.on) { stroke-dashoffset: 1; }
.motion-ok [data-stepping] [data-at] {
  transition: opacity var(--loop-fade) var(--ease-enter), translate var(--loop-move) var(--ease-out),
              scale var(--loop-pop) var(--ease-out), stroke-dashoffset var(--loop-draw) var(--ease-out);
}
.motion-ok [data-stepping] [data-fx="up"]:not(.on) { translate: 0 10px; }
.motion-ok [data-stepping] [data-fx="left"]:not(.on) { translate: -16px 0; }
.motion-ok [data-stepping] [data-fx="right"]:not(.on) { translate: 16px 0; }
.motion-ok [data-stepping] [data-fx="pop"]:not(.on) { scale: 0.5; }
/* The six night segments fill across each step; reset fades with the other parts. */
[data-loop] [data-fx="fill"] { transform-origin: left center; }
[data-stepping] [data-fx="fill"]:not(.on) { scale: 0 1; }
.motion-ok [data-stepping] [data-fx="fill"] { transition: scale var(--loop-reset) linear, opacity var(--loop-fade) linear; }
.motion-ok [data-loop-state="playing"][data-stepping] [data-fx="fill"].on { transition-duration: var(--night-duration, 1500ms), var(--loop-fade); }
.motion-ok [data-loop-state="playing"][data-stepping] .feed-reaction.on { transition-delay: 500ms; }


/* ---------- Sections ---------- */
.section { padding-block: var(--section-gap) 0; }
.section-head { display: grid; gap: var(--space-3); max-width: 44rem; }
.section-head h2, .contact h2 {
  font: 650 var(--text-section)/var(--leading-heading) var(--font-display);
  letter-spacing: var(--tracking-title); text-wrap: balance;
}

.section-lead { color: var(--text-2); font-size: var(--text-lg); text-wrap: pretty; }

/* What we can build for you (v6, layout A, Royer Nov 25): one section, one card style (.build).
   Three featured cards (.build-lead) first, then two smaller ones, in one grid. Each card: still picture, glyph and
   title, one line of text. The DOM keeps words first for screen readers; grid areas place the picture.
   Under 640 px: one column, picture on top; featured cards get more padding and a larger title.
   640-1199 px: each featured card spans the row, words left and picture right; the smaller two sit side by side.
   1200 px and up: the featured cards three across, picture on top; the smaller two side by side below, title on
   top and words left of a smaller picture, so they read as a second tier. */
.builds { margin-top: var(--space-7); padding: 0; list-style: none; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.build {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "art art" "glyph title" "text text";
  column-gap: var(--space-4); row-gap: var(--space-3); align-content: start;
  padding: var(--space-5) var(--space-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--motion-standard) var(--ease-enter), box-shadow var(--motion-large) var(--ease-enter);
}
.build:hover { border-color: var(--accent-line); box-shadow: var(--glow-soft); }
.build .glyph { grid-area: glyph; width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); }
.build .glyph svg { width: 20px; height: 20px; }
.build h3 { grid-area: title; align-self: center; font: 600 var(--text-lg)/var(--leading-snug) var(--font-display); letter-spacing: var(--tracking-button); text-wrap: balance; }
.build p { grid-area: text; color: var(--text-2); font-size: var(--text-md); text-wrap: pretty; }
/* Pictures: the v3 catalog stills (a final still since v4, see Pictures), the same token classes as the workflow. */
.build-art { grid-area: art; width: 100%; margin-bottom: var(--space-2); }
.build-lead { padding-block: var(--space-6); }
.build-lead h3 { font-size: var(--text-xl); letter-spacing: var(--tracking-card); }
/* The smaller cards keep their pictures at native size (280 px) until they sit beside the words. */
.build:not(.build-lead) .build-art { max-width: 17.5rem; }
@media (min-width: 640px) {
  .builds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build { padding: var(--space-5); }
  .build-lead { grid-column: 1 / -1; padding-block: var(--space-6); }
}
@media (min-width: 640px) and (max-width: 1199.98px) {
  .build-lead {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr); grid-template-areas: "glyph title art" "text text art";
    align-content: center;
  }
  .build-lead h3 { align-self: end; }
  .build-lead p { align-self: start; }
  .build-lead .build-art { align-self: center; justify-self: end; max-width: 30rem; margin: 0 0 0 var(--space-4); }
}
@media (min-width: 1200px) {
  .build:not(.build-lead) .build-art { max-width: none; }
  .builds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* Subgrid rows: the three pictures, titles and lines start at the same height whatever the title length. */
  .build-lead { grid-column: span 2; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--space-3); }
  .build-lead h3 { align-self: start; }
  .build-lead .glyph { align-self: start; }
  .build:not(.build-lead) {
    grid-column: span 3; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr);
    grid-template-areas: "glyph title title" "text text art";
  }
  .build:not(.build-lead) .build-art { margin: 0 0 0 var(--space-2); }
}
/* AB#423: the whole catalog under the featured cards (Layout A, Spike #338 default). Tag chips are plain jump links
   (no JS); each tag group is a short list of compact cards: title, then one value line. The hitters carry a badge. */
.catalog { margin-top: var(--space-8); }
.catalog-title { font: 600 var(--text-xl)/var(--leading-snug) var(--font-display); letter-spacing: var(--tracking-card); }
.catalog-lead { margin-top: var(--space-2); color: var(--text-2); font-size: var(--text-md); }
.tag-chips ul { margin-top: var(--space-4); padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag-chips .chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: var(--text-sm); font-weight: 500; text-decoration: none;
}
.tag-chips .chip:hover { border-color: var(--accent-line); color: var(--accent-text); }
.cat-group { margin-top: var(--space-7); }
.cat-group h4 { font: 500 var(--text-xs)/1 var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-3); }
.cat-cards { margin-top: var(--space-3); padding: 0; list-style: none; display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.cat-card { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.cat-card h5 { font: 600 var(--text-md)/var(--leading-snug) var(--font-display); text-wrap: balance; }
.cat-card p { margin-top: var(--space-1); color: var(--text-2); font-size: var(--text-sm); text-wrap: pretty; }
.cat-badge {
  display: inline-block; margin-inline-start: var(--space-1); padding: var(--space-0-5) var(--space-2); border-radius: var(--radius-pill);
  vertical-align: middle; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line);
  font: 500 var(--text-xs)/var(--leading-snug) var(--font-mono); letter-spacing: var(--tracking-label); text-transform: uppercase;
}
@media (min-width: 640px) { .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (forced-colors: active) { .cat-badge, .tag-chips .chip { border-color: CanvasText; } }
.invite { margin-top: var(--space-6); color: var(--text-2); font-size: var(--text-lg); max-width: 44rem; }
.invite a { font-weight: 600; }

.wf-svg .c-panel { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.wf-svg .c-card-plain { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.wf-svg .c-card-on { fill: var(--surface); stroke: var(--accent-line); stroke-width: 1.5; }
.wf-svg .c-answer { fill: var(--accent-soft); stroke: var(--accent-line); stroke-width: 1.25; }
.wf-svg .c-link { fill: none; stroke: var(--accent-line); stroke-width: 1.5; stroke-linejoin: round; }
.wf-svg .c-doc { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linejoin: round; }
.wf-svg .c-seg { stroke: var(--text-3); stroke-width: 2.5; stroke-linecap: round; }
.wf-svg .c-bolt { fill: var(--accent-soft); stroke: var(--accent-text); stroke-width: 1.5; stroke-linejoin: round; }
.wf-svg .c-send { fill: var(--accent-text); }

.steps { margin-top: var(--space-7); padding: 0; list-style: none; display: grid; gap: var(--space-5); counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); } }
.steps li { counter-increment: step; display: grid; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); font: 500 var(--text-sm)/1 var(--font-mono); color: var(--accent-text); }
.steps h3 { font: 600 var(--text-xl)/var(--leading-snug) var(--font-display); letter-spacing: var(--tracking-card); }
.steps p { color: var(--text-2); }

/* ---------- Contact (g2 block and photo; visible heading) ---------- */
.contact {
  margin-top: var(--section-gap); padding: var(--space-panel);
  padding-top: var(--space-photo);
  border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden; isolation: isolate;
}
.contact::after { /* soft accent haze, visible in dark only */
  content: ""; position: absolute; z-index: -2; inset: auto -10% -60% 30%; height: 120%;
  background: radial-gradient(closest-side, var(--glow-haze), transparent);
  opacity: 0.5; pointer-events: none;
}
.contact p { margin-top: var(--space-4); max-width: 40rem; font-size: var(--text-lg); color: var(--text-2); text-wrap: pretty; }
.contact .cta-row p { margin-top: 0; font-size: var(--text-sm); }
.contact-photo {
  position: absolute; z-index: -1; inset: 0 0 auto 0; height: clamp(13rem, 6rem + 18vw, 18rem);
  background: 70% 60% / cover no-repeat;
  mask-image: linear-gradient(to bottom, var(--mask-solid) 35%, transparent);
}
.photo-dark { background-image: url(../assets/desk-dark.webp); }
.photo-light { background-image: url(../assets/desk-light.webp); }
.contact-body { position: relative; }
@media (min-width: 1100px) {
  .contact { padding-top: var(--space-panel); min-height: 26rem; display: grid; align-items: center; }
  .contact-body { max-width: 34rem; }
  .contact-photo {
    inset: 0 0 0 45%; height: auto;
    background-position: 75% 55%;
    mask-image: linear-gradient(to right, transparent, var(--mask-solid) 60%);
  }
}

/* Scheme-specific media (the desk photo has a dark and a light version) */
.only-light { display: block; }
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { .only-light { display: none; } .only-dark { display: block; } }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .only-light { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .only-dark { display: block; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .only-light { display: block; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .only-dark { display: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); padding-block: var(--space-6); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.site-footer p { color: var(--text-2); font-size: var(--text-sm); }
.site-footer a { color: var(--text-2); }
.site-footer a:hover, .site-footer a:focus-visible, .site-footer a:active { color: var(--text); }

/* ---------- Consent choice (non-blocking dialog, equal-weight buttons) ---------- */
.consent {
  position: fixed; z-index: 30; inset: auto var(--space-4) var(--space-4) auto;
  width: min(100% - 2 * var(--space-4), 24rem);
  padding: var(--space-5); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
}
.consent[hidden] { display: none; }
.consent h2 { font: 600 var(--text-lg)/var(--leading-title) var(--font-display); }
.consent .consent-actions { margin-top: var(--space-4); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.consent .btn { min-height: 44px; padding-inline: var(--space-3); font-size: var(--text-sm); }
.consent .consent-link { margin-top: var(--space-3); font-size: var(--text-sm); }
@media (max-width: 359.98px) { .consent .consent-actions { grid-template-columns: 1fr; } }

/* ---------- Simple pages (Privacy, Page not found) ---------- */
.page { padding-block: var(--space-hero) 0; min-height: 60vh; }
.page h1 { font: 650 var(--text-display-sm)/var(--leading-display) var(--font-display); letter-spacing: var(--tracking-display); }
.prose { margin-top: var(--space-6); max-width: 40rem; display: grid; gap: var(--space-4); font-size: var(--text-lg); color: var(--text-2); }
/* Global Privacy Control note (v5): an empty live region until "Analytics preferences" is pressed; out of the grid while empty. */
.gpc-note { color: var(--text); }
.gpc-note:empty { position: absolute; }
.page-actions { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.lost-card {
  margin-top: var(--space-7); width: min(100%, 22rem); padding: var(--space-4) var(--space-5);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--text-3);
  display: flex; justify-content: space-between; align-items: center; font: 500 var(--text-sm)/1 var(--font-mono);
}
.lost-card span:last-child { color: var(--warn-text); background: var(--warn-soft); padding: var(--space-1) var(--space-2); border-radius: var(--radius-pill); }

/* ---------- Input (in the system for later forms; the site uses email links only) ---------- */
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--text); }
.input {
  min-height: 48px; padding: 0 var(--space-4); width: 100%;
  font: 400 var(--text-md)/1 var(--font-sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  transition: border-color var(--motion-fast);
}
.input::placeholder { color: var(--text-3); }
.input:hover, .input.is-hover { border-color: var(--line-hover); }
.input:focus-visible, .input.is-focus { outline: var(--focus-width) solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
/* Invalid (AB#392): the warn roles, so no brand needs a new role. The message says what is wrong; color is never the only cue. */
.input[aria-invalid="true"] { border-color: var(--warn-text); }
.field-error { color: var(--warn-text); font-size: var(--text-sm); line-height: var(--leading-small); font-weight: 500; }

/* ---------- Status pill (AB#392): a word and a color, never the color alone ---------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--space-1-5); padding: var(--space-1) var(--space-3);
  font: 600 var(--text-xs)/1 var(--font-sans); border-radius: var(--radius-pill);
}
.pill-ok { color: var(--accent-text); background: var(--accent-soft); }
.pill-wait { color: var(--warn-text); background: var(--warn-soft); }

@media (forced-colors: active) {
  .btn-primary { border-color: ButtonText; }
  .night-panel, .feed-card, .build, .consent { border-color: CanvasText; }
}

/* Copy email (Royer, Nov 25, 2026: "have a little thing I could like click on it and like it copies and it tells me that it copies"). */
.js .nojs-only { display: none; }
html:not(.js) .js-only { display: none; }
.cta-email.js-only { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.copy-email {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-1) 0 var(--space-3);
  font: 500 var(--text-body-sm)/1 var(--font-mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter),
              color var(--motion-fast) var(--ease-enter), box-shadow var(--motion-fast) var(--ease-enter),
              scale var(--motion-fast) var(--ease-enter), translate 320ms var(--ease-out);
}
.copy-email:hover, .copy-email:focus-visible { background: var(--surface-hover); border-color: var(--line-hover); }
.copy-email .ic-copy { transition: translate var(--motion-standard) var(--ease-out); }
.motion-ok .copy-email:hover .ic-copy, .motion-ok .copy-email:focus-visible .ic-copy { translate: 1px -1px; }
.copy-email:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.copy-email:active { background: var(--surface-active); }
.copy-email-chip {
  display: inline-flex; align-items: center; gap: var(--space-1-5); height: 34px; padding: 0 var(--space-3);
  font: 600 var(--text-sm)/1 var(--font-sans); color: var(--accent-text);
  background: var(--accent-soft); border-radius: var(--radius-pill);
  transition: background-color var(--motion-fast) var(--ease-enter), color var(--motion-fast) var(--ease-enter);
}
.copy-email:hover .copy-email-chip { color: var(--accent-text-hover); }
.copy-email svg { width: 16px; height: 16px; flex: none; }
.copy-email .ic-check { display: none; }
.copy-email[data-state="copied"] { border-color: var(--accent-line); box-shadow: var(--glow-ring); }
.copy-email[data-state="copied"] .copy-email-chip { background: var(--accent); color: var(--on-accent); }
.copy-email[data-state="copied"] .ic-copy { display: none; }
.copy-email[data-state="copied"] .ic-check { display: block; }
.copy-email[data-state="failed"] .copy-email-chip { background: var(--warn-soft); color: var(--warn-text); }
.copy-email-or { color: var(--text-2); font-size: var(--text-sm); }
.motion-ok .copy-email:active { scale: 0.97; }
.motion-ok .copy-email[data-state="copied"] .ic-check { animation: copy-pop var(--motion-standard) var(--ease-out); }
.motion-ok .copy-email[data-state="copied"] .ic-check path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: copy-draw var(--motion-standard) var(--ease-out) forwards; }
@keyframes copy-pop { from { scale: 0.6; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes copy-draw { to { stroke-dashoffset: 0; } }
@media (forced-colors: active) { .copy-email, .copy-email-chip { border: 1px solid ButtonText; } }

/* ---------- Reduce motion switch (v3) ----------
   In the footer on every page and in the section menu. role="switch"; motion.js keeps every copy in step.
   Hover and focus: text color and a fill; the knob slides only while motion is allowed. */
.motion-switch {
  display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3) 0 var(--space-2);
  font: 500 var(--text-sm)/1 var(--font-sans); color: var(--text-2); background: none;
  border: 1px solid transparent; border-radius: var(--radius-pill); cursor: pointer;
  transition: color var(--motion-fast) var(--ease-enter), background-color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter);
}
.motion-switch:hover, .motion-switch:focus-visible { color: var(--text); background: var(--surface-hover); border-color: var(--line); }
.motion-switch:active { background: var(--surface-active); }
.motion-switch-track {
  position: relative; flex: none; width: 36px; height: 20px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: background-color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter);
}
.motion-switch-knob {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2);
  transition: background-color var(--motion-fast) var(--ease-enter);
}
.motion-ok .motion-switch-knob { transition: translate var(--motion-large) var(--ease-out), background-color var(--motion-fast) var(--ease-enter); }
.motion-switch:hover .motion-switch-track, .motion-switch:focus-visible .motion-switch-track { border-color: var(--line-hover); }
.motion-switch[aria-checked="true"] .motion-switch-track { background: var(--accent); border-color: var(--accent); }
.motion-switch[aria-checked="true"] .motion-switch-knob { translate: 16px 0; background: var(--on-accent); }
@media (forced-colors: active) { .motion-switch-track { border-color: ButtonText; } .motion-switch-knob { background: ButtonText; } }

/* ---------- Section menu (v3, under 960 px) ----------
   A floating "Sections" button bottom right opens a list of the page's sections. The HTML is a native popover
   (popover="auto": light dismiss, next in the tab order), so it works with no JS. AB#286: the Solid 2 + Zag island
   (islands/section-menu.tsx) then takes the same nodes: the popover attribute goes, Zag's collapsible machine sets
   [hidden] and data-state="open" | "closed", and every :popover-open rule below has a [data-state="open"] twin.
   The current section: accent-soft fill, accent text and a dot (not color alone). Hidden while the consent choice shows. */
.jump { position: fixed; z-index: 25; right: var(--gutter); bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) { .jump { display: none; } }
body:has(> .consent:not([hidden])) .jump { display: none; }
@media (max-width: 959.98px) { body:has(> .jump) .site-footer { padding-bottom: calc(var(--space-6) + var(--space-8)); } }
.jump-btn {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-5) 0 var(--space-4);
  font: 600 var(--text-sm)/1 var(--font-sans); color: var(--text);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: background-color var(--motion-fast) var(--ease-enter), border-color var(--motion-fast) var(--ease-enter),
              color var(--motion-fast) var(--ease-enter), scale var(--motion-standard) var(--ease-out), translate 320ms var(--ease-out);
}
.jump-btn svg { width: 18px; height: 18px; color: var(--accent-text); transition: scale var(--motion-standard) var(--ease-out); }
.jump-btn:hover, .jump-btn:focus-visible { background: var(--surface-hover); border-color: var(--line-hover); }
.jump-btn:active { background: var(--surface-active); }
.jump:has(.jump-menu:popover-open) .jump-btn, .jump:has(.jump-menu[data-state="open"]) .jump-btn { border-color: var(--accent-line); box-shadow: var(--ring), var(--shadow-button); }
.motion-ok .jump-btn:hover svg, .motion-ok .jump-btn:focus-visible svg { scale: 1.12; }
.motion-ok .jump-btn:active { scale: 0.96; }

.jump-menu {
  position: fixed; /* the popover's UA style; kept once the island removes the popover attribute */
  inset: auto var(--gutter) calc(var(--space-4) + 48px + var(--space-2) + env(safe-area-inset-bottom, 0px)) auto;
  margin: 0; width: min(20rem, 100vw - 2 * var(--gutter)); max-height: calc(100dvh - 7rem); overflow: auto;
  padding: var(--space-3); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float);
  transform-origin: bottom right;
}
.jump-title { display: block; padding: var(--space-2) var(--space-3) var(--space-3); }
.jump-menu ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-0-5); }
.jump-menu a {
  position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-6) var(--space-2) var(--space-3);
  border-radius: var(--radius-md); color: var(--text); text-decoration: none; font-weight: 500; line-height: var(--leading-compact);
  transition: background-color var(--motion-fast) var(--ease-enter), color var(--motion-fast) var(--ease-enter);
}
.jump-num { flex: none; width: 1.5rem; font: 500 var(--text-xs)/1 var(--font-mono); color: var(--text-3); transition: translate var(--motion-standard) var(--ease-out); }
.jump-menu a:hover, .jump-menu a:focus-visible { background: var(--surface-hover); color: var(--text); }
.jump-menu a:active { background: var(--surface-active); }
.jump-menu a:focus-visible { outline-offset: -2px; }
.motion-ok .jump-menu a:hover .jump-num, .motion-ok .jump-menu a:focus-visible .jump-num { translate: 3px 0; }
.jump-menu a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.jump-menu a[aria-current="true"] .jump-num { color: var(--accent-text); }
/* v4: "Top" leads the list with an arrow in a small outlined tile instead of a section number. */
.jump-num-top { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.jump-num-top svg { width: 12px; height: 12px; }
.jump-menu a[aria-current="true"] .jump-num-top { border-color: var(--accent-line); }
.motion-ok .jump-menu a:hover .jump-num-top, .motion-ok .jump-menu a:focus-visible .jump-num-top { translate: 0 -2px; }
.jump-menu a[aria-current="true"]::after { content: ""; position: absolute; right: var(--space-3); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.jump-foot { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.jump-foot .motion-switch { width: 100%; padding-inline: var(--space-3); }
/* Opening: rise and fade from the button (under 150 ms per the menu guidance). Reduce motion: it simply appears. */
.motion-ok .jump-menu {
  opacity: 0; translate: 0 8px; scale: 0.97;
  transition: opacity var(--motion-fast) var(--ease-exit), translate var(--motion-fast) var(--ease-exit), scale var(--motion-fast) var(--ease-exit), display var(--motion-fast), overlay var(--motion-fast);
  transition-behavior: allow-discrete;
}
.motion-ok .jump-menu:popover-open, .motion-ok .jump-menu[data-state="open"] { opacity: 1; translate: 0 0; scale: 1; transition-timing-function: var(--ease-enter); transition-duration: 140ms; }
@starting-style { .motion-ok .jump-menu:popover-open, .motion-ok .jump-menu[data-state="open"] { opacity: 0; translate: 0 8px; scale: 0.97; } }
@media (forced-colors: active) { .jump-btn, .jump-menu { border-color: CanvasText; } .jump-menu a[aria-current="true"] { outline: 2px solid Highlight; } }

/* Jump targets take focus (tabindex="-1") so the next Tab starts there; no ring around a whole section. */
section[tabindex="-1"]:focus, .contact[tabindex="-1"]:focus, .cat-group[tabindex="-1"]:focus { outline: none; }

/* Language links (AB#357): native navigation also works without JavaScript. */
.lang-switch {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; flex: none; padding-inline: var(--space-3);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: var(--text-sm);
  border-radius: var(--radius-pill);
  transition: background-color var(--motion-fast) var(--ease-enter), color var(--motion-fast) var(--ease-enter);
}
.lang-switch::after {
  content: ""; position: absolute; inset-inline: var(--space-3); bottom: 9px; height: 2px;
  border-radius: var(--radius-sm); background: var(--accent-text); scale: 0 1; transform-origin: left center;
  transition: scale var(--motion-large) var(--ease-out);
}
.lang-switch:hover, .lang-switch:focus-visible { color: var(--text); background: var(--surface-hover); }
.lang-switch:hover::after, .lang-switch:focus-visible::after, .lang-switch:active::after { scale: 1 1; }
.lang-switch:active { color: var(--text); background: var(--surface-active); }
.lang-short { display: none; }
@media (max-width: 639.98px) {
  .header-actions { gap: var(--space-1); }
  .site-nav .nav-link, .lang-switch { padding-inline: var(--space-1); }
}
/* Under 480 px the header shows the short code (ES / EN); the link keeps its full name for screen readers. */
@media (max-width: 479.98px) {
  .lang-full { display: none; }
  .lang-short { display: inline; }
}
/* Under 390 px the header has no room for the wordmark text next to Contact, the language code and the theme
   switch, so the wordmark shows the mark only; the link keeps "BTD Dev home" as its name (AB#357). */
@media (max-width: 389.98px) {
  .wordmark-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Spanish time abbreviations retain their case and get room in the compact desktop column. */
:lang(es) .night-ends, :lang(es) .feed-time { text-transform: none; }
@media (min-width: 1100px) {
  :lang(es) .feed-card { grid-template-columns: 34px calc(6 * var(--space-4)) minmax(0, 1fr); }
}
