/* Job Application AI — design system (modern AI SaaS) */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  /* Color */
  --primary: #0e7490;
  --primary-hover: #0c5f75;
  --secondary: #0369a1;
  --background: #f3f5f8;
  --bg: var(--background);
  --surface: #ffffff;
  --card: var(--surface);
  --text: #0f172a;
  --ink: var(--text);
  --text-muted: #475569;
  --muted: var(--text-muted);
  --border: #e2e8f0;
  --line: var(--border);
  --brand: var(--primary);
  --brand-hover: var(--primary-hover);
  --brand-ink: #164e63;
  --brand-soft: rgba(14, 116, 144, 0.1);
  --accent: var(--secondary);
  --success: #15803d;
  --ok: var(--success);
  --warning: #a16207;
  --warn: var(--warning);
  --error: #b91c1c;
  --danger: var(--error);
  --info: #0369a1;
  --focus: var(--primary);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius: var(--radius-md);

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 18px rgba(15, 23, 42, 0.07);
  --shadow: var(--shadow-md);

  /* Space scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  /* Layout */
  --touch: 48px;
  --sidebar-w: 15rem;
  --header-h: 4rem;
  --container: 72rem;

  /* Type */
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Outfit", "Source Sans 3", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(14, 116, 144, 0.09), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(3, 105, 161, 0.06), transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: clip;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--brand-hover); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.btn:focus-visible, button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: var(--space-3); top: var(--space-3); z-index: 100;
  padding: 0.65rem 1rem; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; font-weight: 700;
  transform: translateY(-150%);
}
.skip-link:focus, .skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--brand-ink);
  outline-offset: 2px;
}

img, video, canvas, svg { max-width: 100%; height: auto; }
.container {
  width: min(var(--container), calc(100% - 1.5rem));
  max-width: var(--container);
  margin-inline: auto;
}
/* When combined with .panel, keep horizontal centering (panel only sets block margins) */
.container.panel { margin-inline: auto; }

/* ——— Header ——— */
.site-header, .app-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(243, 245, 248, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  min-height: var(--header-h);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: var(--header-h); position: relative;
  padding-block: 0.35rem;
}
.brand {
  font-family: var(--display); font-weight: 700; color: var(--brand-ink);
  font-size: 1.15rem; letter-spacing: -0.025em; text-decoration: none;
  min-width: 0; overflow-wrap: anywhere; flex-shrink: 0;
  line-height: 1.2; padding: 0.35rem 0;
  transition: color 0.15s ease;
}
.brand:hover { text-decoration: none; color: var(--brand); }
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.2rem; margin-left: auto;
}
.nav-links a.nav-item,
.nav-links > a:not(.btn) {
  color: var(--muted); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; white-space: nowrap;
  padding: 0.45rem 0.7rem; border-radius: 999px;
  line-height: 1.25;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a.nav-item:hover,
.nav-links > a:not(.btn):hover {
  color: var(--brand-ink); background: var(--brand-soft);
  text-decoration: none;
}
.nav-links a.nav-item-muted { color: var(--ink); font-weight: 600; }
.nav-links a.is-active,
.nav-links a.nav-item.is-active,
.side-nav a.active {
  color: var(--brand-ink);
  background: var(--brand-soft);
}
.nav-links a.is-active:hover,
.nav-links a.nav-item.is-active:hover {
  color: var(--brand-ink); background: rgba(14, 116, 144, 0.14);
}
.nav-sep {
  display: inline-block; width: 1px; height: 1.15rem;
  background: var(--line); margin: 0 0.35rem; flex-shrink: 0;
  align-self: center;
}
.btn.btn-nav-cta,
.nav-links .btn.btn-nav-cta {
  min-height: 2.5rem; min-width: 0;
  padding: 0.5rem 1.05rem;
  font-size: 0.92rem; font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(14, 116, 144, 0.22);
  margin-left: 0.15rem;
}
.btn.btn-nav-cta:hover {
  box-shadow: 0 2px 8px rgba(14, 116, 144, 0.28);
}
.menu-toggle {
  display: none;
  flex-shrink: 0;
  min-height: 2.5rem; min-width: 2.5rem;
  padding: 0.45rem 0.85rem; gap: 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
}
.menu-toggle-icon {
  position: relative; display: block; width: 1.1rem; height: 0.85rem;
  flex-shrink: 0;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: 1px;
  transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
}
.menu-toggle-icon::before { top: 0; box-shadow: 0 5px 0 currentColor; }
.menu-toggle-icon::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
  top: 50%; box-shadow: none; transform: translateY(-50%) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
  bottom: auto; top: 50%; transform: translateY(-50%) rotate(-45deg);
}
.menu-toggle-text { font-family: var(--font); }

