/* booked.vonimate.com — brand tokens + base styles
 * Editorial pairing: Fraunces (display serif) for h1 + numerals; Plus Jakarta Sans for everything else.
 * Anti-template: bento dashboard, oversized stage numerals, polaroid photo slots, asymmetric landing.
 */

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-muted: #f4f4f5;
  --bg-canvas: #f7f6f3;             /* warm paper background for editorial sections */
  --dark: #18181b;
  --dark-2: #27272a;
  --text-1: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;
  --text-4: #a1a1aa;
  --text-5: #d4d4d8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-tint: rgba(37, 99, 235, 0.08);
  --accent-tint-2: rgba(37, 99, 235, 0.04);
  --accent-border: rgba(37, 99, 235, 0.22);
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --success: #10b981;
  --success-tint: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-tint: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-tint: rgba(239, 68, 68, 0.1);
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 4px 12px rgba(24, 24, 27, 0.06);
  --shadow-lg: 0 12px 32px rgba(24, 24, 27, 0.08);
  --shadow-xl: 0 24px 56px rgba(24, 24, 27, 0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  letter-spacing: -0.02em;
  margin: 0 0 0.5em; line-height: 1.1;
  color: var(--text-1);
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.5rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 25, "WONK" 1;
  letter-spacing: -0.028em;
  line-height: 1.05;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 15, "WONK" 1;
  letter-spacing: -0.022em;
  line-height: 1.15;
}
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.012em; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-2); }
small { color: var(--text-3); }

