/* job-radar — calibration
   Palette and component patterns from the Frame Slicer design system
   (jorgeverlindo.design) — warm brown, rounded cards, serif headings.
   Macklin font files copied from that project's public/fonts/ (source
   project untouched) at the user's explicit request. */

/* Macklin Text ships here as two faces and only two: Light and Regular.
   Nothing asks it for a weight it does not have any more -- a title takes
   the heavier of the two and everything else takes the lighter. Asking for
   600 got a bold the browser invented by thickening the Regular, which
   Chrome does discreetly and Safari does not: the same headings came out
   smeared and heavy there. A typeface with no bold does not get one by
   being asked louder. */
@font-face {
  font-family: 'Macklin Text';
  src: url('/static/fonts/MacklinText-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Macklin Text';
  src: url('/static/fonts/MacklinText-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
/* Single source for normal-style 'Macklin Sans' -- there used to be a
   second, static Regular.otf @font-face here at the same weight (400),
   competing with this one for every normal-style request in a way the
   browser doesn't resolve consistently. Body text asks this file for 300
   directly (see body{} below) instead of landing on whichever of the two
   files won the tie. */
@font-face {
  font-family: 'Macklin Sans';
  src: url('/static/fonts/MacklinSans-Variable.ttf') format('truetype');
  /* The file's own wght axis, read out of its fvar table: 1 to 795. It said
     100 900 here, which is a range the font does not have -- browsers then
     clamp on their own terms rather than on ours, and they do not all clamp
     the same way. */
  font-weight: 1 795;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Macklin Sans';
  src: url('/static/fonts/MacklinSans-LightItalic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

:root {
  --brand: rgb(70, 67, 62);
  --brand-hover: rgb(52, 50, 46);
  --brand-active: rgb(36, 34, 32);
  --brand-tint: rgb(245, 242, 237);
  --brand-06: rgba(70, 67, 62, 0.06);
  --brand-10: rgba(70, 67, 62, 0.1);
  --brand-18: rgba(70, 67, 62, 0.18);
  --brand-35: rgba(70, 67, 62, 0.35);

  --app-bg: rgb(247, 240, 235);
  --white: rgb(245, 242, 237);

  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.67);
  --text-placeholder: rgba(0, 0, 0, 0.4);
  --text-muted: rgba(0, 0, 0, 0.5);

  --gray-50: rgba(70, 67, 62, 0.05);
  --gray-100: rgba(70, 67, 62, 0.07);
  --gray-150: rgba(70, 67, 62, 0.11);
  --gray-border: rgba(70, 67, 62, 0.18);

  --border: rgba(0, 0, 0, 0.1);
  /* /Stroke D in the design system. --border at 0.1 disappears on anything
     that is not flat against the page. */
  --border-strong: rgba(0, 0, 0, 0.3);

  /* Selected text. #46433E on #F5F2ED is what the site uses -- /Primary-brown
     on /Portfolio-card -- and the dark pair is the same two roles in their
     dark values, /Primary-brown D on /BG. */
  --selection-bg: rgb(70, 67, 62);
  --selection-ink: rgb(245, 242, 237);
  /* /Shadow in the design system is rgba(70,67,62,.25) light and
     rgba(28,27,26,.25) dark -- this is that colour, at the two depths the
     app uses. */
  --shadow-xs: 0px 2px 4px 0px rgba(70, 67, 62, 0.12);
  --shadow-sm: 0 2px 8px rgba(70, 67, 62, 0.25);
  --shadow-brand-soft: 0 4px 16px rgba(70, 67, 62, 0.18);
  /* Same orange already used for tracked-company map pins/tags (--map-pin-company)
     -- reused here so keyboard focus reads as one deliberate accent, not a second
     unrelated color, and never blue (this app has no blue anywhere else). */
  --focus-ring: #e67e22;

  /* Success and error come from the Framer project's own state styles
     (/color-success-label, /color-success-bg, /color-error-label,
     /color-error-bg) instead of the Material greens and reds that were
     here, which belonged to no system this project uses. Both carry a dark
     value too, which the old ones did not. */
  --success-bg: rgb(236, 238, 225);
  --success-fg: rgb(123, 150, 83);
  --success-icon: rgb(123, 150, 83);
  --success-body: rgb(92, 84, 77);
  --map-pin-company: #e67e22;
  --destructive: rgb(150, 80, 63);
  --destructive-bg: rgb(243, 227, 222);
  --destructive-border: rgba(150, 80, 63, 0.25);
  --destructive-body: rgb(92, 84, 77);
  /* Darkened from #9a6a00, which only reached 3.82:1 against the page --
     under the 4.5:1 that text this size needs. This is 5.5:1. */
  --warn: #7a5400;
  --warn-bg: rgba(122, 84, 0, 0.08);
  --warn-border: rgba(122, 84, 0, 0.25);

  /* ── Resume accents ──────────────────────────────────────────────────
     Not app colours. These are the six a user can pick for their own
     printed resume, and they live here so the picker is built from tokens
     like everything else -- but they are deliberately outside the light/
     dark sets below and never flip with the theme, because the paper they
     sit on is always white. Measured against that paper: Teal is the
     tightest at 7.58:1 and Navy the widest at 11.5:1, so every preset
     clears 4.5:1 with room. A custom colour is checked at pick time. */
  --resume-accent-navy: #1E3A5F;
  --resume-accent-teal: #0F5E5A;
  --resume-accent-forest: #2F5233;
  --resume-accent-burgundy: #7A2436;
  --resume-accent-plum: #4B2E5C;
  --resume-accent-graphite: #3A3F44;

  /* The rest of the resume sector. The four typefaces are here because the
     app chrome has to show them too -- the template thumbnails are drawn in
     them -- and a font stack written out twice is a font stack that drifts.
     The paper colours are the same: fixed, never themed, because what they
     describe is a sheet of white paper. resume.css remains the only place
     the printed document itself is styled. */
  --resume-font-classic: "Source Serif 4", Georgia, "Times New Roman", serif;
  --resume-font-balanced: "Newsreader", Georgia, serif;
  --resume-font-balanced-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --resume-font-modern: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --resume-font-grotesk: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --resume-paper: #ffffff;
  --resume-ink: #222222;
  --resume-ink-strong: #141414;
  --resume-rule: #ddd9d4;
  --resume-greek: #d9d6d2;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-card: 14px;
  --radius-grid-head: 16px;

  /* One height for every control. A field and the button beside it sitting
     at different heights is the first thing you see in a toolbar, and a
     comment saying "same 40px as .btn" in two places is not a rule, it is
     two numbers that happen to agree today. */
  --control-h: 40px;
  --control-h-sm: 32px;
  --radius-btn: 12px;
  --radius-pill: 100px;

  /* Motion tokens -- skills/motion.md section 3. Nothing writes a bezier or
     a duration inline; every transition in this file reaches for one of
     these. --t-fast and --t-default predate them and are kept as the
     hover/colour case the document assigns plain `ease` to. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --duration-press: 120ms;
  --duration-tooltip: 160ms;
  --duration-dropdown: 200ms;
  --duration-modal: 300ms;
  /* Exits run shorter than entrances: the decision is already made, and
     nobody needs to watch it play out (motion.md section 4). */
  --duration-modal-exit: 220ms;
  /* The panel that slides in from the edge travels the farthest of anything
     here, so it gets the longest budget and its own curve (motion.md 3). */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --duration-drawer: 360ms;
  --duration-drawer-exit: 260ms;
  /* Colour, background and border on hover: no travel, so plain ease. */
  --duration-hover: 150ms;
  /* How far anything entering rises, and how far apart siblings arrive. */
  --enter-lift: 7px;
  --enter-stagger: 45ms;

  --t-fast: 150ms ease;
  --t-default: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-serif: 'Macklin Text', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Playfair Display', serif;
  --font-sans: 'Macklin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'DM Sans', sans-serif;

  /* Type scale, taken from the Framer project's own text styles rather than
     invented here -- every step below is a style that exists there, so text
     in this tool and text on the site are the same sizes at the same
     line-heights:
       050  12px  /Overline Mobile      uppercase micro labels, the floor
       100  16px  /Heading Mobile       the working size of the whole tool
       200  18px  /Body 1 Mobile        card and item titles
       250  20px  /Heading 6, /Body 1   section headings
       300  22px  /Subtitles Mobile     the wordmark
       400  28px  /H5 Mobile
       500  32px  /Heading 5
       600  36px  /H4 Mobile

     100 was 14px and there was a separate 150 at 16 for prose. Two steps
     three pixels apart is not a distinction anyone can see, and the smaller
     of them was doing most of the work -- labels, cells, chips, buttons,
     hints -- which is what made the tool read small everywhere at once. One
     step, at 16. 14px is gone from the scale.

     Nothing here is 10px, 11px, 13px or 15px either. Text below 12px is not
     small, it is unread. */
  --fs-050: 12px;
  --fs-100: 16px;
  --fs-200: 18px;
  --fs-250: 20px;
  --fs-300: 22px;
  --fs-400: 28px;
  --fs-500: 32px;
  --fs-600: 36px;

  /* Icons are not type and do not belong on the type scale: a 16px icon next
     to 14px text is correct, and sizing it with --fs-100 only looks like it
     is until someone changes the type scale. */
  --icon-xs: 12px;
  --icon-sm: 14px;
  --icon-md: 16px;
  --icon-lg: 20px;


  /* ── Categorical colours ────────────────────────────────────────────────
     Ten categories that mean nothing by themselves. Unlike --brand or
     --destructive, none of these carries a message: they exist so that two
     things which are not the same are not the same colour, and which of the
     ten a category gets is arbitrary and stable.

     A category is one hue. Everything else -- how pale the fill is, how dark
     the text on it is, how strong the dot is -- is a recipe below, shared by
     all ten and swapped whole for dark mode. That is the whole system: to
     make every category paler, you change one number here, not eighty.

     The hues are the ten colours supplied, converted to OKLCH and reduced to
     their hue angle. OKLCH and not HSL because HSL's lightness is a lie
     across hues: yellow and blue at the same HSL lightness are nowhere near
     the same brightness, so a set built that way has a couple of colours
     that shout and a couple that vanish. In OKLCH one lightness means one
     brightness, whatever the hue, which is what makes ten of these sit in a
     row without one of them taking over. It is also why the source colours'
     own saturation is dropped: at full strength these are slabs, and the
     brief was UI, not paint.

     Two of the ten arrived at the same hue angle (#8c2257 and #c04880 differ
     in lightness, not hue). A category that is only a lighter version of
     another category is not a distinct category, so they were pushed apart. */
  --cat-1-h: 281.5;   /* from #6356e1, violet */
  --cat-2-h: 188.1;   /* from #109890, teal */
  --cat-3-h: 28.6;    /* from #e55e50, coral */
  --cat-4-h: 241.1;   /* from #1778b0, blue */
  --cat-5-h: 76.9;    /* from #d4951c, amber */
  --cat-6-h: 335;     /* from #8c2257, plum -- moved off 354.7 */
  --cat-7-h: 299.2;   /* from #9058e0, purple */
  --cat-8-h: 99.2;    /* from #c8b010, citron */
  --cat-9-h: 358;     /* from #c04880, pink -- moved off 354.5 */
  --cat-10-h: 139.5;  /* from #486840, moss */

  /* The recipe. Four roles, and the same lightness/chroma pair for all ten
     hues in each role:
       surface  the fill behind a label in that category
       border   the edge of that fill
       ink      text sitting on that fill
       solid    the category itself -- a dot, a rule, a bar */
  --cat-surface-l: 96.5%;  --cat-surface-c: 0.026;
  --cat-border-l: 89%;     --cat-border-c: 0.055;
  --cat-ink-l: 45%;        --cat-ink-c: 0.105;
  --cat-solid-l: 60%;      --cat-solid-c: 0.135;
  /* How much of the category a whole surface takes, as opposed to a pill.
     Part of the recipe and not written at the call site, because the two
     modes need different amounts to arrive at the same read: mixing a light
     hue into a near-black card shows far less of itself than mixing it into
     a near-white one. */
  --cat-fill: 15%;
  --cat-wash: 6%;

  /* Body line-height, from /Body 1 and /Body 2 (both 130%). Headings are
     120% there, and the tightest thing on the site is 110%. */
  --lh-body: 1.3;
  --lh-heading: 1.2;
  --lh-tight: 1.1;
}

/* Tema escuro: aplica automaticamente se o SO pedir (e o usuário não tiver
   escolhido "light" explicitamente), e sempre que data-theme="dark" for setado
   à mão pelo toggle — nas duas direções o toggle explícito vence. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    /* Dark mode moves the recipe, never the hues -- a category is the same
       category in both themes. The fill lifts off the page instead of
       sitting on it, and the ink and the dot climb past it so they read
       against a dark fill rather than a light one. */
    --cat-surface-l: 30%;  --cat-surface-c: 0.042;
    --cat-border-l: 41%;   --cat-border-c: 0.058;
    --cat-ink-l: 85%;      --cat-ink-c: 0.072;
    --cat-solid-l: 72%;    --cat-solid-c: 0.125;
    --cat-fill: 26%;
    --cat-wash: 11%;
    --brand: rgb(158, 129, 112);
    --brand-hover: rgb(180, 150, 130);
    --brand-active: rgb(200, 170, 150);
    --brand-tint: rgb(36, 34, 32);
    --brand-06: rgba(158, 129, 112, 0.06);
    --brand-10: rgba(158, 129, 112, 0.1);
    --brand-18: rgba(158, 129, 112, 0.18);
    --brand-35: rgba(158, 129, 112, 0.35);

    --app-bg: rgb(28, 25, 23);
    --white: rgb(36, 34, 32);

    --text-primary: rgba(245, 241, 237, 0.85);
    /* The design system's own /text-secondary dark value. The alpha
       approximation here composited to rgb(160,153,146) -- 6.25:1 against
       the page where the system's is 9.81:1. */
    --text-secondary: rgb(204, 192, 182);
    --text-placeholder: rgba(184, 176, 168, 0.4);
    --text-muted: rgba(184, 176, 168, 0.5);

    --gray-50: rgba(158, 129, 112, 0.06);
    --gray-100: rgba(158, 129, 112, 0.09);
    --gray-150: rgba(158, 129, 112, 0.14);
    --gray-border: rgba(158, 129, 112, 0.22);

    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.28);
    --selection-bg: rgb(158, 129, 112);
    --selection-ink: rgb(28, 25, 23);

    /* --warn was only defined on the light theme, so dark mode kept the
       #9a6a00 ochre meant for a white page -- barely legible on near-black.
       Lifted here (and in the explicit dark theme below) to a tone that
       carries on the dark background. */
    --warn: #e0a83c;
    --warn-bg: rgba(224, 168, 60, 0.1);
    --warn-border: rgba(224, 168, 60, 0.3);

  --success-bg: rgb(30, 32, 25);
  --success-fg: rgb(126, 163, 95);
  --success-icon: rgb(126, 163, 95);
  --success-body: rgb(184, 175, 166);
  --destructive: rgb(214, 144, 120);
  --destructive-bg: rgb(42, 27, 22);
  --destructive-border: rgba(214, 144, 120, 0.3);
  --destructive-body: rgb(184, 175, 166);

    --success-bg: rgb(30, 32, 25);
    --success-fg: rgb(126, 163, 95);
    --success-icon: rgb(126, 163, 95);
    --success-body: rgb(184, 175, 166);
    --destructive: rgb(214, 144, 120);
    --destructive-bg: rgb(42, 27, 22);
    --destructive-border: rgba(214, 144, 120, 0.3);
    --destructive-body: rgb(184, 175, 166);
  }
}

:root[data-theme='dark'] {
  /* Dark mode moves the recipe, never the hues -- a category is the same
     category in both themes. The fill lifts off the page instead of
     sitting on it, and the ink and the dot climb past it so they read
     against a dark fill rather than a light one. */
  --cat-surface-l: 30%;  --cat-surface-c: 0.042;
  --cat-border-l: 41%;   --cat-border-c: 0.058;
  --cat-ink-l: 85%;    --cat-ink-c: 0.072;
  --cat-solid-l: 72%;  --cat-solid-c: 0.125;
  --cat-fill: 26%;
  --cat-wash: 11%;
  --brand: rgb(158, 129, 112);
  --brand-hover: rgb(180, 150, 130);
  --brand-active: rgb(200, 170, 150);
  --brand-tint: rgb(36, 34, 32);
  --brand-06: rgba(158, 129, 112, 0.06);
  --brand-10: rgba(158, 129, 112, 0.1);
  --brand-18: rgba(158, 129, 112, 0.18);
  --brand-35: rgba(158, 129, 112, 0.35);

  --app-bg: rgb(28, 25, 23);
  --white: rgb(36, 34, 32);

  --text-primary: rgba(245, 241, 237, 0.85);
  --text-secondary: rgb(204, 192, 182);
  --text-placeholder: rgba(184, 176, 168, 0.4);
  --text-muted: rgba(184, 176, 168, 0.5);

  --gray-50: rgba(158, 129, 112, 0.06);
  --gray-100: rgba(158, 129, 112, 0.09);
  --gray-150: rgba(158, 129, 112, 0.14);
  --gray-border: rgba(158, 129, 112, 0.22);

  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.28);
  --selection-bg: rgb(158, 129, 112);
  --selection-ink: rgb(28, 25, 23);

  --warn: #e0a83c;
  --warn-bg: rgba(224, 168, 60, 0.1);
  --warn-border: rgba(224, 168, 60, 0.3);
}

