/* =============================================================================
   ResumeFormat — design system
   Plain CSS on top of Tailwind utilities. No build step, no preprocessor.

   1  Tokens          6  Forms           11  Testimonials
   2  Base             7  Site header     12  FAQ
   3  Layout           8  Hero            13  Ad slots
   4  Buttons          9  Feature cards   14  Toasts
   5  Cards & badges  10  Templates/pricing 15 Footer
                                           16 Motion
                                           17 Dark-mode specifics
                                           18 Print
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — indigo */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand:     var(--brand-600);

  /* Accent — cyan */
  --accent-400: #22d3ee;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;

  /* Status */
  --success-50: #ecfdf5; --success-100: #d1fae5; --success-500: #10b981; --success-600: #059669; --success-700: #047857;
  --warning-50: #fffbeb; --warning-100: #fef3c7; --warning-500: #f59e0b; --warning-600: #d97706; --warning-700: #b45309;
  --danger-50:  #fef2f2; --danger-100:  #fee2e2; --danger-500:  #ef4444; --danger-600:  #dc2626; --danger-700:  #b91c1c;

  /* Neutrals — slate */
  --n-50:  #f8fafc;
  --n-100: #f1f5f9;
  --n-200: #e2e8f0;
  --n-300: #cbd5e1;
  --n-400: #94a3b8;
  --n-500: #64748b;
  --n-600: #475569;
  --n-700: #334155;
  --n-800: #1e293b;
  --n-900: #0f172a;
  --n-950: #020617;

  /* Semantic surfaces (light) */
  --page:        #ffffff;
  --surface:     var(--n-50);
  --surface-2:   var(--n-100);
  --elevated:    #ffffff;
  --border:      var(--n-200);
  --border-soft: #eef2f7;
  --ink:         var(--n-900);
  --ink-2:       var(--n-600);
  --ink-3:       var(--n-500);
  --ring:        rgba(79, 70, 229, 0.16);
  --overlap:     rgba(15, 23, 42, 0.55);

  /* Shape — deliberately small radii throughout. Nothing is a bubble. */
  --r-xs:   3px;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-xl:   10px;
  --r-full: 999px;

  /* Elevation — resting surfaces are flat; elevation is earned on hover */
  --shadow-xs:     0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:     0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:     0 6px 18px -6px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg:     0 16px 40px -14px rgba(15, 23, 42, 0.2), 0 4px 10px rgba(15, 23, 42, 0.05);
  --shadow-overlay: 0 28px 56px -16px rgba(15, 23, 42, 0.28);

  /* Typography */
  --font-head: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Valley Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Rhythm */
  --container: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* Expo-style ease-out: motion arrives fast and settles, rather than drifting. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* -----------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
/* Own reset.
   Tailwind's Preflight is switched OFF (corePlugins.preflight in header.php)
   because the Play CDN injects it at runtime — after this file — and it sets
   `h1-h6 { font-size: inherit; font-weight: inherit }`, `a { color: inherit }`
   and `svg { display: block }` with the same specificity as the rules below,
   so it silently flattened the type hierarchy and broke icon alignment.
   Everything Preflight used to provide is provided here instead. */
*, *::before, *::after { box-sizing: border-box; }

figure, figcaption, blockquote, dl, dd, pre, fieldset, legend, address { margin: 0; }
ol, ul, menu { margin: 0; padding: 0; list-style: none; }
hr { height: 0; border: 0; border-top: 1px solid var(--border); color: inherit; }
code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
table { border-collapse: collapse; border-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: transparent; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* Content lists (privacy, terms, refunds) opt back into markers. */
.list-disc { list-style: disc; padding-left: 22px; }
.list-disc li { margin-bottom: 8px; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One weight for every heading on every page. Hierarchy comes from size and
   colour, not from pounding the type heavier. */
h1, h2, h3, h4, h5 {
  margin: 0 0 0.45em;
  font-family: var(--font-head);
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.95rem); }
h3 { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); }
h4 { font-size: 1rem; }
p  { margin: 0 0 0.85rem; }

a { color: var(--brand-600); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--brand-700); }

img, svg { max-width: 100%; }
img { height: auto; }

::selection { background: var(--brand-100); color: var(--brand-800); }

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--brand-600);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Lucide icons inherit text metrics. flex:none stops them being squashed in
   flex rows, and the fixed box keeps them optically centred on the text. */
.icon {
  display: inline-block;
  width: 1.125em;
  height: 1.125em;
  flex: none;
  vertical-align: -0.125em;
  stroke-width: 2;
}
.icon-sm { width: 0.875em; height: 0.875em; }
.icon-lg { width: 1.5em; height: 1.5em; }

/* Inside a flex row an icon is a flex item: alignment comes from the container. */
.btn .icon, .badge .icon, .chip .icon, .nav-link .icon,
.tile .icon, .logo .icon, .trust-row .icon, .plan-features .icon,
.quote-card .icon, .issue-row .icon, .stat .icon, .ad-creative .icon { vertical-align: middle; }

/* -----------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

.section { padding-block: 40px; }
.section--tight { padding-block: 28px; }
.section--alt { background: var(--surface); }
/* One step tinted from the page, for bands that alternate light blue and white.
   --brand-50 is white-ish indigo in light mode and a muted dark indigo in dark
   mode, so the alternation survives the theme switch. */
.section--tint { background: var(--brand-50); }
@media (min-width: 768px) { .section { padding-block: 56px; } .section--tight { padding-block: 36px; } }
@media (min-width: 1024px) { .section { padding-block: 72px; } }

.section-head { max-width: 660px; margin-bottom: 28px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head--center .kicker::after { display: none; }

/* Fonts for labels and numerals, set once here rather than per component. */
.logo, .badge, .stat__value, .plan-price__amount,
.score-ring__text, .float-card__value { font-family: var(--font-head); }

/* Layout primitives. Tailwind utilities are used on top of these for polish,
   but nothing structural depends on the CDN: if it fails to load, every page
   still lays out exactly as intended. */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; }
.grid--tight { gap: 12px; }
.grid--loose { gap: 30px; }
.grid--top { align-items: start; }

@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Row of chips / buttons that wraps on small screens */
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-center { justify-content: center; }
.row-wrap--lg { gap: 12px; }
.row-stretch { align-items: stretch; }
.row-between { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }

/* -----------------------------------------------------------------------------
   3b. Editorial layout language
   Where the content is really a list or a set of related facts, these divide it
   with rules instead of wrapping each item in a box. Used instead of card grids
   on every marketing surface.
   -------------------------------------------------------------------------- */

