/* =============================================================================================
   JHu Masterclass · design system ("J")
   Linked by both hosts right after app.min.css: JHuBlades.Web/Components/App.razor (web) and
   JHuBlades/wwwroot/index.html (app). Plain CSS on purpose (the NCC ncc.css model): Tailwind does not
   compile this file, so nothing here needs an app.min.css rebuild. app.css bridges these tokens into
   Tailwind (@theme inline), so utilities like bg-j-surface or text-j-text-2 read the same variables.

   Owned by design-system (1c); R2 owners ask for changes through docs/refresh/requests (PLAN §7).
   This is the only stylesheet allowed raw colours (tools/check-design-tokens.sh exempts it).

   Cascade: app.min.css declares the layers (theme, base, components, utilities). Element defaults sit
   in @layer base and reusable classes in @layer components, so a Tailwind utility on the same element
   still wins. The icon class, the scroll lock, .j-sr, the motion kit and the legacy bridge are
   unlayered on purpose: they have to beat utilities the way the stylesheets they replace did.

   Motion rule: base styles are the FINAL state; keyframes carry only the "from" state, so the
   reduced-motion switch (section 8) never leaves anything hidden.

   Contents
     0. Fonts            3. Icons            5b. Components
     1. Tokens           4. Type             6. Shell
     2. Base             5. Controls         7. Motion kit       8. Reduced motion       9. Legacy bridge
   ============================================================================================= */

/* 0. FONTS ----------------------------------------------------------------------------------- */
/* Self-hosted, paths relative to this file (_content/JHuBlades.Shared/j/fonts/). The old
   SpaceGrotesk-Variable.woff2 and Manrope-Variable.woff2 were saved GitHub 404 pages (AUDIT P1-39);
   tools/checks/check-fonts.sh now fails the build on any .woff2 that isn't one. Licences sit next to
   the files. Space Grotesk (display) blocks briefly instead of swapping and both hosts preload its
   latin file; Manrope (body) is `optional` and preloaded by both hosts (3b: its late swap moved the course
   overview 0.11 CLS at 390 px; with optional it never swaps after the first paint). Manrope ships latin only for now: the latin-ext range falls back
   to the system font (docs/refresh/requests/design-system.md). */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: block; src: url("fonts/space-grotesk-latin-ext-var.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: block; src: url("fonts/space-grotesk-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: optional; src: url("fonts/manrope-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Material Symbols Outlined: every icon, cut down on the axes instead (weight 400, optical size 24,
   grade 0, FILL 0..1; NCC's file). Any icon name works; the old Google link pulled all axes (1.1 MB),
   this is 0.46 MB. Blocks so an icon never flashes as its ligature word. */
@font-face { font-family: "Material Symbols Outlined"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/material-symbols-outlined.woff2") format("woff2"); }

/* 1. TOKENS ----------------------------------------------------------------------------------- */
/* Forge Light. Contrast floor 4.5:1 for readable text on every surface (tests/JHuBlades.Tests/Design
   checks the pairs): text 16.25, text-2 8.89, text-3 6.24 on bg (5.37 on surface-3, 6.58 on white);
   text-4 is decoration only (3.16). line-strong is the control border (>= 3:1). */
:root {
  color-scheme: light dark;

  /* surfaces. --j-ink is the dark band (on-ink text, ink-accent for the light accent on it). */
  --j-bg: #f9f9f8; --j-surface: #ffffff; --j-surface-2: #f4f4f3; --j-surface-3: #e8e8e7;
  --j-wash: #fbeee2; --j-wash-2: #ffdcc3; --j-ink: #1a1c1c; --j-on-ink: #f9f9f8; --j-ink-accent: #ffb77d;
  --j-glass: rgb(249 249 248 / .82); --j-glass-fx: blur(16px) saturate(1.6); --j-scrim: rgb(26 28 28 / .5);
  /* Over a photo: a dark shade and light text in both themes (never redefined for dark; --j-ink/--j-on-ink swap). */
  --j-photo-shade: #1a1c1c; --j-on-photo: #f9f9f8;

  /* text */
  --j-text: #1a1c1c; --j-text-2: #554336; --j-text-3: #6b5a4c; --j-text-4: #9a8a7c;

  /* lines */
  --j-line: #ece3da; --j-line-2: #dbc2b0; --j-line-brass: #c9a982; --j-line-strong: #887364;

  /* brand */
  --j-forge: #8d4b00; --j-forge-press: #7a4100; --j-ember: #b15f00; --j-glow: #ffb77d; --j-spark: #ff9a4a;
  --j-on-forge: #ffffff; --j-gradient: linear-gradient(135deg, var(--j-forge) 0%, var(--j-ember) 100%);
  --j-forge-line: rgb(141 75 0 / .26); --j-tab-sheen: rgb(255 255 255 / .6);
  --j-focus: var(--j-forge);

  /* semantic */
  --j-go: #2e6b3a; --j-go-wash: #e6efe4; --j-warn: #8f6200; --j-warn-wash: #fff4d6;
  --j-danger: #ba1a1a; --j-danger-wash: #ffdad6;

  /* type */
  --j-font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --j-font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --j-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --j-fs-hero: clamp(2rem, 9.2vw, 4.5rem); --j-fs-display: clamp(1.875rem, 1.2rem + 3vw, 3rem);
  --j-fs-title: 1.75rem; --j-fs-bar: 1.0625rem; --j-fs-h2: 1.25rem; --j-fs-h3: 1.0625rem; --j-fs-lead: 1.125rem;
  --j-fs-body: 1rem; --j-fs-small: .875rem; --j-fs-meta: .8125rem; --j-fs-kicker: .75rem; --j-fs-micro: .6875rem;
  --j-lh-hero: .98; --j-lh-title: 1.12; --j-lh-tight: 1.25; --j-lh-body: 1.55;
  --j-ls-hero: -.03em; --j-ls-title: -.02em; --j-ls-kicker: .14em; --j-ls-btn: .1em;

  /* space and layout */
  --j-1: 4px; --j-2: 8px; --j-3: 12px; --j-4: 16px; --j-5: 20px; --j-6: 24px; --j-8: 32px; --j-10: 40px;
  --j-12: 48px; --j-16: 64px; --j-24: 96px;
  --j-gutter: 16px; --j-page-top: 16px; --j-section: 40px; --j-stack: 12px;
  --j-max: 960px; --j-max-wide: 1200px; --j-max-prose: 68ch;

  /* shape */
  --j-r-xs: 4px; --j-r-sm: 6px; --j-r-md: 8px; --j-r-lg: 12px; --j-r-xl: 16px; --j-r-sheet: 20px; --j-r-pill: 999px;

  /* elevation: umber and forge tints are the brand tones */
  --j-shadow-1: 0 1px 2px rgb(85 67 54 / .06), 0 2px 8px rgb(85 67 54 / .04);
  --j-shadow-2: 0 6px 24px rgb(85 67 54 / .08);
  --j-shadow-float: 0 20px 60px rgb(85 67 54 / .16);
  --j-shadow-sheet: 0 -12px 48px rgb(26 28 28 / .14);
  --j-shadow-ember: 0 4px 16px rgb(141 75 0 / .28);

  /* chrome. --jhu-safe-* are written by the app host (Android WebView reports env(safe-area-inset-*)
     as 0), the same way NCC's MainActivity writes --ncc-safe-*. */
  --j-safe-t: max(env(safe-area-inset-top, 0px), var(--jhu-safe-t, 0px));
  --j-safe-b: max(env(safe-area-inset-bottom, 0px), var(--jhu-safe-b, 0px));
  --j-safe-l: max(env(safe-area-inset-left, 0px), var(--jhu-safe-l, 0px));
  --j-safe-r: max(env(safe-area-inset-right, 0px), var(--jhu-safe-r, 0px));
  /* The bottom nav is a floating pill: --j-tab-h tall, --j-tab-gap above the bottom safe area. --j-tab-room
     is what a page leaves free under its content, so nothing ends up behind the pill. */
  --j-topbar-h: 56px; --j-tab-h: 64px; --j-tab-gap: 10px; --j-tab-room: calc(var(--j-tab-h) + var(--j-tab-gap) + var(--j-safe-b) + 16px);

  /* z-index */
  --j-z-raised: 2; --j-z-topbar: 40; --j-z-tabbar: 50; --j-z-push: 60; --j-z-sheet: 1000; --j-z-toast: 1100; --j-z-full: 9000;

  /* motion. --j-tempo is QA slow-mo: set .5 or .1 on <html>. */
  --j-pop: cubic-bezier(.2, .9, .25, 1.15);   /* chips, likes, stamps */
  --j-out: cubic-bezier(.16, 1, .3, 1);       /* entries, counts */
  --j-glide: cubic-bezier(.32, .72, 0, 1);    /* sheets, navigation */
  --j-in: cubic-bezier(.4, 0, 1, 1);          /* exits */
  --j-tempo: 1;
  --j-dur-fast: calc(160ms / var(--j-tempo)); --j-dur: calc(280ms / var(--j-tempo)); --j-dur-slow: calc(560ms / var(--j-tempo));
  --j-dur-sheet: calc(320ms / var(--j-tempo)); --j-dur-exit: calc(220ms / var(--j-tempo));
}
@media (min-width: 768px) { :root { --j-gutter: 24px; } }
@media (min-width: 1024px) { :root { --j-gutter: 32px; --j-fs-title: 2.25rem; --j-section: 64px; --j-topbar-h: 72px; --j-tab-room: 40px; } }

/* Dark: "forge at night". Follows the system unless the viewer picked a theme (data-theme on <html>,
   written by App.razor from the jhu_theme cookie during prerender and by j-theme.js before paint).
   The two blocks between the markers must stay identical: tools/check-design-tokens.sh compares them.
   Ratios: text on bg 16.0; text-2 8.29/7.70/7.10 (bg/surface/surface-2); text-3 6.87/6.38/5.88;
   forge on surface 8.29; on-forge 8.76 on #ff9a4a, 6.13 on #e07a1f; line-strong 4.32 on surface. */
/* dark:start */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --j-bg: #141110; --j-surface: #1d1916; --j-surface-2: #26201c; --j-surface-3: #312a25;
    --j-wash: #2a1a10; --j-wash-2: #3b1f0a; --j-ink: #f2ece4; --j-on-ink: #141110; --j-ink-accent: #8d4b00;
    --j-glass: rgb(20 17 16 / .82); --j-scrim: rgb(0 0 0 / .6);
    --j-text: #f2ece4; --j-text-2: #b8aa9c; --j-text-3: #a89a8d; --j-text-4: #6e5f53;
    --j-line: rgb(242 236 228 / .08); --j-line-2: rgb(242 236 228 / .14); --j-line-brass: rgb(255 183 125 / .28); --j-line-strong: #8a7c70;
    --j-forge: #ff9a4a; --j-forge-press: #ff8a3d; --j-ember: #e07a1f; --j-glow: #ffb77d; --j-spark: #ffb77d;
    --j-on-forge: #1a1210; --j-gradient: linear-gradient(135deg, #ff9a4a 0%, #e07a1f 100%); --j-focus: #ffb77d;
    --j-forge-line: rgb(255 154 74 / .34); --j-tab-sheen: rgb(255 255 255 / .05);
    --j-go: #7fd18f; --j-go-wash: rgb(127 209 143 / .14); --j-warn: #e6b84d; --j-warn-wash: rgb(230 184 77 / .14);
    --j-danger: #ffb4ab; --j-danger-wash: rgb(255 180 171 / .12);
    --j-shadow-1: 0 1px 2px rgb(0 0 0 / .4); --j-shadow-2: 0 8px 28px rgb(0 0 0 / .45);
    --j-shadow-float: 0 18px 50px rgb(0 0 0 / .55); --j-shadow-sheet: 0 -18px 60px rgb(0 0 0 / .6);
    --j-shadow-ember: 0 6px 22px rgb(255 138 61 / .28);
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --j-bg: #141110; --j-surface: #1d1916; --j-surface-2: #26201c; --j-surface-3: #312a25;
    --j-wash: #2a1a10; --j-wash-2: #3b1f0a; --j-ink: #f2ece4; --j-on-ink: #141110; --j-ink-accent: #8d4b00;
    --j-glass: rgb(20 17 16 / .82); --j-scrim: rgb(0 0 0 / .6);
    --j-text: #f2ece4; --j-text-2: #b8aa9c; --j-text-3: #a89a8d; --j-text-4: #6e5f53;
    --j-line: rgb(242 236 228 / .08); --j-line-2: rgb(242 236 228 / .14); --j-line-brass: rgb(255 183 125 / .28); --j-line-strong: #8a7c70;
    --j-forge: #ff9a4a; --j-forge-press: #ff8a3d; --j-ember: #e07a1f; --j-glow: #ffb77d; --j-spark: #ffb77d;
    --j-on-forge: #1a1210; --j-gradient: linear-gradient(135deg, #ff9a4a 0%, #e07a1f 100%); --j-focus: #ffb77d;
    --j-forge-line: rgb(255 154 74 / .34); --j-tab-sheen: rgb(255 255 255 / .05);
    --j-go: #7fd18f; --j-go-wash: rgb(127 209 143 / .14); --j-warn: #e6b84d; --j-warn-wash: rgb(230 184 77 / .14);
    --j-danger: #ffb4ab; --j-danger-wash: rgb(255 180 171 / .12);
    --j-shadow-1: 0 1px 2px rgb(0 0 0 / .4); --j-shadow-2: 0 8px 28px rgb(0 0 0 / .45);
    --j-shadow-float: 0 18px 50px rgb(0 0 0 / .55); --j-shadow-sheet: 0 -18px 60px rgb(0 0 0 / .6);
    --j-shadow-ember: 0 6px 22px rgb(255 138 61 / .28);
}
:root[data-theme="light"] { color-scheme: light; }
/* dark:end */

/* 2. BASE ------------------------------------------------------------------------------------- */
@layer base {
  html, body { height: 100%; background: var(--j-bg); color: var(--j-text); }
  body {
    font: 400 var(--j-fs-body)/var(--j-lh-body) var(--j-font-body);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
  }
  h1, h2, h3, h4, h5, h6 { font-family: var(--j-font-display); text-wrap: balance; }
  a { color: var(--j-forge); text-underline-offset: 2px; }
  @media (hover: hover) { a:hover { color: var(--j-forge-press); } }

  /* Visible focus everywhere (AUDIT P1-40: app.css used to remove it site-wide). FocusOnNavigate
     focuses each page's h1 (tabindex=-1) and WebKit treats that as :focus-visible, so programmatic-only
     targets never ring (NCC ncc.css:155-158). */
  :focus-visible { outline: 2px solid var(--j-focus); outline-offset: 2px; }
  :where([tabindex="-1"]):focus-visible { outline: none; }

  /* Keyboard focus and #anchors never land under the fixed bars (WCAG 2.2 SC 2.4.11): the browser
     scrolls a newly focused control clear of the top bar, and of the tab bar while it shows. */
  html:has(.j-topbar) { scroll-padding-top: calc(var(--j-safe-t) + var(--j-topbar-h) + 8px); }
  html:has(.j-tabbar):not(.kb-open) { scroll-padding-bottom: var(--j-tab-room); }

  /* 16px fields on phones so iOS Safari doesn't zoom into them (AUDIT P2-101), and 44px controls. The
     max() keeps a larger reader text size (rem) from being pinned back to 16px. */
  @media (max-width: 767px) {
    :where(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) { font-size: max(16px, 1rem); }
  }
  :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="hidden"], [type="color"], [type="image"], [type="submit"], [type="button"], [type="reset"]), select) { min-height: 44px; }

  /* The iOS app follows Dynamic Type: rem sizes scale with the reader's text size setting
     (html.is-native.is-ios is set by j-ui.js). Android scales through the WebView's TextZoom (2e). */
  html.is-native.is-ios { font: -apple-system-body; }
  html.is-native.is-ios body { font-family: var(--j-font-body); }
}
::selection { background: var(--j-wash-2); color: var(--j-text); }