* {
  box-sizing: border-box;
}
/* One focus ring everywhere, keyboard-only -- replaces whatever double ring
   (native outline + a UA/system-accent-colored halo) the browser draws by
   default on click, which is what was showing blue/orange-and-white before. */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── Tooltips ── one consistent tooltip everywhere (view-mode toggle, the
   sidebar collapse/reopen icons, every round action icon on a card/row, the
   data grid's own truncated cells) instead of the browser's native `title`
   bubble -- caps the width and wraps long content (a 15-country Region
   string, a full job title) onto a few lines instead of one very wide
   strip.

   This used to be a pure-CSS ::after pseudo-element on the trigger itself,
   positioned absolute with per-selector left/right overrides for whichever
   edge it happened to sit near. That approach couldn't actually work: a
   tooltip nested inside a truncated cell (.data-grid td, .companies-table
   td, .facet-item-label, any overflow:hidden text-ellipsis container --
   there were a dozen of these) got clipped by that SAME overflow:hidden,
   since a child can never paint outside its overflow:hidden ancestor's box
   no matter how it's positioned. Every per-edge left/right rule was
   patching the symptom on whichever tooltip got reported, not the cause.

   Now there's exactly one #global-tooltip element, a child of <body>,
   positioned via JS (app.js's showGlobalTooltip) using each trigger's own
   getBoundingClientRect() -- being outside every other element's DOM
   subtree, it is structurally immune to any ancestor's overflow:hidden,
   and JS clamps it to the viewport on all four edges instead of a fixed
   per-selector left/right guess. */
#global-tooltip {
  position: fixed;
  max-width: 300px;
  white-space: normal;
  text-align: left;
  background: var(--text-primary);
  color: var(--app-bg);
  font-family: var(--font-sans);
  font-size: var(--fs-100);
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-press) ease-out;
}
#global-tooltip.visible {
  opacity: 1;
}

html {
  font-size: 16px;
  /* Nothing in this app is meant to scroll sideways -- a couple of
     internal tables/panes opt into their own overflow-x:auto where they
     genuinely need it. Without this, the page reports a phantom few px of
     horizontal scroll (scrollWidth comes out a bit wider than clientWidth
     even though no single element's own box actually crosses the
     viewport edge -- likely scrollbar-gutter accounting), which a
     trackpad swipe or momentum-scroll can nudge into, reading as a
     "hidden" horizontal scroll. Set on both html and body since the root
     element's own overflow doesn't reliably propagate to the viewport's
     scroll behavior in every engine. */
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--app-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-200);
  /* 130%, which is what /Body 1 and /Body 2 are in the design system. It was
     1.6, invented here, and it set the vertical rhythm of every block in the
     app one and a half steps looser than anything the system describes --
     including headings, which had no line-height of their own and inherited
     it, so a 36px page title carried 57px of leading. */
  line-height: var(--lh-body);
  min-height: 100vh;
  /* `clip`, NOT `hidden`: hidden on one axis forces the other to `auto` per
     spec, which made body a scroll container and silently broke every
     position:sticky inside it (the sticky element is then measured against a
     box that never scrolls). clip does the same horizontal clamping without
     creating a scroll container. */
  overflow-x: clip;
}
/* Selected text, both themes. Browser default is a flat blue that belongs to
   no palette and sits badly on the dark theme. */
::selection {
  background: var(--selection-bg);
  color: var(--selection-ink);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  /* 75% of the page colour with the rest blurred through it, so a scrolling
     list reads as passing underneath rather than being cut off by a solid
     bar. The opaque fallback comes first: without backdrop-filter support
     this has to stay readable, not translucent. */
  background: var(--app-bg);
  background: color-mix(in srgb, var(--app-bg) 75%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}
.navbar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar-logo {
  display: block;
  flex-shrink: 0;
}
.navbar-brand {
  font-family: var(--font-serif);
  /* 22px (/Subtitles Mobile), down from 28. */
  font-size: var(--fs-300);
  color: var(--brand);
}
.navbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
}
.navbar-sub {
  font-size: var(--fs-200);
  color: var(--text-secondary);
}
.navbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--t-fast);
  font-size: var(--icon-lg);
}
.icon-btn:hover {
  background: var(--brand-06);
  color: var(--text-primary);
}

/* ── App shell: sidebar + content ── */
/* The page is a column so the shell can claim whatever the footer does not.
   Without this the shell ends where the main column ends, and on a short
   page that is well above the footer -- which is why the sidebar's rule
   stopped in mid-air with dead space under it. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-shell {
  position: relative;
  display: flex;
  /* stretch, not flex-start: the sidebar takes the shell's full height and
     is then capped at the viewport by its own max-height. That is what lets
     it meet the footer on a short page and still stop at the fold on a long
     one. The reopen button is position:fixed and unaffected. */
  align-items: stretch;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 56px; /* navbar height */
  flex-shrink: 0;
  width: 300px;
  /* Was a fixed height of exactly one viewport, which on a short page left
     it ending above the footer with nothing in between. Stretching to the
     shell and capping at the viewport gives it the room it was leaving on
     the floor. */
  height: auto;
  max-height: calc(100vh - 56px);
  padding: 48px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  transition: width var(--duration-drawer) var(--ease-in-out), padding var(--duration-drawer) var(--ease-in-out), opacity var(--duration-dropdown) ease-out, border-color var(--duration-drawer) ease;
}
/* The filter list is twice the height of its box on a real account, and
   nothing said so: the Job Titles facet simply ended at the fold. Same fade
   the applications board uses, in the page's own colour, sticky to the
   bottom of the scroll area so it stays put while the content moves under
   it. It goes when there is nothing left to scroll to. */
.sidebar::after {
  content: "";
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  height: 56px;
  margin-top: -56px;
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--duration-dropdown) ease-out;
  background: linear-gradient(
    to bottom,
    rgb(from var(--app-bg) r g b / 0) 0,
    var(--app-bg) 100%
  );
}
.sidebar[data-scroll-end="true"]::after {
  opacity: 0;
}
/* The fade eats the last 56px, so the list needs that much room under it to
   still be reachable. */
.sidebar-filters {
  padding-bottom: 56px;
}
.sidebar.collapsed {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  overflow: hidden;
  border-right-color: transparent;
  pointer-events: none;
}
.sidebar-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--text-placeholder);
  cursor: pointer;
  transition: var(--t-fast);
}
.sidebar-close-btn:hover {
  background: var(--brand-06);
  color: var(--brand);
}
.sidebar-reopen-btn {
  /* top/left set from JS (alignToMain) -- measured against the active tab's
     own H1 so it always sits immediately to its left, never floating over
     the heading text itself. */
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  z-index: 45;
  opacity: 0;
  transition: var(--t-fast), opacity 200ms ease 150ms;
}
.sidebar-reopen-btn:not([hidden]) {
  opacity: 1;
}
.sidebar-reopen-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.sidebar-reopen-btn[hidden] {
  display: none;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
/* Divider only shows when this tab actually has filters -- toggled via
   [hidden] on the container itself from JS (see updateSidebarFilters). */
.sidebar-filters {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-filters[hidden] {
  display: none;
}
.facet-group {
  margin-bottom: 26px;
}
.facet-group:last-child {
  margin-bottom: 0;
}
.facet-group-title {
  font-size: var(--fs-100);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 0 4px;
}
.facet-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.facet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 30px tall at 14/1.3. These are the most-clicked things on the page and
     they were a 26px target packed one pixel apart. */
  padding: 7px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-100);
  color: var(--text-primary);
  user-select: none;
}
.facet-item:hover {
  background: var(--brand-06);
}
/* Every checkbox in the app, not the ones in the facet list that happened
   to get styled first. This rule used to be scoped to .facet-item, so a
   checkbox anywhere else drew as the operating system's -- a blue one, in a
   warm grey app, which is exactly the seam the design system exists to
   close. Opting out is `appearance: auto`, and nothing does. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  position: relative;
  transition: var(--t-fast);
}
input[type="checkbox"]:hover {
  border-color: var(--brand);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* The tick, drawn rather than typed: a glyph would sit on the font's
   baseline and a checkbox has no baseline to sit on. */
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.facet-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.facet-item-count {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: var(--fs-100);
}
/* What ticking would add, not part of what is shown. Quieter, so a column of
   counts reads as the list first and the possibilities second. */
.facet-item-count.is-additive {
  color: var(--text-placeholder, var(--text-secondary));
  opacity: 0.8;
}

.facet-item-remove {
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  color: var(--text-placeholder);
}
.facet-item-remove:hover {
  background: var(--destructive-bg);
  color: var(--destructive);
}
.facet-search-input {
  width: 100%;
  height: 30px;
  margin-bottom: 6px;
  padding: 0 8px;
  font-size: var(--fs-100);
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: var(--t-fast);
}
.facet-search-input:focus {
  background: var(--white);
  border-color: var(--brand);
}
.facet-search-input::placeholder {
  color: var(--text-placeholder);
}
.facet-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--brand);
  font-family: inherit;
  font-size: var(--fs-100);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.facet-toggle-btn:hover {
  background: var(--brand-06);
}
.facet-toggle-btn[hidden] {
  display: none;
}
.facet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 4px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-100);
  color: var(--text-primary);
  text-align: left;
}
.facet-option:hover {
  background: var(--brand-06);
}
.facet-option.active {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-tint);
}
.facet-add-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.facet-add-row input {
  flex: 1;
  min-width: 0;
  /* the global input[type=text] rule (height: 36px) wins the cascade over
     this -- same specificity, declared later in the file -- so the actual
     rendered height is 36px regardless of what's set here; the add button
     below is sized to match that real height, not this one. */
  font-size: var(--fs-100);
  padding: 0 8px;
}
.facet-add-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
}
.facet-add-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.sidebar-link {
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  /* Square. The rounded corners left the 3px active stroke ending in two
     little curves that didn't line up with anything else on the page. */
  border-left: 3px solid transparent;
  text-align: left;
  padding: 10px 14px;
  border-radius: 0;
  cursor: pointer;
  transition: var(--t-fast);
}
.sidebar-link:hover {
  color: var(--brand);
  background: var(--brand-06);
}
.sidebar-link.active {
  /* --brand-tint is rgb(245,242,237) on light -- 1.02:1 against the page,
     so the active item had no surface at all and only the stroke marked
     it. A brand tint at 18% reads at 1.34:1 light and 1.27:1 dark. The
     label goes to --text-primary rather than --brand: brand-on-brand-tint
     is the same hue on itself and fell to 3.8:1 in dark mode, while the
     stroke carries the accent anyway. */
  color: var(--text-primary);
  background: var(--brand-18);
  border-left-color: var(--brand);
}

main {
  flex: 1;
  min-width: 0;
  max-width: 1240px;
  padding: 32px 24px 96px;
  transition: padding-left var(--duration-drawer) var(--ease-in-out);
}
/* Reserves room for the collapsed-sidebar reopen icon (32px button + 16px
   gap on each side) so it has a real gutter to sit in next to the H1
   instead of being clamped on top of the heading text when there's no
   space to its left (sidebar and main are siblings under .app-shell, so
   this plain sibling combinator tracks the collapsed state with no JS
   needed). */
.sidebar.collapsed ~ main {
  padding-left: 64px;
}

.page-title {
  font-size: var(--fs-600);
  /* 110%, /H1's leading. At the page's largest size the default 120% opens
     a gap the title reads across rather than down. */
  line-height: var(--lh-tight);
  margin-bottom: 10px;
}
.page-subtitle {
  /* A measure. The subtitle is the one long sentence on the page and it was
     running the full 1200px of the content column. */
  max-width: 78ch;
  color: var(--text-secondary);
  font-size: var(--fs-200);
  line-height: var(--lh-body);
  margin-bottom: 32px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ── Overview: USA map ── */
#map-date-filter {
  height: 36px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
  cursor: pointer;
}
.usa-map-wrap {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  aspect-ratio: 1025 / 635;
}
.usa-map {
  position: absolute;
  inset: 0;
}
.usa-map svg {
  display: block;
  width: 100%;
  height: 100%;
}
.usa-map svg circle {
  fill: var(--brand);
  opacity: 0.55;
}
.map-pins {
  position: absolute;
  inset: 0;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--app-bg);
  cursor: pointer;
  padding: 0;
  transition: var(--t-fast);
}
.map-pin-job {
  background: var(--success-icon);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success-fg) 40%, transparent);
}
.map-pin-job:hover,
.map-pin-job.active {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success-fg) 25%, transparent);
}
.map-pin-company {
  background: var(--map-pin-company);
  box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4);
}
.map-pin-company:hover,
.map-pin-company.active {
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.25);
}
.map-pin:hover,
.map-pin.active {
  transform: translate(-50%, -50%) scale(1.4);
}
.map-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.map-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-pin-popover {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  width: max-content;
  max-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-brand-soft);
  padding: 12px 14px;
  z-index: 10;
  animation: pinPopoverIn 160ms ease-out;
}
/* Invisible hit-area bridging the gap down to the pin dot, so moving the
   mouse from the pin up to "Open role" never crosses dead space that would
   fire mouseleave before the cursor reaches the popover. */
.map-pin-popover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
}
@keyframes pinPopoverIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 4px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 14px));
  }
}
.map-pin-popover-title {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.map-pin-popover-company {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.map-pin-popover-date {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.map-pin-popover-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.map-pin-popover-link:hover {
  text-decoration: underline;
}
.map-pin-popover-link .external-link-icon {
  font-size: var(--icon-xs);
  color: var(--brand);
}
.usa-map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: var(--fs-100);
}

/* ── Overview: stat tiles ── */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.stat-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  padding: 18px 20px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: var(--t-fast);
}
.stat-tile:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-brand-soft);
}
.stat-tile.active {
  border-color: var(--brand);
  background: var(--gray-100);
  box-shadow: var(--shadow-brand-soft);
}
.stat-tile-number {
  font-family: var(--font-serif);
  font-size: var(--fs-600);
  color: var(--brand);
  line-height: 1.1;
}
.stat-tile-label {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-top: 4px;
}

.overview-row-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.overview-row-wrap:last-child {
  border-bottom: none;
}
.overview-row-wrap .overview-row {
  flex: 1;
  min-width: 0;
  border-bottom: none;
}
.overview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-200);
  color: var(--text-primary);
  text-decoration: none;
}
.overview-row:last-child {
  border-bottom: none;
}
.overview-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.overview-row-title {
  color: var(--text-primary);
}
.overview-row-sub {
  color: var(--text-secondary);
  font-size: var(--fs-100);
}
.overview-row:hover .overview-row-title {
  color: var(--brand);
  text-decoration: underline;
}
.overview-row-meta {
  color: var(--text-secondary);
  font-size: var(--fs-100);
  white-space: nowrap;
}
.external-link-icon {
  font-size: var(--icon-sm);
  flex-shrink: 0;
  color: var(--text-placeholder);
  transition: var(--t-fast);
}
.overview-row:hover .external-link-icon,
.company-job-row:hover .external-link-icon {
  color: var(--brand);
}

/* ── Results toolbar: search + view toggle ── */
.results-toolbar {
  position: sticky;
  top: 56px; /* navbar height */
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 4px;
  background: var(--app-bg);
}
.page-title-count {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  font-weight: 300;
  color: var(--text-secondary);
}
.results-search {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: var(--t-fast);
}
.results-search:focus-within {
  background: var(--white);
  border-color: var(--brand);
}
.results-search > i {
  flex-shrink: 0;
  color: var(--text-secondary);
}
/* The wrapper IS the field -- the input inside it has to be invisible.
   Folding search inputs into the shared base style put a second fill and a
   second focus border in here, so the control read as a box inside a box:
   a patch of colour at rest that turned into a stroke once focused. The
   type selector is what keeps this winning over that base rule. */
.results-search input,
.results-search input[type='search'] {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  outline: none;
  border-radius: 0;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
}
.results-search input:hover,
.results-search input[type='search']:hover,
.results-search input[type='search']:focus {
  background: none;
  border: none;
}
.view-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px;
  margin-left: auto; /* flush with the table's right edge, not wherever the capped search box happens to end */
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  /* These were already 16, the same as the row actions and the same colour,
     and still read smaller: a four-square grid and a table grid are busy
     glyphs whose strokes thin out at that size, where a check or an arrow
     does not. 20 is what makes them weigh the same on the page. */
  font-size: var(--icon-lg);
  transition: var(--t-fast);
}
.view-toggle-btn:hover {
  color: var(--brand);
}
.view-toggle-btn.active {
  background: var(--white);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

/* ── Card view -- isolated tiles in a grid, not a list dressed as one ── */
.overview-results-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}
/* [hidden]'s UA-stylesheet display:none loses to this class's own
   display:grid (an author rule always wins over a UA one, regardless of
   specificity) -- toggling .hidden alone silently failed to hide this
   container, leaving the grid view rendered underneath it. Same gotcha as
   .app-panel-zoom[hidden] elsewhere in this file. */
.overview-results-card[hidden] {
  display: none;
}
.overview-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  padding: 14px 16px;
  transition: var(--t-fast);
}
.overview-card:hover {
  border-color: var(--brand-35);
  box-shadow: var(--shadow-sm);
}
.overview-card-link {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.overview-card-title {
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.overview-card:hover .overview-card-title {
  color: var(--brand);
  text-decoration: underline;
}
.overview-card-company {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.overview-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.overview-card-chip {
  font-size: var(--fs-100);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  color: var(--text-secondary);
}
/* The count of the ones that did not fit. Quieter than a place name,
   because it is not one -- it is a way in to the rest, and the rest are in
   its tooltip. */
.overview-card-chip.is-more {
  background: transparent;
  border: 1px solid var(--border);
  cursor: default;
}
.overview-card-remote.is-remote {
  background: var(--brand-tint);
  color: var(--brand);
}
.overview-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Categorical colours: picking one ────────────────────────────────────
   A component never names a hue. It puts .cat-N on whatever owns the
   category -- a column, a row, a tag -- and then reads --cat-surface,
   --cat-border, --cat-ink and --cat-solid, which are inherited by
   everything inside it. Swapping a category is one class, and a component
   written this way works for all ten without knowing there are ten. */
.cat-1 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-1-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-1-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-1-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-1-h));
}
.cat-2 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-2-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-2-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-2-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-2-h));
}
.cat-3 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-3-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-3-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-3-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-3-h));
}
.cat-4 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-4-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-4-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-4-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-4-h));
}
.cat-5 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-5-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-5-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-5-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-5-h));
}
.cat-6 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-6-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-6-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-6-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-6-h));
}
.cat-7 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-7-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-7-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-7-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-7-h));
}
.cat-8 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-8-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-8-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-8-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-8-h));
}
.cat-9 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-9-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-9-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-9-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-9-h));
}
.cat-10 {
  --cat-surface: oklch(var(--cat-surface-l) var(--cat-surface-c) var(--cat-10-h));
  --cat-border: oklch(var(--cat-border-l) var(--cat-border-c) var(--cat-10-h));
  --cat-ink: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-10-h));
  --cat-solid: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-10-h));
}

