/* ============================================================
   Opportune — design tokens & base
   Editorial / warm-paper aesthetic
   ============================================================ */

:root {
  /* Canvas & surfaces */
  --canvas: #F1EFE9;          /* warm cream page bg */
  --canvas-2: #ECE9E1;        /* slightly deeper cream */
  --surface: #FBF9F3;         /* warm white card */
  --surface-2: #F6F3EC;       /* recessed field */

  /* Ink */
  --ink: #1D2C26;             /* deep green — primary text */
  --ink-2: #585850;           /* secondary */
  --ink-3: #6D685E;           /* tertiary body */
  --muted: #9B958A;           /* labels, captions */

  /* Hairlines */
  --line: #E6E0D3;
  --line-2: #DED8CB;

  /* Accents */
  --green: #3F6F4A;           /* positive / forest */
  --green-deep: #2F5A3A;
  --gold: #B5840A;            /* eyebrow + highlight (text — kept readable) */
  --gold-soft: #FFDD6B;
  --gold-paper: #FFCB3D;      /* warm golden yellow — paper + buttons */
  --gold-pale: #FBF1C4;       /* paper-fan pale edge */

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Shadows — soft warm */
  --shadow-sm: 0 1px 2px rgba(60,50,25,0.05);
  --shadow-md: 0 8px 30px rgba(107,87,31,0.10);
  --shadow-lg: 0 24px 60px rgba(60,50,25,0.12);

  /* Type */
  --serif: "Playfair Display", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 760px;

  /* ---- Tweakable: accent (set by JS) ---- */
  --gold-btn-1: #FFDA63;
  --gold-btn-2: #FFC529;
  --accent-glow: rgba(255,203,80,0.16);

  /* ---- Tweakable: atmosphere (set by JS) ---- */
  --bg-top: #FDFCF9;
  --bg-mid: #F8F5EF;
  --bg-bot: #F1EDE3;
  --bg-radial: rgba(255,255,255,0.9);
  --panel-bg: rgba(255,255,255,0.62);
  --panel-border: rgba(232,227,216,0.9);
  --topbar-bg: rgba(253,252,249,0.62);

  /* ---- Tweakable: paper fan ---- */
  --pf-scale: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* airy translucent wash: light at top → soft warm at bottom */
  background:
    radial-gradient(120% 65% at 50% -8%, var(--bg-radial) 0%, rgba(255,255,255,0) 56%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bot) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .5s ease;
}

#root { min-height: 100vh; }

/* ---- Typographic primitives ---- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.display {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
.serif-h {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}
.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.body { font-size: 15.5px; line-height: 1.6; color: var(--ink-3); margin: 0; }
.cap { font-size: 13px; color: var(--muted); margin: 0; }

/* ---- Buttons ---- */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 13px 26px;
  cursor: pointer;
  transition: transform .32s cubic-bezier(.34,1.4,.34,1), box-shadow .3s cubic-bezier(.3,.7,.3,1), background .3s ease, border-color .25s ease, color .25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  line-height: 1;
  white-space: nowrap;
  will-change: transform;
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }

.btn-primary {
  background: var(--ink);
  color: #F6F4EC;
  box-shadow: 0 2px 8px rgba(29,44,38,0.18);
}
.btn-primary:hover { background: #16241E; box-shadow: 0 8px 22px rgba(29,44,38,0.26); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-btn-1) 0%, var(--gold-btn-2) 100%);
  color: #4a3908;
  box-shadow: 0 4px 14px rgba(255,193,30,0.32), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 9px 24px rgba(255,193,30,0.42), inset 0 1px 0 rgba(255,255,255,0.55); }

.btn-ghost {
  background: rgba(255,255,255,0.4);
  color: var(--ink);
  border-color: rgba(222,216,203,0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(255,255,255,0.75); }

.btn-text {
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 6px 2px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--sans);
}
.btn-text:hover { color: var(--green); }

/* ---- Links ---- */
.nav-link {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--green); }

/* ---- Inputs ---- */
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  display: block;
}
.input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(214,207,191,0.9);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder { color: #b6b0a4; }
.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(63,111,74,0.13);
}
textarea.input { resize: vertical; line-height: 1.55; }

/* ---- Misc ---- */
.tag {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 5px 11px;
}
.hr { height: 1px; background: var(--line-2); border: 0; margin: 0; }
.page-shell > .hr { display: none; }

/* ============================================================
   Paper-fan motif
   ============================================================ */