/* Legacy: until each page drops focus:outline-none / outline-none (token rule 13, R2 owners), they keep
   the ring too. Unlayered so it beats those utilities; :where() so any component rule still wins. */
:where(.focus\:outline-none, .outline-none, .focus-visible\:outline-none):focus-visible { outline: 2px solid var(--j-focus); outline-offset: 2px; }
:where([tabindex="-1"]):focus-visible { outline: none; }

/* Scroll lock while a sheet is open (j-ui.js counts nested sheets). On <html> only: body is
   height:100%, so clipping it too would collapse the page and jump it to the top. */
html.j-locked { overflow: hidden; }
/* Room for the scrollbar is always kept (desktop browsers that draw one: a mouse on a Mac, Windows), so a
   page growing past the screen, or a sheet locking the scroll, doesn't shift everything sideways by its
   width (Phil 11/16: closing a request on Admin > Support jumped the left nav). Overlay scrollbars
   (phones, the app, a trackpad Mac) take no room, so nothing changes there. */
html { scrollbar-gutter: stable; }

/* Visually hidden, still read (prices, icon-only controls). */
.j-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* In the app (html.is-native, set by j-ui.js) a long-press on chrome is a press, not a web gesture:
   no stray text selection and no WebKit callout on bars, buttons and sheet headers, nor on in-app
   links. Content and fields stay selectable. The web keeps browser behaviour. */
html.is-native :where(.j-topbar, .j-tabbar, .j-sheet__grab, .j-sheet__head, button, [role="button"], [role="tab"], [role="menuitem"], .j-btn, .j-chip, .j-icon-btn) {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none;
}
html.is-native :where(a[href^="/"]) { -webkit-touch-callout: none; -webkit-user-drag: none; }
html.is-native :where(input, textarea, select, [contenteditable], .j-selectable) { -webkit-user-select: text; user-select: text; }

/* 3. ICONS ------------------------------------------------------------------------------------ */
/* Same rule Google's stylesheet shipped, unlayered like it was, so every existing icon keeps its size
   (NCC ncc.css:181-197). Icons are decoration: JIcon adds aria-hidden="true" translate="no".
   The 1em box: until the font arrives (font-display: block) an icon is its ligature name in the
   fallback face ("arrow_forward" is ~80px wide), and if the font never arrives the name shows. A fixed
   square box means nothing reflows when it lands and no word ever spills out. The font has no descent,
   so the clipped box keeps the same baseline. flex-shrink: 0 because the clip drops a flex item's
   automatic minimum width to 0: without it an icon in a tight row would squash below 1em. */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  width: 1em;
  height: 1em;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
/* JIcon: size from --j-icon-size, so a component sets it on its container (unlayered like the rule
   above, which a layered "x .j-icon { font-size }" could never beat). An explicit Size is inline. */
.j-icon { flex: none; font-size: var(--j-icon-size, 24px); }
.j-icon--fill { font-variation-settings: "FILL" 1; }

/* 4. TYPE ------------------------------------------------------------------------------------- */
/* Member screens: a sentence-case .j-title with a small uppercase .j-kicker. Uppercase .j-hero belongs
   to the guest marketing pages and the paywall only. Nothing readable under 12px; 11px (--j-fs-micro)
   is for badges and counts. */
