/* ============================================================================
   Lucipath — Design Language
   One source of truth for tokens, base styles, and components.
   Principles: calm neutral canvas, a single teal accent, generous space,
   soft elevation, fast subtle motion, accessible focus. Quiet by default.
   ============================================================================ */

/* Self-hosted Inter (variable, latin). Named in --font; loaded here so the UI
   doesn't silently fall back to system-ui. font-display: swap avoids FOIT. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2");
}

:root {
  /* ════════════════════════════════════════════════════════
     COLOR SYSTEM
     A calm, trustworthy career co-pilot: one teal brand hue
     (calm + optimistic + AI), cool slate neutrals, and a status spectrum
     mapped to the job-hunt journey. Pairings target WCAG AA.
     ════════════════════════════════════════════════════════ */

  /* Brand — Teal (calm, optimistic, AI-forward; distinct from every status) */
  --primary-50:  #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-200: #99f6e4;
  --primary-300: #5eead4;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;   /* primary action (white text @ AA) */
  --primary-800: #115e59;   /* hover                            */
  --primary-900: #134e4a;   /* active / brand text on light     */
  --accent:      #0891b2;   /* cyan — reserved for AI moments    */

  --primary:        var(--primary-700);
  --primary-hover:  var(--primary-800);
  --primary-active: var(--primary-900);
  --primary-light:  var(--primary-50);
  --primary-ring:   rgba(13,148,136,.28);
  --on-primary:     #ffffff;
  --grad-header:    linear-gradient(135deg, #0f766e 0%, #0d9488 52%, #0891b2 100%);

  /* Neutrals — cool slate (faint blue undertone), airy canvas */
  --bg:            #f6f7fa;   /* soft off-white canvas */
  --surface:       #ffffff;   /* cards / panels        */
  --surface-2:     #f8fafc;   /* nested / inset blocks */
  --border:        #e7eaf0;   /* hairlines             */
  --border-strong: #cfd5df;

  --text:  #0f1729;          /* deep slate (near-navy) */
  --muted: #586173;          /* secondary text         */
  --faint: #97a1b2;          /* placeholders / hints   */

  --tag-bg:   #eef1f6;
  --tag-text: #475569;

  /* Semantic — system meaning (kept distinct from the pipeline) */
  --success:        #047857;  --success-bg: #ecfdf5;  --success-border: #a7f3d0;  --success-strong: #065f46;
  --info:           #2563eb;  --info-bg:    #eff6ff;  --info-border:    #bfdbfe;
  --warn:           #b45309;  --warn-bg:    #fffbeb;  --warn-border:    #fde68a;   --warn-strong: #7c2d12;
  --danger:         #dc2626;  --danger-bg:  #fef2f2;  --danger-border:  #fca5a5;   /* destructive / errors only */
  --neutral:        #64748b;  --neutral-bg: #f1f5f9;

  /* Remote = available/green; salary = money/gold */
  --remote:     var(--success);  --remote-bg: #d1fae5;
  --accent-rose:#e11d48;  --rose-bg: #fff1f3;  --rose-border: #fecdd3;   /* "favorite" warmth */

  /* Application-status spectrum — the emotional arc of the search:
     parked → sent → warming → win, with rejection kept soft and
     deliberately NOT the alarming system-error red. */
  --status-saved:     #475569;   /* slate  — parked        */
  --status-applied:   #2563eb;   /* blue   — sent          */
  --status-interview: #b45309;   /* amber  — momentum      */
  --status-offer:     #047857;   /* emerald— win           */
  --status-rejected:  #be123c;   /* rose   — closed, gently */

  /* ── Typography ────────────────────────────────────────── */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Monospace for system/meta labels (status, dates, stat numerals, eyebrows) —
     a humanist-sans + mono pairing that reads warm yet technical. System stack,
     no extra font download. */
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;
  --fs-xs:  .72rem;
  --fs-sm:  .82rem;
  --fs-md:  .9rem;
  --fs-base: 1rem;
  --fs-lg:  1.06rem;
  --fs-xl:  1.3rem;
  --fs-2xl: 1.55rem;
  --fs-3xl: 2rem;       /* page titles            */
  --fs-4xl: 2.65rem;    /* marketing hero         */
  --lh:     1.55;

  /* Form control surface (kept separate from --surface so dark mode can lift
     inputs off their card background). */
  --input-bg: #ffffff;

  /* ── Spacing rhythm ────────────────────────────────────── */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  /* ── Radius / elevation / motion ───────────────────────── */
  --radius:      12px;
  --radius-md:   10px;
  --radius-sm:   8px;
  --radius-pill: 999px;
  --shadow:    0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.07);
  --shadow-md: 0 6px 18px -4px rgba(15,23,42,.13), 0 2px 6px -2px rgba(15,23,42,.07);
  --shadow-lg: 0 24px 50px -12px rgba(15,23,42,.28);
  --shadow-primary: 0 1px 2px rgba(13,148,136,.45), 0 4px 12px -2px rgba(13,148,136,.35);
  --ring: 0 0 0 3px var(--primary-ring);
  --ease: cubic-bezier(.2,.6,.2,1);
  --t: .16s var(--ease);

  color-scheme: light;
}

/* Global text scale. Typography is rem-based, so this one knob shrinks every
   font uniformly — and, unlike `zoom`, it leaves viewport media queries in real
   pixels, so responsive breakpoints stay honest in every browser. Spacing below
   is tuned to match. (Browser default root is 16px; 76% ≈ 12.2px base.) */
html { font-size: 76%; }

/* ════════════════════════════════════════════════════════
   DARK THEME — token overrides only. Components read tokens, so the
   whole UI re-themes from here. Set via <html data-theme="dark"> (ui.js).
   The teal brand + status spectrum are kept, lifted for legibility on dark.
   ════════════════════════════════════════════════════════ */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #0e1525;
  --surface:       #161f33;
  --surface-2:     #1d2840;
  --input-bg:      #1f2b44;
  --border:        #2a3753;
  --border-strong: #3a496a;

  --text:  #e7ecf4;
  --muted: #a4b0c4;
  --faint: #6b7894;

  --tag-bg:   #233048;
  --tag-text: #c3cee1;

  /* Brand: keep --primary dark enough for white button text; lift the tint. */
  --primary-light: rgba(20,184,166,.15);
  --primary-ring:  rgba(45,212,191,.32);

  /* Status + semantics lifted for contrast on dark surfaces. */
  --status-saved:     #94a3b8;
  --status-applied:   #60a5fa;
  --status-interview: #fbbf24;
  --status-offer:     #34d399;
  --status-rejected:  #fb7185;

  --success: #34d399;  --success-bg: rgba(16,185,129,.15);  --success-border: rgba(16,185,129,.4);
  --info:    #60a5fa;  --info-bg:    rgba(37,99,235,.18);    --info-border:    rgba(96,165,250,.4);
  --warn:    #fbbf24;  --warn-bg:    rgba(180,83,9,.22);     --warn-border:    rgba(251,191,36,.4);
  --danger:  #f87171;  --danger-bg:  rgba(220,38,38,.18);    --danger-border:  rgba(248,113,113,.45);
  --neutral: #94a3b8;  --neutral-bg: rgba(100,116,139,.2);

  --remote: #34d399;  --remote-bg: rgba(16,185,129,.16);
  --accent-rose: #fb7185;  --rose-bg: rgba(225,29,72,.16);  --rose-border: rgba(251,113,133,.4);

  /* Shadows deepen on dark so elevation still reads. */
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5);
  --shadow-md: 0 8px 22px -6px rgba(0,0,0,.6), 0 2px 6px -2px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 50px -12px rgba(0,0,0,.7);
}

/* Brand-tinted text/borders need lifting on dark (these read --primary directly). */
:root[data-theme="dark"] a,
:root[data-theme="dark"] .back { color: var(--primary-300); }
:root[data-theme="dark"] .btn-ghost { color: var(--primary-300); border-color: var(--primary-600); }
:root[data-theme="dark"] ::selection { background: var(--primary-800); color: #fff; }

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "cv11";
}

a { color: var(--primary); }
b, strong { font-weight: 600; }

/* Visible, consistent keyboard focus everywhere. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.nav-link:focus-visible { outline-color: #fff; }

::selection { background: var(--primary-light); color: var(--primary-active); }

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Subtle, consistent scrollbars (Firefox + WebKit). */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill);
  border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Icons ───────────────────────────────────────────────── */
/* <i class="ic" data-icon="name"></i> — painted by icons.js. Sizes to the
   surrounding text (1em) and inherits color via currentColor. */
.ic { display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1 .ic { vertical-align: -0.12em; }

/* Thin, unobtrusive scrollbars on scrollable content. */
.desc-text::-webkit-scrollbar { width: 6px; }
.desc-text::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-pill); }

/* ── Header & nav ────────────────────────────────────────── */
header {
  background: var(--grad-header);
  color: #fff;
  padding: 16px 20px 22px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  box-shadow: 0 8px 24px -12px rgba(13,148,136,.55);
}
header h1, header .brand-h { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.6px;
  display: inline-flex; align-items: center; gap: 9px; }
header p  { font-size: var(--fs-sm); opacity: .85; margin-top: 4px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-link {
  color: #fff; text-decoration: none; font-size: var(--fs-sm); font-weight: 600;
  padding: 8px 15px; border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-sm); transition: background var(--t), color var(--t), box-shadow var(--t);
}
button.nav-link { background: transparent; font-family: inherit; cursor: pointer; line-height: 1.1; }
.nav-link:hover { background: rgba(255,255,255,.16); }
.nav-link.active { background: #fff; color: var(--primary); border-color: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.18); }
/* Lucipath brand lockup — mark image + Inter wordmark (light "luci" + bold "path").
   Wordmark is HTML text so it always renders in the brand font (Inter). */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { display: block; height: 30px; width: auto; flex-shrink: 0; }
.brand-word { font-size: var(--fs-2xl); line-height: 1; letter-spacing: -.5px; white-space: nowrap; }
.bw-luci { font-weight: 300; }
.bw-path { font-weight: 700; }
header .bw-luci { color: #5eead4; }
header .bw-path { color: #fff; }
.footer-brand .f-logo .brand-mark { height: 24px; }
.footer-brand .f-logo .brand-word { font-size: var(--fs-lg); }
.f-logo .bw-luci { color: var(--primary); }
.f-logo .bw-path { color: var(--text); }
/* Solid "Get started" CTA that stands out against the teal header bar. */
.nav-cta { background: #fff; color: var(--primary-700); border-color: #fff; font-weight: 700; }
.nav-cta:hover { background: #effdfa; color: var(--primary-800); }
/* Marketing home: keep the header (with its Log in / Get started CTA) pinned. */
body.home > header { position: sticky; top: 0; z-index: 100; }

/* ── Mobile public nav: collapse the links behind a hamburger ── */
.nav-toggle { display: none; }
@media (max-width: 860px) {
  header { position: relative; }   /* containing block for the dropdown (home stays sticky — also one) */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex-shrink: 0; cursor: pointer; color: #fff;
    border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius-sm);
    background: rgba(255,255,255,.08); transition: background var(--t);
  }
  .nav-toggle:hover { background: rgba(255,255,255,.16); }
  .nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; }

  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 12px 16px 18px; background: var(--grad-header);
    border-top: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 30px -12px rgba(13,148,136,.55);
  }
  header.nav-open .nav-links { display: flex; }
  .nav-links .nav-link { width: 100%; text-align: left; padding: 12px 14px;
    border-color: rgba(255,255,255,.22); }
  .nav-links .nav-cta { text-align: center; margin-top: 2px; }
  .nav-links .theme-toggle { align-self: flex-start; }
}

/* ── Layout containers ───────────────────────────────────── */
main { max-width: 1080px; margin: 0 auto; padding: 0 20px 44px; }
.back { display: inline-block; margin: -6px 0 16px; font-size: var(--fs-sm);
  color: var(--primary); text-decoration: none; font-weight: 600; }
.back:hover { text-decoration: underline; }

/* ── Surfaces ────────────────────────────────────────────── */
/* .card = padded surface (profile sections, tracker cards).
   .box  = bare surface, padding supplied by inner regions (job page). */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px;
}
.box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
main > .card { margin-top: 20px; }              /* stacked cards (profile)   */
.card.lift { box-shadow: var(--shadow-md); margin-top: -16px; }
.card-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 10px; }
.card-head h2 { font-size: var(--fs-lg); font-weight: 700; }

.section-label {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 10px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--on-primary);
  font-size: var(--fs-md); font-weight: 600; line-height: 1.1; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--shadow-primary);
  transition: background var(--t), box-shadow var(--t), transform var(--t), border-color var(--t), color var(--t);
}
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn .ic { font-size: 1.05em; }
.btn-sm { padding: 6px 11px; font-size: var(--fs-sm); border-radius: 7px; }
.btn-block { width: 100%; }
/* Secondary variants: no accent shadow, quiet until hover. */
.btn-ghost, .btn-link, .btn-danger-ghost { box-shadow: none; background: transparent; }
.btn-ghost { color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover:not(:disabled) { background: var(--primary-light); }
.btn-link { color: var(--text); border-color: var(--border); }
.btn-link:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.btn-danger-ghost { color: var(--danger); border-color: var(--danger-border); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-bg); }

/* ── Tags / chips ────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 500;
  background: var(--tag-bg); color: var(--tag-text);
}
.tag.remote { background: var(--remote-bg); color: var(--remote); }
.tag.salary { background: var(--warn-bg); color: var(--warn); }

/* ── Forms & fields ──────────────────────────────────────── */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: var(--fs-md); font-family: inherit;
  color: var(--text); background: var(--input-bg); outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) { border-color: var(--border-strong); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }

/* Date pickers: align native control with our theme (height, picker popup, icon). */
input[type=date] { color-scheme: light; cursor: text; line-height: 1.2; height: 36px; appearance: none; -webkit-appearance: none; }
:root[data-theme="dark"] input[type=date] { color-scheme: dark; }
input[type=date]::-webkit-datetime-edit { color: var(--text); }
input[type=date]:invalid::-webkit-datetime-edit,        /* empty/placeholder text */
input[type=date]::-webkit-datetime-edit-text { color: var(--faint); }
input[type=date]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .55; padding: 2px; border-radius: 4px;
  transition: opacity var(--t), background var(--t);
}
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--surface-2, rgba(127,127,127,.14)); }

/* Custom chevron — drop the native select arrow for a consistent control. */
select {
  cursor: pointer; appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px;
}

/* profile: <label class="field"><span>…</span><input></label> */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); margin-bottom: 4px; }
/* job panel: <div class="field"><label>…</label><select></div> */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 5px; }

/* "Present" toggle under an end-date picker. */
.field > label.present-toggle,
.present-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: var(--fs-sm); font-weight: 500; color: var(--muted); cursor: pointer;
  text-transform: none; letter-spacing: normal; }
.present-toggle input { width: auto; margin: 0; accent-color: var(--primary-700); cursor: pointer; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2 .grid2-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
/* The hidden attribute must beat display-setting utility classes (.btn, flex bodies). */
[hidden] { display: none !important; }

/* ════════════════════════════════════════════════════════
   Resume page — list + collapsible edit-per-section editor
   ════════════════════════════════════════════════════════ */
.rz-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.rz-list-head h2 { font-size: var(--fs-xl); font-weight: 700; }
.rz-item-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer;
  transition: box-shadow var(--t), transform var(--t); }