/* Divided matrix — cells share 1px rules, so it reads as one object. */
.matrix {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.matrix > * { background: var(--page); padding: 20px 18px; text-align: left; }
/* For cells holding a single short fact rather than a paragraph. */
.matrix--flush > * { padding: 12px 14px; }

@media (min-width: 640px) {
  .matrix--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .matrix--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .matrix--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.matrix__cell--brand { background: var(--brand-50) !important; }
/* Rule-separated rows: label on the left, explanation on the right.
   Reads like documentation rather than a wall of cards. */
.rules { border-top: 1px solid var(--border); }
.rule-row {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s var(--ease);
}
@media (min-width: 900px) {
  .rule-row { grid-template-columns: 300px 1fr; gap: 8px 40px; align-items: start; padding: 20px 0; }
}
.rule-row:hover { background: var(--surface); }
.rule-row__head { display: flex; align-items: center; gap: 12px; }
.rule-row__title { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.022em; margin: 0; }
.rule-row__body { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }

/* ---- Trust ----------------------------------------------------------------
   A sticky statement beside four numbered evidence rows. Hairlines rather than
   boxes: the features section already does cards, so this has to read as one
   argument you scroll past, not as another grid of things. */
.trust { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .trust { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
  .trust__aside { position: sticky; top: calc(var(--nav-h) + 28px); }
}

.trust__aside .kicker { margin-bottom: 14px; }
.trust__aside h2 { margin: 0; }
.trust__aside .lead { margin: 14px 0 0; }

.trust__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 24px 0 0; }
.trust__badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.trust__badge .icon { flex: none; color: var(--brand-600); }

.trust__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.trust__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.trust__index {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--brand-600);
}
/* A grid track will not shrink below its content without this. */
.trust__body { min-width: 0; }
.trust__title { margin: 0; font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.022em; }
.trust__copy { margin: 8px 0 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.65; }
@media (min-width: 768px) { .trust__item { padding: 30px 0; } }

/* Asymmetric bento removed: the matrix and rules primitives cover the same
   ground, so this never earned its place. */

/* Stat strip — numbers divided by rules, no container at all. */
.stat-strip { display: grid; grid-template-columns: 1fr; border-block: 1px solid var(--border); }
.stat-strip > * { padding: 14px 0; }
.stat-strip > * + * { border-top: 1px solid var(--border); }
.stat-strip__value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.stat-strip__label {
  display: block;
  margin-top: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@media (min-width: 768px) {
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-strip > * { padding: 18px 20px; text-align: left; }
  .stat-strip > * + * { border-top: 0; border-left: 1px solid var(--border); }
  .stat-strip > *:first-child { padding-left: 0; }
  .stat-strip > *:last-child { padding-right: 0; }
}

/* -----------------------------------------------------------------------------
   Process steps — three stages hanging off one continuous rule. Deliberately NOT
   the `.rules` table: this one is read straight across, left to right.
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  padding: 26px 0 30px;
  border-top: 1px solid var(--border);
}
.step__index {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brand-600);
}
.step__title { margin: 16px 0 0; font-size: 1.0625rem; }
.step__body { margin: 8px 0 0; color: var(--ink-2); font-size: 0.9375rem; }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Right padding makes the gutter between stages without breaking the rule
     above, which spans the whole border box. */
  .step { padding: 30px 34px 0 0; }
  .step:last-child { padding-right: 0; }
}

/* Callout with a left accent rule instead of a full border. */
.rail-note { border-left: 2px solid var(--brand-600); padding: 2px 0 2px 14px; }
.rail-note--amber { border-left-color: var(--warning-500); }
.rail-note--danger { border-left-color: var(--danger-500); }
.rail-note p { margin: 0; }

/* Magazine kicker: label plus a rule that runs to the edge. */
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.lead { font-size: 1.0625rem; color: var(--ink-2); }
@media (min-width: 768px) { .lead { font-size: 1.1875rem; } }

/* -----------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  /* Buttons use the same radius as every other control, not a pill. */
  border-radius: var(--r-sm);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
              transform 0.12s var(--ease);
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn.is-loading { opacity: 0.62; pointer-events: none; }

.btn-primary { --btn-bg: var(--brand-600); --btn-fg: #fff; }
.btn-primary:hover { --btn-bg: var(--brand-700); box-shadow: var(--shadow-md); }

.btn-secondary {
  --btn-bg: var(--elevated);
  --btn-fg: var(--n-700);
  --btn-border: var(--border);
}
.btn-secondary:hover { --btn-bg: var(--surface); --btn-fg: var(--n-900); box-shadow: var(--shadow-sm); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--n-600);
  box-shadow: none;
}
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-fg: var(--n-900); }

.btn-danger { --btn-bg: var(--danger-500); --btn-fg: #fff; }
.btn-danger:hover { --btn-bg: var(--danger-600); }

.btn-success { --btn-bg: var(--success-500); --btn-fg: #fff; }
.btn-success:hover { --btn-bg: var(--success-600); }

.btn-white { --btn-bg: #fff; --btn-fg: var(--brand-700); }
.btn-white:hover { --btn-bg: var(--brand-50); box-shadow: var(--shadow-md); }

.btn-outline-light {
  --btn-bg: transparent; --btn-fg: #fff; --btn-border: rgba(255,255,255,0.45);
  box-shadow: none;
}
.btn-outline-light:hover { --btn-bg: rgba(255,255,255,0.12); box-shadow: none; }

.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-icon { padding: 9px; width: 38px; height: 38px; }
.btn-block { width: 100%; }

/* Loading spinner used by JS on async buttons */
.btn.is-loading::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: rf-spin 0.6s linear infinite;
}
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* -----------------------------------------------------------------------------
   5. Cards, pills, badges, tiles
   -------------------------------------------------------------------------- */
.card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card-pad { padding: 18px; }
@media (min-width: 768px) { .card-pad { padding: 22px; } }

.card-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--brand-200);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.6;
}
.badge--success { background: var(--success-50); color: var(--success-700); }
.badge--warning { background: var(--warning-50); color: var(--warning-700); }
.badge--danger  { background: var(--danger-50); color: var(--danger-700); }
.badge--info    { background: #ecfeff; color: var(--accent-600); }

/* Weight of a scored criterion, e.g. "10 points". Plain text on purpose — the
   number matters, a chip around it did not. */
.points-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-600);
}

/* Icon square — the one repeated shape across the whole product */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.25rem;
  flex: none;
}
.tile-sm { width: 32px; height: 32px; font-size: 1rem; }
.tile-lg { width: 46px; height: 46px; font-size: 1.375rem; }
.tile-cyan    { background: #ecfeff; color: var(--accent-600); }
.tile-emerald { background: var(--success-50); color: var(--success-600); }
.tile-amber   { background: var(--warning-50); color: var(--warning-600); }
.tile-rose    { background: var(--danger-50);  color: var(--danger-600); }
.tile-violet  { background: #f5f3ff; color: #7c3aed; }
.tile-slate   { background: var(--surface-2); color: var(--n-600); }

/* Avatar circle with initials */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  flex: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 0.8125rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar-indigo  { background: var(--brand-50);   color: var(--brand-700); }
.avatar-cyan    { background: #ecfeff;           color: var(--accent-600); }
.avatar-emerald { background: var(--success-50); color: var(--success-700); }
.avatar-amber   { background: var(--warning-50); color: var(--warning-700); }
.avatar-rose    { background: var(--danger-50);  color: var(--danger-700); }
.avatar-violet  { background: #f5f3ff;           color: #6d28d9; }
.avatar-sky     { background: #f0f9ff;           color: #0369a1; }
.avatar-teal    { background: #f0fdfa;           color: #0f766e; }

/* -----------------------------------------------------------------------------
   6. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 20px; }

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--n-700);
}

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--n-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-300); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--ring);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }

.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.input[type="date"], .input[type="month"] { min-height: 44px; }
.input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
.input[disabled], .select[disabled], .textarea[disabled] {
  background: var(--surface-2); color: var(--ink-3); cursor: not-allowed;
}

/* Icon inside an input */
.input-group { position: relative; display: block; }
.input-group .icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--n-400);
  pointer-events: none;
}
.input-group .input { padding-left: 42px; }

.hint { display: block; margin-top: 6px; font-size: 0.8125rem; color: var(--ink-3); }
.field-error { display: block; margin-top: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--danger-600); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; color: var(--ink-2); cursor: pointer; }
.check-row input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brand-600); flex: none; }

/* -----------------------------------------------------------------------------
   7. Site header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-xs); }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -0.03em; font-size: 1.125rem; }
.logo:hover { color: var(--ink); }
.logo__dot { color: var(--brand-400); }

.nav-links { display: none; align-items: center; gap: 4px; }
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.is-active { color: var(--brand-600); background: var(--brand-50); }

.nav-actions { display: none; align-items: center; gap: 10px; }
@media (min-width: 1024px) { .nav-actions { display: flex; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--ink);
  cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Mobile drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--page);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}
.mobile-menu__link:hover { color: var(--brand-600); }
.mobile-menu__foot { margin-top: auto; display: grid; gap: 10px; padding-top: 20px; }

body.menu-open { overflow: hidden; }

/* -----------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: 48px 64px; }
@media (min-width: 768px) { .hero { padding-block: 64px 88px; } }
@media (min-width: 1024px) { .hero { padding-block: 80px 112px; } }

/* Three soft radial washes for depth, plus a dot grid that fades out. */
.hero::before {
  content: "";
  position: absolute;
  inset: -180px 0 auto 0;
  height: 820px;
  background-image:
    radial-gradient(820px 400px at 10% -16%, rgba(79, 70, 229, 0.16), transparent 66%),
    radial-gradient(640px 360px at 94% -6%, rgba(6, 182, 212, 0.15), transparent 68%),
    radial-gradient(760px 440px at 52% 104%, rgba(99, 102, 241, 0.09), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -20px 0 auto 0;
  height: 620px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-size: 26px 26px;
  /* Fades out well before the headline so the texture never fights the text. */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 52%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 52%);
  opacity: 0.4;
  pointer-events: none;
}

.hero__grid { position: relative; z-index: 1; display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 1.02fr 0.98fr; gap: 60px; } }