@layer components {
  .j-hero {
    font: 700 var(--j-fs-hero)/var(--j-lh-hero) var(--j-font-display); letter-spacing: var(--j-ls-hero);
    text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; color: var(--j-text);
  }
  .j-display { font: 700 var(--j-fs-display)/var(--j-lh-title) var(--j-font-display); letter-spacing: var(--j-ls-title); text-wrap: balance; color: var(--j-text); }
  .j-title { font: 700 var(--j-fs-title)/var(--j-lh-title) var(--j-font-display); letter-spacing: var(--j-ls-title); text-wrap: balance; color: var(--j-text); }
  .j-h2 { font: 700 var(--j-fs-h2)/1.2 var(--j-font-display); letter-spacing: -.01em; color: var(--j-text); }
  .j-h3 { font: 700 var(--j-fs-h3)/1.3 var(--j-font-display); color: var(--j-text); }
  .j-lead { font-size: var(--j-fs-lead); line-height: 1.6; color: var(--j-text-2); max-width: 62ch; text-wrap: pretty; }
  .j-body { font-size: var(--j-fs-body); line-height: var(--j-lh-body); }
  .j-small { font-size: var(--j-fs-small); line-height: 1.45; color: var(--j-text-2); }
  .j-meta { font-size: var(--j-fs-meta); line-height: 1.4; color: var(--j-text-3); font-variant-numeric: tabular-nums; }
  .j-kicker {
    font: 700 var(--j-fs-kicker)/1.2 var(--j-font-display); letter-spacing: var(--j-ls-kicker);
    text-transform: uppercase; color: var(--j-forge);
  }
  .j-kicker--muted { color: var(--j-text-3); }
  .j-num { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
}

/* 5. CONTROLS --------------------------------------------------------------------------------- */
/* JButton, JIconButton, JChip/JChipRail, JSegmented, JField/JInput, JCard. Layered (components), so a
   Tailwind utility on the same element still wins. Every control is >= 44px to tap (Sm draws 36px and
   keeps a 44px hit area with ::after). /admin/ui-kit renders all of them. */
@layer components {
  /* JButton: .j-btn + kind + size. 700 13px display, .1em, upper case; Link is sentence case.
     Control text is in rem (13px = .8125rem at the default size), so the iOS app's Dynamic Type and a
     browser's text size reach buttons, chips, fields, rows and menus, not only the headings. */
  .j-btn {
    --bg: var(--j-surface-3); --fg: var(--j-text); --bd: transparent; --j-icon-size: 18px;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border: 1px solid var(--bd); border-radius: var(--j-r-md);
    background: var(--bg); color: var(--fg); white-space: nowrap; text-decoration: none; cursor: pointer;
    font: 700 .8125rem/1 var(--j-font-display); letter-spacing: var(--j-ls-btn); text-transform: uppercase;
    -webkit-user-select: none; user-select: none;
    transition: scale var(--j-dur-fast) ease, background-color var(--j-dur) ease, border-color var(--j-dur) ease, box-shadow var(--j-dur) ease, opacity var(--j-dur) ease;
  }
  a.j-btn:hover, a.j-btn:visited { color: var(--fg); text-decoration: none; }
  .j-btn:active { scale: .97; }
  .j-btn:disabled, .j-btn[aria-disabled="true"] { opacity: .45; cursor: default; scale: none; }
  .j-btn[aria-busy="true"] { cursor: progress; opacity: 1; }
  .j-btn--sm { min-height: 36px; padding: 0 14px; font-size: .75rem; }
  .j-btn--sm::after { content: ""; position: absolute; inset: -4px 0; }
  .j-btn--lg { min-height: 52px; padding: 0 24px; font-size: .875rem; }
  /* A full-width button may wrap at large text sizes instead of running out of its box. */
  .j-btn--block { display: flex; width: 100%; padding-block: 8px; white-space: normal; text-align: center; line-height: 1.2; }
  .j-btn--primary { --fg: var(--j-on-forge); background: var(--j-gradient); box-shadow: var(--j-shadow-ember); }
  @media (hover: hover) { .j-btn--primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--j-forge-press) 0%, var(--j-forge) 100%); } }
  .j-btn--secondary { --bg: var(--j-surface-3); --fg: var(--j-text); }
  @media (hover: hover) { .j-btn--secondary:hover:not(:disabled) { --bd: var(--j-line-2); } }
  .j-btn--ink { --bg: var(--j-ink); --fg: var(--j-on-ink); }
  .j-btn--ghost { --bg: transparent; --fg: var(--j-text); --bd: var(--j-line-strong); }
  @media (hover: hover) { .j-btn--ghost:hover:not(:disabled) { --bg: var(--j-surface-2); } }
  .j-btn--danger { --bg: var(--j-danger-wash); --fg: var(--j-danger); }
  .j-btn--link {
    --bg: transparent; --fg: var(--j-forge); padding: 0 4px; text-transform: none; letter-spacing: 0;
    font: 600 var(--j-fs-small)/1.2 var(--j-font-body); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  }
  a.j-btn--link:hover { color: var(--j-forge-press); }
  .j-btn__label { display: inline-flex; align-items: center; gap: 8px; }
  .j-btn.is-loading .j-btn__label { visibility: hidden; }
  .j-btn__spin { position: absolute; inset: 0; display: grid; place-items: center; }
  .j-btn--primary .j-spinner { border-color: color-mix(in srgb, var(--j-on-forge) 35%, transparent); border-top-color: var(--j-on-forge); }
  .j-btn--ink .j-spinner { border-color: color-mix(in srgb, var(--j-on-ink) 35%, transparent); border-top-color: var(--j-on-ink); }

  /* JIconButton: 44px target whatever the drawn size */
  .j-icon-btn {
    --j-icon-size: 24px; position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: none; color: var(--j-text-2); cursor: pointer; text-decoration: none;
    transition: color var(--j-dur) ease, background-color var(--j-dur) ease, scale var(--j-dur-fast) ease;
  }
  .j-icon-btn:active { scale: .92; }
  @media (hover: hover) { .j-icon-btn:hover:not(:disabled) { color: var(--j-text); background: var(--j-surface-2); } }
  .j-icon-btn[aria-pressed="true"], .j-icon-btn[aria-expanded="true"] { color: var(--j-forge); }
  .j-icon-btn--filled { background: var(--j-surface-2); color: var(--j-text); }
  .j-icon-btn--sm { width: 36px; height: 36px; --j-icon-size: 20px; }
  .j-icon-btn--sm::after { content: ""; position: absolute; inset: -4px; }
  .j-icon-btn:disabled { opacity: .45; cursor: default; scale: none; }
  .j-icon-btn__dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--j-forge); box-shadow: 0 0 0 2px var(--j-bg); }
  .j-icon-btn__badge { position: absolute; top: 2px; right: 0; }

  /* JChip: 36px drawn, 44px to tap, brass hairline; .on is ink; --tag the forge wash label */
  .j-chip {
    --j-icon-size: 16px; position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px;
    border-radius: var(--j-r-pill); border: 1px solid var(--j-line-brass); background: var(--j-surface); color: var(--j-text-2);
    font: 600 .8125rem/1 var(--j-font-body); white-space: nowrap; text-decoration: none; cursor: pointer;
    transition: color var(--j-dur) ease, background-color var(--j-dur) ease, border-color var(--j-dur) ease, scale var(--j-dur-fast) ease;
  }
  .j-chip::after { content: ""; position: absolute; inset: -4px 0; }
  span.j-chip { cursor: default; }
  span.j-chip::after { content: none; }
  .j-chip:active { scale: .96; }
  .j-chip .j-icon { margin-left: -2px; }
  .j-chip.on { background: var(--j-ink); border-color: var(--j-ink); color: var(--j-on-ink); }
  .j-chip--tag { height: 28px; padding: 0 10px; border-color: transparent; background: var(--j-wash); color: var(--j-forge); font-size: var(--j-fs-meta); }
  .j-chip__count { color: var(--j-text-3); font-variant-numeric: tabular-nums; }
  .j-chip.on .j-chip__count { color: inherit; opacity: .8; }
  .j-chip:disabled { opacity: .45; cursor: default; }
  @media (hover: hover) { button.j-chip:not(.on):hover, a.j-chip:not(.on):hover { border-color: var(--j-line-strong); color: var(--j-text); } }

  /* JChipRail: bleeds to the gutter and fades at the edges */
  .j-rail {
    display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: calc(var(--j-gutter) * -1); padding: 6px var(--j-gutter); scroll-padding-inline: var(--j-gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--j-gutter), #000 calc(100% - var(--j-gutter)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--j-gutter), #000 calc(100% - var(--j-gutter)), transparent);
  }
  .j-rail::-webkit-scrollbar { display: none; }
  .j-rail--sticky { position: sticky; top: calc(var(--j-safe-t) + var(--j-topbar-h)); z-index: var(--j-z-raised); background: var(--j-bg); }

  /* JSegmented: --n = segments, --i = selected index; the puck slides under the selection. The puck's
     line-strong ring (>= 3:1 on surface-2 in both themes) and the forge 700 label mark the selection;
     a surface puck on surface-2 alone is ~1.1:1 (WCAG 1.4.11). */
  .j-seg {
    --n: 2; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    padding: 4px; border-radius: var(--j-r-pill); background: var(--j-surface-2); border: 1px solid var(--j-line-2); isolation: isolate;
  }
  .j-seg__puck {
    position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n));
    border-radius: var(--j-r-pill); background: var(--j-surface); box-shadow: var(--j-shadow-1); border: 2px solid var(--j-line-strong);
    transform: translateX(calc(var(--i) * 100%)); transition: transform calc(320ms / var(--j-tempo)) var(--j-pop);
  }
  .j-seg__opt {
    position: relative; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--j-r-pill); background: none; cursor: pointer;
    color: var(--j-text-2); font: 600 var(--j-fs-small)/1 var(--j-font-body); transition: color var(--j-dur) ease;
  }
  .j-seg__opt::after { content: ""; position: absolute; inset: -4px 0; }
  .j-seg__opt[aria-checked="true"] { color: var(--j-forge); font-weight: 700; }
  /* A segmented row of links (CommunityTabs): the same pill, each option its own address. */
  .j-seg--nav .j-seg__opt { display: grid; place-items: center; text-decoration: none; }
  .j-seg--nav .j-seg__opt:hover { color: var(--j-text); }
  .j-seg__opt[aria-current="page"], .j-seg--nav .j-seg__opt[aria-current="page"]:hover { color: var(--j-forge); font-weight: 700; }

  /* JField + JInput: label above, 44px, line-strong border (>= 3:1), validation under it */
  .j-field { display: grid; gap: 6px; }
  .j-label { font: 600 var(--j-fs-small)/1.3 var(--j-font-body); color: var(--j-text-2); }
  .j-label__opt { margin-left: 4px; font-weight: 400; color: var(--j-text-3); }
  .j-field__hint { margin: 0; color: var(--j-text-3); font-size: var(--j-fs-meta); line-height: 1.4; }
  .j-field__error { display: flex; align-items: flex-start; gap: 4px; margin: 0; color: var(--j-danger); font-size: var(--j-fs-meta); font-weight: 600; line-height: 1.4; }
  .j-field .validation-message { color: var(--j-danger); font-size: var(--j-fs-meta); font-weight: 600; }
  .j-input {
    width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--j-r-md);
    background: var(--j-surface); color: var(--j-text); border: 1px solid var(--j-line-strong);
    font: 400 .9375rem/1.4 var(--j-font-body); caret-color: var(--j-forge); -webkit-appearance: none; appearance: none;
    transition: border-color var(--j-dur) ease, box-shadow var(--j-dur) ease;
  }
  .j-input::placeholder { color: var(--j-text-3); opacity: 1; }
  .j-input:focus { border-color: var(--j-forge); box-shadow: 0 0 0 3px color-mix(in srgb, var(--j-forge) 18%, transparent); }
  .j-input:disabled { opacity: .55; cursor: not-allowed; }
  .j-input[aria-invalid="true"], .j-field.is-invalid .j-input, .j-input.invalid { border-color: var(--j-danger); }
  textarea.j-input { min-height: 96px; resize: vertical; }
  select.j-input {
    padding-right: 36px; cursor: pointer;
    background: var(--j-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' stroke='%23887364' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  }
  @media (max-width: 767px) { .j-input { font-size: max(16px, 1rem); } }

  /* JCard: surface, line-2 hairline, radius lg, shadow-1 */
  .j-card { position: relative; border-radius: var(--j-r-lg); background: var(--j-surface); border: 1px solid var(--j-line-2); box-shadow: var(--j-shadow-1); color: var(--j-text); }
  .j-card--pad { padding: 20px; }
  .j-card--pad-sm { padding: 12px; }
  .j-card--feature {
    border-color: var(--j-line-brass);
    background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--j-glow) 24%, transparent) 0%, transparent 60%), var(--j-surface);
  }
  .j-card--media { overflow: hidden; }
  .j-card--media > .j-img:first-child { border-radius: 0; }
  .j-card--inset { background: var(--j-surface-2); border-color: var(--j-line); box-shadow: none; }
  .j-card--dashed { background: transparent; border: 1.5px dashed var(--j-line-strong); box-shadow: none; }
  a.j-card, .j-card[role="button"] { display: block; color: inherit; text-decoration: none; cursor: pointer; }
  .j-card--press { transition: scale var(--j-dur-fast) ease, border-color var(--j-dur) ease, box-shadow var(--j-dur) ease; }
  .j-card--press:active { scale: .985; }
  @media (hover: hover) { .j-card--press:hover { border-color: var(--j-line-brass); box-shadow: var(--j-shadow-2); } }
}

/* 5b. COMPONENTS ------------------------------------------------------------------------------ */
/* The rest of Components/J: page and section headers, badges, avatars, images, price, lists, states,
   alerts, skeletons, the spinner, sheets, confirm, menus, the upsell and Me sheets. */