.rz-item-row:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rz-item-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rz-item-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px; }
.rz-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rz-item-name { font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.rz-item-meta { font-size: var(--fs-xs); color: var(--muted); }
.rz-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: var(--radius-pill); }
.rz-badge.draft { color: var(--primary); background: var(--primary-light); }
.rz-badge.file { color: var(--status-saved); background: var(--surface-2); }
.rz-item-acts { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rz-open-hint { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 3px; }
.rz-open-hint .ic svg { width: 13px; height: 13px; }
.rz-more-btn { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rz-more-btn svg { transition: transform .2s var(--ease); }
.rz-item-row.open .rz-more-btn svg { transform: rotate(180deg); }
.rz-x { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.rz-x:hover { color: var(--danger); border-color: var(--danger-border); }
.rz-item-more { padding: 0 15px 13px; font-size: var(--fs-xs); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .rz-more-btn svg { transition: none; } }

.rz-editbar { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.rw-rewrite { display: inline-flex; align-items: center; gap: 4px; }
/* Rewrite modal: full-width controls in the shared .modal-field layout. */
#rewriteModal .modal-field select, #rewriteModal .modal-field input { width: 100%; }
.rz-label { flex: 1; min-width: 200px; font-size: var(--fs-md); font-weight: 700; }
.rz-saved { font-size: var(--fs-sm); color: var(--success); font-weight: 600; }

.rz-job { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 14px; }
.rz-job > summary { list-style: none; cursor: pointer; padding: 12px 15px; font-size: var(--fs-sm); }
.rz-job > summary::-webkit-details-marker { display: none; }
.rz-job-tag { color: var(--primary); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
.rz-job-co { color: var(--muted); }
.rz-job-body { padding: 0 15px 14px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.55;
  white-space: pre-wrap; max-height: 220px; overflow: auto; }

.rz-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; }
.rz-sec-head { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0;
  padding: 13px 15px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.rz-sec-title { font-size: var(--fs-md); font-weight: 700; flex-shrink: 0; }
.rz-sec-peek { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-chev { flex-shrink: 0; color: var(--muted); transition: transform .2s var(--ease); }
.rz-sec.open .rz-chev { transform: rotate(180deg); }
.rz-sec-body { padding: 2px 15px 15px; display: flex; flex-direction: column; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .rz-chev { transition: none; } }

/* Application-status select — text takes the stage color. */
.status-select { font-weight: 600; }
.status-select[data-status="saved"]     { color: var(--status-saved); }
.status-select[data-status="applied"]   { color: var(--status-applied); }
.status-select[data-status="interview"] { color: var(--status-interview); }
.status-select[data-status="offer"]     { color: var(--status-offer); }
.status-select[data-status="rejected"]  { color: var(--status-rejected); }

/* ── Pills & tabs (results tabs, mode toggle, filters, saved pills) ── */
.tab, .mode-tab, .filter-pill, .saved-pill {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font-weight: 600; color: var(--muted); transition: all var(--t);
}
.tab, .mode-tab { padding: 7px 14px; border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.filter-pill, .saved-pill { padding: 7px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); }
.tab:hover, .mode-tab:hover, .filter-pill:hover, .saved-pill:hover {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.tab.active, .mode-tab.active, .filter-pill.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(13,148,136,.45), 0 3px 8px -3px rgba(13,148,136,.5);
}
.saved-pill.active { background: var(--primary-light); border-color: var(--primary);
  color: var(--primary-hover); }
.filter-pill .count { opacity: .7; font-weight: 500; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: spin .65s linear infinite; vertical-align: -2px;
}
.spinner.dark { border-color: rgba(13,148,136,.22); border-top-color: var(--primary); }
.spinner.big  { width: 26px; height: 26px; border-width: 3px;
  border-color: rgba(13,148,136,.22); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Branded logo loader (jfLoader) ──────────────────────────
   The Lucipath mark with a pulse of light travelling down the path: the source
   dot flares, then each bar lights + widens in turn (staggered), looping. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lp-loader { display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 30px 14px; }
.lp-loader-msg { font-size: var(--fs-md); color: var(--muted); text-align: center; }
.lp-loader-mark { overflow: visible; }
.lp-loader-mark * { transform-box: fill-box; transform-origin: center; }
.lp-loader-mark line { stroke-width: 3; stroke-linecap: round; }
.lp-loader-mark .d  { fill: var(--primary);
  animation: lpDot 1.5s cubic-bezier(.4,0,.2,1) infinite; }
.lp-loader-mark .b1 { stroke: var(--primary);
  animation: lpLine 1.5s cubic-bezier(.4,0,.2,1) infinite .13s; }
.lp-loader-mark .b2 { stroke: #14b8a6;
  animation: lpLine 1.5s cubic-bezier(.4,0,.2,1) infinite .26s; }
.lp-loader-mark .b3 { stroke: #5eead4;
  animation: lpLine 1.5s cubic-bezier(.4,0,.2,1) infinite .39s; }
@keyframes lpDot  { 0%,46%,100% { transform: scale(.84); opacity: .42; }
  9% { transform: scale(1.14); opacity: 1; } }
@keyframes lpLine { 0%,46%,100% { transform: scaleX(.62); opacity: .24; }
  9% { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lp-loader-mark .d, .lp-loader-mark line { animation: none; opacity: 1; }
}

/* ── States ──────────────────────────────────────────────── */
.state-msg, .state { text-align: center; color: var(--muted); font-size: var(--fs-md); }
.state-msg { padding: 30px 14px; }
.state { padding: 52px 16px; }
.state-msg.error, .state.error { color: var(--danger); }

/* ── Modal ───────────────────────────────────────────────── */
.modal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 20px; z-index: 50;
  animation: modal-fade .16s var(--ease); }
.modal-box { background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; padding: 18px;
  animation: modal-pop .2s var(--ease); }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-pop  { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-box h2 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 4px; }
.modal-job { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 16px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.modal-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; align-items: center; }
.modal-error { color: var(--danger); font-size: var(--fs-sm); margin-right: auto; }

/* ── Resume PDF preview modal ── */
.rzp-box { max-width: 880px; padding: 0; display: flex; flex-direction: column; max-height: 92vh; overflow: hidden; }
.rzp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.rzp-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rzp-close { flex: none; width: 32px; height: 32px; border: none; background: transparent; color: var(--muted);
  font-size: 24px; line-height: 1; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--t), color var(--t); }
.rzp-close:hover { background: var(--surface-2); color: var(--text); }
.rzp-body { position: relative; background: var(--surface-2); min-height: 0; }
.rzp-docx { padding: 50px 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.rzp-docx svg { color: var(--faint); }
.rzp-docx p { margin: 0; max-width: 360px; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.rzp-box .modal-actions { margin: 0; padding: 12px 18px; border-top: 1px solid var(--border); }

/* ============================================================================
   PAGE LAYOUTS
   ============================================================================ */

/* ── Search (index) ──────────────────────────────────────── */
.search-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 20px; margin: -16px 24px 24px; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-row input, .search-row select { flex: 1 1 180px; }
.search-row input[type="text"] { flex: 2 1 240px; }
.filters-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.filters-row select { flex: 1 1 160px; }
.filters-row label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm);
  color: var(--muted); cursor: pointer; white-space: nowrap; }
.filters-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.mode-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.url-hint { font-size: var(--fs-sm); color: var(--muted); margin-top: 8px; }

/* Paste-the-description fallback under the URL import. */
.url-paste { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.url-paste > summary { font-size: var(--fs-sm); font-weight: 600; color: var(--primary-700);
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.url-paste > summary::-webkit-details-marker { display: none; }
.url-paste > summary::before { content: "+"; font-weight: 700; }
.url-paste[open] > summary::before { content: "–"; }
.url-paste textarea { width: 100%; margin: 10px 0; min-height: 120px; resize: vertical; }
.url-paste .search-row { gap: 10px; }

/* Google-style: until the first search, the search box sits vertically centered
   and the results/detail layout is hidden. exitPreSearch() drops the class. */
main.pre-search { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 120px); }
main.pre-search .layout { display: none; }
main.pre-search .search-card { width: 100%; max-width: 720px; margin: 0 auto; }

.layout { display: flex; gap: 16px; padding: 0 18px 32px; align-items: flex-start; }
.results-panel { flex: 1 1 340px; min-width: 0; }
.results-meta { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 12px; min-height: 20px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }

/* Result / tracker job cards (shared) */
.job-card { background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px; cursor: pointer;
  box-shadow: var(--shadow); transition: border-color var(--t), box-shadow var(--t), transform .1s ease; }
.job-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.job-card.active { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--ring); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); line-height: 1.3; }
.card-company { font-size: var(--fs-md); color: var(--muted); margin-top: 3px; }
.card-location { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px;
  display: flex; align-items: center; gap: 4px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0; }

/* Favorite (heart) button */
.fav-btn { background: transparent; border: none; cursor: pointer; padding: 2px; line-height: 0;
  color: var(--muted); border-radius: 6px; transition: color var(--t), transform .1s ease, background var(--t); }
.fav-btn:hover { color: var(--accent-rose); background: var(--rose-bg); transform: scale(1.1); }
.fav-btn svg { width: 20px; height: 20px; }
.fav-btn.active { color: var(--accent-rose); }
.fav-btn.active svg { fill: var(--accent-rose); }
/* heart rendered as a labelled button (detail footer / job panel) */
.detail-footer .fav-btn, .fav-btn.btn-block {
  border: 1px solid var(--border); padding: 9px 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.detail-footer .fav-btn svg, .fav-btn.btn-block svg { transform: none; }
.detail-footer .fav-btn:hover, .fav-btn.btn-block:hover { background: var(--rose-bg); transform: none; }
.detail-footer .fav-btn.active, .fav-btn.btn-block.active {
  color: var(--accent-rose); border-color: var(--rose-border); background: var(--rose-bg); }

/* Detail panel (sticky) */
.detail-panel { flex: 2 1 480px; min-width: 0; position: sticky; top: 20px; }
.detail-box { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 46px 18px; color: var(--muted); text-align: center; }
.detail-empty svg { margin-bottom: 14px; opacity: .35; }
.detail-empty p { font-size: var(--fs-md); }
.detail-header { padding: 18px 18px 12px; border-bottom: 1px solid var(--border); }
.detail-title { font-size: var(--fs-xl); font-weight: 700; line-height: 1.3; }
.detail-company { font-size: var(--fs-base); color: var(--muted); margin-top: 4px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail-body { padding: 15px 18px; }
.detail-footer { padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.detail-footer-end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 560px) { .detail-footer-end { margin-left: 0; width: 100%; } }
.highlights-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.highlight-block h4 { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; }
.highlight-block ul { padding-left: 18px; }
.highlight-block li { font-size: var(--fs-md); line-height: 1.55; color: var(--text); margin-bottom: 3px; }
.desc-text { font-size: var(--fs-md); line-height: 1.7; color: var(--text); white-space: pre-wrap;
  max-height: 340px; overflow-y: auto; padding-right: 4px; }

/* Stack results over detail on narrow screens (the sticky detail goes inline). */
@media (max-width: 780px) {
  .layout { flex-direction: column; padding: 0 16px 40px; }
  .detail-panel { position: static; width: 100%; }
}

/* ── Profile ─────────────────────────────────────────────── */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 20px;
  text-align: center; cursor: pointer; transition: border-color var(--t), background var(--t); }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-light); }
.dropzone svg { opacity: .4; margin-bottom: 8px; }
.dropzone p { font-size: var(--fs-md); color: var(--muted); }
.dropzone strong { color: var(--primary); }
.dz-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }

.extract-status { font-size: var(--fs-sm); margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm); display: none; }
.extract-status.show { display: block; }
.extract-status.info { background: var(--primary-light); color: var(--primary-hover); }
.extract-status.err  { background: var(--danger-bg); color: var(--danger); }
.extract-status.warn { background: var(--warn-bg); color: var(--warn); }
.batch-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.batch { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.batch.done .dot { background: var(--remote); }
.batch.run .dot  { background: var(--primary); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.item { border: 1px solid var(--border); border-radius: 9px; padding: 16px; margin-bottom: 12px;
  background: var(--surface-2); position: relative; }
.item .remove { position: absolute; top: 10px; right: 10px; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--input-bg); }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-light);
  color: var(--primary-hover); padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 500; }
.chip button { border: none; background: none; color: var(--primary-hover); cursor: pointer; font-size: .95rem; line-height: 1; padding: 0; }
.chip-input input { border: none; outline: none; box-shadow: none !important; flex: 1; min-width: 120px; padding: 3px; }

.save-bar { position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); padding: 14px 0; margin-top: 24px; display: flex; gap: 10px; align-items: center;
  border-top: 1px solid var(--border); }
.save-msg { font-size: var(--fs-sm); color: var(--muted); }
.save-msg.ok { color: var(--remote); }
.save-msg.err { color: var(--danger); }
.saved-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Saved jobs (tracker) ────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -12px 0 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.grid .card { display: flex; flex-direction: column; gap: 8px; padding: 14px;
  transition: box-shadow var(--t), transform var(--t); }
.grid .card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
/* Saved-job cards carry a status-colored left border, like the list view. */
.grid .card[data-status]            { border-left-width: 3px; border-left-color: var(--status-saved); }
.grid .card[data-status="applied"]   { border-left-color: var(--status-applied); }
.grid .card[data-status="interview"] { border-left-color: var(--status-interview); }
.grid .card[data-status="offer"]     { border-left-color: var(--status-offer); }
.grid .card[data-status="rejected"]  { border-left-color: var(--status-rejected); }
/* Saved-jobs cards/rows open the job page on click (handler in favorites.html). */
.card-open { cursor: pointer; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.control-row { display: flex; align-items: center; gap: 8px; }
.control-row label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); width: 64px; flex-shrink: 0; }
/* Compact saved-card controls: Status + Resume side by side, label above the select. */
.controls .control-row { flex-direction: column; align-items: stretch; gap: 3px; }
.controls .control-row label { width: auto; }
.controls .control-row select { padding-top: 7px; padding-bottom: 7px; }
.resume-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-actions .danger-link { margin-left: auto; }   /* Remove sits apart, on the right */
.danger-link:hover { color: var(--danger); }
.card-meta { font-size: var(--fs-xs); color: var(--muted); padding-top: 8px;
  margin-top: 1px; border-top: 1px solid var(--border); }
.saved-meta { font-size: var(--fs-sm); color: var(--muted); }

/* ── Saved jobs: view toolbar + Cards/List toggle ────────── */
/* Two tiers: filter pills on their own row, then a controls bar (sort + view)
   right-aligned below — keeps the filter row uncluttered. */
.tracker-toolbar { display: flex; flex-direction: column; gap: 14px; margin: -12px 0 22px; }
.tracker-toolbar .filters { margin: 0; }
.toolbar-controls { display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; flex-wrap: wrap; }

/* Sort is one segmented pill — [icon] [field ▾] | [direction] — visually
   matching the Cards/List toggle, so no floating "SORT" label is needed. */
.sort-control { display: inline-flex; align-items: stretch; height: 34px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t); }
.sort-control:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.sort-control .sort-ic { display: inline-flex; align-items: center; padding: 0 1px 0 11px; color: var(--muted); }
.sort-control .sort-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sort-control select#sort-field { border: 0; background-color: transparent; box-shadow: none;
  height: 100%; width: auto; min-width: 116px; padding: 0 30px 0 7px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.sort-control select#sort-field:focus { box-shadow: none; }