.hero-title { font-size: clamp(2.125rem, 1.35rem + 3.4vw, 4rem); font-weight: 600; letter-spacing: -0.035em; margin-bottom: 20px; }
.text-gradient {
  background: linear-gradient(100deg, var(--brand-600) 0%, var(--brand-500) 42%, var(--accent-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { font-size: 1.0625rem; color: var(--ink-2); max-width: 34em; margin-bottom: 28px; }
@media (min-width: 1024px) { .hero-sub { font-size: 1.1875rem; } }

.hero-ctas { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-bottom: 20px; }

.trust-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 0.875rem; color: var(--ink-3); }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.stars { color: var(--n-300); letter-spacing: 1px; display: inline-flex; align-items: center; gap: 1px; }
.stars__item { display: inline-flex; }
.stars__item.is-on { color: var(--warning-500); }
.stars__item.is-on .icon { fill: currentColor; }

.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar {
  width: 30px; height: 30px; font-size: 0.6875rem; margin-left: -10px;
  border: 2px solid var(--page); box-shadow: var(--shadow-xs);
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Stacked resume sheets. The two layers behind are pseudo-elements so they can
   never affect layout height — the real sheet defines it. */
.hero-mock { position: relative; perspective: 1600px; }
.mock-stack { position: relative; transform: rotate(-3deg); }
.mock-stack::before,
.mock-stack::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--r-md);
  background: var(--elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 0;
}
.mock-stack::before { transform: translate(18px, -16px) scale(0.985); opacity: 0.7; }
.mock-stack::after  { transform: translate(34px, -32px) scale(0.965); opacity: 0.38; }

.mock-sheet {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
/* These are <span>s: without a display rule they are inline and ignore height. */
.mock-bar { display: block; height: 9px; border-radius: var(--r-full); background: var(--surface-2); }
.mock-bar--accent { background: var(--brand-200); }
.mock-line { display: block; height: 8px; border-radius: var(--r-full); background: var(--surface-2); margin-bottom: 8px; }
.mock-line--60 { width: 60%; }
.mock-line--40 { width: 40%; }
.mock-line--80 { width: 80%; }
.mock-body { padding: 20px 22px 24px; }
.mock-sheet__label {
  display: block;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n-400);
  margin-bottom: 9px;
}
.mock-sheet__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.mock-sheet__chips span {
  display: block;
  height: 18px;
  padding: 0 10px;
  line-height: 18px;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: var(--r-full);
}

/* Floating cards over the mock */
.float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}
.float-card--ats { top: 5%; left: -7%; animation: rf-float 6.5s ease-in-out infinite; }
.float-card--saved { bottom: 7%; right: -6%; animation: rf-float 7.5s ease-in-out infinite reverse; }
.float-card__label { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.float-card__value { display: block; font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
@media (max-width: 1023px) {
  .float-card--ats { left: -3%; }
  .float-card--saved { right: -3%; }
}
@media (max-width: 560px) {
  /* On a small screen the mock fills the width; floating cards would overlap it. */
  .float-card { display: none; }
}

@keyframes rf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* -----------------------------------------------------------------------------
   8b. Page hero — shared by every page except the landing page.
   Set --hero-hue inline per page so each one has its own colour identity.
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 36px;
  border-bottom: 1px solid var(--border);
  --hero-hue: var(--brand-600);
}
@media (min-width: 1024px) { .page-hero { padding-block: 60px 52px; } }

.page-hero::before {
  content: "";
  position: absolute;
  inset: -160px -10% auto -10%;
  height: 560px;
  background-image:
    radial-gradient(640px 320px at 14% -8%, rgba(79, 70, 229, 0.20), transparent 66%),
    radial-gradient(520px 280px at 88% 0%, rgba(6, 182, 212, 0.16), transparent 70%);
  pointer-events: none;
}
/* Where supported, the left glow takes the page's own hue. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .page-hero::before {
    background-image:
      radial-gradient(640px 320px at 14% -8%, color-mix(in srgb, var(--hero-hue) 22%, transparent), transparent 66%),
      radial-gradient(520px 280px at 88% 0%, rgba(6, 182, 212, 0.14), transparent 70%);
  }
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: -20px 0 auto 0;
  height: 460px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 58%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 58%);
  opacity: 0.38;
  pointer-events: none;
}

.page-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 34px;
  align-items: center;
}
@media (min-width: 1024px) {
  .page-hero__grid { grid-template-columns: 1.06fr 0.94fr; gap: 56px; }
}
.page-hero h1 { font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.9rem); margin-bottom: 14px; }
.page-hero__lead { font-size: 1.0625rem; color: var(--ink-2); max-width: 46ch; margin: 0; }
.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.page-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-hero__visual { position: relative; }

/* -----------------------------------------------------------------------------
   9. Stats bar, feature cards, steps
   -------------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (min-width: 768px) { .stats-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--elevated); padding: 18px 14px; text-align: center; }
.stat__value { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.stat__label { font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }

/* -----------------------------------------------------------------------------
   9b. Product shots — CSS-built screenshots, used on the features page
   -------------------------------------------------------------------------- */
.shot {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.shot__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.shot__dot { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--n-300); }
.shot__title { margin-left: 8px; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.shot__body { padding: 18px; }

.code-line { display: flex; align-items: baseline; gap: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.75rem; line-height: 1.85; color: var(--ink-2); white-space: pre; }
.code-line__tag { color: var(--brand-600); font-weight: 600; }
.code-line__ok { margin-left: auto; color: var(--success-600); }

.issue-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.issue-row:last-child { border-bottom: 0; }
.issue-row__body { flex: 1; min-width: 0; }
.issue-row h4 { margin: 0 0 3px; font-size: 0.9375rem; }
.issue-row p { margin: 0; font-size: 0.8125rem; color: var(--ink-2); }
.issue-row__fix { margin-top: 6px; font-size: 0.8125rem; color: var(--brand-600); font-weight: 500; }

.alt-row { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1024px) {
  .alt-row { grid-template-columns: 1fr 1fr; gap: 64px; }
  .alt-row--flip > *:first-child { order: 2; }
}
.alt-row + .alt-row { margin-top: 72px; }
@media (min-width: 1024px) { .alt-row + .alt-row { margin-top: 96px; } }

/* -----------------------------------------------------------------------------
   10. Template cards, pricing
   -------------------------------------------------------------------------- */
/* Template preview — a real page render. The sheet IS the object: it carries the
   border and the shadow, and the whole A4 page is visible rather than a crop. */
.tpl-viewport {
  display: block;
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  /* No content-visibility here: skipping layout for offscreen cards makes
     clientWidth unreliable, and main.js needs it to size the scaled render. */
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}

/* The real template, scaled to the card width by main.js. */
.tpl-render {
  width: 794px; /* 210mm — the template's own A4 width */
  transform: scale(var(--thumb-scale, 0.4));
  transform-origin: top left;
  pointer-events: none;
}

/* The preview is fetched once the card nears the viewport, so an unloaded card
   shows paper-coloured calm instead of a blank hole. The slot keeps the
   viewport's 210/297 ratio, so nothing shifts when the render lands. */
.tpl-viewport__loading {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.tpl-viewport__loading.is-loaded { background: #fff; }

/* Hover cue over the preview. */
.tpl-viewport__cue {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.tpl-cell__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Template library: jump links, groups and their sliders -----------------
   The library groups every layout by category and each group is a slider, so
   the old chip row is now navigation rather than a filter. A filter that hides
   cards can leave the page looking empty; an anchor cannot. */
.jump-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 40px;
}
.chip__count { font-variant-numeric: tabular-nums; opacity: 0.55; }

.tpl-group { margin-top: 52px; scroll-margin-top: 96px; }
.tpl-group:first-of-type { margin-top: 8px; }
.tpl-group__head { max-width: 680px; margin-bottom: 24px; }
.tpl-group__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tpl-group__blurb { margin: 8px 0 0; font-size: 0.9375rem; color: var(--ink-2); }
.tpl-group__count { margin: 10px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.tpl-group__nav { margin-top: 22px; gap: 14px; }

/* One action per card: the whole sheet is already the preview link, so a
   second "Preview" button beside it would be a duplicate target. */
.tpl-card__foot { margin-top: 12px; }
.tpl-card__foot .btn { width: 100%; justify-content: center; }

/* -----------------------------------------------------------------------------
   Template slider (homepage showcase). Scrolls horizontally with snap; the
   arrows are an enhancement, so with no JS it is still a swipeable strip.
   NOTE: the track must never carry .reveal-stagger — the reveal observer watches
   the viewport, so cards parked outside the scroll window would never be marked
   visible and would stay at opacity 0.
   -------------------------------------------------------------------------- */
.slider { position: relative; }
.slider__track {
  display: flex;
  /* Cards stretch to the tallest, so a shorter tagline does not make one card
     sit shorter than its neighbours. */
  align-items: stretch;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Room for the card shadows; the negative margin keeps the first card aligned
     with the container edge. */
  padding: 6px 6px 10px;
  margin: -6px -6px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track > * {
  flex: 0 0 auto;
  width: clamp(230px, 68vw, 310px);
  scroll-snap-align: start;
}
.slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.slider__btn:hover:not([disabled]) { border-color: var(--brand-300); color: var(--brand-600); }
.slider__btn[disabled] { opacity: 0.4; cursor: default; }

/* -----------------------------------------------------------------------------
   Template card — the sheet is pulled out of a stage tinted with the template's
   own category colour and cropped by it, so a card reads as a page emerging from
   the layout instead of a flat screenshot.
   -------------------------------------------------------------------------- */
.tpl-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.tpl-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.tpl-card__stage {
  position: relative;
  display: block;
  aspect-ratio: 5 / 4;
  padding: 26px 26px 0;
  overflow: hidden;
  background: linear-gradient(152deg, var(--stage-a, #4f46e5), var(--stage-b, #818cf8));
}
.tpl-card__stage .tpl-viewport {
  border: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26);
}
.tpl-card__stage .tpl-viewport__cue { border-radius: var(--r-sm) var(--r-sm) 0 0; }

/* The cue is a pointer affordance only: on a touch screen the whole sheet is
   the link, so a hover overlay would just sit on top of it after a tap. */
@media (hover: hover) {
  .tpl-card__stage:hover .tpl-viewport__cue,
  .tpl-card__stage:focus-visible .tpl-viewport__cue { opacity: 1; }
}

.tpl-card__body { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 18px 20px 20px; }
.tpl-card__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tpl-card__name { margin: 0; font-size: 1.0625rem; }
.tpl-card__tagline { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }

/* -----------------------------------------------------------------------------
   Fanned deck (templates hero). Five sheets held like a hand of cards; hovering
   spreads them. Cheap to render because there is no duplicated content.
   -------------------------------------------------------------------------- */
.deck { position: relative; min-height: 330px; }
.deck__card {
  position: absolute;
  /* Absolutely positioned children of a grid container are NOT placed by
     place-items, so the fan is centred by hand: half the card is pulled back on
     each axis, then the transforms rotate it out from the middle. */
  top: 50%;
  left: 50%;
  margin: -140px 0 0 -99px;
  width: 198px;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.22);
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.deck__card:nth-child(1) { transform: rotate(-11deg) translateX(-104px) translateY(12px); z-index: 1; }
.deck__card:nth-child(2) { transform: rotate(-5.5deg) translateX(-52px) translateY(3px); z-index: 2; }
.deck__card:nth-child(3) { transform: rotate(0deg); z-index: 3; }
.deck__card:nth-child(4) { transform: rotate(5.5deg) translateX(52px) translateY(3px); z-index: 2; }
.deck__card:nth-child(5) { transform: rotate(11deg) translateX(104px) translateY(12px); z-index: 1; }
@media (min-width: 1024px) {
  .deck:hover .deck__card:nth-child(1) { transform: rotate(-15deg) translateX(-128px) translateY(10px); }
  .deck:hover .deck__card:nth-child(2) { transform: rotate(-7.5deg) translateX(-64px) translateY(0); }
  .deck:hover .deck__card:nth-child(4) { transform: rotate(7.5deg) translateX(64px) translateY(0); }
  .deck:hover .deck__card:nth-child(5) { transform: rotate(15deg) translateX(128px) translateY(10px); }
}
.tpl-lock {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Plan column, used inside a .matrix so the plans are divided rather than boxed. */
.plan-col { display: flex; flex-direction: column; align-items: stretch; padding: 26px 22px; position: relative; }
.plan-col--popular::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brand-600);
}
.plan-col__name { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.plan-col__tagline { margin: 4px 0 0; font-size: 0.875rem; color: var(--ink-2); }
.plan-col__cta { margin-top: auto; padding-top: 22px; }

.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 2px; }
.plan-price__amount { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan-price__period { font-size: 0.875rem; color: var(--ink-3); }
.plan-features { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; }
.plan-features li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.9rem; color: var(--ink-2); }
.plan-features .icon { color: var(--success-600); margin-top: 3px; }
.plan-features li.is-muted { color: var(--n-400); }
.plan-features li.is-muted .icon { color: var(--n-300); }

.toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.toggle-group button, .toggle-group a {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--r-xs);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.toggle-group button.is-active, .toggle-group a.is-active { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-xs); }
/* The yearly tab carries a "save" badge; on the active blue it needs to go
   translucent white or the light green fights the button. */
.toggle-group button.is-active .badge, .toggle-group a.is-active .badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--n-300); color: var(--ink); }
.chip.is-active { background: var(--n-900); border-color: var(--n-900); color: #fff; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 640px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.table thead th { background: var(--surface); font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface); }
.table .is-yes { color: var(--success-600); }
.table .is-no  { color: var(--n-300); }

/* -----------------------------------------------------------------------------
   11. Testimonials
   -------------------------------------------------------------------------- */
.quote-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  height: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.quote-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quote-card p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.65; }
.quote-card blockquote { margin: 0; }
/* The outcome is the hook — lead with it. */
.quote-card__result {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--brand-600);
}
.quote-card__foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.quote-card__name { display: block; font-weight: 600; font-size: 0.9375rem; }
.quote-card__role { font-size: 0.8125rem; color: var(--ink-3); }

/* Rating summary that opens the reviews section: the headline score on the
   left, the distribution on the right. */
.review-summary {
  display: grid;
  gap: 24px;
  padding: 24px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
@media (min-width: 768px) {
  .review-summary { grid-template-columns: 250px 1fr; gap: 44px; align-items: center; }
}
.review-summary__value {
  display: block;
  font-family: var(--font-head);
  font-size: 3.25rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.review-summary__score .stars { margin-top: 10px; }
.review-summary__of { display: block; margin-top: 8px; font-size: 0.875rem; color: var(--ink-3); }
.review-summary__bands { display: grid; gap: 8px; }
.review-band {
  display: grid;
  grid-template-columns: 28px 1fr 40px;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.review-band__track { display: block; height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.review-band__fill { display: block; height: 100%; background: var(--brand-600); border-radius: var(--r-full); }
.review-band__percent { text-align: right; font-variant-numeric: tabular-nums; }

/* -----------------------------------------------------------------------------
   12. FAQ accordion
   -------------------------------------------------------------------------- */
.faq { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--elevated); }
.faq__item + .faq__item { border-top: 1px solid var(--border); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.faq__q:hover { background: var(--surface); }
.faq__q .icon { color: var(--n-400); transition: transform 0.22s var(--ease); }
.faq__q[aria-expanded="true"] .icon { transform: rotate(180deg); color: var(--brand-600); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s var(--ease);
}
.faq__a > div { overflow: hidden; }
.faq__a p { margin: 0; padding: 0 18px 16px; font-size: 0.9rem; color: var(--ink-2); }
.faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }

/* -----------------------------------------------------------------------------
   13. Ad slots
   -------------------------------------------------------------------------- */
.ad-slot {
  display: block;
  border: 1px dashed var(--border);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 12px;
}
.ad-slot__label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n-400);
  margin-bottom: 8px;
}
.ad-slot--inline { margin-block: 32px; }

.ad-creative {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.ad-creative:hover { color: var(--ink); border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.ad-creative__eyebrow { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-600); }
.ad-creative strong { font-size: 1rem; letter-spacing: -0.01em; }
.ad-creative__body { font-size: 0.875rem; color: var(--ink-2); }
.ad-creative__cta { margin-top: 10px; font-size: 0.875rem; font-weight: 600; color: var(--brand-600); display: inline-flex; align-items: center; gap: 6px; }
.ad-creative__cta::after { content: "→"; transition: transform 0.18s var(--ease); }
.ad-creative:hover .ad-creative__cta::after { transform: translateX(3px); }
@media (min-width: 768px) { .ad-creative--wide { flex-direction: row; align-items: center; gap: 20px; } .ad-creative--wide strong { flex: none; } .ad-creative--wide .ad-creative__body { flex: 1; } .ad-creative--wide .ad-creative__cta { margin-top: 0; } }

/* -----------------------------------------------------------------------------
   14. Toasts
   -------------------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--elevated);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: var(--ink);
  pointer-events: auto;
  animation: rf-toast-in 0.24s var(--ease) both;
}
.toast.is-leaving { animation: rf-toast-out 0.2s var(--ease) both; }
.toast--success .icon { color: var(--success-600); }
.toast--error   .icon { color: var(--danger-600); }
.toast--warning .icon { color: var(--warning-600); }
.toast--info    .icon { color: var(--brand-600); }
.toast__close { margin-left: auto; background: none; border: 0; color: var(--n-400); cursor: pointer; padding: 0 2px; }
@keyframes rf-toast-in  { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes rf-toast-out { to { opacity: 0; transform: translateX(16px); } }

/* -----------------------------------------------------------------------------
   15. Footer, CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(115deg, var(--brand-700) 0%, var(--brand-600) 45%, var(--accent-600) 100%);
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, 0.88); max-width: 46ch; margin-inline: auto; margin-bottom: 20px; }

.site-footer { background: var(--n-950); color: var(--n-300); padding-block: 48px 24px; margin-top: 0; }
.site-footer a { color: var(--n-300); font-size: 0.9375rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-col h4 { color: #fff; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-logo { font-size: 1rem; color: #fff; }
.footer-logo:hover { color: #fff; }
.footer-note { color: var(--n-500); font-size: 0.8125rem; line-height: 1.6; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--n-400);
}
.social-row { display: flex; align-items: center; gap: 8px; }
.social-icon { display: block; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--n-200);
}
.social-row a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.newsletter { display: flex; align-items: stretch; gap: 6px; margin-top: 12px; }
.newsletter .input { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
.newsletter .input::placeholder { color: var(--n-400); }

/* Auth + error pages */
/* -----------------------------------------------------------------------------
   Auth pages — a header, an off-centre column of type, and one graphic.

   Three earlier versions of these pages were a two-column split with a panel on
   the right: first bullets and a quote card, then a wall of resume renders
   (which arrived unstyled, because resume.css is not loaded here), then CSS
   artwork. This one has no panel and no card at all — the page is a full-width
   header and a single left-aligned column, with the right half left to a
   cropped orbit graphic. A column, not a split.
   -------------------------------------------------------------------------- */
/* The page is exactly one viewport tall: the header is pinned, the form column
   scrolls inside its own box, and the right column never moves.
   `minmax(0, 1fr)` matters: a plain `1fr` row refuses to shrink below its
   content, which would stop the inner scroll container from ever scrolling and
   clip the form instead. */
.auth-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--page);
}
/* dvh so mobile browser chrome cannot cut the bottom off. */
@supports (height: 100dvh) { .auth-shell { height: 100dvh; } }

/* A real header, so these pages stop looking like orphans. */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
/* The only way out of the auth pages: one cross, top right, back to the
   homepage. Drawn inline rather than through the icon library — it is a control,
   so it must be present before the CDN script runs. */
.auth-top__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--ink-2);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.auth-top__close:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.auth-top__cross { display: block; width: 18px; height: 18px; }

/* Below the desktop breakpoint there is no right column — the form is the page. */
.auth-frame { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
@media (min-width: 1024px) {
  .auth-frame { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* The half that scrolls. The scrollbar is hidden: the form still scrolls, it
   just does not wear a browser bar down its edge. */
.auth-main {
  position: relative;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 40px 20px 56px;
}
.auth-main::-webkit-scrollbar { width: 0; height: 0; }
@media (min-width: 1024px) { .auth-main { padding: 56px 48px 72px; } }

/* `margin: auto` centres the column when it fits and resolves to 0 when it does
   not — `justify-content: center` would clip the top of a tall form inside a
   scroll container, which is exactly what the register page has. */
.auth-form-wrap { position: relative; z-index: 1; width: 100%; max-width: 480px; margin: auto; }

/* Eyebrow, headline, lead — the type carries this page. */
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-600);
}
.auth-eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }

.auth-title {
  margin: 16px 0 0;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.auth-lead { margin: 14px 0 0; max-width: 46ch; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.auth-body { margin-top: 30px; }

/* Roomier fields than the rest of the site, scoped to these pages only. */
.auth-main .field { margin-bottom: 18px; }
.auth-main .label { font-size: 0.8125rem; }
.auth-main .input { height: 50px; font-size: 1rem; background: var(--elevated); }
.auth-main .input-group .icon { color: var(--n-400); }
.auth-main .btn-lg { height: 52px; font-size: 1rem; }

/* Two fields side by side, where a form has a pair to show. */
.field-row { display: block; }
@media (min-width: 560px) { .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }

/* The run-out link as a line of text, not a second large button. */
.auth-alt { margin: 24px 0 0; font-size: 0.9375rem; color: var(--ink-2); }
.auth-alt a { font-weight: 600; }
.auth-fine { margin: 26px 0 0; font-size: 0.8125rem; color: var(--ink-3); }

/* What an account gets, as one row rather than a list. */
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.auth-trust li { display: inline-flex; align-items: center; gap: 7px; }
.auth-trust .icon { color: var(--brand-600); }

/* ---- The fixed right column -------------------------------------------------
   A statement, not a widget. The panel is blue drafting paper — a dot grid, lit
   from the top corner and shaded where it meets the white form column — and the
   column is set as type: a kicker, one sentence, a short rule, one paragraph, and
   three facts on hairlines. Nothing in it is a card, so nothing in it can look
   assembled. */
.auth-side {
  display: none;
  position: relative;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-direction: column;
  align-items: center;
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3.4vw, 48px);
  color: #fff;
  background-color: var(--brand-600);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    radial-gradient(140% 100% at 100% 0%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 55%);
  background-size: 22px 22px, 100% 100%;
  box-shadow: inset 26px 0 36px -32px rgba(0, 0, 0, 0.6);
}
.auth-side::-webkit-scrollbar { width: 0; height: 0; }
@media (min-width: 1024px) { .auth-side { display: flex; } }

/* margin-block: auto centres it when there is room and keeps the top reachable
   when there is not — justify-content: center would clip it. */
.auth-side__stack { width: 100%; max-width: 460px; margin-block: auto; }

.auth-side__kicker { margin: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }

/* One sentence carries the panel. The closing clause drops to a dimmer tone so
   the line has an end, and text-wrap balances the ragged edge. */
.auth-side__statement {
  margin: 18px 0 0;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.05rem + 1.3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: #fff;
}
.auth-side__statement span { color: rgba(255, 255, 255, 0.54); }

/* A short rule, not a full-width one: it reads as a mark of punctuation. */
.auth-side__rule { width: 56px; height: 2px; margin: 26px 0; border: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }

.auth-side__copy { margin: 0; max-width: 42ch; font-size: 0.9375rem; line-height: 1.6; color: rgba(255, 255, 255, 0.74); }

/* stretch is the point: the hairline between two facts spans the whole row, so
   the three read as one measured strip rather than three loose labels. */
.auth-side__facts { display: flex; flex-wrap: wrap; align-items: stretch; margin: 36px 0 0; }
.auth-side__facts > div { padding: 0 22px; border-left: 1px solid rgba(255, 255, 255, 0.24); }
.auth-side__facts > div:first-child { padding-left: 0; border-left: 0; }
.auth-side__facts dt { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.auth-side__facts dd { margin: 5px 0 0; font-family: var(--font-head); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }

/* A labelled divider between two actions. The auth pages no longer use it, but
   the ATS checker still does — "or score something else". */
.auth-sep { display: flex; align-items: center; gap: 14px; margin-block: 22px; color: var(--ink-3); font-size: 0.8125rem; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--surface); }
.error-main { max-width: 560px; text-align: center; }
.error-code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--brand-600); margin: 0 0 8px; }
.error-lead { color: var(--ink-2); margin-bottom: 20px; }
.error-hint { color: var(--ink-3); font-size: 0.875rem; }
.error-trace { text-align: left; background: var(--n-900); color: #e2e8f0; padding: 16px; border-radius: var(--r-md); font-size: 0.75rem; overflow: auto; }

/* Progress ring (ATS score) — inline SVG arc, no conic gradients */
.score-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring__track { stroke: var(--surface-2); }
.score-ring__value { stroke: var(--brand-600); stroke-linecap: round; transition: stroke-dashoffset 0.5s var(--ease); }
.score-ring--success .score-ring__value { stroke: var(--success-500); }
.score-ring--warning .score-ring__value { stroke: var(--warning-500); }
.score-ring--danger  .score-ring__value { stroke: var(--danger-500); }
.score-ring__text {
  position: absolute;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.125rem;
  color: var(--ink);
}
.score-ring__svg { display: block; }
.score-ring--sm .score-ring__text { font-size: 0.6875rem; }
.score-ring--lg .score-ring__text { font-size: 2rem; }

/* Skeleton shimmer — pulse only, no gradient sweep */
/* Empty state */
.empty-state { text-align: center; padding: 40px 22px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--surface); }
.empty-state .tile { margin-bottom: 14px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 18px; }
/* Fills a column and centres every child, including the icon — a flex column
   defaults to `stretch`, which left the icon hard against the left edge. */
.empty-state--fill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.empty-state--fill p { margin-bottom: 0; }

/* -----------------------------------------------------------------------------
   15b. Preview and print chrome (preview.php, download.php)
   -------------------------------------------------------------------------- */
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
}
.preview-bar--sub { top: 61px; background: var(--surface); }