/* The label form of a category: a dot in its own colour and the name on a
   pale fill of the same hue. This is what a category looks like when it has
   to sit in a line of text or on a card. */
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--cat-surface);
  color: var(--cat-ink);
  font-size: var(--fs-050);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}
.cat-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--cat-solid);
}

/* The Companies grid is the Jobs grid with its own columns. Everything
   about how it looks -- the sticky header with its plate and its corners,
   the row rules, the hover fill, the actions appearing on hover in the last
   cell -- comes from .data-grid, so the two tabs cannot drift apart again. */
.col-company { width: 22%; }
.col-role { width: 28%; }
.col-industry { width: 23%; }
/* .col-remote and .col-date are the Jobs grid's own, at 13% and 15%. */

/* Remove is destructive and rides with the rest of the row's icons, so it
   only says so when you are on it. */
.job-status-btn.is-destructive:hover {
  color: var(--destructive);
  border-color: color-mix(in srgb, var(--destructive) 42%, transparent);
  background: var(--destructive-bg);
}

/* ?safe=why. Deliberately plain, and deliberately labelled: it exists to be
   read and screenshotted, and somebody who finds it should be able to tell
   in one glance that it is not part of the product. */
.filter-funnel {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px dashed var(--destructive);
  border-radius: var(--radius-md);
  background: var(--destructive-bg);
  font-size: var(--fs-100);
}
.filter-funnel-what {
  margin: 0 0 12px;
  color: var(--destructive-body);
  line-height: var(--lh-body);
}
.filter-funnel-what code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
}
.filter-funnel pre {
  margin: 4px 0 12px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Brand loader ── */
/* Where the rows will be, so nothing jumps when they arrive. The mark is
   80px and centred, and the box is tall enough that the page does not
   collapse around it and then expand again. */
.grid-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
  margin-bottom: 20px;
}
.grid-loader[hidden] { display: none; }
.grid-loader-label {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-250);
  font-weight: 400;
  line-height: var(--lh-heading);
  color: var(--text-secondary);
}

/* ── Brand avatar ── */
/* Two layers in one box: the initials are the element's own text and the
   favicon is an image laid over them. When there is no domain, or the icon
   404s and the script drops the image, the letters are already there. */
.brand-avatar {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  /* The hue comes from the employer's name, so a company keeps the same
     tile everywhere and between sessions. Saturation stays low on purpose:
     a page of 150 rows should still read as this app. */
  background: hsl(var(--av-h, 30) 22% 90%);
  color: hsl(var(--av-h, 30) 30% 34%);
  user-select: none;
}
.brand-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Over the letters, and over the tint too: a favicon carries its own
     background and does not need ours showing through its corners. */
  background: var(--surface);
}
:root:not([data-theme="light"]) .brand-avatar,
:root[data-theme="dark"] .brand-avatar {
  background: hsl(var(--av-h, 30) 16% 26%);
  color: hsl(var(--av-h, 30) 30% 80%);
}

/* The row goes on a wrapper, never on the <td> itself: a table cell told to
   be a flex container leaves the table's layout behind, and the fixed column
   widths stop lining up down the page. */
.with-brand,
.overview-card-company,
.kanban-card-company {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.with-brand > span:last-child,
.overview-card-company > span:last-child,
.kanban-card-company > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Data grid view ── */
#overview-results-grid {
  --grid-head-top: 120px;
}
.overview-results-grid {
  /* Nothing here clips. It briefly carried overflow:clip to hide the rows
     behind the header's rounded corners, and that crashed WebKit: Safari
     and DuckDuckGo both took down the render process on this page and went
     on doing it every reload, while Chromium was fine. clip on an ancestor
     of a position:sticky element is a thin path there, and this page does
     not need to walk it -- what actually fixed the leak is the header cells
     painting the page colour underneath themselves.
     (overflow:hidden is not the alternative either. It makes this a scroll
     container, which steals the header's sticky and pins it 120px from THIS
     box's top instead of the viewport's.) */
  margin-bottom: 20px;
  /* No overflow-x:hidden here -- even paired with overflow-y:visible, it
     still turned this box into a scroll container and hijacked the
     thead's position:sticky (which stuck 116px from THIS box's own top
     instead of tracking the page's scroll). The phantom horizontal
     scroll this used to guard against is now fixed globally on html/body
     instead, where it belongs. */
}
.data-grid {
  width: 100%;
  table-layout: fixed;
  /* separate, not collapse. With collapsed borders a cell's border-radius
     is ignored -- which is why the header read square however large the
     radius on it was. Nothing here needs collapsing: every rule below puts
     a border on one side only, so there are no pairs to merge. */
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-200);
}
/* Five columns inside a fixed-layout table: the percentages have to total
   100 so nothing is pushed past the wrapper's edge. Employer leads, because
   it is the thing being scanned for and the avatar gives the eye a column
   of anchors to run down. Posted is last and narrow -- the date is rendered
   short ("23 Sep 26") for exactly that. */
.col-employer { width: 22%; }
.col-title { width: 28%; }
.col-region { width: 22%; }
.col-remote { width: 13%; }
.col-date { width: 15%; }
.data-grid thead th {
  position: sticky;
  /* Flush under whatever is sticky above it. On the Jobs tab that is the
     results toolbar, which ends at 120 -- navbar (56) plus toolbar (64).
     The Companies and Scan grids have no sticky toolbar, so theirs stops at
     the navbar. Flush, not spaced: any gap here is a window the rows scroll
     past in, and one pixel of overlap is a seam between two sticky layers
     that flickers the whole way down a scroll. */
  top: var(--grid-head-top, 56px);
  z-index: 30;
  text-align: left;
  /* /Overline Mobile: 12px uppercase, which is what this is. */
  font-size: var(--fs-050);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 16px;
  /* Page colour, and square: this is the plate. A rounded corner is a hole
     -- inside the cell's box, outside the curve, whatever is behind shows
     through, and what is behind is the row sliding under the header. That
     is what left the stroke fragments by the radius. So the cell paints the
     page underneath itself, and the bar goes on a layer above it.
     The cell has to stay square for that, because a background follows its
     own element's border-radius: a rounded cell cannot also paint a square
     backdrop. Hence the rules, the fill and the corners all moving to
     ::before below. */
  background: var(--app-bg);
  white-space: nowrap;
  /* No overflow:hidden. These are five short words in fixed-width columns,
     so there is nothing to clip. */
}
/* The bar. Rounded at the ends, opaque, and sitting between the plate and
   the label: z-index -1 paints a positioned child above its parent's
   background and below the parent's own text, which is exactly the layer
   this wants. */
.data-grid thead th::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Opaque, not --gray-50. That token is a 5% tint, and a sticky header
     with a translucent fill lets the rows scroll through underneath it --
     this is the same tint, mixed into the page colour instead of laid over
     it, so nothing shows through. */
  background: color-mix(in srgb, var(--brand) 5%, var(--app-bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* No grid lives inside a .card: .card clips (overflow:hidden), and a sticky
   header inside a clipping box stops tracking the page. The Scan grid sat
   in one and was the only table whose rows scrolled out over the header. */

/* The two end cells close the bar off sideways and round the top corners,
   including while the header is stuck -- a header that squares off the
   moment you scroll is the table losing its shape at exactly the point you
   are looking at it.
   A rounded corner is a hole: inside the cell's box, outside the curve,
   whatever is behind shows through, and what is behind is the row sliding
   under it. So each end cell paints a square of page colour behind its own
   background. The plate travels with the sticky cell, sits above the rows
   and below the cell's own rounded fill, so the corner reads as page and
   not as half a row. */
.data-grid thead th:first-child::before {
  border-left: 1px solid var(--border);
  border-top-left-radius: var(--radius-grid-head);
}
.data-grid thead th:last-child::before {
  border-right: 1px solid var(--border);
  border-top-right-radius: var(--radius-grid-head);
}
.data-grid th[data-sort] {
  cursor: pointer;
  user-select: none;
}
.sort-icon {
  font-size: var(--icon-xs);
  margin-left: 2px;
  color: var(--text-placeholder);
  vertical-align: -1px;
}
.data-grid th.sort-asc .sort-icon,
.data-grid th.sort-desc .sort-icon {
  color: var(--brand);
}
/* Every rule sits on the cells, not on the row: in separate border mode a
   <tr> cannot carry a border at all, and moving to separate mode is what
   lets the header round its corners. */
.data-grid tbody tr {
  transition: var(--t-fast);
}
.data-grid tbody td {
  border-bottom: 1px solid var(--border);
}
.data-grid tbody td:first-child {
  border-left: 1px solid var(--border);
}
.data-grid tbody td:last-child {
  border-right: 1px solid var(--border);
}
/* The table's bottom corners, on the cells that own them now that nothing
   clips the box around them. */
.data-grid tbody tr:last-child td {
  border-bottom: 1px solid var(--border);
}
.data-grid tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-grid-head);
}
.data-grid tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-grid-head);
}
/* On the cells rather than on the row, so the last row's hover fill is
   clipped by the rounded corners above instead of squaring them off. */
.data-grid tbody tr:hover td {
  background: var(--brand-06);
}
.data-grid td {
  /* Was 8, then 14. Twelve rows of text at 8px of padding is a wall, and
     the table has the room, so it takes it. The side gutter matches the
     header's. */
  padding: 18px 16px;
  vertical-align: middle;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-grid-title-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-grid tbody tr:hover .data-grid-title-link {
  color: var(--brand);
  text-decoration: underline;
}
.data-grid-employer,
.data-grid-region,
.data-grid-remote-text-cell,
.data-grid-date {
  color: var(--text-secondary);
}
/* Row actions overlay the last cell instead of reserving their own 132px
   table column -- a real column at every row's far right was the actual
   source of the hidden horizontal scrollbar (the fixed-layout table's
   column widths always summed to more than 100% of the wrapper once that
   extra column was added). Anchoring to .data-grid-remote (the last real
   column) with right:16px lands exactly "16px from the table's right
   edge", and overflow:visible on just this cell lets the icon group spill
   left over Region's text on narrow rows without being clipped. */
.data-grid td.data-grid-date {
  position: relative;
  overflow: visible;
}
.data-grid-remote-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-grid td .job-status-actions {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  /* Right padding (not a `right` offset) keeps the icons themselves inset
     16px from the table's true edge -- the background band underneath
     still runs flush to that edge, with no gap of its own for text to
     show through. */
  /* 180px of veil in total: the four 28px icons plus their gaps take ~124,
     16 keeps them off the table's edge, and the remaining 40 on the left is
     the run the gradient fades across. */
  min-width: 180px;
  justify-content: flex-end;
  padding: 4px 16px 4px 40px;
  /* Exactly the colour the row already is on hover -- --brand-06 is that
     tint at 6% alpha, so its opaque equivalent is the same 6% mixed into
     the page background -- fading left into that same colour at zero
     alpha. The previous version stacked the tint over a fully opaque
     var(--app-bg): the "transparent" end of the gradient had that opaque
     layer underneath it the whole way, so nothing actually faded and the
     band read as a hard-edged box sitting on the row. Fading to
     `transparent` instead of to this colour would be wrong too -- that
     keyword is transparent BLACK, which greys the ramp out on its way. */
  --actions-veil: color-mix(in srgb, var(--brand) 6%, var(--app-bg));
  background: linear-gradient(
    to right,
    rgb(from var(--actions-veil) r g b / 0) 0,
    var(--actions-veil) 40px,
    var(--actions-veil) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: var(--t-fast);
}
.data-grid tbody tr:hover td .job-status-actions,
.data-grid tbody tr:focus-within td .job-status-actions {
  opacity: 1;
  pointer-events: auto;
}
.data-grid td .job-status-btn {
  height: 28px;
  min-width: 28px;
  font-size: var(--fs-100);
}

.job-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.job-status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 32px;
  padding: 0 4px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--white);
  /* --text-placeholder here left the row actions at 2.2:1 against the veil
     behind them -- visible only once you knew where to look. */
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: var(--icon-md);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: var(--t-fast);
}
.job-status-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.job-status-btn:disabled { opacity: 0.6; cursor: default; }
/* Solid fill, not a faint tint -- "applied" needs to read as unmistakably
   done at a glance in a 22px circle, on both light and dark theme. */
.job-status-btn[data-action="applied"].active {
  background: var(--success-icon);
  border-color: var(--success-icon);
  color: var(--white);
}
.job-status-btn[data-action="discarded"].active {
  background: var(--destructive);
  border-color: var(--destructive);
  color: var(--white);
}
/* "Send to Application" one-shot flash: same solid-green language as
   "applied" so success reads the same way everywhere, even though this
   button isn't a persistent toggle. */
.job-status-btn.sent {
  background: var(--success-icon);
  border-color: var(--success-icon);
  color: var(--white);
}
.companies-table-actions .job-status-actions {
  margin-right: 4px;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .sidebar-filters {
    max-height: 50vh;
    overflow-y: auto;
  }
  .sidebar-link {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .sidebar-link.active {
    border-bottom-color: var(--brand);
  }
}

/* ── Near Shore directory ── */
.nearshore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.nearshore-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  padding: 22px 24px;
  transition: var(--t-fast);
}
.nearshore-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-18);
}
.nearshore-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.nearshore-card-name {
  font-family: var(--font-serif);
  font-size: var(--fs-250);
  color: var(--text-primary);
  text-decoration: none;
}
.nearshore-card-name:hover {
  color: var(--brand);
}
.nearshore-card-hq {
  font-size: var(--fs-100);
  /* --text-placeholder is 2.2:1. This is the only line telling you where a
     company is; it is not a placeholder. */
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.nearshore-card-desc {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  line-height: var(--lh-body);
  margin-bottom: 16px;
}
.nearshore-region-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nearshore-region-tag {
  font-size: var(--fs-100);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
}
.nearshore-empty {
  color: var(--text-secondary);
  font-size: var(--fs-200);
  padding: 32px 0;
  text-align: center;
}

/* ── Companies catalog ── */
.companies-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.companies-toolbar #companies-search {
  flex: 1;
}
.companies-toolbar select {
  height: 36px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
  cursor: pointer;
}
.companies-add-row {
  flex-wrap: wrap;
}
.companies-add-row input,
.companies-add-row select {
  flex: 1 1 160px;
  min-width: 140px;
}
.companies-add-row select {
  height: 36px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
  cursor: pointer;
}
.table-scroll {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
}
.companies-table {
  /* min-width in px (not width:100% + table-layout:fixed) is the point: the
     old combo capped the table at the wrapper's width no matter what,
     squeezing every column -- actions included -- to fit instead of ever
     growing past it and triggering .table-scroll's overflow-x. Dropping
     "fixed" lets auto layout size columns off real content, so the ones
     that want truncation (Company/Role/Industry, via white-space:nowrap +
     text-overflow:ellipsis below) still truncate, while Actions gets
     whatever room its icon buttons actually need. */
  min-width: 1080px;
  border-collapse: collapse;
  font-size: var(--fs-200);
}
.companies-table th {
  text-align: left;
  font-size: var(--fs-100);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.companies-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.companies-table tbody tr:last-child td {
  border-bottom: none;
}
.companies-table tbody tr:hover td {
  background: var(--gray-50);
}
.companies-table-name {
  font-family: var(--font-serif);
  font-size: var(--fs-250);
  color: var(--text-primary);
}
.companies-table td .company-job-row {
  border-bottom: none;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
}
.companies-table td .company-job-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.companies-table td .company-job-row .external-link-icon {
  flex-shrink: 0;
}
.companies-table td .company-industry-tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.companies-table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
}
.remote-tag {
  display: inline-block;
  font-size: var(--fs-100);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.remote-tag-us_only {
  background: rgba(70, 130, 180, 0.14);
  color: rgb(70, 130, 180);
}
.remote-tag-anywhere {
  background: color-mix(in srgb, var(--success-fg) 14%, transparent);
  color: var(--success-icon);
}
.remote-tag-br_latam {
  background: rgba(230, 126, 34, 0.14);
  color: var(--map-pin-company);
}
.remote-tag-others {
  background: var(--gray-100);
  color: var(--text-secondary);
}
.company-contacts-row td {
  background: var(--brand-tint);
  white-space: normal;
}
.company-card-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-placeholder);
  cursor: pointer;
  font-size: var(--icon-sm);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.company-card-remove:hover {
  background: var(--destructive-bg);
  color: var(--destructive);
}
.company-industry-tag {
  font-size: var(--fs-100);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
}
.company-job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-200);
  color: var(--text-primary);
  text-decoration: none;
}
.company-job-row:last-child {
  border-bottom: none;
}
.company-job-row:hover span {
  color: var(--brand);
  text-decoration: underline;
}
.contacts-toggle-btn {
  font-size: var(--fs-100);
  color: var(--brand);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-weight: 600;
}
.contacts-toggle-btn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}
.contacts-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.contacts-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-100);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--t-fast);
}
.contacts-chip:hover {
  background: var(--brand-tint);
  border-color: var(--brand-18);
  color: var(--brand);
}
.contacts-chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  padding: 18px 22px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-title {
  font-size: var(--fs-100);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.card-hint {
  /* Prose, so 150 and not 100. This is the paragraph under a card title
     explaining what the card is for -- a sentence or three of it -- and at
     14px the whole tool read as fine print. */
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  /* --text-placeholder is 2.8:1 on light and 2.4:1 on dark. That is fine for
     a placeholder inside a field, which is what the token is named for, but
     .card-hint is prose -- the paragraph explaining what the evidence bank is
     for is not decoration. --text-secondary is 7.2:1 and 6.3:1. */
  color: var(--text-secondary);
}
.card-body {
  padding: 6px 22px 24px;
}

/* ── Form basics ── */
.field {
  margin-bottom: 16px;
}
.field:last-child {
  margin-bottom: 0;
}
.field-label {
  display: block;
  font-size: var(--fs-100);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

input[type='text'], input[type='url'], input[type='number'], input[type='password'],
input[type='email'], input[type='search'], textarea {
  width: 100%;
  height: var(--control-h);
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
  outline: none;
  transition: var(--t-fast);
}
input[type='text']:hover, input[type='url']:hover, input[type='password']:hover,
input[type='email']:hover, input[type='search']:hover, textarea:hover {
  background: var(--gray-150);
}
input[type='text']:focus, input[type='url']:focus, input[type='number']:focus, input[type='password']:focus,
input[type='email']:focus, input[type='search']:focus, textarea:focus {
  background: var(--white);
  border-color: var(--brand);
}
/* A textarea is the same control with room for more than one line. */
textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 12px;
  line-height: 1.45;
  resize: vertical;
}
/* --text-placeholder put placeholder text at 2.8:1 light and 2.3:1 dark
   against the field's own fill -- below the 4.5:1 any text needs. */
input::placeholder, textarea::placeholder {
  color: var(--text-secondary);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h);
  /* MUI's ratio for a button this tall, rather than the 22 this used to
     carry. Twenty-two was set to stop an uppercase label reading as crammed,
     which was really the old 16px type doing it; at the label's real size it
     just made every button wider than its words. */
  padding: 0 18px;
  font-family: inherit;
  /* Read off the Framer project's own /Button text style over the MCP:
     Macklin Sans Regular, 14px, 1.2em, letter-spacing 0, uppercase. This
     was 16px with 0.04em of tracking added on top -- a label two sizes too
     big and spaced wider than the system asks, which is most of why the
     button looked cramped before the padding went up. */
  font-size: var(--fs-100);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
  /* Sentence case. Hierarchy comes from fill, size and weight; a toolbar of
     uppercase labels has every button shouting at the same volume, which is
     how the CV tab ended up with five equal calls to action. */
  text-transform: none;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  /* Hover is colour only, on plain ease. The press is acknowledged inside
     100ms with a 3% scale (motion.md 2): the one bit of travel a button
     has, and only while held. */
  transition:
    background-color var(--duration-hover) ease,
    border-color var(--duration-hover) ease,
    color var(--duration-hover) ease,
    transform var(--duration-press) var(--ease-out);
  white-space: nowrap;
  /* A button is a button whatever tag it is. An <a class="btn"> was picking
     up the document's link underline and drawing it under the label AND the
     icon, which is what made "Open profile" read as a hyperlink somebody had
     put a box around. */
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active,
.doc-tool:active,
.icon-btn:active {
  transform: scale(0.97);
}
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
/* One rule for every variant, rather than only the filled one. A disabled
   outlined button used to look exactly like an enabled one. */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--brand);
  color: var(--app-bg);
}
.btn-primary:hover {
  background: var(--brand-hover);
}
.btn-primary:active {
  background: var(--brand-active);
}
/* Outlined. The border is the button's own colour at part strength, the way
   an outlined control is built everywhere it is done well -- it used to be
   --border, the hairline that separates table rows, which has no business
   standing in for the edge of something you press. At 18% against the page
   it was there and not there at the same time. */
