/* 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; }

/* Left Join: plain and numerate, a query and its result (docs/design/LEFTJOIN.md, from
   Observable's results-with-their-code). Colours and families are tokens from static/brand.css,
   served before this file. No shadows: depth is a hairline and a fill. Every number is mono. */

:root {
  --mono: var(--font-mono);
  --prose: var(--font-prose);
  --r: 4px; --r-cell: 6px;
  --width: 72rem; --measure: 38rem; --gutter: clamp(16px, 3.4vw, 36px);
  --gap: clamp(64px, 8vw, 96px);
}

/* ---------- 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 0.875rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
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; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
h1, h2, h3 { color: var(--ink); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 10px; }
h3 { font-size: 0.9375rem; line-height: 1.35; margin: 24px 0 6px; }
p { margin: 0 0 12px; text-wrap: pretty; }
li, dd { text-wrap: pretty; }
b, strong { font-weight: 700; color: var(--ink); }
code, pre, kbd, .fig { font-family: var(--mono); }
kbd { display: inline-block; min-width: 18px; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; font-size: 0.6875rem; line-height: 1.5; text-align: center; color: var(--ink-2); background: var(--chip); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 30; padding: 8px 12px; border-radius: var(--r); background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { top: 10px; }
main { max-width: var(--width); margin: 0 auto; padding: 36px var(--gutter) 88px; }

/* Syntax: the only colour on the page. */
.kw { color: var(--accent); font-weight: 500; }
.str { color: var(--string); }
.num { color: var(--number); }

/* ---------- masthead and colophon ---------- */

.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead-in { max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); min-height: 56px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; flex: none; }
.masthead-nav { display: flex; gap: 22px; }
.masthead-nav a, .masthead-saved { color: var(--ink-2); text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.masthead-nav a:hover, .masthead-saved:hover { color: var(--ink); }
.masthead-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.masthead-saved { margin-left: auto; }
.masthead-saved[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
/* Alerts and Saved sit together: the pair takes the margin a lone Saved did. */
.masthead-in .masthead-alerts + .masthead-saved { margin-left: -6px; }
.colophon { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; }
.colophon-in { max-width: var(--width); margin: 0 auto; padding: 36px var(--gutter) 52px; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.colophon-about p { margin: 14px 0 0; max-width: 34ch; font-family: var(--prose); font-size: 0.875rem; line-height: 1.55; }
.colophon h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); margin: 0 0 10px; }
.colophon nav { display: flex; flex-direction: column; gap: 7px; }
.colophon nav a { color: var(--ink-2); text-decoration: none; }
.colophon nav a:hover { color: var(--ink); text-decoration: underline; }
.colophon nav a span { color: var(--muted); }

/* ---------- shared parts ---------- */

.tag { display: inline-block; padding: 0 6px; border-radius: var(--r); background: var(--chip); color: var(--ink-2); font: 400 0.75rem/1.65 var(--mono); white-space: nowrap; text-decoration: none; }
a.tag:hover { color: var(--ink); background: var(--accent-soft); }
.tools:not(td) { display: flex; flex-wrap: wrap; gap: 4px; }
td.tools .tag { margin: 1px 4px 1px 0; }
.note { color: var(--muted); font-family: var(--prose); font-size: 0.9375rem; line-height: 1.55; max-width: 62ch; margin: 0; }
.meter { display: inline-block; width: 100%; height: 6px; background: var(--chip); vertical-align: middle; }
.meter > span { display: block; height: 100%; background: var(--bar); }
.btn, .apply, .track button, .track .button {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink); font: 600 0.8125rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.btn:hover, .track button:hover, .track .button:hover { border-color: var(--ink-2); }
.btn.primary, .apply { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover, .apply:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.saved { color: var(--accent); border-color: var(--accent); }

/* Where to work: a country menu and a remote check, as plain form fields (Browse and topic pages). */
.place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 22px; }
.place .select { position: relative; display: inline-flex; }
.place .select:not(:has(.menu))::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 5px; height: 5px; margin-top: -4px; pointer-events: none;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg);
}
.place select {
  height: 34px; max-width: 16rem; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink); font: 600 0.8125rem/1 var(--font); appearance: none; cursor: pointer;
}
.place .menu-btn {
  height: 34px; max-width: 16rem; padding: 0 10px; background: var(--panel); color: var(--ink); font: 600 0.8125rem/1 var(--font);
}
.place .menu-btn.set { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.place select:hover { border-color: var(--ink-2); }
.place select:focus-visible, .place .toggle:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.place .toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); font: 600 0.8125rem/1 var(--font); cursor: pointer;
}
.place .toggle input { accent-color: var(--accent); margin: 0; }
.place .toggle:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.place-clear { color: var(--muted); font-size: 0.8125rem; padding: 0 4px; }