.preview-bar__left, .preview-bar__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.preview-bar__left { flex: 1; }

.preview-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.preview-bar__back:hover { color: var(--brand-600); }
.preview-bar__back-label { display: none; }
@media (min-width: 640px) { .preview-bar__back-label { display: inline; } }

.preview-bar__title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-bar__meta { font-weight: 500; color: var(--ink-3); }
.preview-bar__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
@media (max-width: 767px) {
  .preview-bar__hint { display: none; }
  .preview-bar--sub { top: 0; position: static; }
}

.select--sm { padding: 7px 34px 7px 12px; font-size: 0.8125rem; width: auto; }

.preview-stage {
  display: flex;
  justify-content: center;
  padding: 28px 16px 56px;
  background: var(--surface-2);
}
.preview-sheet {
  position: relative;
  width: 210mm;
  background: #ffffff;
  box-shadow: var(--shadow-overlay);
}
/* main.js scales the sheet down to fit narrow screens; this keeps the
   transform from fighting the sticky bar while it measures. */
.preview-sheet { transform-origin: top center; }

.preview-upsell {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 0 auto 32px;
  max-width: 720px;
  background: var(--warning-50);
  border: 1px solid var(--warning-500);
  border-radius: var(--r-lg);
}
.preview-upsell p { margin: 0; flex: 1; font-size: 0.875rem; color: var(--warning-700); min-width: 200px; }