/* Keep a visible keyboard focus ring (inset so it sits inside the bordered control). */
.sort-control select#sort-field:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--radius-sm); }
.sort-control .sort-dir { height: 100%; width: 34px; flex-shrink: 0; border: 0;
  border-left: 1px solid var(--border); border-radius: 0; background: var(--surface);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; transition: all var(--t); }
.sort-control .sort-dir:hover { color: var(--primary); background: var(--primary-light); }
.view-toggle { display: inline-flex; align-items: stretch; height: 34px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle .seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0;
  padding: 0 13px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  background: transparent; cursor: pointer; transition: all var(--t); }
.view-toggle .seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.view-toggle .seg-btn:hover { color: var(--primary); background: var(--primary-light); }
.view-toggle .seg-btn.active { color: #fff; background: var(--primary); }
.view-toggle .seg-btn svg { width: 15px; height: 15px; }

/* ── Saved jobs: list (compact) view ─────────────────────── */
/* Flex, not grid: the row keeps everything on one line while there's room and
   wraps the controls below the job info when narrow. Intrinsic — it adapts to
   the actual space available rather than a fixed viewport breakpoint. */
.jl { display: flex; flex-direction: column; gap: 8px; }
.jl-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--status-saved); border-radius: var(--radius-md);
  padding: 14px 18px; transition: box-shadow var(--t), transform var(--t); }
.jl-row:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.jl-row[data-status="saved"]     { border-left-color: var(--status-saved); }
.jl-row[data-status="applied"]   { border-left-color: var(--status-applied); }
.jl-row[data-status="interview"] { border-left-color: var(--status-interview); }
.jl-row[data-status="offer"]     { border-left-color: var(--status-offer); }
.jl-row[data-status="rejected"]  { border-left-color: var(--status-rejected); }

/* Job info grows to fill the row, so the controls sit at the right edge with no
   dead gap; it can shrink and truncate before anything wraps. */
.jl-main { flex: 1 1 240px; min-width: 0; }
.jl-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); text-decoration: none; }
.jl-title:hover { color: var(--primary); }
.jl-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jl-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.jl-date { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }

/* Status + actions travel together and drop below the job info as one unit. */
.jl-controls { display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap; flex: 0 0 auto; }
.jl-status .status-select { width: 148px; }
.jl-actions { display: flex; gap: 6px; align-items: center; }
.jl-icon, .jl-slot { width: 33px; height: 33px; flex-shrink: 0; }
.jl-icon { display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted); cursor: pointer; text-decoration: none;
  transition: all var(--t); }
.jl-icon:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.jl-icon.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.jl-icon .ic, .jl-icon svg { width: 15px; height: 15px; }
.jl-slot { display: inline-block; }   /* keeps icons aligned in columns across rows */

/* Genuinely narrow (phones): give the controls the full width once wrapped. */
@media (max-width: 560px) {
  .jl-controls { width: 100%; justify-content: space-between; }
  .jl-slot { display: none; }
}

/* ── Recommendations page ─────────────────────────────────────── */
.rec-toolbar { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.rec-meta { font-size: var(--fs-sm); color: var(--muted); }
.rec-row .ga-ring.rec-ring { margin-right: 2px; }
.rec-new { display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary); border-radius: 999px; padding: 1px 8px; }
.rec-upsell p { max-width: 44ch; margin-inline: auto; }

/* Recommendations teaser (free/starter): a blurred sample feed behind a clear
   unlock CTA — shows the value (high % fit rings) without revealing job info. */
.rec-teaser { position: relative; min-height: 460px; }
.rec-teaser-feed {
  filter: blur(3px); -webkit-filter: blur(3px);
  pointer-events: none; user-select: none; opacity: .9;
  /* fade the bottom so the feed reads as "more below the fold" */
  -webkit-mask-image: linear-gradient(to bottom, #000 48%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 48%, transparent 97%);
}
.rec-teaser-overlay { position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; padding: 24px; }
.rec-teaser-cta { max-width: 440px; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 30px 28px; }
.rec-teaser-cta h3 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 8px; }
.rec-teaser-cta p { color: var(--muted); font-size: var(--fs-md);
  margin: 0 auto 20px; max-width: 42ch; }
.rec-teaser-sub { margin-top: 12px; font-size: var(--fs-sm); color: var(--muted); }
/* Redacted "job info" — skeleton bars (no real content leaks through the blur). */
.rec-skel { display: inline-block; height: 12px; border-radius: 6px;
  background: var(--border-strong); vertical-align: middle; max-width: 100%; }
.rec-teaser .jl-title .rec-skel { height: 13px; }
.rec-teaser .jl-sub .rec-skel { height: 10px; }
.rec-teaser .jl-tags { display: flex; gap: 8px; margin-top: 8px; }
.rec-skel.pill { height: 20px; border-radius: 999px; }
.rec-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 2px 0 6px; }
.rec-row .ga-ring.rec-ring { cursor: pointer; }

/* ── Saved jobs: board (kanban) view ─────────────────────── */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; transition: background var(--t), border-color var(--t); }
.board-col.over { border-color: var(--primary); background: var(--primary-light); }
.board-col-head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 11px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.board-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.board-col[data-status="saved"]     .board-dot { background: var(--status-saved); }
.board-col[data-status="applied"]   .board-dot { background: var(--status-applied); }
.board-col[data-status="interview"] .board-dot { background: var(--status-interview); }
.board-col[data-status="offer"]     .board-dot { background: var(--status-offer); }
.board-col[data-status="rejected"]  .board-dot { background: var(--status-rejected); }
.board-count { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 8px; }
.board-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.board-empty { text-align: center; color: var(--faint); font-size: var(--fs-xs);
  padding: 14px 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 11px; cursor: grab; box-shadow: var(--shadow);
  transition: box-shadow var(--t), transform var(--t); }
.board-card:hover { box-shadow: var(--shadow-md); }
.board-card:active { cursor: grabbing; }
.board-card.dragging { opacity: .45; }
.board-card-title { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); text-decoration: none; }
.board-card-title:hover { color: var(--primary); }
.board-card-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-card-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.board-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 9px; font-size: var(--fs-xs); color: var(--faint); }
.board-card-open { color: var(--muted); text-decoration: none; font-weight: 700; }
.board-card-open:hover { color: var(--primary); }

/* ── Job page ────────────────────────────────────────────── */
.box-header { padding: 16px 20px; }
.title { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.25; }
.company { font-size: var(--fs-lg); color: var(--muted); margin-top: 5px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.source-badge { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); font-style: italic; }
.wrap { display: flex; gap: 20px; align-items: flex-start; margin-top: 20px; flex-direction: row-reverse; }
.side { flex: 1 1 290px; position: sticky; top: 20px; }
.content { flex: 2 1 520px; min-width: 0; }
.body { padding: 16px 20px; }
.highlights { display: flex; flex-direction: column; gap: 16px; margin-bottom: 26px; }
.hl h4 { font-size: var(--fs-md); font-weight: 600; margin-bottom: 6px; }
.hl ul { padding-left: 18px; }
.hl li { font-size: var(--fs-md); line-height: 1.6; margin-bottom: 4px; }
.desc { font-size: var(--fs-md); line-height: 1.75; white-space: pre-wrap; }
.gap-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.gap-box { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 8px;
  padding: 14px 16px 14px 18px; margin-bottom: 24px; }
.gap-box ul { padding-left: 18px; }
.gap-box li { font-size: var(--fs-md); line-height: 1.6; color: var(--warn-strong); margin-bottom: 6px; }
.gap-box.gap-ok { background: var(--success-bg); border-color: var(--success-border);
  color: var(--success-strong); font-size: var(--fs-md); }
.panel { padding: 14px 14px 16px; }
.panel-title { font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.panel-hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.panel-id { font-size: var(--fs-xs); color: var(--muted); margin-top: 12px; }
@media (max-width: 780px) {
  .wrap { flex-direction: column; }
  .side { position: static; width: 100%; }
}

/* ── Home (landing) ──────────────────────────────────────── */
/* Hero: copy left, a live-looking product mock (auto-themed) on the right. */
.hero { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; gap: 40px;
  align-items: center; max-width: 1080px; margin: 38px auto 8px; padding: 0 20px;
  background: radial-gradient(120% 135% at 92% -25%, rgba(20,184,166,.13), transparent 46%); }
.hero-copy { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--primary);
  background: var(--primary-light); padding: 4px 11px;
  border-radius: var(--radius-pill); margin-bottom: 16px; }
.hero h1 { font-size: var(--fs-4xl); line-height: 1.07; letter-spacing: -.025em; font-weight: 800; color: var(--text); }
.hero h1 .accent { background: var(--grad-header); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.hero .lead { font-size: var(--fs-lg); color: var(--muted); margin-top: 16px; line-height: 1.5; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.trust { margin-top: 18px; font-size: var(--fs-xs); color: var(--muted); display: flex;
  align-items: center; gap: 8px; flex-wrap: wrap; }
.trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }
/* Reassurance microcopy under the primary CTA (hero + closing band). */
.cta-note { margin-top: 12px; font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--muted); letter-spacing: .01em; }
.cta-note-band { color: rgba(255,255,255,.92); margin-top: 14px; }
.btn-lg { padding: 12px 24px; font-size: var(--fs-base); }
.hero-art { min-width: 0; }

/* Hero "resume tailoring" demo — a resume filling itself in against a job. */
.tailor-demo { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 16px; max-width: 420px; margin: 0 auto; }
.td-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; min-width: 0; }
.td-tag { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
  color: var(--primary); background: var(--primary-light); border: 1px solid var(--primary-200);
  padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0; }
.td-job { font-size: var(--fs-sm); font-weight: 600; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }

.td-paper { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
  padding: 18px 18px 16px; }
.td-name { font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -.01em; line-height: 1.1; }
.td-role { font-size: var(--fs-sm); color: var(--primary); font-weight: 600; margin-top: 2px; }
.td-rule { height: 1px; background: var(--border); margin: 11px 0; }
.td-sec { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--muted); margin: 12px 0 7px; }
.td-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.td-bullets li { position: relative; padding-left: 16px; font-size: var(--fs-sm); color: var(--text); line-height: 1.4;
  opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.td-bullets li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--primary); }
.td-bullets li.in { opacity: 1; transform: none; }
.td-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.td-skills span { font-size: var(--fs-xs); font-weight: 600; color: var(--primary-hover); background: var(--primary-light);
  border: 1px solid var(--primary-200); border-radius: var(--radius-pill); padding: 3px 9px;
  opacity: 0; transform: scale(.85); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.td-skills span.in { opacity: 1; transform: none; }

.td-stamp { position: absolute; right: -8px; top: 14px; display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 700; color: #fff; background: var(--success); border-radius: var(--radius-pill);
  padding: 5px 11px; box-shadow: var(--shadow-md); opacity: 0; transform: scale(.5) rotate(-6deg);
  transition: opacity .35s var(--ease), transform .4s var(--ease); }
.td-stamp .ic { width: 13px; height: 13px; }
.td-stamp.in { opacity: 1; transform: scale(1) rotate(-6deg); }

.td-progress { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.td-status { flex: 1; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.td-track { flex: 0 0 92px; height: 6px; border-radius: var(--radius-pill); background: var(--surface-2);
  border: 1px solid var(--border); overflow: hidden; }
.td-fill { height: 100%; width: 0; background: var(--grad-header); border-radius: inherit; transition: width .55s var(--ease); }
.td-pct { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums;
  min-width: 30px; text-align: right; }

/* Capability strip — honest trust signals under the hero */
.stats-strip { max-width: 900px; margin: 28px auto 4px; padding: 16px 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stat-item { position: relative; padding: 4px 10px; }
.stat-item + .stat-item::before { content: ""; position: absolute; left: 0; top: 16%;
  height: 68%; width: 1px; background: var(--border); }
.stat-n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-xl);
  font-weight: 700; color: var(--primary); letter-spacing: -.02em; line-height: 1.1; }
.mono { font-family: var(--font-mono); }
.stat-l { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
@media (max-width: 620px) {
  .stats-strip { grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .stat-item:nth-child(3)::before { display: none; }
}

/* Browser-framed product mock (hero + feature visuals) */
.browser-frame { background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--border); }
.b-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.b-dot.r { background: #ec6a5e; } .b-dot.y { background: #f4bf50; } .b-dot.g { background: #61c554; }
.browser-url { flex: 1; margin-left: 7px; height: 18px; border-radius: 6px; background: var(--bg);
  display: flex; align-items: center; padding: 0 9px; font-size: 10px; color: var(--faint);
  white-space: nowrap; overflow: hidden; }

/* Mini Saved-Jobs board (hero shot) */
.app-mock { background: var(--bg); padding: 13px; }
.mock-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 11px; }
.mock-chip { font-size: 10px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px 10px; }
.mock-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.mock-seg { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 10px;
  font-weight: 700; color: #fff; background: var(--primary); border-radius: 6px; padding: 4px 9px; }
.mock-row { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--status-saved);
  border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; }
.mock-row:last-child { margin-bottom: 0; }
.mock-row[data-s="offer"] { border-left-color: var(--status-offer); }
.mock-row[data-s="interview"] { border-left-color: var(--status-interview); }
.mock-row[data-s="applied"] { border-left-color: var(--status-applied); }
.mock-main { flex: 1; min-width: 0; }
.mock-title { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.mock-status { font-size: 10px; font-weight: 700; padding: 4px 9px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); flex-shrink: 0; }
.mock-status.offer { color: var(--status-offer); }
.mock-status.interview { color: var(--status-interview); }
.mock-status.applied { color: var(--status-applied); }
.mock-acts { display: flex; gap: 3px; flex-shrink: 0; }
.mock-acts span { width: 17px; height: 17px; border: 1px solid var(--border); border-radius: 5px; }

/* Feature sections: alternating copy + product mock */
.feature-sections { display: flex; flex-direction: column; gap: 52px;
  max-width: 1000px; margin: 52px auto 56px; padding: 0 20px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.feature-row.reverse .feat-text { order: 2; }
.feat-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--primary);
  background: var(--primary-light); padding: 4px 10px; border-radius: var(--radius-pill); margin-bottom: 13px; }
.feat-text h3 { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
.feat-text > p { color: var(--muted); margin-top: 10px; font-size: var(--fs-md); line-height: 1.55; }
.feat-points { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.feat-points li { display: flex; align-items: flex-start; gap: 9px; font-size: var(--fs-sm); color: var(--text); }
.feat-points .ic { color: var(--success); margin-top: 1px; flex-shrink: 0; }
.feat-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: var(--fs-sm);
  font-weight: 600; color: var(--primary); text-decoration: none; transition: gap var(--t), color var(--t); }
.feat-link:hover { color: var(--primary-hover); gap: 9px; }
.feat-link .ic { width: 1em; height: 1em; }
.feat-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.feat-links .feat-link { margin-top: 0; }
.feat-links { margin-top: 18px; }
.feat-visual { min-width: 0; }

/* Feature mock — search */
.fm { background: var(--bg); padding: 14px; }
.fm-searchbar { display: flex; gap: 7px; margin-bottom: 11px; }
.fm-input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 8px 10px; font-size: 11px; color: var(--text); }
.fm-input.muted { flex: 0 0 84px; color: var(--faint); }
.fm-go { background: var(--primary); color: #fff; border-radius: 7px; padding: 8px 13px; font-size: 11px; font-weight: 700; }
.fm-result { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 7px; }
.fm-result:last-child { margin-bottom: 0; }
.fm-heart { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent-rose); flex-shrink: 0; }
.fm-heart svg { width: 13px; height: 13px; }
.fm-heart.on { background: var(--rose-bg); border-color: var(--rose-border); }
.fm-tag { font-size: 9.5px; font-weight: 600; color: var(--remote); background: var(--remote-bg);
  border-radius: 5px; padding: 2px 7px; flex-shrink: 0; }

/* Feature mock — resume document */
.fm-doc { background: var(--bg); padding: 18px; display: flex; justify-content: center; }
.fm-paper { width: 100%; max-width: 280px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); padding: 16px; position: relative; }
.fm-paper .ln { height: 7px; border-radius: 3px; background: var(--surface-2); margin-bottom: 8px; }
.fm-paper .ln.head { height: 11px; width: 52%; background: var(--primary); opacity: .85; margin-bottom: 12px; }
.fm-paper .ln.s1 { width: 94%; } .fm-paper .ln.s2 { width: 78%; } .fm-paper .ln.s3 { width: 88%; } .fm-paper .ln.s4 { width: 62%; }
.fm-paper .gap { height: 9px; }
.fm-badge { position: absolute; right: -12px; top: 24px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: #fff; background: var(--primary); border-radius: var(--radius-pill);
  padding: 5px 11px; box-shadow: var(--shadow-md); }
.fm-badge svg { width: 12px; height: 12px; }

/* Feature mock — templates & customization (auto-demo restyles the live preview) */
.tp-stage { background: var(--bg); padding: 16px 16px 20px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; }
.tp-tools { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.tp-styles { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill);
  overflow: hidden; background: var(--surface); }
.tp-pill { font-size: 10px; font-weight: 600; color: var(--muted); padding: 5px 12px;
  transition: color var(--t), background var(--t); }
.tp-pill + .tp-pill { border-left: 1px solid var(--border); }
.tp-pill.is-on { color: var(--on-primary); background: var(--primary); }
.tp-tools2 { display: inline-flex; align-items: center; gap: 12px; }
.tp-dots { display: inline-flex; gap: 7px; }
.tp-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 1px var(--border); transition: box-shadow var(--t); }
.tp-dot.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--c); }
.tp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill);
  overflow: hidden; background: var(--surface); }