/* Open source: projects as a result table, read from GitHub (docs/SITES.md §2.3). */
.note.lead-in { margin: 4px 0 16px; }
.note.after { margin-top: 16px; }
/* A caption whose filters make it long wraps rather than hiding its end. */
.q.wrap { white-space: normal; overflow-wrap: anywhere; }
.proj-search { display: flex; gap: 8px; max-width: 40rem; margin: 4px 0 4px; }
.proj-search input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 400 0.875rem var(--font); }
.proj-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
a.tag:hover { color: var(--ink); }
.tag.on { background: var(--accent-soft); color: var(--accent); }
.tag .n { color: var(--muted); margin-left: 2px; }
.tag.on .n { color: inherit; }
.result.projects .full, .proj-by .full { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.result.projects td:first-child { min-width: 10rem; overflow-wrap: break-word; }
@media (max-width: 640px) {
  .result.projects .lang, .result.projects .growth { display: none; }
  .result.projects td:first-child { min-width: 8rem; }
}
.result.projects tr.more td { font-size: 0.8125rem; }
.result.projects tr.more a { font-weight: 500; color: var(--accent); }
.result-meta .sorts { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.result-meta .sorts a { color: var(--ink-2); text-decoration: none; }
.result-meta .sorts a[aria-current] { color: var(--accent); text-decoration: underline; }
.cell.flat { margin-top: 8px; }
/* A result under its own filters sits close to them, not a landing section's gap away. */
.cell.results { margin-top: 18px; }
.cell.results .result-meta { margin-top: 0; }
.cell.flat .cell-body { border-bottom: 1px solid var(--line); border-radius: var(--r-cell); }
.facts-table { max-width: 36rem; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-by { margin: 2px 0 14px; }
/* Reporting a wrong or missing project: a ruled box that opens. */
details.report { max-width: 40rem; margin: 28px 0 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-cell); }
details.report summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.report form { display: grid; gap: 12px; margin-top: 12px; font-size: 0.875rem; }
.report fieldset { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.report legend { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.report input[type="radio"] { accent-color: var(--accent); margin: 0 6px 0 0; }
.report select, .report .menu-btn, .report textarea { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px; }
.report textarea { display: block; width: 100%; margin-top: 4px; }
.report .note { font-family: var(--font); font-size: 0.875rem; color: var(--ink-2); }
.report .btn { justify-self: start; }
.report .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice.good { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 8px 12px; }

/* The query line: a result's caption, in code. */
.q {
  margin: 0; padding: 9px 12px; background: var(--chip); border-top: 1px solid var(--line); color: var(--ink-2);
  font: 400 0.8125rem/1.5 var(--mono); overflow-x: auto; white-space: nowrap; scrollbar-width: thin; max-width: none;
}
.q-go { margin-left: 16px; font-family: var(--font); font-weight: 600; }

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

.hero { padding: clamp(16px, 4vw, 48px) 0 0; }
.display { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.04; letter-spacing: -0.03em; max-width: 20ch; margin: 0 0 18px; }
.lede { font-family: var(--prose); font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; margin: 0 0 28px; }
.lede .fig { font-size: 0.9375rem; color: var(--ink); }
.query { border: 1px solid var(--line); border-radius: var(--r-cell); max-width: 56rem; overflow: hidden; }
.query:focus-within { border-color: var(--ink-2); }
.query-fields { display: flex; align-items: stretch; min-height: 58px; }
.query-q, .query-sel { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px; gap: 1px; }
.query-q { flex: 1 1 auto; min-width: 0; }
.query-sel { border-left: 1px solid var(--line); flex: none; position: relative; }
.query-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); }
.query input[type="search"], .query select { border: 0; padding: 0; background: transparent; color: var(--ink); font: 400 1rem/1.4 var(--font); min-width: 0; }
.query input::placeholder { color: var(--muted); }
.query input:focus, .query select:focus { outline: none; }
.query select { appearance: none; padding-right: 18px; cursor: pointer; }
.query-sel .menu { display: flex; }
.query-sel .menu-btn { width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: 400 1rem/1.4 var(--font); }
.query-sel .menu-pop { top: calc(100% + 11px); left: -15px; }
.query-sel:not(:has(.menu))::after { content: ""; position: absolute; right: 16px; bottom: 15px; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.query-q:focus-within .query-label, .query-sel:focus-within .query-label { color: var(--accent); }
.query-remote { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-left: 1px solid var(--line); color: var(--ink-2); cursor: pointer; font-weight: 500; }
.query-remote input { accent-color: var(--accent); margin: 0; }
.query-remote:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.query button { border: 0; padding: 0 22px; background: var(--ink); color: var(--bg); font: 700 0.875rem/1 var(--font); cursor: pointer; }
.query button:hover { background: var(--ink-2); }
.query button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.query-preview { border-top: 1px solid var(--line); }

.cell { margin-top: var(--gap); }
.cell-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 14px; }
.cell-head h2 { margin: 0; }
.cell-body { border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-cell) var(--r-cell) 0 0; }
.cell-body + .q { border: 1px solid var(--line); border-radius: 0 0 var(--r-cell) var(--r-cell); }

/* Results: ruled tables, text left, numbers right and in mono. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: baseline; }
th { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); border-top: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--chip); }
thead + tbody tr:first-child td { border-top: 0; }
td.n, th.n { text-align: right; }
td.n { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
td a { font-weight: 600; text-decoration: none; color: var(--ink); }
td a:hover { color: var(--accent); text-decoration: underline; }
td .sub { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 1px; }
td .sub .org { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
td .sub .org:hover { color: var(--accent); text-decoration-color: currentColor; }
.result td.n .muted { font-size: 0.75rem; margin-left: 4px; }
.count { display: inline-grid; grid-template-columns: 120px auto; gap: 10px; align-items: center; }
.count .meter { width: 120px; }
.stack-line { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); }
.roles-link { font-weight: 500 !important; color: var(--accent) !important; }
.result.roles .fam, .result.roles .place { color: var(--ink-2); white-space: nowrap; }
.result.roles .place { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }

/* The stack map: layers as small result tables. */
.layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0; }
.layer { padding: 14px 16px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.layer h3 { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); }
.layer ul { list-style: none; margin: 0; padding: 0; }
.layer a { display: grid; grid-template-columns: minmax(0, 1fr) 72px 3.5rem; gap: 10px; align-items: center; padding: 4px 0; text-decoration: none; color: var(--ink); }
.layer a:hover .tool { color: var(--accent); text-decoration: underline; }
.layer .tool { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer .fig { font-size: 0.75rem; color: var(--ink-2); text-align: right; }

.account { margin-top: var(--gap); display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-cell); background: var(--chip); }
.account h2 { margin: 0 0 6px; }
.account p { margin: 0; font-family: var(--prose); font-size: 0.9375rem; color: var(--ink-2); max-width: 60ch; }
.account .btn { flex: none; }
.how { margin-top: var(--gap); max-width: var(--measure); }
.how h2 { margin: 0 0 14px; }
.how p { font-family: var(--prose); font-size: 1rem; line-height: 1.65; color: var(--ink-2); }
.how .fig { font-size: 0.875rem; color: var(--ink); }
/* The Resume Workshop (docs/RESUME.md §5.5): its way in is "Tailor my resume" on every role. */
.how.workshop p.q { font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-cell); margin: -4px 0 16px; }
.how.workshop p.workshop-go { margin-top: 20px; }

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