.pf-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.pf-pivot {
  position: absolute;
  left: 64%;
  top: -6%;
  width: 0;
  height: 0;
  z-index: 2;
}
/* soft white depth ellipses behind the fan, matching Figma bg-depth */
.pf-depth {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.pf-depth-1 {
  width: 78%; height: 96%;
  right: -8%; top: -12%;
  background: rgba(255,255,255,0.52);
  filter: blur(50px);
}
.pf-depth-2 {
  width: 60%; height: 78%;
  right: -2%; top: 18%;
  background: rgba(255,255,255,0.45);
  filter: blur(36px);
}
.pf-depth-3 {
  width: 44%; height: 60%;
  right: 30%; top: -6%;
  background: rgba(255,255,255,0.38);
  filter: blur(30px);
}
.pf-card {
  position: absolute;
  width: calc(clamp(250px, 30vw, 400px) * var(--pf-scale, 1));
  height: calc(clamp(350px, 42vw, 560px) * var(--pf-scale, 1));
  border-radius: 3px;
  transform-origin: 17% 91%;
  box-shadow: inset 0 0 0 1px rgba(184,150,52,0.14),
              -8px 10px 22px rgba(150,120,40,0.16);
  left: -10%;
  top: -72%;
  opacity: 1;
  transform: rotate(var(--pf-angle));
}
.pf-animate .pf-card {
  animation: pf-in 0.6s cubic-bezier(.2,.7,.25,1) both;
}
@keyframes pf-in {
  from { transform: rotate(var(--pf-angle)) translateY(16px) scale(0.99); }
  to   { transform: rotate(var(--pf-angle)) translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .pf-animate .pf-card { animation: none; }
}

/* ============================================================
   Welcome
   ============================================================ */
.welcome {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(110% 80% at 0% 38%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 55%),
    transparent;
}
.welcome-nav {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px clamp(28px, 5vw, 64px);
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.welcome-nav-links { display: flex; gap: clamp(20px, 3vw, 38px); align-items: center; }

.welcome-hero {
  position: relative;
  z-index: 20;
  max-width: 540px;
  padding: clamp(48px, 13vh, 130px) clamp(28px, 5vw, 64px) 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.welcome-title { font-size: clamp(40px, 4.8vw, 52px); white-space: nowrap; }
.welcome-sub { margin-top: 26px; max-width: 340px; font-size: 17px; color: var(--ink-2); }
.welcome-cta {
  margin-top: 34px;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.welcome-cta .arrow { transition: transform .2s ease; display: inline-block; }
.welcome-cta:hover .arrow { transform: translate(3px, 3px); }

.welcome-mobilebar { display: none; }
.welcome-mobilebar .dot { color: var(--muted); }

@media (max-width: 760px) {
  .welcome { background: radial-gradient(140% 60% at 50% 0%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 60%), transparent; }
  .welcome-nav-links { display: none; }
  .welcome-mobilebar { display: flex; gap: 12px; align-items: center; position: relative; z-index: 30;
    padding: 0 clamp(28px,5vw,64px) 40px; }
  .pf-pivot { left: 78%; top: 64%; }
  .welcome-hero { padding-top: 24px; }
}

/* ============================================================
   App shell — top bar, page layout, loading
   ============================================================ */
.app-page {
  min-height: 100vh;
  background:
    radial-gradient(42% 34% at 92% 1%, var(--accent-glow) 0%, rgba(255,203,80,0) 70%),
    transparent;
}
.gold { color: var(--gold); }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-bottom: 1px solid rgba(230,225,213,0.55);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 11px clamp(20px, 5vw, 56px);
}
.logo-sm { font-size: 16px; cursor: pointer; }
.topbar-left { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.topbar-sep { color: var(--muted); }
.topbar-muted-link { font-size: 13px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.topbar-muted-link:hover { color: var(--ink); }

.topbar-tabs { display: flex; gap: 22px; background: transparent; padding: 0; }
.ttab {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  border: none; background: transparent; padding: 9px 2px 7px; cursor: pointer; white-space: nowrap;
  border-bottom: 2.5px solid transparent; border-radius: 0;
  transition: color .18s ease, border-color .18s ease;
}
.ttab:hover { color: var(--ink); }
.ttab.on { background: transparent; color: var(--ink); border-bottom-color: var(--gold-paper); box-shadow: none; }

.topbar-right { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: flex-end; }
.topbar-mode { font-size: 12.8px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.toggle {
  width: 38px; height: 22px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--line-2); position: relative; transition: background .2s ease; padding: 0; flex: none;
}
.toggle.on { background: var(--green); }
.toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { transform: translateX(16px); }

/* Loading */
.loading { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.loading-mark { width: 46px; height: 46px; display: grid; place-items: center; }
.loading-pulse { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-paper); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(0.7); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
.loading-title { font-size: 26px; margin-top: 26px; }
.loading-sub { margin-top: 12px; max-width: 380px; color: var(--ink-2); }

/* Page shell */
.page-shell { max-width: var(--maxw); margin: 0 auto; padding: clamp(36px, 6vw, 60px) clamp(20px, 5vw, 40px) 120px; }
.page-head { margin-bottom: 30px; }
.page-title { font-size: clamp(38px, 6vw, 54px); margin-top: 14px; }
.page-lede { margin-top: 18px; max-width: 620px; }
.app-target { font-weight: 600; color: var(--ink); }

/* ============================================================
   Profile form
   ============================================================ */
.parse-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  border-radius: 0; padding: 4px 0 28px; margin-bottom: 0;
}
.parse-copy { color: var(--ink-2); }
.parse-btn { padding: 10px 18px; font-size: 14px; }

.parse-block {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
  background: var(--panel-bg); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 34px 28px; margin-bottom: 8px;
  transition: border-color .15s ease, background .15s ease;
}
.parse-block:hover { border-color: var(--gold-soft); }
.parse-ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  color: #4a3908; background: linear-gradient(180deg, var(--gold-btn-1), var(--gold-btn-2));
  box-shadow: 0 6px 16px rgba(255,193,30,0.28); margin-bottom: 4px;
}
.parse-block-title { font-size: 20px; }
.parse-block-sub { color: var(--ink-2); max-width: 420px; }
.parse-block-btn { margin-top: 14px; padding: 12px 26px; font-size: 15px; }

.fsec { padding: 26px 0 0; }
.fsec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; }
.fsec-titlewrap { flex: 1; min-width: 0; }
.fsec-title { font-size: 21px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.fsec-hint { margin-top: 6px; }
.chev { color: var(--muted); transition: transform .2s ease; flex: none; }
.chev.open { transform: rotate(180deg); }
/* Apple-style grouped card: light, translucent, clearly separated */
.fsec-body {
  margin-top: 18px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(60,50,25,0.04), 0 10px 30px rgba(60,50,25,0.05);
  transition: background .5s ease, border-color .5s ease;
}
.add-btn {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--gold); background: transparent; border: 1px solid var(--gold-soft);
  border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.add-btn:hover { background: rgba(255,203,61,0.14); border-color: var(--gold-paper); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field { margin-bottom: 0; }
.fsec-body .field + .field { margin-top: 16px; }
/* inside a 2-col grid the fields are side-by-side — grid `gap` handles spacing,
   so cancel the stacked-field margin that would otherwise drop every 2nd cell */
.fsec-body .grid-2 > .field + .field { margin-top: 0; }
.entry { position: relative; padding: 6px 0 20px; border: 0; border-radius: 0; background: transparent; margin-bottom: 0; }
.entry + .entry { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 2px; }
.entry .grid-2 + .field { margin-top: 16px; }
.entry-x {
  position: absolute; top: -4px; right: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(255,255,255,0.55); color: var(--ink-2); cursor: pointer;
  font-size: 14px; line-height: 1; display: grid; place-items: center; z-index: 2;
}
.entry + .entry .entry-x { top: 16px; }
.entry-x:hover { border-color: var(--ink); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500;
  color: var(--ink); background: rgba(255,254,249,0.55); border: 1px solid rgba(222,216,203,0.85);
  border-radius: var(--r-pill); padding: 7px 8px 7px 14px;
}
.chip-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--ink); }
.chip-add .input { max-width: 320px; }

.form-cta { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.form-cta-btn { padding: 15px 44px; font-size: 16px; }
.form-cta-note { text-align: center; }

/* ============================================================
   Match results
   ============================================================ */
.results-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.results-h { font-size: 24px; white-space: nowrap; }
.match-stack { display: flex; flex-direction: column; gap: 22px; }
.match-empty {
  text-align: center; padding: 36px 24px;
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: var(--r-lg); color: var(--ink-2);
}
.live-notice {
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-left: 3px solid var(--gold-paper, #FFCB3D);
  border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 18px;
}
.live-notice-title { font-size: 15px; color: var(--ink); margin: 0; }
.live-notice-sub { font-size: 13px; color: var(--ink-2); margin: 4px 0 0; }
.match {
  position: relative;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border); border-radius: var(--r-lg);
  padding: 28px clamp(22px, 4vw, 34px); box-shadow: 0 12px 40px rgba(107,87,31,0.07);
  transition: background .5s ease, border-color .5s ease;
}
.match-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.match-role { font-size: 24px; line-height: 1.15; }
.match-org { margin-top: 7px; color: var(--ink-2); }
.match-tag { margin-top: 12px; }
.match-score { text-align: right; min-width: 92px; }
.match-score-num { font-family: var(--serif); font-weight: 700; font-size: 52px; line-height: 0.9; }
.match-score-of { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.match-bar { width: 80px; height: 3px; border-radius: 2px; background: var(--line-2); margin: 9px 0 0 auto; overflow: hidden; }
.match-bar span { display: block; height: 100%; border-radius: 2px; }
.tone-green .match-score-num { color: var(--green); }
.tone-green .match-bar span { background: var(--green); }
.tone-gold .match-score-num { color: var(--gold); }
.tone-gold .match-bar span { background: var(--gold); }
.tone-neutral .match-score-num { color: var(--ink-2); }
.tone-neutral .match-bar span { background: var(--ink-2); }

.match-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 24px 0 4px; }
.mcol-label { font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; margin: 0 0 12px; }
.mcol-label.tone-green { color: var(--green); }
.mcol-label.tone-gold { color: var(--gold); }
.mcol-label.tone-ink { color: var(--ink-2); }
.mlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mlist li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.mlist li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; }
.mlist-green li::before { background: var(--green); }
.mlist-gold li::before { background: var(--gold); }
.mlist-ink li::before { background: var(--muted); }

.match-foot { padding-top: 22px; }
.match-cta { font-size: 14.5px; padding: 12px 22px; }

/* ============================================================
   Generated application
   ============================================================ */
.back-row { margin-bottom: 22px; }
.back-link { font-weight: 600; font-size: 14px; }
.doc { background: var(--panel-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--panel-border); border-radius: var(--r-lg); padding: 28px clamp(22px,4vw,36px); box-shadow: 0 12px 40px rgba(107,87,31,0.07); margin-bottom: 22px; }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.doc-title { font-size: 22px; white-space: nowrap; }
.doc-dl { font-size: 14px; padding: 11px 20px; }
.doc-body { font-size: 15px; color: var(--ink); line-height: 1.6; }
.resume-name { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); }
.resume-contact { font-size: 14px; color: var(--ink-2); margin: 6px 0 18px; }
.resume-sec { font-family: var(--serif); font-weight: 700; font-size: 15.5px; color: var(--ink); margin: 18px 0 7px; }
.resume-line { margin: 0; color: var(--ink-3); }
.resume-list { margin: 0; padding-left: 20px; color: var(--ink-3); display: flex; flex-direction: column; gap: 8px; }
.letter p { margin: 0 0 14px; color: var(--ink-3); }
.strengthen { background: rgba(246,243,236,0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(230,225,213,0.8); border-radius: var(--r-md); padding: 20px 24px; margin-bottom: 24px; }
.app-actions { display: flex; gap: 12px; justify-content: flex-end; }
.app-regen { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.doc-tools { display: flex; align-items: center; gap: 14px; flex: none; }
.doc-toggle { font-size: 13px; font-weight: 600; white-space: nowrap; }
.doc-edit { width: 100%; min-height: 420px; line-height: 1.7; font-size: 14.5px; font-family: var(--sans); }
.doc-edit-letter { min-height: 280px; }
.save-note { text-align: right; margin: 0 0 12px; }

/* ============================================================
   Auth
   ============================================================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { position: relative; overflow: hidden; background: radial-gradient(120% 100% at 20% 30%, #F6F2E7 0%, #ECE7DA 100%); padding: 40px clamp(32px,4vw,56px); display: flex; flex-direction: column; }
.auth-aside-top { position: relative; z-index: 5; }
.auth-aside-body { position: relative; z-index: 5; margin-top: auto; margin-bottom: 8vh; max-width: 360px; }
.auth-aside-title { font-size: clamp(38px, 4vw, 50px); }
.auth-aside-sub { margin-top: 18px; color: var(--ink-2); }
.auth-aside-fan { position: absolute; inset: 0; opacity: 0.92; }
.auth-aside-fan .pf-pivot { left: 56%; top: 40%; }
.auth-aside-fan .pf-card { width: auto; height: auto; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px,5vw,56px);
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 70%),
    var(--canvas);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-title { font-size: 30px; margin-top: 12px; }
.auth-lede { margin-top: 14px; }
.seg { display: flex; gap: 4px; background: rgba(232,228,217,0.55); border-radius: var(--r-pill); padding: 4px; margin: 26px 0 22px; }
.seg-btn { flex: 1; border: none; background: transparent; font-family: var(--sans); font-weight: 600; font-size: 14.5px; color: var(--ink-2); padding: 10px; border-radius: var(--r-pill); cursor: pointer; transition: all .18s ease; }
.seg-btn.on { background: rgba(255,254,249,0.9); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form .field + .field { margin-top: 16px; }
.auth-submit { width: 100%; margin-top: 20px; padding: 14px; }
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-guest { width: 100%; text-align: center; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { min-height: 230px; padding: 28px; }
  .auth-aside-body { margin-bottom: 0; margin-top: 16px; }
  .auth-aside-title { font-size: 30px; }
  .auth-aside-sub { display: none; }
  .auth-aside-fan .pf-pivot { left: 86%; top: 60%; }
}
@media (max-width: 720px) {
  .topbar-tabs { order: 3; flex: 1 0 100%; justify-content: center; margin-top: 4px; }
  .topbar-inner { flex-wrap: wrap; }
  .match-cols { grid-template-columns: 1fr; gap: 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .match-head { flex-direction: row; }
  .results-sub { flex-direction: column; gap: 4px; }
  .app-actions { flex-direction: column-reverse; }
  .app-actions .btn { width: 100%; }
  .parse-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .topbar-mode { display: none; }
}

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d8d2c4; border-radius: 999px; border: 3px solid var(--canvas); }

/* ============================================================
   Sidebar shell (in-app layout)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.app-main { flex: 1; min-width: 0; }

.sidebar {
  width: 248px; flex: none;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 26px 18px 22px;
  background: var(--topbar-bg);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-right: 1px solid rgba(230,225,213,0.7);
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 22px; }
.sidebar-brand {
  font-family: var(--serif); font-weight: 700; font-size: 21px;
  color: var(--ink); padding: 4px 6px; cursor: pointer; letter-spacing: -0.01em;
}
.sidebar-collapse {
  width: 30px; height: 30px; border-radius: 9px; flex: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sidebar-collapse:hover { background: rgba(255,255,255,0.6); color: var(--ink); border-color: var(--line); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.navitem {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 11px 12px; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.navitem:hover { background: rgba(255,255,255,0.5); color: var(--ink); }
.navitem .nav-ic { color: var(--muted); flex: none; transition: color .15s ease; }
.navitem:hover .nav-ic { color: var(--ink-2); }
.navitem.on {
  background: var(--gold-pale); color: var(--ink);
  border-color: rgba(255,203,61,0.45);
}
.navitem.on .nav-ic { color: var(--gold); }
.navitem-label { flex: 1; }
.navitem-badge {
  font-size: 11px; font-weight: 700; color: var(--ink);
  background: var(--gold-paper); border-radius: 999px;
  min-width: 19px; height: 19px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
}

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.account-item { gap: 11px; }
.account-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  color: #4a3908; background: linear-gradient(180deg, var(--gold-btn-1), var(--gold-btn-2));
}
.account-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.account-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.topstrip {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 13px clamp(20px, 5vw, 40px); min-height: 54px;
}

/* ============================================================
   Star / favourite control
   ============================================================ */
.star-wrap {
  position: absolute; top: 16px; right: 18px; z-index: 6;
  display: flex; flex-direction: row-reverse; align-items: center; gap: 10px;
}
.star-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.6); border: 1px solid var(--line-2);
  color: var(--muted); transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;
}
.star-btn:hover { color: var(--gold); border-color: var(--gold-soft); background: rgba(255,255,255,0.9); }
.star-btn:active { transform: scale(0.9); }
.star-btn.on { color: var(--gold-paper); border-color: var(--gold-soft); background: var(--gold-pale); }
.star-toast {
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--ink-2); background: rgba(255,255,255,0.92);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px;
  box-shadow: var(--shadow-sm); animation: star-toast-in .18s ease;
}
.star-toast-on { color: var(--green-deep); border-color: rgba(63,111,74,0.25); }
@keyframes star-toast-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: translateX(0); } }
/* give the score room so it never collides with the corner star */
.live-card .match-score { margin-top: 30px; }