/* -----------------------------------------------------------------------------
   15c. Workspace — sidebar shell, dashboard, plan, settings, builder
   -------------------------------------------------------------------------- */

/* ---- Shell ---------------------------------------------------------------- */
body.app-body { background: var(--surface); }

.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 1024px) { .app { grid-template-columns: 264px minmax(0, 1fr); } }

.app-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 264px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--page);
  transform: translateX(-100%);
  transition: transform 0.24s var(--ease);
}
.app-side.is-open { transform: none; }
@media (min-width: 1024px) {
  .app-side { position: sticky; top: 0; height: 100vh; transform: none; overflow-y: auto; }
}

.app-side__head { display: flex; align-items: center; padding: 2px 10px 18px; }
.app-side__new { margin-bottom: 22px; }

.app-nav { display: grid; gap: 2px; }
.app-nav__label { margin: 16px 10px 6px; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.app-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.app-nav__link:hover { background: var(--surface-2); color: var(--ink); }
.app-nav__link.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.app-nav__link .icon { flex: none; }

.app-side__user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border); }
.app-side__avatar { flex: none; background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.app-side__user-text { display: grid; min-width: 0; line-height: 1.3; }
.app-side__user-text strong { font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-side__user-text small { font-size: 0.6875rem; color: var(--ink-3); }
.app-side__logout { margin-left: auto; padding: 7px; border-radius: var(--r-sm); color: var(--ink-3); }
.app-side__logout:hover { background: var(--surface-2); color: var(--ink); }

.app-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, 0.45); }
body.app-nav-open { overflow: hidden; }
@media (min-width: 1024px) { .app-scrim { display: none; } }