.board-title { margin-bottom: 14px; }
.board-search { display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-cell) var(--r-cell) 0 0; background: var(--panel); font-family: var(--mono); }
.board-search:focus-within { border-color: var(--ink-2); }
.board-search .kw { flex: none; font-size: 0.8125rem; }
.board-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--ink); font: 400 1rem var(--font); }
.board-search input:focus { outline: none; }
.board-search input::placeholder { color: var(--muted); }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-cell) var(--r-cell); background: var(--chip); font-family: var(--mono); font-size: 0.8125rem; }
.where-kw { flex: none; }
.clauses { display: contents; list-style: none; }
.clause { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.clause > span:not(.kw) { display: inline-flex; gap: 6px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--panel); }
.clause.none { color: var(--muted); }
.clause button { height: 24px; margin-left: -6px; padding: 0 7px; border: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; background: var(--panel); color: var(--muted); font: inherit; cursor: pointer; }
.clause button:hover { color: var(--bad); }
.add { position: relative; }
.add-btn { height: 26px; padding: 0 9px; border: 1px dashed var(--muted); border-radius: var(--r); background: transparent; color: var(--ink-2); font: 500 0.8125rem/1 var(--font); cursor: pointer; }
.add-btn:hover, .add-btn[aria-expanded="true"] { border-style: solid; color: var(--ink); }
.add-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; gap: 10px; width: min(20rem, calc(100vw - 32px)); padding: 14px; border: 1px solid var(--ink-2); border-radius: var(--r-cell); background: var(--panel); font-family: var(--font); }
.add-menu[hidden] { display: none; }
.field { display: grid; gap: 3px; min-width: 0; }
.field-name { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
/* Menus (static/menu.js): Left Join's list is ruled, never shadowed, its counts in mono. */
.menu-btn { border-radius: var(--r); font-family: var(--font); }
.menu-btn:hover, .menu.open .menu-btn { border-color: var(--ink-2); }
.menu-pop { padding: 4px; border: 1px solid var(--ink-2); border-radius: var(--r); background: var(--panel); }
.menu-pop input { border-radius: var(--r); font-size: 0.8125rem; }
.opt { gap: 12px; padding: 5px 8px; border-radius: 3px; font-size: 0.8125rem; }
.opt .n { font-family: var(--mono); }
/* In the "+ Add filter" panel each field's menu fills its row, and a chosen value takes the
   active clause's fill. */
.field .menu { display: flex; min-width: 0; }
.field .menu-btn { width: 100%; height: 32px; padding: 0 9px; background: var(--bg); color: var(--ink-2); font-size: 0.875rem; }
.field .menu-pop { right: 0; }
.field .menu-btn.set { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.field .menu-btn.set .menu-chev { color: var(--accent); }
/* Remote only, States pay and Founding role: always on the WHERE line. */
.toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; font-family: var(--font); }
.toggles .toggle { height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font: 500 0.8125rem/1 var(--font); cursor: pointer; }
.toggles .toggle:hover { border-color: var(--muted); color: var(--ink); }
.toggles .toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.toggles .toggle[aria-pressed="true"]::before { content: "✓ "; }
.result-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 16px 0 8px; color: var(--ink-2); }
.result-meta .fig { color: var(--ink); }
.board-table th { position: sticky; top: 0; }
.board-table th .sort { all: unset; cursor: pointer; }
.board-table th .sort:hover, .board-table th .sort.on { color: var(--ink); }
.board-table th .sort.on::after { content: " ↓"; }
.board-table th .sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.board-table { border: 1px solid var(--line); }
.board-table .c-fam, .board-table .c-where { color: var(--ink-2); white-space: nowrap; }
.board-table .c-where { max-width: 13rem; overflow: hidden; text-overflow: ellipsis; }
.board-table .c-save { width: 40px; padding-left: 0; padding-right: 4px; text-align: right; }
.board-table .c-save .row-save { vertical-align: middle; }
.board-table .role[aria-expanded="true"] { color: var(--accent); }
tr.row:hover td { background: color-mix(in srgb, var(--chip) 55%, transparent); }
tr.row.open td { background: var(--chip); }
tr.detail td { padding: 0; border-top: 0; background: var(--chip); }
.detail-in { padding: 4px 12px 18px; display: grid; gap: 12px; max-width: 60rem; }
.detail-in .facts { margin: 0; }
.excerpt { font-family: var(--prose); font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); max-width: 70ch; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rows[aria-busy="true"], #rows[aria-busy="true"] { opacity: 0.55; }
/* A query past 3 seconds (jobs.js): placeholder rows in the table's own columns, bars in --line.
   Nothing moves: the bars only step between --line and --chip, row after row, and hold still
   with reduced motion. No gradients. */