code, pre { font-family: ui-monospace, SF Mono, Menlo, Monaco, Consolas, monospace; font-size: 0.9em; }
code { background: var(--bg-muted); padding: 2px 6px; border-radius: 4px; }
pre { background: var(--bg-muted); padding: 1em; border-radius: var(--radius); overflow-x: auto; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 0.5rem 0.85rem;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.skip-link:focus { top: 8px; text-decoration: none; color: #fff; }

/* Universal focus ring */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Container */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }

/* Nav */
.nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem; max-width: 1280px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  font-weight: 700; color: var(--text-1); font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; background: var(--accent); color: #fff;
  border-radius: 8px; display: grid; place-items: center; font-weight: 800;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.brand-sep { color: var(--text-4); margin: 0 4px; }
.brand-sub { color: var(--text-3); font-weight: 500; font-size: 0.95rem; font-family: var(--font-display); font-style: italic; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { color: var(--text-2); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-1); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.625rem 1.1rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; font-family: inherit;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.18s var(--ease-spring),
              background 0.18s var(--ease-fast), color 0.18s var(--ease-fast),
              border-color 0.18s var(--ease-fast), box-shadow 0.18s var(--ease-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(37, 99, 235, 0.18);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); text-decoration: none; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text-1); border-color: var(--text-3); text-decoration: none; background: var(--bg-muted); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; text-decoration: none; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; text-decoration: none; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

/* Surfaces */
.surface {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.surface-tight { padding: 1.1rem; }
.surface-elevated { box-shadow: var(--shadow-md); }

/* Forms */
label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--text-1); margin-bottom: 0.35rem; }
.label-hint { font-weight: 500; color: var(--text-3); font-size: 0.85rem; margin-left: 0.4rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="tel"],
textarea, select {
  width: 100%; padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); font-family: inherit; font-size: 0.95rem;
  background: #fff; color: var(--text-1);
  transition: border-color 0.18s var(--ease-fast), box-shadow 0.18s var(--ease-fast);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input[type="file"] {
  width: 100%; padding: 0.4rem; font-family: inherit; font-size: 0.9rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: #fff;
}
input[type="file"]:focus { outline: none; border-color: var(--accent); }
.form-row { margin-bottom: 1.1rem; }
.form-row p.hint { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

fieldset {
  border: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.25rem;
}
fieldset legend {
  font-family: var(--font-display); font-weight: 500; font-size: 1.25rem;
  letter-spacing: -0.018em; color: var(--text-1); margin-bottom: 0.5rem;
  padding: 0;
}

.checkbox-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 0; }
.checkbox-row input[type="checkbox"] { margin-top: 0.2rem; width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-row label { margin: 0; font-weight: 500; color: var(--text-2); cursor: pointer; }
.checkbox-row label strong { color: var(--text-1); font-weight: 600; }

.radio-pill-group { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
  display: inline-block; padding: 0.35rem 0.7rem; border: 1.5px solid var(--border-strong);
  border-radius: 999px; font-size: 0.85rem; font-weight: 500; color: var(--text-2);
  transition: all 0.15s var(--ease-fast);
}
.radio-pill input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.radio-pill:hover span { border-color: var(--text-3); color: var(--text-1); }
.radio-pill:focus-within span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Banners */
.banner { padding: 0.85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.93rem; border: 1px solid; }
.banner-info { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent-hover); }
.banner-success { background: var(--success-tint); border-color: rgba(16, 185, 129, 0.3); color: #047857; }
.banner-warning { background: var(--warning-tint); border-color: rgba(245, 158, 11, 0.3); color: #92400e; }
.banner-error { background: var(--danger-tint); border-color: rgba(239, 68, 68, 0.3); color: #b91c1c; }

/* Progress bar */
.progress-bar {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.15rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; box-shadow: var(--shadow-sm);
}
.progress-meta { flex: 1; }
.progress-meta-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.progress-meta-title { font-weight: 700; color: var(--text-1); font-size: 1rem; letter-spacing: -0.01em; }
.progress-meta-count { color: var(--text-3); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.progress-track { background: var(--bg-muted); border-radius: 999px; height: 10px; overflow: hidden; position: relative; }
.progress-fill {
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  height: 100%; border-radius: 999px;
  transition: width 0.6s var(--ease-spring);
}
.progress-pct {
  color: var(--text-1); font-weight: 700; font-size: 1.4rem;
  font-variant-numeric: tabular-nums; min-width: 64px; text-align: right;
  letter-spacing: -0.02em; font-family: var(--font-display);
}

/* ===== Bento dashboard ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.bento-cell { grid-column: span 3; }
.bento-cell.span-2 { grid-column: span 2; }
.bento-cell.span-3 { grid-column: span 3; }
.bento-cell.span-4 { grid-column: span 4; }
.bento-cell.span-6 { grid-column: span 6; }
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-cell, .bento-cell.span-2, .bento-cell.span-3,
  .bento-cell.span-4, .bento-cell.span-6 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-cell, .bento-cell.span-2, .bento-cell.span-3,
  .bento-cell.span-4, .bento-cell.span-6 { grid-column: span 1; }
}

/* Hero stage card (the "up next" cover card) */
.stage-card-hero {
  background: linear-gradient(135deg, #fff 0%, #fafaf9 65%, var(--accent-tint-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.75rem 1.75rem 1.5rem; position: relative; overflow: hidden;
  text-decoration: none; color: var(--text-1); display: block;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-fast),
              border-color 0.18s var(--ease-fast);
  min-height: 240px;
}
.stage-card-hero:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-border); text-decoration: none; }
.stage-card-hero .eyebrow { color: var(--accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.stage-card-hero h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.25rem); margin-bottom: 0.6rem; }
.stage-card-hero .tagline { color: var(--text-2); font-size: 1.02rem; line-height: 1.5; max-width: 36rem; }
.stage-card-hero .footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; gap: 0.75rem; flex-wrap: wrap; }
.stage-card-hero .numeral {
  position: absolute; top: 0.5rem; right: 1.5rem;
  font-family: var(--font-display); font-weight: 500; font-size: 9rem;
  color: var(--text-5); line-height: 1; pointer-events: none;
  font-variation-settings: "SOFT" 100; opacity: 0.65;
}

/* Standard stage card (used inside bento + sidebar) */
.stage-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  text-decoration: none; color: var(--text-1);
  display: flex; flex-direction: column; gap: 0.5rem;
  position: relative; overflow: hidden;
  min-height: 175px;
  transition: transform 0.2s var(--ease-spring), border-color 0.18s var(--ease-fast),
              box-shadow 0.2s var(--ease-fast);
}
.stage-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent-border); box-shadow: var(--shadow-md); }
.stage-card .numeral {
  position: absolute; top: -0.6rem; right: 0.85rem;
  font-family: var(--font-display); font-weight: 500; font-size: 4.5rem;
  color: var(--text-5); line-height: 1; pointer-events: none; opacity: 0.55;
  font-variation-settings: "SOFT" 100;
}
.stage-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.stage-card-num { color: var(--text-4); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.stage-card-title { font-weight: 700; color: var(--text-1); font-size: 1.02rem; letter-spacing: -0.012em; line-height: 1.3; margin: 0; max-width: 80%; position: relative; z-index: 1; }
.stage-card-tagline { color: var(--text-2); font-size: 0.88rem; line-height: 1.45; flex: 1; }
.stage-card-footer { display: flex; align-items: center; justify-content: space-between; }
.stage-card-value { color: var(--text-3); font-size: 0.78rem; font-weight: 600; }

.status-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  border: 1px solid;
}
.status-locked { background: var(--bg-muted); color: var(--text-3); border-color: var(--border); }
.status-unlocked { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-border); }
.status-submitted { background: var(--warning-tint); color: #92400e; border-color: rgba(245, 158, 11, 0.3); }
.status-completed { background: var(--success-tint); color: #047857; border-color: rgba(16, 185, 129, 0.3); }

.stage-card.locked, .stage-card-hero.locked { opacity: 0.7; cursor: not-allowed; }
.stage-card.locked .stage-card-title { color: var(--text-3); }
.stage-card.locked:hover, .stage-card-hero.locked:hover { transform: none; box-shadow: var(--shadow-sm); }
.stage-card.completed::after, .stage-card-hero.completed::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent 60%, var(--success-tint) 200%);
  pointer-events: none;
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 0.78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; background: var(--bg-muted); }
tr:hover td { background: var(--bg-muted); }
td.actions { text-align: right; }

