/* Prospectly: base styles (the theme block further down sets the current look).
   Restraint over decoration: one accent, system type, depth from blur and hairlines. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, system-ui, sans-serif;

  --bg: #f2f3f7;
  --text: #0b0c10;
  --muted: #6b6f7a;
  --faint: #9ba0ab;
  --accent: #0b7d70;
  --accent-soft: rgba(11, 125, 112, 0.11);
  --on-accent: #fff;

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --hairline: rgba(15, 20, 30, 0.08);
  --fill: rgba(118, 118, 128, 0.1);
  --fill-strong: rgba(118, 118, 128, 0.16);
  --shadow: 0 1px 1px rgba(15, 20, 30, 0.03), 0 8px 28px rgba(15, 20, 30, 0.07);
  --shadow-lift: 0 2px 4px rgba(15, 20, 30, 0.04), 0 18px 48px rgba(15, 20, 30, 0.12);

  --strong: #2a9d3f;
  --strong-soft: rgba(30, 158, 87, 0.12);
  --good: #0b7d70;
  --good-soft: rgba(11, 125, 112, 0.11);
  --possible: #c77700;
  --possible-soft: rgba(230, 140, 0, 0.13);
  --weak: #8a8f99;
  --weak-soft: rgba(118, 118, 128, 0.12);
  --danger: #e0352b;

  --orb-a: rgba(20, 160, 140, 0.22);
  --orb-b: rgba(120, 200, 180, 0.16);
  --orb-c: rgba(230, 190, 140, 0.16);

  --menu: #ffffff;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --blur: saturate(180%) blur(28px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --text: #f3f4f7;
    --muted: #9ca1ad;
    --faint: #6c717c;
    --accent: #2cc4ad;
    --on-accent: #032621;
    --menu: #1d2129;
    --accent-soft: rgba(44, 196, 173, 0.15);
    --glass: rgba(28, 31, 39, 0.58);
    --glass-strong: rgba(34, 37, 46, 0.82);
    --glass-edge: rgba(255, 255, 255, 0.07);
    --hairline: rgba(255, 255, 255, 0.08);
    --fill: rgba(118, 118, 128, 0.2);
    --fill-strong: rgba(118, 118, 128, 0.28);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 10px 32px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 20px 50px rgba(0, 0, 0, 0.5);
    --strong: #34c76f;
    --strong-soft: rgba(52, 199, 111, 0.16);
    --good: #2cc4ad;
    --good-soft: rgba(44, 196, 173, 0.15);
    --possible: #ffaa33;
    --possible-soft: rgba(255, 170, 51, 0.15);
    --weak: #8d929c;
    --weak-soft: rgba(118, 118, 128, 0.2);
    --danger: #ff5a4f;
    --orb-a: rgba(20, 150, 130, 0.22);
    --orb-b: rgba(40, 120, 110, 0.14);
    --orb-c: rgba(180, 130, 70, 0.1);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.45 var(--font);
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 8% -6%, var(--orb-a), transparent 70%),
    radial-gradient(38vw 38vw at 96% 8%, var(--orb-b), transparent 70%),
    radial-gradient(50vw 40vw at 70% 110%, var(--orb-c), transparent 70%),
    var(--bg);
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.022em; margin: 0; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.hidden { display: none !important; }

/* Glass surfaces ----------------------------------------------------------- */
.glass, .panel, .group, .card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow), inset 0 0 0 0.5px var(--hairline);
  border-radius: var(--r-lg);
}
.panel { padding: 20px; }

/* Top bar ------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  padding-top: max(12px, env(safe-area-inset-top));
}
.glass-bar {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 0.5px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.mark {
  width: 26px; height: 26px; border-radius: 8px; position: relative;
  background: linear-gradient(145deg, #b03a60, #6e1531);
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.35), 0 2px 6px rgba(8, 90, 80, 0.35);
}
.mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid rgba(255,255,255,.95); }
.logo { display: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.toplink { color: var(--accent); text-decoration: none; font-size: 15px; font-weight: 500; }
.pill { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--fill); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.warn { background: var(--possible-soft); color: var(--possible); }
.pill.low { background: var(--possible-soft); color: var(--possible); }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--possible-soft); color: var(--possible); font-weight: 600; }

/* Layout -------------------------------------------------------------------- */
.layout {
  display: grid; grid-template-columns: minmax(340px, 410px) minmax(0, 1fr); gap: 28px;
  max-width: 1440px; margin: 0 auto; padding: 24px 24px 64px;
}
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; gap: 22px; padding: 16px 16px 120px; } }

.brief { min-width: 0; position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; padding: 2px 4px 2px 2px; scrollbar-width: none; }
.brief::-webkit-scrollbar { display: none; }
@media (max-width: 980px) { .brief { position: static; max-height: none; overflow: visible; padding: 0; } }
.brief-head { padding: 4px 6px 14px; }
.brief-head p { margin: 6px 0 0; font-size: 14px; }

/* Form groups (iOS inset-grouped) ------------------------------------------- */
form { display: flex; flex-direction: column; gap: 14px; }
.group { margin: 0; padding: 14px 16px 16px; min-width: 0; }
fieldset.group { border: 1px solid var(--glass-edge); }
.group legend, .disclosure > summary {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 0; float: left; width: 100%; margin-bottom: 10px;
}
.group legend + * { clear: both; }
.disclosure > summary { float: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; margin: 0; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); margin: -4px 4px 0 10px; transition: transform .2s; }
.disclosure[open] > summary { margin-bottom: 12px; }
.disclosure[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.disclosure > summary > span:first-child { flex: 1; }
.disclosure > summary .sm { text-transform: none; letter-spacing: 0; font-weight: 500; white-space: nowrap; }

.field { display: block; margin-top: 12px; }
.group legend + .field, .group legend + .seg { margin-top: 0; }
.flabel { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.fhint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 2px 0; }
.note strong { color: var(--text); font-weight: 600; }

input:not([type=range]):not([type=checkbox]), textarea {
  display: block; width: 100%; padding: 11px 13px; border: 0; border-radius: var(--r-md);
  background: var(--fill); color: var(--text); font: inherit; font-size: 15px; resize: vertical;
  transition: background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { outline: none; background: var(--glass-strong); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }

/* Segmented control ---------------------------------------------------------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--fill); }
.seg-full { display: flex; width: 100%; }
.seg button {
  flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .18s, box-shadow .18s;
}
.seg button.on { background: var(--glass-strong); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 0.5px var(--hairline); font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button.on { background: rgba(99, 99, 110, 0.55); } }

/* Stepper -------------------------------------------------------------------- */
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stepper-row + .stepper-row { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--hairline); }
.stepper-row .flabel { margin: 0; }
.stepper { display: flex; align-items: center; background: var(--fill); border-radius: 11px; padding: 3px; flex: none; }
.stepper button { width: 34px; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; line-height: 1; color: var(--text); cursor: pointer; }
.stepper button:active { background: var(--fill-strong); }
.stepper input { width: 44px !important; padding: 6px 0 !important; text-align: center; background: transparent !important; box-shadow: none !important; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Weights -------------------------------------------------------------------- */
.weights { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.wrow { display: grid; grid-template-columns: 118px 1fr 40px; align-items: center; gap: 10px; font-size: 13.5px; }
.wrow input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }
.wrow output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }

/* Buttons --------------------------------------------------------------------- */
button { font: inherit; cursor: pointer; }
.btn-primary, button.primary {
  border: 0; border-radius: 999px; padding: 14px 22px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .12s, filter .15s, opacity .15s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-secondary, button.ghost {
  border: 0; border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 600;
  background: var(--fill); color: var(--text);
}
.btn-secondary:hover, button.ghost:hover { background: var(--fill-strong); }
.text-btn { border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 500; padding: 8px 4px; }
.actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; padding: 4px 0 8px; }
@media (max-width: 980px) {
  .actions {
    position: sticky; bottom: 0; z-index: 10; margin: 0 -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-top: 0.5px solid var(--hairline);
    flex-direction: row-reverse;
  }
  .actions .btn-primary { flex: 1; }
}

/* Results ---------------------------------------------------------------------- */
.results { min-width: 0; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 72px; }
.empty { text-align: center; padding: 72px 28px; }
.empty h3 { margin-top: 18px; }
.empty p { max-width: 420px; margin: 8px auto 0; }
.empty-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; position: relative; background: var(--accent-soft); }
.empty-mark::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; border: 3px solid var(--accent); }