@layer components {
  /* JPage: one gutter, top spacing and max width (AUDIT P2-93) */
  /* The gutter grows to the side safe area in landscape on a notched phone (viewport-fit=cover). */
  .j-page { width: 100%; max-width: var(--j-max); margin: 0 auto; padding: var(--j-page-top) max(var(--j-gutter), var(--j-safe-r)) 0 max(var(--j-gutter), var(--j-safe-l)); }
  .j-page--wide { max-width: var(--j-max-wide); }
  .j-page--flush { padding-inline: 0; }

  /* JLogo: currentColor, so it follows the theme */
  .j-logo { display: inline-flex; align-items: center; color: var(--j-text); text-decoration: none; }
  a.j-logo { min-height: 44px; padding: 0 4px; }
  a.j-logo:hover, a.j-logo:visited { color: var(--j-text); }
  .j-logo svg { display: block; width: auto; }

  /* JBackButton */
  .j-back {
    --j-icon-size: 24px; display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; margin-left: -10px; padding: 0 10px;
    border: 0; border-radius: var(--j-r-pill); background: none; color: var(--j-text); cursor: pointer; text-decoration: none;
  }
  .j-back__label { font: 700 var(--j-fs-kicker)/1 var(--j-font-display); letter-spacing: var(--j-ls-kicker); text-transform: uppercase; color: var(--j-text-2); }
  @media (hover: hover) { .j-back:hover { background: var(--j-surface-2); } }

  /* JPageHeader: kicker, sentence-case title, sub line, trailing actions */
  .j-ph { margin: 0 0 var(--j-6); }
  .j-ph__back { margin-bottom: 2px; }
  .j-ph__row { display: flex; align-items: center; gap: 12px; }
  .j-ph__titles { flex: 1 1 auto; min-width: 0; }
  .j-ph__titles > .j-kicker { display: block; margin-bottom: 6px; }
  .j-ph__titles > .j-title { margin: 0; overflow-wrap: anywhere; }
  .j-ph__sub { margin: 6px 0 0; }
  .j-ph__trail { flex: none; display: flex; align-items: center; gap: 4px; margin-right: -10px; }

  /* JSectionHeader: "See all" gets a 44px target without growing the row */
  .j-sh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 var(--j-3); }
  .j-sh__title { margin: 0; font: 700 var(--j-fs-h3)/1.3 var(--j-font-display); color: var(--j-text); }
  .j-sh__count { font: 600 var(--j-fs-small)/1 var(--j-font-body); color: var(--j-text-3); font-variant-numeric: tabular-nums; }
  .j-sh__more {
    --j-icon-size: 18px; margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-block: -12px;
    padding: 0 2px; border: 0; background: none; color: var(--j-forge); font: 600 var(--j-fs-meta)/1 var(--j-font-body); text-decoration: none; cursor: pointer;
  }
  .j-sh__trail { margin-left: auto; align-self: center; }

  /* JBadge: 11px is for badges and counts only */
  .j-badge {
    --j-icon-size: 12px; display: inline-flex; align-items: center; gap: 3px; min-height: 20px; padding: 0 7px; border-radius: var(--j-r-xs); vertical-align: middle;
    background: var(--j-surface-3); color: var(--j-text-2); white-space: nowrap;
    font: 700 var(--j-fs-micro)/1 var(--j-font-display); letter-spacing: .08em; text-transform: uppercase;
  }
  .j-badge--forge { background: var(--j-wash); color: var(--j-forge); }
  .j-badge--go { background: var(--j-go-wash); color: var(--j-go); }
  .j-badge--warn { background: var(--j-warn-wash); color: var(--j-warn); }
  .j-badge--danger { background: var(--j-danger-wash); color: var(--j-danger); }
  .j-badge--ink { background: var(--j-ink); color: var(--j-on-ink); }
  .j-badge--count {
    justify-content: center; min-width: 18px; min-height: 18px; padding: 0 5px; border-radius: var(--j-r-pill); background: var(--j-forge); color: var(--j-on-forge);
    font: 700 var(--j-fs-micro)/1 var(--j-font-body); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums;
  }

  /* JAvatar: the photo, or the initial in forge on surface-3 */
  .j-avatar {
    --s: 36px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s);
    border-radius: 50%; background: var(--j-surface-3); color: var(--j-forge); text-decoration: none; -webkit-user-select: none; user-select: none;
    font: 700 calc(var(--s) * .42)/1 var(--j-font-display); text-transform: uppercase;
  }
  .j-avatar__initial { line-height: 1; }
  .j-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
  .j-avatar.is-broken > img { display: none; }
  .j-avatar.is-ring { box-shadow: 0 0 0 2px var(--j-bg), 0 0 0 4px var(--j-forge); }
  .j-avatar__dot {
    position: absolute; top: 0; right: 0; width: max(8px, calc(var(--s) * .24)); height: max(8px, calc(var(--s) * .24));
    border-radius: 50%; background: var(--j-forge); box-shadow: 0 0 0 2px var(--j-bg);
  }

  /* JImg: fixed-ratio box (no CLS); LQIP blurred underneath; the JHu monogram when there's nothing */
  .j-img {
    position: relative; display: block; overflow: hidden; isolation: isolate; aspect-ratio: var(--ratio, 16 / 9);
    border-radius: var(--j-img-r, var(--j-r-md)); background: var(--j-surface-2);
  }
  .j-img--lqip::before {
    content: ""; position: absolute; inset: -12px; z-index: -1; background: var(--lqip) center / cover no-repeat; filter: blur(12px);
  }
  .j-img__mono {
    position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; color: var(--j-text-4);
    font: 700 1.125rem/1 var(--j-font-display); letter-spacing: -.02em;
  }
  .j-img--lqip:not(.is-broken) > .j-img__mono { visibility: hidden; }
  .j-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .j-img--contain > img { object-fit: contain; }
  .j-img.is-broken > img, .j-img.is-broken::before { visibility: hidden; }

  /* JPrice: tabular, never animated; the was-price is text-2 with a line in text-3 (~2px). The line is
     drawn (::after), not text-decoration: Space Grotesk's line-through sits at mid cap height, on the tip of
     the 1's flag, so "$199" read as "$499" (10/11). It runs just under the x-height centre instead: the
     baseline is ~.21em above the box bottom at line-height 1.1, so bottom .43em puts the line ~.22em above
     the baseline (x-height .495em), clearly below the flag, which ends .375em above it. A border, so
     forced-colors mode still draws it; screen readers keep "Regular price" from the j-sr text. */
  .j-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--j-text); }
  .j-price--sm { font-size: 1rem; }
  .j-price--md { font-size: 1.25rem; }
  .j-price--lg { font-size: 1.75rem; }
  .j-price--hero { font-size: clamp(2.5rem, 8vw, 3.5rem); }
  .j-price__now { font: 700 1em/1.05 var(--j-font-display); letter-spacing: -.02em; }
  .j-price__was {
    position: relative; font: 500 .62em/1.1 var(--j-font-display); color: var(--j-text-2); text-decoration: none;
  }
  .j-price__was::after {
    content: ""; position: absolute; left: -.06em; right: -.06em; bottom: .43em;
    border-top: max(1.5px, .075em) solid var(--j-text-3); transform: translateY(50%); pointer-events: none;
  }
  .j-price--sm .j-price__was { font-size: .8em; }
  /* The promotion: a forge badge in sentence case ("Launch price") on its own line above the price, with a real
     end date beside it; Compact keeps all of it on the price's line. Fixed rem sizes, whatever the price size. */
  .j-price__promo {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex-basis: 100%; justify-content: inherit;
    margin-bottom: 4px; font-size: var(--j-fs-meta); letter-spacing: 0;
  }
  .j-price--compact .j-price__promo { display: contents; }
  .j-price--compact :is(.j-price__badge, .j-price__ends) { align-self: center; }
  .j-price--compact .j-price__ends { order: 1; }
  .j-price__badge {
    display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: var(--j-r-pill);
    background: var(--j-wash); color: var(--j-forge); box-shadow: inset 0 0 0 1px var(--j-forge-line);
    font: 700 var(--j-fs-meta)/1.25 var(--j-font-body);
  }
  .j-price__ends { font: 600 var(--j-fs-meta)/1.3 var(--j-font-body); color: var(--j-text-2); }
  .j-price__bnpl { flex-basis: 100%; font: 400 var(--j-fs-meta)/1.4 var(--j-font-body); color: var(--j-text-3); }

  /* JListGroup + JListRow (Settings, the Me hub) */
  .j-list { margin: 0 0 var(--j-5); }
  .j-list__title { display: block; margin: 0 6px 8px; }
  .j-list__card { overflow: hidden; border-radius: var(--j-r-lg); background: var(--j-surface); border: 1px solid var(--j-line-2); }
  .j-list__foot { margin: 8px 6px 0; }
  .j-row {
    display: flex; align-items: center; gap: 13px; width: 100%; min-height: 52px; padding: 10px 14px; border: 0; border-top: 1px solid var(--j-line);
    background: none; color: var(--j-text); font: 500 .9375rem/1.3 var(--j-font-body); text-align: left; text-decoration: none;
  }
  .j-row:first-child { border-top: 0; }
  a.j-row:hover, a.j-row:visited { color: var(--j-text); text-decoration: none; }
  a.j-row, button.j-row { cursor: pointer; transition: background-color var(--j-dur-fast) ease; }
  a.j-row:active, button.j-row:active { background: var(--j-surface-2); }
  @media (hover: hover) { a.j-row:hover, button.j-row:hover { background: var(--j-surface-2); } }
  .j-row:focus-visible { outline-offset: -2px; }
  .j-row__icon { --j-icon-size: 18px; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--j-r-sm); background: var(--j-wash); color: var(--j-forge); }
  .j-row__main { flex: 1 1 auto; min-width: 0; }
  .j-row__label { display: block; }
  .j-row__sub { display: block; margin-top: 2px; color: var(--j-text-2); font-size: var(--j-fs-small); font-weight: 400; }
  .j-row__val { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 55%; color: var(--j-text-3); font-size: var(--j-fs-small); }
  .j-row__val > span:not(.j-icon) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .j-row__chev { color: var(--j-text-3); }
  .j-row.is-danger, .j-row.is-danger .j-row__chev { color: var(--j-danger); }
  .j-row.is-danger .j-row__icon { background: var(--j-danger-wash); color: var(--j-danger); }
  .j-row:disabled, .j-row[aria-disabled="true"] { opacity: .45; cursor: default; }

  /* JEmptyState / JErrorState */
  .j-empty { display: grid; justify-items: center; padding: 40px 24px; text-align: center; }
  .j-empty__icon { --j-icon-size: 28px; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; background: var(--j-wash); color: var(--j-forge); }
  .j-empty--error .j-empty__icon, .j-empty__icon.is-danger { background: var(--j-danger-wash); color: var(--j-danger); }
  .j-empty__title { margin: 0; font: 700 var(--j-fs-h3)/1.3 var(--j-font-display); color: var(--j-text); text-wrap: balance; }
  .j-empty__body { max-width: 38ch; margin: 6px 0 0; color: var(--j-text-2); font-size: var(--j-fs-small); line-height: 1.5; text-wrap: pretty; }
  .j-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
  .j-empty--compact { padding: 24px 16px; }

  /* JInlineAlert: danger wash with a 3px rule by default */
  .j-alert {
    --j-icon-size: 20px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--j-r-md);
    background: var(--j-danger-wash); border-left: 3px solid var(--j-danger); color: var(--j-text); font-size: var(--j-fs-small); line-height: 1.45; text-align: left;
  }
  .j-alert > .j-icon { margin-top: -1px; color: var(--j-danger); }
  .j-alert__body { flex: 1 1 auto; min-width: 0; }
  .j-alert__title { display: block; font-weight: 700; }
  .j-alert__action { flex: none; align-self: center; }
  .j-alert--info { background: var(--j-surface-2); border-left-color: var(--j-line-strong); }
  .j-alert--info > .j-icon { color: var(--j-text-2); }
  .j-alert--go { background: var(--j-go-wash); border-left-color: var(--j-go); }
  .j-alert--go > .j-icon { color: var(--j-go); }
  .j-alert--warn { background: var(--j-warn-wash); border-left-color: var(--j-warn); }
  .j-alert--warn > .j-icon { color: var(--j-warn); }

  /* JSkeleton: first load only; a refetch keeps the old content on screen */
  .j-skel {
    display: block; border-radius: var(--j-r-xs);
    background: linear-gradient(90deg, var(--j-surface-2) 25%, var(--j-surface-3) 50%, var(--j-surface-2) 75%) 0 0 / 200% 100%;
    animation: j-shimmer calc(1400ms / var(--j-tempo)) ease-in-out infinite;
  }
  .j-skel--line { height: .8em; border-radius: 6px; }
  .j-skel--block { border-radius: var(--j-r-md); }
  .j-skel--circle { border-radius: 50%; }
  .j-skel-lines { display: grid; gap: 8px; }

  /* JSpinner: buttons and pull-to-refresh only; screens use skeletons */
  .j-spinner {
    --s: 20px; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; vertical-align: middle;
    border: 2px solid var(--j-line-2); border-top-color: var(--j-forge);
    animation: j-spin calc(800ms / var(--j-tempo)) linear infinite;
  }

  /* JSheet (port of NSheet). Phones: bottom sheet with a grabber; >= 768px: centred dialog. Entry fills
     backwards only, so the panel never stays a containing block for fixed children. */
  .j-sheet-root { position: fixed; inset: 0; z-index: var(--j-z-sheet); display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--j-safe-r) 0 var(--j-safe-l); }
  .j-sheet__scrim { position: absolute; inset: 0; background: var(--j-scrim); touch-action: none; animation: j-scrim-in var(--j-dur-sheet) ease backwards; }
  .j-sheet {
    position: relative; display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: calc(100dvh - var(--j-safe-t) - 24px);
    padding-bottom: var(--j-safe-b); border-radius: var(--j-r-sheet) var(--j-r-sheet) 0 0; background: var(--j-surface); color: var(--j-text);
    border: 1px solid var(--j-line-2); border-bottom: 0; box-shadow: var(--j-shadow-sheet); outline: none; touch-action: pan-y;
    animation: j-sheet-up var(--j-dur-sheet) var(--j-glide) backwards;
  }
  .j-sheet--tall { height: calc(100dvh - var(--j-safe-t) - 24px); }
  .j-sheet__grab { flex: none; display: grid; place-items: center; height: 24px; cursor: grab; touch-action: none; }
  .j-sheet__grab::before { content: ""; width: 38px; height: 5px; border-radius: 3px; background: var(--j-text-4); }
  .j-sheet__head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 0 20px 12px; touch-action: none; }
  .j-sheet__titles { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
  .j-sheet__title { margin: 2px 0 0; font: 700 var(--j-fs-h2)/1.25 var(--j-font-display); color: var(--j-text); }
  .j-sheet__close {
    --j-icon-size: 20px; position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: -6px;
    border: 0; border-radius: 50%; background: var(--j-surface-2); color: var(--j-text-2); cursor: pointer;
  }
  .j-sheet__close::after { content: ""; position: absolute; inset: -4px; }
  .j-sheet__close:disabled { opacity: .45; cursor: default; }
  .j-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }
  .j-sheet--flush .j-sheet__body { padding: 0 8px 8px; }
  .j-sheet__foot { flex: none; display: grid; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--j-line); }
  @media (min-width: 768px) {
    .j-sheet-root { align-items: center; padding: 24px max(24px, var(--j-safe-r)) 24px max(24px, var(--j-safe-l)); }
    .j-sheet {
      max-width: 520px; max-height: min(760px, 88dvh); padding-bottom: 0; border-radius: var(--j-r-sheet); border-bottom: 1px solid var(--j-line-2);
      animation: j-pop calc(260ms / var(--j-tempo)) var(--j-out) backwards;
    }
    .j-sheet--tall { height: min(760px, 88dvh); }
    .j-sheet__grab { height: 16px; visibility: hidden; }
  }

  /* JConfirm */
  .j-sheet--confirm { max-width: 440px; }
  .j-confirm { padding-top: 4px; text-align: center; }
  .j-confirm .j-empty__icon { margin: 0 auto 14px; }
  .j-confirm__title { margin: 0 0 8px; font: 700 var(--j-fs-h2)/1.25 var(--j-font-display); color: var(--j-text); text-wrap: balance; }
  .j-confirm__msg { margin: 0; color: var(--j-text-2); font-size: var(--j-fs-small); line-height: 1.5; text-wrap: pretty; }
  .j-confirm .j-alert { margin-top: 14px; }
  .j-confirm__actions { display: grid; gap: 10px; margin-top: 22px; }
  @media (min-width: 768px) {
    .j-sheet--confirm { max-width: 400px; }
    .j-confirm__actions { grid-template-columns: 1fr 1fr; }
    .j-confirm__actions > :first-child { order: 2; }
  }

  /* JMenu: an action sheet on phones, a popover under its trigger from 768px */
  .j-menu { position: relative; display: inline-flex; }
  .j-menu--sheet { display: contents; }
  .j-menu__list { display: grid; padding: 0 8px 8px; }
  .j-menu__title { padding: 0 12px 8px; }
  .j-menu__item {
    --j-icon-size: 22px; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 12px; border: 0; border-radius: var(--j-r-lg);
    background: none; color: var(--j-text); font: 500 1rem/1.2 var(--j-font-body); text-align: left; text-decoration: none; cursor: pointer;
  }
  a.j-menu__item:hover, a.j-menu__item:visited { color: var(--j-text); text-decoration: none; }
  .j-menu__item > .j-icon { color: var(--j-text-2); }
  .j-menu__item:active { background: var(--j-surface-2); }
  @media (hover: hover) { .j-menu__item:hover:not(:disabled) { background: var(--j-surface-2); } }
  .j-menu__item:focus-visible { outline-offset: -2px; }
  .j-menu__item.is-danger, .j-menu__item.is-danger > .j-icon { color: var(--j-danger); }
  .j-menu__item:disabled { opacity: .45; cursor: default; }
  .j-menu__text { min-width: 0; }
  .j-menu__sub { display: block; margin-top: 2px; color: var(--j-text-3); font-size: var(--j-fs-meta); font-weight: 400; }
  @media (min-width: 768px) {
    .j-menu:not(.j-menu--sheet) > .j-sheet-root { position: absolute; inset: auto; top: calc(100% + 6px); right: 0; display: block; padding: 0; }
    .j-menu--start > .j-sheet-root { right: auto; left: 0; }
    .j-menu--start > .j-sheet-root > .j-sheet { transform-origin: top left; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root > .j-sheet__scrim { position: fixed; background: transparent; animation: none; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root > .j-sheet {
      width: max-content; min-width: 220px; max-width: 320px; max-height: min(480px, 70dvh); border: 1px solid var(--j-line-2);
      border-radius: var(--j-r-md); background: var(--j-surface); box-shadow: var(--j-shadow-float); transform-origin: top right;
      animation: j-pop calc(200ms / var(--j-tempo)) var(--j-out) backwards;
    }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root > .j-sheet .j-sheet__grab { display: none; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root .j-sheet__body { padding: 0; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root .j-menu__list { padding: 6px; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root .j-menu__title { padding: 8px 10px 4px; }
    .j-menu:not(.j-menu--sheet) > .j-sheet-root .j-menu__item { --j-icon-size: 20px; min-height: 44px; gap: 12px; padding: 0 10px; border-radius: var(--j-r-sm); font-size: var(--j-fs-small); }
  }

  /* JUpsellSheet */
  .j-upsell { padding: 4px 0; text-align: center; }
  .j-upsell__mark {
    --j-icon-size: 32px; display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 14px; border-radius: var(--j-r-xl);
    background: radial-gradient(100% 100% at 30% 20%, var(--j-wash-2), var(--j-wash)); color: var(--j-forge);
  }
  .j-upsell__title { margin: 10px 0 8px; font: 700 var(--j-fs-h2)/1.2 var(--j-font-display); color: var(--j-text); text-wrap: balance; }
  .j-upsell__body { max-width: 34ch; margin: 0 auto; color: var(--j-text-2); font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }
  .j-upsell__actions { display: grid; gap: 10px; margin-top: 22px; }

  /* JMeSheet */
  .j-me { display: grid; gap: 14px; padding: 0 8px 12px; }
  .j-me__head {
    display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 4px 8px; border-radius: var(--j-r-lg);
    color: var(--j-text); text-decoration: none;
  }
  .j-me__head:hover, .j-me__head:visited { color: var(--j-text); text-decoration: none; }
  @media (hover: hover) { .j-me__head:hover { background: var(--j-surface-2); } }
  .j-me__id { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
  .j-me__name { font: 700 1.0625rem/1.25 var(--j-font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .j-me__chev { color: var(--j-text-3); }
  .j-me .j-list { margin: 0; }
  .j-me__theme { display: grid; gap: 8px; padding: 0 6px; }
  .j-me__out-form { margin: 0; }
}

/* 6. SHELL ------------------------------------------------------------------------------------ */
/* Shell chrome: JTopBar, JTabBar, JToastHost, JPullToRefresh, JBootCover, JUpdateGate. Unlayered, like
   NCC's bars: they must beat any utility a page puts near them. The layouts (JLayout, JMarketingLayout,
   EmptyLayout) add their own rules below these. */

/* JToastHost: drops from the top, above sheets */
.j-toast-host { position: fixed; z-index: var(--j-z-toast); top: calc(var(--j-safe-t) + 8px); left: 0; right: 0; display: grid; justify-items: center; padding: 0 max(10px, var(--j-safe-r)) 0 max(10px, var(--j-safe-l)); pointer-events: none; }
.j-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 4px; width: min(100%, 420px); padding: 6px; border-radius: var(--j-r-lg);
  background: var(--j-surface); color: var(--j-text); border: 1px solid var(--j-line-2); box-shadow: var(--j-shadow-float);
  animation: j-drop calc(420ms / var(--j-tempo)) var(--j-pop) backwards;
}
.j-toast.is-leaving { opacity: 0; translate: 0 -30%; transition: opacity var(--j-dur-exit) ease, translate var(--j-dur-exit) ease; }
.j-toast__main { flex: 1 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 4px; border: 0; border-radius: var(--j-r-md); background: none; color: inherit; text-align: left; cursor: pointer; }
.j-toast__icon { --j-icon-size: 20px; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--j-r-md); background: var(--j-surface-3); color: var(--j-text-2); }
.j-toast.is-go .j-toast__icon { background: var(--j-go-wash); color: var(--j-go); }
.j-toast.is-alert .j-toast__icon { background: var(--j-danger-wash); color: var(--j-danger); }
.j-toast__text { flex: 1 1 auto; min-width: 0; }
.j-toast__k { display: block; font: 700 var(--j-fs-kicker)/1.2 var(--j-font-display); letter-spacing: var(--j-ls-kicker); text-transform: uppercase; color: var(--j-text-3); }
.j-toast__t { display: block; font: 600 var(--j-fs-small)/1.3 var(--j-font-body); color: var(--j-text); text-wrap: pretty; }
.j-toast__go { flex: none; color: var(--j-text-3); }
.j-toast__action {
  flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--j-r-md); background: var(--j-surface-2); color: var(--j-forge); cursor: pointer;
  font: 700 .75rem/1 var(--j-font-display); letter-spacing: var(--j-ls-btn); text-transform: uppercase;
}

/* JTopBar: fixed glass, safe-top + 56px (72px from 1024px). The frosted layer is ::after, so the bar never
   becomes the containing block of anything fixed inside it; ::before paints --j-bg above it, so rubber-band
   overscroll never shows another colour behind the status bar. The hairline shows once the page has
   scrolled (html.j-scrolled, j-ui.js). */
.j-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--j-z-topbar); padding-top: var(--j-safe-t); color: var(--j-text);
  border-bottom: 1px solid transparent; transition: border-color var(--j-dur) ease;
}
.j-topbar::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 100vh; background: var(--j-bg); pointer-events: none; }
.j-topbar::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--j-glass);
  -webkit-backdrop-filter: var(--j-glass-fx); backdrop-filter: var(--j-glass-fx); pointer-events: none;
}
html.j-scrolled .j-topbar { border-bottom-color: var(--j-line); }
.j-topbar__row {
  position: relative; display: flex; align-items: center; gap: 4px; max-width: var(--j-max-wide); height: var(--j-topbar-h);
  margin: 0 auto; padding: 0 max(calc(var(--j-gutter) - 8px), var(--j-safe-l)) 0 max(calc(var(--j-gutter) - 8px), var(--j-safe-r));
}
.j-topbar__logo { margin-right: 4px; }
.j-topbar__back { margin-left: 0; }
/* The page title, once its large title has scrolled under the bar (html.j-title-in-bar), or pinned.
   An in-flow flex item that takes the room between the left and right controls (it replaces the spacer
   below 1024px), so it never runs under the logo, the back arrow, the CTA, Sign in, Menu or the account
   button (Phil, TestFlight 1.0.7: it used to be absolutely centred with a fixed 200px allowance and
   ran under them). Its basis is 0, so it only ever gets left-over room and never squeezes a control.
   The text: one line with an ellipsis, a line box taller than the font's ascent + descent (the 1.2 one
   clipped tall glyphs against the overflow box), capped at 28px so 200% text / large Dynamic Type stays
   inside the 56px bar, and nudged by jhu.barTitleFit (--j-bar-title-shift) so it sits on the bar's
   centre whenever the room allows; .is-cramped hides a title the room would cut to a stub. */
