/* The sites' identities (docs/SITES.md §4): colour tokens in light and dark, type, shape
   and wordmarks. Each page's <html data-site="…"> picks one; the layout is shared. Every
   palette meets WCAG AA (checked in CI: src/brand.rs). Fonts are self-hosted: no font requests
   to anyone. */

:root {
  /* JobAware itself (accounts, and any page outside a site): the default palette. */
  --bg: #f7f7f5; --panel: #ffffff; --ink: #16181d; --muted: #646a75; --line: #e4e4e0;
  --accent: #3b5bdb; --accent-soft: #e8edff; --chip: #f0f0ec; --bar: #3b5bdb;
  /* Status colours, for every site: salary and remote (good), warnings, errors. */
  --good: #21703a; --warn: #8a5300; --bad: #b42318;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --on-accent: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --numeric: normal;
}

/* Attention Head (AI): dark first, graphite and signal amber, Funnel Display and Funnel Sans with
   Martian Mono for figures (docs/design/ATTENTIONHEAD.md). Its layout is its own:
   static/attentionhead/site.css. Funnel has no arrows; Martian Mono's stand in for them. */
@font-face { font-family: "Funnel Sans"; src: url("/static/attentionhead/funnel-sans.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Funnel Display"; src: url("/static/attentionhead/funnel-display.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Funnel Sans"; src: url("/static/attentionhead/martian-mono.woff2") format("woff2"); unicode-range: U+2190-2197; font-display: swap; }
@font-face { font-family: "Funnel Display"; src: url("/static/attentionhead/martian-mono.woff2") format("woff2"); unicode-range: U+2190-2197; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/static/attentionhead/martian-mono.woff2") format("woff2"); font-weight: 400 600; font-stretch: 87.5% 100%; font-display: swap; }
:root[data-site="attentionhead"] {
  color-scheme: light;
  --bg: #f7f8f9; --panel: #ffffff; --float: #ffffff; --ink: #0d1015; --ink-2: #3b424d; --muted: #5d6570; --line: #e2e5e9;
  --accent: #9b5700; --accent-soft: #fbf0e1; --chip: #eef0f2; --bar: #c27a1a; --on-accent: #ffffff;
  --good: #1d6b3d; --warn: #a23b00; --bad: #b42318;
  --shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(13,16,21,.12);
  --font: "Funnel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Funnel Display", "Funnel Sans", system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  --numeric: tabular-nums;
}
/* Portrait (Mobile): light first, a pebble ground and white cards, badge red and a colour per platform,
   Nunito for headlines and Nunito Sans for text (docs/design/PORTRAIT.md). Its layout is its own:
   static/portrait/site.css. */
@font-face { font-family: "Nunito Sans"; src: url("/static/portrait/nunito-sans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/portrait/nunito.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
:root[data-site="portrait"] {
  color-scheme: light;
  --bg: #f0efed; --panel: #ffffff; --chip: #e7e5e1; --line: #dddad5;
  --ink: #1c1915; --ink-2: #4d4740; --muted: #645d55;
  --accent: #b93219; --accent-soft: #fbe8e3; --badge: #e2402a; --bar: #b93219; --on-accent: #ffffff;
  --ios: #2d5fd3; --android: #1f7d45; --cross: #8446c0; --good: #1d6b3d;
  --lift-1: 0 1px 2px rgba(48,36,24,.06), 0 2px 8px rgba(48,36,24,.06);
  --lift-2: 0 2px 4px rgba(48,36,24,.06), 0 14px 36px rgba(48,36,24,.12);
  --shadow: var(--lift-1);
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Nunito", "Nunito Sans", system-ui, sans-serif;
  --radius: 22px;
  --numeric: tabular-nums;
}
/* Left Join (Data): plain and numerate, a query and its result (docs/design/LEFTJOIN.md). White
   paper, ink, and colour only from syntax: keywords in join green, strings, numbers. Libre
   Franklin, Literata for prose, Red Hat Mono for queries and every figure. Its layout is its own:
   static/leftjoin/site.css. Literata's arrows stand in for the others'. */
@font-face { font-family: "Libre Franklin"; src: url("/static/leftjoin/libre-franklin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/static/leftjoin/literata.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("/static/leftjoin/red-hat-mono.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/static/leftjoin/literata.woff2") format("woff2"); unicode-range: U+2190-2193; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("/static/leftjoin/literata.woff2") format("woff2"); unicode-range: U+2190-2193; font-display: swap; }
:root[data-site="leftjoin"] {
  color-scheme: light;
  --bg: #ffffff; --panel: #ffffff; --ink: #15171a; --ink-2: #3c4047; --muted: #60656d; --line: #d5d8dd;
  --accent: #0a7552; --accent-soft: #e6f4ee; --chip: #f3f4f6; --bar: #119066; --on-accent: #ffffff;
  --string: #a33f0c; --number: #2c50c0;
  --good: #1b6e3c; --warn: #8a5300; --bad: #b42318;
  --shadow: none;
  --font: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-prose: "Literata", Georgia, serif;
  --font-mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 4px;
  --numeric: tabular-nums;
}

/* Level Select (Games): a level select screen (docs/design/LEVELSELECT.md). Light first, a cool
   grey ground and white tiles, violet links, the selection in cursor yellow, and a colour per
   discipline. Rubik for everything, Oxanium (squared, HUD-like) for the wordmark and small labels. Its layout
   is its own: static/levelselect/site.css. */
@font-face { font-family: "Rubik"; src: url("/static/levelselect/rubik.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Oxanium"; src: url("/static/levelselect/oxanium.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root[data-site="levelselect"] {
  color-scheme: light;
  --bg: #eef0f5; --panel: #ffffff; --chip: #e3e6ee; --line: #d3d7e1;
  --ink: #11131c; --ink-2: #3a3f52; --muted: #565d72;
  --accent: #5a34c9; --accent-soft: #ece6fd; --bar: #6b46db; --on-accent: #ffffff;
  --select: #ffc42e; --on-select: #11131c; --plate: #ffffff;
  --engineering: #2a56c4; --art: #ad276a; --design: #984600; --production: #0b6a70; --qa: #236f32; --audio: #8a3fb8;
  --good: #1d6b3d; --warn: #8a5300; --bad: #b42318;
  --shadow: 0 1px 0 var(--line), 0 6px 18px rgba(17,19,28,.07);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Rubik", system-ui, sans-serif;
  --font-hud: "Oxanium", "Rubik", system-ui, sans-serif;
  --radius: 8px;
  --numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --panel: #171a21; --ink: #e8e9ec; --muted: #9aa0ab; --line: #272b34;
    --accent: #7c95ff; --accent-soft: #1d2440; --chip: #222630; --bar: #7c95ff; --on-accent: #0f1115;
    --good: #51cf66; --warn: #fcc419; --bad: #ff6b6b;
    --shadow: none;
  }
  :root[data-site="attentionhead"] {
    color-scheme: dark;
    --bg: #0b0d10; --panel: #12151a; --float: #181c22; --ink: #eceef2; --ink-2: #b3b9c3; --muted: #8a919c; --line: #232830;
    --accent: #f2b15c; --accent-soft: #2b2214; --chip: #1a1e24; --bar: #f2b15c; --on-accent: #1a1206;
    --good: #84d1a0; --warn: #ff9b6b; --bad: #ff7a7a;
    --shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(0,0,0,.45);
  }
  :root[data-site="portrait"] {
    color-scheme: dark;
    --bg: #141210; --panel: #1e1b18; --chip: #292521; --line: #36312c;
    --ink: #f4f0ea; --ink-2: #cbc3b9; --muted: #a59c91;
    --accent: #ff8b74; --accent-soft: #3b201a; --badge: #ff6b54; --bar: #ff8b74; --on-accent: #2a120c;
    --ios: #86a8ff; --android: #62c98d; --cross: #c79ef2; --good: #84d1a0;
    --lift-1: 0 0 0 1px #36312c; --lift-2: 0 0 0 1px #36312c, 0 18px 44px rgba(0,0,0,.5);
    --shadow: var(--lift-1);
  }
  :root[data-site="leftjoin"] {
    color-scheme: dark;
    --bg: #121416; --panel: #181b1e; --ink: #e9ebee; --ink-2: #bcc1c8; --muted: #91979f; --line: #33383e;
    --accent: #5dd1a4; --accent-soft: #123026; --chip: #1f2327; --bar: #4fbf93; --on-accent: #0b2219;
    --string: #f2a679; --number: #9db5ff;
    --good: #7fd59b; --warn: #f0b45a; --bad: #ff8a80;
  }
  :root[data-site="levelselect"] {
    color-scheme: dark;
    --bg: #0f1017; --panel: #181a24; --chip: #222532; --line: #2e3242;
    --ink: #eef0f6; --ink-2: #c0c5d4; --muted: #9aa1b4;
    --accent: #b9a2ff; --accent-soft: #2a2148; --bar: #a58bff; --on-accent: #170f33;
    --select: #ffd54a; --on-select: #11131c; --plate: #e4e6ee;
    --engineering: #86a8ff; --art: #ff8ac0; --design: #ffa95c; --production: #4fd1c5; --qa: #7fd38a; --audio: #d3a0ff;
    --good: #84d1a0; --warn: #f0b45a; --bad: #ff8a80;
    --shadow: 0 0 0 1px var(--line);
  }
}

body { font-family: var(--font); font-variant-numeric: var(--numeric); }
.panel, .kpi, .card { border-radius: var(--radius); }
button.primary, a.btn-primary, .apply { color: var(--on-accent); }

/* Wordmarks. */
.wm { font-weight: 700; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
/* Each wordmark ends with its kind of job in small capitals under the word. */
.wm-name { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .22em; }
.wm-kind { font-size: max(.625rem, .5em); font-weight: 600; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* Attention Head: the beam, a searchlight of three rays with the middle one brightest, then the word. */
.wm-attentionhead {
  display: inline-flex; align-items: center; gap: 7px; font-family: "Funnel Display", system-ui, sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1;
}
.wm-attentionhead .wm-mark { width: 1.05em; height: .95em; fill: currentColor; color: var(--accent); flex: none; }
@media (forced-colors: active) { .wm-attentionhead .wm-mark { color: CanvasText; } }
/* Portrait: the phone held upright with a badge, cut out of the ground by a ring, then the word. */
.wm-portrait {
  display: inline-flex; align-items: center; gap: 6px; font-family: "Nunito", system-ui, sans-serif;
  font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1;
}
.wm-portrait .wm-mark { width: .86em; height: 1.04em; flex: none; overflow: visible; }
.wm-portrait .wm-phone { fill: none; stroke: currentColor; stroke-width: 2.2; }
.wm-portrait .wm-badge { fill: var(--badge, var(--accent)); stroke: var(--wm-ground, var(--bg)); stroke-width: 2; }
@media (forced-colors: active) { .wm-portrait .wm-badge { fill: CanvasText; stroke: Canvas; } }
/* Left Join: the LEFT JOIN diagram (the left set filled), then the keywords. */
.wm-leftjoin {
  display: inline-flex; align-items: center; gap: 9px; font-family: "Red Hat Mono", ui-monospace, monospace;
  font-size: 16px; font-weight: 600; letter-spacing: .04em; line-height: 1;
}
.wm-leftjoin .wm-mark { width: 1.6em; height: 1em; flex: none; overflow: visible; }
.wm-leftjoin .wm-left { fill: var(--accent); }
.wm-leftjoin .wm-right { fill: none; stroke: currentColor; stroke-width: 1.5; }
@media (forced-colors: active) { .wm-leftjoin .wm-left { fill: CanvasText; } }

footer .sisters { margin-top: 6px; }

/* A site's kind of job, in small capitals under its name wherever the name is a label ("AI jobs"). */
.sitekind { display: block; margin-top: 2px; font-size: 0.625rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.08em;
            text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* Menus (static/menu.js): every <select> shows as a button for its value and a listbox of its
   options. These are the defaults; each site's stylesheet shapes them where it uses one. The
   <select> stays inside, unseen, as the value. */
.menu { position: relative; display: inline-flex; vertical-align: middle; max-width: 100%; }
.menu > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; max-width: 100%;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.menu-btn:disabled { opacity: .5; cursor: default; }
.menu-btn .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-chev { flex: none; color: var(--muted); }
.menu.open .menu-chev { transform: rotate(180deg); }
.menu-pop {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; display: none; min-width: 100%;
  width: max-content; max-width: min(24rem, calc(100vw - 24px)); padding: 4px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--float, var(--panel)); color: var(--ink);
  font-family: var(--font); font-weight: 400; text-align: left;
}
.menu.open .menu-pop { display: block; }
.menu.up .menu-pop { top: auto; bottom: calc(100% + 4px); }
.menu.end .menu-pop { left: auto; right: 0; }
.menu-pop input {
  display: block; width: 100%; height: 30px; margin: 0 0 4px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 400 .875rem var(--font);
}
.menu-pop input:focus { outline: none; border-color: var(--accent); }
.menu-pop input[hidden] { display: none; }
.menu-list { display: block; max-height: 18rem; overflow-y: auto; outline: none; }
.opt {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 9px;
  border-radius: calc(var(--radius) - 2px); font-size: .875rem; line-height: 1.35; color: var(--ink-2, var(--ink)); cursor: pointer;
}
.opt .n { flex: none; font-family: var(--font-mono, var(--font)); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.active { background: var(--chip); color: var(--ink); }
.opt[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.opt[aria-disabled="true"] { opacity: .5; cursor: default; }
.opt-empty { display: block; padding: 6px 9px; color: var(--muted); font-size: .875rem; }
@media (prefers-reduced-motion: no-preference) { .menu-chev { transition: transform 120ms ease-out; } }
@media (forced-colors: active) { .opt.active { outline: 1px solid Highlight; } .opt[aria-selected="true"] { color: Highlight; } }
.menu.float .menu-pop { position: fixed; z-index: 60; }
/* Level Select: four level tiles, one selected, then the word in pixels. */
.wm-levelselect {
  display: inline-flex; align-items: center; gap: 8px; font-family: "Oxanium", system-ui, sans-serif;
  font-size: 21px; font-weight: 700; letter-spacing: 0; line-height: 1;
}
.wm-levelselect .wm-mark { width: 1em; height: 1em; flex: none; }
.wm-levelselect .wm-tile { fill: none; stroke: currentColor; stroke-width: 2; }
.wm-levelselect .wm-picked { fill: var(--accent); stroke: var(--accent); }
@media (forced-colors: active) { .wm-levelselect .wm-picked { fill: CanvasText; stroke: CanvasText; } }

/* Recent searches (static/search_history.js): the clock button in a board's search field, and the
   list it opens over the board, which blurs behind it. The structure is here; each site's
   stylesheet gives it its look. On phones the list is a sheet from the bottom. */
.sh-button {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius);
  background: none; color: var(--muted); cursor: pointer;
}
.sh-button:hover, .sh-button[aria-expanded="true"] { color: var(--ink); background: var(--chip); }
.sh-clock { display: block; }
html.sh-open { overflow: hidden; }
.sh {
  width: min(36rem, calc(100vw - 32px)); max-width: none; max-height: min(72vh, 42rem); margin: min(12vh, 104px) auto auto;
  padding: 0; border: 0; overflow: hidden; background: var(--float, var(--panel)); color: var(--ink);
}
.sh::backdrop { background: color-mix(in srgb, var(--bg) 52%, transparent); -webkit-backdrop-filter: blur(10px) saturate(.85); backdrop-filter: blur(10px) saturate(.85); }
.sh-panel { display: flex; flex-direction: column; max-height: inherit; }
.sh-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; flex: none; padding: 14px 14px 12px 20px; }
.sh-kicker { flex: 1 0 100%; margin: 0; }
.sh-title { flex: 1 1 0; min-width: 0; margin: 0; }
.sh-close { flex: none; cursor: pointer; font: inherit; }
.sh-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sh-list { list-style: none; margin: 0; padding: 0 0 8px; }
.sh-list[hidden], .sh-empty[hidden], .sh-clear[hidden] { display: none; }
.sh-group { padding: 12px 20px 6px; color: var(--muted); }
.sh-item { position: relative; }
.sh-use {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; width: 100%;
  padding: 10px 52px 10px 20px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.sh-use:focus-visible { outline: none; }
.sh-what { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sh-q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sh-chip { white-space: nowrap; }
.sh-when { white-space: nowrap; color: var(--muted); }
.sh-del {
  position: absolute; top: 50%; right: 12px; width: 28px; height: 28px; margin-top: -14px; padding: 0; border: 0;
  border-radius: var(--radius); background: none; color: var(--muted); font: inherit; font-size: 1.125rem; line-height: 1;
  cursor: pointer; opacity: 0;
}
.sh-item:hover .sh-del, .sh-item:focus-within .sh-del, .sh-del:focus-visible { opacity: 1; }
.sh-del:hover { color: var(--ink); background: var(--chip); }
.sh-empty { padding: 8px 20px 28px; color: var(--ink-2); }
.sh-empty p { margin: 0; max-width: 28rem; }
.sh-empty .sh-empty-title { margin-bottom: 4px; color: var(--ink); font-weight: 600; }
.sh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; flex: none; padding: 12px 20px; color: var(--muted); }
.sh-where { flex: 1 1 14rem; min-width: 0; }
.sh-keys { white-space: nowrap; }
.sh-keys kbd { margin: 0 2px; }
.sh-clear { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sh-clear:hover { color: var(--ink); }
.history-note button { white-space: nowrap; }
@media (hover: none) { .sh-del { opacity: 1; } }
/* `dialog.sh`: ahead of each site's own width for the overlay. */
@media (max-width: 760px) {
  dialog.sh { width: 100%; max-width: 100%; max-height: 82dvh; margin: auto 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sh-keys { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .sh[open] { animation: sh-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sh[open]::backdrop { animation: sh-fade 200ms ease-out; }
  .sh.sh-enter .sh-item { animation: sh-row 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 22ms + 40ms); }
  .sh-del, .sh-button { transition: opacity 120ms ease-out, color 120ms ease-out, background-color 120ms ease-out; }
  @media (max-width: 760px) { .sh[open] { animation: sh-rise 280ms cubic-bezier(0.2, 0.8, 0.2, 1); } }
}
@keyframes sh-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
@keyframes sh-rise { from { transform: translateY(100%); } }
@keyframes sh-fade { from { opacity: 0; } }
@keyframes sh-row { from { opacity: 0; transform: translateY(4px); } }
@media (forced-colors: active) { .sh { border: 1px solid CanvasText; } .sh-use:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; } }

/* The next step on a role (static/next_step.js, owner request 2026-11-17). Four weights, most
   to least: Apply, the one filled button; tailoring, the value these sites add, in the accent's
   soft tone with its icon; Save, the site's plain button with a bookmark; the role's own page, a
   quiet link. `:root[data-site]` outranks each site's button rules, whichever loads last. */
.ns { display: contents; }
:root[data-site] .track.ns { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:root[data-site] .track.ns form { display: contents; }
.ns-icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ns-icon .ns-spark { fill: currentColor; stroke: none; }
:root[data-site] .ns-save, :root[data-site] .ns-tailor, :root[data-site] .ns-stage { display: inline-flex; align-items: center; gap: 7px; }
/* No shadows here: Left Join has none (its sites' own stylesheets add them where they belong). */
:root[data-site] .ns-tailor {
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  border-style: solid; border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
/* The fill stays put on hover (a deeper tint would take the label under 4.5:1); the edge firms. */
:root[data-site] .ns-tailor:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
:root[data-site] .ns-stage { color: var(--accent); }
:root[data-site] .btn.ns-quiet { background: transparent; border-color: transparent; color: var(--ink-2); font-weight: 600; }
:root[data-site] .btn.ns-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* The button a press has just changed: it grows in from the old one, a ring spreads from it and
   fades, and the spark turns. */
@media (prefers-reduced-motion: no-preference) {
  :root[data-site] .ns-new { position: relative; animation: ns-arrive 640ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  :root[data-site] .ns-new::after {
    content: ""; position: absolute; inset: -2px; border: 2px solid var(--accent); border-radius: inherit;
    pointer-events: none; animation: ns-ring 640ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .ns-new .ns-spark { animation: ns-spark 560ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms both; transform-box: fill-box; transform-origin: center; }
}
/* Without motion, the tint still arrives in one step, and the label says what changed. */
@keyframes ns-arrive { 0% { transform: scale(0.94); } 45% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes ns-ring { 0% { inset: -2px; opacity: 0.55; } 100% { inset: -11px; opacity: 0; } }
@keyframes ns-spark { 0% { transform: rotate(-120deg) scale(0.3); } 65% { transform: rotate(12deg) scale(1.35); } 100% { transform: none; } }

/* "Next: Tailor my resume and apply" on a saved role's page, with an info button whose tooltip
   says what tailoring does. Hover, focus or a tap shows it; Esc hides it (static/me.js). */
.ns-next { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.ns-next form { display: contents; }
.ns-info {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.05rem;
}
.ns-info:hover, .ns-next.tip-open .ns-info { background: var(--chip); color: var(--ink); }
.ns-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ns-tip {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; width: min(21rem, calc(100vw - 32px));
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink);
  font-size: 0.875rem; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal;
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out, visibility 0s linear 160ms;
}
/* A bridge over the gap, so the pointer can move from the button onto the tooltip. */
.ns-tip::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
.ns-tip strong { display: block; margin-bottom: 4px; font-weight: 700; }
.ns-info:hover + .ns-tip, .ns-info:focus-visible + .ns-tip, .ns-tip:hover, .ns-next.tip-open .ns-tip {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s;
}
.ns-next.tip-shut .ns-tip { opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ns-tip { transition: none; } }
@media (forced-colors: active) { .ns-tip { border: 1px solid CanvasText; } :root[data-site] .ns-tailor { border: 1px solid ButtonText; } }

/* Saving without an account (static/saves.js). Each row's own Save: a bookmark that fills once
   saved, on top of the row's stretched link, a 40px target on touch screens. */
.row-save {
  position: relative; z-index: 1; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius, 6px); background: transparent; color: var(--muted);
  cursor: pointer; justify-self: end; align-self: center;
}
.row-save .ns-icon { width: 18px; height: 18px; }
.row-save:hover { color: var(--ink); border-color: var(--line); background: var(--bg); }
.row-save:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row-save.on { color: var(--accent); }
.row-save.on .ns-icon { fill: currentColor; }
@media (pointer: coarse) { .row-save { width: 40px; height: 40px; } }
/* "Keep them on every device": the email that brings a browser's saves into an account. */
dialog.keep-saves {
  width: min(28rem, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius, 10px);
  background: var(--panel, var(--bg)); color: var(--ink);
}
dialog.keep-saves::backdrop { background: rgb(0 0 0 / 0.45); }
.keep-in { display: grid; gap: 10px; padding: 22px 22px 20px; }
.keep-in h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.keep-in p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.keep-in label { font-weight: 600; font-size: 0.875rem; margin-top: 4px; }
.keep-in input[type=email] {
  height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius, 6px);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem;
}
.keep-in input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.keep-error { color: var(--bad, #b42318); font-size: 0.875rem; }
.keep-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.keep-actions button, .keep-actions a.btn {
  display: inline-flex; align-items: center; text-decoration: none;
  height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius, 6px);
  background: var(--bg); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.keep-actions button.primary, .keep-actions a.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.keep-actions button:disabled { opacity: 0.6; cursor: progress; }
@media (max-width: 760px) {
  dialog.keep-saves { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--radius, 10px) var(--radius, 10px) 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
/* The toast's and the role page's "Keep them on every device", a link-styled button. */
[data-keep-saves].link, .ns-note [data-keep-saves] { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ns-note { margin: 8px 0 0; }

/* Level Select: a level select screen (docs/design/LEVELSELECT.md, after itch.io's browse grid).
   Studios and roles are tiles you move between; the one you're on is selected. Colours and
   families are tokens from static/brand.css, served before this file; nothing here is a raw
   colour. Colour is small: a discipline square, a selection frame. No gradients, no glows. */

:root {
  --r: 8px; --r-ctl: 6px;
  --width: 1200px; --measure: 40rem; --gutter: 16px;
  --sect: 64px;
  --row-gap: 24px; --col-gap: 12px;
  /* The selection frame's outer hairline: the yellow alone is too faint on the light ground. */
  --frame-edge: var(--ink);
  --ground: var(--bg);
  --lift: translateY(-2px);
  /* A tile under the mouse: its edge darkens and its shadow deepens as it lifts. */
  --hover-edge: color-mix(in srgb, var(--line) 40%, var(--muted));
  --shadow-hover: 0 1px 0 var(--line), 0 10px 24px color-mix(in srgb, var(--ink) 12%, transparent);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (prefers-color-scheme: dark) { :root[data-site="levelselect"] { --frame-edge: transparent; --shadow-hover: none; } }

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent);
}
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
/* The selection frame: the cursor, the same for keyboard focus and (on tiles) the mouse. */
:focus-visible {
  outline: 3px solid var(--select); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge);
}
::selection { background: var(--accent-soft); color: var(--ink); }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 12px; }
h2 { font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 40px 0 10px; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 24px 0 6px; }
p { margin: 0 0 12px; }
p, li, dd { text-wrap: pretty; }
b, strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.fig { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 30; padding: 8px 14px; border-radius: var(--r-ctl); background: var(--panel); color: var(--ink); font-weight: 600; }
.skip:focus { top: 12px; }
main { max-width: var(--width); margin: 0 auto; padding: 32px var(--gutter) 96px; }

/* The HUD: counts, ages and small labels in pixels, never below 13px, never a sentence. */
.px { font-family: var(--font-hud); font-weight: 500; letter-spacing: 0.01em; }
.hud-label { font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* One square per discipline, in its colour. */
.sq { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 2px; background: var(--muted); }
.sq.engineering, .bar6 .engineering { background: var(--engineering); }
.sq.art, .bar6 .art { background: var(--art); }
.sq.design, .bar6 .design { background: var(--design); }
.sq.production, .bar6 .production { background: var(--production); }
.sq.qa, .bar6 .qa { background: var(--qa); }
.sq.audio, .bar6 .audio { background: var(--audio); }
.disc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.disc-name.engineering .hud-label { color: var(--engineering); }
.disc-name.art .hud-label { color: var(--art); }
.disc-name.design .hud-label { color: var(--design); }
.disc-name.production .hud-label { color: var(--production); }
.disc-name.qa .hud-label { color: var(--qa); }
.disc-name.audio .hud-label { color: var(--audio); }

/* ---------- top bar and footer ---------- */

.topbar { background: var(--panel); border-bottom: 1px solid var(--line); --ground: var(--panel); }
.topbar-in { max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); min-height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; color: var(--ink); text-decoration: none; flex: none; }
.topbar-nav { display: flex; gap: 22px; }
.topbar-nav a, .topbar-saved {
  position: relative; padding: 6px 0; color: var(--ink-2); font-weight: 500; font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
}
.topbar-nav a:hover, .topbar-saved:hover { color: var(--ink); }
.topbar-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.topbar-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 2px; background: var(--select); }
.topbar-saved { margin-left: auto; }
.topbar-saved[aria-current="page"] { color: var(--ink); font-weight: 600; }
/* Alerts and Saved sit together: the pair takes the margin a lone Saved did. */
.topbar-in .topbar-alerts + .topbar-saved { margin-left: -10px; }

.foot { border-top: 1px solid var(--line); background: var(--panel); --ground: var(--panel); }
.foot-in { max-width: var(--width); margin: 0 auto; padding: 48px var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-about p { margin: 14px 0 0; max-width: 34ch; color: var(--ink-2); font-size: 0.9375rem; }
.foot h2 { margin: 0 0 4px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.foot nav { display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot nav a span { color: var(--muted); }

/* ---------- controls ---------- */

.btn, .apply, .track button, .track .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 2px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); color: var(--ink);
  font: 600 0.9375rem/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}
.btn:hover, .track button:hover, .track .button:hover { border-color: var(--ink-2); }
.btn.primary, .apply { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover, .apply:hover { background: var(--bar); border-color: var(--bar); }
.btn.saved { color: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

input[type="search"], input[type="text"], select, .menu-btn, textarea {
  height: 44px; min-width: 0; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: var(--chip); color: var(--ink);
  font: 400 1rem/1.2 var(--font);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select, .menu-btn { appearance: none; padding-right: 34px; font-size: 0.875rem; font-weight: 600; cursor: pointer; max-width: 16rem; }
.select { position: relative; display: inline-flex; }
.select:not(:has(.menu))::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg);
}
/* Menus (static/menu.js): a well for the value, a white tile for the list. */
.menu-btn { padding-right: 12px; }
.menu-btn:hover { background: color-mix(in srgb, var(--chip) 70%, var(--line)); }
.menu-pop { padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); --ground: var(--panel); }
.menu-pop input { height: 34px; border: 0; border-radius: var(--r-ctl); background: var(--chip); font-size: 0.875rem; }
.opt { padding: 7px 10px; border-radius: 4px; font-size: 0.875rem; }
.opt .n { font-family: var(--font); }
.filters .menu-btn.set, .place .menu-btn.set { background: var(--select); color: var(--on-select); }
.filters .menu-btn.set .menu-chev, .place .menu-btn.set .menu-chev { color: var(--on-select); }
.toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-ctl);
  background: var(--chip); color: var(--ink); font-weight: 600; font-size: 0.875rem; white-space: nowrap; cursor: pointer;
}
.toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.toggle:has(input:checked) { background: var(--select); color: var(--on-select); }
.toggle:has(input:focus-visible) { outline: 3px solid var(--select); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge); }
.toggle input:focus-visible { outline: none; box-shadow: none; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--chip); color: var(--ink-2); font: 500 0.8125rem/1.5 var(--font); text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; background: var(--chip); color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; text-decoration: none; }
a.chip:hover, .chip a:hover { color: var(--ink); background: color-mix(in srgb, var(--chip) 70%, var(--line)); }
.chip a { color: inherit; text-decoration: none; }
.chip .n { color: var(--muted); }
.chip.ai, .chip.on { background: var(--accent-soft); color: var(--accent); }
.chip.on .n { color: inherit; }

/* ---------- tiles: the unit you browse ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--row-gap) var(--col-gap); margin: 0; padding: 0; list-style: none; }
.grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid > li { display: flex; min-width: 0; }
.tile {
  display: flex; flex-direction: column; flex: 1; min-width: 0; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow);
  color: var(--ink); font: inherit; text-align: left; text-decoration: none; overflow: hidden;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.tile:hover, .row:hover { border-color: var(--hover-edge); box-shadow: var(--shadow-hover); transform: var(--lift); }
.tile:focus-visible, .row:has(.row-link:focus-visible) {
  outline: 3px solid var(--select); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge);
  transform: var(--lift);
}
.tile > span { padding: 0 16px; }
.tile > :first-child { padding-top: 14px; }
.tile-count { color: var(--ink-2); font-size: 0.875rem; }
.tile-meta { color: var(--muted); font-size: 0.875rem; padding-bottom: 14px !important; }
.tile-foot {
  margin-top: auto; padding: 10px 16px !important; border-top: 1px solid var(--line); background: var(--chip);
  color: var(--ink-2); font-size: 0.875rem; line-height: 1.4;
}
.tile-foot b { font-weight: 600; }

/* A discipline: its square and name, its open roles in pixels, remote share, median pay. */
.disc .tile-count .px { display: block; margin: 16px 0 2px; color: var(--ink); font-size: 2rem; line-height: 1; }
/* A studio: its name, open roles, its roles by discipline as six segments, its places. */
.studio-name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.studio .tile-count { margin-top: 6px; }
.studio .tile-count .px { color: var(--ink); font-size: 1.375rem; margin-right: 2px; }
.bar6 { display: flex; gap: 2px; height: 8px; margin: 12px 16px 16px; padding: 0 !important; border-radius: 2px; overflow: hidden; }
.bar6 > span { display: block; height: 100%; min-width: 2px; }
.key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; color: var(--muted); font-size: 0.8125rem; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key .sq { width: 10px; height: 10px; }
.more { margin: 16px 0 0; font-weight: 500; }

/* ---------- role rows ---------- */

.rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* On the landing page the newest roles sit two across from a laptop up, as tiles do. */
@media (min-width: 1000px) { .rows.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.rows > li { display: flex; flex-direction: column; min-width: 0; }
.rows > li > .row { flex: 1; }
.row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 14px; align-items: start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform 120ms ease-out, box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.row { position: relative; }
.row .sq { margin-top: 6px; }
/* A row is its role's link (the title, stretched over the row) with its employer's link on top. */
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row-link:focus-visible { outline: none; box-shadow: none; }
.row-org .org { position: relative; z-index: 1; color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.row-org .org:hover { color: var(--accent); text-decoration-color: currentColor; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.row-org { margin-top: 2px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.45; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.row-pay { color: var(--good); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.row-age { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
/* The board's rows end in their Save button (static/saves.js); the landing page's rows have none. */
.row:has(> .row-save) { grid-template-columns: 12px minmax(0, 1fr) auto auto; }
.row .row-save { margin: -6px -8px 0 0; align-self: start; }

/* ---------- landing ---------- */

.hero { padding: clamp(16px, 4vw, 48px) 0 0; }
.display { margin: 0 0 14px; font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
.lede { max-width: 44ch; margin: 0 0 28px; color: var(--ink-2); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.45; }
.lede .fig { color: var(--ink); font-weight: 600; }
.find {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem) auto; gap: 8px; max-width: 54rem; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); --ground: var(--panel);
}
.find-field { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 60px; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--chip); cursor: text; }
.find-field:focus-within { outline: 3px solid var(--select); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge); }
.find-field input, .find-field select, .find-field .menu-btn { height: auto; padding: 0; border: 0; background: transparent; font: 400 1.0625rem/1.4 var(--font); color: var(--ink); max-width: none; width: 100%; }
.find-field input:focus, .find-field select:focus, .find-field .menu-btn:focus { outline: none; box-shadow: none; }
.find-where { cursor: pointer; }
.find-where .menu { display: flex; width: 100%; }
.find-where .menu-btn:hover { background: transparent; }
.find-where .menu-pop { top: calc(100% + 14px); left: -12px; }
.find-where:not(:has(.menu))::after { content: ""; position: absolute; right: 16px; bottom: 18px; width: 6px; height: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.find .btn { height: auto; min-height: 60px; padding: 0 22px; }
.near { margin: 14px 0 0; color: var(--ink-2); font-size: 0.9375rem; }
.near a { font-weight: 600; }
.near-why { color: var(--muted); }
.hud { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; }
.hud > span { display: inline-flex; align-items: baseline; gap: 8px; }
.hud .px { color: var(--ink); font-size: 1.125rem; }
.hud-value { color: var(--ink-2); font-size: 0.9375rem; }

.sect { margin-top: var(--sect); }
.sect-head { margin-bottom: 20px; }
.sect-head h2 { margin: 0 0 6px; }
.sect-head p { max-width: 64ch; margin: 0; color: var(--ink-2); }

/* Coverage: what isn't read yet, plainly; not tiles, since there is nothing behind them. */
.gaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--col-gap); margin: 0; }
.gaps > div { padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); }
.gaps dt { font-weight: 600; color: var(--ink); }
.gaps dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.875rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--col-gap); margin: 0 0 20px; padding: 0; list-style: none; }
.steps li { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font-size: 0.9375rem; }
.steps b { display: block; margin-bottom: 4px; color: var(--ink); }
.account { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); --ground: var(--panel); }
.account h2 { margin: 0 0 6px; }
.account p { max-width: 60ch; margin: 0; color: var(--ink-2); }
.account .btn { flex: none; }

/* ---------- the board ---------- */

.board-title { margin-bottom: 16px; }
.board-search { display: flex; gap: 8px; max-width: 54rem; margin-bottom: 20px; }
.board-search input { flex: 1; height: 48px; font-size: 1.0625rem; }
.board-search .btn { height: 48px; }
.picks { margin-bottom: 20px; }
.pick { gap: 10px; padding: 12px 14px; cursor: pointer; }
.pick > span { padding: 0; }
.pick > :first-child { padding-top: 0; }
.pick-n { color: var(--ink); font-size: 1.25rem; line-height: 1; min-height: 1.25rem; }
.pick[aria-pressed="true"] { background: var(--select); border-color: var(--select); }
.pick[aria-pressed="true"] .hud-label, .pick[aria-pressed="true"] .pick-n { color: var(--on-select); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters select, .filters .menu-btn { height: 40px; }
.filters .sort { margin-left: auto; }
.board-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 20px 0 10px; color: var(--ink-2); }
.board-count .fig { color: var(--ink); font-weight: 600; }
.near-board { color: var(--ink-2); }
.near-board button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.near-board button:hover { text-decoration: underline; }
.rows[aria-busy="true"] { opacity: 0.55; }
/* A load past 3 seconds (jobs.js): placeholder tiles in the tiles' own layout, bars in --chip and
   an empty discipline square. They pulse down the list; with reduced motion they hold still.
   No gradients, no glow. */
.rows-wait { pointer-events: none; }
/* jobs.js swaps these for the placeholders with `hidden`, which their display rules would override. */
.rows[hidden], .pager[hidden] { display: none; }
.rows-wait .row-main { gap: 8px; padding-top: 3px; }
.rows-wait .row-side { gap: 8px; padding-top: 3px; }
.rows-wait .sq { background: var(--chip); }
.bone { display: block; height: 10px; border-radius: 2px; background: var(--chip); }
.bone-title { height: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .rows-wait { animation: wait-in 120ms ease-out; }
  .rows-wait .bone, .rows-wait .sq { animation: wait 1.6s ease-in-out calc(var(--i) * 120ms) infinite; }
}
@keyframes wait-in { from { opacity: 0; } }
@keyframes wait { 50% { opacity: 0.4; } }
.row:has(.row-link[aria-expanded="true"]) { border-radius: var(--r) var(--r) 0 0; }
.row-detail { display: grid; gap: 14px; padding: 4px 16px 18px 42px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); background: var(--panel); --ground: var(--panel); }
.row-detail .facts { margin: 12px 0 0; }
.excerpt { max-width: 70ch; margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }
.empty { padding: 28px 16px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--ink-2); text-align: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 24px 0 0; }
.pager .fig { color: var(--muted); font-size: 0.875rem; }
.board-keys { margin: 20px 0 0; color: var(--muted); font-size: 0.8125rem; text-align: center; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; padding: 10px 14px; transform: translate(-50%, 12px);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); color: var(--ink);
  font-size: 0.875rem; opacity: 0; pointer-events: none; transition: opacity 120ms ease-out, transform 120ms ease-out;
}
/* Centred by `left: 50%`, a toast would shrink to half the screen: size it to its text. */
.toast { width: max-content; max-width: min(32rem, calc(100vw - 32px)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { margin-left: 6px; }

/* ---------- the shared server pages (job, company, topics, insights, status, prose) ---------- */

.crumbs { margin: 0 0 12px; color: var(--muted); font-size: 0.875rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
main > h1 + .muted, main > h1 + p.muted { max-width: 60ch; color: var(--ink-2); font-size: 1.0625rem; }
main > h1 + div.muted { font-size: 0.9375rem; }
/* A term's topic page: what it is in this site's work (src/about), then its counts. */
main > .topic-about { margin-bottom: 8px; }
main > .topic-about p { max-width: 60ch; color: var(--ink-2); font-size: 1.0625rem; }
main > .topic-about + p.muted { font-size: 0.9375rem; }
main p, main > details { max-width: 68ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 8px; margin: 20px 0; padding: 0; }
.facts > div { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--chip); font-size: 0.9375rem; }
.facts .l, .facts dt { margin-bottom: 2px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.facts dd { margin: 0; }
.facts strong { font-size: 1.125rem; font-weight: 600; }
.facts > div:has(.salary), .facts > div:has(.pay) { grid-column: span 2; }
.salary, span.pay { color: var(--good); font-weight: 600; }
.apply { margin: 16px 0 8px; }
.track { display: inline-block; margin: 16px 0 8px 8px; vertical-align: top; }
.notice { max-width: 44rem; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--warn); border-radius: var(--r); background: var(--panel); color: var(--ink); }
.notice.good { border-color: var(--good); }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); --ground: var(--panel); }
.description { max-width: 46rem; margin-top: 28px; padding: 24px 28px; color: var(--ink-2); font-size: 1rem; line-height: 1.65; }
.description p, .description ul { margin: 0 0 12px; }
/* A posting with no description has nothing to frame. */
.description:empty { display: none; }
.description ul { padding-left: 20px; }
ul.roles { display: grid; gap: 8px; max-width: 52rem; margin: 0; padding: 0; list-style: none; }
ul.roles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
ul.roles .t { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
ul.roles .t:hover { color: var(--accent); text-decoration: underline; }
ul.roles .m { color: var(--ink-2); font-size: 0.875rem; }
ul.roles .r { color: var(--muted); font-size: 0.875rem; text-align: right; white-space: nowrap; }
/* A studio's roles under their disciplines, in the board's order, each headed by its square. */
.role-sect { margin: 28px 0 10px; font-size: 1rem; font-weight: 500; }
h2 + .role-sect, .place-filter + .role-sect, p + .role-sect { margin-top: 16px; }
.role-sect .px { font-size: 0.875rem; }
.sect-jump { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 0.875rem; }
.sect-jump a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; }
.sect-jump a:hover { color: var(--accent); text-decoration: underline; }
.sect-jump .sq { width: 10px; height: 10px; }
.sect-jump .px { color: var(--muted); }
.role-sect { scroll-margin-top: 16px; }
.links { columns: 3 14rem; column-gap: 32px; }
.links a { display: block; padding: 4px 0; break-inside: avoid; color: var(--ink); font-weight: 500; text-decoration: none; }
.links a:hover { color: var(--accent); text-decoration: underline; }
.links .muted { font-weight: 400; font-size: 0.875rem; }
.company-tag { margin: 8px 0 16px; }
.tag-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 12px; border-radius: var(--r-ctl); background: var(--chip); }
.tag-label { font-weight: 600; color: var(--ink); }
.tag-detail { color: var(--ink-2); }
.company-tag p { margin: 8px 0 0; }
.stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 12px; margin: 12px 0; }
.stack-group { min-width: 0; }
.stack > .stack-group { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.stack-group .l { margin-bottom: 6px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
details summary { color: var(--ink-2); font-size: 0.875rem; cursor: pointer; }
details ul { color: var(--ink-2); font-size: 0.875rem; }
.cell.flat { margin-top: 8px; }

/* Tables (insights, status, company figures): a white tile with hairlines. */
.table-wrap, .scroll { overflow-x: auto; scrollbar-color: var(--muted) transparent; }
table { width: 100%; max-width: 52rem; margin: 8px 0 16px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: 0.9375rem; overflow: hidden; }
th, td { padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
tr:first-child > th, tr:first-child > td { border-top: 0; }
th { background: var(--chip); color: var(--muted); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 0.8125rem; font-weight: 400; }
table.pay tr.all td { font-weight: 600; color: var(--ink); }
table.pay td.n strong { font-weight: 600; color: var(--good); }
table.pay.kinds { max-width: none; }
.meter { display: inline-block; width: 100%; height: 6px; border-radius: 2px; background: var(--chip); vertical-align: middle; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--bar); }
.ins table.league, .ins table.matrix, .ins table.together, .ins table.art-tools { max-width: none; }
.share { display: grid; grid-template-columns: 2.5rem minmax(6rem, 9rem); align-items: center; gap: 10px; color: var(--ink); }
.share .fig { text-align: right; }
.art-share { display: grid; grid-template-columns: 2.5rem 100px; align-items: center; gap: 10px; }
.art-share .fig { text-align: right; }
.art-tools td.asks { min-width: 20rem; }
.art-tools .chip { margin: 2px 4px 2px 0; }
.fw-cards.one { grid-template-columns: minmax(0, 30rem); }
.league .chip { margin: 2px 4px 2px 0; }
table.matrix { width: auto; }
table.matrix td.n { min-width: 3.4rem; padding: 9px 4px; border: 0; border-top: 2px solid var(--panel); border-left: 2px solid var(--panel); text-align: center; font-weight: 600; }
.h0 { background: var(--chip); }
.h1 { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.h2 { background: color-mix(in srgb, var(--accent) 26%, var(--panel)); }
.h3 { background: color-mix(in srgb, var(--accent) 42%, var(--panel)); }
.h4 { background: color-mix(in srgb, var(--accent) 70%, var(--panel)); }
table.matrix td.h4 { color: var(--on-accent); }
.matrix-key .sw, .fw-key .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin: 0 5px 0 10px; }
.pair { display: inline-flex; align-items: baseline; gap: 6px; margin: 2px 6px 2px 0; padding: 3px 9px; border-radius: 4px; background: var(--chip); color: var(--ink); font-size: 0.875rem; text-decoration: none; }
.pair .pair-vs { color: var(--muted); }
.spark { display: block; vertical-align: middle; }
.bar, .range { display: block; vertical-align: middle; }
.insight-nav a { margin-right: 14px; }
.ins .more { margin: 4px 0 0; }

/* Text pages (methodology): a reading column on a white tile. */
.prose { max-width: calc(var(--measure) + 64px); padding: clamp(20px, 4vw, 36px) clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; --ground: var(--panel); }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin: 40px 0 10px; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose code { padding: 1px 5px; border-radius: 4px; background: var(--chip); color: var(--ink); font-size: 0.9375rem; }
.prose pre { padding: 14px; border-radius: var(--r-ctl); background: var(--chip); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; font-size: 0.9375rem; }

/* Where to work: a country menu and a remote toggle (Browse and topic pages). */
.place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 24px; }
.place select, .place .menu-btn { height: 40px; }
.place-clear { padding: 0 6px; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.place-clear:hover { color: var(--ink); }

/* Reporting a wrong or missing name: a tile that opens. */
details.report { max-width: 40rem; margin: 28px 0 8px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); --ground: var(--panel); }
details.report summary { color: var(--ink); font-weight: 600; font-size: 0.9375rem; }
.report form { display: grid; gap: 14px; margin-top: 14px; }
.report fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.report legend { margin-bottom: 6px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.report label { color: var(--ink); font-size: 0.9375rem; }
.report input[type="radio"] { margin: 0 6px 0 0; accent-color: var(--accent); }
.report select, .report .menu-btn { height: 36px; margin-left: 4px; }
.report textarea { display: block; width: 100%; height: auto; margin-top: 6px; padding: 10px 12px; resize: vertical; }
.report .btn { justify-self: start; }
.report .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The LinkedIn export walkthrough. */
.li-steps { max-width: 44rem; margin: 0 0 16px; padding-left: 1.4em; }
.li-steps li { padding: 8px 0 8px 4px; color: var(--ink-2); }
.li-steps b { color: var(--ink); font-weight: 600; }
.li .lede { max-width: 40rem; }

/* The tools map, on a tile: violet dots, labels haloed in the tile; the hovered or focused dot
   wears the selection frame. */
.ins-card.map-wrap { max-width: calc(44rem + 42px); margin: 8px 0 12px; padding: 16px 20px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); overflow-x: auto; }
.map { display: block; width: 100%; max-width: 44rem; min-width: 34rem; height: auto; overflow: visible; }
.map a { outline: none; text-decoration: none; }
.map .grid line { stroke: var(--line); stroke-width: 1; }
.map .base { stroke: var(--muted); stroke-width: 1; }
.map .med { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.map .ax { fill: var(--muted); font: 400 11px var(--font); }
.map .med-l { font-weight: 600; }
.map .hit { fill: transparent; }
.map .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; transition: stroke 120ms ease-out, stroke-width 120ms ease-out; }
.map .lbl { fill: var(--ink-2); font: 500 11.5px var(--font); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.map .tip { display: none; fill: var(--ink); }
.map a:hover .dot, .map a:focus-visible .dot { stroke: var(--select); stroke-width: 4; }
.map a:hover .lbl, .map a:focus-visible .lbl { fill: var(--ink); }
.map a:hover .tip, .map a:focus-visible .tip { display: inline; }
.map-table summary { margin: 4px 0 8px; }
@media (prefers-reduced-motion: reduce) { .map .dot { transition: none; } }

/* Insights: tables sorted by their headers, and the map's tooltip (static/insights.js). */
.sort-btn { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sort-btn:hover { color: var(--ink); }
.sort-arrow::after { content: "↕"; opacity: 0.4; font-size: 0.85em; }
th[aria-sort] { color: var(--ink); }
th[aria-sort="ascending"] .sort-arrow::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .sort-arrow::after { content: "↓"; opacity: 1; }
th a + .sort-btn { margin-left: 2px; vertical-align: middle; }
.map-tip { position: fixed; z-index: 40; max-width: 17rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.14); color: var(--ink-2); font: 400 0.8125rem/1.4 var(--font); pointer-events: none; }
.map-tip[hidden] { display: none; }
.map-tip .tip-name { color: var(--ink); font-weight: 700; font-size: 0.875rem; }
.map-tip .tip-about { margin-top: 2px; color: var(--ink-2); }
.map-tip .tip-pay { margin-top: 4px; color: var(--ink); font-weight: 600; }
.map-tip .tip-about + .tip-pay { margin-top: 6px; }
.map-tip .tip-sub { color: var(--muted); font-size: 0.75rem; }
.map-tip .tip-h { margin-top: 8px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.map-tip ol { margin: 2px 0 0; padding: 0; list-style: none; }
.map-tip li { display: flex; justify-content: space-between; gap: 12px; }
.map-tip .tip-n { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) {
  .grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .foot-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  main { padding-top: 20px; }
  .topbar-in { flex-wrap: wrap; gap: 4px 20px; padding-top: 12px; }
  .topbar-nav {
    order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 10px;
    gap: 20px; overflow-x: auto; scrollbar-width: none;
  }
  .find { grid-template-columns: minmax(0, 1fr); }
  .find .btn { min-height: 52px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 10px; scrollbar-width: none; }
  .filters > * { flex: none; }
  .filters .sort { margin-left: 0; }
  /* The row scrolls sideways, so a menu opens as a sheet at the foot of the screen. */
  .filters .menu-pop { position: fixed; top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; max-width: none; }
  .row { grid-template-columns: 12px minmax(0, 1fr); }
  .row:has(> .row-save) { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .row-side { grid-column: 2; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 12px; margin-top: 4px; }
  .row .row-save { grid-column: 3; grid-row: 1 / span 2; margin: -6px -8px 0 0; }
  .row-detail { padding-left: 16px; }
  .account { flex-direction: column; align-items: stretch; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-keys { display: none; }
  ul.roles li { grid-template-columns: minmax(0, 1fr); }
  ul.roles .r { text-align: left; }
  .description { padding: 20px 18px; }
  th, td { padding: 9px 12px; }
  .facts > div:has(.salary), .facts > div:has(.pay) { grid-column: auto; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* The six disciplines stay two across: six full-width tiles push everything else off the
     first screens. */
  .grid.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .disc .tile-count .px { font-size: 1.625rem; margin-top: 12px; }
  .tile > span { padding: 0 12px; }
  .tile-foot { padding: 8px 12px !important; }
  /* A studio in one line, its bar under it. */
  .studio { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; }
  .studio .studio-name { padding-top: 12px; }
  .studio .tile-count { margin-top: 0; padding-top: 12px; text-align: right; white-space: nowrap; }
  .bar6 { grid-column: 1 / -1; margin: 10px 12px 12px; }
  .studio .tile-foot { grid-column: 1 / -1; }
  .tile:hover, .row:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  :root { --lift: none; }
}
/* ---------- the sponsored box (docs/SPONSORED-PLAN.md §3) ----------
   A tile with its own HUD band above the role rows. It isn't in the arrow keys' grid and wears the
   selection frame only under keyboard focus. */
.sponsored {
  margin: 0 0 var(--row-gap); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  box-shadow: var(--shadow); overflow: hidden;
}
.sponsored-band { max-width: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; padding: 7px 16px; border-bottom: 1px solid var(--line); background: var(--chip); }
.sponsored-note { color: var(--ink-2); font-size: 0.8125rem; }
.sponsored-link { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 14px; align-items: start; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.sponsored-link .sq { margin-top: 6px; }
.sponsored-link:hover .sponsored-title { color: var(--accent); }
.sponsored-main { display: flex; flex-direction: column; min-width: 0; }
.sponsored-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.sponsored-meta, .sponsored-line { margin-top: 2px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.45; }
.sponsored-pay { color: var(--good); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.sponsored-why { color: var(--accent); font-size: 0.8125rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
/* "Why this?" opens in place (templates/sponsored_why.html): the band is the toggle. */
.sponsored-about > summary { list-style: none; cursor: pointer; }
.sponsored-about > summary::-webkit-details-marker { display: none; }
.sponsored-about > summary:hover .sponsored-why, .sponsored-about[open] .sponsored-why { text-decoration-color: currentColor; }
.sponsored-explain { margin: 0; padding: 8px 16px 10px; max-width: none; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.sponsored-explain p { margin: 0 0 4px; max-width: 60ch; }

@media (forced-colors: active) {
  .tile, .row, .find, .steps li, .gaps > div, .panel, .prose, table { border: 1px solid CanvasText; }
  .tile:hover, .tile:focus-visible, .row:hover, .row:has(.row-link:focus-visible), :focus-visible { outline: 3px solid Highlight; }
  .pick[aria-pressed="true"] { outline: 2px solid Highlight; }
  .sq, .bar6 > span, .meter > span { forced-color-adjust: none; }
}

/* Insights: which engine (Unreal or Unity), drawn like the discipline bars: one segment per
   answer, with its key. */
.fw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 12px; margin: 8px 0 4px; }
.fw { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.fw h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.fw h3 .dot { display: none; }
.fw-bar { display: flex; gap: 2px; height: 12px; border-radius: 3px; overflow: hidden; background: var(--chip); }
.fw-bar > span { display: block; }
.fw-key { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 4px; }
.fw-key li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; font-size: .875rem; }
.fw-key .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.fw .fw-1 { background: var(--engineering); }
.fw .fw-2 { background: var(--select); }
.fw .fw-3 { background: var(--art); }
.fw .fw-4 { background: var(--muted); }

/* Studio tiles: the engines their roles name, and on /studios why each is here. */
.studio-engines { display: block; margin-top: 8px; font-size: .875rem; color: var(--ink-2); }
.studio .studio-why { display: block; }
.studio .studio-places { display: block; margin-top: 4px; color: var(--muted); }

/* Jobs by game (the shared apps pages): each game a tile in the grid, its icon as the
   tile's art; the same selection frame as every tile. */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--row-gap) var(--col-gap); list-style: none; margin: 16px 0 24px; padding: 0; }
.apps li { display: flex; min-width: 0; }
.apps li > a, .apps .card {
  position: relative; display: flex; flex: 1; gap: 12px; align-items: center; min-width: 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform 120ms ease-out, box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.apps li > a:hover, .apps .card:hover { border-color: var(--hover-edge); box-shadow: var(--shadow-hover); transform: var(--lift); }
.app-rows .card:hover { background: color-mix(in srgb, var(--chip) 45%, var(--panel)); }
.apps li > a:focus-visible, .apps .card:has(a.n:focus-visible), .app-rows .card:has(a.n:focus-visible) {
  outline: 3px solid var(--select); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge);
  transform: var(--lift);
}
.apps .w, .app-rows .w { display: flex; flex-direction: column; min-width: 0; }
.apps .n, .app-rows .n { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps .m, .app-rows .m { color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A card is its game's link (the name, stretched over the card) with its studio's link on top. */
.card a.n { display: block; color: inherit; text-decoration: none; }
.card a.n::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card a.n:focus-visible { outline: none; box-shadow: none; }
.card a.maker { position: relative; z-index: 1; color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.card a.maker:hover { color: var(--accent); text-decoration-color: currentColor; }
.apps .rank, .app-rows .rank { color: var(--ink); font-family: var(--font-hud); font-size: 0.875rem; }
.apps li.more a { background: var(--chip); }
.app-icon { flex: none; display: block; width: 52px; height: 52px; border-radius: 12px; background: var(--chip); object-fit: cover; }
.app-icon.none { display: grid; place-items: center; font: 600 1.125rem/1 var(--font-hud); color: var(--ink-2); }
.app-icon.lg { width: 104px; height: 104px; border-radius: 22px; font-size: 2.5rem; }
/* A Steam game's art is its store capsule, wider than an icon: above the name in a tile, as on
   itch.io's grid, and beside it on its page. */
.apps .card:has(.capsule) { flex-direction: column; align-items: stretch; gap: 10px; }
.apps .app-icon.capsule { width: 100%; height: auto; aspect-ratio: 231 / 87; border-radius: 6px; }
.app-icon.capsule.lg { width: 231px; height: 87px; border-radius: 8px; }
/* A game card: its art in a band of a Steam capsule's shape above the name, so every card in a
   row has one shape; a mobile game's band is a well holding its icon and its ratings. Where it's
   played closes the card, level with its neighbours'. */
.apps .card.band { flex-direction: column; align-items: stretch; gap: 10px; }
.apps .art { display: flex; align-items: center; justify-content: center; gap: 16px; aspect-ratio: 231 / 87; border-radius: 6px; background: var(--chip); overflow: hidden; }
.apps .art.wide { display: block; background: none; }
.apps .art .app-icon:not(.capsule) { width: 56px; height: 56px; }
.apps .art .app-icon.none { background: var(--panel); }
.apps .art-stat { display: flex; flex-direction: column; gap: 3px; }
.apps .art-stat .px { color: var(--ink); font-size: 1.375rem; font-weight: 600; line-height: 1.1; }
.apps .card.band .w { flex: 1; }
.apps .plat { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; color: var(--muted); font: 500 0.8125rem/1.35 var(--font-hud); letter-spacing: 0.02em; }
/* The year it first came out, at the line's end. */
.apps .plat .yr { flex: none; color: var(--ink-2); }
/* A console game's logo: drawn for a light ground, so on the plate in both themes, whole. */
.app-icon.logo { background: var(--plate); object-fit: contain; box-sizing: border-box; padding: 6% 9%; border: 1px solid var(--line); }
.app-rows .app-icon.logo { padding: 3px; }
@media (max-width: 560px) {
  .app-head:has(.capsule) { flex-direction: column; align-items: flex-start; gap: 14px; }
}
.app-head { display: flex; gap: 20px; align-items: center; margin: 8px 0 28px; }
.app-head h1 { margin: 0 0 4px; }
.app-head .muted, .app-head .muted a { color: var(--ink-2); }
.app-search { display: flex; gap: 8px; max-width: 34rem; margin: 20px 0 12px; }
.app-search input { flex: 1; min-width: 0; }
/* The games page's platforms: a box each, all ticked to begin with. */
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; }
.platforms .hud-label { margin-right: 4px; }
.platforms .toggle { height: 32px; padding: 0 10px 0 8px; gap: 6px; border-radius: 4px; font-size: 0.8125rem; }
.platforms .toggle input { width: 14px; height: 14px; }
.toggle .n { color: var(--ink-2); font-weight: 400; }
.toggle:has(input:checked) .n { color: var(--on-select); }
.app-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 20px 0 0; }
.app-count { flex: 1 1 18rem; margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.app-view { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.app-view form { display: contents; }
.app-view .seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--chip); }
.app-view .seg a { display: flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 4px; color: var(--ink-2); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.app-view .seg a[aria-current] { background: var(--panel); color: var(--ink); }
.app-rows { list-style: none; margin: 16px 0 24px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.app-rows li + li { border-top: 1px solid var(--line); }
.app-rows .card { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 10px 16px; color: var(--ink); text-decoration: none; }
.app-rows .app-icon { width: 40px; height: 40px; border-radius: 9px; }
.app-rows .r { display: flex; flex-direction: column; align-items: flex-end; color: var(--ink-2); font-size: 0.875rem; text-align: right; white-space: nowrap; }
/* On a phone a row's chart place and roles go under its name, which keeps its width. */
@media (max-width: 560px) {
  .app-rows .card { grid-template-columns: 40px minmax(0, 1fr); }
  .app-rows .r { grid-column: 2; align-items: flex-start; text-align: left; white-space: normal; }
}
.ranks { margin: 10px 0 0; font-size: 0.875rem; }
.ranks-list { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-right: 6px; vertical-align: middle; }
.ranks-list span { padding: 2px 8px; border-radius: 4px; background: var(--chip); color: var(--ink); font-family: var(--font-hud); }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .apps li > a, .apps .card { transition: none; } .apps li > a:hover, .apps .card:hover, .apps .card:has(a.n:focus-visible) { transform: none; } }
/* The apps pages' intro and footnote: a readable measure. */
h1 + p.muted, .apps ~ p.small, .app-rows ~ p.small, .sect-head p, .sect > p.small { max-width: 62ch; }

/* ---------- buying a sponsored box (docs/SPONSORED-PLAN.md §6) ----------
   Weeks are tiles you move between; the chosen one wears the cursor-yellow selection frame. Room
   and counts are HUD figures. */
.buy { max-width: 64rem; }
.buy-about, .buy-pay-page { max-width: calc(var(--measure) + 64px); }
/* The about page holds tiles (the example box, its tables), so it sits on the ground, not in a prose tile. */
.prose.buy-about { padding: 0; border: 0; background: none; --ground: var(--bg); }
.buy-crumb { margin: 0 0 10px; font-size: 0.875rem; }
.buy-crumb a { color: var(--accent); }
.buy h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.buy-lede { color: var(--ink-2); font-size: 1.0625rem; max-width: 60ch; margin: 0 0 24px; }
.buy-lede a { color: var(--accent); }
.buy-error { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--bad); border-radius: var(--r); background: var(--panel); color: var(--ink); max-width: 62ch; }
.buy-none { color: var(--ink-2); margin: 8px 0 16px; }
.buy-hint { color: var(--muted); font-size: 0.875rem; margin: 8px 0 0; max-width: 62ch; }
.buy-label { display: block; margin: 0 0 8px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.buy-optional { text-transform: none; letter-spacing: 0; font-family: var(--font); }
.buy input[type="search"], .buy input[type="text"] { width: 100%; }
.buy-search { max-width: 36rem; margin: 0 0 20px; }
.buy-search label { display: block; margin: 0 0 8px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.buy-search-row { display: flex; gap: 8px; }
.buy-employers { list-style: none; margin: 12px 0 0; padding: 0; max-width: 36rem; display: grid; gap: 8px; }
.buy-employers a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform 120ms ease-out, box-shadow 120ms ease-out, border-color 120ms ease-out;
}
.buy-employers a:hover { border-color: var(--hover-edge); box-shadow: var(--shadow-hover); transform: var(--lift); }
.buy-employer { font-weight: 600; }
.buy-n { font: 500 0.8125rem var(--font-hud); color: var(--muted); white-space: nowrap; }
.buy-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 24px 32px; align-items: start; }
.buy-form .buy-fields, .buy-form .buy-side { padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); --ground: var(--panel); }
.buy-field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.buy-field:last-child { margin-bottom: 0; }
.buy-field .menu-btn, .buy-field select { max-width: 100%; }
.buy-value { margin: 0; color: var(--ink-2); }
.buy-value a { color: var(--accent); }
.buy-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 10px; }
.buy-week {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); cursor: pointer; transition: transform 120ms ease-out, border-color 120ms ease-out;
}
.buy-week input { position: absolute; opacity: 0; pointer-events: none; }
.buy-week:hover { border-color: var(--hover-edge); transform: var(--lift); }
.buy-week:has(input:checked), .buy-week:has(input:focus-visible) {
  outline: 3px solid var(--select); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ground), 0 0 0 7px var(--frame-edge);
}
.buy-week-day { color: var(--ink); font-weight: 600; font-size: 0.9375rem; }
.buy-week-room { font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.buy-week.full { cursor: default; opacity: 0.5; }
.buy-week.full:hover { border-color: var(--line); transform: none; }
.buy-side { position: sticky; top: 20px; }
.buy .sponsored { margin: 0; }
.buy .sponsored-link { color: var(--ink); text-decoration: none; }
.buy-example { margin: 24px 0 8px; }
.buy-example figcaption { margin-top: 10px; color: var(--muted); font-size: 0.875rem; }
.buy-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 20px 0 14px; color: var(--ink); font-weight: 600; }
.buy-total .fig { font: 600 1.5rem/1 var(--font-hud); }
.buy-total .buy-hint { margin: 0; flex-basis: 100%; font-weight: 400; }
.buy-pay { width: 100%; }
.buy-go { margin: 20px 0 8px; }
.buy-closed { color: var(--ink-2); }
.buy table.buy-facts { max-width: min(40rem, 100%); }
.buy-facts th[scope="row"] { width: 8rem; }
.buy-facts td { color: var(--ink-2); }
.buy-counts, .buy-list, .buy-views, .buy-weeks-table { max-width: min(44rem, 100%); }
.buy-counts td.n, .buy-views td.n { font-family: var(--font-hud); }
.buy-counts tr.all td, .buy-counts tr.all th { font-weight: 600; color: var(--ink); }
.buy-weeks-table tr.full td { color: var(--muted); }
.buy-state { font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
h1 .buy-state { padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel); }
.buy-state.live { color: var(--good); }
.buy-state.rejected, .buy-state.cancelled { color: var(--muted); }
.buy-reason { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink-2); max-width: 62ch; }
.buy-reason p { margin: 0; }
.buy-others { list-style: none; padding: 0; }
.buy-scroll { max-width: 100%; overflow-x: auto; }
.buy-list td, .buy-list th { white-space: nowrap; }
@media (max-width: 860px) {
  .buy-cols { grid-template-columns: minmax(0, 1fr); }
  .buy-side { position: static; }
}

/* The weekly email's sign-up (templates/digest_macros.html, src/digest.rs): a tile on job and topic
   pages, a line in the footer, and its own page at /digest. Email only. */
.digest { margin: 28px 0 8px; padding: 16px; max-width: 38rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.digest-h { margin: 0; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.digest-what { margin: 6px 0 12px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.digest-row { display: flex; gap: 8px; }
.digest-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.digest input[type="email"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: var(--chip);
  color: var(--ink); font: 400 1rem/1.2 var(--font);
}
.digest input::placeholder { color: var(--muted); opacity: 1; }
.digest button, .digest-act button {
  height: 44px; padding: 0 16px; border: 2px solid var(--accent); border-radius: var(--r-ctl); background: var(--accent); color: var(--on-accent);
  font: 600 0.9375rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: background-color 120ms ease-out, border-color 120ms ease-out;
}
.digest button:hover, .digest-act button:hover { background: var(--bar); border-color: var(--bar); }
.digest .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.digest-foot { margin: 18px 0 0; padding: 0; background: none; border: 0; max-width: 34ch; }
.digest-page { max-width: var(--measure); }
.digest-page .digest { margin-top: 20px; }
.digest-lead { font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); }
.digest-act { margin: 20px 0; }
@media (max-width: 30rem) {
  .digest-row { flex-direction: column; }
  /* Stacked, `flex: 1` would size the field's height from zero. */
  .digest input[type="email"] { flex: none; }
}

/* A job search alert's sign-up (templates/alert_macros.html, src/job_alerts.rs): a link-like
   disclosure on the board, employer and topic pages that opens to the weekly email's form. */
.alert-box summary { display: inline; list-style: none; cursor: pointer; }
.alert-box summary::-webkit-details-marker { display: none; }
.alert-box summary:hover { text-decoration: underline; }
.alert-box summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert-box .alert-form { margin: 10px 0 4px; }
.alert-company, .alert-topic { margin: 20px 0 8px; }
.alert-closed { margin: 0 0 20px; }
/* Open on a closed role's page, its summary is the form's heading. */
.alert-box.alert-closed > summary { font: 600 1rem/1.3 var(--font); color: var(--ink); text-decoration: none; }
.alert-list { list-style: none; padding: 0; margin: 16px 0; }
.alert-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.alert-list li:last-child { border-bottom: 1px solid var(--line); }
.alert-acts { margin-left: auto; display: flex; gap: 8px; }
.alert-often { border: 0; padding: 0; margin: 0 0 10px; color: var(--ink-2); }
.alert-often legend { padding: 0; margin-bottom: 4px; color: var(--muted); }
.alert-often label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; cursor: pointer; }
.alert-often input { accent-color: var(--accent); margin: 0; }
.alert-stop { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.alert-stop:hover { color: var(--ink); border-color: var(--muted); }
.alert-box summary { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ---------- the board's job alert (templates/alert_macros.html `cta` and `dialog`, static/job_alert.js) ----------
   The board's one primary button, at the end of the count line: it names the alert and, in HUD
   figures, what the past week brought. It opens a tile over the board that shows those roles, then
   asks how often (two pick tiles, the chosen one selected as a filter is) and where. Asked for
   already (in this browser), it steps back to a plain button. */
.board-count { align-items: center; justify-content: space-between; }
.board-count > p { flex: 1 1 18rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; }
.alert-cta {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; border: 2px solid var(--accent); border-radius: var(--r-ctl);
  background: var(--accent); color: var(--on-accent); font: 600 0.9375rem/1 var(--font); white-space: nowrap; cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out;
}
.alert-cta:hover { background: var(--bar); border-color: var(--bar); }
.alert-cta-fig { padding-left: 10px; border-left: 1px solid color-mix(in srgb, var(--on-accent) 40%, transparent); font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; }
.board-count .alert-cta-fig { color: inherit; font-weight: 500; }
.alert-cta kbd { border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); background: transparent; color: inherit; }
.alert-cta.is-asked { background: var(--panel); border-color: var(--line); color: var(--ink-2); }
.alert-cta.is-asked:hover { border-color: var(--ink-2); color: var(--ink); }
.alert-cta.is-asked kbd { border-color: var(--line); }
/* Under the rows: a tile of its own. */
.alert-nudge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 12px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); color: var(--ink-2);
}
.alert-nudge p { margin: 0; max-width: 40rem; }
.alert-nudge .fig { color: var(--ink); font-weight: 600; }
.alert-nudge .btn { height: 40px; }
.alert-nudge[hidden] { display: none; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.alert-dialog {
  width: min(32rem, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 24px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow-hover); overflow-y: auto;
}
.alert-dialog::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.alert-dialog [hidden] { display: none; }
.alert-close {
  position: absolute; top: 16px; right: 16px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--chip); color: var(--ink-2); font: 500 0.8125rem/1 var(--font); cursor: pointer;
}
.alert-close:hover { border-color: var(--ink-2); color: var(--ink); }
.alert-kind { margin: 0 64px 6px 0; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.alert-dialog h2 { margin: 0 64px 10px 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.alert-dialog h2:focus { outline: none; box-shadow: none; }
.alert-proof { margin: 0 0 16px; color: var(--ink-2); }
.alert-proof .fig { color: var(--ink); font-weight: 600; }
.alert-sample { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.alert-sample li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.alert-sample-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.alert-sample-org { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.alert-sample .alert-sample-more { justify-content: flex-start; color: var(--muted); }
.alert-dialog .alert-form { margin: 0; }
.alert-dialog .alert-often { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.alert-dialog .alert-often legend { margin-bottom: 8px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.alert-dialog .alert-often label {
  position: relative; display: block; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); box-shadow: var(--shadow); color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; cursor: pointer;
  transition: border-color 120ms ease-out;
}
.alert-dialog .alert-often label:hover { border-color: var(--hover-edge); }
.alert-dialog .alert-often b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.alert-dialog .alert-often input { position: absolute; opacity: 0; pointer-events: none; }
.alert-dialog .alert-often label:has(input:checked) { background: var(--select); border-color: var(--select); color: var(--on-select); }
.alert-dialog .alert-often label:has(input:checked) b { color: var(--on-select); }
.alert-dialog .alert-often label:has(input:focus-visible) { outline: 3px solid var(--select); outline-offset: 3px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 7px var(--frame-edge); }
.alert-label { display: block; margin-bottom: 8px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.alert-row { display: flex; gap: 8px; }
.alert-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: var(--chip);
  color: var(--ink); font: 400 1rem var(--font);
}
.alert-row input::placeholder { color: var(--muted); }
.alert-row .btn { flex: none; }
.alert-error { margin: 10px 0 0; color: var(--bad); font-size: 0.875rem; }
.alert-fine { margin: 14px 0 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.alert-sent .btn { margin-top: 20px; }
.alert-dialog .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 767px) {
  .alert-cta { width: 100%; justify-content: center; height: 44px; }
  .alert-cta kbd, .alert-nudge kbd { display: none; }
  .alert-dialog { width: 100%; max-width: none; margin: auto 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--r) var(--r) 0 0; max-height: 90vh; }
  .alert-dialog .alert-often { gap: 8px; }
  .alert-row { flex-direction: column; }
  .alert-row input, .alert-row .btn { flex: none; width: 100%; }
  .alert-nudge .btn { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .alert-dialog[open] { animation: alert-in 160ms ease-out; }
  @keyframes alert-in { from { opacity: 0; transform: translateY(8px); } }
}

/* ---------- recent searches ----------
   The clock beside the search field, or H, opens the reader's recent searches
   (static/search_history.js; structure in static/brand.css) as a tile over the board: a HUD label,
   then each search as a row with its discipline's square, the keyboard's cursor the selection
   frame. The board behind blurs, by the owner's request (2026-11-10); the clock is the one drawn
   icon, also by request. */
.board-search .sh-button {
  flex: none; width: 48px; height: 48px; border: 2px solid var(--line); border-radius: var(--r-ctl);
  background: var(--panel); color: var(--ink-2);
}
.board-search .sh-button:hover, .board-search .sh-button[aria-expanded="true"] { border-color: var(--ink-2); background: var(--panel); color: var(--ink); }
.board-search .sh-clock { width: 20px; height: 20px; }
.history-note { color: var(--ink-2); }
.sh { width: min(36rem, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-hover); overflow: visible; }
.sh-panel { overflow: hidden; border-radius: inherit; }
.sh::backdrop { background: color-mix(in srgb, var(--ink) 36%, transparent); }
.sh-head { padding: 18px 16px 12px 20px; }
.sh-kicker { font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sh-title { font-size: 1.375rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.sh-close {
  height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--chip); color: var(--ink-2); font: 500 0.8125rem/1 var(--font);
}
.sh-close:hover { border-color: var(--ink-2); color: var(--ink); }
.sh-clear { color: var(--accent); font-weight: 600; font-size: 0.875rem; }
.sh-clear:hover { color: var(--accent); }
.sh-body { padding: 0 12px 4px; }
.sh-group { padding: 12px 8px 6px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; }
.sh-item { margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.sh-use { min-height: 56px; padding: 12px 50px 12px 14px; border-radius: calc(var(--r) - 1px); }
.sh-use:focus-visible { outline: 3px solid var(--select); outline-offset: 3px; box-shadow: 0 0 0 4px var(--frame-edge); border-radius: 7px; }
.sh-item:has(.sh-use:focus-visible) { position: relative; z-index: 1; }
.sh-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sh-q { font-size: 1rem; font-weight: 600; }
.sh-any { color: var(--ink-2); font-weight: 500; }
.sh-chip { padding: 2px 8px; border-radius: 4px; background: var(--chip); color: var(--ink-2); font-size: 0.8125rem; line-height: 1.4; }
.sh-when { font: 500 0.8125rem/1.2 var(--font-hud); letter-spacing: 0.02em; }
.sh-del { right: 10px; border-radius: 4px; }
.sh-empty { padding: 4px 8px 24px; }
.sh-foot { padding: 10px 20px 14px; border-top: 1px solid var(--line); background: var(--chip); font-size: 0.8125rem; }
.sh-where a { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .sh-item { transition: transform 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out; }
  .sh-item:hover { transform: var(--lift); border-color: var(--hover-edge); box-shadow: var(--shadow-hover); }
}
@media (max-width: 760px) { .sh { border-width: 1px 0 0; border-radius: var(--r) var(--r) 0 0; } }

/* ---------- your skills (static/fit.js) ----------
   "Your skills" sits beside the sort as a filter toggle; set, it is the selected filter's
   --select with ink text. A row the reader matches says how many of its skills they have, the
   figure in HUD; the opened row marks theirs. The picker is a tile over the board (a bottom
   sheet on phones): terms as chips, the picked ones in --select as a selected filter. */
.filters .fit-open { margin-left: auto; }
.filters .fit-open + .sort { margin-left: 0; }
.fit-open {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-ctl);
  background: var(--chip); color: var(--ink); font: 600 0.875rem/1 var(--font); white-space: nowrap; cursor: pointer;
}
.fit-open:hover { background: color-mix(in srgb, var(--chip) 70%, var(--line)); }
.fit-open.set { background: var(--select); color: var(--on-select); }
.fit-open .px { font-size: 0.875rem; }
.row-fit { margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.row-fit .px { color: var(--ink); }

.fit-dialog {
  border: 1px solid var(--line); border-radius: var(--r); padding: 0; background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
  width: min(42rem, calc(100vw - 32px)); max-height: min(44rem, calc(100vh - 48px)); --ground: var(--panel);
}
.fit-dialog[open] { display: flex; }
.fit-dialog::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); }
.fit-form { display: flex; flex-direction: column; min-height: 0; width: 100%; margin: 0; }
.fit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.fit-head h2 { margin: 0; font-size: 1.375rem; font-weight: 600; }
.fit-count { font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.fit-lede { margin: 6px 24px 14px; color: var(--ink-2); font-size: 0.9375rem; max-width: 36rem; }
.fit-body { overflow-y: auto; padding: 0 24px; border-top: 1px solid var(--line); }
.fit-group { border: 0; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fit-group:last-child { border-bottom: 0; }
.fit-group legend { padding: 0 0 10px; font: 500 0.8125rem/1.2 var(--font-hud); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.fit-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-term, .fit-level {
  padding: 5px 10px; border: 0; border-radius: 4px; background: var(--chip); color: var(--ink-2);
  font: 500 0.875rem/1.3 var(--font); cursor: pointer; transition: background-color 120ms ease-out;
}
.fit-term:hover, .fit-level:hover { color: var(--ink); background: color-mix(in srgb, var(--chip) 70%, var(--line)); }
.fit-term[aria-pressed="true"], .fit-level[aria-pressed="true"] { background: var(--select); color: var(--on-select); }
.fit-term:disabled { opacity: 0.45; cursor: default; }
.fit-note { margin: 0; padding: 12px 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.fit-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px 20px; }
.fit-actions button {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: var(--r-ctl);
  background: var(--panel); color: var(--ink); font: 600 0.9375rem/1 var(--font); cursor: pointer;
}
.fit-actions button:hover { border-color: var(--ink-2); }
.fit-actions .fit-clear { margin-right: auto; }
.fit-actions .fit-save { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fit-actions .fit-save:hover { background: var(--bar); border-color: var(--bar); }
@media (max-width: 640px) {
  .fit-dialog { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: var(--r) var(--r) 0 0; border-bottom: 0; }
  .fit-head, .fit-body, .fit-note, .fit-actions { padding-left: 16px; padding-right: 16px; }
  .fit-lede { margin-left: 16px; margin-right: 16px; }
  .fit-actions .fit-save { flex: 1 1 100%; justify-content: center; order: -1; }
}
@media (prefers-reduced-motion: reduce) { .fit-term, .fit-level { transition: none; } }
@media (forced-colors: active) { .fit-term[aria-pressed="true"], .fit-level[aria-pressed="true"], .fit-open.set { outline: 2px solid Highlight; } }

/* The first-visit tip on "Your skills" (static/fit.js `tip`): once per browser, under the button
   (above it when there's no room), which glows while it shows. */
.fit-tip {
  position: fixed; z-index: 60; width: min(20rem, calc(100vw - 32px)); padding: 14px 16px;
  background: var(--panel); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r); box-shadow: none;
}
.fit-tip::before {
  content: ""; position: absolute; top: -6px; left: calc(var(--arrow-x, 50%) - 6px); width: 10px; height: 10px;
  background: inherit; border: inherit; border-width: 1px 0 0 1px; transform: rotate(45deg);
}
.fit-tip.above::before { top: auto; bottom: -6px; border-width: 0 1px 1px 0; }
.fit-tip-title { margin: 0 0 4px; font: 700 0.9375rem/1.3 var(--font); }
.fit-tip-text { margin: 0 0 12px; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.fit-tip-actions { display: flex; gap: 8px; }
.fit-tip-actions button {
  font: inherit; font-size: 0.8125rem; height: 34px; padding: 0 12px; border-radius: var(--r-ctl); cursor: pointer;
  border: 2px solid var(--line); background: transparent; color: var(--ink-2);
}
.fit-tip-actions .fit-tip-go { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.fit-tip-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fit-glow { box-shadow: 0 0 0 3px color-mix(in srgb, var(--select) 55%, transparent); animation: fit-glow 1.6s ease-in-out 3; }
@keyframes fit-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--select) 55%, transparent); } }
@media (prefers-reduced-motion: reduce) { .fit-glow { animation: none; } }
@media (forced-colors: active) { .fit-tip { border: 1px solid CanvasText; } .fit-glow { outline: 2px solid Highlight; } }