/* ============================================================
   Home dashboard
   ============================================================ */
.home-hello { font-size: clamp(34px, 5vw, 48px); margin-top: 14px; }
.home-sec { margin-top: 40px; }
.home-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.home-sec-title { font-size: 22px; }
.home-sec-link { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.home-empty {
  background: var(--panel-bg); border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 26px 28px; color: var(--ink-2);
}
.link-inline { background: none; border: none; padding: 0; cursor: pointer; color: var(--green); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.ccard-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ccard {
  position: relative; cursor: pointer;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--r-md);
  padding: 18px 18px 16px; box-shadow: 0 6px 22px rgba(107,87,31,0.05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.ccard:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(107,87,31,0.09); border-color: var(--line-2); }
.ccard .star-wrap { top: 12px; right: 12px; }
.ccard .star-btn { width: 32px; height: 32px; }
.ccard .star-btn svg { width: 18px; height: 18px; }
.ccard-badge { align-self: flex-start; max-width: calc(100% - 40px); }
.ccard-role { font-size: 16px; line-height: 1.25; margin-top: 2px; }
.ccard-org { font-size: 13px; color: var(--ink-2); margin-top: -2px; }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.ccard-score { font-family: var(--serif); font-weight: 700; font-size: 22px; }
.ccard-score.tone-green { color: var(--green); }
.ccard-score.tone-gold { color: var(--gold); }
.ccard-score.tone-neutral { color: var(--ink-2); }
.ccard-score-of { font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.ccard-type { font-size: 9.5px; }

.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qaction {
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--r-md);
  padding: 18px 20px; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.qaction:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(107,87,31,0.09); }
.qaction-ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); color: var(--ink-2);
}
.qaction-gold { border-color: rgba(255,203,61,0.5); background: var(--gold-pale); }
.qaction-gold .qaction-ic { background: linear-gradient(180deg, var(--gold-btn-1), var(--gold-btn-2)); border-color: transparent; color: #4a3908; }
.qaction-meta { display: flex; flex-direction: column; gap: 3px; }
.qaction-title { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.qaction-sub { font-size: 12.5px; color: var(--ink-2); }

/* Favourites empty state */
.fav-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 28px; }
.fav-empty-star { color: var(--gold-soft); }
.fav-empty .body { max-width: 360px; }

/* Collapsed sidebar (user toggle) */
.app-shell.nav-collapsed .sidebar { width: 74px; padding: 22px 12px; }
.app-shell.nav-collapsed .sidebar-top { flex-direction: column; gap: 12px; padding: 0 0 16px; }
.app-shell.nav-collapsed .sidebar-brand { font-size: 0; padding: 0; }
.app-shell.nav-collapsed .sidebar-brand::before { content: "O"; font-size: 22px; }
.app-shell.nav-collapsed .navitem { justify-content: center; padding: 12px 0; position: relative; }
.app-shell.nav-collapsed .navitem-label,
.app-shell.nav-collapsed .account-meta { display: none; }
.app-shell.nav-collapsed .navitem-badge { position: absolute; top: 4px; right: 11px; min-width: 17px; height: 17px; font-size: 10px; }
.app-shell.nav-collapsed .account-item { justify-content: center; }

@media (max-width: 900px) {
  .sidebar { width: 74px; padding: 22px 12px; }
  .sidebar-top { flex-direction: column; gap: 12px; padding: 0 0 16px; }
  .sidebar-brand { font-size: 0; padding: 0; }
  .sidebar-brand::before { content: "O"; font-size: 22px; }
  .sidebar-collapse { display: none; }
  .navitem { justify-content: center; padding: 12px 0; position: relative; }
  .navitem-label, .account-meta { display: none; }
  .navitem-badge { position: absolute; top: 4px; right: 11px; }
  .account-item { justify-content: center; }
  .ccard-row { grid-template-columns: 1fr; }
  .home-actions { grid-template-columns: 1fr; }
  .mres-row { flex-wrap: wrap; }
  .mres-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
}
@media (max-width: 720px) {
  .live-card .match-score { margin-top: 26px; }
}

/* ============================================================
   My resumes
   ============================================================ */
.mres-list { display: flex; flex-direction: column; gap: 14px; }
.mres-row {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--r-lg);
  padding: 20px 22px; box-shadow: 0 8px 26px rgba(107,87,31,0.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mres-row:hover { box-shadow: 0 12px 32px rgba(107,87,31,0.09); }
.mres-row-click { cursor: pointer; }
.mres-row-click:hover { border-color: rgba(255,203,61,0.55); }
.mres-row-primary { border-color: rgba(255,203,61,0.5); }
.mres-glyph {
  width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); color: var(--ink-2);
}
.mres-info { flex: 1; min-width: 0; }
.mres-namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mres-name { font-size: 17px; line-height: 1.2; }
.mres-pill {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #4a3908; background: var(--gold-paper); border-radius: 999px; padding: 3px 9px;
}
.mres-meta { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.mres-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mres-actions { display: flex; align-items: center; gap: 16px; flex: none; padding-top: 4px; }
.mres-action { font-size: 13px; font-weight: 600; white-space: nowrap; }
.mres-del { color: #b4543a; }
.mres-del:hover { color: #8f3f29; }
.mres-check {
  width: 22px; height: 22px; flex: none; margin-top: 1px;
  border-radius: 6px; border: 1.5px solid rgba(214,207,191,0.95);
  background: rgba(255,255,255,0.7); display: grid; place-items: center;
  color: #4a3908; transition: background .15s ease, border-color .15s ease;
}
.mres-check.on { background: var(--gold-paper, #FFCB3D); border-color: var(--gold-paper, #FFCB3D); }
.mres-using-note { margin: 0 0 16px; }

/* ============================================================
   History
   ============================================================ */
.hist-list { display: flex; flex-direction: column; gap: 14px; }
.hist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--r-lg);
  padding: 22px 24px; box-shadow: 0 8px 26px rgba(107,87,31,0.05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.hist-row:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(107,87,31,0.09); border-color: var(--line-2); }
.hist-main { min-width: 0; }
.hist-toprow { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hist-date { font-size: 12px; color: var(--muted); font-weight: 500; }
.hist-role { font-size: 19px; line-height: 1.2; }
.hist-org { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.hist-kind { font-size: 12px; color: var(--gold); font-weight: 600; margin-top: 8px; letter-spacing: 0.02em; }
.hist-open { font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; }

/* ============================================================
   Account settings
   ============================================================ */
.acct-sec { margin-top: 30px; }
.acct-title { font-size: 20px; margin-bottom: 14px; }
.acct-card {
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--r-lg);
  padding: 24px clamp(20px, 3vw, 28px); box-shadow: 0 8px 26px rgba(107,87,31,0.05);
}
.acct-row-actions { margin-top: 20px; display: flex; justify-content: flex-end; }
.acct-pref { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; }
.acct-pref + .acct-pref { border-top: 1px solid var(--line); }
.acct-pref-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acct-pref-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.acct-pref-sub { font-size: 12.5px; color: var(--ink-2); }
.acct-danger { border-color: rgba(180,84,58,0.3); }
.acct-logout { color: #b4543a; border-color: rgba(180,84,58,0.4); }
.acct-logout:hover { background: rgba(180,84,58,0.08); border-color: rgba(180,84,58,0.6); }

/* ============================================================
   Welcome — résumé-as-editorial-object (Concept B)
   ============================================================ */
.lb {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lb::before {
  content: "";
  position: absolute;
  right: -8%; top: 8%;
  width: 60%; height: 90%;
  background: radial-gradient(closest-side, var(--accent-glow) 0%, rgba(255,203,80,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.lb-nav {
  position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px clamp(28px, 5vw, 72px);
}
.lb-navlinks { display: flex; gap: clamp(20px, 3vw, 40px); align-items: center; }

.lb-main {
  position: relative; z-index: 10;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 0 clamp(28px, 5vw, 72px) 4vh;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.lb-copy { max-width: 560px; }
.lb-eyebrow { margin-bottom: 22px; }
.lb-title {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1.08;
  font-size: clamp(38px, 3.9vw, 52px);
  margin: 0;
  text-wrap: balance;
}
.lb-title em { font-style: italic; color: var(--green); }
.lb-sub {
  margin-top: 26px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 400px;
  text-wrap: pretty;
}
.lb-actions { margin-top: 38px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lb-cta { padding: 15px 30px; font-size: 16px; }
.lb-ghostlink {
  font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s ease;
}
.lb-ghostlink:hover { color: var(--green); }
.lb-ghostlink .a { transition: transform .2s ease; }
.lb-ghostlink:hover .a { transform: translateX(3px); }

.lb-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 560px;
}
.rz-behind {
  position: absolute;
  width: 360px; height: 470px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transform: rotate(6deg) translate(38px, 22px);
  box-shadow: 0 18px 50px rgba(60,50,25,0.10);
  opacity: 0.8;
}
.rzcard {
  position: relative;
  width: clamp(340px, 30vw, 388px);
  background: #FFFFFF;
  border: 1px solid #ECE7DA;
  border-radius: 8px;
  padding: 34px 36px 38px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 30px 70px rgba(60,50,25,0.16),
    0 8px 20px rgba(60,50,25,0.07);
  opacity: 1;
  transform: rotate(-1.6deg);
  z-index: 2;
}
.rz-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; padding-bottom: 16px; border-bottom: 1.5px solid var(--ink);
}
.rz-name { font-family: var(--serif); font-weight: 700; font-size: 23px; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.rz-role { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 6px 0 0; }
.rz-contact { font-size: 9px; line-height: 1.55; color: var(--muted); text-align: right; }
.rz-sec { margin-top: 18px; }
.rz-h {
  font-family: var(--sans); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.rz-item + .rz-item { margin-top: 16px; }
.rz-item-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rz-item-h strong { font-size: 12.5px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.rz-item-h span { font-size: 9.5px; color: var(--muted); white-space: nowrap; flex: none; }
.rz-org { font-size: 10.5px; color: var(--green); margin: 3px 0 9px; font-weight: 500; }
.rz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rz-list li { position: relative; padding-left: 13px; font-size: 10.5px; line-height: 1.5; color: var(--ink-3); }
.rz-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-soft); }
.rz-hl { color: var(--ink) !important; font-weight: 500; }
.rz-hl mark { background: linear-gradient(transparent 58%, var(--gold-pale) 58%); color: inherit; padding: 0 1px; }
.rz-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rz-chips span {
  font-size: 9px; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 8px;
}
.rz-anno { position: absolute; z-index: 4; display: flex; align-items: center; gap: 9px; opacity: 1; }
.rz-anno-label { font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; white-space: nowrap; }
.rz-anno-kicker { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 3px; }
.rz-anno-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.rz-anno-line { height: 1px; flex: none; }
.rz-anno-match {
  top: -3%; right: -11%;
  flex-direction: column; align-items: flex-end;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(63,111,74,0.2);
  border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(60,50,25,0.10);
}
.rz-match-num { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 0.9; color: var(--green); }
.rz-match-cap { font-size: 10px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }
.rz-match-cap b { color: var(--ink); }
.rz-anno-rewrite { top: 49%; left: -30%; }
.rz-anno-rewrite .rz-anno-kicker { color: var(--gold); }
.rz-anno-rewrite .rz-anno-label { color: var(--ink); }
.rz-anno-rewrite .rz-anno-dot { background: var(--gold-paper); }
.rz-anno-rewrite .rz-anno-line { width: 34px; background: var(--gold-soft); }
.rz-anno-skills { bottom: 7%; left: -22%; }
.rz-anno-skills .rz-anno-kicker { color: var(--green); }
.rz-anno-skills .rz-anno-label { color: var(--ink-2); }
.rz-anno-skills .rz-anno-dot { background: var(--green); }
.rz-anno-skills .rz-anno-line { width: 28px; background: rgba(63,111,74,0.4); }

@media (max-width: 1080px) {
  .lb-main { grid-template-columns: 1fr; gap: 40px; padding-top: 12px; }
  .lb-copy { max-width: 560px; }
  .lb-stage { min-height: 520px; }
  .rz-anno-match { right: 2%; }
  .rz-anno-rewrite { left: -8%; }
  .rz-anno-skills { left: -4%; bottom: 3%; }
}
@media (max-width: 720px) {
  .lb-navlinks { display: none; }
  .lb-stage { min-height: 480px; transform: scale(0.9); }
  .rz-anno-rewrite, .rz-anno-skills { display: none; }
  .rz-behind { transform: rotate(6deg) translate(24px, 16px); }
}

/* ============================================================
   Live opportunity search (NEW) — same editorial system
   ============================================================ */
.live-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: var(--r-lg);
  padding: 24px clamp(20px, 3vw, 30px) 26px;
  box-shadow: 0 12px 40px rgba(107,87,31,0.07);
  margin-bottom: 30px;
  display: flex; flex-direction: column; gap: 22px;
}
.live-srcrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.live-seg { margin: 0; flex: 0 1 auto; }
.live-src-note { white-space: nowrap; }
.live-filters {
  display: grid; grid-template-columns: 1fr auto; gap: 18px 22px; align-items: end;
}
.live-field { margin: 0; }
.live-opt { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.live-field-emp { min-width: 0; }
.live-seg-emp { display: flex; gap: 4px; background: rgba(232,228,217,0.55); border-radius: var(--r-pill); padding: 4px; }
.live-seg-emp .seg-btn { padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }
.live-actions { display: flex; justify-content: flex-end; }
.live-search-btn { padding: 13px 28px; font-size: 15px; }

.live-loading { text-align: center; padding: 40px 0 48px; color: var(--ink-2); }

/* live result cards build on .match */
.live-toprow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--green-deep);
  background: rgba(63,111,74,0.10);
  border: 1px solid rgba(63,111,74,0.22);
  border-radius: var(--r-pill); padding: 4px 11px 4px 9px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(63,111,74,0.5);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(63,111,74,0.45); }
  70% { box-shadow: 0 0 0 6px rgba(63,111,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,111,74,0); }
}
.live-demo-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-pale);
  border-radius: var(--r-pill); padding: 3px 9px;
}
.live-meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.live-deadline { font-size: 12px; color: var(--muted); }
.live-cols { grid-template-columns: 1fr 1fr; }
.live-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.live-view { text-decoration: none; }

@media (max-width: 720px) {
  .live-filters { grid-template-columns: 1fr; }
  .live-actions { justify-content: stretch; }
  .live-search-btn { width: 100%; }
  .live-cols { grid-template-columns: 1fr; gap: 18px; }
  .live-seg-emp { flex-wrap: wrap; }
}

/* ── App-level "Saved" toast, used by app.jsx showToast() ────────────── */
.app-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-paper, #FFCB3D);
  color: #2a1f00;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  box-shadow: 0 14px 38px rgba(40, 28, 0, 0.18), 0 2px 6px rgba(40, 28, 0, 0.08);
  z-index: 80;
  animation: app-toast-in 0.2s ease-out;
  pointer-events: none;
}
@keyframes app-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── Persistent "unsaved changes" toast on the application page ───────── */
.draft-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #F6F4EC;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  box-shadow: 0 14px 38px rgba(33, 27, 14, 0.26), 0 2px 6px rgba(33, 27, 14, 0.12);
  z-index: 80;
  animation: app-toast-in 0.2s ease-out;
}
.draft-toast-dot {
  width: 7px; height: 7px; border-radius: 999px; flex: none;
  background: var(--gold-paper, #FFCB3D);
  box-shadow: 0 0 0 3px rgba(255, 203, 61, 0.22);
}

/* ── Autosave status under the profile-form header ───────────────────── */
.autosave-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background .2s, color .2s;
}
.autosave-status.autosave-saved {
  background: rgba(60, 130, 60, 0.08);
  color: #3d6f3d;
}
.autosave-status.autosave-saving {
  background: rgba(155, 134, 70, 0.10);
  color: #8a6f1a;
}
.autosave-status.autosave-err {
  background: rgba(184, 86, 40, 0.10);
  color: #b14a2a;
}
.autosave-tick { display: inline-block; vertical-align: middle; }

/* ── Generic modal popup used by form.jsx for the "empty info" alert ──── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 27, 14, 0.42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 24px;
  animation: modal-overlay-in 0.18s ease-out;
}
.modal-card {
  background: var(--panel-bg, #FBFAF6);
  border: 1px solid var(--panel-border, #E6E0D2);
  border-radius: 16px;
  padding: 30px 32px 26px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(40, 28, 0, 0.22), 0 4px 12px rgba(40, 28, 0, 0.10);
  text-align: left;
  animation: modal-card-in 0.22s ease-out;
}
.modal-title {
  font-size: 1.35rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.modal-body {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted, #6d685e);
  margin: 0 0 22px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