/* ICP photo grid — polaroid feel */
.icp-photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem; margin-top: 0.5rem;
}
.icp-photo-slot {
  background: #fff; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); padding: 0.85rem 0.85rem 0.95rem;
  display: flex; flex-direction: column; gap: 0.55rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-spring), border-color 0.18s var(--ease-fast),
              box-shadow 0.25s var(--ease-fast);
}
.icp-photo-slot:nth-child(odd) { transform: rotate(-0.6deg); }
.icp-photo-slot:nth-child(even) { transform: rotate(0.6deg); }
.icp-photo-slot:hover { transform: rotate(0deg) translateY(-2px); box-shadow: var(--shadow-md); }
.icp-photo-slot.has-file { border-color: var(--accent); box-shadow: var(--shadow-md); }
.icp-photo-slot .slot-num { color: var(--text-4); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-display); font-style: italic; font-weight: 500; }
.icp-photo-slot .preview {
  background: var(--bg-muted); border-radius: 6px; aspect-ratio: 1; overflow: hidden;
  display: grid; place-items: center; color: var(--text-4);
}
.icp-photo-slot .preview img { width: 100%; height: 100%; object-fit: cover; }
.icp-photo-slot .preview span { color: var(--text-4); font-size: 1.5rem; }
.icp-photo-slot .invoice-row { display: flex; align-items: center; gap: 0.35rem; }
.icp-photo-slot .invoice-row span.dollar { color: var(--text-3); font-weight: 600; }
.icp-photo-slot input[type="number"] { padding: 0.35rem 0.5rem; font-size: 0.85rem; }
.icp-photo-slot input[type="file"] { font-size: 0.75rem; padding: 0.3rem; }

/* Admin ICP photo card */
.admin-photo-card { background: var(--bg-elevated); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-photo-card.fit { border-color: var(--success); }
.admin-photo-card.unfit { border-color: var(--danger); opacity: 0.7; }
.admin-photo-card .img-wrap { aspect-ratio: 1; background: var(--bg-muted); overflow: hidden; }
.admin-photo-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-card .meta { padding: 0.7rem; font-size: 0.82rem; color: var(--text-2); }
.admin-photo-card .meta-row { display: flex; justify-content: space-between; gap: 0.5rem; }
.admin-photo-card .actions { display: flex; gap: 0.25rem; padding: 0 0.7rem 0.7rem; }
.admin-photo-card .actions form { flex: 1; margin: 0; }
.admin-photo-card .actions button { width: 100%; padding: 0.3rem; font-size: 0.78rem; }

/* Cal modal */
.cal-modal-overlay {
  position: fixed; inset: 0; background: rgba(24, 24, 27, 0.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 1rem;
  animation: fadeIn 0.2s var(--ease-fast);
}
.cal-modal-overlay.open { display: flex; }
.cal-modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 920px;
  height: min(720px, 92vh); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: scaleIn 0.25s var(--ease-spring);
}
.cal-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); }
.cal-modal-header h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-sans); }
.cal-modal-close { background: transparent; border: none; cursor: pointer; color: var(--text-3); font-size: 1.4rem; padding: 0.2rem 0.5rem; border-radius: 6px; line-height: 1; }
.cal-modal-close:hover { background: var(--bg-muted); color: var(--text-1); }
.cal-modal-body { flex: 1; min-height: 0; position: relative; }
.cal-modal-body iframe { width: 100%; height: 100%; border: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Stage detail layout */
.stage-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 900px) { .stage-layout { grid-template-columns: 1fr; } }
.stage-sidebar { position: sticky; top: 84px; }
.stage-sidebar-title { font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 0.75rem; font-family: var(--font-display); font-style: italic; font-weight: 500; }
.stage-sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.stage-sidebar-item a,
.stage-sidebar-item > span[role="link"] {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem;
  border-radius: 8px; color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  position: relative;
}
.stage-sidebar-item a:hover { background: var(--bg-muted); color: var(--text-1); text-decoration: none; }
.stage-sidebar-item.active a { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.stage-sidebar-item.locked > span[role="link"] {
  color: var(--text-4); cursor: not-allowed; user-select: none;
}
.stage-sidebar-item.locked .lock-tip {
  display: none; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  background: var(--dark); color: #fff; padding: 0.45rem 0.7rem; border-radius: 6px;
  font-size: 0.78rem; font-weight: 500; white-space: nowrap; margin-left: 0.5rem; z-index: 10;
  pointer-events: none; box-shadow: var(--shadow-md);
}
.stage-sidebar-item.locked > span[role="link"]:hover .lock-tip,
.stage-sidebar-item.locked > span[role="link"]:focus-visible .lock-tip { display: block; }
.stage-sidebar-item .num { font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--text-4); min-width: 1.5rem; font-family: var(--font-display); font-weight: 500; }
.stage-sidebar-item.active .num { color: var(--accent); }