.j-topbar__title {
  display: flex; flex: 1 1 0; align-items: center; justify-content: center; align-self: stretch; min-width: 0;
  padding-inline: 2px; color: var(--j-text); pointer-events: none; opacity: 0; transition: opacity var(--j-dur-fast) ease;
}
.j-topbar__title-text {
  display: block; width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 min(var(--j-fs-bar), 28px)/1.4 var(--j-font-display); translate: var(--j-bar-title-shift, 0px) 0;
}
.j-topbar__title.is-cramped .j-topbar__title-text { visibility: hidden; }
html.j-title-in-bar .j-topbar__title, .j-topbar__title.is-pinned { opacity: 1; }
@media (max-width: 1023px) { .j-topbar__title ~ .j-topbar__spacer { display: none; } }
.j-topbar__nav { display: none; }
.j-topbar__spacer { flex: 1 1 auto; }
.j-topbar__slot { display: inline-flex; align-items: center; gap: 2px; }
.j-topbar__me {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 0 6px;
  border: 0; border-radius: var(--j-r-pill); background: none; color: var(--j-text); cursor: pointer; transition: scale var(--j-dur-fast) ease;
}
.j-topbar__me:active { scale: .94; }
.j-topbar__name { display: none; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--j-fs-small)/1 var(--j-font-body); }
.j-topbar__signin { margin-left: 4px; }
.j-topbar__guest { margin-left: 2px; }
@media (min-width: 1024px) {
  .j-topbar__title { display: none; }
  .j-topbar__nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
  .j-topbar__link {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--j-r-md);
    color: var(--j-text-2); font: 600 var(--j-fs-small)/1 var(--j-font-display); letter-spacing: .02em; text-decoration: none;
    transition: color var(--j-dur-fast) ease, background-color var(--j-dur-fast) ease;
  }
  .j-topbar__link:visited { color: var(--j-text-2); }
  .j-topbar__link:hover { color: var(--j-text); background: var(--j-surface-2); text-decoration: none; }
  .j-topbar__link.is-active { color: var(--j-text); box-shadow: inset 0 -2px 0 var(--j-forge); border-radius: 0; }
  .j-topbar__name { display: inline; }
  @media (hover: hover) { .j-topbar__me:hover { background: var(--j-surface-2); } }
}