.tp-seg b { font-size: 10px; font-weight: 600; color: var(--muted); padding: 4px 11px;
  transition: color var(--t), background var(--t); }
.tp-seg b + b { border-left: 1px solid var(--border); }
.tp-seg b.is-on { color: var(--on-primary); background: var(--primary); }

.tp-paper { width: 100%; max-width: 252px; background: #fff; border: 1px solid #e7eaf0;
  border-radius: 8px; box-shadow: var(--shadow); overflow: hidden;
  /* always a light page, even in dark mode */
  --surface-2: #eef1f5; --muted: #586173; --border: #e7eaf0; }
.tp-doc { --acc: #0f766e; padding: 15px 17px; }
.tp-accentbar { height: 3px; border-radius: 3px; background: var(--acc); margin: -3px -7px 11px;
  opacity: 0; transition: opacity .45s var(--ease), background .5s var(--ease); }
.tp-modern .tp-accentbar { opacity: 1; }
.tp-name { font-size: 14px; font-weight: 800; color: var(--acc); letter-spacing: -.01em; line-height: 1.1;
  transition: color .5s var(--ease), letter-spacing .4s var(--ease), font-weight .3s, font-size .35s var(--ease); }
.tp-role { font-size: 9.5px; font-weight: 600; color: var(--acc); opacity: .85; margin-top: 2px;
  transition: color .5s var(--ease); }
.tp-contact { font-size: 8px; color: var(--muted); margin-top: 3px; }
.tp-h { font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  margin: 11px 0 6px; padding-bottom: 3px; border-bottom: 1.5px solid var(--border);
  transition: background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), letter-spacing .4s var(--ease); }
.tp-ln { height: 6px; border-radius: 3px; background: var(--surface-2); margin-bottom: 7px;
  transition: height .35s var(--ease), margin .35s var(--ease); }
.tp-ln.s1 { width: 96%; } .tp-ln.s2 { width: 80%; } .tp-ln.s3 { width: 88%; } .tp-ln.s4 { width: 60%; }
/* style variants (mirror the real templates) */
.tp-modern .tp-h { border-bottom: none; color: var(--acc); padding: 3px 7px; border-radius: 3px;
  background: color-mix(in srgb, var(--acc) 13%, transparent); }
.tp-compact .tp-name { font-size: 12px; }
.tp-compact .tp-ln { height: 5px; margin-bottom: 5px; }
.tp-compact .tp-h { margin: 8px 0 4px; }
.tp-elegant .tp-name { font-weight: 600; letter-spacing: 1.4px; }
.tp-elegant .tp-h { border-bottom: none; letter-spacing: .18em; }
/* header alignment */
.tp-doc.is-center .tp-name, .tp-doc.is-center .tp-role, .tp-doc.is-center .tp-contact,
.tp-doc.is-center .tp-h { text-align: center; }

/* Feature mock — pipeline */
.fm-pipe { background: var(--bg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fm-stage { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--status-saved); border-radius: 8px; padding: 10px 12px; }
.fm-stage .pin { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.fm-stage .nm { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--text); }
.fm-stage .ct { font-size: 10px; font-weight: 700; color: var(--muted); }
.fm-stage[data-s="saved"] { border-left-color: var(--status-saved); }
.fm-stage[data-s="saved"] .pin { background: var(--status-saved); }
.fm-stage[data-s="applied"] { border-left-color: var(--status-applied); }
.fm-stage[data-s="applied"] .pin { background: var(--status-applied); }
.fm-stage[data-s="interview"] { border-left-color: var(--status-interview); }
.fm-stage[data-s="interview"] .pin { background: var(--status-interview); }
.fm-stage[data-s="offer"] { border-left-color: var(--status-offer); }
.fm-stage[data-s="offer"] .pin { background: var(--status-offer); }

/* Scroll-triggered feature-mock animations — each demonstrates its feature when
   it enters the viewport. JS adds .anim (initial hidden state) only when motion
   is allowed and always reaches .play (IntersectionObserver + safety net), so
   content is never left stuck hidden. */
/* Search mock: query types in, the button pulses, results pop in, one favorites. */
.feat-visual.anim .fm-result { opacity: 0; transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease); }
.feat-visual.anim.searched .fm-result { opacity: 1; transform: none; }
.feat-visual.anim.searched .fm-result + .fm-result { transition-delay: .14s; }
.fm-input.typing::after { content: ""; display: inline-block; width: 1px; height: .95em; vertical-align: -1px;
  margin-left: 1px; background: var(--text); animation: caretBlink 1s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.fm-go.busy { animation: goPulse .48s var(--ease); }
@keyframes goPulse { 50% { transform: scale(.94); opacity: .8; } }

/* Tailor mock: an AI "scan" sweeps down the resume, lines light up from pale to
   written as it passes, keyword lines turn teal, then "Tailored" stamps. */
.fm-paper .fm-scan { position: absolute; left: 0; right: 0; top: -60px; height: 46px; opacity: 0;
  pointer-events: none; background: linear-gradient(180deg, transparent, rgba(20,184,166,.22), transparent); }
/* resume text content */
.fm-paper .fmd-name { font-size: 12px; font-weight: 800; color: var(--text); letter-spacing: -.01em; line-height: 1.1; }
.fm-paper .fmd-role { font-size: 9.5px; font-weight: 600; color: var(--primary); margin-top: 2px; }
.fm-paper .fmd-rule { height: 1px; background: var(--border); margin: 9px 0; }
.fm-paper .fmd-line { position: relative; padding-left: 11px; font-size: 9.5px; line-height: 1.5; color: var(--muted);
  margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-paper .fmd-line::before { content: ""; position: absolute; left: 1px; top: 6px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--border-strong); transition: background .4s var(--ease); }
.fm-paper .fmd-line b { font-weight: 700; color: var(--primary); transition: color .4s var(--ease); }
/* reveal each line as the scan passes (JS adds .written) */
.feat-visual.anim .fm-paper .fmd-line { opacity: .22; transition: opacity .45s var(--ease); }
.feat-visual.anim .fm-paper .fmd-line b { color: var(--faint); }
.feat-visual.anim.play .fm-paper .fmd-line.written { opacity: 1; }
.feat-visual.anim.play .fm-paper .fmd-line.written b { color: var(--primary); }
.feat-visual.anim.play .fm-paper .fmd-line.written::before { background: var(--primary); }
.feat-visual.anim .fmv-paper.run .fm-scan { animation: scanDown 1.25s var(--ease) .1s 1 both; }
@keyframes scanDown { 0% { top: -60px; opacity: 0; } 14% { opacity: 1; } 86% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.feat-visual.anim .fm-badge { opacity: 0; transform: scale(.5) translateX(6px);
  transition: opacity .4s var(--ease) 1.15s, transform .45s var(--ease) 1.15s; }
.feat-visual.anim .fmv-paper.run .fm-badge { opacity: 1; transform: none; }

/* Tailor revolves between the tailored resume and a resume reply-rate view. */
.fmv-paper { align-items: center; }
/* Tailor view 2 · resume reply rate — reuse the best resume for similar roles */
.fm-eff { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; margin: 0 auto; }
.fm-erow { display: flex; align-items: center; gap: 10px; }
.fm-elabel { width: 92px; flex-shrink: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fm-ename { font-size: 10.5px; font-weight: 700; color: var(--text); }
.fm-erow.is-best .fm-ename { color: var(--primary); }
.fm-erole { font-size: 9px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.fm-etrack { position: relative; flex: 1; height: 9px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.fm-efill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px;
  background: color-mix(in srgb, var(--primary) 42%, transparent); transition: width .9s var(--ease) .2s; }
.fm-erow.is-best .fm-efill { background: var(--primary); }
.fm-eval { width: 30px; flex-shrink: 0; text-align: right; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; color: var(--muted); }
.fm-erow.is-best .fm-eval { color: var(--primary); }
.fm-enote { margin-top: 15px; text-align: center; font-size: 9.5px; color: var(--muted); }
.fm-enote b { color: var(--primary); font-weight: 700; }
.fm-rcyc { color: var(--primary); font-weight: 700; }
.feat-visual.anim .fmv-eff .fm-erow { opacity: 0; transform: translateX(-8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.feat-visual.anim .fmv-eff.run .fm-erow { opacity: 1; transform: none; }
.feat-visual.anim .fmv-eff.run .fm-erow:nth-child(2) { transition-delay: .09s; }
.feat-visual.anim .fmv-eff.run .fm-erow:nth-child(3) { transition-delay: .18s; }
.feat-visual.anim .fmv-eff .fm-enote { opacity: 0; transition: opacity .5s var(--ease); }
.feat-visual.anim .fmv-eff.run .fm-enote { opacity: 1; transition-delay: .5s; }

/* Track mock revolves through three analytics views: funnel → line → pie.
   Views crossfade; JS adds .run to re-play the active view's entrance. */
.fm-charts { position: relative; background: var(--bg); padding: 16px; min-height: 224px; }
.fm-view { position: absolute; inset: 16px; opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease); display: flex; flex-direction: column; justify-content: center; }
.fm-view.is-on { opacity: 1; }
.fm-vtitle { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  text-align: center; margin-bottom: 12px; }

/* Funnel view */
.fmv-funnel .fm-pipe { padding: 0; }
.fm-stage { position: relative; overflow: hidden; }
.fm-stage > .pin, .fm-stage > .nm, .fm-stage > .ct { position: relative; z-index: 1; }
.fm-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; border-radius: 8px;
  transition: width .9s var(--ease) .2s; }
.fm-stage[data-s="saved"] .fm-bar { background: color-mix(in srgb, var(--status-saved) 13%, transparent); }
.fm-stage[data-s="applied"] .fm-bar { background: color-mix(in srgb, var(--status-applied) 13%, transparent); }
.fm-stage[data-s="interview"] .fm-bar { background: color-mix(in srgb, var(--status-interview) 15%, transparent); }
.fm-stage[data-s="offer"] .fm-bar { background: color-mix(in srgb, var(--status-offer) 15%, transparent); }
.feat-visual.anim .fmv-funnel .fm-stage { opacity: 0; transform: translateX(-10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.feat-visual.anim .fmv-funnel.run .fm-stage { opacity: 1; transform: none; }
.feat-visual.anim .fmv-funnel.run .fm-stage:nth-child(2) { transition-delay: .08s; }
.feat-visual.anim .fmv-funnel.run .fm-stage:nth-child(3) { transition-delay: .16s; }
.feat-visual.anim .fmv-funnel.run .fm-stage:nth-child(4) { transition-delay: .24s; }

/* Line view */
.fm-line { width: 100%; height: auto; display: block; }
.fm-line .g0 { stop-color: var(--primary); stop-opacity: .22; }
.fm-line .g1 { stop-color: var(--primary); stop-opacity: 0; }
.fm-line-path { stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s var(--ease); }
.fmv-line.run .fm-line-path { stroke-dashoffset: 0; }
.fm-line-area, .fm-dot { opacity: 0; transition: opacity .5s var(--ease); }
.fm-dot { fill: var(--primary); }
.fmv-line.run .fm-line-area { opacity: 1; transition-delay: .55s; }
.fmv-line.run .fm-dot { opacity: 1; transition-delay: .95s; }

/* Pie view */
.fm-pie-wrap { display: flex; align-items: center; gap: 22px; justify-content: center; }
.fm-pie { width: 104px; height: 104px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--status-saved) 0 52%, var(--status-applied) 52% 82%,
    var(--status-interview) 82% 95%, var(--status-offer) 95% 100%);
  -webkit-mask: radial-gradient(circle, #0000 54%, #000 55%); mask: radial-gradient(circle, #0000 54%, #000 55%);
  transform: scale(.55) rotate(-25deg); opacity: 0;
  transition: transform .6s var(--ease), opacity .45s var(--ease); }
.fmv-pie.run .fm-pie { transform: none; opacity: 1; }
.fm-legend { display: flex; flex-direction: column; gap: 7px; font-size: 10.5px; color: var(--muted); }
.fm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.fm-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

/* Gap-analysis section revolves three views: category gaps → skills radar →
   readiness by target role. Teal = covered, amber = the gap to close. */
.fm-vtitle b { color: var(--primary); }
/* Taller frame so the radar reads larger (esp. on mobile, full width). */
.fm-gapviz { min-height: 344px; }
/* View 1 · gaps by category */
.fm-gaps { display: flex; flex-direction: column; gap: 11px; width: 100%; max-width: 290px; margin: 0 auto; }
.fm-gaprow { display: flex; align-items: center; gap: 10px; }
.fm-glabel { width: 86px; flex-shrink: 0; font-size: 10.5px; font-weight: 600; color: var(--text); }
.fm-gtrack { position: relative; flex: 1; height: 9px; border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--status-interview) 24%, transparent); }
.fm-ghave { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px;
  background: var(--primary); transition: width .9s var(--ease) .2s; }
.fm-gpct { width: 30px; flex-shrink: 0; text-align: right; font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; color: var(--muted); }
.fm-gnote { margin-top: 13px; text-align: center; font-size: 9.5px; color: var(--muted); }
.fm-gnote b { color: var(--status-interview); font-weight: 700; }
.feat-visual.anim .fmv-gapbars .fm-gaprow { opacity: 0; transform: translateX(-8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.feat-visual.anim .fmv-gapbars.run .fm-gaprow { opacity: 1; transform: none; }
.feat-visual.anim .fmv-gapbars.run .fm-gaprow:nth-child(2) { transition-delay: .08s; }
.feat-visual.anim .fmv-gapbars.run .fm-gaprow:nth-child(3) { transition-delay: .16s; }
.feat-visual.anim .fmv-gapbars.run .fm-gaprow:nth-child(4) { transition-delay: .24s; }
.feat-visual.anim .fmv-gapbars .fm-gnote { opacity: 0; transition: opacity .5s var(--ease); }
.feat-visual.anim .fmv-gapbars.run .fm-gnote { opacity: 1; transition-delay: .5s; }

/* View 2 · skills radar */
.fm-radar { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto;
  opacity: 0; transform: scale(.82); transition: opacity .5s var(--ease), transform .55s var(--ease); }
.fmv-radar.run .fm-radar { opacity: 1; transform: none; }
.fm-rgrid { fill: none; stroke: var(--border); stroke-width: 1; }
.fm-raxis { stroke: var(--border); stroke-width: 1; }
.fm-rlabel { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.fm-rneed { fill: color-mix(in srgb, var(--status-interview) 12%, transparent);
  stroke: var(--status-interview); stroke-width: 1.5; stroke-dasharray: 3 2; }
.fm-ryou { fill: color-mix(in srgb, var(--primary) 26%, transparent);
  stroke: var(--primary); stroke-width: 2; opacity: 0; transition: opacity .55s var(--ease) .35s; }
.fmv-radar.run .fm-ryou { opacity: 1; }
.fm-rlegend { display: flex; justify-content: center; gap: 18px; margin-top: 10px;
  font-size: 9.5px; color: var(--muted); }
.fm-rlegend span { display: inline-flex; align-items: center; gap: 6px; }
.fm-rlegend i { width: 11px; height: 3px; border-radius: 2px; display: inline-block; }

/* View 3 · readiness by target role */
.fm-roles { display: flex; flex-direction: column; gap: 13px; width: 100%; max-width: 290px; margin: 0 auto; }
.fm-role { display: flex; align-items: center; gap: 13px; }
.fm-ring { position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid; place-items: center; transform: scale(.5); opacity: 0;
  transition: transform .55s var(--ease), opacity .4s var(--ease); }
.fm-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.fm-ring b { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--text); }
.fm-rmeta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.fm-rname { font-size: 11px; font-weight: 700; color: var(--text); }
.fm-rgap { font-size: 9px; font-weight: 600; color: var(--status-interview); }
.feat-visual.anim .fmv-roles .fm-role { opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.feat-visual.anim .fmv-roles.run .fm-role { opacity: 1; transform: none; }
.feat-visual.anim .fmv-roles.run .fm-ring { opacity: 1; transform: none; }
.feat-visual.anim .fmv-roles.run .fm-role:nth-child(2) { transition-delay: .1s; }
.feat-visual.anim .fmv-roles.run .fm-role:nth-child(2) .fm-ring { transition-delay: .1s; }
.feat-visual.anim .fmv-roles.run .fm-role:nth-child(3) { transition-delay: .2s; }
.feat-visual.anim .fmv-roles.run .fm-role:nth-child(3) .fm-ring { transition-delay: .2s; }

@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.fm-heart.pop { animation: heartPop .4s var(--ease); }
.fm-heart.on svg path { fill: currentColor; stroke: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; margin-top: 26px; gap: 28px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .trust, .eyebrow { justify-content: center; }
  .eyebrow { margin-left: auto; margin-right: auto; }
  .hero-art { max-width: 460px; margin: 0 auto; width: 100%; }
}
@media (max-width: 760px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 20px; }
  .feature-row.reverse .feat-text { order: 0; }
}

/* Section heading (how it works) */
.section-head { text-align: center; max-width: 600px; margin: 0 auto 32px; }
/* Small teal accent bar above each section head — a light hairline for rhythm. */
.section-head::before { content: ""; display: block; width: 54px; height: 3px; border-radius: 2px;
  background: var(--primary); opacity: .55; margin: 0 auto 22px; }
.section-head h2 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: var(--fs-md); }

/* How it works — numbered steps */
.how { max-width: 1000px; margin: 8px auto 0; padding: 0 20px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 11px; background: var(--primary-light); color: var(--primary); }
.step-ic .ic svg { width: 19px; height: 19px; }
.step-num { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md); color: var(--faint); }
.step-num::before { content: "0"; }
.step h3 { font-size: var(--fs-lg); font-weight: 700; margin: 14px 0 5px; }
/* Step-specific mini preview to give each card visual weight. */
.step-thumb { margin-top: 16px; display: flex; align-items: center; gap: 10px; min-height: 30px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; }
.st-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); flex-shrink: 0; }
.st-col { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.st-line { height: 6px; border-radius: 3px; background: var(--surface-2); }
.st-line.w70 { width: 70%; } .st-line.w55 { width: 55%; } .st-line.w45 { width: 45%; } .st-line.w80 { width: 80%; }
.st-input { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-btn { flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff; background: var(--primary);
  border-radius: 6px; padding: 5px 11px; }
.st-check { flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; background: var(--success-bg);
  color: var(--success); display: inline-flex; align-items: center; justify-content: center; }
.st-check .ic svg { width: 14px; height: 14px; }
.step p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Closing CTA band */
.cta-band { background: var(--grad-header); border-radius: 20px; max-width: 1000px;
  margin: 56px auto 0; padding: 44px 24px; text-align: center; color: #fff;
  box-shadow: 0 18px 40px -16px rgba(13,148,136,.6); }
.cta-band h2 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.02em; }
.cta-band p { opacity: .92; margin-top: 8px; font-size: var(--fs-md); }
.cta-band .btn { margin-top: 22px; background: #fff; color: var(--primary-800);
  border-color: #fff; box-shadow: var(--shadow); }
.cta-band .btn:hover:not(:disabled) { background: #effdfa; color: var(--primary-900); }

/* ── Pricing page ────────────────────────────────────────── */
.pricing-hero { max-width: 760px; margin: 8px auto 0; padding: 28px 20px 8px; text-align: center; }
.pricing-hero h1 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -.02em; margin: 10px 0 0; }
.pricing-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr);
  max-width: 1160px; margin: 28px auto 0; padding: 0 20px; align-items: start; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 16px);
  padding: 24px 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.price-card.pc-hot { border-color: var(--primary); box-shadow: 0 16px 40px -18px rgba(13,148,136,.55); }
.pc-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: var(--fs-xs); font-weight: 700;
  padding: 3px 12px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.pc-name { font-size: var(--fs-xl); font-weight: 800; }
.pc-tag { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 14px; min-height: 2.4em; }
.pc-amt { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.pc-amt .pc-per { font-size: var(--fs-md); font-weight: 600; color: var(--muted); }
.pc-sub { color: var(--muted); font-size: var(--fs-xs); margin: 6px 0 18px; min-height: 1.4em; }
.price-card .btn { margin-bottom: 18px; }
.pc-features { list-style: none; display: flex; flex-direction: column; gap: 9px;
  font-size: var(--fs-sm); border-top: 1px solid var(--border); padding-top: 16px; }
.pc-features li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.pc-features .ic { flex: none; color: var(--primary); margin-top: 1px; width: 15px; height: 15px; }
.pricing-note { max-width: 760px; margin: 22px auto 0; padding: 0 20px; text-align: center;
  color: var(--muted); font-size: var(--fs-sm); }
.bill-toggle { display: inline-flex; gap: 4px; margin: 22px auto 0; padding: 4px;
  background: var(--surface-2, var(--bg)); border: 1px solid var(--border); border-radius: 999px;
  position: relative; left: 50%; transform: translateX(-50%); }
.bt-opt { border: none; background: none; cursor: pointer; padding: 8px 18px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.bt-opt.active { background: var(--primary); color: #fff; }
.bt-save { font-size: var(--fs-xs); font-weight: 600; padding: 2px 7px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary); }
.bt-opt.active .bt-save { background: rgba(255,255,255,.22); color: #fff; }
.pricing-msg { max-width: 760px; margin: 14px auto 0; padding: 0 20px; text-align: center; font-size: var(--fs-sm); }
.pricing-msg.err { color: var(--danger); }
.pricing-msg.ok { color: var(--success); font-weight: 600; }
.js-checkout.is-loading { opacity: .7; pointer-events: none; }

.pricing-faq { max-width: 760px; margin: 48px auto 0; padding: 0 20px; }
.pricing-faq h2 { font-size: var(--fs-2xl); font-weight: 800; text-align: center; margin-bottom: 18px; }
.pricing-faq .faq-item { margin-bottom: 10px; }
@media (max-width: 1000px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* FAQ — native <details> disclosure, no JS */
.faq { max-width: 760px; margin: 56px auto 0; padding: 0 20px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0 18px; transition: border-color var(--t); }
.faq-item[open] { border-color: var(--primary-border, var(--border-strong)); }
.faq-item summary { list-style: none; cursor: pointer; padding: 15px 0; font-size: var(--fs-md);
  font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--primary);
  line-height: 1; flex-shrink: 0; transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item > p { margin: 0 0 16px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.faq-item code { font-family: var(--font-mono); font-size: .92em; background: var(--surface-2);
  padding: 1px 5px; border-radius: 5px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 36px 20px 26px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand .f-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--fs-lg); }
.footer-brand p { color: var(--muted); font-size: var(--fs-sm); margin-top: 10px; max-width: 270px; line-height: 1.5; }
.footer-col h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.footer-col a { display: block; color: var(--text); text-decoration: none; font-size: var(--fs-sm); padding: 4px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .fb-inner { max-width: 1080px; margin: 0 auto; padding: 15px 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

/* Scroll-reveal — progressive enhancement: elements are hidden ONLY once ui.js
   confirms it can animate (adds .reveal-on to <html> before paint). Without JS,
   or with reduced-motion, .reveal stays fully visible — never stuck blank. */
html.reveal-on .reveal { opacity: 0; transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease); }
html.reveal-on .reveal.in { opacity: 1; transform: none; }

/* ── Auth (login / signup) ───────────────────────────────── */
.auth-wrap { max-width: 440px; margin: 56px auto; padding: 0 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 22px; }
.auth-card h2 { font-size: var(--fs-xl); font-weight: 700; }
.auth-card .sub { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 18px; }
.auth-toggle { display: flex; gap: 6px; margin-bottom: 20px; }
.auth-toggle .mode-tab { flex: 1; justify-content: center; }
.opt-in { display: flex; gap: 9px; align-items: flex-start; margin: 2px 0 16px;
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; cursor: pointer; }
.opt-in input { width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.auth-error { color: var(--danger); font-size: var(--fs-sm); margin-top: 12px; min-height: 18px; }
.auth-alt { text-align: center; font-size: var(--fs-sm); color: var(--muted); margin-top: 18px; }
.auth-alt a, .auth-alt button { color: var(--primary); font-weight: 600; background: none;
  border: none; cursor: pointer; font-size: inherit; font-family: inherit; padding: 0; }
.auth-notice { font-size: var(--fs-sm); line-height: 1.5; color: var(--success-strong);
  background: var(--success-bg); border: 1px solid var(--success-border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 4px; }

/* ── Account ─────────────────────────────────────────────── */
.danger-zone { border-color: var(--danger-border); }
.danger-zone .card-head h2 { color: var(--danger); }
/* Banner shown while a requested email change awaits confirmation. */
.pending-email {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 2px; padding: 12px 14px;
  font-size: var(--fs-sm); line-height: 1.5; color: var(--text);
  background: var(--primary-light); border: 1px solid var(--primary-200);
  border-radius: 10px;
}
.pending-email .ic { flex: none; color: var(--primary); margin-top: 1px; }
.pending-email strong { font-weight: 650; }
/* Email-preferences rows with a toggle switch. */
.pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--border); cursor: pointer;
}
.pref-row:first-child { border-top: none; }
.pref-text { display: flex; flex-direction: column; gap: 2px; }
.pref-text strong { font-weight: 600; font-size: var(--fs-sm); }
.pref-text small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
#prefsList[aria-busy="true"] { opacity: .5; pointer-events: none; }
.switch { position: relative; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong, var(--border));
  transition: background .15s ease; pointer-events: none;
}
.switch .slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.2));
  transition: transform .15s ease;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + .slider { opacity: .6; }
/* Plan & billing card */
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-id { display: flex; align-items: baseline; gap: 10px; }
.plan-name { font-size: var(--fs-lg); font-weight: 700; }
.plan-state { font-size: var(--fs-xs); color: var(--warning, var(--muted)); }
.plan-actions { display: flex; gap: 8px; }
.usage-meters { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.um-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; font-size: var(--fs-sm); }
.um-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.um-unl { color: var(--primary); font-weight: 600; }
.um-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.um-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ── Analytics ───────────────────────────────────────────── */
.analytics-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 20px; align-items: center; }
.analytics-filters .filter-label { font-size: var(--fs-sm); color: var(--muted); margin-right: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 20px; }
.stat-tile { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 15px; }
.stat-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-label .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stat-value { font-size: 1.85rem; font-weight: 800; line-height: 1.05; margin-top: 8px; color: var(--text); }
.stat-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.charts-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .charts-row { grid-template-columns: 1fr; } }
.chart-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.chart-card h3 { font-size: var(--fs-md); font-weight: 700; }
.chart-card .chart-sub { font-size: var(--fs-xs); color: var(--muted); margin: 2px 0 14px; }
.chart-box { position: relative; height: 280px; }
/* Chart-card header with a right-aligned control (e.g. weekly/monthly toggle). */
.ts-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ts-head h3 { font-size: var(--fs-md); font-weight: 700; }
.ts-head .chart-sub { margin: 2px 0 0; }

/* Resume performance (advance rate) — analytics page */
.resume-perf { margin-top: 18px; }
.rp-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.rp-row { display: flex; align-items: center; gap: 12px; }
.rp-meta { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; min-width: 0; }
.rp-name { font-size: var(--fs-sm); font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-row.is-best .rp-name { color: var(--primary); }
.rp-sub { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.rp-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px;
  background: color-mix(in srgb, var(--primary) 45%, transparent); transition: width .6s var(--ease); }
.rp-row.is-best .rp-fill { background: var(--primary); }
.rp-pct { width: 46px; flex-shrink: 0; text-align: right; font-family: var(--font-mono);
  font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.rp-row.is-best .rp-pct { color: var(--primary); }
.rp-note { margin-top: 16px; font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 7px; }
.rp-note b { color: var(--primary); font-weight: 700; }
.rp-note .ic { color: var(--primary); flex-shrink: 0; }
@media (max-width: 640px) { .rp-meta { width: 124px; } }

/* Reuse-suggestion banner in the resume generate modal */
.gen-reuse { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 14px;
  background: var(--primary-light); color: var(--primary-900); border: 1px solid var(--primary-200);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: var(--fs-sm); line-height: 1.45; }
.gen-reuse b { font-weight: 700; }
.gen-reuse .ic { color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* ════════════════════════════════════════════════════════
   Gap-analysis page
   ════════════════════════════════════════════════════════ */
.ga-empty-hint { color: var(--muted); font-size: var(--fs-sm); padding: 20px 0; }

/* progress ring (shared: overall match + readiness + plan cards), sized via --sz */
.ga-ring { position: relative; width: var(--sz, 64px); height: var(--sz, 64px); flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; }
.ga-ring::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: var(--surface); }
.ga-ring b { position: relative; z-index: 1; font-family: var(--font-mono); font-weight: 700; color: var(--text);
  font-size: calc(var(--sz, 64px) * 0.22); }

.ga-analysis { margin-top: 18px; }
.ga-top { display: flex; align-items: center; gap: 18px; }
.ga-top-role { font-size: var(--fs-lg); font-weight: 700; color: var(--text); }
.ga-top-class { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.ga-class-label { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ga-class-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.ga-top-summary { font-size: var(--fs-sm); color: var(--muted); margin-top: 5px; line-height: 1.5; }
.ga-top-joblink { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: var(--fs-sm);
  font-weight: 600; color: var(--primary); text-decoration: none; }
.ga-top-joblink:hover { text-decoration: underline; }
.ga-top-joblink .ic { width: 14px; height: 14px; }
.ga-resume-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md, 12px);
  background: var(--status-offer-bg, rgba(16,185,129,.08)); }
.ga-resume-label { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.ga-resume-label .ic { color: var(--status-offer); }
.ga-resume-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ga-sub { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 10px; }
.ga-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; }
@media (max-width: 720px) { .ga-grid { grid-template-columns: 1fr; } }

.ga-cat { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.ga-cat-name { width: 108px; flex-shrink: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.ga-track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); }
.ga-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--primary); transition: width .6s var(--ease); }
.ga-cat-pct { width: 52px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
/* Clickable dimension rows → open the per-requirement breakdown modal. */
/* Dimensions the role doesn't demand: muted, non-interactive, no misleading bar. */
.ga-cat-na .ga-cat-name { color: var(--muted); }
.ga-na-note { flex: 1; font-size: var(--fs-sm); color: var(--muted); font-style: italic; }

/* Per-dimension breakdown — shown inline under the coverage chart */
.gd-dims { display: grid; gap: 12px; }
.gd-dim { border: 1px solid var(--border); border-radius: var(--radius-md, 12px); padding: 14px 16px; background: var(--surface-2); }
.gd-dim-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.gd-dim-name { font-size: var(--fs-md); font-weight: 700; }
.gd-dim-meta { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-group { margin-bottom: 14px; }
.gd-group:last-child { margin-bottom: 0; }
.gd-glabel { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.gd-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); }
.gd-item:first-of-type { border-top: 0; }
.gd-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; line-height: 1; }
.gd-covered .gd-ic { background: var(--status-offer-bg, rgba(16,185,129,.15)); color: var(--status-offer); }
.gd-partial .gd-ic { background: rgba(245,158,11,.15); color: var(--status-interview); }
.gd-missing .gd-ic { background: var(--rose-bg); color: var(--accent-rose); }
.gd-text { font-size: var(--fs-md); line-height: 1.5; }
.gd-text b { font-weight: 600; color: var(--text); }
.gd-tag { font-size: var(--fs-xs); font-weight: 600; color: var(--status-interview); }
.gd-ev { display: block; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; margin-top: 2px; }
.gd-empty { color: var(--muted); font-size: var(--fs-sm); padding: 6px 0; }
.gd-note { color: var(--muted); font-size: var(--fs-xs); margin: -2px 0 8px; }
.gd-add { flex: none; margin-left: auto; align-self: center; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary); border-radius: 999px; padding: 4px 11px;
  font-size: var(--fs-xs); font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background var(--t), border-color var(--t); }
.gd-add:hover { background: var(--surface-2); border-color: var(--primary); }
.gd-add.done { color: var(--status-offer); border-color: transparent; background: transparent; cursor: default; }

.ga-radar { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.ga-rgrid { fill: none; stroke: var(--border); stroke-width: 1; }
/* Outer 100% boundary, drawn on top of the data so it always reads as the cap. */
.ga-redge { fill: none; stroke: var(--muted); stroke-width: 1.25; opacity: .55; }
.ga-raxis { stroke: var(--border); stroke-width: 1; }
.ga-rlabel { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.ga-ryou { fill: color-mix(in srgb, var(--primary) 26%, transparent); stroke: var(--primary); stroke-width: 2; }
.ga-rlegend { display: flex; justify-content: center; gap: 18px; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }
.ga-rlegend span { display: inline-flex; align-items: center; gap: 6px; }
.ga-rlegend i { width: 11px; height: 3px; border-radius: 2px; display: inline-block; }

.ga-missing { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 9px; }
.ga-mcat { width: 108px; flex-shrink: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
.ga-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ga-chip { font-size: var(--fs-xs); color: var(--status-interview); background: color-mix(in srgb, var(--status-interview) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-interview) 30%, transparent); border-radius: var(--radius-pill); padding: 3px 9px; }

.ga-plan { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ga-step { display: flex; gap: 11px; align-items: flex-start; }
.ga-step-pri { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center;
  justify-content: center; font-size: var(--fs-xs); font-weight: 700; color: #fff; }
.ga-step b { font-size: var(--fs-sm); color: var(--text); font-weight: 700; }
.ga-step-detail { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 1px; }
.ga-high .ga-step-pri { background: var(--danger); }
.ga-medium .ga-step-pri { background: var(--status-interview); }
.ga-low .ga-step-pri { background: var(--status-saved); }

.ga-section-head { margin: 30px 0 14px; }
.ga-section-head h2 { font-size: var(--fs-xl); font-weight: 700; }
.ga-section-head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 3px; }
.ga-rings { display: flex; flex-wrap: wrap; gap: 14px; }
.ga-role-ring { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); cursor: pointer; text-align: left;
  font-family: inherit; transition: border-color var(--t), box-shadow var(--t); }
.ga-role-ring:hover { border-color: var(--primary); }
.ga-role-ring:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ga-role-ring.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.ga-rr-name { font-size: var(--fs-sm); font-weight: 700; color: var(--text); display: block; }
.ga-rr-co { font-size: var(--fs-xs); color: var(--muted); }

.ga-plan-list { display: flex; flex-direction: column; gap: 12px; }
.ga-plan-card { padding: 16px; }
.ga-pc-head { display: flex; align-items: center; gap: 13px; }
.ga-pc-role { font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.ga-pc-co { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.ga-pc-del { margin-left: auto; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 30px; height: 30px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.ga-pc-del:hover { color: var(--danger); border-color: var(--danger-border); }
.ga-pc-steps { list-style: none; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ga-pc-steps li { font-size: var(--fs-sm); color: var(--muted); padding-left: 14px; position: relative; line-height: 1.45; }
/* Gaps are things you're missing — amber "to close", not the green "good" dot. */
.ga-pc-steps li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--status-interview); }
.ga-pc-steps li b { color: var(--text); font-weight: 600; }
.ga-pc-none { font-size: var(--fs-sm); color: var(--success); margin-top: 10px; }
/* Per-class career plan: recurring gaps + the jobs in the role. */
.ga-pc-sub { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 7px; }
.ga-pc-cov { margin-top: 14px; }
.ga-pc-cov > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ga-pc-cov > summary::-webkit-details-marker { display: none; }
.ga-pc-cov > summary::before { content: "›"; color: var(--primary); font-weight: 700; transition: transform var(--t); }
.ga-pc-cov[open] > summary::before { transform: rotate(90deg); }
.ga-pc-cov > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.ga-pc-bars { margin-top: 12px; }
.ga-pc-gap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ga-pc-freq { font-size: var(--fs-xs); color: var(--muted); }
.ga-pc-jobs { display: flex; flex-direction: column; gap: 2px; }
.ga-pc-job { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.ga-pc-job:first-child { border-top: 0; }
.ga-pc-joblink { background: none; border: 0; padding: 0; font-family: inherit; font-size: var(--fs-sm);
  color: var(--text); font-weight: 600; cursor: pointer; text-align: left; }
.ga-pc-joblink:hover { color: var(--primary); text-decoration: underline; }
.ga-pc-joblink:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.ga-pc-jco { color: var(--muted); font-size: var(--fs-xs); }
.ga-pc-jmatch { margin-left: auto; font-family: var(--font-mono); font-weight: 700; color: var(--muted); }
.ga-pc-job .ga-pc-del { margin-left: 0; width: 24px; height: 24px; line-height: 1; }

/* Gap-analysis modal on the job page — rubric bars + expandable gap bullets */
.gap-modal-box { max-width: 560px; }
#gap-result:not(:empty) { margin: 6px 0 4px; }
.gap-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; }
.gap-head-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gap-head-summary { font-size: var(--fs-sm); color: var(--text); margin-top: 3px; line-height: 1.45; }
.gap-sub { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.gap-acc { border-bottom: 1px solid var(--border); }
.gap-acc-head { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0;
  padding: 11px 2px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.gap-acc-head[disabled] { cursor: default; }
.gap-acc-name { width: 100px; flex-shrink: 0; font-size: var(--fs-sm); font-weight: 600; }
.gap-acc-pct { width: 38px; flex-shrink: 0; text-align: right; font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.gap-chev { flex-shrink: 0; color: var(--muted); transition: transform .2s var(--ease); }
.gap-acc.open .gap-chev { transform: rotate(180deg); }
.gap-covered { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--success); }
.gap-covered .ic svg { width: 13px; height: 13px; }
.gap-acc-body { padding: 0 2px 6px 112px; }
.gap-bullets { margin: 0 0 8px; padding-left: 16px; }
.gap-bullets li { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin-bottom: 4px; }
.gap-full-link { margin-right: auto; }
@media (prefers-reduced-motion: reduce) { .gap-chev { transition: none; } }
@media (max-width: 560px) { .gap-acc-name { width: 74px; } .gap-acc-body { padding-left: 14px; } }

/* ════════════════════════════════════════════════════════
   Phase-1 shared UI: theme toggle, toasts, skeletons, empty states.
   ════════════════════════════════════════════════════════ */

/* ── Theme toggle (injected into the header nav by ui.js) ── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--t), transform var(--t);
}
.theme-toggle:hover { background: rgba(255,255,255,.16); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ── Toasts (jfToast) ────────────────────────────────────── */
.jf-toasts {
  position: fixed; bottom: 18px; right: 18px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 380px);
  pointer-events: none;
}
.jf-toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--neutral);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 12px 14px; font-size: var(--fs-sm); line-height: 1.4;
  pointer-events: auto; animation: toast-in .22s var(--ease);
}
.jf-toast.leaving { animation: toast-out .2s var(--ease) forwards; }
.jf-toast .ic { margin-top: 1px; flex-shrink: 0; }
.jf-toast .jf-toast-msg { flex: 1; }
.jf-toast .jf-toast-x { background: none; border: 0; color: var(--faint); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px; flex-shrink: 0; }
.jf-toast .jf-toast-x:hover { color: var(--muted); }
.jf-toast.success { border-left-color: var(--success); }
.jf-toast.success .ic { color: var(--success); }
.jf-toast.error   { border-left-color: var(--danger); }
.jf-toast.error .ic { color: var(--danger); }
.jf-toast.info    { border-left-color: var(--info); }
.jf-toast.info .ic { color: var(--info); }
@keyframes toast-in  { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* ── Empty states ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 42px 20px; max-width: 460px; margin: 0 auto; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: var(--radius-pill);
  background: var(--primary-light); color: var(--primary); margin-bottom: 18px; }
.empty-icon .ic { font-size: 28px; }
.empty-state h3 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: var(--fs-md); margin-bottom: 20px; }
.empty-state .btn { display: inline-flex; }

/* ════════════════════════════════════════════════════════
   App shell — brand sidebar for logged-in pages (<body class="app">).
   Injected by shell.js; content/scripts are left untouched.
   ════════════════════════════════════════════════════════ */
/* Collapsed to an icon rail by default; expands to the labelled panel on hover.
   Content reserves only the rail width — the expanded panel overlays, never
   reflows the page. */
body.app { padding-left: 64px; }

.app-sidebar {
  position: fixed; top: 0; left: 0; width: 64px; height: 100vh; z-index: 60;
  background: var(--grad-header); color: #fff;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  box-shadow: 2px 0 16px -10px rgba(15,23,42,.4);
  overflow: hidden; white-space: nowrap;
  transition: width var(--t), box-shadow var(--t);
}
.app-sidebar:hover, .app-sidebar:focus-within {
  width: 220px; box-shadow: 6px 0 26px -10px rgba(15,23,42,.45);
}
/* Labels are clipped by the rail; fade them in as the panel expands. */
.side-link span, .side-brand .brand-word { opacity: 0; transition: opacity var(--t); }
.app-sidebar:hover .side-link span,
.app-sidebar:hover .side-brand .brand-word,
.app-sidebar:focus-within .side-link span,
.app-sidebar:focus-within .side-brand .brand-word { opacity: 1; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px;
  font-size: var(--fs-lg); text-decoration: none; letter-spacing: -.3px; }
.side-brand .brand-word { font-size: var(--fs-lg); line-height: 1; }
.side-brand .bw-luci { font-weight: 300; color: #5eead4; }
.side-brand .bw-path { font-weight: 700; color: #fff; }
.side-logo { display: inline-flex; width: 26px; height: 26px; flex-shrink: 0; }
.side-logo svg { width: 100%; height: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: var(--radius-sm);
  background: none; color: rgba(255,255,255,.86); cursor: pointer;
  font-family: inherit; font-size: var(--fs-md); font-weight: 600; text-align: left;
  text-decoration: none; transition: background var(--t), color var(--t);
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { background: rgba(255,255,255,.13); color: #fff; }
.side-link.active { background: #fff; color: var(--primary-800); box-shadow: 0 2px 8px rgba(15,23,42,.18); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid rgba(255,255,255,.2); padding-top: 8px; }
.side-theme .side-ic { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.side-theme .sun { display: none; }
.side-theme .moon { display: block; }
:root[data-theme="dark"] .side-theme .sun { display: block; }
:root[data-theme="dark"] .side-theme .moon { display: none; }

/* The page's existing header becomes a slim surface topbar inside the shell. */
body.app > header {
  background: var(--surface); color: var(--text); box-shadow: none;
  border-bottom: 1px solid var(--border); padding: 13px 24px;
}
body.app > header h1 { color: var(--text); font-size: var(--fs-xl); }
body.app > header p { color: var(--muted); opacity: 1; }
body.app .nav-links { display: none; }   /* nav now lives in the sidebar */
/* Topbar sits on a light surface (brand also lives in the sidebar): drop the
   white mark and recolour the wordmark for contrast. */
body.app > header .brand-mark { display: none; }
body.app > header .bw-luci { color: var(--primary); }
body.app > header .bw-path { color: var(--text); }

.app-burger { display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  cursor: pointer; }
.app-burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; }
.app-overlay { display: none; }

/* Profile view-mode collapses its page header (the profile card is the header on
   desktop). Use a class, not [hidden], so the bar can stay on mobile — the nav
   hamburger lives in this header and must remain reachable. */
.pf-head-collapsed { display: none; }

@media (max-width: 860px) {
  body.app { padding-left: 0; }
  /* Full-width drawer on mobile — no icon-rail collapse. */
  .app-sidebar { width: 220px; transform: translateX(-100%); transition: transform var(--t); }
  .app-sidebar:hover, .app-sidebar:focus-within { width: 220px; }
  .side-link span, .side-brand .brand-word { opacity: 1; }
  body.app.nav-open .app-sidebar { transform: none; }
  .app-overlay { display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(15,23,42,.45); opacity: 0; pointer-events: none; transition: opacity var(--t); }
  body.app.nav-open .app-overlay { opacity: 1; pointer-events: auto; }
  .app-burger { display: inline-flex; }
  body.app > header { display: flex; align-items: center; gap: 12px; }
  /* Collapsed profile header stays as a bare bar holding only the burger (hide
     its title block) so the nav drawer can still be opened on mobile. */
  body.app > header.pf-head-collapsed > *:not(.app-burger) { display: none; }
}

/* ── Resume gallery (profile page) ───────────────────────── */
.resume-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.resume-card { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow var(--t), transform var(--t); }
.resume-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.resume-thumb { height: 132px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  padding: 14px 14px 0; overflow: hidden; }
.resume-paper { height: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px 5px 0 0; padding: 12px; box-shadow: var(--shadow); }
.resume-paper .rl { height: 5px; border-radius: 2px; background: var(--surface-2); margin-bottom: 7px; }
.resume-paper .rl.h { height: 8px; width: 54%; background: var(--primary); opacity: .85; margin-bottom: 10px; }
.resume-paper .rl.a { width: 92%; } .resume-paper .rl.b { width: 74%; }
.resume-paper .rl.c { width: 88%; } .resume-paper .rl.d { width: 60%; }
.resume-meta { flex: 1; padding: 11px 13px 6px; }
.resume-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-date { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.resume-foot { display: flex; gap: 6px; padding: 0 13px 13px; }
.resume-foot .btn { flex: 1; justify-content: center; }
.resume-foot .btn.r-del { flex: 0 0 auto; }
.resume-empty { font-size: var(--fs-sm); color: var(--muted); }
.resume-empty a { color: var(--primary); font-weight: 600; text-decoration: none; }
.resume-empty a:hover { text-decoration: underline; }

/* ── Generate-resume live preview (modal) ────────────────── */
.gen-progress { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 10px 0 6px; }
.gen-paper { width: 184px; height: 236px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; box-shadow: var(--shadow-md); padding: 18px; }
.gen-paper .gl { height: 7px; border-radius: 3px; margin-bottom: 9px; }
.gen-paper .gl.h { height: 10px; width: 56%; margin-bottom: 13px; }
.gen-progress-text { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* ============================================================================
   PROFILE BUILDER — two-pane editor + live resume preview
   Left: the form cards. Right: a sticky document that re-renders as you type.
   Above both: a completeness meter + section rail so a long form has a sense
   of progress and place (the thing a flat stack of cards lacks).
   ============================================================================ */

/* Top bar: meter + section anchors + status, in one calm strip. */
.pf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 20px; }
.pf-meter { flex: 1 1 240px; min-width: 200px; }
.pf-meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.pf-meter-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.pf-meter-pct { font-size: var(--fs-sm); font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.pf-track { height: 7px; border-radius: var(--radius-pill); background: var(--surface-2);
  border: 1px solid var(--border); overflow: hidden; }
.pf-fill { height: 100%; width: 0; border-radius: inherit; background: var(--grad-header);
  transition: width .4s var(--ease); }
.pf-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }
.pf-hint strong { color: var(--text); font-weight: 600; }

/* Section rail — quick-jump pills. Active reflects the section in view. */
.pf-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-nav a { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); transition: color var(--t), background var(--t), border-color var(--t); }
.pf-nav a:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-light); }
.pf-nav a.active { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }

.pf-bar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pf-save-state { font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; }
.pf-save-state.ok { color: var(--success); }
.pf-save-state.err { color: var(--danger); }
.pf-save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }

/* Two-pane grid. Preview collapses below the editor on narrower screens. */
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 22px; align-items: start; margin-top: 18px; }
.pf-editor { min-width: 0; }
.pf-editor > .card { margin-top: 18px; }
.pf-editor > .card:first-child { margin-top: 0; }
.pf-editor > .card { scroll-margin-top: 76px; }

.pf-preview { position: sticky; top: 16px; }
.pf-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pf-preview-head h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; }
.pf-preview-head .pf-live { font-size: var(--fs-xs); font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 5px; }
.pf-preview-head .pf-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: pulse 1.6s infinite; }

/* The "paper". Internal type is em-based off this one font-size so the whole
   document scales as a unit and reads like a real resume in miniature. */
.pf-doc-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; max-height: calc(100vh - 92px); overflow: auto; }
/* The preview is a column of real page cards; content flows across them in JS so
   breaks land between blocks, never through text. --pf-page-h is the page height
   (paper width × the selected page's aspect ratio). The PDF stays authoritative. */
.pf-doc { display: flex; flex-direction: column; gap: 16px; color: var(--text);
  font-size: 10.5px; line-height: 1.5;
  /* The preview is a printed page — pin neutral tokens to light values so it always
     renders as white paper with dark ink, regardless of the app's light/dark theme
     (mirrors resume_pdf.py, which is theme-independent). */
  --surface: #ffffff; --surface-2: #eef1f5; --text: #0f1729; --muted: #586173;
  --faint: #97a1b2; --border: #e7eaf0; --border-strong: #cfd5df;
  /* Accent palette (teal default) — overridden by .color-* below; mirrors resume_pdf.py. */
  --acc: #0f766e; --acc-strong: #134e4a; --acc-soft: #99f6e4; --acc-bg: #f0fdfa; --acc-text: #115e59; }
.pf-doc.color-navy     { --acc:#1d4ed8; --acc-strong:#1e3a8a; --acc-soft:#bfdbfe; --acc-bg:#eff6ff; --acc-text:#1e40af; }
.pf-doc.color-burgundy { --acc:#be123c; --acc-strong:#881337; --acc-soft:#fecdd3; --acc-bg:#fff1f2; --acc-text:#9f1239; }
.pf-doc.color-forest   { --acc:#15803d; --acc-strong:#14532d; --acc-soft:#bbf7d0; --acc-bg:#f0fdf4; --acc-text:#166534; }
.pf-doc.color-plum     { --acc:#7e22ce; --acc-strong:#581c87; --acc-soft:#e9d5ff; --acc-bg:#faf5ff; --acc-text:#6b21a8; }
.pf-doc.color-slate    { --acc:#334155; --acc-strong:#0f172a; --acc-soft:#cbd5e1; --acc-bg:#f8fafc; --acc-text:#1e293b; }
.pf-doc.color-black    { --acc:#1f2937; --acc-strong:#000000; --acc-soft:#d1d5db; --acc-bg:#f3f4f6; --acc-text:#111827; }
.pf-doc.color-ink      { --acc:#000000; --acc-strong:#000000; --acc-soft:#000000; --acc-bg:#000000; --acc-text:#ffffff; }
.pf-page { box-sizing: border-box; height: var(--pf-page-h, 673px); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow-md); padding: 26px 26px 30px; }
/* True-scale preview (resume page): render pages at the PDF's real print geometry
   (96dpi page box, 0.6in padding, 10.5pt font — mirrors resume_pdf.py) and scale the
   whole column down with a uniform transform, so on-screen pagination matches the PDF
   exactly. JS sets --pf-pw/--pf-ph/--pf-pad and the inline transform + margins. */
.pf-doc.pf-scaled { font-size: calc(10.5pt * var(--pf-font-scale, 1)); width: var(--pf-pw, 816px); transform-origin: top left; }
.pf-doc.pf-scaled.style-compact { font-size: calc(9.7pt * var(--pf-font-scale, 1)); }
/* No animated layout in the preview — a transitioning font-size would let pagination
   measure mid-animation and miscount pages. Changes must apply instantly. */
.pf-doc.pf-scaled, .pf-scaled .pf-page, .pf-scaled .pf-page * { transition: none !important; }
.pf-scaled .pf-page { width: var(--pf-pw, 816px); height: var(--pf-ph, 1056px);
  padding: var(--pf-pad-v, 58px) var(--pf-pad-h, 58px); }
/* Pager: show one page at a time (Prev/Next) rather than a tall stack. */
.pf-pager .pf-page { display: none; }
.pf-pager .pf-page.pf-active { display: block; }
.pf-pager-ctl { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.pf-pager-ctl .pf-pager-btn { padding: 5px 14px; font-size: .85rem; }
.pf-pager-ctl .pf-pager-btn:disabled { opacity: .45; cursor: default; }
.pf-doc-actions { display: flex; gap: 10px; }
.pf-doc-actions #exportSaveBtn { flex: 0 0 auto; }
.pf-doc-actions #exportBtn { flex: 1 1 auto; justify-content: center; }
.pf-pager-label { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 52px; text-align: center; }
.pf-doc-name { font-size: 1.9em; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; color: var(--acc-strong); }
.pf-doc-headline { font-size: 1.05em; color: var(--acc); font-weight: 600; margin-top: 3px; }
.pf-doc-contact { font-size: .82em; color: var(--muted); margin-top: 7px; display: flex; flex-wrap: wrap;
  gap: 3px 9px; }
.pf-doc-contact span:not(:last-child)::after { content: "·"; margin-left: 9px; color: var(--border-strong); }
.pf-doc h4 { font-size: .82em; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
  color: var(--acc-strong); margin: 15px 0 7px; padding-bottom: 4px; border-bottom: 1.5px solid var(--acc-soft); }
.pf-doc-summary { font-size: .92em; color: var(--text); }

/* Cover-letter preview blocks (business-letter layout; reuse the accent vars) */
.cl-date { margin-top: 22px; color: var(--muted); font-size: .9em; }
.cl-recipient { margin-top: 16px; font-size: .92em; line-height: 1.4; }
.cl-subject { margin-top: 16px; font-weight: 700; color: var(--acc-strong); }
.cl-greeting { margin-top: 18px; font-weight: 600; }
.cl-para { margin: 11px 0 0; font-size: .94em; line-height: 1.6; }
.cl-signoff { margin-top: 18px; }
.cl-signoff .cl-sign { font-weight: 700; margin-top: 4px; color: var(--acc-strong); }
.style-modern .cl-subject { background: var(--acc-bg); color: var(--acc-text); padding: 3px 9px;
  border-radius: 4px; border-left: 3px solid var(--acc); display: inline-block; }
.style-elegant .cl-greeting { font-weight: 500; }
/* Cover-letter body editor: paragraph rows with reorder controls */
.cl-para-item { position: relative; }
.cl-para-tools { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }

.pf-doc-entry { margin-bottom: 9px; }
.pf-doc-entry:last-child { margin-bottom: 0; }
.pf-doc-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pf-doc-role { font-weight: 700; font-size: .98em; }
.pf-doc-org { color: var(--muted); font-weight: 600; }
.pf-doc-dates { color: var(--faint); font-size: .82em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-doc-bullets { list-style: disc; padding-left: 15px; margin-top: 3px; }
.pf-doc-bullets li { font-size: .9em; margin-bottom: 2px; }
.pf-doc-skill { margin-bottom: 4px; font-size: .9em; }
.pf-doc-skill b { color: var(--text); font-weight: 700; }
.pf-doc-tags { color: var(--muted); }
.pf-doc-empty { color: var(--faint); font-style: italic; }
.pf-doc-placeholder { color: var(--faint); }

/* Unified preview toolbar — Style · Color · Page as one cohesive, labeled row. */
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px;
  width: fit-content; max-width: 100%; margin: 0 auto 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.pf-tool { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pf-tool-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); white-space: nowrap; }

/* Style switcher — same data, four document looks. Pills mirror the section rail. */
.pf-style-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-style { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface);
  transition: color var(--t), background var(--t), border-color var(--t); }
.pf-style:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-light); }
.pf-style[aria-selected="true"] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }

/* Page-size segmented toggle (Letter / A4) */
.pf-size { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.pf-size button { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface);
  border: none; padding: 5px 12px; cursor: pointer; transition: color var(--t), background var(--t); }
.pf-size button + button { border-left: 1px solid var(--border); }
.pf-size button:hover { color: var(--primary); background: var(--primary-light); }
.pf-size button[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); }

/* Text-size stepper (A− / % / A+) + Fit-to-1-page — multiplier carries to the PDF. */
.pf-tool-font { gap: 8px; }
.pf-fontsize { display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius-pill); overflow: hidden; }
.pf-fbtn { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); background: var(--surface);
  border: none; padding: 5px 11px; cursor: pointer; transition: color var(--t), background var(--t); }
.pf-fbtn:hover:not(:disabled) { color: var(--primary); background: var(--primary-light); }
.pf-fbtn:disabled { opacity: .4; cursor: default; }
.pf-fpct { font-size: var(--fs-xs); font-weight: 600; color: var(--text); min-width: 42px; text-align: center;
  padding: 0 4px; font-variant-numeric: tabular-nums; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

/* Accent-color swatches — the choice carries through to the exported PDF. */
.pf-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-color { width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
  transition: transform var(--t), box-shadow var(--t); }
.pf-color:hover { transform: scale(1.12); }
.pf-color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
/* Compact accent-color picker: a pill that opens a swatch popover (matches the toolbar). */
.pf-colorpop { position: relative; }
.pf-colorpop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 5px 12px; transition: color var(--t), border-color var(--t); }
.pf-colorpop > summary::-webkit-details-marker { display: none; }
.pf-colorpop > summary::after { content: "▾"; color: var(--muted); }
.pf-colorpop > summary:hover { color: var(--primary); border-color: var(--primary); }
.pf-colorpop[open] > summary { color: var(--primary); border-color: var(--primary); }
.pf-colorpop-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px var(--border); }
.pf-colorpop-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 12px; }
.pf-colorpop-pop .pf-swatches { width: 116px; gap: 9px; }