.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; }
.bone { display: block; max-width: 100%; height: 9px; border-radius: 2px; background: var(--line); }
.bone-title { height: 12px; margin: 3px 0 7px; }
.bone-tag { display: inline-block; height: 16px; margin: 1px 4px 1px 0; vertical-align: middle; }
td.n .bone { margin-left: auto; }
.rows-wait td:first-child .bone { max-width: 55vw; }
@media (prefers-reduced-motion: no-preference) {
  .rows-wait .bone { animation: wait 1.6s ease-in-out calc(var(--i) * 120ms) infinite; }
}
@keyframes wait { 50% { background: var(--chip); } }
.empty { padding: 32px 12px; color: var(--muted); text-align: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 20px 0 0; }
.pager button { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 500 0.8125rem var(--font); cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--ink-2); }
.pager button:disabled { opacity: 0.45; cursor: default; }
.pager .fig { color: var(--muted); font-size: 0.75rem; }
.board-keys { margin: 18px 0 0; color: var(--muted); font-size: 0.75rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 12px); padding: 10px 14px; border: 1px solid var(--ink-2); border-radius: var(--r); background: var(--panel); color: var(--ink); font-size: 0.8125rem; opacity: 0; pointer-events: none; transition: opacity 120ms ease, transform 120ms ease; }
/* 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 { font-size: 0.8125rem; color: var(--muted); margin-bottom: 12px; font-family: var(--mono); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
main > h1 + .muted, main > h1 + p.muted { font-family: var(--prose); color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; max-width: 60ch; }
main > h1 + div.muted { font-size: 0.875rem; }
/* 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 { font-family: var(--prose); color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; max-width: 60ch; }
main > .topic-about + p.muted { font-size: 0.875rem; }
main p, main > details { max-width: 68ch; }
main p.small { max-width: 62ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); margin: 20px 0; border: 1px solid var(--line); border-radius: var(--r-cell); overflow: hidden; }
.facts > div { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; margin-right: -1px; }
.facts .l, .facts dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; }
.facts > div, .facts strong { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; }
.facts > div:has(.salary) { grid-column: span 2; }
.detail-in .facts { background: var(--panel); }
tr.row.open .tag, .detail-in .tag { background: var(--panel); border: 1px solid var(--line); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.chip { display: inline-block; padding: 0 6px; border-radius: var(--r); background: var(--chip); color: var(--ink-2); font: 400 0.75rem/1.65 var(--mono); text-decoration: none; }
.chip a { color: inherit; text-decoration: none; }
a.chip:hover, .chip a:hover { color: var(--accent); }
.chip.ai { color: var(--accent); background: var(--accent-soft); }
.chip .n { color: var(--muted); font-size: 0.6875rem; }
.salary { font-family: var(--mono); color: var(--ink); }
.apply { margin: 16px 0 8px; }
.track { display: inline-block; margin: 16px 0 8px 8px; vertical-align: top; }
.notice { border: 1px solid var(--warn); padding: 10px 14px; border-radius: var(--r); margin: 16px 0; max-width: 68ch; color: var(--ink); }
.description { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--prose); font-size: 1rem; line-height: 1.65; color: var(--ink-2); max-width: 44rem; }
.description p, .description ul { margin: 0 0 12px; }
.description ul { padding-left: 20px; }
ul.roles { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-cell); }
ul.roles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: baseline; padding: 9px 12px; border-top: 1px solid var(--line); }
ul.roles li:first-child { border-top: 0; }
ul.roles li:hover { background: color-mix(in srgb, var(--chip) 55%, transparent); }
ul.roles .t { font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
ul.roles .t:hover { color: var(--accent); text-decoration: underline; }
ul.roles .m { color: var(--muted); font-size: 0.8125rem; }
ul.roles .r { color: var(--ink-2); font-family: var(--mono); font-size: 0.75rem; text-align: right; white-space: nowrap; }
.links { columns: 3 13rem; column-gap: 28px; }
.links a { display: block; padding: 3px 0; break-inside: avoid; color: var(--ink); text-decoration: none; }
.links a:hover { color: var(--accent); text-decoration: underline; }
.links .muted { font-family: var(--mono); font-size: 0.75rem; }
/* An employer's pipeline above its stack, set as a clause: pipeline = 'Snowflake + dbt'. */
.company-tag { margin: 8px 0 16px; }
.tag-line { display: inline-block; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--chip); font: 400 0.8125rem/1.5 var(--mono); overflow-wrap: anywhere; }
.tag-label { color: var(--accent); font-weight: 500; }
.tag-detail { color: var(--string); }
.tag-label::after { content: " = "; color: var(--ink-2); font-weight: 400; }
.tag-detail::before, .tag-detail::after { content: "'"; }
.company-tag p { margin: 8px 0 0; max-width: 62ch; }
.stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 14px 28px; margin: 12px 0; }
.stack-group .l { font-size: 0.6875rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 0.8125rem; }
details ul { color: var(--ink-2); font-size: 0.8125rem; }
main > table, main > .table-wrap { margin: 8px 0 16px; border: 1px solid var(--line); }
table.pay { max-width: 48rem; border: 1px solid var(--line); }
table.pay tr.all td { font-weight: 700; }
.page-head + .tabs, .tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 14px; }