/* Progress steps */
.progress { padding: 18px 20px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.steps li::before { content: ""; position: absolute; top: 7px; right: 50%; width: 100%; height: 2px; background: var(--fill-strong); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--fill-strong); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--glass); }
.steps li.done { color: var(--muted); }
.steps li.done .dot { background: var(--accent); }
.steps li.done::before, .steps li.active::before { background: var(--accent); }
.steps li.active { color: var(--text); }
.steps li.active .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--glass), 0 0 0 4px var(--accent-soft); } 50% { box-shadow: 0 0 0 4px var(--glass), 0 0 0 9px var(--accent-soft); } }
.progress-now { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); min-height: 20px; }
.progress-log { margin-top: 10px; font-size: 13px; }
.progress-log summary { cursor: pointer; color: var(--accent); font-weight: 500; text-align: center; list-style: none; }
.progress-log summary::-webkit-details-marker { display: none; }
.log { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.log li { margin: 3px 0; }
.error { padding: 16px 20px; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

.results-head { scroll-margin-top: 72px; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 6px 4px 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stat { font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--glass); border: 0.5px solid var(--hairline); color: var(--muted); font-variant-numeric: tabular-nums; }
.stat b { color: var(--text); font-weight: 650; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .toolbar { width: 100%; } .toolbar .seg { flex: 1; overflow-x: auto; } .toolbar .seg button { padding: 7px 10px; } }

/* Candidate card ---------------------------------------------------------------- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-lift), inset 0 0 0 0.5px var(--hairline); }
.card-main { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 18px; padding: 20px 22px; align-items: start; }
@media (max-width: 640px) { .card-main { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 18px; } .card-actions { grid-column: 1 / -1; flex-direction: row !important; } .card-actions > * { flex: 1; } }

.score {
  --c: var(--weak);
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fill-strong) 0);
}
.score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--glass-strong); }
.score span { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .score { width: 52px; height: 52px; } .score span { font-size: 17px; } }
.v-strong { --c: var(--strong); } .v-good { --c: var(--good); } .v-possible { --c: var(--possible); } .v-weak { --c: var(--weak); }

.name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank { color: var(--faint); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.name { font-family: var(--font-display); font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.verdict { font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.verdict.strong { background: var(--strong-soft); color: var(--strong); }
.verdict.good { background: var(--good-soft); color: var(--good); }
.verdict.possible { background: var(--possible-soft); color: var(--possible); }
.verdict.weak { background: var(--weak-soft); color: var(--weak); }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.tag.warn { background: var(--possible-soft); color: var(--possible); }
.tag.new { background: var(--accent-soft); color: var(--accent); }
.role { margin-top: 3px; font-size: 15px; }
.role strong { font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.ico { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.matched { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.matched.wide { color: var(--possible); }
.why { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill); }
.why .headline { font-weight: 600; }
.why .rationale { margin: 4px 0 0; color: var(--text); opacity: .86; font-size: 14.5px; }

.breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 22px; margin-top: 14px; }
@media (max-width: 760px) { .breakdown { grid-template-columns: 1fr; } }
.brow { display: grid; grid-template-columns: 136px 1fr 26px; align-items: center; gap: 10px; font-size: 12.5px; }
.bl { color: var(--muted); white-space: nowrap; }
.bw { color: var(--faint); font-size: 11px; margin-left: 2px; }
.bar { height: 5px; background: var(--fill-strong); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }
.bar .hi { background: var(--strong); } .bar .mid { background: var(--possible); } .bar .lo { background: var(--weak); }
.bg { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bnote { grid-column: 1 / -1; font-size: 12.5px; color: var(--possible); }
.bnote.muted { color: var(--muted); }

.sg { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
@media (max-width: 640px) { .sg { grid-template-columns: 1fr; gap: 12px; } }
.sg h5 { margin: 0 0 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.sg ul { margin: 0; padding-left: 17px; font-size: 14px; }
.sg li { margin: 2px 0; }
.sg .pos h5 { color: var(--strong); } .sg .neg h5 { color: var(--possible); }

.card-actions { display: flex; flex-direction: column; gap: 6px; }
.card-actions a, .card-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 0;
  text-decoration: none; color: var(--text); background: var(--fill); white-space: nowrap;
}
.card-actions a:hover, .card-actions button:hover { background: var(--fill-strong); }
.card-actions .star.on { color: #d98a00; background: var(--possible-soft); }
.card-details { border-top: 0.5px solid var(--hairline); padding: 18px 22px 22px 100px; background: color-mix(in srgb, var(--fill) 50%, transparent); font-size: 14px; }
@media (max-width: 640px) { .card-details { padding: 16px 18px 20px; } }
.card-details h5 { margin: 16px 0 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card-details h5:first-child { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 6px 0 8px 16px; border-left: 2px solid var(--fill-strong); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline .when { color: var(--muted); font-size: 12.5px; }
.timeline .sum { color: var(--muted); font-size: 13px; margin-top: 2px; }
.contact a { color: var(--accent); }

/* Plan ----------------------------------------------------------------------- */
.plan { padding: 16px 20px; }
.plan > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.plan > summary::-webkit-details-marker { display: none; }
.plan > summary .muted { font-size: 13.5px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 16px; }
.plan h4 { margin: 0 0 7px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.plan p { margin: 12px 0 0; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--fill); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
.queries { margin-top: 16px; font-size: 13px; }
.queries pre { background: var(--fill); border-radius: var(--r-sm); padding: 12px; overflow: auto; max-height: 260px; font-size: 12px; }

/* Shared bits used by the admin page */
.row { display: flex; gap: 12px; align-items: flex-end; }
.row > * { flex: 1; }
.error.panel { padding: 16px 20px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Start panel: choose where the job comes from ------------------------------- */
.start { padding: 14px; }
.src { margin-top: 14px; }
.src-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.src-head .flabel { margin: 0; }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req {
  display: block; width: 100%; text-align: left; border: 0; border-radius: var(--r-md); padding: 12px 14px;
  background: var(--fill); color: var(--text); cursor: pointer; transition: background .15s, transform .1s;
}
.req:hover { background: var(--fill-strong); }
.req:active { transform: scale(0.99); }
.req.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.req-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.req-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.req-id { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.req-meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.btn-block { display: block; width: 100%; margin-top: 12px; }
.btn-primary.btn-block { padding: 12px 18px; font-size: 15px; }
.paste { margin-top: 14px; }
.paste > summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; list-style: none; }
.paste > summary::-webkit-details-marker { display: none; }
.paste textarea { margin-top: 10px; }
.note.err { color: var(--danger); }
.btn-primary.loading, .btn-secondary.loading { opacity: .75; cursor: progress; }

.source-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
  padding: 10px 12px 10px 14px; border-radius: var(--r-md);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow);
}
.source-info { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.source-kind { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.source-name { display: block; max-width: 100%; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-bar .text-btn { flex: none; position: relative; z-index: 1; }

/* Typeahead -------------------------------------------------------------------- */
.ta-host { position: relative; }
.ta-list {
  position: absolute; left: 0; right: 0; z-index: 30; margin-top: 6px; padding: 5px; max-height: 300px; overflow: auto;
  border-radius: var(--r-md); background: var(--menu);
  border: 0.5px solid var(--hairline); box-shadow: var(--shadow-lift);
}
/* Each glass card is its own stacking layer; lift the one with an open list above its neighbours. */
.group.ta-open { position: relative; z-index: 40; }
.ta-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 14.5px; }
.ta-item:hover, .ta-item.on { background: var(--accent-soft); }
.ta-item.on { color: var(--accent); font-weight: 600; }
.ta-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Spelling fixes */
.fixes { display: flex; flex-direction: column; gap: 6px; }
.fixes:not(:empty) { margin-top: 8px; }
.fix {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 11px; font-size: 13.5px;
  background: var(--possible-soft); color: var(--text); animation: fixIn .18s ease-out;
}
.fix span { flex: 1; min-width: 0; }
.fix b { font-weight: 650; }
.fix button { border: 0; border-radius: 999px; font-size: 13px; font-weight: 600; padding: 5px 12px; cursor: pointer; }
.fix .fix-yes { background: var(--accent); color: var(--on-accent); }
.fix .fix-no { background: transparent; color: var(--muted); padding: 5px 8px; }
@keyframes fixIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* Unusual job title ------------------------------------------------------------- */
.title-check { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--possible-soft); font-size: 13.5px; animation: fixIn .18s ease-out; }
.title-check.pending { background: var(--fill); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.title-check.flash { animation: flash .9s ease-out; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--possible) 55%, transparent); } 100% { box-shadow: none; } }
.tc-head b { font-weight: 650; }
.tc-sub { margin: 10px 0 6px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tc-opts { display: flex; flex-direction: column; gap: 6px; }
.tc-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; border-radius: 10px; padding: 10px 12px; background: var(--menu); color: var(--text); font-size: 14.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.tc-opt:hover { box-shadow: 0 0 0 1.5px var(--accent); }
.tc-keep { margin-top: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 4px 0; cursor: pointer; }
.tc-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--fill-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* iPhone Safari zooms into any field with text under 16px and stays zoomed. */
@media (max-width: 980px) {
  input:not([type=range]):not([type=checkbox]), textarea, select { font-size: 16px !important; }
}

/* Market insights ------------------------------------------------------------- */
.view-seg { align-self: flex-start; }
.view-seg button { padding: 8px 18px; }
.insights { display: flex; flex-direction: column; gap: 14px; }
.ins-empty { padding: 28px; text-align: center; color: var(--muted); }
.ins-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 4px 4px 0; }
.ins-hero { font-family: var(--font-display); font-size: 52px; font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.ins-hero-label { margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 520px; }
.ins-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .ins-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ins-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ins-hero { font-size: 44px; } }
.ins-tile { padding: 14px 16px; border-radius: 18px; }
.t-val { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.t-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.t-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.ins-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .ins-grid { grid-template-columns: 1fr; } }
.ins-card { padding: 16px 18px; border-radius: var(--r-lg); min-width: 0; }
.ins-card h4 { margin: 0 0 12px; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.ins-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.ins-note .est { color: var(--possible); font-weight: 600; }
.ins-foot { margin: 2px 6px 8px; font-size: 12.5px; color: var(--muted); }

/* Meter list: name, bar, figure per row */
.meters { display: flex; flex-direction: column; gap: 9px; }
.meter { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(60px, 1fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.m-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-track { height: 8px; border-radius: 0 4px 4px 0; background: var(--fill); overflow: hidden; }
.m-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.m-fig { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; min-width: 34px; text-align: right; }
@media (max-width: 420px) { .meter { grid-template-columns: minmax(0, 1fr) auto; } .m-track { grid-column: 1 / -1; grid-row: 2; } }

/* Salary range */
.sal-bar { position: relative; height: 26px; margin: 6px 0 4px; }
.sal-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: var(--fill-strong); }
.sal-iqr { position: absolute; top: 7px; height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.sal-mid { position: absolute; top: 3px; width: 4px; height: 20px; margin-left: -2px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 2px var(--glass-strong); }
.sal-axis { position: relative; display: flex; justify-content: space-between; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; min-height: 36px; }
.sal-axis small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.sal-axis > span:last-child { text-align: right; }
.sal-axis-mid { position: absolute; transform: translateX(-50%); text-align: center; color: var(--accent); }
.sal-posted { margin: 10px 0 0; font-size: 13.5px; }
@media (max-width: 420px) { .meters { gap: 12px; } .meter { row-gap: 5px; } }

/* ==========================================================================
   Prospectly theme: warm paper, oxblood accent, editorial type.
   Overrides the tokens above; components keep their class names.
   ========================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --bg: #f3f2ee;
  --text: #141414;
  --muted: #67645c;
  --faint: #9d998f;
  --accent: #8c1d40;
  --accent-soft: rgba(140, 29, 64, 0.08);
  --on-accent: #ffffff;
  --ink: #151515;
  --on-ink: #f6f5f1;
  --glass: #fbfaf7;
  --glass-strong: #ffffff;
  --glass-edge: #e5e1d8;
  --hairline: rgba(45, 38, 25, 0.12);
  --fill: rgba(70, 60, 40, 0.06);
  --fill-strong: rgba(70, 60, 40, 0.11);
  --menu: #ffffff;
  --shadow: 0 1px 2px rgba(40, 32, 18, 0.04);
  --shadow-lift: 0 10px 30px rgba(40, 32, 18, 0.10);
  --strong: #1f6e46;
  --strong-soft: rgba(31, 110, 70, 0.11);
  --good: #2c6a8f;
  --good-soft: rgba(44, 106, 143, 0.11);
  --possible: #c2551a;
  --possible-soft: rgba(214, 110, 40, 0.13);
  --weak: #8c887f;
  --weak-soft: rgba(90, 80, 60, 0.10);
  --danger: #b3261e;
  --r-lg: 24px;
  --r-md: 14px;
  --blur: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141513;
    --text: #f1efe9;
    --muted: #a8a499;
    --faint: #76726a;
    --accent: #ef8fa9;
    --accent-soft: rgba(239, 143, 169, 0.14);
    --on-accent: #2b0714;
    --ink: #f1efe9;
    --on-ink: #151515;
    --glass: #1d1e1b;
    --glass-strong: #24251f;
    --glass-edge: #2f302b;
    --hairline: rgba(255, 250, 235, 0.10);
    --fill: rgba(255, 250, 235, 0.06);
    --fill-strong: rgba(255, 250, 235, 0.11);
    --menu: #24251f;
    --shadow: none;
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.45);
    --strong: #6cc58a;
    --strong-soft: rgba(108, 197, 138, 0.15);
    --good: #8cb8d6;
    --good-soft: rgba(140, 184, 214, 0.15);
    --possible: #f0965a;
    --possible-soft: rgba(240, 150, 90, 0.15);
    --weak: #8f8b82;
    --danger: #f07167;
  }
}

/* Paper, not glass */
.backdrop { background: var(--bg); }
.glass, .panel, .group, .card, .ins-tile, .ins-card, .tile, .source-bar {
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
fieldset.group { border: 1px solid var(--glass-edge); }
.glass-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--glass-edge); }
.card:hover { box-shadow: var(--shadow-lift); }

/* Header: square mark, serif wordmark, menu */
.topbar { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: 14px; }
.brand { gap: 12px; }
.mark {
  width: 34px; height: 34px; border-radius: 3px; background: var(--accent); box-shadow: none;
  display: grid; place-items: center; color: #fff; font-family: var(--font-serif); font-size: 21px; font-weight: 600; line-height: 1;
}
@media (prefers-color-scheme: dark) { .mark { background: #a3274f; } }
.mark::after { display: none; }
.wordmark { font-family: var(--font-serif); font-size: 27px; font-weight: 500; color: var(--accent); letter-spacing: -0.01em; }
.menu-wrap { position: relative; }
.menu-btn {
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--glass-edge); background: var(--glass);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer;
}
.menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 190px; padding: 6px;
  background: var(--menu); border: 1px solid var(--glass-edge); border-radius: 16px; box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column;
}
.menu-pop a, .menu-pop button.menu-item { padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; }
.menu-pop a:hover, .menu-pop button.menu-item:hover { background: var(--fill); }
.toplink { color: var(--accent); }
.pill { background: var(--fill); }
.pill.low, .pill.warn { background: var(--possible-soft); color: var(--possible); }

/* Page head: breadcrumb, title, numbered steps */
.layout { padding-top: 22px; }
.page-head { grid-column: 1 / -1; padding: 4px 4px 2px; }
.crumb { color: var(--muted); font-size: 14px; }
.page-head h1 { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 4px; }
.page-head p { margin: 0; font-size: 16px; max-width: 620px; }
@media (max-width: 640px) { .page-head h1 { font-size: 38px; } .page-head p { font-size: 15px; } }
.page-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 18px 0 0; padding: 0; }
.page-steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.page-steps li span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--faint); color: var(--muted); font-variant-numeric: tabular-nums;
}
.page-steps li.done span { border-color: var(--accent); color: var(--accent); }
.page-steps li.active { color: var(--text); font-weight: 600; }
.page-steps li.active span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.brief { top: 92px; }
.brief-head { display: none; }