/* ── Classic (default) — already defined by the base .pf-doc rules above ── */

/* Header alignment (independent of style) — applied via .hdr-left / .hdr-center */
.hdr-left .pf-doc-name, .hdr-left .pf-doc-headline { text-align: left; }
.hdr-left .pf-doc-contact { justify-content: flex-start; }
.hdr-center .pf-doc-name, .hdr-center .pf-doc-headline { text-align: center; }
.hdr-center .pf-doc-contact { justify-content: center; }

/* ── Modern — teal accent bar, accent name, filled section labels ── */
.style-modern .pf-page:first-child { border-top: 4px solid var(--acc); }
.style-modern h4 { border-bottom: none; background: var(--acc-bg); color: var(--acc-text);
  padding: 4px 9px; border-radius: 4px; border-left: 3px solid var(--acc); }

/* ── Compact — monochrome, dense, ATS-friendly ── */
.pf-doc.style-compact { font-size: 9.7px; }
.style-compact .pf-doc-name { color: var(--text); }
.style-compact .pf-doc-headline { color: var(--acc); }
.style-compact h4 { color: var(--acc-strong); border-bottom-color: var(--acc-soft);
  margin: 11px 0 5px; letter-spacing: .4px; }
.style-compact .pf-doc-entry { margin-bottom: 6px; }
.style-compact .pf-doc-bullets { margin-top: 2px; }