/* Text pages (methodology): a reading column in Literata. */
.prose { max-width: var(--measure); font-family: var(--prose); font-size: 1rem; line-height: 1.65; color: var(--ink-2); }
.prose h1, .prose h2, .prose h3 { font-family: var(--font); }
.prose h2 { margin-top: 40px; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin-bottom: 5px; }
.prose code { padding: 1px 4px; border-radius: 3px; background: var(--chip); color: var(--ink); font-size: 0.8125rem; }
.prose pre { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); 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-family: var(--font); font-size: 0.8125rem; border: 1px solid var(--line); margin: 14px 0 18px; }

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


/* "Near you": a country suggested from the visitor's time zone (static/near.js). */
.near { margin: 12px 0 0; max-width: 56rem; font-family: var(--prose); font-size: 0.9375rem; color: var(--ink-2); }
.near a { font-weight: 600; }
.near-why { color: var(--muted); }
/* The board's note when it starts on the visitor's country. */
.near-board { color: var(--ink-2); }
.near-board button { white-space: nowrap; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.near-board button:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .query-fields { flex-wrap: wrap; }
  .query-q { flex: 1 1 100%; border-bottom: 1px solid var(--line); min-height: 58px; }
  .query-sel { flex: 1 1 auto; border-left: 0; min-height: 52px; }
  .query-remote { min-height: 52px; }
  .query button { min-height: 52px; }
  .colophon-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colophon-about { grid-column: 1 / -1; }
  .board-table .c-tools, .result.roles th:nth-child(3), .result.roles td:nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  main { padding-top: 24px; }
  .masthead-in { gap: 6px 20px; padding-top: 10px; padding-bottom: 8px; }
  .masthead-nav { order: 3; width: 100%; gap: 18px; }
  .query-remote { flex: 1 1 auto; border-left: 1px solid var(--line); }
  .query button { flex: 1 1 100%; }
  .count { grid-template-columns: auto; }
  .count .meter { display: none; }
  .result td.n .muted { display: none; }
  .board-table .c-save { width: 36px; padding: 0 2px 0 0; }
  .board-table .c-save .row-save { width: 36px; }
  .board-table .c-fam, .board-table .c-where, .result.roles .fam, .result.roles .place,
  .board-table th:nth-child(2), .board-table th:nth-child(4), .result.roles th:nth-child(2), .result.roles th:nth-child(4) { display: none; }
  .board-keys { display: none; }
  .toggles { flex-basis: 100%; margin-left: 0; }
  .account { flex-direction: column; align-items: flex-start; }
  ul.roles li { grid-template-columns: minmax(0, 1fr); }
  ul.roles .r { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
/* ---------- the sponsored box (docs/SPONSORED-PLAN.md §3) ----------
   A cell of its own above the results, captioned in words: no query produced it, so it shows
   none. */
.sponsored { margin: 18px 0 0; }
.sponsored-label { margin: 0 0 6px; color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.sponsored-body { border-bottom: 0; }
.sponsored-link { display: flex; align-items: center; justify-content: space-between; gap: 6px 24px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.sponsored-link:hover .sponsored-title { text-decoration: underline; text-underline-offset: 3px; }
.sponsored-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sponsored-title { font-weight: 600; overflow-wrap: anywhere; }
.sponsored-meta { color: var(--ink-2); font-size: 0.875rem; }
.sponsored-line { color: var(--ink-2); font: 400 0.9375rem/1.5 var(--prose); }
.sponsored-side { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; flex: none; }
.sponsored-pay { font: 400 0.875rem var(--mono); color: var(--ink); }
.sponsored-q { border: 1px solid var(--line); border-radius: 0 0 var(--r-cell) var(--r-cell); font-family: var(--font); white-space: normal; }
/* "Why this?" opens in place (templates/sponsored_why.html): the line under the box is the toggle. */
.sponsored-about > summary { list-style: none; cursor: pointer; }
.sponsored-about > summary::-webkit-details-marker { display: none; }
.sponsored-why { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.sponsored-about > summary:hover .sponsored-why, .sponsored-about[open] .sponsored-why { text-decoration-color: currentColor; }
.sponsored-about[open] > .sponsored-q { border-radius: 0; }
.sponsored-explain { margin: 0; padding: 8px 12px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-cell) var(--r-cell); color: var(--ink-2); font: 400 0.8125rem/1.5 var(--font); }
.sponsored-explain p { margin: 0 0 4px; max-width: 60ch; }
@media (max-width: 640px) {
  .sponsored-link { flex-direction: column; align-items: flex-start; }
}

@media (forced-colors: active) {
  .meter > span { background: CanvasText; }
}
.spark { display: block; vertical-align: middle; }
.insight-nav a { margin-right: 14px; }
.bar, .range { display: block; vertical-align: middle; }
table.pay.kinds { max-width: none; }
.scroll { overflow-x: auto; }
/* The LinkedIn export walkthrough. */
.li-steps { margin: 0 0 16px; padding-left: 1.4em; max-width: 44rem; }
.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; }

/* 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); background: var(--panel); 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; }

/* Company pages: open roles under their families (pages::role_sections). */
.sect-jump { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; font-size: 0.875rem; }
.sect-jump a { color: var(--ink-2); text-decoration: none; }
.sect-jump a:hover { color: var(--ink); text-decoration: underline; }
.sect-jump .px, .role-sect .px { font-family: var(--mono); color: var(--muted); font-size: 0.75rem; }

/* ---------- buying a sponsored box (docs/SPONSORED-PLAN.md §6) ----------
   Ruled like the rest of the site: hairlines, no shadows; numbers in mono. The chosen week
   takes the join green. */
.buy { max-width: 64rem; }
.buy-about, .buy-pay-page { max-width: var(--measure); }
.buy-crumb { margin: 0 0 10px; font-size: 0.8125rem; }
.buy-crumb a { color: var(--ink-2); }
.buy h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.buy-lede { font-family: var(--prose); font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; margin: 0 0 24px; }
.buy-lede a { color: var(--accent); }
.buy-error { margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--bad); border-radius: var(--r); color: var(--ink); max-width: 62ch; }
.buy-none { color: var(--muted); font-family: var(--prose); margin: 8px 0 16px; }
.buy-hint { color: var(--muted); font-size: 0.8125rem; line-height: 1.5; margin: 6px 0 0; max-width: 62ch; }
.buy-label { display: block; margin: 0 0 6px; color: var(--ink); font-size: 0.75rem; font-weight: 600; }
.buy-optional { color: var(--muted); font-weight: 400; }
.buy input[type="search"], .buy input[type="text"] {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); color: var(--ink); font: 400 0.9375rem var(--font);
}
.buy input[type="search"]:focus-visible, .buy input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.buy-search { max-width: 36rem; margin: 0 0 20px; }
.buy-search label { display: block; margin: 0 0 6px; font-size: 0.75rem; font-weight: 600; }
.buy-search-row { display: flex; gap: 8px; }
.buy-employers { list-style: none; margin: 10px 0 0; padding: 0; max-width: 36rem; border: 1px solid var(--line); border-radius: var(--r-cell); }
.buy-employers li + li { border-top: 1px solid var(--line); }
.buy-employers a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; color: var(--ink); text-decoration: none; }
.buy-employers a:hover .buy-employer { text-decoration: underline; text-underline-offset: 3px; }
.buy-employer { font-weight: 600; }
.buy-n { color: var(--ink-2); font: 400 0.8125rem var(--mono); white-space: nowrap; }
.buy-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 32px 48px; align-items: start; }
.buy-field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.buy-field .menu-btn, .buy-field select { max-width: 100%; height: 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font-size: 0.875rem; }
.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(7.5rem, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.buy-week { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.buy-week input { position: absolute; opacity: 0; pointer-events: none; }
.buy-week:hover .buy-week-day { text-decoration: underline; text-underline-offset: 3px; }
.buy-week:has(input:checked) { background: var(--accent-soft); outline: 1px solid var(--accent); outline-offset: -1px; }
.buy-week:has(input:checked) .buy-week-day { color: var(--accent); }
.buy-week:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.buy-week-day { color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.buy-week-room { color: var(--ink-2); font: 400 0.75rem var(--mono); }
.buy-week.full { cursor: default; background: var(--chip); }
.buy-week.full .buy-week-day, .buy-week.full .buy-week-room { color: var(--muted); text-decoration: none; }
.buy-side { position: sticky; top: 20px; }
.buy .sponsored { margin: 0; font-family: var(--font); }
.buy .sponsored-link { color: var(--ink); text-decoration: none; }
.buy .sponsored-q a { color: var(--accent); }
.buy-example { margin: 24px 0 8px; }
.buy-example figcaption { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }
.buy-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 20px 0 12px; color: var(--ink); font-weight: 600; }
.buy-total .fig { font: 400 1.25rem var(--mono); }
.buy-total .buy-hint { margin: 0; flex-basis: 100%; font-weight: 400; }
.buy-pay { width: 100%; justify-content: center; height: 40px; }
.buy-go { margin: 20px 0 8px; }
.buy-closed { color: var(--muted); }
.buy table.buy-facts { max-width: min(40rem, 100%); }
.buy .buy-facts { border: 1px solid var(--line); }
.buy-facts th[scope="row"] { width: 8rem; background: var(--chip); }
.buy-facts td { color: var(--ink-2); font-family: var(--font); }
.buy-facts td a { color: var(--accent); }
.buy-counts, .buy-list, .buy-views, .buy-weeks-table { max-width: min(44rem, 100%); border: 1px solid var(--line); }
.buy-counts td.n, .buy-views td.n { font-family: var(--mono); }
.buy-counts tr.all td, .buy-counts tr.all th { font-weight: 700; color: var(--ink); }
.buy-weeks-table tr.full td { color: var(--muted); }
.buy-list th[scope="row"] { background: none; color: var(--ink); }
.buy-list th[scope="row"] a { color: var(--accent); font: 400 0.8125rem var(--mono); }
.buy-state { color: var(--ink-2); font: 400 0.75rem var(--mono); }
h1 .buy-state { padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r); font-size: 0.8125rem; }
.buy-state.live { color: var(--accent); border-color: var(--accent); }
.buy-state.rejected, .buy-state.cancelled { color: var(--muted); }
.buy-reason { margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--line); background: var(--chip); color: var(--ink-2); max-width: 62ch; font-family: var(--prose); }
.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 ruled cell on job and
   topic pages, a line in the colophon, and its own page at /digest. Email only. */