.app-main { display: flex; flex-direction: column; min-width: 0; }

.app-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: var(--page);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .app-top { padding: 14px 32px; } }
.app-top__menu { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--page); color: var(--ink-2); }
@media (min-width: 1024px) { .app-top__menu { display: none; } }
.app-top__titles { min-width: 0; }
.app-top__title { margin: 0; font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; }
.app-top__sub { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.app-top__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.app-content { display: grid; gap: 20px; align-content: start; width: 100%; max-width: 1240px; padding: 20px; }
@media (min-width: 1024px) { .app-content { padding: 28px 32px 48px; } }

/* ---- Stat tiles ----------------------------------------------------------- */
.app-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .app-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.app-stat { padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--page); }
.app-stat__label { margin: 0; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.app-stat__value { margin: 8px 0 0; font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1; color: var(--ink); }
.app-stat__value span { margin-left: 2px; font-size: 0.875rem; font-weight: 600; color: var(--ink-3); }
.app-stat__value--text { font-size: 1.25rem; letter-spacing: -0.02em; }
.app-stat__foot { margin: 8px 0 0; font-size: 0.75rem; color: var(--ink-3); }

/* ---- Panels --------------------------------------------------------------- */
.app-panel { padding: 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--page); }
@media (min-width: 768px) { .app-panel { padding: 22px; } }
.app-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.app-panel__title { margin: 0; font-family: var(--font-head); font-size: 1rem; font-weight: 700; letter-spacing: -0.015em; }
.app-panel__note { margin: 0; font-size: 0.8125rem; color: var(--ink-3); }

.app-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-search { display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--elevated); color: var(--ink-3); }
.app-search input { width: 150px; border: 0; background: transparent; font: inherit; font-size: 0.875rem; color: var(--ink); outline: none; }
@media (min-width: 640px) { .app-search input { width: 190px; } }

.app-noresults { margin: 22px 0 0; text-align: center; font-size: 0.875rem; color: var(--ink-3); }
.app-limit { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--warning-50); color: var(--warning-700); font-size: 0.8125rem; }
.app-limit--info { background: var(--surface-2); color: var(--ink-2); }

/* ---- Resume gallery -------------------------------------------------------
   Each card is the document itself, rendered at A4 width and scaled down, so the
   grid reads as a set of pages rather than a row of decorated boxes. Nothing is
   boxed: the sheets sit straight on the workspace surface. */
.doc-section { display: grid; gap: 18px; }
.doc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc-head__title { display: flex; align-items: baseline; gap: 9px; margin: 0; font-family: var(--font-head); font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; }
.doc-head__count { display: inline-block; padding: 2px 8px; border-radius: var(--r-full); background: var(--brand-50); color: var(--brand-700); font-size: 0.6875rem; font-weight: 700; }
.doc-head__sub { margin: 4px 0 0; font-size: 0.8125rem; color: var(--ink-3); }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 18px; }
@media (min-width: 760px) { .doc-grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 24px; } }

.doc-card { display: flex; flex-direction: column; gap: 10px; }

.doc-card__sheet {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 16px 30px -22px rgba(15, 23, 42, 0.45);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.doc-card__sheet:hover { transform: translateY(-3px); border-color: var(--brand-500); box-shadow: 0 22px 40px -24px rgba(15, 23, 42, 0.55); }
.doc-card__sheet:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

.doc-card__frame { display: block; position: absolute; inset: 0; background: linear-gradient(180deg, var(--surface), var(--page)); }
.doc-card__frame .tpl-render { pointer-events: none; }

/* A hairline inside the paper edge so the sheet still reads on white. */
.doc-card__sheet::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.07); pointer-events: none; }

.doc-card__cue {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.doc-card__sheet:hover .doc-card__cue,
.doc-card__sheet:focus-visible .doc-card__cue { opacity: 1; transform: none; }
@media (hover: none) { .doc-card__cue { display: none; } }

.doc-card__score {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--band-colour, var(--ink));
}
.doc-card__score small { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }

.doc-card__body { display: grid; gap: 3px; min-width: 0; }
.doc-card__title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-head); font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em; }
.doc-card__meta { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.6875rem; color: var(--ink-3); }
.doc-card__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.doc-card__icons { display: flex; align-items: center; margin-left: auto; }

/* Seven controls per card was the clutter. Three, with the rest in a menu. */
.doc-menu { position: relative; margin-left: auto; }
.doc-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--page);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.doc-menu__btn::-webkit-details-marker { display: none; }
.doc-menu__btn:hover { border-color: var(--brand-500); color: var(--ink); }
.doc-menu[open] .doc-menu__btn { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.doc-menu__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 1px;
  min-width: 180px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--page);
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.4);
}
.doc-menu__panel a, .doc-menu__panel button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
}
.doc-menu__panel a:hover, .doc-menu__panel button:hover { background: var(--surface-2); color: var(--ink); }
.doc-menu__panel .icon { flex: none; color: var(--ink-3); }
.doc-menu__panel form { display: block; }
.doc-menu__panel .is-danger { color: var(--danger-600); }
.doc-menu__panel .is-danger:hover { background: var(--danger-50); color: var(--danger-700); }
.doc-menu__panel .is-danger .icon { color: inherit; }