/* ── Elegant — airy, light, letter-spaced, rule-free ── */
.pf-doc.style-elegant { padding: 34px 34px 38px; line-height: 1.6; }
.style-elegant .pf-doc-name { font-weight: 600; letter-spacing: 1.2px; }
.style-elegant .pf-doc-headline { color: var(--acc); font-weight: 500; }
.style-elegant .pf-doc-contact { border-bottom: 1px solid var(--border); padding-bottom: 11px; }
.style-elegant h4 { border-bottom: none; color: var(--acc-strong); font-weight: 700;
  font-size: .74em; letter-spacing: 2px; margin: 18px 0 8px; }

/* Compact, dismissible "import from resume" — demoted from a giant always-on card. */
.pf-import-toggle { display: inline-flex; align-items: center; gap: 7px; }
#importCard { margin-top: 18px; }

.empty-hint { font-size: var(--fs-sm); color: var(--muted); padding: 4px 0; }

/* ════════════════════ Profile — world-class VIEW MODE ════════════════════ */
.pf-editbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pf-editbar-title { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }

#profileView { animation: pv-fade .25s ease; }
@keyframes pv-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #profileView { animation: none; } }

.pv-ic { display: inline-flex; }
.pv-ic svg { width: 1em; height: 1em; }

/* ── Hero ── */
.pv-hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  padding: 28px 30px; position: relative; overflow: hidden;
}
.pv-hero::before {   /* subtle brand wash in the corner */
  content: ""; position: absolute; inset: -40% -30% auto auto; width: 360px; height: 360px;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 70%);
  opacity: .7; pointer-events: none;
}
.pv-hero-id { display: flex; gap: 20px; align-items: center; min-width: 0; flex: 1 1 340px; position: relative; }
.pv-avatar {
  flex: none; width: 76px; height: 76px; border-radius: 22px;
  display: grid; place-items: center; font-size: 27px; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, var(--primary-500), var(--primary-800));
  box-shadow: var(--shadow-primary);
}
.pv-avatar svg { width: 34px; height: 34px; }
.pv-hero-text { min-width: 0; }
.pv-name { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 0; color: var(--text); }
.pv-headline { margin-top: 5px; font-size: var(--fs-lg); font-weight: 500; color: var(--primary-700); }
.pv-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pv-chip-c {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  font-size: var(--fs-sm); font-weight: 500; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill);
  text-decoration: none; transition: color var(--t), border-color var(--t), background var(--t);
}
.pv-chip-c svg { width: 14px; height: 14px; color: var(--faint); }
a.pv-chip-c:hover { color: var(--primary-700); border-color: var(--primary-300); background: var(--primary-light); }
a.pv-chip-c:hover svg { color: var(--primary-600); }