.stage-content { min-width: 0; }
.stage-header { margin-bottom: 2rem; }
.stage-header h1 { margin-bottom: 0.4rem; }
.stage-header .stage-tagline { color: var(--text-2); font-size: 1.05rem; margin-bottom: 0.75rem; font-family: var(--font-display); font-style: italic; font-weight: 400; }
.stage-header .stage-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; color: var(--text-3); font-size: 0.88rem; }

.section { margin-bottom: 2.25rem; }
.section h2 { margin-bottom: 0.85rem; }

/* Submission recap card (renders client's answers structured, not raw JSON) */
.recap-card { background: var(--bg-canvas); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.recap-row { display: grid; grid-template-columns: 200px 1fr; gap: 0.75rem 1.25rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--border); }
.recap-row:last-child { border-bottom: none; }
.recap-label { color: var(--text-3); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.recap-value { color: var(--text-1); font-size: 0.95rem; line-height: 1.5; }
.recap-value pre { white-space: pre-wrap; word-wrap: break-word; margin: 0; background: transparent; padding: 0; font-family: inherit; }
@media (max-width: 640px) { .recap-row { grid-template-columns: 1fr; gap: 0.25rem; } }

.recap-gates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.4rem; }
.recap-gate { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.6rem; background: #fff; border-radius: 6px; border: 1px solid var(--border); font-size: 0.85rem; }
.recap-gate.passed { color: var(--success); }
.recap-gate.failed { color: var(--text-3); }
.recap-gate .check { font-weight: 700; }

/* Waiting state */
.waiting-card {
  background: linear-gradient(135deg, var(--bg-elevated), var(--warning-tint));
  border: 1px solid rgba(245, 158, 11, 0.3); border-radius: var(--radius-lg);
  padding: 1.5rem; display: flex; align-items: center; gap: 1.25rem;
}
.waiting-card .icon { font-size: 1.75rem; flex-shrink: 0; }
.waiting-card h3 { margin: 0 0 0.3rem; }
.waiting-card p { margin: 0; color: var(--text-2); font-size: 0.92rem; }

/* Markdown rendered content */
.md-content { color: var(--text-2); line-height: 1.65; }
.md-content h1, .md-content h2, .md-content h3 { color: var(--text-1); margin-top: 1.5em; }
.md-content h1:first-child, .md-content h2:first-child, .md-content h3:first-child { margin-top: 0; }
.md-content ul, .md-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.md-content li { margin-bottom: 0.35em; }
.md-content blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--text-3); margin: 1em 0; font-style: italic; }
.md-content table { margin: 1em 0; }
.md-content code { font-size: 0.88em; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 4rem; color: var(--text-3); font-size: 0.88rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; max-width: 1280px; margin: 0 auto; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--text-2); }

/* Auth-card layout */
.auth-shell { display: flex; align-items: center; justify-content: center; min-height: 80vh; padding: 2rem 1.25rem; }
.auth-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.25rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.auth-card .auth-sub { color: var(--text-3); margin-bottom: 1.5rem; font-size: 0.95rem; }
.auth-card .auth-footer { margin-top: 1.25rem; text-align: center; color: var(--text-3); font-size: 0.88rem; }