.btn-secondary {
  background: transparent;
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 42%, transparent);
}
.btn-secondary:hover {
  background: var(--brand-06);
  border-color: var(--brand);
}
.btn-secondary:active {
  background: var(--brand-10);
}
/* Text. No border and no fill until you touch it -- for the action beside a
   real one, where a second outline would give two things equal weight. It
   was being used in two places with no rule behind it at all, so it drew as
   an invisible box. */
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: transparent;
  padding: 0 12px;
}
.btn-ghost:hover {
  background: var(--brand-06);
}
.btn-ghost:active {
  background: var(--brand-10);
}
.btn-danger {
  background: transparent;
  color: var(--destructive);
  border-color: color-mix(in srgb, var(--destructive) 42%, transparent);
}
.btn-danger:hover {
  background: var(--destructive-bg);
  border-color: var(--destructive);
}
.btn-sm {
  height: var(--control-h-sm);
  padding: 0 14px;
  font-size: var(--fs-100);
}
.btn-ghost.btn-sm {
  padding: 0 10px;
}
/* Icons ride at the size of the label's line, never larger -- a 16px glyph
   next to 11px uppercase text is the thing that makes a button look
   assembled rather than designed. */
.btn i {
  font-size: var(--icon-md);
  line-height: 1;
  flex-shrink: 0;
}
.btn-sm i {
  font-size: var(--icon-sm);
}

/* ── Segmented control ── */
.seg {
  display: inline-flex;
  background: var(--gray-100);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}
.seg input {
  display: none;
}
.seg label {
  padding: 7px 14px;
  font-size: var(--fs-100);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--t-fast);
}
.seg label:hover {
  color: var(--brand);
}
.seg input:checked + label {
  background: var(--white);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}
.seg input:checked + label:hover {
  color: var(--brand);
}

/* ── Inline add row ── */
.add-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.add-row input {
  flex: 1;
}

/* ── Connector list ── */
.connector-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.connector-row:last-child {
  border-bottom: none;
}
.connector-name {
  font-weight: 600;
  font-size: var(--fs-200);
  min-width: 140px;
}
.connector-kind {
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--gray-50);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.connector-count {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* Toggle switch */
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-track {
  position: absolute;
  inset: 0;
  background: var(--gray-150);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--t-fast);
}
.switch-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--t-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .switch-track {
  background: var(--brand);
}
.switch input:checked + .switch-track::before {
  transform: translateX(16px);
}
.switch:hover .switch-track {
  background: var(--gray-border);
}
.switch:hover input:checked + .switch-track {
  background: var(--brand-hover);
}

/* ── Company groups ── */
.company-group {
  margin-bottom: 16px;
}
.company-group:last-child {
  margin-bottom: 0;
}
.company-group-title {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-100);
  font-family: var(--font-sans);
}
.tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-placeholder);
  cursor: pointer;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: var(--icon-xs);
}
.tag button:hover {
  background: var(--destructive-bg);
  color: var(--destructive);
}

/* ── Custom sources ── */
.source-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.source-row:last-child {
  border-bottom: none;
}
.source-url {
  flex: 1 1 160px;
  min-width: 160px;
  font-size: var(--fs-200);
  font-family: var(--font-sans);
  overflow-wrap: break-word;
}
.source-row > .alert,
.source-row > .card-hint {
  flex-basis: 100%;
  width: 100%;
}
.badge {
  font-size: var(--fs-100);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge-api {
  background: var(--success-bg);
  color: var(--success-fg);
}
.badge-rss {
  background: var(--brand-tint);
  color: var(--brand);
}
.badge-sitemap {
  background: var(--brand-tint);
  color: var(--brand);
}
.badge-google_fallback {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}
.badge-failed {
  background: var(--destructive-bg);
  color: var(--destructive);
  border: 1px solid var(--destructive-border);
}

/* ── Alerts / status ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--fs-200);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.alert-success {
  background: var(--success-bg);
  color: var(--success-fg);
}
.alert-error {
  background: var(--destructive-bg);
  color: var(--destructive);
  border: 1px solid var(--destructive-border);
}
.alert-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

/* ── Save bar ──
   Sibling of <main>, not a child — its left edge is set from JS to match
   main's own (see alignSaveBars()) so it spans exactly main's column, never
   the sidebar's, and tracks it live across collapse/expand and resize
   instead of a hardcoded offset (which broke the moment the sidebar's own
   width changed, and can't account for it being collapsible at all). */
.save-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  background: var(--app-bg);
  border-top: 1px solid var(--border);
  transition: left var(--duration-drawer) var(--ease-in-out);
  z-index: 50;
}
.save-bar-inner {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
@media (max-width: 900px) {
  .save-bar {
    left: 0 !important;
  }
}
.save-bar-status {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* ── Run section ── */
.run-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.run-count-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: var(--fs-100);
  font-weight: 600;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}
/* When the thing on screen was run. Without it a restored scan is
   indistinguishable from one that just finished, and a result with no date
   on it is a result you cannot trust. */
.run-count-when {
  margin-left: 10px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.icon-spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}


table.results th {
  text-align: left;
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.results td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  max-width: 260px;
}
table.results tr:hover td {
  background: var(--brand-06);
}
table.results a {
  color: var(--brand);
  text-decoration: none;
}
table.results a:hover {
  text-decoration: underline;
}
.sector-pill {
  display: inline-block;
  padding: 2px 8px;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: var(--radius-pill);
  font-size: var(--fs-100);
  font-weight: 600;
}

.empty-state {
  color: var(--text-secondary);
  font-size: var(--fs-200);
  padding: 12px 0;
}

/* No rule for a bare <a> anywhere in this file, so any link that is not part
   of a component gets the browser's blue, which belongs to no palette here. */
a {
  color: var(--brand);
  text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent);
  text-underline-offset: 2px;
  transition: var(--t-fast);
}
a:hover {
  color: var(--brand-hover);
  text-decoration-color: currentColor;
}

body > footer {
  max-width: 940px;
  margin: 40px auto 0;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--fs-100);
  text-align: center;
}

/* ── Application tab ─────────────────────────────────────────────────── */

.app-resume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.app-rules-label {
  display: block;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Each of the three is the start of something, and was not reading as one:
   a bold 14px label with no space above it, sitting between the save button
   of the field before and its own paragraph. A rule and a real heading say
   where one ends and the next begins. */
/* ── Outreach: one card per person ───────────────────────────────────── */
.outreach-picker {
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}
.outreach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
/* A checkbox whose label is a whole sentence. The tick is the control and
   the sentence is what it is about, so the whole thing is the target. */
.outreach-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
}
.outreach-chip.is-on {
  border-color: var(--brand);
  color: var(--text-primary);
}
.outreach-chip input {
  margin-top: 3px;
}

.outreach-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.outreach-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
  transition: var(--t-fast);
}
/* Already written to: still there, still readable, no longer asking. */
.outreach-card.is-sent {
  opacity: 0.55;
}
.outreach-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.outreach-person {
  display: flex;
  flex-direction: column;
}
.outreach-person-name {
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--text-primary);
}
.outreach-person-title {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
textarea.outreach-message {
  min-height: 150px;
}
.outreach-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.outreach-sent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: var(--fs-100);
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── Templates: the text and the variables that go in it ─────────────── */
.template-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
}
.template-editor-fields .rules-field:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.app-rules-textarea.is-tall {
  min-height: 200px;
}
.variable-rail {
  position: sticky;
  top: 84px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}
.variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}
/* A variable reads as the thing it is -- a token you drop in -- so it is
   set in the mono face the preview will show it in, not in the app's. */
.variable-chip {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-050);
  cursor: pointer;
  transition: var(--t-fast);
}
.variable-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.variable-note {
  margin: 0;
  line-height: var(--lh-body);
}
.outreach-kind-tabs {
  position: static;
  padding: 0;
  margin: 0 0 20px;
}

.accomplishment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
/* The number is the variable's name. Showing both, with the token beside
   the field, is how somebody learns that box three is accomplishment_3
   without being told. */
.accomplishment-number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--text-secondary);
  font-size: var(--fs-050);
  font-weight: 600;
}
.accomplishment-var {
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-050);
  color: var(--text-placeholder);
}
input.accomplishment-input {
  width: auto;
  flex: 1 1 auto;
}

@media (max-width: 1100px) {
  .template-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .variable-rail {
    position: static;
  }
  .accomplishment-var {
    display: none;
  }
}