.digest { margin: 28px 0 8px; padding: 16px; max-width: 38rem; border: 1px solid var(--line); border-radius: var(--r); }
.digest-h { margin: 0; font: 600 0.9375rem/1.3 var(--font); color: var(--ink); }
.digest-what { margin: 4px 0 12px; font: 400 0.875rem/1.5 var(--prose); 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: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); color: var(--ink); font: 400 0.9375rem var(--font);
}
.digest input::placeholder { color: var(--muted); }
.digest input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.digest button, .digest-act button {
  height: 34px; padding: 0 13px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--ink); color: var(--bg);
  font: 600 0.8125rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: background-color 120ms ease, border-color 120ms ease;
}
.digest button:hover, .digest-act button:hover { background: var(--ink-2); border-color: var(--ink-2); }
.digest .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.digest-foot { margin: 18px 0 0; padding: 0; border: 0; max-width: 34ch; }
.digest-foot .digest-what { font-size: 0.8125rem; }
.digest-page { max-width: var(--measure); }
.digest-page .digest { margin-top: 20px; }
.digest-lead { font: 400 1.0625rem/1.6 var(--prose); 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: keep it a full touch target. */
  .digest input[type="email"] { flex: none; height: 44px; }
  .digest button { align-self: flex-start; height: 44px; }
}