/* Subtle paper grain for editorial surfaces */
.grain-bg, .recap-card, .landing-stages {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(24,24,27,0.04) 1px, transparent 0);
  background-size: 18px 18px;
}
.recap-card { background-color: var(--bg-canvas); }
.landing-stages { background-color: var(--bg-canvas); }

/* Landing */
.landing-hero { padding: 4.5rem 0 2.5rem; }
.landing-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 880px) { .landing-hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.landing-kicker { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--accent); font-size: 1rem; margin-bottom: 0.75rem; letter-spacing: -0.005em; }
.landing-headline { font-size: clamp(2.3rem, 1.5rem + 2.8vw, 4.25rem); margin-bottom: 1.1rem; }
.landing-sub { font-size: 1.08rem; color: var(--text-2); max-width: 30rem; margin-bottom: 1.75rem; line-height: 1.55; }
.landing-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.landing-trust { font-size: 0.82rem; color: var(--text-3); margin-top: 1.5rem; line-height: 1.5; font-family: var(--font-display); font-style: italic; }

.collage { position: relative; min-height: 380px; }
.collage-tile {
  position: absolute; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 0.85rem; box-shadow: var(--shadow-lg);
  font-family: var(--font-display); font-weight: 500;
}
.collage-tile-1 {
  top: 0; left: 8%; width: 220px; transform: rotate(-3deg);
  background: linear-gradient(135deg, #fff, var(--accent-tint-2));
}
.collage-tile-2 {
  top: 80px; right: 0; width: 200px; transform: rotate(4deg);
  background: #fff;
}
.collage-tile-3 {
  bottom: 20px; left: 22%; width: 240px; transform: rotate(-1.5deg);
  background: linear-gradient(135deg, #fff, var(--bg-canvas));
}
.collage-tile .label { color: var(--text-3); font-family: var(--font-sans); font-style: normal; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem; }
.collage-tile .quote { color: var(--text-1); font-size: 1.05rem; line-height: 1.3; }

.landing-stages { padding: 3rem 0 5rem; background: var(--bg-canvas); margin-top: 3rem; }
.landing-stages h2 { text-align: center; margin-bottom: 2rem; }
.landing-stages h2 em { font-style: italic; color: var(--accent); }
.landing-stage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem;
}
.landing-stage { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; position: relative; min-height: 130px; }
.landing-stage .numeral {
  position: absolute; top: -0.25rem; right: 0.85rem;
  font-family: var(--font-display); font-weight: 500; font-size: 3.5rem;
  color: var(--text-5); line-height: 1; opacity: 0.7;
}
.landing-stage h4 { margin-bottom: 0.4rem; max-width: 80%; position: relative; z-index: 1; }
.landing-stage p { margin: 0; color: var(--text-3); font-size: 0.88rem; line-height: 1.5; }

/* Needs-review queue */
.queue-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.queue-card h2 { font-size: 1.25rem; margin-bottom: 0.85rem; }
.queue-card.empty { background: var(--success-tint); border-color: rgba(16, 185, 129, 0.3); }
.queue-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.queue-item { display: flex; align-items: center; gap: 1rem; padding: 0.65rem 0.85rem; background: var(--bg-muted); border-radius: 8px; }
.queue-item .days { font-weight: 700; color: var(--warning); min-width: 50px; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.queue-item .days.stale { color: var(--danger); }
.queue-item .name { flex: 1; font-weight: 600; color: var(--text-1); }
.queue-item .stage { color: var(--text-3); font-size: 0.88rem; }

/* Misc helpers */
.stack-sm > * + * { margin-top: 0.5rem; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 0.88rem; }
.text-xs { font-size: 0.78rem; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 2rem; }
.tag { display: inline-block; padding: 0.2rem 0.55rem; background: var(--bg-muted); color: var(--text-2); border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.tag-accent { background: var(--accent-tint); color: var(--accent); }
.divider-soft { border: none; border-top: 1px dashed var(--border); margin: 1.5rem 0; }

/* Reduced motion — honor the OS setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .icp-photo-slot, .icp-photo-slot:nth-child(odd), .icp-photo-slot:nth-child(even) { transform: none; }
  .collage-tile { transform: none !important; }
  .stage-card:hover, .stage-card-hero:hover, .btn:hover { transform: none; }
  .progress-fill { transition: none; }
}