/* The resume on file, above the three fields that describe how it is read. */
.resume-editor {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.resume-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.resume-editor-head .rules-field-hint {
  margin-bottom: 14px;
}

.rules-field {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.rules-field-title {
  display: block;
  margin: 0 0 8px;
  font-size: var(--fs-200);
  font-weight: 600;
  line-height: var(--lh-heading);
  color: var(--text-primary);
}
.rules-field-hint {
  /* A measure, not the full width of a 1200px card. Past about 70
     characters the eye loses the start of the next line. */
  max-width: 70ch;
  margin: 0 0 16px;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
.rules-field-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.app-rules-textarea {
  line-height: var(--lh-body);
  width: 100%;
  min-height: 120px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--fs-200);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  margin-bottom: 8px;
  transition: var(--t-fast);
}
.app-rules-textarea:hover { background: var(--gray-150); }
.app-rules-textarea:focus { background: var(--white); border-color: var(--brand); }

.application-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 12px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.application-card:hover {
  border-color: var(--brand-35);
}
/* Brief highlight when the snackbar's "View" action scrolls to this exact
   card, so it's not just "somewhere in a list you have to scan". */
.application-card.just-sent {
  border-color: var(--success-icon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-fg) 25%, transparent);
}
.application-card-main {
  flex: 1;
  min-width: 0;
}
.application-card-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.application-title {
  font-weight: 600;
  color: var(--text-primary);
}
.application-meta {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-top: 2px;
}
.application-suggestion-count {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-top: 2px;
}

.app-panel-title {
  font-size: var(--fs-400);
  font-weight: 400;
  color: var(--text-primary);
}
.app-panel-subtitle {
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  margin-top: 2px;
}
.app-panel-zoom { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.app-panel-zoom[hidden] { display: none; }
.app-panel-zoom-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  font-size: var(--fs-200);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-panel-zoom-btn:hover { color: var(--text-primary); border-color: var(--border-strong, var(--border)); }
/* ── Resume full-document preview ────────────────────────────────────────
   Mirrors templates/resume.html's real measured typography (font sizes,
   colors, margins pulled straight off the source PDF's character data) --
   the browser handles @font-face font-weight correctly (unlike xhtml2pdf,
   which needed a separate font-family per weight), so this uses normal
   numeric weights against the same Bricolage Grotesque files the PDF uses,
   served from /fonts. */
@font-face { font-family: "Bricolage"; font-weight: 300; src: url("/fonts/BricolageGrotesque-Light.ttf?v=2"); }
@font-face { font-family: "Bricolage"; font-weight: 400; src: url("/fonts/BricolageGrotesque-Regular.ttf?v=2"); }
@font-face { font-family: "Bricolage"; font-weight: 500; src: url("/fonts/BricolageGrotesque-Medium.ttf?v=2"); }
@font-face { font-family: "Bricolage"; font-weight: 700; src: url("/fonts/BricolageGrotesque-Bold.ttf?v=2"); }
@font-face { font-family: "Bricolage"; font-weight: 800; src: url("/fonts/BricolageGrotesque-ExtraBold.ttf?v=2"); }

.resume-preview {
  font-family: "Bricolage", sans-serif;
  font-weight: 300;
  color: #434343;
  font-size: 9pt;
  line-height: 1.45;
  background: #fff;
  padding: 1.2cm 1.8cm 2.2cm 1.8cm;
  max-width: 21cm;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
/* Body text renders at 300 (Light). Without this, the browser's own
   "bolder" step from a 300 base lands on 400 (Regular) -- barely
   distinguishable from the surrounding text, not what execCommand('bold')
   in the cover-letter editor should produce. 700 is the actual "Bold" cut
   of this family (matches Bricolage-Bold in the PDF -- see
   templates/cover_letter.html), one real step short of the 800 ExtraBold
   used for headings, not just the next-lightest default the browser would
   pick on its own. */
.resume-preview strong, .resume-preview b { font-weight: 700; }
.resume-preview table.header-row, .resume-preview table.header-row tr, .resume-preview table.header-row td { color: #434343; }
.resume-preview table.header-row { width: 100%; border-collapse: collapse; }
.resume-preview table.header-row td.header-contact { white-space: nowrap; }
.resume-preview .header-name { font-weight: 700; font-size: 16pt; color: #434343; }
.resume-preview .header-title { font-weight: 300; font-size: 8.5pt; color: #434343; margin-top: 2px; }
.resume-preview .header-contact { text-align: right; font-size: 9pt; color: #434343; font-weight: 500; }
.resume-preview .header-contact div { margin-bottom: 2px; }
.resume-preview .header-contact .label { font-weight: 800; color: #434343; }
.resume-preview .header-contact a { color: #3c78d8; text-decoration: none; }
.resume-preview .summary { margin-top: 26px; font-size: 9pt; }
/* line-height pinned, not inherited. The app's `h1, h2, h3` rule gained one
   this session (120%, from the type scale), and this heading had been
   taking the 1.45 the preview sets on itself -- which is the leading the
   resume that predates the templates was laid out with. That resume is not
   supposed to move. */
.resume-preview h2.section { font-weight: 700; font-size: 10pt; line-height: 1.45; color: #434343; margin: 18px 0 8px; text-transform: uppercase; }
.resume-preview .entry { margin-bottom: 12px; }
.resume-preview .entry-title { font-weight: 500; font-size: 12pt; color: #434343; }
.resume-preview .entry-meta { font-weight: 400; font-size: 10pt; color: #434343; margin-bottom: 4px; }
.resume-preview .entry-context { font-size: 9pt; color: #666666; margin-bottom: 6px; }
.resume-preview ul.bullets, .resume-preview ul.plain { margin: 4px 0 0; padding-left: 16px; }
.resume-preview ul.bullets li, .resume-preview ul.plain li { font-size: 9pt; margin-bottom: 3px; }
.resume-preview .em { font-weight: 500; }
/* The CV tab's bold is the browser's bold command, and the browser only
   calls text bold from 600 up: at the resume's own 500 it could neither show
   the B as pressed nor take bold back off, and what it added came out 700.
   So inside the editable lines every bold run -- the resume's own .em and
   the <b> the command adds -- is asked for at 600, and 600 in this face is
   the Medium file: what the PDF prints for ** and what was already there. */
@font-face { font-family: "Bricolage Emphasis"; font-weight: 600; src: url("/fonts/BricolageGrotesque-Medium.ttf?v=2"); }
#app-panel-body .resume-preview [data-block] :is(.em, b, strong) {
  font-family: "Bricolage Emphasis", "Bricolage", sans-serif;
  font-weight: 600;
}
/* Taking bold off writes font-weight:normal on the run, which is 400 --
   Regular, a step heavier than the Light the rest of the line is set in. */
#app-panel-body .resume-preview [data-block] [style*="font-weight: normal"] {
  font-family: "Bricolage", sans-serif;
  font-weight: inherit !important;
}
.resume-preview .skill-line { margin-bottom: 3px; }
.resume-preview .skill-cat { font-weight: 500; }
.resume-preview .tools-line { font-size: 9pt; }
/* Cover letter reuses .resume-preview wholesale (same header/base rules
   above) -- only its own body content needs new rules. */
.resume-preview .cover-letter-body { margin-top: 26px; font-size: 9pt; }
.resume-preview .cover-letter-body p { margin: 0 0 12px 0; }
.resume-preview .cover-letter-body p.cover-closing { margin-top: 12px; }
.resume-preview .cover-letter-bullets { margin: 4px 0 12px 0; padding-left: 16px; }
.resume-preview .cover-letter-bullets li { font-size: 9pt; margin-bottom: 3px; }

/* Only the words a suggestion actually changed get this -- an inline mark,
   not a box around the whole line, and never the struck-through original
   (flag where a change was made, not what was cut). Colors are hardcoded
   (not theme variables): .resume-preview is a fixed white "paper" regardless
   of the site's own light/dark theme, so theme-adaptive colors (calibrated
   for the app's own dark background) read as low-contrast or invisible here
   -- confirmed live on the italic reason text before it was made hardcoded
   and moved into the popover instead of sitting inline. */
/* On the paper, the highlight is drawn against the template's own type
   rather than replacing it. */
.resume-paper .resume-edit-new {
  font: inherit;
  color: inherit;
}
.resume-edit-new {
  cursor: pointer;
  padding: 0 1px;
  border-radius: 2px;
}
/* Pending: not yet reviewed, won't be in the download -- orange, derived
   from the same terracotta (var(--destructive)) used for the gaps list, so "orange" and
   "not yet resolved" read as the same signal across the whole panel. */
.resume-edit-new.is-pending { background: color-mix(in srgb, var(--destructive) 25%, transparent); border-bottom: 2px solid var(--destructive); }
.resume-edit-new.is-pending:hover { background: color-mix(in srgb, var(--destructive) 40%, transparent); }
/* Accepted: reviewed and will be in the download -- the original green. */
.resume-edit-new.is-accepted { background: color-mix(in srgb, var(--success-fg) 25%, transparent); border-bottom: 2px solid var(--success-fg); }
.resume-edit-new.is-accepted:hover { background: color-mix(in srgb, var(--success-fg) 40%, transparent); }

.suggestion-popover {
  position: fixed;
  z-index: 300;
  width: 640px;
  max-width: calc(100vw - 32px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brand-soft);
  padding: 14px;
}
.suggestion-popover-handle {
  text-align: center;
  color: var(--text-placeholder);
  font-size: var(--icon-md);
  line-height: 1;
  padding: 2px 0 10px;
  cursor: move;
  user-select: none;
}
.suggestion-popover-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.suggestion-popover-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.suggestion-popover-label {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.suggestion-popover-card {
  width: 100%;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: var(--fs-100);
  line-height: 1.2;
}
.suggestion-popover-original {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.suggestion-popover-textarea {
  background: transparent;
  border: 1px solid var(--border);
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
}
.suggestion-popover-textarea:focus { border-color: var(--brand); }
.suggestion-popover-reason {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.3;
}
.suggestion-popover-reason strong { color: var(--text-primary); }
.suggestion-popover-then {
  margin: 0 6px;
  color: var(--text-tertiary, var(--text-secondary));
  font-style: italic;
}
.suggestion-popover-removed {
  color: var(--text-secondary);
  font-style: italic;
}
.suggestion-popover-revise { margin-top: 10px; }
.suggestion-popover-revise .field-actions { margin-top: 6px; }
/* A line a request takes out: struck through until it is accepted, and
   still there to click, so the removal can be turned down. */
.resume-edit-new.is-removal { text-decoration: line-through; text-decoration-thickness: 1px; }
.suggestion-popover-confirm, .suggestion-popover-flag {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: var(--fs-100);
  line-height: 1.3;
  margin-top: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--destructive-bg);
  color: var(--destructive-body);
}
.suggestion-popover-confirm strong { color: inherit; }
.suggestion-popover-flag {
  margin-top: 6px;
  background: var(--gray-100, rgba(128,128,128,0.12));
  color: var(--text-secondary);
}
.suggestion-popover-confirm i, .suggestion-popover-flag i { margin-top: 1px; }
/* Pending and resting on a fact you haven't confirmed: dashed, so it reads
   as a question on the page, not as one more edit to wave through. */
.resume-edit-new.is-pending.needs-reading { border-bottom-style: dashed; }
.suggestion-popover-quote {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
  line-height: 1.3;
}
.suggestion-popover-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

/* ── Application single view (CV / Connections / Cover Letter tabs) ───────
   Not a modal -- the user explicitly asked for this to load like any other
   page in <main>, with a back arrow, not a floating overlay. Lives as a
   sibling of #application-list-view inside #tab-application; the two swap
   [hidden] depending on whether an application is open. Only one
   .av-subpanel is visible at a time, toggled by the tab bar below the
   header. Each subpanel keeps its content-specific classes as before
   (.connections-modal-body, .cover-letter-body, etc.) unchanged. */
#application-single-view {
  /* 1220 of usable width. main's own max-width (1240 minus its 24px
     gutters) capped this at 1192, so the box is widened here and main is
     let out to match, only while this view is the one on screen. */
  width: 1220px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  /* No overflow:hidden here: it would make this box the scroll container for
     everything inside, and position:sticky measured against a box that never
     scrolls simply doesn't stick (same trap the data grid hit). The rounded
     corners are kept by clipping the first/last children instead. */
}
#application-single-view > .av-header {
  border-top-left-radius: var(--radius-card);
  border-top-right-radius: var(--radius-card);
}
#application-single-view > .av-subpanel:last-child,
#application-single-view > .av-subpanel:last-child {
  border-bottom-left-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
}
#application-single-view[hidden] { display: none; }
.av-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.av-header-title { flex: 1; min-width: 0; }
.av-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  /* Sticks under the navbar so tab switching and zoom stay reachable while
     reading a long resume; the .av-header above it scrolls away and comes
     back when you return to the top. */
  position: sticky;
  top: 56px; /* navbar height */
  z-index: 20;
  background: var(--app-bg);
}
/* Zoom lives in this bar now (it used to sit up in the header, which scrolls
   away) -- pushed to the far right, opposite the tabs. */
.av-tabs .app-panel-zoom { margin-left: auto; }
.av-tab-btn {
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-200);
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-fast);
}
.av-tab-btn:hover { color: var(--text-primary); }
.av-tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.av-subpanel { display: none; flex-direction: column; }
.av-subpanel.active { display: flex; }
/* The line that introduces a tab. Aligned to the same 24px gutter the body
   below it uses: an intro that starts at the dialog's edge while the content
   starts inside it reads as a stray sentence somebody left there, which is
   what the Outreach tab's did -- it had no rule of its own at all and
   inherited a header style meant for a line inside the header. Capped at a
   reading measure, because this is prose and prose run to the full width of
   a 1200px dialog is two very long lines nobody finishes. */
.av-subpanel-intro {
  flex-shrink: 0;
  margin: 0;
  padding: 16px 24px 4px;
  max-width: 82ch;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
#cover-letter-modal-download-btn[hidden] { display: none; }
/* ── The CV tab's action bar ── */
.doc-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
}
.doc-bar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.doc-bar-group + .doc-bar-status { margin-left: 4px; }
.doc-bar-status {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-100);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-bar-group[aria-label="Document"] { gap: 8px; }
.doc-bar-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--border);
}
/* A tool, not a command: square, borderless, the size of the line it
   sits on. Pressed is a fill, the way every editor shows a style that is on. */
.doc-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
}
.doc-tool { transition: background-color var(--duration-hover) ease, color var(--duration-hover) ease, transform var(--duration-press) var(--ease-out); }
.doc-tool i { font-size: 18px; }
.doc-tool:hover { background: var(--gray-100); color: var(--text-primary); }
.doc-tool[aria-pressed="true"] { background: var(--gray-150); color: var(--text-primary); }
.doc-tool:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
/* Holds the tooltip for a button that may be disabled, since a disabled
   button takes no pointer and would never show its own. */
.tip-wrap { display: inline-flex; }
.doc-bar [hidden] { display: none; }

/* Editable state affordance -- a dashed inset outline so it's clear this
   text is meant to be clicked into, without borrowing the solid focus
   ring used elsewhere for form controls (this sits inside a PDF-styled
   preview, a solid border there would look like a broken layout box). */
.resume-preview .cover-letter-body {
  outline: 1px dashed transparent;
  outline-offset: 6px;
  border-radius: 2px;
  transition: outline-color var(--t-fast);
}
.resume-preview .cover-letter-body[contenteditable="true"]:hover {
  outline-color: var(--border-strong, var(--border));
}
.resume-preview .cover-letter-body[contenteditable="true"]:focus {
  outline-color: var(--brand);
  outline-style: solid;
}
.av-subpanel-content {
  display: flex;
  align-items: flex-start;
}
.av-subpanel-body {
  flex: 1;
  min-width: 0;
  padding: 24px;
}
.app-panel-sidebar {
  /* The extra width goes here, not to the resume: this column holds the
     analysis prose, which was wrapping every few words at 286px. The
     resume itself is capped at 21cm and doesn't want more room anyway. */
  width: 380px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  /* Sticks alongside the tab bar (56px navbar + 45px tabs). A column, not a
     scroller: the reading part scrolls on its own and the composer stays
     pinned at the foot, the way a writing tool keeps its prompt in reach. */
  position: sticky;
  top: 101px;
  align-self: flex-start;
  max-height: calc(100vh - 101px);
  display: flex;
  flex-direction: column;
}
.app-panel-scroll {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 24px;
  /* Without this, reaching either end of this panel hands the wheel back to
     the page, so scrolling the analysis drags the resume along with it. */
  overscroll-behavior: contain;
}
.fit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.fit-head-title {
  font-size: var(--fs-200);
  font-weight: 500;
  color: var(--text-primary);
}
.fit-head .btn-ghost { margin-right: -10px; }
/* The panel's header already names this; the title renderGaps draws
   would say it twice. */
.app-panel-gaps > .app-panel-gaps-title { display: none; }

/* The queue of edits waiting on you. Tinted, not outlined: it is the one
   thing in the panel that asks for a decision. */
.edits-review {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--brand-06);
  border: 1px solid var(--brand-10);
}
.edits-review[hidden] { display: none; }
.edits-review-text { display: flex; flex-direction: column; gap: 2px; }
.edits-review-count {
  font-size: var(--fs-200);
  font-weight: 500;
  color: var(--text-primary);
}
.edits-review-note {
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
.edits-review-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}
.edits-review-actions .btn-secondary { margin-right: 4px; }

/* The bar's right end: the tab's one final action, and what it will hold. */
.doc-bar-export {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.doc-bar-export-note {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  white-space: nowrap;
}
.doc-bar-save[hidden] { display: none; }
.app-panel-gaps-title {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.app-panel-gaps-empty {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
.app-panel-gaps-group + .app-panel-gaps-group { margin-top: 14px; }
.app-panel-gaps-group-label {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.gap-fill { margin-top: 8px; }
.gap-fill-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.gap-fill-status {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  line-height: 1.3;
}

.gap-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.gap-tally {
  font-size: var(--fs-100);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: var(--t-fast);
}
.gap-tally:hover { border-color: currentColor; }
.gap-tally.active { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.gap-tally.is-strong { background: color-mix(in srgb, var(--success-fg) 22%, transparent); color: var(--success-body); }
.gap-tally.is-partial { background: color-mix(in srgb, var(--destructive) 18%, transparent); color: var(--destructive-body); }
.gap-tally.is-missing { background: var(--gray-100, rgba(128,128,128,0.15)); color: var(--text-secondary); }
/* The ratings are older than your edits: one line, and the way to fix it. */
.gap-recheck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -4px 0 12px;
  padding: 8px 8px 8px 12px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
}
.gap-recheck-text {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
.gap-recheck .btn {
  flex-shrink: 0;
}
.gap-summary-note {
  flex-basis: 100%;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
/* The posting's own words, under the two lines about them. The quote is
   what carries the detail now, so the prose above it does not have to. */
.risk-quote {
  position: relative;
  margin: 8px 0 0;
  padding: 6px 30px 6px 10px;
  border-left: 2px solid currentColor;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, currentColor 6%, transparent);
  font-size: var(--fs-100);
  font-style: italic;
  line-height: var(--lh-body);
  opacity: 0.9;
}
/* Said once, above the three unaddressed messages, so a copy button that
   works is not mistaken for a tab that failed. */
/* Inside the subpanel body, which already carries the 24px gutter -- so no
   padding of its own, or it lands 48 from the edge while the card under it
   lands at 24. */
.outreach-unaddressed-note {
  margin: 0 0 16px;
  max-width: 82ch;
}
/* A variable that resolved to nothing does not print anything, so the only
   place it can be reported is here. */
.outreach-unaddressed-note.is-warning {
  color: var(--destructive-body);
}
.outreach-unaddressed-note code {
  font-family: var(--font-sans);
  font-weight: 600;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

/* ── Posting tab ── */
.posting-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.posting-search-field { flex: 0 1 320px; }
/* The posting's own markup, typeset by .site-pane-article -- the same rules
   the preview pane beside the job list uses, so a posting reads the same
   way wherever you open it. Nothing here but the two things that differ:
   the article is already inside a scrolling panel, and the measure has a
   gutter of its own. */
.posting-text .site-pane-article {
  padding: 4px 0 40px;
}
.posting-text .site-pane-status,
.posting-text .app-panel-gaps-empty {
  padding: 20px 0;
  color: var(--text-secondary);
}
/* A highlighter, and the same one in both themes: a mark is meant to look
   like ink laid over the page, so it stays bright with dark text on it
   rather than inverting with everything else. The hue is the amber the
   design system already has as a category. */
.posting-hit {
  padding: 1px 2px;
  border-radius: 3px;
  background: oklch(86% 0.13 var(--cat-5-h));
  color: oklch(30% 0.08 var(--cat-5-h));
}

/* Work in progress, not an answer. A slow breath rather than a spinner:
   this runs for a minute or two, and a spinner that long reads as stuck. */
.app-panel-gaps-empty.is-working {
  animation: working-pulse 1.8s ease-in-out infinite;
}
@keyframes working-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .app-panel-gaps-empty.is-working { animation: none; }
}

.app-panel-gaps-subtitle {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  margin: 16px 0 8px;
}
/* ── One field, everywhere in the application view ── */
/* The app's own field: filled, no outline until you are in it. Every box
   you type into on these tabs is this one now -- there were three, a white
   pill, a bordered rectangle and a filled one, with no difference in what
   they did. */
.field-textarea,
.gap-fill-input {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: var(--t-fast);
}
.field-textarea::placeholder,
.gap-fill-input::placeholder { color: var(--text-secondary); }
.field-textarea:hover,
.gap-fill-input:hover { background: var(--gray-150); }
.field-textarea:focus,
.gap-fill-input:focus { background: var(--white); border-color: var(--brand); }
/* Actions sit at the end of the line, the primary one last, with the
   status of the last attempt taking the room on the left. */
.field-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.field-actions[hidden] { display: none; }
.field-status {
  margin-right: auto;
  font-size: var(--fs-100);
  line-height: 1.3;
  color: var(--text-secondary);
}
.field-status.is-working { animation: working-pulse 1.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .field-status.is-working { animation: none; }
}

/* ── Change the resume: the CV tab's one operation ── */
.resume-request {
  flex-shrink: 0;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--border);
  background: var(--app-bg);
}
/* Folded: only the prompt line shows. Open: where, what, and Write it. */
.resume-request:not(.is-open) > :not(.field-textarea):not(.field-actions),
.resume-request:not(.is-open) .field-actions .btn { display: none; }
.resume-request:not(.is-open) .field-textarea { min-height: 0; height: 44px; resize: none; }
.resume-request:not(.is-open) .field-actions:not(:has(.field-status:not(:empty))) { display: none; }
.resume-request-title {
  margin: 0 0 10px;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-primary);
}
.resume-request-label {
  display: block;
  margin: 10px 0 4px;
  font-size: var(--fs-050);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.resume-request-label:first-of-type { margin-top: 0; }
.resume-request .select-wrap { width: 100%; }
/* Job names run long; the end of one is the part you can lose. */
.resume-request .select-button { font-size: var(--fs-100); }
.resume-request .select-button-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The picked line, quoted, so you can see what you are about to change
   without looking back at the page. */
.resume-request-line {
  margin: 8px 0 0;
  padding: 2px 0 2px 10px;
  border-left: 2px solid var(--border-strong);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resume-request-line[hidden] { display: none; }
/* Several lines picked for one request: each on its own, numbered the
   way the request refers to them. */
.resume-request-line:has(.resume-request-line-item) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.resume-request-line-item {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resume-request-line-item b {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}
.resume-request-line.is-empty {
  border-left-style: dashed;
  color: var(--text-secondary);
}
.resume-request-for {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 6px 6px 10px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  font-size: var(--fs-100);
  line-height: 1.35;
  color: var(--text-primary);
}
.resume-request-for[hidden] { display: none; }
.resume-request-for-text { flex: 1; min-width: 0; }
.resume-request-for-clear {
  flex-shrink: 0;
  display: inline-flex;
  padding: 3px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.resume-request-for-clear:hover { background: var(--gray-150); color: var(--text-primary); }

/* The line picked for a request, marked in the resume itself. An outline
   rather than a fill, so it never reads as one of the highlighted edits. */
#app-panel-body [data-block].is-picked {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── The analysis, as read-only cards ── */
/* The page's own surface and a hairline, whatever the card says. How bad
   it is goes in the badge, as a word with a dot -- colour that carries
   meaning on its own is lost on anyone who can't tell the two apart. */
.match-item {
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--app-bg);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-primary);
}
.match-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.match-item-title { font-weight: 600; }
.match-item-note {
  margin: 4px 0 0;
  color: var(--text-secondary);
}
.match-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  font-size: var(--fs-050);
  line-height: 20px;
  white-space: nowrap;
  color: var(--text-primary);
}
.match-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary);
}
.match-badge.is-bad .match-badge-dot { background: var(--destructive); }
.match-badge.is-warn .match-badge-dot { background: oklch(70% 0.14 var(--cat-5-h)); }
.match-badge.is-good .match-badge-dot { background: var(--success-fg); }
.match-quote {
  position: relative;
  margin: 8px 0 0;
  padding: 2px 30px 2px 10px;
  border-left: 2px solid var(--border-strong);
  font-style: italic;
  color: var(--text-secondary);
}
.match-quote-find {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  padding: 4px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
}
.match-quote-find:hover { background: var(--gray-100); color: var(--text-primary); }
.match-quote-find i { font-size: var(--icon-sm); }
.match-item-plan {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
}
.match-item-plan-label {
  display: block;
  font-size: var(--fs-050);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.match-item-actions {
  display: flex;
  justify-content: flex-end;
  margin: 6px -6px -4px 0;
}

/* ── Dragging a line to another place ── */
.resume-drag-handle {
  position: fixed;
  /* Over the application dialog (200), under the suggestion popover (300). */
  z-index: 250;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: grab;
  touch-action: none;
}
.resume-drag-handle[hidden] { display: none; }
.resume-drag-handle:hover { background: var(--gray-100); color: var(--text-primary); }
.resume-drag-handle i { font-size: 18px; pointer-events: none; }
body.is-reordering,
body.is-reordering * { cursor: grabbing !important; user-select: none; }
#app-panel-body li.is-dragging {
  background: var(--brand-tint);
  outline: 1px dashed var(--border-strong);
  outline-offset: 2px;
}

/* ── Fit tab: the plan for a risk ── */
.fit-risk-plan { margin-top: 8px; }
.fit-risk-plan .field-actions { margin-top: 6px; }
.fit-risk-plan > .field-actions { margin-right: -6px; }


/* ── Snackbar ─────────────────────────────────────────────────────────────
   Bottom-left toast for "thing happened, here's a shortcut" moments (e.g.
   "sent to Application" + a button that jumps straight to that card). */
/* Card whose fit analysis is still running (server-side analyzing_since). */
.application-card.is-analyzing .application-suggestion-count::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.snackbar {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 12px 12px 16px;
  background: var(--brand-active, var(--text-primary));
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brand-soft);
  opacity: 0;
  transform: translateY(12px);
  /* A toast: enters from below, where it lives (motion.md 9). Transform and
     opacity on separate clocks, the effect the shorter of the two (7). */
  transition:
    transform var(--duration-modal) var(--ease-out),
    opacity var(--duration-dropdown) ease-out;
  pointer-events: none;
}
.snackbar[hidden] { display: none; }
/* Work still in flight (fit analysis, which runs for a minute or two): the
   toast has no timeout in this state, so it needs to look alive rather than
   stuck. */
.snackbar.snackbar-pending .snackbar-message::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
  /* currentColor, never a hardcoded white: this toast's background is the
     brand tone, which is DARK in the light theme and LIGHT in the dark one.
     White-on-brand measured 1.29:1 here (the ring was effectively
     invisible); riding on the message's own color keeps it legible in both. */
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.snackbar.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.snackbar-message {
  font-size: var(--fs-100);
  line-height: 1.4;
}
.snackbar-action {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-100);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}
.snackbar-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
  /* Was rgba(255,255,255,.6) -- white on this toast's brand background
     measured 1.63:1, well under the 3:1 an icon control needs. Riding on
     the message color instead measures 4.36:1 and holds in both themes. */
  color: color-mix(in srgb, currentColor 75%, transparent);
  cursor: pointer;
  font-size: var(--icon-sm);
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.snackbar-dismiss:hover {
  color: currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* ── Job posting preview pane -- overlays the right 50% of the screen,
   slides in/out, dims the rest via a backdrop that also closes it on
   click (Escape and the X button do too). ── */
.site-pane-backdrop {
  position: fixed;
  top: 56px; /* navbar height */
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 190;
  opacity: 0;
  transition: opacity var(--duration-drawer) ease-out;
}
.site-pane-backdrop:not(.open) { transition-duration: var(--duration-drawer-exit); }
.site-pane-backdrop.open {
  opacity: 1;
}
.site-pane-backdrop[hidden] {
  display: none;
}
.site-pane {
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  width: 50vw;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.3);
  z-index: 200;
  transform: translateX(100%);
  transition: transform var(--duration-drawer) var(--ease-drawer);
}
/* Leaves the way it came, faster: the decision is already made. */
.site-pane:not(.open) { transition-duration: var(--duration-drawer-exit); }
.site-pane.open {
  transform: translateX(0);
}
.site-pane[hidden] {
  display: none;
}
.site-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.site-pane-title {
  min-width: 0;
  font-weight: 600;
  font-size: var(--fs-200);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-pane-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.site-pane-actions a.icon-btn {
  text-decoration: none;
}
/* Holds the server-fetched posting (see /api/job-preview) -- this used to be
   an iframe, which every major ATS blocks with X-Frame-Options: DENY. */
.site-pane-body {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  background: var(--app-bg);
}
.site-pane-status {
  padding: 32px 28px;
  color: var(--text-secondary);
  font-size: var(--fs-200);
  line-height: 1.6;
}
.site-pane-status a { color: var(--brand); }
.site-pane-article {
  max-width: 62ch;
  margin: 0 auto;
  padding: 28px 28px 64px;
  color: var(--text-primary);
  font-size: var(--fs-200);
  line-height: 1.65;
}
.site-pane-article h1,
.site-pane-article h2,
.site-pane-article h3,
.site-pane-article h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-250);
  color: var(--text-primary);
  margin: 26px 0 8px;
}
.site-pane-article h1:first-child,
.site-pane-article h2:first-child,
.site-pane-article h3:first-child { margin-top: 0; }
.site-pane-article p { margin: 0 0 14px; }
.site-pane-article ul,
.site-pane-article ol { margin: 0 0 14px; padding-left: 20px; }
.site-pane-article li { margin-bottom: 6px; }
.site-pane-article a { color: var(--brand); }
.site-pane-article strong, .site-pane-article b { font-weight: 600; }
.site-pane-article hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

/* ── Connections tab content ─────────────────────────────────────────────
   Deliberately small and simple: this only ever holds a handful of static
   deep-link cards (see the HTML comment above its markup for why there's
   no live LinkedIn data here). Lives inside #av-panel-connections, one of
   the application-view's .av-subpanel tabs (see above). */
.connections-modal-subtitle {
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  /* Same 20px gutter as the input row and the cards below it. It had none,
     so it started 20px to their left and ran to a 380px measure of its own,
     which read as a third column nothing else lined up with. */
  padding: 16px 24px 4px;
  max-width: 82ch;
}
.connections-modal-linkedin-row {
  display: flex;
  gap: 8px;
  padding: 14px 20px 0;
  flex-shrink: 0;
}
.connections-modal-linkedin-row input {
  flex: 1;
  min-width: 0;
}
.connections-modal-linkedin-hint {
  padding: 6px 20px 0;
  font-size: var(--fs-100);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.connections-modal-body {
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.connection-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.connection-card-info { min-width: 0; }
.connection-card-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-100);
  font-weight: 600;
  margin-bottom: 6px;
}
/* --brand-tint is rgb(245,242,237) on light -- all but identical to the
   card it sits on, so this tag had no shape at all while the other two
   did, and the row read as misaligned. */
.connection-tag-designer { background: var(--brand-10); color: var(--brand); }
.connection-tag-recruiter { background: var(--warn-bg); color: var(--warn); }
.connection-tag-hiring-manager { background: color-mix(in srgb, var(--success-fg) 14%, transparent); color: var(--success-fg); }
.connection-card-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--fs-200);
}
.connection-card-desc {
  color: var(--text-secondary);
  font-size: var(--fs-100);
  margin-top: 2px;
}
/* Now just .btn.btn-secondary.btn-sm like every other button -- it used to
   carry its own padding, radius, weight and hover, which is why it read as
   a different kind of control from the rest of the app. */