/* Typography */
h1, h2, h3 { letter-spacing: -0.025em; }
.results-head h2 { font-size: 26px; font-weight: 600; }
.name { font-weight: 600; }
.group legend, .disclosure > summary { color: var(--muted); letter-spacing: 0.08em; }

/* Fields */
input:not([type=range]):not([type=checkbox]), textarea { background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge); }
input:focus, textarea:focus { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.stepper input { box-shadow: none !important; }
.seg { background: var(--fill-strong); border-radius: 999px; padding: 4px; }
.seg button { border-radius: 999px; }
.seg button.on { background: var(--glass-strong); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--glass-edge); }
@media (prefers-color-scheme: dark) { .seg button.on { background: #34352f; } }
.stepper { border-radius: 999px; }
.stepper button { border-radius: 999px; }

/* Buttons: ink primary, outlined secondary */
.btn-primary, button.primary { background: var(--ink); color: var(--on-ink); box-shadow: none; font-weight: 600; }
.btn-primary:hover { filter: none; opacity: .9; }
.btn-secondary, button.ghost, .card-actions a, .card-actions button {
  background: transparent; color: var(--text); border: 1px solid var(--glass-edge) !important;
}
.btn-secondary:hover, button.ghost:hover, .card-actions a:hover, .card-actions button:hover { background: var(--fill); }
.card-actions .star.on { background: var(--possible-soft); border-color: transparent !important; }
.text-btn { color: var(--accent); }

/* Phone: black floating action bar */
@media (max-width: 980px) {
  .actions {
    margin: 0; bottom: max(12px, env(safe-area-inset-bottom)); padding: 10px; border-radius: 22px;
    background: #151515; border: 0; box-shadow: 0 12px 32px rgba(0,0,0,.28); gap: 10px; align-items: stretch;
  }
  .actions .btn-primary { background: #f3f2ee; color: #151515; padding: 13px 18px; }
  .actions .text-btn { flex: 1; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #f3f2ee; font-weight: 500; padding: 12px 14px; }
  .actions .btn-primary { flex: 1.3; }
}

/* Cards and status */
.score::before { background: var(--glass); }
.why { background: var(--fill); }
.tag.new { background: var(--accent-soft); color: var(--accent); }
.fix, .title-check { background: var(--possible-soft); }
.tc-opt { box-shadow: inset 0 0 0 1px var(--glass-edge); }
.tc-opt:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.title-check .tc-head b::before {
  content: "!"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%;
  background: var(--possible-soft); color: var(--possible); font-size: 13px; font-weight: 800; vertical-align: 1px;
}
.empty-mark { border-radius: 4px; background: var(--accent-soft); }
.empty-mark::after { border-color: var(--accent); }

/* Progress steps inside results: numbered like the page steps */
.steps { counter-reset: s; }
.steps li::before { background: var(--glass-edge); top: 13px; }
.steps .dot { width: 28px; height: 28px; background: var(--glass); border: 1.5px solid var(--faint); box-shadow: 0 0 0 4px var(--glass); display: grid; place-items: center; }
.steps .dot::after { counter-increment: s; content: counter(s); font-size: 12px; font-weight: 600; color: var(--muted); }
.steps li.done .dot { background: var(--glass); border-color: var(--accent); }
.steps li.done .dot::after { color: var(--accent); }
.steps li.done::before, .steps li.active::before { background: var(--accent); }
.steps li.active .dot { background: var(--ink); border-color: var(--ink); animation: none; }
.steps li.active .dot::after { color: var(--on-ink); }
.steps li.active { color: var(--text); }

/* Insights hero in the editorial style */
.ins-hero { font-weight: 600; letter-spacing: -0.04em; }
.m-fill { background: var(--accent); }

/* ==========================================================================
   Desktop focus layout: steps 1-2 are one centered column; step 3 goes back
   to brief-left / results-right. (Phones keep the single-column flow.)
   ========================================================================== */
@media (min-width: 981px) {
  .layout[data-step="choose"], .layout[data-step="brief"] { grid-template-columns: minmax(0, 1fr); }
  .layout[data-step="choose"] .page-head, .layout[data-step="brief"] .page-head { max-width: 920px; width: 100%; margin: 0 auto; }
  .layout[data-step="choose"] .results, .layout[data-step="brief"] .results { display: none; }
  .layout[data-step="choose"] .brief, .layout[data-step="brief"] .brief {
    position: static; max-height: none; overflow: visible; max-width: 920px; width: 100%; margin: 0 auto; padding: 0;
  }

  /* Step 1: requisitions as cards side by side */
  .layout[data-step="choose"] .start { padding: 18px; }
  .layout[data-step="choose"] .req-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
  .layout[data-step="choose"] .req { display: flex; flex-direction: column; justify-content: space-between; min-height: 132px; padding: 16px; }
  .layout[data-step="choose"] .req-top { flex-direction: column-reverse; gap: 6px; }
  .layout[data-step="choose"] .req-title { font-size: 16px; }
  .layout[data-step="choose"] #src-new { max-width: 620px; }

  /* Step 2: two-column brief */
  .layout[data-step="brief"] form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .layout[data-step="brief"] form > * { min-width: 0; }
  .layout[data-step="brief"] form > fieldset.group:first-of-type { grid-column: 1 / -1; padding: 18px 20px 20px; }
  .layout[data-step="brief"] form > fieldset.group:first-of-type textarea[name="description"] { min-height: 150px; }
  .layout[data-step="brief"] form > fieldset.group:first-of-type .field:has([name="title"]),
  .layout[data-step="brief"] form > fieldset.group:first-of-type .field:has([name="experience"]) { max-width: 100%; }
  .layout[data-step="brief"] .group { padding: 16px 18px 18px; }
  .layout[data-step="brief"] form > fieldset.group:last-of-type { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .layout[data-step="brief"] form > fieldset.group:last-of-type legend { grid-column: 1 / -1; }
  .layout[data-step="brief"] form > fieldset.group:last-of-type .stepper-row + .stepper-row { margin-top: 0; padding-top: 0; border-top: 0; }
  .layout[data-step="brief"] .source-bar { margin-bottom: 16px; }

  /* Pinned action bar, like the phone */
  .layout[data-step="brief"] .actions {
    grid-column: 1 / -1; position: sticky; bottom: 18px; z-index: 20; margin-top: 4px;
    flex-direction: row-reverse; align-items: stretch; gap: 10px; padding: 10px;
    background: #151515; border-radius: 22px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  }
  .layout[data-step="brief"] .actions .btn-primary { flex: 1.4; background: #f3f2ee; color: #151515; padding: 14px 20px; font-size: 16px; }
  .layout[data-step="brief"] .actions .text-btn { flex: 1; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; color: #f3f2ee; font-weight: 500; }

  /* Step 3: brief on the left, a little more compact */
  .layout[data-step="review"] .page-head h1 { font-size: 36px; }
}

/* Desktop step 2: compact floating action pill (overrides the full-width bar above) */
@media (min-width: 981px) {
  .layout[data-step="brief"] .actions {
    justify-self: end; width: auto; flex-direction: row-reverse; align-items: center; gap: 4px;
    padding: 6px; border-radius: 999px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  }
  .layout[data-step="brief"] .actions .btn-primary { flex: none; padding: 10px 22px; font-size: 15px; }
  .layout[data-step="brief"] .actions .text-btn { flex: none; border: 0; padding: 10px 16px; font-size: 14px; color: rgba(243, 242, 238, 0.8); }
  .layout[data-step="brief"] .actions .text-btn:hover { color: #f3f2ee; }
}

/* Budget card: a grid fieldset pushed its legend onto the border; keep it a block and
   lay the two steppers out side by side with flex instead. */
@media (min-width: 981px) {
  .layout[data-step="brief"] form > fieldset.group:last-of-type { display: block; }
  .layout[data-step="brief"] form > fieldset.group:last-of-type legend { float: left; width: 100%; }
  .layout[data-step="brief"] form > fieldset.group:last-of-type .stepper-row {
    display: inline-flex; width: calc(50% - 16px); vertical-align: top; clear: none;
  }
  .layout[data-step="brief"] form > fieldset.group:last-of-type .stepper-row + .stepper-row { margin-left: 28px; }
}

/* Action bar: centered, frosted glass (phone and desktop) */
.actions {
  background: rgba(255, 255, 255, 0.55) !important;
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 10px 30px rgba(40, 32, 18, 0.14), inset 0 0 0 0.5px rgba(40, 32, 18, 0.10) !important;
}
@media (prefers-color-scheme: dark) {
  .actions { background: rgba(36, 37, 33, 0.55) !important; border-color: rgba(255, 255, 255, 0.10) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important; }
}
.actions .btn-primary {
  background: rgba(21, 21, 21, 0.9) !important; color: #f6f5f1 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}
.actions .text-btn {
  background: rgba(255, 255, 255, 0.45) !important; color: var(--text) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important; box-shadow: inset 0 0 0 0.5px rgba(40, 32, 18, 0.08);
}
@media (prefers-color-scheme: dark) {
  .actions .btn-primary { background: rgba(241, 239, 233, 0.92) !important; color: #151515 !important; }
  .actions .text-btn { background: rgba(255, 255, 255, 0.08) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, 0.14) !important; }
}
@media (min-width: 981px) {
  .layout[data-step="brief"] .actions { justify-self: center; gap: 6px; padding: 6px; }
  .layout[data-step="brief"] .actions .text-btn { padding: 10px 18px; }
}
@media (max-width: 980px) {
  .actions { left: 0; right: 0; margin: 0 auto; max-width: 440px; border-radius: 999px; padding: 6px; }
  .actions .btn-primary, .actions .text-btn { border-radius: 999px; }
}

/* Clickable page steps (any step already reached) */
.page-steps li.link { cursor: pointer; border-radius: 999px; padding: 4px 10px 4px 4px; margin: -4px -10px -4px -4px; transition: background .15s; }
.page-steps li.link:hover { background: var(--fill); color: var(--text); }
.page-steps li.link:hover span { border-color: var(--accent); }
.page-steps li.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 981px) {
  .layout[data-step="brief"] form > fieldset.group:last-of-type .stepper-row { width: calc(50% - 22px); }
  .layout[data-step="brief"] form > fieldset.group:last-of-type .stepper-row + .stepper-row { margin-left: 28px; }
}
@media (max-width: 980px) {
  .actions { width: calc(100% - 8px); }
  .actions .btn-primary, .actions .text-btn { white-space: nowrap; }
}

/* Header fits small phones with the longer "Prospectly" wordmark */
.topbar { min-width: 0; }
.brand { min-width: 0; flex-shrink: 1; }
.topbar-right { flex-shrink: 0; }
@media (max-width: 480px) {
  .topbar { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .brand { gap: 9px; }
  .wordmark { font-size: 23px; }
  .mark { width: 30px; height: 30px; font-size: 18px; }
  .menu-btn { width: 42px; height: 42px; border-radius: 12px; }
  .topbar-right { gap: 6px; }
  .pill { font-size: 12px; padding: 3px 8px; }
}
@media (max-width: 370px) {
  .wordmark { font-size: 20px; }
  #modeBadge { display: none; }
}

/* Wordmark: lowercase, heavy sans, tight tracking, one oxblood dot. No icon. */
.wordmark {
  font-family: var(--font); font-size: 25px; font-weight: 800; letter-spacing: -0.045em;
  color: var(--text); line-height: 1;
}
.wm-dot { color: var(--accent); }
.brand { gap: 0; }
@media (max-width: 480px) { .wordmark { font-size: 22px; } }
@media (max-width: 370px) { .wordmark { font-size: 20px; } }

/* Your jobs: careers-site connection */
.ats-head { align-items: flex-start; margin-bottom: 10px; }
.ats-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ats-co { font-weight: 650; font-size: 16px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-sub { font-size: 12.5px; color: var(--muted); }
.ats-filter { width: 100%; margin-bottom: 10px; }
.ats-more { margin: 10px 2px 0; }
.ats-sample-link { display: block; margin: 14px auto 0; font-size: 13.5px; }
.req.loading { opacity: .7; cursor: progress; }
.req:disabled { cursor: default; }
.err-text { color: var(--danger, #b3261e); }
#src-ats .req-list { max-height: min(62vh, 640px); overflow-y: auto; }

/* Supported ATS logos */
.ats-works { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.ats-works-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ats-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ats-logos li {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px;
  background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge); font-size: 12.5px; font-weight: 600; color: var(--text);
}
.ats-logos img { width: 20px; height: 20px; border-radius: 6px; object-fit: contain; display: block; background: #fff; }
.ats-soon { font-size: 12px; color: var(--faint); }
.ats-sub { display: inline-flex; align-items: center; gap: 6px; }
.ats-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; background: #fff; }

/* Job link: a link (main) or the description (secondary) */
.imp { max-width: 640px; margin: 0 auto; padding: 8px 0 2px; }
.imp-label { display: block; font-size: 15px; font-weight: 650; color: var(--text); margin-bottom: 10px; }
.imp-row { display: flex; gap: 8px; align-items: stretch; }
.imp-row input { flex: 1; min-width: 0; }
.imp-row .btn-primary { flex: none; padding: 0 22px; border-radius: 999px; font-size: 15px; }
.imp-drop { border-radius: var(--r-md); transition: box-shadow .15s, background .15s; }
.imp-drop.over { background: var(--accent-soft); box-shadow: 0 0 0 10px var(--accent-soft); }
.imp-example { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.imp-example img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.imp-example code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text); background: var(--fill); padding: 2px 7px; border-radius: 6px; }
.imp-hint { margin: 6px 0 0; font-size: 13px; color: var(--faint); }
.imp-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.imp-or::before, .imp-or::after { content: ""; flex: 1; height: 1px; background: var(--glass-edge); }
.imp-alt {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border: 0; border-radius: var(--r-md);
  background: var(--fill); color: var(--text); font: inherit; cursor: pointer; transition: background .15s;
}
.imp-alt:hover { background: var(--fill-strong); }
.imp-alt-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--glass-strong); color: var(--accent); flex: none; box-shadow: inset 0 0 0 1px var(--glass-edge); }
.imp-alt-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.imp-alt-text strong { font-size: 15px; font-weight: 600; }
.imp-alt-text span { font-size: 13px; color: var(--muted); }
.imp-alt-chev { font-size: 22px; color: var(--faint); transition: transform .2s; line-height: 1; }
.imp-alt.open .imp-alt-chev { transform: rotate(90deg); }
.imp-alt.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.imp-paste { padding: 12px; background: var(--fill); border-radius: 0 0 var(--r-md) var(--r-md); }
.imp-paste textarea { width: 100%; min-height: 150px; resize: vertical; }
.imp-paste .btn-block { margin-top: 10px; }
.imp-fills { margin: 20px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
#importText.flash { animation: flash .9s ease-out; }
#importError { margin-top: 12px; }
.imp-example span { min-width: 0; }
.imp-example code { overflow-wrap: anywhere; }
@media (max-width: 480px) { .imp-row .btn-primary { padding: 0 16px; } .imp-example { align-items: flex-start; } .imp-example img { margin-top: 2px; } }

/* Pages that need sign-in stay hidden until the check passes. */
html.auth-pending body > :not(.backdrop) { visibility: hidden; }
.menu-pop .menu-who { display: block; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--glass-edge); font-size: 12.5px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop .menu-who strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
.menu-pop button.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; }

/* Sourcing / Candidates tabs in the top bar */
.app-tabs { display: flex; gap: 4px; margin-left: 22px; padding: 4px; border-radius: 999px; background: var(--fill); }
.app-tabs a { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.app-tabs a:hover { color: var(--text); }
.app-tabs a[aria-current="page"] { background: var(--glass-strong); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@media (max-width: 560px) { .app-tabs { margin-left: 10px; } .app-tabs a { padding: 6px 10px; font-size: 13px; } }
@media (max-width: 400px) { .app-tabs a { padding: 6px 8px; font-size: 12.5px; } }

/* Progress: a slim three-part bar above the work area (not tab-like) */
.page-head { padding: 2px 4px 0; }
.page-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 2px; max-width: 640px; }
.page-steps li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--faint); }
.page-steps li::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--fill-strong); }
.page-steps li.done::before, .page-steps li.active::before { background: var(--accent); }
.page-steps li span { display: none; }
.page-steps li em { font-style: normal; font-weight: 600; letter-spacing: .01em; }
.page-steps li.done { color: var(--muted); }
.page-steps li.active { color: var(--text); font-weight: 600; }
.page-steps li.link { padding: 0; margin: 0; background: none !important; }
.page-steps li.link:hover em { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Step 1: a clear question with three choices */
.start-title { margin: 6px 2px 4px; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
.start-sub { margin: 0 2px 18px; color: var(--muted); font-size: 15px; }
.src-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.src-pick button {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; align-items: center;
  text-align: left; padding: 14px; border: 1.5px solid transparent; border-radius: 16px; background: var(--fill); color: var(--text);
  font: inherit; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.src-pick button:hover { background: var(--fill-strong); }
.src-pick button.on { background: var(--glass-strong); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.src-ic { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--glass-strong); color: var(--muted); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.src-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.src-pick button.on .src-ic { background: var(--accent); color: #fff; box-shadow: none; }
.src-t { font-weight: 650; font-size: 15px; }
.src-d { font-size: 12.5px; color: var(--muted); }
.start .src { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--glass-edge); }
@media (max-width: 760px) {
  .src-pick { grid-template-columns: 1fr; gap: 8px; }
  .start-title { font-size: 22px; }
}
/* Phones: Sourcing/Candidates live in the menu; the header keeps just the logo, credits and menu. */
@media (max-width: 720px) { .app-tabs { display: none; } }
@media (max-width: 760px) {
  .src-pick button { padding: 10px 12px; grid-template-columns: 32px minmax(0, 1fr); border-radius: 14px; }
  .src-ic { width: 32px; height: 32px; border-radius: 9px; }
  .src-ic svg { width: 17px; height: 17px; }
  .page-steps li { font-size: 12px; }
}
@media (max-width: 980px) { .layout[data-step="choose"] #results { display: none; } }

/* Add to project + note */
.card-actions .add-proj { font-weight: 600; }
.card-actions .add-proj.on { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }
.card-actions .add-proj.on .ico { stroke: #fff; }
.card-note { margin: 0 22px 18px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
@media (max-width: 640px) { .card-note { margin: 0 14px 14px; } }
.note-label { display: block; font-size: 13px; font-weight: 650; color: var(--accent); margin-bottom: 8px; }
.note-label .muted { font-weight: 500; }
.note-row { display: flex; gap: 8px; align-items: flex-start; }
.note-row textarea { flex: 1; min-width: 0; min-height: 46px; resize: vertical; background: var(--glass-strong); }
.note-row .btn-secondary { flex: none; padding: 10px 14px; font-size: 13.5px; }
@media (max-width: 480px) { .note-row { flex-direction: column; align-items: stretch; } }
.note-status { margin-top: 6px; min-height: 1em; }

/* Buy credits */
.buy-pill { cursor: pointer; transition: background .15s; }
.buy-pill:hover { background: var(--accent-soft); color: var(--accent); }
.buy-pill::after { content: " · Buy"; color: var(--accent); font-weight: 650; }
@media (max-width: 420px) { .buy-pill::after { content: " +"; } }
.buy-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.buy-scrim { position: absolute; inset: 0; background: rgba(20, 18, 14, 0.38); }
.buy-sheet {
  position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 30px 28px 22px;
  border-radius: 26px; background: var(--bg, #f3f2ee); box-shadow: 0 30px 80px rgba(0,0,0,.25); border: 1px solid var(--glass-edge);
}
.buy-sheet h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.buy-sheet > p { margin: 0; }
.buy-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); font-size: 22px; cursor: pointer; }
.buy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 14px; }
@media (max-width: 680px) { .buy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .buy-sheet { padding: 26px 18px 18px; } }
.buy-pack {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 18px 16px 16px;
  border-radius: 18px; border: 1.5px solid var(--glass-edge); background: var(--glass-strong); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.buy-pack:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.buy-pack:active { transform: scale(0.98); }
.buy-pack.pop { border-color: var(--accent); }
.buy-pack.loading { opacity: .6; cursor: progress; }
.buy-badge { position: absolute; top: -10px; left: 14px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 650; }
.buy-name { font-size: 13.5px; color: var(--muted); font-weight: 550; }
.buy-price { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 4px; }
.buy-credits { font-weight: 650; font-size: 15px; margin-top: 6px; }
.buy-per { font-size: 12.5px; color: var(--muted); }
.buy-foot { font-size: 12.5px; text-align: center; margin-top: 8px !important; }
.buy-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--on-ink); font-size: 14.5px; font-weight: 550; box-shadow: 0 12px 32px rgba(0,0,0,.2);
}
.inline-buy { padding: 0; font-size: inherit; }

.buy-auto { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--fill); font-size: 14px; line-height: 1.5; cursor: pointer; }
.buy-auto input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.buy-auto select, .buy-auto-edit select { border: 0; border-radius: 8px; padding: 3px 6px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--text); font: inherit; font-size: 13.5px; }
.buy-auto-on { padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); font-size: 14px; }
.buy-auto-on p { margin: 6px 0 0; line-height: 1.5; }
.buy-auto-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.buy-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--strong); box-shadow: 0 0 0 3px var(--strong-soft); }
.buy-auto-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: 13.5px; }
.buy-auto-edit label { display: inline-flex; align-items: center; gap: 6px; }
.buy-auto-edit .btn-secondary { padding: 7px 14px; font-size: 13.5px; }

/* Reach out */
.card-actions .reach .ico, .card-actions .add-proj .ico { margin-right: 2px; }
.cx-reach { padding: 8px 16px; font-size: 14px; border-radius: 999px; }
.ro-wrap { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; }
.ro-locked { overflow: hidden; }
.ro-scrim { position: absolute; inset: 0; background: rgba(20, 18, 14, 0.38); }
.ro-sheet {
  position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px 26px 20px;
  border-radius: 26px; background: var(--bg, #f3f2ee); border: 1px solid var(--glass-edge); box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
@media (max-width: 560px) { .ro-sheet { padding: 24px 16px 16px; } }
.ro-sheet h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.ro-sub { margin: 4px 0 0; }
.ro-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); font-size: 22px; cursor: pointer; }
.ro-block { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-edge); }
.ro-block h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ro-c { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.ro-c a { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ro-c a:hover { color: var(--accent); }
.ro-c .text-btn { margin-left: auto; padding: 2px 4px; font-size: 13px; }
.ro-c-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--fill); color: var(--accent); font-size: 14px; flex: none; }
.ro-c-ic.li { background: #0a66c2; color: #fff; font-weight: 800; font-size: 13px; }
.ro-get { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.ro-get .btn-primary { padding: 10px 18px; border-radius: 999px; font-size: 14.5px; }
.ro-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.ro-msg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ro-msg-head h4 { margin: 0; }
.ro-seg button { padding: 6px 14px; font-size: 13.5px; }
.ro-block input, .ro-block textarea { width: 100%; margin-bottom: 8px; }
.ro-block textarea { resize: vertical; min-height: 170px; line-height: 1.5; }
.ro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ro-grow { flex: 1; }
.ro-actions .btn-secondary, .ro-actions .btn-primary { padding: 9px 16px; font-size: 14px; border-radius: 999px; text-decoration: none; }
.ro-send.disabled { opacity: .45; pointer-events: auto; cursor: not-allowed; }
.ro-status { margin: 8px 0 0; min-height: 1em; }
.ro-tag { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--strong-soft); color: var(--strong); white-space: nowrap; }
.ro-tag.work { background: var(--fill); color: var(--muted); }
.ro-work { color: var(--muted); font-size: 14px; }
.ro-work .ro-tag { margin-left: auto; }

.ro-picks { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.ro-pick { flex: 1 1 180px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface, #fff); font-size: 14px; }
.ro-pick input { accent-color: var(--accent, #8c1d40); width: 16px; height: 16px; margin: 0; }
.ro-pick b { margin-left: auto; font-weight: 650; font-size: 13px; color: var(--muted); }
.ro-pick.on { border-color: var(--accent, #8c1d40); box-shadow: 0 0 0 1px var(--accent, #8c1d40) inset; }

/* ---- Calmer review step ----------------------------------------------------------------- */
/* Reviewing: results take the page; the brief shrinks to a one-line summary above them. */
.review-only { display: none; }
.layout[data-step="review"] .review-only { display: inline-flex; }
.source-acts { display: flex; gap: 14px; align-items: center; flex: none; }
.layout[data-step="review"] { grid-template-columns: minmax(0, 1fr); max-width: 1040px; gap: 16px; }
.layout[data-step="review"] .brief { position: static; max-height: none; overflow: visible; padding: 0; }
.layout[data-step="review"] #jobForm { display: none; }
.layout[data-step="review"] .page-head { margin-bottom: -4px; }

/* Finished searches don't need the step tracker: one quiet line instead. */
.progress.done { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.progress.done .steps { display: none; }
.progress.done .progress-now { margin: 0; font-size: 13px; min-height: 0; }
.progress.done .progress-log { margin: 0; }
.progress.done .progress-log[open] { flex-basis: 100%; }
.layout[data-step="review"] .progress.done { justify-content: flex-start; padding: 0 4px; }

/* Tabs as a simple underline row, with Export at the end. */
.view-seg { background: none; padding: 0; border-radius: 0; gap: 22px; border-bottom: 1px solid var(--hairline); align-items: flex-end; }
.view-seg button[data-v] { background: none !important; box-shadow: none !important; border-radius: 0; padding: 8px 0 10px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.view-seg button[data-v].on { color: var(--text); border-bottom-color: var(--accent); }
.view-seg .export-btn { margin-left: auto; font-size: 13.5px; padding: 8px 0 10px; }

.results-head { align-items: center; padding: 2px 4px 0; }
.results-head h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.results-head .stat-row { margin-top: 2px; font-size: 13.5px; }
.chips-f { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-f button { border: 1px solid var(--hairline); background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.chips-f button:hover { color: var(--text); }
.chips-f button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 640px) { .chips-f { width: 100%; overflow-x: auto; flex-wrap: nowrap; } .chips-f button { flex: none; } }

/* Card: two columns (score, content); actions sit in a footer row under the summary. */
.card-main { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 18px 20px; }
.score { width: 56px; height: 56px; }
.score span { font-size: 18px; }
.why { margin-top: 12px; padding: 0; background: none !important; }
.why .rationale { font-size: 14.5px; opacity: .8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.card-foot .grow { flex: 1; }
.card-foot .reach, .card-foot .add-proj {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.card-foot .reach { background: var(--text); color: var(--bg); border: 1px solid var(--text); }
.card-foot .reach .ico { stroke: currentColor; }
.card-foot .add-proj { background: transparent; color: var(--text); border: 1px solid var(--line, var(--hairline)); }
.card-foot .add-proj.on { color: var(--strong); border-color: color-mix(in srgb, var(--strong) 45%, transparent); background: color-mix(in srgb, var(--strong) 8%, transparent); }
.card-foot .text-link { font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.card-foot .text-link:hover { color: var(--text); }
.card-foot .more { font-size: 13.5px; }
.card-details { padding: 16px 20px 20px 92px; }
.card-details .matched { margin: 0 0 12px; }
.card-details .breakdown { margin-top: 4px; }
.card-details .sg { margin: 14px 0 4px; }
@media (max-width: 640px) {
  .card-main { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .score { width: 48px; height: 48px; } .score span { font-size: 16px; }
  .card-foot .grow { display: none; }
  .card-foot .reach, .card-foot .add-proj { flex: 1; justify-content: center; }
  .card-details { padding: 14px 16px 18px; }
}
.view-seg { display: flex !important; width: 100%; align-self: stretch; }
.view-seg.hidden { display: none !important; }
.layout[data-step="review"] .progress.done { display: none; }

/* Company / school logos (Brandfetch), with initials until the logo loads */
.co-logo { --s: 20px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 5px; overflow: hidden; vertical-align: -5px; margin-right: 6px;
  background: hsl(var(--h) 32% 90%); color: hsl(var(--h) 35% 30%); font-size: calc(var(--s) * .42); font-weight: 700; font-style: normal; letter-spacing: -0.02em; }
.co-logo i { font-style: normal; }
.co-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; opacity: 0; transition: opacity .2s; }
.co-logo.has-img img { opacity: 1; }
.co-logo.has-img { box-shadow: inset 0 0 0 0.5px var(--hairline); }
.co-logo.md { --s: 28px; border-radius: 7px; }
@media (prefers-color-scheme: dark) { .co-logo { background: hsl(var(--h) 22% 26%); color: hsl(var(--h) 40% 85%); } }
/* Work history with logos instead of dots */
.timeline.logos li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-left: 0; }
.timeline.logos li::before { display: none; }
.timeline.logos .co-logo { margin: 2px 0 0; }
.edu-row { display: flex; align-items: center; gap: 2px; margin: 4px 0; }
.jb-co { display: flex; align-items: center; gap: 2px; margin: 2px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

/* Search in progress: a pulse from the center while candidate photos orbit it. */
.pv { position: relative; width: 200px; height: 200px; margin: 30px auto 26px; }
.progress.done .pv { display: none; }
.pv-core { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); z-index: 2; }
.pv-pulse { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0; animation: pv-pulse 2.7s ease-out infinite; }
.pv-pulse.p2 { animation-delay: .9s; } .pv-pulse.p3 { animation-delay: 1.8s; }
@keyframes pv-pulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(3.4); opacity: 0; } }
.pv-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--text) 14%, transparent); animation: pv-spin 18s linear infinite; }
.pv-slot { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(-100px); }
.pv-slot img { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; object-fit: cover; display: block;
  box-shadow: 0 0 0 3px var(--glass-strong, #fff), 0 6px 14px rgba(0,0,0,.18);
  transform: rotate(calc(-1 * var(--a))); animation: pv-upright 18s linear infinite, pv-glow 5.4s ease-in-out infinite; animation-delay: 0s, var(--d); }
@keyframes pv-spin { to { transform: rotate(360deg); } }
@keyframes pv-upright { from { rotate: 0deg; } to { rotate: -360deg; } }
@keyframes pv-glow { 0%, 100% { opacity: .45; scale: .9; } 45%, 60% { opacity: 1; scale: 1.08; } }
@media (max-width: 640px) { .pv { transform: scale(.8); margin: 6px auto -14px; } }
@media (prefers-reduced-motion: reduce) { .pv-ring, .pv-slot img, .pv-pulse { animation: none !important; } .pv-slot img { opacity: 1; } }

/* The whole card summary opens the full profile. */
.card .card-main { cursor: pointer; }
.card .card-main :is(button, a) { cursor: pointer; }
@media (hover: hover) { .card:not(.open) .card-main:hover .more { text-decoration: underline; text-underline-offset: 3px; } }
.card-foot .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.more .chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.card.open .more .chev { transform: translateY(1px) rotate(-135deg); }
.card .card-main { -webkit-tap-highlight-color: transparent; transition: background-color .15s; }
.card .card-main:active:not(:has(button:active, a:active)) { background-color: color-mix(in srgb, var(--text) 3%, transparent); }
.menu-pop .menu-sub { font-size: 13px; color: var(--muted); }
.auth-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