/* ——— Buttons ——— */
.btn, button.btn, input[type=submit].btn, button:not([class]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: var(--touch); min-width: var(--touch); padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 0; background: var(--brand); color: #fff; font-weight: 700;
  cursor: pointer; text-decoration: none; box-shadow: none;
  font-size: 1rem; line-height: 1.2; white-space: normal; text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--brand-hover); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled], button:disabled {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}
.btn-secondary {
  background: var(--surface); color: var(--brand-ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-secondary:hover { background: #f8fafc; color: var(--brand-ink); border-color: #cbd5e1; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #025a8a; color: #fff; }
.btn-ghost {
  background: transparent; color: var(--brand-ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; background: #991b1b; }
.btn-link {
  display: inline; min-height: 0; min-width: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: var(--brand); font-weight: 600;
  text-decoration: underline; cursor: pointer;
}
.btn-link:hover { filter: none; color: var(--brand-ink); text-decoration: underline; background: none; }
.btn-block { width: 100%; }
.btn[aria-busy="true"], button[aria-busy="true"] {
  position: relative; opacity: 0.85; pointer-events: none;
}
.btn[aria-busy="true"]::after, button[aria-busy="true"]::after {
  content: ""; width: 0.9rem; height: 0.9rem; margin-left: 0.35rem;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  border-radius: 50%; animation: jaai-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.btn-secondary[aria-busy="true"]::after,
.btn-ghost[aria-busy="true"]::after,
.btn-link[aria-busy="true"]::after {
  border-color: rgba(15, 23, 42, 0.2); border-top-color: var(--brand-ink);
}
form.is-loading [data-loading-status], .is-loading-status {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem;
  color: var(--brand-ink); font-weight: 600;
}
form.is-loading [data-loading-status][hidden] { display: flex !important; }
.spinner, .is-loading::before {
  display: inline-block; width: 1rem; height: 1rem;
  border: 2px solid rgba(15, 23, 42, 0.15); border-top-color: var(--brand);
  border-radius: 50%; animation: jaai-spin 0.7s linear infinite; vertical-align: -0.15em;
}
@keyframes jaai-spin { to { transform: rotate(360deg); } }

/* ——— Filters / tabs / pagination ——— */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end;
}
.filter-bar > div { flex: 1 1 12rem; min-width: 0; }
.tabs { display: grid; gap: var(--space-4); }
.tab-list {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.35rem;
}
.tab-list [role="tab"], .tab-list .tab {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font-weight: 700; padding: 0.55rem 0.9rem; border-radius: var(--radius-sm);
  cursor: pointer; min-height: var(--touch);
}
.tab-list [role="tab"][aria-selected="true"], .tab-list .tab.is-active {
  background: var(--brand-soft); color: var(--brand-ink);
}
.tab-panel[hidden] { display: none; }
.pagination {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: center;
  margin: var(--space-4) 0;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.5rem; min-width: 2.5rem; padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 600;
}
.pagination .is-current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ——— Empty states ——— */
.empty-state {
  color: var(--muted); text-align: center;
  padding: var(--space-6) var(--space-5);
  max-width: 36rem; margin-inline: auto;
}
.empty-state-title {
  font-family: var(--display); font-size: 1.25rem; color: var(--ink);
  margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.02em;
}
.empty-state .help { margin: 0 auto 0.85rem; max-width: 28rem; }
.empty-state-actions { justify-content: center; margin: 0.75rem 0 0; }
.board-empty-wrap { grid-column: 1 / -1; }

/* ——— Marketing hero (full-bleed capable) ——— */
.hero {
  display: grid; gap: var(--space-5); padding: var(--space-6) 0 var(--space-4);
  position: relative;
}
.hero-bleed {
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  padding: var(--space-8) max(1.5rem, calc((100vw - var(--container)) / 2));
  background:
    linear-gradient(160deg, #0c4a6e 0%, #0e7490 48%, #155e75 100%);
  color: #f8fafc;
}
.hero-bleed .brand-mark {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em; margin: 0 0 var(--space-4); color: #fff;
}
.hero-bleed h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.15rem); font-weight: 600;
  max-width: 28rem; color: #e2e8f0; margin-bottom: var(--space-3);
}
.hero-bleed .lead { color: #cbd5e1; max-width: 36rem; }
.hero-bleed .btn { box-shadow: var(--shadow-sm); }
.hero-bleed .btn-secondary {
  background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.35);
}
.hero-bleed .btn-secondary:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.hero-bleed .btn-ghost {
  color: #fff; border-color: rgba(255, 255, 255, 0.35);
}
.hero-bleed .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.hero-bleed .help { color: #94a3b8; }
.hero-bleed a:not(.btn) { color: #a5f3fc; }

@media (min-width: 900px) {
  .hero:not(.hero-bleed) { grid-template-columns: 1.2fr 0.8fr; align-items: center; padding: var(--space-8) 0 var(--space-6); }
}

.eyebrow {
  display: inline-block; padding: 0.3rem 0.7rem; border-radius: var(--radius-sm);
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 0.85rem;
}

h1, h2, h3 {
  font-family: var(--display); line-height: 1.2; margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
.page-header { margin-bottom: var(--space-5); }
.page-header .lead { margin-top: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 42rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }

.card-grid { display: grid; gap: var(--space-4); }
@media (min-width: 700px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.stat-card {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.stat-card .stat-value {
  font-family: var(--display); font-size: 1.85rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--ink); line-height: 1.1;
}
.stat-card .stat-label { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.workflow { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }
@media (min-width: 800px) {
  .workflow { grid-template-columns: repeat(6, 1fr); }
}
.workflow .step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem; text-align: center; font-weight: 700; font-size: 0.9rem;
}

/* margin-block only — do not override .container's margin-inline: auto */
.panel { margin-block: 1.25rem 2rem; }

.flash {
  border-radius: var(--radius-sm); padding: 0.9rem 1rem; margin: 1rem 0; font-weight: 600;
}
.flash-success { background: #ecfdf5; color: var(--ok); }
.flash-error { background: #fef2f2; color: var(--danger); }
.flash-success::before { content: "Success: "; font-weight: 700; }
.flash-error::before { content: "Error: "; font-weight: 700; }

.form-grid { display: grid; gap: var(--space-4); }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: var(--touch); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  background: #fff; font: inherit; color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #cbd5e1; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { min-height: 140px; resize: vertical; }
.help { color: var(--muted); font-size: 0.92rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.badge {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-ink);
}
.badge-warn { background: #fef9c3; color: var(--warn); }
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-ok { background: #ecfdf5; color: var(--ok); }

/* ——— App shell + sidebar ——— */
.app-shell { display: grid; gap: var(--space-5); }
@media (min-width: 960px) {
  .app-shell { grid-template-columns: var(--sidebar-w) 1fr; align-items: start; }
}
.side-nav {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-3); position: sticky; top: calc(var(--header-h) + 0.75rem);
  box-shadow: var(--shadow-sm);
}
.side-nav .nav-group {
  display: grid; gap: 0.15rem; margin-bottom: var(--space-4);
}
.side-nav .nav-group:last-child { margin-bottom: 0; }
.side-nav .nav-group-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.35rem 0.8rem 0.5rem;
}
.side-nav a {
  display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.side-nav a.active {
  background: var(--brand-soft); color: var(--brand-ink); text-decoration: none;
}
.side-nav a:hover { background: #f1f5f9; text-decoration: none; }
.side-nav a.active:hover { background: var(--brand-soft); }
.nav-mobile-extra { display: none; }
.app-shell > section { min-width: 0; }

.progress {
  height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 0.75rem 0 1rem;
}
.progress > span {
  display: block; height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width 0.35s ease;
}

/* ——— Chat ——— */
.chat-shell {
  display: grid; gap: var(--space-4);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-4); box-shadow: var(--shadow-sm); min-height: 24rem;
}
.chat-log { display: grid; gap: 0.75rem; max-height: 60vh; overflow: auto; padding: var(--space-2); }
.bubble {
  padding: 0.85rem 1rem; border-radius: var(--radius-md); max-width: 88%;
  line-height: 1.5;
}
.bubble-user {
  background: var(--brand); color: #fff; margin-left: auto;
  border-bottom-right-radius: var(--radius-sm);
}
.bubble-assistant {
  background: #f8fafc; border: 1px solid var(--line);
  border-bottom-left-radius: var(--radius-sm);
}
.chat-compose {
  display: flex; gap: var(--space-2); align-items: flex-end;
  border-top: 1px solid var(--line); padding-top: var(--space-3);
}

/* ——— CV document ——— */
.cv-sheet {
  background: #fff; padding: 1.75rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.cv-sheet h1 { font-size: 1.6rem; }
.cv-sheet h2 {
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0; padding-bottom: 0.25rem; color: var(--brand-ink);
}
.cv-sheet.spacing-compact { line-height: 1.25; }
.cv-sheet.spacing-relaxed { line-height: 1.65; }
.cv-sheet.template-graduate h1 { color: var(--brand); }
.cv-sheet.template-executive h1 { font-family: var(--display); letter-spacing: 0.02em; }
.cv-sheet.template-technical h2 { border-color: var(--brand); color: var(--brand-ink); }
.cv-sheet.template-creative h1 { color: var(--accent); }
.cv-sheet.template-academic h2 { font-variant: small-caps; }
.cv-sheet.template-simple h2 { border: 0; border-bottom: 2px solid #0f172a; }
.cv-sheet.template-international header p { font-size: 0.9rem; }
.cv-sheet.layout-sidebar { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) {
  .cv-sheet.layout-sidebar { grid-template-columns: minmax(8rem, 28%) 1fr; }
}
.cv-sheet .cv-side { background: #f1f5f9; padding: 1rem; border-radius: var(--radius-sm); min-width: 0; }
.cv-sheet .cv-side h1 { font-size: 1.25rem; }
.cv-sheet .cv-main { padding: 0.25rem 0.5rem; min-width: 0; }
.cv-sheet, .cv-sheet * { overflow-wrap: anywhere; word-break: break-word; }

.section-item { cursor: grab; position: relative; padding-left: 2rem; }
.section-item .drag-handle {
  position: absolute; left: 0.5rem; top: 0.85rem; cursor: grab; color: var(--muted); user-select: none;
}
.section-item.dragging { opacity: 0.55; }
.section-list { display: grid; gap: 0.75rem; }

.recovery-codes {
  list-style: none; padding: 0; margin: 0.75rem 0 1rem;
  display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}
.recovery-codes code {
  display: block; padding: 0.45rem 0.6rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 0.95rem; text-align: center;
}

.timeline { border-left: 3px solid var(--brand); padding-left: 1rem; display: grid; gap: 1rem; }
.timeline .item { position: relative; }
.timeline .item::before {
  content: ""; position: absolute; left: -1.45rem; top: 0.35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff;
}

.footer { padding: var(--space-6) 0 var(--space-8); color: var(--muted); font-size: 0.95rem; }
.footer a { color: var(--muted); font-weight: 600; }
.footer a:hover { color: var(--brand); }

.choice {
  display: block; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff; margin-bottom: 0.75rem;
}
.choice:hover { border-color: var(--brand); background: #f8fafc; }
.choice input { margin-right: 0.5rem; }
.stack { display: grid; gap: 0.75rem; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.mic-btn { min-width: var(--touch); }
.voice-status-error { color: var(--danger); font-weight: 700; }
.voice-status-error::before { content: "Error: "; }

/* ——— Board ——— */
.board-scroll {
  display: flex; gap: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem; align-items: flex-start; max-width: 100%;
}
.board-col {
  flex: 0 0 240px; background: #f8fafc; border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 0.75rem; min-height: 280px;
}
.board-col header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.board-col h2 { font-size: 0.95rem; margin: 0; }
.board-cards { display: grid; gap: 0.65rem; }
.board-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s ease;
}
.board-card:hover { border-color: #cbd5e1; }
.board-card h3 { font-size: 1rem; margin: 0 0 0.35rem; }
.board-card p { margin: 0 0 0.35rem; font-size: 0.9rem; }
.board-move select { width: 100%; font-size: 0.85rem; }
.board-empty { font-size: 0.85rem; margin: 0; }
.board-cards.drag-over { outline: 2px dashed var(--brand); outline-offset: 4px; border-radius: 10px; }
.board-card.dragging { opacity: 0.45; }

.funnel-list { display: grid; gap: 0.5rem; }
.funnel-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.75rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.compare-pre {
  white-space: pre-wrap; font-family: inherit; font-size: 0.85rem; margin: 0; max-width: 100%;
}

/* ——— Match meter ——— */
.match-meter { display: grid; gap: var(--space-3); }
.match-score {
  font-family: var(--display); font-size: 2.5rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--brand-ink); line-height: 1;
}
.match-bar {
  display: grid; grid-template-columns: 6rem 1fr auto; gap: var(--space-3); align-items: center;
}
.match-bar .track {
  height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.match-bar .fill { height: 100%; background: var(--brand); border-radius: inherit; }

/* ——— Modal / file ——— */
dialog.modal, .modal-panel {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem;
  max-width: min(36rem, calc(100vw - 2rem)); width: 100%;
  box-shadow: var(--shadow-md); background: var(--card); color: var(--ink);
}
dialog.modal::backdrop { background: rgba(15, 23, 42, 0.45); }
dialog.modal[open] { display: grid; gap: 1rem; }
dialog.modal .modal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
dialog.modal:focus { outline: none; }
dialog.modal:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.file-field input[type=file] {
  width: 100%; max-width: 100%; min-height: var(--touch);
  padding: 0.55rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fff;
}

.cv-workspace {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 1100px) {
  .cv-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .cv-workspace .cv-preview-pane {
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
    max-height: calc(100vh - 6rem);
    overflow: auto;
  }
}
.interview-focus {
  max-width: 40rem;
  margin-inline: auto;
}
.interview-focus .ai-prompt,
.ai-prompt {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--brand-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.interview-focus .ai-prompt h2,
.ai-prompt h2 { margin: 0; font-size: 1.25rem; }
.step-rail {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 var(--space-4);
}
.step-rail span {
  display: inline-block; padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 700;
  background: #f1f5f9; color: var(--muted);
}
.step-rail span.is-current {
  background: var(--brand-soft); color: var(--brand-ink);
}
.step-rail span.is-done {
  background: #ecfdf5; color: var(--ok);
}
.auth-card {
  max-width: 28rem;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.score-grid .score-cell {
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.65rem;
  text-align: center;
}
.score-grid .score-cell strong {
  display: block; font-family: var(--display);
  font-size: 1.25rem; color: var(--brand-ink);
}

/* ——— Marketing sections ——— */
.section-block { padding: var(--space-8) 0; }
.section-block + .section-block { border-top: 1px solid var(--line); }
.section-block h2 { margin-bottom: var(--space-3); }
.feature-list { display: grid; gap: var(--space-4); }
@media (min-width: 700px) {
  .feature-list.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ——— Mobile ——— */
@media (max-width: 959px) {
  .side-nav { display: none; }
  .nav-mobile-extra { display: block; }
  .nav-sep { display: none; }
  .nav-links { display: none; margin-left: 0; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem;
    position: absolute; left: 0; right: 0; top: calc(100% + 0.35rem);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 0.75rem; z-index: 40;
    max-height: min(70vh, calc(100dvh - 80px)); overflow: auto;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
  }
  .nav-links.open a.nav-item,
  .nav-links.open > a:not(.btn) {
    width: 100%; justify-content: flex-start;
    padding: 0.75rem 0.9rem; border-radius: var(--radius-sm);
    font-size: 1rem; color: var(--ink);
  }
  .nav-links.open a.nav-item.is-active,
  .nav-links.open a.is-active {
    background: var(--brand-soft); color: var(--brand-ink);
  }
  .nav-links.open .btn,
  .nav-links.open button {
    width: 100%; justify-content: center;
  }
  .nav-links.open .btn.btn-nav-cta {
    margin: 0.35rem 0 0; border-radius: var(--radius-sm);
    min-height: var(--touch);
  }
  .nav-links.open form { display: block; width: 100%; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .brand { flex: 1 1 auto; min-width: 0; padding-right: 0.5rem; }
  .menu-toggle-text { display: none; }
  .app-shell > section { min-width: 0; }
  .card, .panel, .form-grid, .stack { min-width: 0; }
  .cta-row { gap: 0.5rem; }
  .cta-row .btn, .cta-row a.btn { flex: 1 1 auto; }
  .filter-bar, form.card[style*="display:flex"] {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end;
  }
  .filter-bar > div, form.card[style*="display:flex"] > div {
    flex: 1 1 100%; min-width: 0 !important; max-width: 100%;
  }
  th, td { font-size: 0.92rem; padding: 0.55rem 0.4rem; }
  .chat-log { max-height: min(50vh, 24rem); }
  .bubble { max-width: 100%; }
  .compare-pre { max-width: 100%; }
  .board-col { flex: 0 0 min(240px, 78vw); }
  .cv-sheet { padding: 1rem; }
  h1 { font-size: clamp(1.55rem, 7vw, 2.2rem); }
  .lead { font-size: 1rem; }
  input, select, textarea, button, .btn { font-size: 16px; }
  .hero-bleed { padding: var(--space-6) 1.25rem; }
}
@media (min-width: 960px) {
  .menu-toggle { display: none !important; }
}

/* PWA install / update banner (subtle, non-blocking) */
.pwa-banner {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  width: min(34rem, calc(100% - 1.5rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: pwa-banner-in 0.35s ease both;
}
.pwa-banner-msg {
  margin: 0;
  flex: 1 1 12rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.pwa-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pwa-banner .btn {
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}
@keyframes pwa-banner-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .pwa-banner { animation: none; }
}