.connection-card-link {
  flex-shrink: 0;
  text-decoration: none;
}

/* ── Fit tab ── the analysis as a decision document: verdict, then the
   tables backing it. Reading layout (measure-capped prose, scannable
   tables), not the action-oriented side panel of the CV tab. */
.fit-doc { max-width: 900px; padding: 4px 0 40px; }
.fit-heading {
  font-family: var(--font-sans);
  font-size: var(--fs-250);
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}
.fit-heading:first-child { margin-top: 0; }
.fit-verdict {
  font-size: var(--fs-250);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gray-50);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
  padding: 14px 16px;
  margin: 0;
  max-width: 68ch;
}
.fit-empty { color: var(--text-secondary); font-size: var(--fs-200); }
.fit-table-wrap { overflow-x: auto; }
.fit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-100);
  line-height: 1.45;
}
.fit-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.fit-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-primary);
}
.fit-table tr:last-child td { border-bottom: none; }
.fit-table td:first-child { font-weight: 600; }
/* ── Fit: the number ── */
/* One figure and a bar, at the top, because it is the thing somebody came
   to the tab for. The caption says what it measures and what it leaves out;
   a score nobody can explain is a score nobody should act on. */
.fit-score {
  margin-bottom: 28px;
  max-width: 68ch;
}
.fit-score-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.fit-score-band {
  font-size: var(--fs-300);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.fit-score-band.is-strong { color: var(--success-fg); }
.fit-score-band.is-good { color: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-2-h)); }
.fit-score-band.is-mixed { color: oklch(var(--cat-ink-l) var(--cat-ink-c) var(--cat-5-h)); }
.fit-score-band.is-weak { color: var(--destructive); }
.fit-score-number {
  margin-left: auto;
  font-size: var(--fs-300);
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.fit-score-outof {
  font-size: var(--fs-100);
  font-weight: 400;
  color: var(--text-secondary);
}
.fit-meter {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  overflow: hidden;
}
.fit-meter-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width var(--t-default);
}
.fit-meter-fill.is-strong { background: var(--success-fg); }
.fit-meter-fill.is-good { background: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-2-h)); }
.fit-meter-fill.is-mixed { background: oklch(var(--cat-solid-l) var(--cat-solid-c) var(--cat-5-h)); }
.fit-meter-fill.is-weak { background: var(--destructive); }
.fit-score-caption {
  margin: 10px 0 0;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}

/* ── Fit: what is covered ── */
/* Chips, not rows. These are the requirements with nothing to do about
   them, and on a posting with sixteen of them a table of sixteen rows is
   sixteen rows to read past on the way to the four that need something. */
.fit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.fit-chip {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success-body);
  border: 1px solid color-mix(in srgb, var(--success-fg) 30%, transparent);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
}
.fit-covered > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--brand);
  font-size: var(--fs-100);
}
.fit-covered > summary::-webkit-details-marker { display: none; }
.fit-covered > summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-fast);
}
.fit-covered[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.fit-covered > summary:hover { text-decoration: underline; }

/* ── Fit: risks ── */
/* Prose, not a table row. A risk is an argument -- what collides with what,
   and the posting's own words under it -- and an argument wrapped into a
   table cell three words wide is one nobody finishes. */
.fit-risks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 76ch;
}
.fit-risk {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.fit-risk.is-high {
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  border-color: color-mix(in srgb, var(--destructive) 38%, transparent);
  color: var(--destructive-body);
}
.fit-risk.is-medium {
  background: color-mix(in srgb, var(--destructive) 4%, transparent);
  border-color: color-mix(in srgb, var(--destructive) 18%, transparent);
}
.fit-risk-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.fit-risk-title {
  margin: 0;
  font-size: var(--fs-200);
  font-weight: 400;
  line-height: var(--lh-heading);
  color: inherit;
}
.fit-risk-why {
  margin: 6px 0 0;
  font-size: var(--fs-200);
  line-height: var(--lh-body);
}
.fit-risk-reply {
  margin: 8px 0 0;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  opacity: 0.85;
}

/* ── Fit: the change that answers a shortfall ── */
.fit-change {
  display: block;
  padding-bottom: 8px;
}
.fit-change + .fit-change {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.fit-change-where {
  display: block;
  font-size: var(--fs-050);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.fit-change.is-accepted .fit-change-where { color: var(--success-fg); }
.fit-change-why {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

.fit-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: var(--fs-050);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.fit-level, .fit-sev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.fit-level.is-strong { background: color-mix(in srgb, var(--success-fg) 22%, transparent); color: var(--success-body); }
.fit-level.is-partial { background: color-mix(in srgb, var(--destructive) 18%, transparent); color: var(--destructive-body); }
.fit-level.is-missing { background: var(--gray-100, rgba(128,128,128,0.15)); color: var(--text-secondary); }
.fit-sev.is-high { background: color-mix(in srgb, var(--destructive) 24%, transparent); color: var(--destructive-body); }
.fit-sev.is-medium { background: color-mix(in srgb, var(--destructive) 12%, transparent); color: var(--destructive-body); }
.fit-sev.is-low { background: var(--gray-100, rgba(128,128,128,0.15)); color: var(--text-secondary); }
.fit-was, .fit-now { display: block; }
.fit-was { color: var(--text-secondary); text-decoration: line-through; margin-bottom: 4px; }
.fit-now { color: var(--text-primary); }
.fit-gap-action { color: var(--text-secondary); }
.fit-gap-kind {
  display: block;
  font-size: var(--fs-050);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.fit-gap-kind.is-needs_evidence { color: var(--destructive-body); }
.fit-change-confirm, .fit-change-flag {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-100);
  color: var(--destructive-body);
}
.fit-change-flag { color: var(--text-secondary); }

.from-url-jobs { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-100); }
.from-url-jobs li { margin-bottom: 4px; }
.from-url-jobs a { color: var(--brand); }

/* ── Scan health ────────────────────────────────────────────────────────
   Sits beside the "Last updated" stamp. Green-ish and quiet when every
   source answered; amber and clickable when some didn't, because a source
   going dark otherwise shows up only as a shorter list. */
.scan-health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  /* Not --text-placeholder, which the hint text beside it uses: at this size
     that token only reaches 2.2:1 on the page, and this line has to be
     readable to be worth showing. --text-secondary is 7.2:1 light, 6.3:1
     dark. The failure state measures 5.4:1 light, 6.9:1 dark. */
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--fs-100);
  cursor: default;
  transition: var(--t-fast);
}
.scan-health i {
  /* The text's own size, so the circle sits about as tall as the digits
     beside it. At --icon-sm it read as a bullet, smaller than the number. */
  font-size: var(--icon-md);
  color: var(--success-icon);
}
.scan-health.has-failures {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn);
  cursor: pointer;
}
.scan-health.has-failures i {
  color: var(--warn);
}
.scan-health.has-failures:hover {
  border-color: var(--warn);
}
.scan-health-detail-panel {
  margin: -4px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  max-height: 260px;
  overflow-y: auto;
}
.scan-health-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 3px 0;
  font-size: var(--fs-100);
}
/* The panel is a list of what came back now, so it needs a scroll of its
   own -- two hundred sources is not a dropdown. */
.scan-health-detail-panel {
  max-height: 320px;
  overflow-y: auto;
}
.scan-health-row.is-failed .scan-health-source { color: var(--destructive); }
/* The line that says what the chip's number is made of, above the per-source
   lines that will not add up to it on their own. */