/* JTabBar (< 1024px and the app): No Cover Charge's floating glass pill in forge colours. Learn, Guild,
   Showcase, Forge Map. 14px from the screen edges (plus the side safe areas), --j-tab-gap above the
   bottom safe area, at most 520px wide. The puck under the active cell is the forge wash with a forge
   hairline; it slides to --i (the active cell) and fades out on a page no tab owns ([data-none]). The
   active cell's icon fills and its label turns forge (6.4:1 on the wash light, 7.4:1 dark); the others
   are text-2 on the glass (8.6:1 / 8.1:1). The pill slides away while the keyboard is up (html.kb-open). */
.j-tabbar {
  position: fixed; z-index: var(--j-z-tabbar); left: calc(14px + var(--j-safe-l)); right: calc(14px + var(--j-safe-r));
  bottom: calc(var(--j-safe-b) + var(--j-tab-gap)); max-width: 520px; height: var(--j-tab-h); margin-inline: auto; padding: 6px;
  border: 1px solid var(--j-line-2); border-radius: var(--j-r-pill); background: var(--j-glass);
  -webkit-backdrop-filter: var(--j-glass-fx); backdrop-filter: var(--j-glass-fx);
  box-shadow: var(--j-shadow-float), inset 0 1px 0 var(--j-tab-sheen); transform: translateZ(0);
  transition: translate var(--j-dur) var(--j-glide), opacity var(--j-dur) ease;
}
/* Only while a text field really has focus: a kb-open left behind (j-ui.js drops it, this is the backstop) can't hide the bar. */
html.kb-open:has(:focus:is(input, textarea, [contenteditable])) .j-tabbar { translate: 0 calc(100% + var(--j-tab-gap) + var(--j-safe-b) + 24px); opacity: 0; pointer-events: none; }
.j-tabbar__row { --n: 4; --i: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); height: 100%; isolation: isolate; }
.j-tabbar__puck {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: calc(100% / var(--n)); border-radius: var(--j-r-pill);
  background: var(--j-wash); box-shadow: inset 0 0 0 1px var(--j-forge-line);
  transform: translateX(calc(var(--i) * 100%)); transition: transform calc(320ms / var(--j-tempo)) var(--j-pop), opacity var(--j-dur) ease;
}
.j-tabbar__row[data-none] .j-tabbar__puck { opacity: 0; }
.j-tab {
  --j-icon-size: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 44px; min-height: 44px;
  padding: 0; border: 0; border-radius: var(--j-r-pill); background: none; color: var(--j-text-2); text-decoration: none; cursor: pointer;
  container-type: inline-size;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  transition: color var(--j-dur) ease;
}
.j-tab:hover, .j-tab:visited { color: var(--j-text-2); text-decoration: none; }
@media (hover: hover) { .j-tab:not(.is-active):hover { color: var(--j-text); } }
.j-tab.is-active, .j-tab.is-active:hover, .j-tab.is-active:visited { color: var(--j-forge); }
.j-tab:focus-visible { outline-offset: -2px; }
.j-tab__icon { position: relative; display: grid; place-items: center; height: 24px; }
.j-tab:active .j-tab__icon { scale: .9; transition: scale .1s; }
.j-tab__dot { position: absolute; top: -1px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--j-forge); box-shadow: 0 0 0 2px var(--j-bg); }
/* The label follows the reader's text size up to 13px and always fits its cell, from 320px phones to an
   iOS accessibility size. The longest, FORGE MAP, is about 5.4em of ink plus its tracking: 6.15em at .08em,
   5.8em at .04em. So the size is also capped at the cell's width (cqi, each cell is a container) divided by
   that, with a little to spare. Cells of 80px or less (phones up to about 362px) track tighter first, so the
   type keeps its size where it can. The ellipsis only shows if a longer label lands without new numbers
   here (shell.spec.ts checks every label at 320px with a 20px root). The tab's accessible name is the whole
   label either way. The first font-size is for engines without container units. */
.j-tab__label {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 min(var(--j-fs-micro), 13px)/1.1 var(--j-font-display); letter-spacing: .08em; text-transform: uppercase;
  font-size: min(var(--j-fs-micro), 13px, 15.5cqi);
}
@container (max-width: 80px) { .j-tab__label { letter-spacing: .04em; font-size: min(var(--j-fs-micro), 13px, 16.5cqi); } }
@media (min-width: 1024px) { .j-tabbar { display: none; } }

/* JPullToRefresh: j-ui.js moves the puck while you pull (inline transform/opacity); these are the resting
   values. The arrow while pulling, the spinner while the refresh runs (.j-ptr-spinning). */
.j-ptr {
  position: fixed; top: calc(var(--j-safe-t) + var(--j-topbar-h) + 8px); left: 0; right: 0; z-index: var(--j-z-push);
  display: flex; justify-content: center; opacity: 0; transform: translateY(0); pointer-events: none; will-change: transform, opacity;
}
.j-ptr__puck { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--j-surface); border: 1px solid var(--j-line-2); box-shadow: var(--j-shadow-2); }
.j-ptr__puck > * { grid-area: 1 / 1; }
.j-ptr__arrow { color: var(--j-forge); }
.j-ptr__spin { visibility: hidden; }
.j-ptr.j-ptr-spinning .j-ptr__arrow { visibility: hidden; }
.j-ptr.j-ptr-spinning .j-ptr__spin { visibility: visible; }

/* JBootCover: the signature (52 px, the native splash's size) centred on --j-bg with a thin forge bar, in
   the page's theme (light: ink on #f9f9f8; dark: glow on #141110, the app icon's hot steel). jhu.bootDone()
   fades the host page's static copy (#jhu-boot, light-only below). */
.j-boot { position: fixed; inset: 0; z-index: var(--j-z-full); display: grid; place-items: center; background: var(--j-bg); color: var(--j-text); }
.j-boot--contained { position: absolute; z-index: auto; overflow: hidden; }
.j-boot__logo { position: absolute; top: 50%; left: 50%; translate: -50% -50%; color: var(--j-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .j-boot__logo { color: var(--j-glow); } }
:root[data-theme="dark"] .j-boot__logo { color: var(--j-glow); }
/* The app's launch cover (index.html's static copy, #jhu-boot) takes over from the native splash, which is
   light in both system modes (LaunchScreen.storyboard, Android jhu_splash): ink on #f9f9f8. So this copy is
   light whatever the system, the viewer's choice or the first page: the hand-off is the same picture, and
   a guest's first page (/welcome, light-only) follows without a theme change. A member on the dark theme
   gets the one change as the cover fades. The dark launch (glow #ffb77d on #141110) returns for splash,
   native host and cover together once the first route renders dark (requests/app-shell-brand.md). */
#jhu-boot { background: #f9f9f8; }
#jhu-boot .j-boot__logo { color: #1a1c1c; }
#jhu-boot .j-boot__bar { background: #dbc2b0; }
#jhu-boot .j-boot__bar::after { background: #8d4b00; }
.j-boot__bar { position: absolute; top: calc(50% + 50px); left: 50%; width: 120px; height: 2px; margin-left: -60px; overflow: hidden; border-radius: 2px; background: var(--j-line-2); }
.j-boot__bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--j-forge); animation: j-boot-bar calc(1200ms / var(--j-tempo)) ease-in-out infinite; }
.j-boot__label { position: absolute; top: calc(50% + 66px); left: 0; right: 0; text-align: center; color: var(--j-text-2); font: 500 var(--j-fs-meta)/1.4 var(--j-font-body); }
.j-boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--j-dur-sheet) ease, visibility 0s linear var(--j-dur-sheet); }
@keyframes j-boot-bar { from { translate: -100% 0; } to { translate: 250% 0; } }