/* The same paper footprint, empty on purpose. */
.doc-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 210 / 297;
  border: 1.5px dashed var(--border);
  border-radius: 4px;
  color: var(--ink-3);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.doc-new:hover { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.doc-new__plus { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; background: var(--page); }
.doc-new:hover .doc-new__plus { border-color: var(--brand-500); background: #fff; }
.doc-new__label { margin-top: 8px; font-size: 0.8125rem; font-weight: 600; }
.doc-new__hint { font-size: 0.6875rem; opacity: 0.8; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.app-empty { display: grid; justify-items: start; gap: 10px; padding: 34px 24px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--page); }
.app-empty h2 { margin: 4px 0 0; font-size: 1.125rem; }
.app-empty p { margin: 0; max-width: 48ch; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); }

/* ---- Usage meters and plan tiles ------------------------------------------ */
.usage { display: grid; gap: 18px; }
.usage__row { display: grid; gap: 8px; }
.usage__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--ink-2); }
.usage__track { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.usage__fill { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); }

.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 760px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--page); }
.plan-tile.is-current { border-color: var(--brand-600); box-shadow: 0 0 0 1px var(--brand-600) inset; }
.plan-tile__flag { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: var(--r-full); background: var(--brand-600); color: #fff; font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.plan-tile__name { margin: 0; font-family: var(--font-head); font-size: 1rem; font-weight: 700; letter-spacing: -0.015em; }
.plan-tile__price { margin: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.plan-tile__price small { margin-left: 2px; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.plan-tile__list { display: grid; gap: 7px; margin: 0 0 6px; }
.plan-tile__list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-tile__list dt { font-size: 0.75rem; color: var(--ink-3); }
.plan-tile__list dd { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--ink); }

/* ---- Settings ------------------------------------------------------------- */
.settings-form { display: grid; gap: 16px; justify-items: start; }
.settings-form .bld-grid { width: 100%; }
.settings-list { display: grid; gap: 0; margin: 0; }
.settings-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.settings-list > div:first-child { border-top: 0; }
.settings-list dt { font-size: 0.875rem; color: var(--ink-3); }
.settings-list dd { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink); }

/* ---- Builder -------------------------------------------------------------- */
body.builder-body { background: var(--surface); }
.builder { display: flex; flex-direction: column; min-height: 100vh; }

.builder-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: var(--page);
  border-bottom: 1px solid var(--border);
}
.builder-close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--page); color: var(--ink-2); transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease); }
.builder-close svg { display: block; width: 16px; height: 16px; }
.builder-close:hover { background: var(--danger-50); border-color: var(--danger-500); color: var(--danger-600); }
.builder-bar__title {
  flex: 1 1 160px;
  min-width: 120px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.builder-bar__title:hover, .builder-bar__title:focus { border-color: var(--border); background: var(--elevated); outline: none; }
.builder-bar__status { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.builder-bar__status[data-state="saved"] { color: var(--success-600); }
.builder-bar__status[data-state="error"] { color: var(--danger-600); }
.builder-bar__status[data-state="dirty"] { color: var(--warning-700); }
.builder-bar__score { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-full); background: var(--success-50); color: var(--success-700); font-size: 0.6875rem; font-weight: 700; white-space: nowrap; }
.builder-bar__score b { font-size: 0.8125rem; }
.builder-bar__controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.builder-bar__size { width: 60px; height: 34px; padding: 0 7px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--elevated); font: inherit; font-size: 0.8125rem; color: var(--ink); }
.builder-bar__toggle, .builder-bar__preview { display: inline-flex; align-items: center; gap: 6px; }

.accent-picks { display: inline-flex; align-items: center; gap: 4px; }
.accent-pick { width: 18px; height: 18px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--pick, #4F46E5); cursor: pointer; }
.accent-pick.is-on { border-color: var(--ink); }
.accent-custom { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 50%; overflow: hidden; cursor: pointer; }
.accent-custom input { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }

.builder-cols { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .builder-cols { grid-template-columns: 196px minmax(0, 1fr); align-items: start; } }
@media (min-width: 1360px) { .builder-cols { grid-template-columns: 196px minmax(0, 1fr) minmax(0, 1fr); } }

/* The rail is the builder's own left sidebar: section jumps plus the checklist. */
.builder-rail { display: none; }
@media (min-width: 1024px) {
  .builder-rail { display: block; position: sticky; top: 53px; max-height: calc(100vh - 53px); overflow-y: auto; padding: 18px 14px 32px; border-right: 1px solid var(--border); background: var(--page); }
}
.builder-rail__label { margin: 0 0 8px; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.builder-rail__label--row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.builder-rail__nav { display: grid; gap: 1px; margin-bottom: 22px; }
.builder-rail__nav a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r-sm); font-size: 0.8125rem; color: var(--ink-2); }
.builder-rail__nav a:hover { background: var(--surface-2); color: var(--ink); }
.builder-rail__dot { display: block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--n-300); }
.builder-rail__dot.is-filled { background: var(--success-500); }
.builder-rail__panel { padding-top: 16px; border-top: 1px solid var(--border); }
.builder-rail__score { font-size: 0.6875rem; font-weight: 700; color: var(--ink-2); }
.builder-rail__hint { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; font-size: 0.6875rem; line-height: 1.5; color: var(--ink-3); }

.chk-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.chk-item { display: flex; align-items: center; gap: 7px; padding: 6px 4px; font-size: 0.75rem; color: var(--ink-3); }
.chk-item__dot { display: block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--n-300); }
.chk-item.is-pass { color: var(--ink-2); }
.chk-item.is-pass .chk-item__dot { background: var(--success-500); }
.chk-item__label { flex: 1 1 auto; min-width: 0; }
.chk-item__pts { flex: none; font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.builder-panel { padding: 18px 16px 120px; }
@media (min-width: 1024px) { .builder-panel { padding: 22px 24px 140px; border-right: 1px solid var(--border); } }
.builder-noscript { margin: 0; padding: 14px; border-radius: var(--r-md); background: var(--warning-50); color: var(--warning-700); font-size: 0.875rem; }

.builder-side { display: none; }
@media (min-width: 1360px) { .builder-side { display: block; position: sticky; top: 53px; max-height: calc(100vh - 53px); overflow-y: auto; padding: 18px 24px 40px; } }
.builder-side__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--page); }
.zoom__btn { min-width: 28px; height: 28px; padding: 0 7px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.zoom__btn:hover { background: var(--surface-2); }
.zoom__value { padding: 0 7px; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.builder-sheet { width: 100%; max-width: 620px; margin: 0 auto; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.builder-sheet__inner { width: 100%; }
.builder-side__hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: 0.75rem; color: var(--ink-3); }

/* Below the side-by-side breakpoints the preview is a view, not a pane. */
@media (max-width: 1359px) {
  .builder-bar__preview { display: inline-flex; }
  .builder.is-previewing .builder-panel { display: none; }
  .builder.is-previewing .builder-side { display: block; position: static; padding: 16px 16px 40px; }
}
@media (min-width: 1360px) { .builder-bar__preview { display: none; } }

.bld-sec { padding: 20px 0; border-top: 1px solid var(--border); scroll-margin-top: 64px; }
.bld-sec:first-child { border-top: 0; padding-top: 0; }
.bld-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.bld-sec__head h2 { margin: 0; font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.bld-sec__hint { margin: 0; flex: 1 1 200px; font-size: 0.75rem; color: var(--ink-3); }

.bld-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .bld-grid { grid-template-columns: minmax(0, 1fr); } }
.bld-field { display: grid; gap: 5px; min-width: 0; }
.bld-field--wide { grid-column: 1 / -1; }
.bld-field label { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); }
.bld-field input, .bld-field textarea, .bld-summary {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--elevated);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
}
.bld-field input:focus, .bld-field textarea:focus, .bld-summary:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.bld-field textarea, .bld-summary { resize: vertical; }
.bld-summary { font-size: 0.9375rem; line-height: 1.6; padding: 11px 13px; }
.bld-check { display: inline-flex; align-items: center; gap: 8px; grid-column: 1 / -1; font-size: 0.8125rem; color: var(--ink-2); }

.bld-item { padding: 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--page); }
.bld-item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bld-item__n { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.bld-remove { padding: 5px 8px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--danger-600); cursor: pointer; }
.bld-remove:hover { background: var(--danger-50); }

.bld-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  padding: 9px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--r-full);
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
}
.bld-add::before { content: "+"; font-size: 1rem; line-height: 1; }
.bld-add:hover { background: var(--brand-50); border-color: var(--brand-500); }

/* ---- Colour contract ------------------------------------------------------
   The workspace uses exactly four surfaces, and nothing invents a fifth:

     app background   var(--surface)    the page behind the panels
     panel and card   var(--page)       white, separated by hairline borders
     input            var(--brand-50)   light blue, so a field reads as editable
     sidebar          #101a3d           deep navy, white type

   Focus always means the same thing: white field, brand border, 3px brand glow.
   -------------------------------------------------------------------------- */