.scan-health-row.is-total {
  font-weight: 600;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.scan-health-row.is-quiet { color: var(--text-secondary); font-style: italic; }

.scan-health-source {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-weight: 500;
}
.scan-health-detail {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* main is capped at 1240 for reading width, which is right for every page
   except the application single view -- that one is a working surface with
   a resume and an analysis column side by side, and asks for 1220 of
   content (1268 minus main's 24px gutters). */
main:has(#application-single-view:not([hidden])) {
  max-width: 1268px;
}
/* The shell is capped at 1440 for every other page, which leaves main about
   1140 once the nav column is out -- the single view could never actually
   reach its 1220 no matter what it asked for. Let out only here, and only as
   far as the window allows: on a narrower screen this view still just fits
   the space there is. */
.app-shell:has(#application-single-view:not([hidden])) {
  max-width: 1600px;
}

/* Editable resume blocks -- same dashed affordance as the cover letter body:
   it has to read as "click in here" without drawing a form box inside what
   is meant to look like a printed page. */
.resume-preview [data-block][contenteditable] {
  outline: 1px dashed transparent;
  outline-offset: 4px;
  border-radius: 2px;
  transition: outline-color var(--t-fast);
}
.resume-preview [data-block][contenteditable]:hover {
  outline-color: var(--border-strong, var(--border));
}
.resume-preview [data-block][contenteditable]:focus {
  outline-color: var(--brand);
  outline-style: solid;
}

/* ── Applications board ──────────────────────────────────────────────────
   Five columns, one per stage, scrolling sideways as a unit rather than
   squeezing five lanes into whatever width is left. */
.board-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.board-add-row {
  flex: 1 1 420px;
  margin: 0;
}
.board-search {
  /* 240px is enough to read a company name in, and it keeps the field from
     competing with the one that actually starts the work. */
  flex: 0 1 240px;
  max-width: 240px;
}
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
/* The column carries the category, so everything inside it inherits the
   four --cat-* values and no rule below names a colour. */
.kanban-column {
  /* The column is the quiet one. The cards inside it carry the category, so
     this only has to hold them -- tinted enough to belong to them, light
     enough that they still lift off it. */
  background: color-mix(in srgb, var(--cat-solid) var(--cat-wash), var(--gray-50));
  border: 1px solid color-mix(in srgb, var(--cat-border) 55%, var(--border));
  border-radius: var(--radius-card);
  min-width: 0;
}
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
}
/* .cat-tag does the colour and the dot; this is only the typography the
   board's headings have always had. */
.kanban-column-title {
  font-size: var(--fs-050);
  text-transform: uppercase;
}
.kanban-column-count {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  background: var(--gray-100);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}
.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
  min-height: 96px;
  border-radius: var(--radius-card);
  transition: background var(--t-fast);
}
/* Dropping onto a column answers in that column's own colour, so the card
   tells you where it is going and not just that it is going somewhere. */
.kanban-column-body.is-over {
  background: color-mix(in srgb, var(--cat-solid) 16%, transparent);
}
.kanban-column-empty {
  margin: 0;
  padding: 10px 4px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
/* The card takes the column's category, not just the heading. A white card
   in a tinted column reads as something sitting in the column; a card in the
   column's own colour reads as being of it, which is the whole reason the
   board is coloured. It carries more of the hue than the column does, so it
   still lifts off rather than dissolving into it. */
.kanban-card {
  position: relative;
  background: color-mix(in srgb, var(--cat-solid) var(--cat-fill), var(--white));
  border: 1px solid color-mix(in srgb, var(--cat-border) 75%, var(--border));
  border-radius: var(--radius-md);
  padding: 12px 40px 12px 14px;
  cursor: pointer;
  transition: var(--t-fast);
}
/* Hover answers in the category too. --brand here would have said "this app"
   at the moment the card is meant to be saying which column it is in. */
.kanban-card:hover {
  border-color: var(--cat-solid);
  box-shadow: var(--shadow-xs);
}
.kanban-card.is-dragging {
  opacity: 0.4;
}
.kanban-card.is-analyzing {
  border-style: dashed;
}
.kanban-card-title {
  margin: 0 0 2px;
  font-size: var(--fs-200);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
}
.kanban-card-company {
  font-size: var(--fs-100);
  color: var(--text-primary);
}
.kanban-card-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
/* The same two colours the CV tab gives a suggestion: orange while it is
   waiting on you, green once you have taken it. The board and the page it
   opens should not describe the same thing in different terms. */
.kanban-chip {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-050);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.kanban-chip.is-pending {
  background: var(--destructive-bg);
  color: var(--destructive);
}
.kanban-chip.is-accepted {
  background: var(--success-bg);
  color: var(--success-fg);
}
.kanban-chip.is-clear,
.kanban-chip.is-idle,
.kanban-chip.is-working {
  background: var(--gray-100);
  color: var(--text-secondary);
}
.kanban-card-source {
  margin-top: 2px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
  /* One line, cut with an ellipsis: a long board host
     ("combineglobalrecruitment.na.teamtailor.com") has no break point and
     ran out of the card. The whole link is the tooltip. */
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--icon-md);
  transition: var(--t-fast);
}
.kanban-card-menu-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Appended to <body>, not to the card: inside the column it would open into
   the column's own overflow and the last card's menu would have nowhere to
   go. */
.card-menu {
  position: fixed;
  z-index: 300;
  min-width: 196px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.card-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-100);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.card-menu-item i {
  font-size: var(--icon-md);
  color: var(--text-secondary);
}
.card-menu-item:hover {
  background: var(--brand-06);
}
.card-menu-item.is-destructive,
.card-menu-item.is-destructive i {
  color: var(--destructive);
}
.card-menu-item.is-destructive:hover {
  background: var(--destructive-bg);
}

/* ── Application dialog ──────────────────────────────────────────────────
   The single view, opened over the board. 1200 at most; below that it takes
   the window less a 20px gutter, which is what leaves somewhere outside it
   to click. */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  overflow: auto;
}
.dialog-backdrop[hidden] {
  display: none;
}
body.has-dialog {
  overflow: hidden;
}
.dialog-backdrop #application-single-view {
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 40px);
  /* This box is the scroll container now, which is also what the sticky tab
     bar and the analysis column measure against -- their old offsets were
     the navbar's, and inside a dialog there is no navbar above them. */
  overflow-y: auto;
  background: var(--white);
  box-shadow: var(--shadow-brand-soft);
}
.dialog-backdrop .av-tabs {
  top: 0;
  background: var(--white);
}
/* The CV tab's action bar stays under the tabs the way the footer it
   replaced stayed at the bottom: Download and Save never scroll away from
   the resume they act on. The analysis column sticks under both. */
/* Both offsets are the measured heights (app.js, stickToTabs): a number
   typed here was a pixel off the tabs' real height and let the page show
   through the seam. */
.dialog-backdrop .doc-bar {
  position: sticky;
  top: var(--av-tabs-h, 44px);
  z-index: 19;
  background: var(--white);
}
.dialog-backdrop .app-panel-sidebar {
  top: calc(var(--av-tabs-h, 44px) + var(--doc-bar-h, 53px));
  max-height: calc(100vh - 80px - var(--av-tabs-h, 44px) - var(--doc-bar-h, 53px));
}
.dialog-backdrop .av-header {
  align-items: flex-start;
}
.dialog-backdrop .av-header .icon-btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* The board scrolls sideways, and a card meeting the edge of the window is
   indistinguishable from a card that simply ends there. This fades the last
   few centimetres out into the page's own colour -- into that colour at zero
   alpha on the left, not into transparent black, which would grey the ramp
   on its way. It disappears once there is nothing left to scroll to. */
.kanban-wrap {
  position: relative;
}
.kanban-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 8px;
  width: 72px;
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--duration-dropdown) ease-out;
  background: linear-gradient(
    to right,
    rgb(from var(--app-bg) r g b / 0) 0,
    var(--app-bg) 100%
  );
}
.kanban-wrap[data-scroll-end="true"]::after {
  opacity: 0;
}

/* Example people, when a contact-data provider is configured. An addition
   to each card, never a replacement for its link: the deep link works with
   no provider at all, which is the whole reason it exists. */
.connection-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.connection-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  /* The same radius as the card this sits inside. A pill around two lines
     of text reads as a tag, and these are not tags. */
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--t-fast);
}
.connection-person-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.connection-person-avatar {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-18);
  color: var(--text-primary);
  font-size: var(--fs-050);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.connection-person-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.connection-person:hover {
  border-color: var(--brand-35);
  background: var(--brand-06);
}
.connection-person-name {
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-primary);
}
.connection-person-title {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* The Fit tab is a reading surface, but the requirements table is also a
   working one now -- capping it at 900px left the Why column wrapping every
   three words while the dialog had room to spare. The verdict keeps its own
   measure: that one is prose. */
.fit-doc { max-width: none; }
.fit-verdict { max-width: 92ch; }
/* Four columns now, not five: the rating moved onto the requirement itself
   as a tag and the evidence column went with the covered ones, which is the
   only place evidence was ever worth reading. The widths had not followed,
   so "The change" was inheriting the 8% that used to hold the word
   "Missing" and ran one word per line. */
.fit-table.fit-requirements { table-layout: fixed; }
.fit-table.fit-requirements th:nth-child(1),
.fit-table.fit-requirements td:nth-child(1) { width: 24%; }
.fit-table.fit-requirements th:nth-child(2),
.fit-table.fit-requirements td:nth-child(2) { width: 23%; }
.fit-table.fit-requirements th:nth-child(3),
.fit-table.fit-requirements td:nth-child(3) { width: 29%; }
.fit-table.fit-requirements th:nth-child(4),
.fit-table.fit-requirements td:nth-child(4) { width: 24%; }
.fit-composer { margin-top: 0; }
.fit-composer-none {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
/* table-layout:fixed plus the nowrap headers every other fit table wants
   meant a long header simply ran over the column beside it. Here they
   wrap. */
.fit-table.fit-requirements th { white-space: normal; }

/* ── Theme switch ────────────────────────────────────────────────────────
   The site's own ThemeToggle, rebuilt in CSS: a pill track, a round knob
   that slides across it, the sun or moon riding inside the knob. Its
   proportions come from that component's maths at a navbar size -- track
   height = size/1.75, padding = size/17.5, knob = height - 2*padding.

   The knob is the one thing here that travels, so it gets the press budget
   (motion.md section 4: toggles are 100-160ms) on a transform, never on
   `left`. The icons cross-fade underneath it: opacity is an effect
   property, so it gets its own shorter duration and a curve that cannot
   overshoot (section 7). */
.theme-switch {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  cursor: pointer;
  transition: background var(--duration-press) ease, border-color var(--duration-press) ease;
}
.theme-switch:hover {
  background: var(--gray-150);
}
.theme-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  /* In dark mode --white is rgb(36,34,32) and the track is the same family,
     so the knob had no edge at all: the moon floated in the pill. */
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  transform: translateX(0);
  transition: transform var(--duration-press) var(--ease-out);
}
:root[data-theme='dark'] .theme-switch-knob {
  /* 52 track - 22 knob - 3 left - 3 right = 24 of travel. */
  transform: translateX(24px);
}
.theme-switch-icon {
  position: absolute;
  font-size: var(--icon-sm);
  line-height: 1;
  color: var(--brand);
  transition: opacity var(--duration-press) ease-out;
}
.theme-switch-icon.is-dark,
:root[data-theme='dark'] .theme-switch-icon.is-light {
  opacity: 0;
}
:root[data-theme='dark'] .theme-switch-icon.is-dark {
  opacity: 1;
}

/* ── Motion ──────────────────────────────────────────────────────────────
   Applied only where a purpose survives motion.md's gates. The job grid,
   the facet filters and the application view's own tabs deliberately have
   none: those are the surfaces used tens of times an hour, where motion
   reads as latency rather than feedback. */

/* The dialog: occasional, and the purpose is continuity -- it arrives over
   a board that stays visible behind it. Centred, so section 9 exempts it
   from originating anywhere. Entry 300ms, exit 220ms, because the decision
   to close is already made. */
.dialog-backdrop {
  opacity: 1;
  transition:
    opacity var(--duration-modal) var(--ease-out),
    display var(--duration-modal) allow-discrete,
    overlay var(--duration-modal) allow-discrete;
}
@starting-style {
  .dialog-backdrop {
    opacity: 0;
  }
}
.dialog-backdrop[hidden] {
  display: none;
  opacity: 0;
  transition-duration: var(--duration-modal-exit);
}
.dialog-backdrop #application-single-view {
  transform: scale(1);
  transition: transform var(--duration-modal) var(--ease-out);
}
@starting-style {
  .dialog-backdrop #application-single-view {
    /* 0.97, not 0: entering from zero reads as a balloon inflating and
       hides what the thing is for most of the animation (section 8). */
    transform: scale(0.97);
  }
}

/* The card menu: originates at the kebab that opened it, and shrinks back
   into it. transform-origin is set in JS from which corner it opened
   towards, rather than hardcoded (section 9). */
.card-menu {
  opacity: 1;
  transform: scale(1);
  transition:
    transform var(--duration-dropdown) var(--ease-out),
    opacity var(--duration-tooltip) ease-out;
}
@starting-style {
  .card-menu {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* The edit popover: opens from the highlighted words it belongs to, so it
   grows from its top edge, the side nearest them. */
.suggestion-popover {
  transform-origin: top center;
  transition:
    transform var(--duration-dropdown) var(--ease-out),
    opacity var(--duration-tooltip) ease-out;
}
@starting-style {
  .suggestion-popover {
    opacity: 0;
    transform: scale(0.97);
  }
}

/* Things that appear inside a surface already on screen (the edits queue,
   the composer opening) only fade: they are arriving where they belong, and
   a lift would say they came from somewhere else. */
.edits-review,
.resume-request.is-open > * {
  transition: opacity var(--duration-dropdown) ease-out;
}
@starting-style {
  .edits-review,
  .resume-request.is-open > * {
    opacity: 0;
  }
}

/* WCAG 2.3.3: what has to go is movement, not feedback. Colour and opacity
   stay, transforms stop -- which keeps every state change legible without
   anything travelling. */
@media (prefers-reduced-motion: reduce) {
  .theme-switch-knob,
  .dialog-backdrop #application-single-view,
  .card-menu,
  .suggestion-popover,
  .select-menu,
  .snackbar,
  .site-pane {
    transition-property: opacity;
  }
  .btn:active,
  .doc-tool:active,
  .icon-btn:active {
    transform: none;
  }
  :root[data-theme='dark'] .theme-switch-knob {
    transform: translateX(24px);
  }
  .kanban-card:hover {
    box-shadow: none;
  }
}

/* The wordmark's caret while it types itself. A 2px block that blinks on a
   one-second cycle and is removed when the word lands -- same as the site's
   hero. `steps(1)` on a keyframe, not a transition, because this is a
   predetermined loop with no state to retarget (motion.md section 14). */
.navbar-brand.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 2px;
  vertical-align: -0.08em;
  background: var(--brand);
  animation: brand-caret 1s steps(1) infinite;
}
@keyframes brand-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
/* The mark keeps its own colours, which are the logo's. It only needs to
   not look like a hole in the dark theme. */
:root[data-theme='dark'] .navbar-logo {
  filter: brightness(1.45);
}
@media (prefers-reduced-motion: reduce) {
  .navbar-brand.is-typing::after { animation: none; }
}

/* ── Entrance cascade ────────────────────────────────────────────────────
   One keyframe, one delay per element, set from --enter-i in JS. A CSS
   animation rather than a transition because this is a predetermined
   sequence with nothing to retarget (motion.md section 14), and `backwards`
   so an element waiting for its turn is already hidden rather than
   flashing first. 45ms apart sits inside the 30-80ms band: below 30 reads
   as simultaneous, above 80 reads as slow. */
@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(var(--enter-lift));
    filter: blur(5px);
  }
  /* Sharp before it has finished settling: the blur is what the thing is
     doing at the start, not something it carries all the way in. */
  60% {
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
.enters {
  /* 320ms rather than 260: a blur that resolves needs long enough to be read
     as resolving. Still inside the band motion.md gives an entrance. */
  animation: enter-up 320ms var(--ease-out) backwards;
  animation-delay: calc(var(--enter-i, 0) * var(--enter-stagger));
  /* No will-change. It asks for a compositing layer per element, held for
     as long as the class is on, and a blur needs a filter buffer behind
     that layer -- which is affordable for a dozen and is not for a list.
     The animation is 320ms and browsers promote what they need for one
     without being told. filter also creates a containing block while it
     runs, which would reparent anything fixed inside; nothing animated
     here holds one. */
}
/* The same entrance without the lift. What is arriving where the loader
   just was is already in its place -- lifting it in says it came from
   somewhere else. */
.enters-in-place {
  animation-name: enter-in-place;
}
@keyframes enter-in-place {
  from {
    opacity: 0;
    filter: blur(5px);
  }
  60% {
    filter: blur(0);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .enters {
    animation: none;
  }
}

/* ── Styled select ───────────────────────────────────────────────────────
   The real <select> stays in the DOM and keeps the value; it is just taken
   out of the visual flow. Its option list is drawn by the OS, at the OS's
   sizes and colours, and no amount of CSS reaches inside it -- so the list
   below is ours and the element underneath is the one that still answers
   .value, keyboard input and form submission. */
.select-wrap {
  position: relative;
  flex-shrink: 0;
}
.select-wrap > select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.select-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--text-primary);
  font-family: inherit;
  /* The same size the inputs next to it are set in. A select that reads two
     steps smaller than the field beside it is the same mistake as one that
     stands two pixels shorter. */
  font-size: var(--fs-200);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.select-wrap.is-sm .select-button {
  height: 24px;
  padding: 0 8px;
  gap: 6px;
  font-size: var(--fs-050);
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.select-button:hover {
  background: var(--gray-150);
}
.select-button[aria-expanded="true"] {
  background: var(--white);
  border-color: var(--brand);
}
.select-button i {
  font-size: var(--icon-sm);
  color: var(--text-secondary);
}
/* Left-aligned with the control it belongs to and directly under it --
   which is also its transform-origin, so it grows out of the button
   instead of arriving from nowhere. */
.select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-width: 360px;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 120;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transform-origin: top left;
  opacity: 1;
  transform: scale(1);
  transition:
    transform var(--duration-dropdown) var(--ease-out),
    opacity var(--duration-tooltip) ease-out;
}
@starting-style {
  .select-menu {
    opacity: 0;
    transform: scale(0.97);
  }
}
.select-menu[hidden] {
  display: none;
}
.select-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-100);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.select-option:hover {
  background: var(--brand-06);
}
.select-option.is-selected {
  background: var(--brand-10);
  font-weight: 600;
}

/* The search is the control people reach for first here, so it takes the
   room the four-way segmented control used to. */
.companies-toolbar {
  align-items: center;
}
.companies-search-field {
  flex: 1 1 320px;
  max-width: none;
}
.companies-toolbar .select-wrap {
  width: 190px;
}

.nearshore-card-links {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Multi-select: a checkbox per row, the same one the facet list uses, and
   the count beside each name in secondary -- picking an industry blind was
   a coin toss that usually emptied the table. */
.select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  margin-bottom: 4px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
}
.select-search i {
  font-size: var(--icon-sm);
  color: var(--text-secondary);
}
.select-search input,
.select-search input[type='search'] {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  outline: none;
  border-radius: 0;
  font-family: inherit;
  font-size: var(--fs-100);
  color: var(--text-primary);
}
.select-list {
  display: flex;
  flex-direction: column;
}
.select-option {
  display: flex;
  align-items: center;
  gap: 10px;
}
.select-option-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-option-count {
  flex-shrink: 0;
  color: var(--text-secondary);
}
.select-check {
  flex-shrink: 0;
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  transition: var(--t-fast);
}
.select-option.is-selected .select-check {
  background: var(--brand);
  border-color: var(--brand);
}
.select-option.is-selected .select-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 3.5px;
  height: 7px;
  border: solid var(--white);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
/* A multi-select keeps its rows highlighted by the checkbox, not by the
   whole row going brand -- with several picked the menu would be a block
   of colour. */