/* AppWrapper's root: no box of its own, only the inert switch while JUpdateGate is up. */
.j-app { display: contents; }

/* JUpdateGate (and later the error boundary's full-screen state); --inline sits in the page. */
.j-gate {
  position: fixed; inset: 0; z-index: var(--j-z-full); display: grid; place-items: center; overflow-y: auto;
  padding: calc(var(--j-safe-t) + 24px) max(24px, var(--j-safe-r)) calc(var(--j-safe-b) + 24px) max(24px, var(--j-safe-l)); background: var(--j-bg); color: var(--j-text);
}
.j-gate--inline { position: static; z-index: auto; min-height: 0; padding: 40px var(--j-gutter); background: none; }
.j-gate__box { display: grid; justify-items: center; width: 100%; max-width: 420px; text-align: center; }
.j-gate__icon { --j-icon-size: 40px; display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 18px; border-radius: 50%; background: var(--j-wash); color: var(--j-forge); }
.j-gate__title { margin: 6px 0 10px; font: 700 var(--j-fs-title)/1.1 var(--j-font-display); letter-spacing: var(--j-ls-title); color: var(--j-text); text-wrap: balance; }
.j-gate__body { margin: 0 0 24px; color: var(--j-text-2); font-size: .9375rem; line-height: 1.55; text-wrap: pretty; }
.j-gate__meta { margin: -12px 0 24px; }
.j-gate__actions { display: grid; gap: 10px; width: 100%; }

/* The layouts (Layouts/JLayout, JMarketingLayout, EmptyLayout). .j-shell is a column as tall as the
   screen: <main> clears the fixed top bar and takes the room, the footer sits at the end. JLayout's
   <main> also clears the tab bar (--j-tab-room; 40px of air from 1024px on the web). The first path
   segment keys .j-route (see the motion kit). */
.j-shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.j-main { display: block; flex: 1 0 auto; min-width: 0; padding-top: calc(var(--j-safe-t) + var(--j-topbar-h)); outline: none; }
.j-main--tabs { display: flex; flex-direction: column; padding-bottom: var(--j-tab-room); }
.j-main--tabs > .j-route { flex: 1 0 auto; min-width: 0; }
.j-empty-layout { min-height: 100vh; min-height: 100dvh; }

/* Skip link: first stop for keyboard users, on screen only while focused. */
.j-skip {
  position: fixed; z-index: var(--j-z-full); top: calc(var(--j-safe-t) + 8px); left: 8px; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 16px; border-radius: var(--j-r-md); background: var(--j-ink); color: var(--j-on-ink);
  font: 700 var(--j-fs-small)/1 var(--j-font-body); text-decoration: none; translate: 0 calc(-100% - 24px - var(--j-safe-t));
}
.j-skip:focus, .j-skip:focus-visible { translate: 0 0; color: var(--j-on-ink); }

/* The bar's left side: the back arrow on a phone's sub-page, the logo from 1024px (and on tab roots).
   A page header's own back button steps aside on phones while the bar shows one. */
.j-topbar__logo--wide { display: none; }
@media (max-width: 1023px) { .j-main--bar-back .j-ph__back { display: none; } }
@media (min-width: 1024px) {
  .j-topbar__back { display: none; }
  .j-topbar__logo--wide { display: inline-flex; }
}
/* JMarketingLayout's call to action: the short label on narrow phones (the long one stays the name).
   Under 400px (small phones, 400% zoom on a 1280px screen) the bar drops the play icon and tightens both
   buttons, and the CTA's label may truncate, so Sign in never leaves the screen (WCAG 1.4.10). */
.j-topbar__cta { margin-left: 4px; }
.j-topbar__cta-short { display: none; }
@media (max-width: 479px) {
  .j-topbar__cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .j-topbar__cta-short { display: inline; }
}
@media (max-width: 399px) {
  .j-topbar__slot { min-width: 0; }
  .j-topbar__cta { min-width: 0; padding-inline: 10px; }
  .j-topbar__cta .j-icon { display: none; }
  .j-topbar__cta .j-btn__label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .j-topbar__signin { flex: none; padding-inline: 10px; }
}
/* 320-359px: tighter tracking and padding, so "Lesson 1 free" fits whole instead of truncating. */
@media (max-width: 359px) {
  .j-topbar__cta, .j-topbar__signin { letter-spacing: .04em; padding-inline: 8px; }
}
/* The guest Menu button (JMarketingLayout on the website, Jesse 2026-10-14): a 44px icon button after Sign
   in that opens JGuestMenuSheet, below 1024px only. With it in the bar the CTA and Sign in drop their own
   margins (the row's 4px gap spaces them), the CTA drops its play icon under 480px, and from 374px down both take the 320px bar's tight padding, so
   "Lesson 1 free" still fits whole at 360px. Under 360px it doesn't fit beside the logo, Sign in and Menu,
   so it leaves the bar; the sheet carries "Watch lesson 1 free". Never in the app (the pill). */
@media (max-width: 1023px) {
  .j-topbar--menu .j-topbar__cta, .j-topbar--menu .j-topbar__signin { margin-left: 0; }
}
@media (max-width: 479px) {
  .j-topbar--menu .j-topbar__cta .j-icon { display: none; }
}
@media (max-width: 374px) {
  .j-topbar--menu .j-topbar__cta, .j-topbar--menu .j-topbar__signin { letter-spacing: .04em; padding-inline: 8px; }
}
@media (max-width: 359px) {
  .j-topbar--menu .j-topbar__slot:has(> .j-topbar__cta) { display: none; }
}
@media (min-width: 1024px) { .j-topbar__menu { display: none; } }
html.is-native .j-topbar__menu { display: none; }
/* In the app the tab bar stays at every width (an iPad in landscape) and the inline nav stays away. */
@media (min-width: 1024px) {
  html.is-native .j-tabbar { display: block; }
  html.is-native .j-topbar__nav { display: none; }
  html.is-native { --j-tab-room: calc(var(--j-tab-h) + var(--j-tab-gap) + var(--j-safe-b) + 16px); }
}

/* JFooter: the full footer for guests, one line on member pages (the app has the tab bar and the Me
   sheet instead). */
.j-footer { flex: none; border-top: 1px solid var(--j-line); background: var(--j-surface-2); color: var(--j-text-2); }
.j-footer__inner {
  display: grid; gap: 16px; justify-items: start; max-width: var(--j-max-wide); margin: 0 auto;
  padding: 32px max(var(--j-gutter), var(--j-safe-l)) calc(32px + var(--j-safe-b)) max(var(--j-gutter), var(--j-safe-r));
}
.j-footer__logo { color: var(--j-text); margin-left: -4px; }
.j-footer__nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
.j-footer__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--j-r-md); background: none;
  color: var(--j-text-2); font: 600 var(--j-fs-small)/1 var(--j-font-body); text-decoration: none; cursor: pointer;
}
.j-footer__link:visited { color: var(--j-text-2); }
.j-footer__link:hover { color: var(--j-text); text-decoration: underline; }
.j-footer__link--inline { min-height: 44px; padding: 0 6px; margin-left: -6px; }
.j-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--j-text-3); font: 500 var(--j-fs-meta)/1.4 var(--j-font-body); }
.j-footer--compact { background: none; }
.j-footer--compact .j-footer__inner { gap: 0; padding-top: 16px; padding-bottom: 16px; }
.j-main--tabs .j-footer--compact .j-footer__inner { padding-bottom: 0; }
/* A guest's full footer in the app ends <main> (JMarketingLayout): the footer, not <main>, takes the pill's room
   (--j-tab-room holds the bottom safe area), so its surface runs under the pill instead of stopping in a band
   of page background above it, and its last line still clears the pill. */
.j-main--tabs:has(> .j-footer:not(.j-footer--compact)) { padding-bottom: 0; }
.j-main--tabs > .j-footer:not(.j-footer--compact) .j-footer__inner { padding-bottom: calc(var(--j-tab-room) + 16px); }
@media (min-width: 1024px) {
  .j-footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
  .j-footer__nav { justify-content: center; margin-left: 0; }
  .j-footer--compact .j-footer__inner { grid-template-columns: 1fr auto; }
  .j-footer--compact .j-footer__nav { justify-content: flex-start; margin-left: -10px; }
}
html.is-native .j-footer--compact { display: none; }

/* Routes' <Authorizing> placeholder while the app restores its session. */
.j-authorizing { display: grid; gap: 14px; }

/* The page's error state inside the bars (JErrorBoundary). */
.j-boundary { padding-top: var(--j-section); }

/* Blazor's crash bar, branded (#blazor-error-ui in both host pages): Blazor sets display:block on it when
   the circuit dies; the attribute rule turns that into the full-screen panel. "Reload" is a plain link
   (the .reload convention); nothing reloads by itself. */
#blazor-error-ui { display: none; }
#blazor-error-ui[style*="display: block"], #blazor-error-ui[style*="display:block"] { display: grid !important; }
#blazor-error-ui .dismiss { display: none; }

/* Blazor reconnect panel (web; Components/App/ReconnectModal). Blazor puts components-reconnect-* on it;
   j-ui.js retries quietly, resumes a paused circuit, and asks for a reload only when the session has
   ended (data-j-gone). Never an automatic reload, so a refusing server can't loop the page. */
