:root {
  /* "Oman Interview Ready" theme — warm sand, deep green, gold/red accents. */
  --bg: #F5F1E7;
  --surface: #FFFCF7;
  --text: #10231D;
  --muted: #5E6F68;
  --primary: #0B5B4A;
  --primary-dark: #073D32;
  --accent-red: #B0262E;
  --accent-gold: #D6A94F;
  --border: #DED2BD;
  --success: #167A5B;
  --warning: #D6A94F;
  --danger: #B0262E;
  /* Legacy aliases so existing components keep their styling on the new theme. */
  --accent: #0B5B4A;
  --accent-strong: #0B5B4A;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
}

nav { display: flex; gap: 16px; align-items: center; }

.user-email { color: var(--muted); font-size: 14px; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}

.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 32px; max-width: 580px; }

.how { margin-top: 64px; }
.how h2 { font-size: 22px; }
.how ol { padding-left: 20px; color: var(--muted); }

.tagline {
  margin-top: 18px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--primary); font-size: 15px;
}
.home-points {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 56px;
}
.home-points .panel { box-shadow: 0 1px 3px rgba(16, 35, 29, 0.05); }
.home-points h2 { font-size: 18px; }
@media (max-width: 720px) {
  .home-points { grid-template-columns: 1fr; }
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary { background: var(--primary); color: #FFFCF7; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-lg { padding: 14px 22px; font-size: 16px; }

.link-button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.link-button:hover { color: var(--text); }

.inline-form { display: inline; }

.upload-section h1 { margin-top: 0; }
.upload-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface);
}
.file-drop input { display: none; }
.file-drop.has-file {
  border-color: var(--primary);
  border-style: solid;
  color: var(--text);
  background: #E6F0EB;
}
#analyzeBtn:disabled { opacity: 0.7; cursor: default; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.bottombar {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* --- Alerts --- */
.alert {
  background: #F7E7E3;
  border: 1px solid var(--danger);
  color: #7A1D22;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* --- Review / scorecard --- */
.review { display: flex; flex-direction: column; gap: 28px; }

.score-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 16px;
}
.score-big {
  flex: 0 0 auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1b2a3f, #0e1626);
  border: 3px solid var(--accent-strong);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.score-num { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1; }
.score-denom { color: var(--muted); font-size: 16px; }
.score-headline h1 { margin: 0 0 8px; font-size: 26px; }
.score-headline .lede { margin: 0 0 6px; font-size: 17px; }

.subscores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}
.subscore-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.subscore-head strong { color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .score-hero { flex-direction: column; text-align: center; }
  .subscores { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.panel h2 { margin-top: 0; font-size: 18px; }

.strengths { padding-left: 18px; }
.strengths li { margin-bottom: 10px; }

.improvements { padding-left: 18px; }
.improvements li { margin-bottom: 18px; }
.imp-issue { font-weight: 600; margin-bottom: 4px; }
.imp-fix { color: var(--text); margin-bottom: 6px; }
.imp-example {
  background: #0e1626;
  border-left: 3px solid var(--accent-strong);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: pre-wrap;
}

.questions .q { display: block; margin: 14px 0; }
.questions .q span { display: block; margin-bottom: 6px; }
.questions .q input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

/* --- Upload: optional job-description field --- */
.jd-label { font-weight: 600; margin-top: 4px; }
.jd-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

/* --- Interview Readiness report (v2) --- */
.readiness { text-align: center; margin: 8px 0 2px; }
.readiness .num { font-size: 76px; font-weight: 800; line-height: 1; }
.readiness .den { font-size: 26px; font-weight: 600; }
.readiness .label {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}
.review { align-items: stretch; }
.diagnosis {
  text-align: center; font-size: 19px; line-height: 1.4;
  margin: 6px auto 14px; max-width: 620px;
}

/* Sub-score bars: <div class="bar"><span>label</span><i style="width:N%"></i><b>N</b></div> */
.bar { display: flex; align-items: center; gap: 14px; margin: 12px 0; font-size: 15px; }
.bar > span { flex: 0 0 160px; color: var(--muted); }
.bar > i {
  height: 14px; border-radius: 999px; background: var(--primary);
  min-width: 3px; transition: width 0.3s ease;
}
.bar > b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Status / keyword chips */
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  background: #ECE3D2; color: var(--text); margin: 2px 6px 2px 0;
}
.chip.gold { background: var(--accent-gold); color: #3A2E10; }
.chip.needs_work { background: #F4D9DA; color: var(--accent-red); }
.chip.ok { background: #D6EBE2; color: var(--success); }

/* Gap map */
.gapmap { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 12px; }
.gapmap li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(16, 35, 29, 0.05);
}
.gapmap strong { display: block; margin: 6px 0 4px; }
.gapmap .fix { color: var(--muted); font-size: 14px; }

.keywords { margin-top: 8px; }
.keywords h3 { font-size: 16px; margin: 0 0 8px; }

.estimate {
  background: #EAF3EF; border: 1px solid var(--success);
  border-radius: var(--radius); padding: 14px 16px;
}
.privacy { color: var(--muted); font-size: 13px; }

/* Paid CTAs */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; }
.reassure { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* --- Multi-pass audit detail (only rendered when analysis.audit exists) --- */
/* "Why this score" — collapsible per-category breakdown with quoted evidence */
.why {
  margin: 14px 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.why > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--primary);
  list-style: none;
}
.why > summary::-webkit-details-marker { display: none; }
.why > summary::after { content: ' ▾'; color: var(--muted); }
.why[open] > summary::after { content: ' ▴'; }
.why-body { padding: 4px 16px 14px; }
.why-cat { padding: 12px 0; border-top: 1px solid var(--border); }
.why-cat-head { display: flex; align-items: baseline; justify-content: space-between; }
.why-pts { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary); }
.why-reason { margin: 4px 0; font-size: 14px; }
.why-ev { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.why-ev li { margin: 2px 0; font-style: italic; }
.why-trail { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.why-trail h4 { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.why-trail ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* Advisor cluster: priority actions, before/after, candidate questions */
.priority, .cqs { margin: 16px 0; }
.priority h3, .cqs h3, .beforeafter h3, .reqs h3, .prep h3 { font-size: 16px; margin: 0 0 8px; }
.priority ol, .cqs ul { margin: 0; padding-left: 20px; }
.priority li, .cqs li { margin: 4px 0; }
.beforeafter { margin: 16px 0; }
.ba {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px; background: var(--surface);
}
.ba-line { display: flex; gap: 10px; margin: 4px 0; font-size: 14px; }
.ba-tag {
  flex: 0 0 56px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding-top: 2px;
}
.ba-before .ba-tag { color: var(--accent-red); }
.ba-after .ba-tag { color: var(--success); }
.ba-after { font-weight: 500; }
.ba-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* Must-have requirements table (job-description mode) */
.reqs { margin: 16px 0; }
.reqs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.reqs-table th, .reqs-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.reqs-table th { color: var(--muted); font-weight: 600; }
.reqs-table td:nth-child(2) { white-space: nowrap; }

/* Interview prep */
.prep { margin: 18px 0; }
.prep-qs, .prep-topics { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.prep-qs li, .prep-topics li {
  border-left: 3px solid var(--accent-strong); padding: 4px 0 4px 12px;
}
.prep-qs strong, .prep-topics strong { display: block; }

/* Admin requests table */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-table tbody tr:hover { background: var(--surface); }

/* ============================================================
   Home page — Oman hero with photo + floating stat cards
   ============================================================ */
.topbar { position: sticky; top: 0; z-index: 30; }
.brand { color: var(--primary); }

/* Google sign-in button with brand mark */
.btn-google { display: inline-flex; align-items: center; gap: 9px; }
.g-mark {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; background: #fff; border-radius: 50%;
}

/* main element on the home page spans full width (no narrow container) */
.home-main { display: block; }

/* --- Hero band --- */
.hero-band {
  background: linear-gradient(180deg, #FBF8F1 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  overflow-x: clip; /* guards against any floating-card overhang causing scroll */
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 56px 32px 64px;
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center;
}

.hero-copy { max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: #E6F0EB; color: var(--primary);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  border: 1px solid #CFE2D8;
}
.hero-copy h1 {
  font-size: 52px; line-height: 1.08; margin: 20px 0 18px; letter-spacing: -0.5px;
}
.hero-copy h1 .hl { color: var(--primary); }
.hero-copy .lede { font-size: 19px; margin: 0 0 28px; }

.btn-cta { display: inline-flex; align-items: center; gap: 9px; box-shadow: 0 8px 22px rgba(11, 91, 74, 0.22); }
.btn-cta:hover { box-shadow: 0 10px 26px rgba(11, 91, 74, 0.28); }

.privacy-line {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); font-size: 14px; margin: 18px 0 0;
}
.hero-copy .tagline { margin-top: 14px; font-size: 16px; }

/* --- Hero visual: clean standalone photo --- */
.hero-visual { position: relative; }
.hero-photo {
  min-height: 520px; border-radius: 22px;
  background:
    url('/img/hero-oman.webp') 50% 24% / cover no-repeat,
    linear-gradient(155deg, #E8E0CF 0%, #D4C9B1 100%);
  box-shadow: 0 24px 60px rgba(16, 35, 29, 0.18);
}

/* --- Stat cards: a tidy full-width row below the hero (no longer overlaying the photo) --- */
.hero-cards {
  max-width: 1200px; margin: 0 auto; padding: 4px 32px 60px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch;
}
.float-card {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  box-shadow: 0 8px 24px rgba(16, 35, 29, 0.08);
}
.fc-title { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.fc-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.fc-row { display: flex; align-items: center; gap: 8px; }
.fc-row strong { font-size: 16px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); display: inline-block; }

.fc-score { text-align: center; }
.fc-score .fc-title { text-align: center; }
.fc-score .fc-row { justify-content: center; }
.gauge { position: relative; width: 120px; height: 66px; margin: 2px auto 4px; }
.gauge svg { display: block; }
.gauge-track { fill: none; stroke: #E7DEC9; stroke-width: 11; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: var(--primary); stroke-width: 11; stroke-linecap: round; }
.gauge-num { position: absolute; left: 0; right: 0; bottom: -2px; font-size: 26px; font-weight: 800; color: var(--primary); }
.gauge-num small { font-size: 12px; font-weight: 600; color: var(--muted); }

.check-circle {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--success);
}

.fc-big { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.fc-bar { height: 8px; background: #E7DEC9; border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.fc-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

.fc-list { list-style: none; padding: 0; margin: 4px 0 10px; }
.fc-list li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 4px 0; }
.fc-list svg { flex: 0 0 auto; }
.fc-link { color: var(--primary); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.fc-link:hover { text-decoration: underline; }

/* --- Features band --- */
.features-band { padding: 56px 32px 40px; }
.features-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 26px;
  box-shadow: 0 1px 3px rgba(16, 35, 29, 0.05);
}
.feature-ic {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: 14px; background: #E6F0EB; color: var(--primary); margin-bottom: 14px;
}
.feature-card h2 { font-size: 19px; margin: 0 0 8px; }
.feature-card p { margin: 0; font-size: 14.5px; }

.trust {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 14px; margin: 40px 0 8px;
}
.trust svg { color: var(--primary); }

/* --- Responsive --- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 24px 28px; }
  .hero-copy { max-width: none; }
  .hero-copy h1 { font-size: 40px; }
  .hero-photo { min-height: 300px; }
  .hero-cards { grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 24px 40px; }
}
@media (max-width: 860px) {
  .features-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-copy h1 { font-size: 32px; }
  .hero-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   "Analyzing your CV" — animated processing page (processing.ejs)
   ============================================================ */
.analyzing {
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; text-align: center; padding: 8px 0 16px;
}
.az-head h1 { margin: 0 0 6px; font-size: 30px; }
.az-sub { margin: 0 auto; max-width: 460px; }

/* --- Scanner stage: a document being scanned, with terms drifting up --- */
.az-stage {
  position: relative; width: 100%; max-width: 460px; height: 230px;
  display: grid; place-items: center; overflow: hidden;
}
/* soft pulsing halo behind the document */
.az-stage::before {
  content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(11,91,74,0.16), rgba(11,91,74,0) 68%);
  animation: azPulse 3.4s ease-out infinite;
}
.az-doc {
  position: relative; z-index: 2; width: 150px; height: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 36px rgba(16, 35, 29, 0.16);
  padding: 22px 18px; display: flex; flex-direction: column; gap: 11px;
  overflow: hidden;
}
.az-corner {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px;
  background: linear-gradient(225deg, #E6F0EB 0 50%, transparent 50%);
  border-bottom-left-radius: 8px;
}
.az-line { height: 7px; border-radius: 999px; background: #E7DEC9; }
.az-line.w1 { width: 78%; } .az-line.w2 { width: 92%; } .az-line.w3 { width: 60%; }
/* the sweeping scan beam */
.az-beam {
  position: absolute; left: 0; right: 0; top: 8%; height: 26px; z-index: 3;
  background: linear-gradient(180deg, rgba(11,91,74,0) 0%, rgba(11,91,74,0.22) 50%, rgba(11,91,74,0) 100%);
  box-shadow: 0 0 12px 1px rgba(11, 91, 74, 0.35);
  border-top: 1px solid rgba(11, 91, 74, 0.55);
  border-bottom: 1px solid rgba(11, 91, 74, 0.55);
  animation: azScan 2.6s ease-in-out infinite;
}
@keyframes azScan { 0%, 100% { top: 6%; } 50% { top: 80%; } }
@keyframes azPulse {
  0% { transform: scale(0.75); opacity: 0.5; }
  70% { opacity: 0; } 100% { transform: scale(1.7); opacity: 0; }
}
/* drifting terms — pure flavour, "data being calculated" */
.az-chips { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; z-index: 1; }
.az-chip {
  position: absolute; bottom: 6%;
  left: calc(6% + (88% / (var(--n) - 1)) * var(--i));
  transform: translateX(-50%);
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: #E6F0EB; border: 1px solid #CFE2D8; border-radius: 999px;
  padding: 3px 9px; white-space: nowrap; opacity: 0;
  animation: azRise 6.2s linear infinite;
  animation-delay: calc(var(--i) * -0.52s);
}
@keyframes azRise {
  0% { transform: translate(-50%, 30px) scale(0.9); opacity: 0; }
  14% { opacity: 0.92; } 82% { opacity: 0.92; }
  100% { transform: translate(-50%, -150px) scale(1); opacity: 0; }
}

/* --- Progress bar --- */
.az-progress {
  position: relative; width: 100%; max-width: 460px; height: 10px;
  background: #E7DEC9; border-radius: 999px; overflow: hidden;
}
.az-progress > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #1C7E66);
  transition: width 0.25s ease;
}
.az-progress > i.is-done { background: linear-gradient(90deg, var(--success), #1C7E66); }
.az-rotator {
  margin: -8px 0 0; color: var(--muted); font-size: 14px;
  min-height: 20px; transition: opacity 0.24s ease;
}

/* --- Pipeline steps --- */
.az-steps {
  list-style: none; margin: 4px 0 0; padding: 0; width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.az-step {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  opacity: 0.6;
}
.az-step.is-active { background: #E6F0EB; border-color: #CFE2D8; opacity: 1; }
.az-step.is-done { opacity: 1; }
.az-ic {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.az-step.is-active .az-ic { color: var(--primary); border-color: #CFE2D8; }
.az-step.is-done .az-ic { color: var(--success); }
.az-tx { display: flex; flex-direction: column; line-height: 1.3; }
.az-tx strong { font-size: 15px; font-weight: 600; }
.az-tx small { color: var(--muted); font-size: 12.5px; }

.az-state {
  position: relative; flex: 0 0 auto; margin-left: auto;
  width: 22px; height: 22px; display: grid; place-items: center;
}
.az-state::before { /* pending dot */
  content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--border);
}
.az-step.is-active .az-state::before, .az-step.is-done .az-state::before { display: none; }
.az-spin {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #CFE2D8; border-top-color: var(--primary);
  animation: azSpin 0.8s linear infinite;
}
.az-step.is-active .az-spin { display: block; }
.az-tick { display: none; color: var(--success); }
.az-tick svg { width: 18px; height: 18px; }
.az-step.is-done .az-tick { display: inline-flex; }
@keyframes azSpin { to { transform: rotate(360deg); } }

/* --- Error fallback --- */
.az-error {
  width: 100%; max-width: 460px; margin-top: 4px;
  background: #F7E7E3; border: 1px solid var(--danger); color: #7A1D22;
  padding: 16px 18px; border-radius: var(--radius); text-align: center;
}
.az-error p { margin: 0 0 12px; }
.az-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.analyzing.has-error .az-stage, .analyzing.has-error .az-progress,
.analyzing.has-error .az-rotator, .analyzing.has-error .az-steps { display: none; }

@media (prefers-reduced-motion: reduce) {
  .az-beam, .az-chip, .az-stage::before, .az-spin { animation: none; }
  .az-chips { display: none; }
  .az-beam { opacity: 0.4; top: 45%; }
}
@media (max-width: 560px) {
  .az-tx small { display: none; }
  .az-head h1 { font-size: 25px; }
}