/* 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 0.9375rem/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: 4px; 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); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- the board's job alert (templates/alert_macros.html `cta` and `dialog`, static/job_alert.js) ----------
   A scheduled query: the board's one filled button, at the end of the result line, names the
   alert and what the past week returned. It opens a cell: the search as the query an alert runs,
   that week's rows as a small result, then how often and where. Asked for already (in this
   browser), it steps back to an outlined button. */
.alert-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; margin-left: auto; padding: 0 6px 0 10px;
  border: 1px solid var(--ink); border-radius: var(--r); background: var(--ink); color: var(--bg);
  font: 600 0.8125rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: background-color 120ms ease, border-color 120ms ease;
}
.alert-cta:hover { background: var(--ink-2); border-color: var(--ink-2); }
.alert-cta-fig { padding-left: 8px; border-left: 1px solid color-mix(in srgb, var(--bg) 35%, var(--ink)); font: 400 0.75rem var(--mono); }
.alert-cta kbd { border-color: color-mix(in srgb, var(--bg) 35%, var(--ink)); 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); }
.result-meta .fig.alert-cta-fig { color: inherit; }
/* Under the results: a ruled line, like the table's footer. */
.alert-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.alert-nudge p { margin: 0; max-width: 40rem; font: 400 0.9375rem/1.5 var(--prose); }
.alert-nudge .fig { color: var(--ink); font-size: 0.875rem; }
.alert-nudge kbd { margin-left: 4px; }
.alert-nudge[hidden] { display: none; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.alert-dialog {
  width: min(34rem, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: var(--r-cell);
  background: var(--panel); color: var(--ink); overflow-y: auto;
}
.alert-dialog::backdrop { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.alert-dialog [hidden] { display: none; }
.alert-close {
  position: absolute; top: 16px; right: 16px; height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--chip); color: var(--ink-2); font: 400 0.6875rem var(--mono); cursor: pointer;
}
.alert-close:hover { border-color: var(--ink-2); color: var(--ink); }
.alert-kind { margin: 0 64px 4px 0; color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.alert-dialog h2 { margin: 0 64px 12px 0; font-size: 1.25rem; }
.alert-dialog h2:focus { outline: none; }
/* The search as the alert's query, on the query line's chip, as a cell's caption is. */
.alert-caption { margin: 0 0 14px; padding: 8px 10px; border-radius: var(--r); background: var(--chip); color: var(--ink); font: 400 0.8125rem/1.5 var(--mono); overflow-wrap: anywhere; }
.alert-proof { margin: 0 0 14px; color: var(--ink-2); font: 400 0.9375rem/1.55 var(--prose); }
.alert-proof .fig { color: var(--ink); font-size: 0.875rem; }
.alert-sample { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.alert-sample li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 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: 8px; margin: 0 0 16px; }
.alert-dialog .alert-often legend { margin-bottom: 6px; color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.alert-dialog .alert-often label {
  position: relative; display: block; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--muted); font-size: 0.8125rem; line-height: 1.4; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease;
}
.alert-dialog .alert-often label:hover { border-color: var(--muted); }
.alert-dialog .alert-often b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.alert-dialog .alert-often input { position: absolute; opacity: 0; pointer-events: none; }
.alert-dialog .alert-often label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.alert-dialog .alert-often label:has(input:checked) b { color: var(--accent); }
.alert-dialog .alert-often label:has(input:checked) b::before { content: "✓ "; }
.alert-dialog .alert-often label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert-label { display: block; margin-bottom: 6px; color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.alert-row { display: flex; gap: 8px; }
.alert-row input {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink); font: 400 0.875rem var(--font);
}
.alert-row input::placeholder { color: var(--muted); }
.alert-row .btn { flex: none; height: 36px; }
.alert-row .btn:disabled { opacity: 0.6; cursor: default; }
.alert-error { margin: 10px 0 0; color: var(--bad); font-size: 0.8125rem; }
.alert-fine { margin: 12px 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.alert-sent .btn { margin-top: 18px; }
.alert-dialog .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) {
  .alert-cta { margin-left: 0; height: 36px; }
  .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-cell) var(--r-cell) 0 0; max-height: 90vh; }
  .alert-row { flex-direction: column; }
  .alert-row input, .alert-row .btn { flex: none; height: 44px; justify-content: center; }
  .alert-nudge .btn { height: 40px; }
}

/* ---------- query history ----------
   The clock at the end of the search line, or H, opens the reader's past searches
   (static/search_history.js; structure in static/brand.css) as a cell: each search the WHERE line
   it ran, in mono with its keywords and strings coloured, ruled like a result's rows. 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: 30px; height: 30px; margin-right: -4px; border-radius: var(--r); }
.history-note { color: var(--ink-2); }
.history-note button.link { font-weight: 600; text-decoration: none; }
.history-note button.link:hover { text-decoration: underline; }
.sh { width: min(38rem, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--r-cell); background: var(--panel); }
.sh::backdrop { background: color-mix(in srgb, var(--ink) 22%, transparent); }
.sh-head { padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.sh-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.sh-close {
  height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--chip); color: var(--ink-2); font: 400 0.6875rem var(--mono);
}
.sh-close:hover { border-color: var(--ink-2); color: var(--ink); }
.sh-clear { color: var(--accent); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.sh-clear:hover { color: var(--accent); text-decoration: underline; }
.sh-group { padding: 10px 18px 6px; border-bottom: 1px solid var(--line); background: var(--chip); color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.sh-list { padding: 0; }
.sh-item { border-bottom: 1px solid var(--line); }
.sh-use { min-height: 44px; padding: 10px 48px 10px 18px; transition: background-color 120ms ease-out; }
.sh-use:hover { background: var(--chip); }
.sh-use:focus-visible { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.sh-query { color: var(--ink); font: 400 0.8125rem/1.55 var(--mono); overflow-wrap: anywhere; }
.sh-when { font: 400 0.75rem/1.4 var(--mono); }
.sh-del { right: 10px; border-radius: var(--r); font-family: var(--mono); font-size: 0.875rem; }
.sh-empty { padding: 18px 18px 22px; font: 400 0.9375rem/1.55 var(--prose); }
.sh-empty .sh-empty-title { font-family: var(--font); font-size: 0.9375rem; font-weight: 700; }
.sh-foot { padding: 10px 18px; background: var(--chip); font: 400 0.75rem/1.5 var(--mono); }
.sh-where a { color: var(--accent); }
@media (max-width: 760px) { .sh { border-width: 1px 0 0; border-radius: var(--r-cell) var(--r-cell) 0 0; } }

/* ---------- your skills (static/fit.js) ----------
   "Your skills" sits with the WHERE line's toggles; set, it takes the active clause's fill.
   "Best for you" is a toggle that orders the result by fit (ORDER BY fit). A matching row says
   how many of its skills the reader has in its sub-line, and their tools are marked in green.
   The picker is a cell like the job alert's: ruled groups of mono tags, the picked ones the
   active clause's fill with a ✓; a bottom sheet on phones. No shadows. */
.toggles .fit-open {
  height: 26px; padding: 0 9px; border: 1px dashed var(--muted); border-radius: var(--r); background: transparent;
  color: var(--ink-2); font: 500 0.8125rem/1 var(--font); cursor: pointer;
}
.toggles .fit-open:hover { border-style: solid; color: var(--ink); }
.toggles .fit-open.set { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.toggles .fit-open .fig { font: 400 0.75rem/1 var(--mono); margin-left: 2px; }
.toggles .fit-open:focus-visible, .toggles .toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
td .sub .r-fit { color: var(--ink-2); }
td .sub .r-fit .fig { color: var(--accent); font-family: var(--mono); font-size: 0.75rem; }
.tag.mine, tr.row.open .tag.mine, .detail-in .tag.mine { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.fit-dialog {
  width: min(40rem, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-cell);
  background: var(--panel); color: var(--ink);
}
.fit-dialog[open] { display: flex; }
.fit-dialog::backdrop { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.fit-form { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
.fit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.fit-head h2 { margin: 0; font-size: 1.25rem; }
.fit-count { color: var(--ink-2); font: 400 0.75rem/1.4 var(--mono); }
.fit-lede { margin: 6px 24px 14px; max-width: 34rem; color: var(--ink-2); font: 400 0.9375rem/1.55 var(--prose); }
.fit-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 24px; border-top: 1px solid var(--line); }
.fit-group { margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); }
.fit-group:last-child { border-bottom: 0; }
.fit-group legend { padding: 0 0 8px; color: var(--ink-2); font: 600 0.75rem/1.4 var(--font); }
.fit-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-term, .fit-level {
  padding: 1px 7px; border: 1px solid var(--line); border-radius: var(--r); background: var(--chip); color: var(--ink-2);
  font: 400 0.8125rem/1.6 var(--mono); cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease;
}
.fit-term:hover, .fit-level:hover { border-color: var(--muted); color: var(--ink); }
.fit-term:focus-visible, .fit-level:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fit-term[aria-pressed="true"], .fit-level[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fit-term[aria-pressed="true"]::before, .fit-level[aria-pressed="true"]::before { content: "✓ "; }
.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.75rem; line-height: 1.5; }
.fit-actions { display: flex; gap: 8px; padding: 12px 24px 24px; }
.fit-actions button {
  height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--ink);
  font: 500 0.875rem/1 var(--font); cursor: pointer;
}
.fit-actions button:hover { border-color: var(--ink-2); }
.fit-actions .fit-clear { margin-right: auto; color: var(--ink-2); }
.fit-actions .fit-save { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fit-actions .fit-save:hover { background: var(--ink-2); border-color: var(--ink-2); }
.fit-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .fit-dialog { width: 100%; max-width: none; margin: auto 0 0; border-width: 1px 0 0; border-radius: var(--r-cell) var(--r-cell) 0 0; max-height: 90vh; }
  .fit-head, .fit-body, .fit-note { padding-left: 16px; padding-right: 16px; }
  .fit-lede { margin-left: 16px; margin-right: 16px; }
  .fit-actions { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
  .fit-actions button { height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .fit-term, .fit-level { transition: none; } }

/* 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: 1px solid var(--line); border-radius: var(--r-cell);
}
.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: 600 0.875rem/1.35 var(--font, inherit); }
.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: 30px; padding: 0 12px; border-radius: var(--r-cell); cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
}
.fit-tip-actions .fit-tip-go { border-color: transparent; background: var(--ink); color: var(--bg); }
.fit-tip-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Left Join draws no shadows: the glow is an outline. */
.fit-glow { outline: 2px solid var(--accent); outline-offset: 2px; animation: fit-glow 1.6s ease-in-out 3; }
@keyframes fit-glow { 50% { outline-offset: 5px; } }
@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; } }