#components-reconnect-modal { display: none; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected,
#components-reconnect-modal.components-reconnect-paused, #components-reconnect-modal.components-reconnect-resume-failed {
  position: fixed; inset: 0; z-index: calc(var(--j-z-full) + 1); display: grid; place-items: end center;
  padding: 16px max(16px, var(--j-safe-l)) calc(24px + var(--j-safe-b)) max(16px, var(--j-safe-r)); background: var(--j-scrim);
  animation: j-fade calc(300ms / var(--j-tempo)) ease backwards;
}
.j-reconnect {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; width: min(440px, 100%); padding: 16px 18px; border-radius: var(--j-r-lg);
  background: var(--j-surface); border: 1px solid var(--j-line-2); box-shadow: var(--j-shadow-float); color: var(--j-text);
  transition: opacity var(--j-dur) ease;
}
.j-reconnect__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--j-forge); animation: j-reconnect-pulse calc(1200ms / var(--j-tempo)) ease-out infinite; }
.j-reconnect__text { display: grid; gap: 2px; min-width: 0; }
.j-reconnect__title { font: 700 var(--j-fs-body)/1.3 var(--j-font-display); }
.j-reconnect__body { color: var(--j-text-2); font: 500 var(--j-fs-small)/1.45 var(--j-font-body); }
.j-reconnect__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.j-reconnect [data-when] { display: none; }
#components-reconnect-modal.components-reconnect-show [data-when~="retrying"],
#components-reconnect-modal.components-reconnect-retrying [data-when~="retrying"],
#components-reconnect-modal.components-reconnect-paused:not([data-j-gone]) [data-when~="paused"],
#components-reconnect-modal.components-reconnect-failed:not([data-j-gone]) [data-when~="failed"],
#components-reconnect-modal[data-j-gone] [data-when~="gone"],
#components-reconnect-modal.components-reconnect-rejected [data-when~="gone"],
#components-reconnect-modal.components-reconnect-resume-failed [data-when~="gone"] { display: block; }
#components-reconnect-modal .j-reconnect__actions[data-when] { display: none; }
#components-reconnect-modal.components-reconnect-failed:not([data-j-gone]) .j-reconnect__actions[data-when~="failed"],
#components-reconnect-modal.components-reconnect-paused:not([data-j-gone]) .j-reconnect__actions[data-when~="paused"],
#components-reconnect-modal[data-j-gone] .j-reconnect__actions[data-when~="gone"],
#components-reconnect-modal.components-reconnect-rejected .j-reconnect__actions[data-when~="gone"],
#components-reconnect-modal.components-reconnect-resume-failed .j-reconnect__actions[data-when~="gone"] { display: flex; }
@keyframes j-reconnect-pulse { from { box-shadow: 0 0 0 0 rgb(141 75 0 / .5); } to { box-shadow: 0 0 0 12px rgb(141 75 0 / 0); } }

/* Pages: NotFound / AccessDenied (a centred empty state) and the Me hub. */
.j-lost { display: grid; place-items: center; min-height: 60vh; padding-top: var(--j-section); padding-bottom: var(--j-section); }
.j-lost__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.j-me-hub { padding-bottom: var(--j-section); }
.j-me--page { gap: var(--j-6); padding: 0; }
.j-me--page .j-me__head { border: 1px solid var(--j-line-2); background: var(--j-surface); }

/* /admin/ui-kit (Pages/Admin/UiKit.razor): the screenshot fixture's own layout. No inline <style> (CSP). */
.j-kit { padding-bottom: 96px; }
.j-kit-sec { margin-bottom: var(--j-section); }
.j-kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.j-kit-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.j-kit-stack { display: grid; gap: 10px; }
.j-kit-label { display: block; margin: 16px 0 8px; }
.j-kit-time { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--j-line); }
.j-kit-card-p { margin: 6px 0 0; }
.j-kit-swatches { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.j-kit-swatch { display: grid; gap: 4px; padding: 10px; border-radius: var(--j-r-md); border: 1px solid var(--j-line-2); font: 600 var(--j-fs-meta)/1.3 var(--j-font-body); }
/* A transformed frame is the containing block for the fixed bars inside it, so they preview in place. */
.j-kit-frame { position: relative; height: 220px; overflow: hidden; transform: translateZ(0); border: 1px solid var(--j-line-2); border-radius: var(--j-r-lg); background: var(--j-bg); }
.j-kit-frame .j-tabbar { display: block; }
.j-kit-frame .j-topbar__nav { display: none; }
.j-kit-frame--tall { height: 420px; }

/* 7. MOTION KIT ------------------------------------------------------------------------------- */
/* Entry keyframes use the individual translate/scale properties so they compose with an element's own
   transform. Durations divide by --j-tempo. */
@keyframes j-rise { from { opacity: 0; translate: 0 var(--rise, 14px); } }
@keyframes j-fade { from { opacity: 0; } }
@keyframes j-pop { from { opacity: 0; scale: .9; } }
@keyframes j-sheet-up { from { translate: 0 100%; } }
@keyframes j-scrim-in { from { opacity: 0; } }
@keyframes j-drop { from { opacity: 0; translate: 0 -120%; } }
@keyframes j-page-in { from { opacity: 0; translate: 14px 0; } }
@keyframes j-page-back { from { opacity: 0; translate: -14px 0; } }
@keyframes j-page-fade { from { opacity: 0; translate: 0 6px; } }
@keyframes j-like { 0% { scale: .6; } 45% { scale: 1.28; } 70% { scale: .94; } }
@keyframes j-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes j-spin { to { rotate: 360deg; } }
/* Brand accents: an ember flying off (jhu.sparks), the heat glow on an unlock, the forged sheen. */
@keyframes j-ember { 0% { opacity: 0; translate: 0 0; scale: 1; } 12% { opacity: 1; } 100% { opacity: 0; translate: var(--dx, 0) var(--dy, -90px); scale: .25; } }
@keyframes j-heat { 50% { box-shadow: 0 0 0 1px var(--j-line-brass), 0 0 28px 6px rgb(255 138 61 / .35); } }
@keyframes j-forged { from { background-position: 200% 0; } }

.j-rise { animation: j-rise var(--j-dur-slow) var(--j-out) both; animation-delay: calc(var(--d, 0ms) / var(--j-tempo)); }
.j-fade { animation: j-fade calc(420ms / var(--j-tempo)) var(--j-out) both; animation-delay: calc(var(--d, 0ms) / var(--j-tempo)); }
.j-pop { animation: j-pop calc(420ms / var(--j-tempo)) var(--j-pop) both; animation-delay: calc(var(--d, 0ms) / var(--j-tempo)); }
.j-like { animation: j-like calc(520ms / var(--j-tempo)) var(--j-pop) 1; }

/* Staggered rise for a block's children, 60 ms steps, capped at 10 animated children. */
.j-stagger > * { animation: j-rise var(--j-dur-slow) var(--j-out) both; }
.j-stagger > :nth-child(2) { animation-delay: calc(60ms / var(--j-tempo)); }  .j-stagger > :nth-child(3) { animation-delay: calc(120ms / var(--j-tempo)); }
.j-stagger > :nth-child(4) { animation-delay: calc(180ms / var(--j-tempo)); } .j-stagger > :nth-child(5) { animation-delay: calc(240ms / var(--j-tempo)); }
.j-stagger > :nth-child(6) { animation-delay: calc(300ms / var(--j-tempo)); } .j-stagger > :nth-child(7) { animation-delay: calc(360ms / var(--j-tempo)); }
.j-stagger > :nth-child(8) { animation-delay: calc(420ms / var(--j-tempo)); } .j-stagger > :nth-child(9) { animation-delay: calc(480ms / var(--j-tempo)); }
.j-stagger > :nth-child(10) { animation-delay: calc(540ms / var(--j-tempo)); }
.j-stagger > :nth-child(n+11) { animation: none; }

/* Press feedback for anything tappable. */
.j-press { transition: scale var(--j-dur-fast) ease; }
.j-press:active { scale: .97; }

/* Scroll-driven rise where supported (Safari 26+, Chrome); elsewhere content is simply there. */
@supports (animation-timeline: view()) {
  .j-scroll-rise { animation: j-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
}

/* Heat glow: twice, never infinite (the unlock, a milestone). */
.j-heat { animation: j-heat calc(1200ms / var(--j-tempo)) ease-in-out 2; }
/* Forged sheen across a headline (the unlock). At rest the visible half of the gradient is plain
   currentColor, so the final state (and reduced motion) is ordinary text. */
.j-forged {
  background: linear-gradient(100deg, currentColor 0 60%, var(--j-glow) 75%, currentColor 90% 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: j-forged calc(1400ms / var(--j-tempo)) var(--j-out) 1;
}
/* One ember (jhu.sparks places them and removes each on animationend). Invisible at rest. */
.j-spark {
  position: fixed; z-index: var(--j-z-toast); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%;
  background: var(--j-spark); box-shadow: 0 0 6px var(--j-glow); pointer-events: none; opacity: 0;
  animation: j-ember calc(900ms / var(--j-tempo)) var(--j-out) 1;
}

/* Route transition. JLayout keys .j-route on the FIRST path segment, so /forums -> /forums/{id} never
   remounts the feed; j-ui.js sets html[data-nav] only when that segment changes (a new animation-name
   would replay it on the mounted wrapper). Nothing plays on the first load (no data-nav yet): the
   circuit re-renders the prerendered page and would play it twice. Backwards fill only: a forwards fill
   would leave a translate on the wrapper and make it the containing block for every fixed layer inside
   the page. "none" is a back the OS already animated (the iOS edge swipe, a browser's own back). */
.j-route { animation: j-page-in calc(380ms / var(--j-tempo)) var(--j-glide) backwards; }
html:not([data-nav]) .j-route { animation: none; }
html[data-nav="back"] .j-route { animation-name: j-page-back; }
html[data-nav="tab"] .j-route { animation-name: j-page-fade; }
html[data-nav="none"] .j-route { animation: none; }
/* A page that arrives with a full-screen layer open skips the entry (while it runs the wrapper would
   be that layer's containing block). JSheets move themselves to <body> (jhu.sheetAttach). */
.j-route:has([aria-modal="true"], .j-sheet-root) { animation: none; }

/* Odometer (jhu.odometer builds the digit columns). */
.j-odo { display: inline-block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.j-odo.is-rolling { display: inline-flex; align-items: baseline; }
.j-odo__col { display: inline-flex; flex-direction: column; position: relative; height: 1.2em; clip-path: inset(0 -0.25em); }
.j-odo__strip { display: block; will-change: transform; }
.j-odo__strip > span { display: block; height: 1.2em; line-height: 1.2; text-align: center; }
.j-odo__ch { display: inline-block; white-space: pre; }

/* View Transitions (jhu.vt): pages set view-transition-name on the parts that move (lesson card ->
   player). 380 ms glide; the root cross-fade 240 ms. */
::view-transition-group(*) { animation-duration: calc(380ms / var(--j-tempo)); animation-timing-function: var(--j-glide); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: calc(240ms / var(--j-tempo)); }

/* 8. REDUCED MOTION --------------------------------------------------------------------------- */
/* One switch for the whole app (NCC ncc.css:1049-1056). Animations still run, but in .01ms and once,
   so anything that ends in a forwards fill (the Login code panel fades in from opacity 0) lands
   visible instead of staying hidden. jhu.sparks / countUp / odometer resolve at once. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .j-scroll-rise { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* 9. RENDERED MARKDOWN ----------------------------------------------------------------------- */
/* Jesse's notes (admin-authored, Markdig output; LessonNotesSection), on the tokens in both themes
   (3a: the light-only legacy bridge that held them is gone). */
.lesson-note-body p { margin: 0 0 .6rem; }
.lesson-note-body p:last-child { margin-bottom: 0; }
.lesson-note-body strong { font-weight: 700; color: var(--j-text); }
.lesson-note-body em { font-style: italic; }
.lesson-note-body a { color: var(--j-forge); text-decoration: underline; text-underline-offset: 2px; }
.lesson-note-body a:hover { color: var(--j-forge-press); }
.lesson-note-body ul, .lesson-note-body ol { margin: 0 0 .6rem; padding-left: 1.4rem; }
.lesson-note-body ul { list-style: disc; }
.lesson-note-body ol { list-style: decimal; }
.lesson-note-body li { margin: .15rem 0; }
.lesson-note-body ul:last-child, .lesson-note-body ol:last-child { margin-bottom: 0; }