.select-option.is-selected {
  background: transparent;
  font-weight: 400;
}
.select-option.is-selected:hover {
  background: var(--brand-06);
}
.select-button.has-value {
  border-color: var(--brand-35);
}
.select-empty {
  margin: 0;
  padding: 10px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* ── Sign in and join ────────────────────────────────────────────────────
   The two pages someone sees before they have an account. Same tokens,
   same mark, same build -- an invitation link should look like the thing
   it lets you into. */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
}
.auth-logo {
  display: block;
  margin: 0 auto 16px;
}
.auth-brand {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: var(--fs-400);
  font-weight: 400;
  color: var(--brand);
  text-align: center;
}
.auth-sub {
  margin: 0 0 26px;
  color: var(--text-secondary);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  text-align: center;
}
.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-form[hidden] {
  display: none;
}
.auth-label {
  margin-bottom: 6px;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-secondary);
}
.auth-form input + .auth-label {
  margin-top: 16px;
}
.auth-hint {
  margin: 8px 0 0;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
.auth-submit {
  width: 100%;
  margin-top: 22px;
}

/* ── Admin ───────────────────────────────────────────────────────────── */
.navbar-who {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child {
  border-bottom: none;
}
.admin-row.is-disabled {
  opacity: 0.6;
}
.admin-row-main {
  flex: 1;
  min-width: 0;
}
.admin-row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-200);
  color: var(--text-primary);
}
.admin-row-meta {
  margin-top: 2px;
  font-size: var(--fs-100);
  color: var(--text-secondary);
}
.admin-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.admin-tag {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-10);
  color: var(--brand);
  font-size: var(--fs-100);
}
.admin-tag.is-off {
  background: var(--destructive-bg);
  color: var(--destructive-body);
}
.invite-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}
.invite-link code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: var(--fs-100);
  color: var(--text-primary);
}
.admin-row-usage {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.admin-usage-count {
  font-size: var(--fs-100);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ── "How this works" ────────────────────────────────────────────────── */
.how-dialog {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-brand-soft);
}
.how-dialog .av-header {
  align-items: flex-start;
}
.how-dialog .av-header .icon-btn {
  margin-left: auto;
  flex-shrink: 0;
}
.how-body {
  padding: 8px 28px 32px;
}
.how-item + .how-item {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.how-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: var(--fs-250);
  line-height: var(--lh-heading);
  font-weight: 600;
  color: var(--text-primary);
}
.how-item-title i {
  font-size: var(--icon-lg);
  color: var(--brand);
}
.how-item p {
  margin: 0 0 12px;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}
.how-example {
  padding: 14px 16px;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}
.how-example strong {
  color: var(--text-primary);
}

/* ── Resume Settings: Rules / Style ──────────────────────────────────── */
.rs-tabs {
  position: static;
  padding: 0;
  margin-bottom: 20px;
}
.rs-panel {
  display: none;
}
.rs-panel.active {
  display: block;
}
/* The save bar is fixed to the bottom of the window and paints over
   whatever is under it, so the panel it belongs to has to end above it. */
#rs-panel-style.active {
  padding-bottom: 76px;
}
.rs-intro {
  margin: 0 0 20px;
  line-height: var(--lh-body);
  max-width: 62ch;
}
.rs-field + .rs-field {
  margin-top: 22px;
}
.rs-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

/* Two by two. Four cards in a row, in the narrower of the two columns, gave
   each thumbnail about 70px -- too small to tell one typeface from another,
   which is the only thing these cards are for. */
.template-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.template-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: var(--t-fast);
}
.template-card:hover {
  border-color: var(--brand-35);
}
.template-card.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
/* The thumbnail is a small piece of paper, so it is white in both themes and
   its type comes from the template, not from the app. Everything inside it is
   an exception to the design system for the same reason the resume itself is:
   it is a picture of a print document. */
.template-thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 96px;
  padding: 10px 9px;
  border-radius: var(--radius-sm);
  background: var(--resume-paper);
  color: var(--resume-ink);
  overflow: hidden;
}
.tt-name {
  font-size: 13px;
  line-height: 1;
  color: var(--rs-accent);
}
.tt-h {
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  color: var(--rs-accent);
}
.tt-rule {
  align-self: stretch;
  height: 1px;
  margin: 3px 0 2px;
  background: var(--rs-accent);
  opacity: 0.8;
}
.tt-rule.is-plain {
  background: var(--resume-rule);
  opacity: 1;
}
.tt-rule.is-dark {
  height: 1.5px;
  margin-top: 2px;
  background: var(--resume-ink-strong);
  opacity: 1;
}
/* The greeked lines. Widths are classes rather than inline styles: an inline
   font-family with quoted family names inside a double-quoted attribute is
   what silently left all three thumbnails in the app's own typeface. */
.template-thumb i {
  align-self: stretch;
  height: 3px;
  border-radius: 2px;
  background: var(--resume-greek);
}
.template-thumb i.is-accent {
  background: var(--rs-accent);
  opacity: 0.6;
}
.tt-w40 { width: 40%; align-self: flex-start; }
.tt-w45 { width: 45%; align-self: flex-start; }
.tt-w50 { width: 50%; align-self: flex-start; }
.tt-w60 { width: 60%; align-self: flex-start; }
.tt-w80 { width: 80%; align-self: flex-start; }

.tt-classic { align-items: center; font-family: var(--resume-font-classic); }
.tt-classic .tt-h { align-self: stretch; text-transform: uppercase; letter-spacing: 0.06em; }
.tt-balanced { font-family: var(--resume-font-balanced); }
.tt-balanced .tt-name { font-size: 14px; font-weight: 500; }
.tt-balanced .tt-h { font-size: 8px; font-weight: 600; font-style: italic; }
.tt-modern { font-family: var(--resume-font-modern); }
.tt-modern .tt-name { font-size: 13px; font-weight: 600; letter-spacing: -0.02em; color: var(--resume-ink-strong); }
.tt-modern .tt-h { font-weight: 600; }
.tt-grotesk { font-family: var(--resume-font-grotesk); }
/* The original layout has no typeface of its own to show, because it is
   whatever the uploaded resume already was. Drawn in the app's serif and in
   ink rather than in the accent, so it reads as "not one of these four". */
.tt-original { font-family: var(--font-serif); }
.tt-original .tt-name { font-size: 13px; color: var(--resume-ink); }
.tt-original .tt-h { color: var(--resume-ink); font-weight: 600; }

/* Neither the accent nor the paper size reaches the original layout. */
#rs-panel-style.is-original .rs-field:has(#accent-swatches),
#rs-panel-style.is-original #paper-seg {
  opacity: 0.4;
  pointer-events: none;
}
.tt-grotesk .tt-name { font-size: 15px; font-weight: 700; letter-spacing: -0.025em; color: var(--resume-ink-strong); }
.tt-grotesk .tt-h { align-self: stretch; text-transform: uppercase; letter-spacing: 0.05em; }

.template-card-name {
  margin-top: 8px;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--text-primary);
}
.template-card-fonts {
  font-size: var(--fs-050);
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

.accent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.accent-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}
.accent-swatch,
.accent-custom {
  /* 17px, down from 24. A swatch is a colour, and a colour needs very little
     area to be read; at 24 six of them plus the picker were the loudest
     thing in the column. */
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  transition: var(--t-fast);
}
.accent-swatch.is-selected,
.accent-custom.is-selected {
  box-shadow: 0 0 0 2px var(--app-bg), 0 0 0 3px var(--brand);
}
/* The seventh swatch is the picker. It wears the spectrum when one of the
   presets is chosen, and the chosen colour when it is the one in use, so
   the row always reads as seven options with one of them selected. */
.accent-custom {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  background: conic-gradient(
    from 0.25turn,
    #c0392b, #d68910, #b7950b, #1e8449, #148f77, #1f618d, #5b2c6f, #922b5e, #c0392b
  );
}
.accent-custom.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--swatch);
}
.accent-custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
}
/* The hex, where the value belongs: in the line that already reports what
   the colour does, not in a second field for typing one you just picked. */
.accent-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}
#accent-contrast {
  margin: 8px 0 0;
}
#accent-contrast.is-warning {
  color: var(--warn);
}

/* The one place the app's stylesheet has to reach into the paper, and only to
   get out of its way. resume.css gives each template its typeface on
   .resume-paper itself and lets it inherit; the app's `h1, h2, h3` rule sets a
   font-family and a letter-spacing directly on the element, and a direct rule
   beats an inherited value however specific the ancestor that set it. So the
   resume's name and every section heading were quietly being drawn in the
   app's own serif -- which is exactly what "only the typography changes" is
   not supposed to mean. resume.css's own heading rules are more specific than
   this and still win. */
.resume-paper h1,
.resume-paper h2,
.resume-paper h3 {
  font-family: inherit;
  letter-spacing: inherit;
}
/* Same reason, one level up: the app's body is font-weight 300, which the
   paper inherited, so every resume was set in Light on screen and in Regular
   in the PDF. 400 is what the paper's own stylesheet assumes. */
.resume-paper {
  font-weight: 400;
}

/* The paper is shown at the size it prints and scaled down to fit, rather
   than reflowed: a preview that wraps differently from the PDF is worse
   than no preview. */
.preview-zoom[hidden] {
  display: none;
}
.preview-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* A segmented control sitting in a card header, next to a 14px uppercase
   title -- it has to be the size of a control, not of a field. */
.seg.seg-sm label {
  padding: 5px 11px;
  font-size: var(--fs-050);
}

.resume-style-preview {
  overflow: auto;
  max-height: 70vh;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
}
.resume-style-preview .resume-paper,
.resume-style-preview > .resume-preview {
  zoom: 0.62;
  margin: 0 auto;
}
/* No resume yet. The panel stops being a scroll container and becomes a
   place to stand something in the middle of. */
.resume-style-preview.is-empty {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 420px;
}
.preview-null {
  max-width: 34ch;
  padding: 8px 16px 4px;
  text-align: center;
}
/* The same drawing as a template thumbnail, at rest: a sheet, a rule in the
   accent being chosen, three greeked lines. It says "this page, empty",
   which is the true answer, where a sample resume would be someone else's. */
.preview-null-sheet {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 104px;
  height: 134px;
  margin: 0 auto 26px;
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  background: var(--resume-paper);
  box-shadow: var(--shadow-xs);
}
.preview-null-sheet .pn-name {
  width: 62%;
  height: 8px;
  border-radius: 2px;
  background: var(--rs-accent, var(--brand));
  opacity: 0.75;
}
.preview-null-sheet .pn-rule {
  height: 1px;
  margin: 2px 0 1px;
  background: var(--rs-accent, var(--brand));
  opacity: 0.45;
}
.preview-null-sheet i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--resume-greek);
}
.preview-null-sheet i.pn-short {
  width: 68%;
}
.preview-null-title {
  margin: 0 0 8px;
  font-size: var(--fs-250);
  line-height: var(--lh-heading);
  color: var(--text-primary);
}
.preview-null-body {
  margin: 0 0 22px;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  text-wrap: balance;
}

/* The preview is held to what the PDF can actually do. The browser would
   happily lay Modern's dates out to the right of the role with flex; the
   PDF generator has no flex, no float, and a table -- which would do it --
   is the one thing the ATS rules forbid inside the paper. So the preview
   gives up the nicer layout rather than showing something that will not
   print. Scoped to the preview: resume.css stays canonical. */
.resume-style-preview .tpl-modern .job-head {
  display: block;
}

/* ── Checking a parsed resume ────────────────────────────────────────── */
.resume-review {
  margin: 20px 0 8px;
  padding: 18px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-card);
  background: var(--warn-bg);
}
.resume-review[hidden] {
  display: none;
}
.resume-review-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.resume-review-title {
  margin: 0 0 4px;
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--text-primary);
}
.resume-review-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.resume-review-notes ul,
.resume-review .alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.resume-review-paper {
  max-height: 60vh;
  overflow: auto;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  padding: 16px;
}
.resume-review-paper .resume-paper {
  zoom: 0.62;
  margin: 0 auto;
}
/* Same affordance as the CV editor: dashed until you are in it. */
.resume-review-paper [data-field] {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  border-radius: 2px;
  transition: outline-color var(--t-fast);
}
.resume-review-paper [data-field]:hover {
  outline-color: var(--border-strong, var(--border));
}
.resume-review-paper [data-field]:focus {
  outline-color: var(--brand);
  outline-style: solid;
}

/* Controls on the left, the page they change on the right. Stacked, this
   screen made you pick a template at the top and scroll down to find out
   what it did. The preview holds its place while the controls scroll,
   which is the other half of the same point. */
.rs-style-layout {
  display: grid;
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
  gap: 20px;
  align-items: start;
}
.rs-style-layout > .card {
  margin-bottom: 0;
}
.rs-style-layout > .card:last-child {
  position: sticky;
  top: 76px;
}
.rs-style-layout .resume-style-preview {
  max-height: calc(100vh - 210px);
}
/* One column below the width where the preview would be too narrow to read
   anything in. */
@media (max-width: 1100px) {
  .rs-style-layout {
    grid-template-columns: 1fr;
  }
  .rs-style-layout > .card:last-child {
    position: static;
  }
}

/* ── Preview: pages, zoom, pan ───────────────────────────────────────── */
.preview-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.preview-zoom-label {
  min-width: 42px;
  text-align: center;
  font-size: var(--fs-100);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
/* Once JS has worked out where the pages actually fall, the background
   line that guessed at it comes off. It was drawn at a fixed interval and
   landed wherever it landed -- straight through a sentence, showing a break
   the print does not make. */
.resume-style-preview .resume-paper.is-paginated,
.resume-review-paper .resume-paper.is-paginated {
  background-image: none;
}
/* The break, drawn in the margin it creates rather than over the text. */
.page-break-spacer {
  position: relative;
}
.page-break-spacer::after {
  content: "";
  position: absolute;
  left: -0.65in;
  right: -0.65in;
  top: 50%;
  border-top: 1px dashed #cfc9c3;
}
.resume-style-preview,
.resume-review-paper {
  cursor: grab;
  touch-action: none;
}
.resume-style-preview.is-dragging,
.resume-review-paper.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* ── Cover letter checks (core/letter_checks) ── */
.letter-checks {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: var(--fs-100);
  line-height: var(--lh-body);
}
.letter-checks ul {
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--text-primary);
}
.letter-checks-detail {
  display: block;
  color: var(--text-secondary);
}
.letter-checks.is-clean {
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
}
.letter-checks.is-clean i {
  color: var(--success-icon);
}
.letter-checks-note {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

/* A posting the board stopped listing (server: _hold_vanished_once). */
.kanban-card-closed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-100);
  color: var(--warn);
}
.kanban-card-closed-when {
  white-space: nowrap;
  color: var(--text-secondary);
}

/* ── Fit analysis in progress: the running step, one line ── */
.analysis-now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: var(--fs-100);
  line-height: var(--lh-body);
}
.analysis-now-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
}
.analysis-now-mark svg { display: block; }
/* A highlight travelling through the words, the way a model's reply shows
   it is still being written: the text is the mask, the gradient moves
   behind it. The ends of the gradient are the ordinary text colour, so
   whatever the highlight is not on reads as normal text. */
.analysis-now-text {
  background: linear-gradient(
    90deg,
    var(--text-secondary) 0%,
    var(--text-secondary) 35%,
    var(--text-primary) 50%,
    var(--text-secondary) 65%,
    var(--text-secondary) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: analysis-shimmer 2.2s linear infinite;
}
@keyframes analysis-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-now-text { animation: none; color: var(--text-secondary); background: none; }
}

/* ── Pasting a posting the server is not allowed to read ── */
.paste-job {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-md);
  background: var(--warn-bg);
}
.paste-job-why {
  margin: 0;
  color: var(--warn);
  font-size: var(--fs-100);
}
.paste-job textarea {
  width: 100%;
  resize: vertical;
  font: inherit;
}
.paste-job-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.paste-job-status {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* Offer to listen to the board a hand-found posting came from. */
.listen-offer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--brand-tint);
}
.listen-offer-why {
  margin: 0;
  font-size: var(--fs-100);
}
.listen-offer-why i { color: var(--brand); }
.listen-offer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.listen-offer-status {
  font-size: var(--fs-100);
  color: var(--text-secondary);
}

/* ── Fit tab, as a decision ─────────────────────────────────────────────
   Verdict, then the one thing to do about it, then the work, the risks,
   and last what is already fine, folded. */
.fit-doc { max-width: 960px; }
.fit-count {
  margin-left: 6px;
  font-weight: 400;
  color: var(--text-secondary);
}
.fit-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 8px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--brand-06);
  border: 1px solid var(--brand-10);
}
.fit-next-text {
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-primary);
}
.fit-next .btn { flex-shrink: 0; }

.fit-needs { display: flex; flex-direction: column; gap: 12px; }
.fit-need {
  padding: 16px 18px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
}
.fit-need-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.fit-need-title {
  margin: 0;
  font-size: var(--fs-200);
  font-weight: 500;
  line-height: var(--lh-body);
  color: var(--text-primary);
}
.fit-need-tags { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fit-need-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}
.fit-need-label {
  margin-bottom: 4px;
  font-size: var(--fs-050);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.fit-need-text {
  font-size: var(--fs-100);
  line-height: var(--lh-body);
  color: var(--text-primary);
}
.fit-need-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.fit-need-foot[hidden], .fit-need-evidence[hidden] { display: none; }
.fit-need-evidence { padding: 4px 0 8px; }
/* Opens in place, so it only fades in (see the motion section). */
.fit-need-evidence { transition: opacity var(--duration-dropdown) ease-out; }
@starting-style { .fit-need-evidence { opacity: 0; } }

.fit-covered { margin-top: 28px; }
.fit-covered > summary.fit-covered-summary {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: var(--fs-250);
}
.fit-covered > summary.fit-covered-summary::after { content: none; }
.fit-covered > summary.fit-covered-summary:hover { text-decoration: none; }
.fit-covered-summary .fit-covered-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-100);
  font-weight: 400;
  color: var(--brand);
}
.fit-covered-summary .fit-covered-more i { transition: transform var(--duration-dropdown) var(--ease-out); }
.fit-covered[open] .fit-covered-more i { transform: rotate(180deg); }