body.app-body, body.builder-body {
  --input-bg: var(--brand-50);
  --input-bg-focus: var(--page);
  --side-bg: #101a3d;
  --side-hover: rgba(255, 255, 255, 0.06);
  --side-active: rgba(255, 255, 255, 0.11);
  --side-ink: rgba(255, 255, 255, 0.68);
  --side-ink-strong: #ffffff;
}

/* ---- Sidebar: deep navy --------------------------------------------------- */
.app-side { background: var(--side-bg); border-right-color: transparent; }
.app-side .logo { color: var(--side-ink-strong); }
.app-side .logo__dot { color: #a5b4fc; }
.app-nav__label { color: rgba(255, 255, 255, 0.4); }
.app-nav__link { color: var(--side-ink); }
.app-nav__link:hover { background: var(--side-hover); color: var(--side-ink-strong); }
.app-nav__link.is-active { background: var(--side-active); color: var(--side-ink-strong); }
.app-side__user { border-top-color: rgba(255, 255, 255, 0.1); }
.app-side__avatar { background: rgba(255, 255, 255, 0.14); color: var(--side-ink-strong); }
.app-side__user-text strong { color: var(--side-ink-strong); }
.app-side__user-text small { color: rgba(255, 255, 255, 0.48); }
.app-side__logout { color: rgba(255, 255, 255, 0.56); }
.app-side__logout:hover { background: rgba(255, 255, 255, 0.1); color: var(--side-ink-strong); }

/* ---- Fields: light blue until touched ------------------------------------ */
.bld-field input, .bld-field textarea, .bld-summary { background: var(--input-bg); }
.bld-field input:focus, .bld-field textarea:focus, .bld-summary:focus { background: var(--input-bg-focus); }
.app-search { background: var(--input-bg); }
.app-search:focus-within { background: var(--input-bg-focus); border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14); }
.builder-panel { background: var(--page); }
.builder-sheet { position: relative; }

/* ---- Template picker ------------------------------------------------------ */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 14px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.58); }
.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: min(86vh, 740px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--page);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.38);
  animation: modal-in 0.18s var(--ease) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal__title { margin: 0; font-family: var(--font-head); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; }
.modal__sub { margin: 6px 0 0; max-width: 62ch; font-size: 0.8125rem; line-height: 1.55; color: var(--ink-3); }
.modal__form { display: flex; flex-direction: column; min-height: 0; }
.modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface); }
body.modal-open { overflow: hidden; }

.tpl-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 20px; overflow-y: auto; }
@media (min-width: 780px) { .tpl-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .tpl-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tpl-pick__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--page);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.tpl-pick__item:hover { border-color: var(--brand-500); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tpl-pick__item:has(input:checked) { border-color: var(--brand-600); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.22); }

/* The real layout, rendered at A4 width and scaled into the tile — the same
   mechanism the gallery uses, so the preview is never an approximation. */
.tpl-pick__stage {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.tpl-pick__stage .tpl-render { pointer-events: none; }

.tpl-pick__body { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tpl-pick__body input { flex: none; width: 15px; height: 15px; accent-color: var(--brand-600); }
.tpl-pick__name { font-size: 0.8125rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-pick__cat { font-size: 0.6875rem; color: var(--ink-3); }

.tpl-pick__item.is-locked { background: var(--surface); border-style: dashed; cursor: default; }
.tpl-pick__item.is-locked:hover { transform: none; border-color: var(--border); box-shadow: none; }
.tpl-pick__item.is-locked .tpl-pick__stage { opacity: 0.86; }
.tpl-pick__lock {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tpl-pick__upgrade { font-size: 0.75rem; font-weight: 700; color: var(--brand-600); }
.tpl-pick__upgrade:hover { color: var(--brand-700); }

/* ---- Motion and focus polish --------------------------------------------- */
.app-stat { transition: border-color 0.15s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease); }
.app-stat:hover { border-color: var(--brand-500); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.plan-tile { transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.plan-tile:hover { transform: translateY(-1px); }
.icon-btn { transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.app-nav__link, .builder-close, .zoom__btn, .accent-pick, .tpl-pick__upgrade { transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease); }
.icon-btn:focus-visible, .app-nav__link:focus-visible, .zoom__btn:focus-visible,
.accent-pick:focus-visible, .builder-close:focus-visible, .tpl-pick__item:focus-within {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   16. Motion — reveal on scroll

   The resting state is plain CSS and is NOT gated on anything: not on a class a
   script has to add, and not on `prefers-reduced-motion`. Both gates were here
   before and each one silently switched the whole layer off on a real device —
   the second one was mine, and blaming the phone for it was wrong.

   The motion is our own CSS and JS — no animation library. This rule describes
   where an element starts and how it moves; main.js only decides when to add
   `.is-in`, and the browser animates the difference. Direction variants come
   from the `[data-reveal]` rules below and the cascade from the nth-child
   transition delays, so nothing in JS has to describe an animation.

   Two escapes guarantee nothing is ever stuck invisible, and neither disables
   the animation: <noscript> in header.php, and the header timer, which only
   reveals.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal:not([data-reveal])            { transform: translate3d(0, 26px, 0); }
.reveal[data-reveal="left"]           { transform: translate3d(-46px, 0, 0); }
.reveal[data-reveal="right"]          { transform: translate3d(46px, 0, 0); }
.reveal[data-reveal="scale"]          { transform: scale(0.94); }
.reveal[data-reveal="blur"]           { transform: translate3d(0, 16px, 0); filter: blur(6px); }
.reveal[data-reveal="mask"]           { transform: translate3d(0, 18px, 0); }
.reveal[data-reveal="fade"]           { transform: none; }
.reveal-stagger > *                    { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-stagger > *:nth-child(2)        { transition-delay: 70ms; }
.reveal-stagger > *:nth-child(3)        { transition-delay: 140ms; }
.reveal-stagger > *:nth-child(4)        { transition-delay: 210ms; }
.reveal-stagger > *:nth-child(5)        { transition-delay: 280ms; }
.reveal-stagger > *:nth-child(n+6)      { transition-delay: 350ms; }

/* Revealed state: main.js adds .is-in once the element scrolls in, and the
   transition on the rules above animates the change. */
.reveal.is-in,
.reveal-stagger.is-in > * {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* Reveals without animating: for the no-script case, the header timer, and a
   per-element rescue if an animation throws. Never disables the animation. */
html.rf-reveal-all .reveal,
html.rf-reveal-all .reveal-stagger > *,
.is-stuck {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* Elements main.js nudges as the page scrolls. */
[data-parallax] { will-change: transform; }

/* -----------------------------------------------------------------------------
   17. Dark mode — token swap only, so every component adapts automatically
   -------------------------------------------------------------------------- */
html.dark {
  --page:        var(--n-950);
  --surface:     #0b1220;
  --surface-2:   var(--n-800);
  --elevated:    var(--n-900);
  --border:      var(--n-800);
  --border-soft: #172033;
  --ink:         #f1f5f9;
  --ink-2:       #b6c2d4;
  --ink-3:       #94a3b8;
  --ring:        rgba(129, 140, 248, 0.22);
  --overlap:     rgba(2, 6, 23, 0.7);
  --brand-50:    rgba(79, 70, 229, 0.16);
  --brand-100:   rgba(79, 70, 229, 0.26);
  --success-50:  rgba(16, 185, 129, 0.14);
  --warning-50:  rgba(245, 158, 11, 0.14);
  --danger-50:   rgba(239, 68, 68, 0.14);
  color-scheme: dark;
}
html.dark .tile-cyan,
html.dark .avatar-cyan { background: rgba(6, 182, 212, 0.16); }
html.dark .tile-violet,
html.dark .avatar-violet { background: rgba(124, 58, 237, 0.18); }
html.dark .avatar-sky { background: rgba(3, 105, 161, 0.2); }
html.dark .avatar-teal { background: rgba(15, 118, 110, 0.2); }
html.dark .badge--info { background: rgba(6, 182, 212, 0.16); }
html.dark .mock-sheet { background: #fff; }
html.dark .hero::after { opacity: 0.28; }
html.dark .hero::before { opacity: 0.55; }
html.dark .site-footer { background: #030712; }

/* -----------------------------------------------------------------------------
   18. Print — resume sheets only
   -------------------------------------------------------------------------- */
@media print {
  @page { size: A4; margin: 0; }

  html, body { background: #fff !important; color: #000 !important; }

  .site-header, .site-footer, .ad-slot, .toast-stack, .no-print,
  .mobile-menu, .builder-bar, .builder-panel, .builder-side { display: none !important; }

  .print-area { display: block !important; margin: 0 !important; padding: 0 !important; }
  a[href]::after { content: none !important; }
}