.pv-hero-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; position: relative; flex: 0 0 auto; }
.pv-strength { display: flex; align-items: center; gap: 13px; }
.pv-ring { position: relative; width: 64px; height: 64px; flex: none; }
.pv-ring-bg { fill: none; stroke: var(--border); stroke-width: 6; }
.pv-ring-fg { fill: none; stroke: var(--primary-600); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.pv-ring-pct { position: absolute; inset: 0; text-align: center; line-height: 64px;
  white-space: nowrap; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.pv-ring-pct small { font-size: .56em; font-weight: 700; color: var(--muted); margin-left: 1px; }
.pv-strength-text { display: flex; flex-direction: column; }
.pv-strength-label { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.pv-strength-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.pv-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-hero-actions .btn svg { width: 16px; height: 16px; }

/* ── Body grid ── */
.pv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-top: 18px; }
.pv-col-main, .pv-col-aside { display: flex; flex-direction: column; gap: 18px; }
.pv-sec { padding: 22px 24px; }
.pv-h {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--primary-700); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.pv-summary { font-size: var(--fs-md); line-height: 1.65; color: var(--text); margin: 0; white-space: pre-line; }

/* ── Experience timeline ── */
.pv-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pv-tl-item { position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--border); }
.pv-tl-item:last-child { padding-bottom: 2px; border-left-color: transparent; }
.pv-tl-dot { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary-600); box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.pv-tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; justify-content: space-between; }
.pv-tl-role { font-size: var(--fs-lg); font-weight: 700; color: var(--text); }
.pv-tl-dates { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); white-space: nowrap; }
.pv-tl-org { font-size: var(--fs-sm); font-weight: 600; color: var(--primary-700); margin-top: 2px; }
.pv-bullets { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.pv-bullets li { font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.pv-bullets li::marker { color: var(--primary-400); }

/* ── Skills / chips ── */
.pv-skillgroup + .pv-skillgroup { margin-top: 16px; }
.pv-skill-cat { font-size: var(--fs-sm); font-weight: 700; color: var(--text); margin-bottom: 9px; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pv-chip {
  display: inline-flex; align-items: center; padding: 5px 12px; font-size: var(--fs-sm); font-weight: 600;
  color: var(--primary-800); background: var(--primary-light); border: 1px solid var(--primary-200); border-radius: var(--radius-pill);
}
:root[data-theme="dark"] .pv-chip { color: var(--primary-200); border-color: var(--border-strong); }
.pv-chip-cert { color: var(--text); background: var(--surface-2); border-color: var(--border); }

/* ── Education ── */
.pv-edu + .pv-edu { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.pv-edu-degree { font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.pv-edu-school { font-size: var(--fs-sm); font-weight: 600; color: var(--primary-700); margin-top: 1px; }
.pv-edu-meta { font-size: var(--fs-sm); color: var(--muted); margin-top: 3px; }

/* ── Projects ── */
.pv-proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pv-proj { padding: 15px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pv-proj-name { font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.pv-proj-desc { font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); margin-top: 5px; }

@media (max-width: 960px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-proj-grid { grid-template-columns: 1fr; }
  .pv-hero-side { min-width: 0; }
}
@media (max-width: 560px) {
  .pv-hero { padding: 22px 20px; }
  .pv-hero-id { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pv-avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; }
  .pv-sec { padding: 18px 18px; }
  .pv-hero-actions { width: 100%; }
  .pv-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 1080px) {
  .pf-layout { grid-template-columns: 1fr; }
  .pf-preview { position: static; }
  .pf-doc-wrap { max-height: none; }
  /* Scoped to the in-app editor's preview — must NOT leak onto other .pf-doc
     instances (e.g. the public resume-templates page renders its own .pf-doc). */
  .pf-doc-wrap .pf-doc { max-width: 520px; margin: 0 auto; }
}

/* ── Print → PDF: strip the app to just the resume page, full size ──────────
   Everything but the document is hidden; the document fills the page at print
   type sizes. JS forces light theme during printing, so this stays light. */
@media print {
  /* margin:0 leaves the browser no room to draw its own header/footer
     (page title + date + URL). The page margin is recreated as document
     padding below, so the resume still has proper whitespace. */
  @page { margin: 0; }
  html, body { background: #fff; }
  body.app { padding-left: 0; }
  .app-sidebar, .app-overlay, .app-burger,
  body.app > header, .pf-preview-head, .pf-style-bar,
  .pf-editor, .save-bar, .jf-toasts,
  main > .card { display: none !important; }   /* hides pf-bar, import, gallery */

  main { max-width: none; margin: 0; padding: 0; }
  .pf-layout { display: block !important; margin: 0; }
  .pf-preview { position: static !important; }
  .pf-doc-wrap { background: none; border: none; padding: 0; max-height: none; overflow: visible; }
  /* Flatten the page cards: let the browser repaginate one continuous flow. */
  .pf-doc {
    background: #fff; gap: 0; width: 100%; max-width: none; margin: 0; padding: 14mm 15mm;
    font-size: 10.5pt; line-height: 1.5;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pf-page { height: auto; overflow: visible; border: none; border-radius: 0; box-shadow: none; padding: 0; }
  .style-modern .pf-page:first-child { border-top: none; }
}

/* ============================================================================
   JOB SEARCH — company logos + load-more pagination
   ============================================================================ */
.card-id { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 auto; min-width: 0; }
.card-id-text { min-width: 0; }
.card-posted { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* Logo box: contains transparent/white logos on any theme; monogram fallback. */
.job-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9px; object-fit: contain;
  background: var(--surface); border: 1px solid var(--border); }
.job-logo.lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 11px; }
.job-logo-fallback { display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); border-color: var(--primary-200);
  font-weight: 800; font-size: 1.3rem; }
.job-logo.lg.job-logo-fallback { font-size: 1.7rem; }

.detail-id { display: flex; gap: 13px; align-items: flex-start; min-width: 0; }
.detail-id-text { min-width: 0; }

.load-more-wrap:not(:empty) { display: flex; justify-content: center; margin: 16px 0 4px; }
.load-more-btn { min-width: 190px; justify-content: center; }

/* ════════ Get-started onboarding (onboarding.js) ════════ */
.onb-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px; }
.onb-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.onb-card-head h2 { font-size: var(--fs-lg); font-weight: 700; }
.onb-card-head p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.onb-dismiss { border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1;
  cursor: pointer; padding: 0 4px; border-radius: 6px; }
.onb-dismiss:hover { color: var(--text); background: var(--surface-2); }
.onb-steps { list-style: none; margin: 14px 0 2px; display: flex; flex-direction: column; gap: 8px; }
.onb-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.onb-step.is-done { opacity: .7; }
.onb-tick { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; }
.onb-step.is-done .onb-tick { border-color: var(--primary); background: var(--primary); }
.onb-step.is-done .onb-tick::after { content: ''; width: 5px; height: 9px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-.5px, -1px); }
.onb-step-main { flex: 1 1 auto; min-width: 0; }
.onb-step-title { font-size: var(--fs-sm); font-weight: 600; }
.onb-step.is-done .onb-step-title { text-decoration: line-through; color: var(--muted); }
.onb-step-text { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.onb-step-cta { flex: 0 0 auto; }

.onb-chip { margin-top: 6px; }
.onb-chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 34px;
  height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; }

.onb-modal-ov { position: fixed; inset: 0; background: rgba(15,23,42,.45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: center;
  justify-content: center; padding: 20px; z-index: 60; animation: modal-fade .16s var(--ease); }
.onb-modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px; padding: 22px; text-align: center; animation: modal-pop .2s var(--ease); }
.onb-modal h2 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 8px; }
.onb-modal p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 18px; }
.onb-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.onb-skip { margin-top: 14px; border: 0; background: none; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; }
.onb-skip:hover { color: var(--text); text-decoration: underline; }

/* ════════════════ Resume templates — public SEO pages ════════════════
   Gallery (/resume-templates) + per-role detail (/resume-templates/{slug}).
   Reuses the marketing shell (header/footer/.cta-band) and the .pf-doc resume
   component (server-rendered in app/resume_render.py). The .pf-doc pins its own
   light "paper" tokens, so previews stay ink-on-white in dark mode too. */

/* ── Gallery hero ── */
.rt-hero { text-align: center; max-width: 760px; margin: 34px auto 30px; }
.rt-hero h1 { font-size: var(--fs-4xl); line-height: 1.07; letter-spacing: -.025em; font-weight: 800; color: var(--text); margin-top: 14px; }
.rt-hero h1 .accent, .rt-detail-head h1 .accent { background: var(--grad-header);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.rt-hero .lead { font-size: var(--fs-lg); color: var(--muted); margin: 16px auto 0; line-height: 1.55; max-width: 640px; }

/* ── Browse-by-style nav (gallery + facet pages) ── */
.rt-stylenav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.rt-stylelink { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid transparent;
  transition: color var(--t), background var(--t), border-color var(--t); }
.rt-stylelink:hover { color: var(--primary); background: var(--primary-light); }
.rt-stylelink.is-on { color: var(--primary); border-color: var(--primary-200); background: var(--primary-light); }

/* ── Category filter chips ── */
.rt-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.rt-filter { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 7px 15px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface);
  transition: color var(--t), background var(--t), border-color var(--t); }
.rt-filter:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-light); }
.rt-filter.is-on { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }

/* ── Card grid ── */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 24px;
  margin: 8px auto 8px; }
.rt-grid-sm { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 4px; }

.rt-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.rt-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-200); }
.rt-card[hidden] { display: none; }
.rt-card-preview { position: relative; height: 272px; overflow: hidden; background: #fff;
  border-bottom: 1px solid var(--border); }
.rt-card-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 94%); pointer-events: none; }
.rt-thumb { width: 200%; transform: scale(.5); transform-origin: top left; }
.rt-thumb .pf-doc { font-size: 12.5px; padding: 0; }
.rt-thumb .pf-page { height: auto; overflow: visible; border: none; box-shadow: none; border-radius: 0;
  padding: 38px 46px; }

.rt-card-body { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 16px; }
.rt-card-role { font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.rt-card-meta { display: flex; align-items: center; gap: 9px; font-size: var(--fs-xs); color: var(--muted); }
.rt-card-cat { margin-left: auto; color: var(--faint); }

.rt-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.rt-chip-strong { background: var(--primary-light); color: var(--primary); border-color: var(--primary-200); }
.rt-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--sw, var(--primary));
  box-shadow: 0 0 0 1px var(--border); flex: none; }

/* ── Detail page ── */
.rt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm);
  color: var(--muted); margin: 18px 0 4px; }
.rt-crumbs a { color: var(--muted); text-decoration: none; }
.rt-crumbs a:hover { color: var(--primary); text-decoration: underline; }
.rt-crumbs span[aria-current] { color: var(--text); font-weight: 600; }

.rt-detail-head { text-align: center; max-width: 760px; margin: 16px auto 4px; }
.rt-detail-head h1 { font-size: var(--fs-4xl); line-height: 1.08; letter-spacing: -.025em; font-weight: 800;
  color: var(--text); margin-top: 12px; }
.rt-detail-head .lead { font-size: var(--fs-lg); color: var(--muted); margin: 16px auto 0; line-height: 1.55; max-width: 660px; }
.rt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.rt-why { list-style: none; max-width: 620px; margin: 24px auto 0; display: grid; gap: 9px; text-align: left; }
.rt-why li { display: flex; align-items: flex-start; gap: 9px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.rt-why .ic { color: var(--primary); margin-top: 2px; flex: none; }

/* ── Resume "paper" stage ── */
.rt-stage { margin: 34px auto 8px; }
.rt-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px;
  width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 13px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.rt-tool { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text); }

.rt-paper-wrap { display: flex; justify-content: center; }
/* The resume renders at the PDF's true print geometry and paginates across fixed
   Letter/A4 sheets (JS in resume-template.html), scaled to fit this column — so the
   sheet size is constant across style/colour/text/margin changes; only Letter↔A4
   resizes it. .rt-scaler takes the scaled page's exact box to keep sheets centered. */
.rt-paper { width: 100%; max-width: 816px; display: flex; justify-content: center; }
.rt-scaler { /* width/height set by JS to the scaled page box */ }
/* Never inherit the editor's narrow-screen .pf-doc clamp — the page sets its own width. */
.rt-paper .pf-doc { max-width: none; margin: 0; }
.rt-paper .pf-doc.pf-scaled { padding: 0; }
.rt-paper .pf-page { box-shadow: var(--shadow-lg); }
/* Pre-JS / no-JS fallback: show the full resume as one auto-height sheet until the
   paginator upgrades it to fixed Letter/A4 pages (avoids the base .pf-page clip). */
.rt-paper .pf-doc:not(.pf-scaled) { font-size: 13.5px; }
.rt-paper .pf-doc:not(.pf-scaled) .pf-page { height: auto; overflow: visible; padding: 48px 60px; }

.rt-faq { max-width: 760px; margin: 54px auto 0; }
.rt-faq .faq-list { margin-top: 4px; }
.rt-related { margin-top: 52px; }

@media (max-width: 760px) {
  .rt-hero h1, .rt-detail-head h1 { font-size: var(--fs-3xl); }
  .rt-actions .btn { flex: 1 1 auto; justify-content: center; }
}
