/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:         #0A0A0B;
  --surface:    #141416;
  --border:     #232327;
  --text:       #EDEDEF;
  --text-muted: #8A8A93;
  --accent:     #5B8DEF;
  --good:       #4ADE80;
  --warn:       #FBBF24;
  --bad:        #F87171;

  --font-ui:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, monospace;

  --radius-card: 8px;
  --radius-btn:  6px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
blockquote { margin: 0; }
ul, ol { margin: 0; }

/* ── Base ── */
body {
  font-family: var(--font-mono);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.has-bg-network {
  background-image: none;
}

.bg-network {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 700; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.15s;
  line-height: 1;
}
.btn-primary:hover:not(:disabled) { opacity: 0.85; text-decoration: none; color: #fff; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); text-decoration: none; }

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

/* ── Input ── */
.url-input-group {
  display: flex;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  transition: border-color 0.15s;
}
.url-input-group:focus-within { border-color: var(--accent); }

.url-prefix {
  display: flex;
  align-items: center;
  padding: 10px 0 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-btn) 0 0 var(--radius-btn);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.url-input-group input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px 10px 4px;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  outline: none;
}
.url-input-group input::placeholder { color: var(--text-muted); }

/* ── Hero ── */
.hero { margin-bottom: 48px; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 520px;
}

/* ── Scan Form ── */
.scan-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.waitlist-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.scan-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 20px;
  font-style: italic;
  letter-spacing: 0.01em;
}

body.is-scanning .page-wrap,
body.is-scanning .bg-network {
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scan-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease both;
}

.scan-loading-overlay[hidden] {
  display: none;
}

.scan-loading-panel {
  width: min(520px, 100%);
  text-align: center;
  animation: fadeSlideUp 0.3s ease both;
}

.loading-network-wrap {
  width: 100%;
  height: 44px;
  border-radius: 2px;
  overflow: hidden;
  background: transparent;
}

.loading-network {
  display: block;
  width: 100%;
  height: 44px;
}

.scan-status-text {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.01em;
  transition: opacity 0.25s ease;
}

.scan-status-text.is-changing {
  animation: phraseFade 0.45s ease;
}

@keyframes phraseFade {
  0%   { opacity: 0.2; transform: translateY(3px); }
  100% { opacity: 1;   transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Recent Reports (index) ── */
.recent-reports {
  margin-bottom: 20px;
}

.recent-reports-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.recent-reports-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent-report-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s, color 0.15s;
}

.recent-report-link:hover {
  border-color: var(--text-muted);
  color: var(--text);
  text-decoration: none;
}

/* ── Results (index, dynamically injected) ── */
#results { margin-top: 48px; display: none; }

/* ── Share Box ── */
.share-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.share-url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── Score Block ── */
.score-block {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}

.score-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.score-num {
  font-family: var(--font-mono);
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}
.score-denom {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -1px;
}

.score-num.good { color: var(--good); }
.score-num.warn { color: var(--warn); }
.score-num.bad  { color: var(--bad);  }

/* ── Score Ring (CSS-only conic-gradient donut) ── */
.score-ring {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(
    var(--clr, var(--accent)) calc(var(--pct, 0) * 1%),
    var(--border) 0
  );
  position: relative;
}
.score-ring::after {
  content: '';
  position: absolute;
  inset: 9px;
  background: var(--bg);
  border-radius: 50%;
}

/* ── Understanding Blockquote ── */
.understanding {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 16px 20px;
  margin-bottom: 36px;
  line-height: 1.75;
  color: var(--text);
  font-size: 0.97rem;
}

/* ── Pages Analyzed (collapsible) ── */
.pages-analyzed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  margin-bottom: 28px;
}

.pages-analyzed-summary {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.pages-analyzed-summary::-webkit-details-marker { display: none; }

.pages-analyzed[open] .pages-analyzed-summary {
  margin-bottom: 12px;
}

.pages-analyzed-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pages-analyzed-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.page-category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.page-included {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--good);
  letter-spacing: 0.04em;
}

.page-url {
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}

.page-url:hover { color: var(--accent); text-decoration: underline; }

.page-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.crawl-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.crawl-signal {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--good);
  letter-spacing: 0.04em;
}

/* ── Generic Section ── */
.section { margin-bottom: 32px; }

.section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

ul { padding-left: 20px; }
li {
  line-height: 1.75;
  margin-bottom: 6px;
  color: var(--text);
}

.confusion-issue { font-weight: 500; }
.confusion-where {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ── Error Box ── */
.error-box {
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  color: var(--bad);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Fixes Section (most prominent) ── */
.fixes-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.fixes-section .section-title { margin-bottom: 20px; }

.fixes-list {
  padding: 0;
  margin: 0;
  counter-reset: fixes;
  list-style: none;
}
.fixes-list li {
  counter-increment: fixes;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 0.97rem;
  line-height: 1.65;
}
.fixes-list li:last-child { margin-bottom: 0; }
.fixes-list li::before {
  content: counter(fixes);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

/* ── Report Header ── */
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.report-header-main {
  flex: 1;
  min-width: 0;
}

.report-header-waitlist {
  flex-shrink: 0;
}

.brand-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 14px;
}

.brand-home {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.brand-home:hover {
  color: var(--accent);
  text-decoration: none;
}

.product-name {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 5px;
}

.product-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}
.product-url a { color: var(--text-muted); }
.product-url a:hover { color: var(--accent); text-decoration: none; }

/* ── Report Score Section ── */
.score-section { margin-bottom: 40px; }

/* ── Report Footer ── */
.report-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.powered-by {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.powered-by strong { color: var(--text); font-weight: 600; }

/* ── State Pages (not_found / pending) ── */
.state-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 0;
}

.state-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.state-page h1 {
  font-size: 1.45rem;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.state-page p {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 0.95rem;
  max-width: 360px;
  line-height: 1.6;
}

/* CSS spinner for pending state */
.state-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ── */
@media (max-width: 520px) {
  .page-wrap { padding: 40px 16px 72px; }
  .hero-title { font-size: 1.9rem; }
  .scan-form { flex-direction: column; }
  .score-block { gap: 16px; }
  .score-num { font-size: 4.2rem; letter-spacing: -1px; }
  .score-denom { font-size: 1.7rem; }
  .score-ring { width: 56px; height: 56px; }
  .score-ring::after { inset: 7px; }
  .fixes-section { padding: 18px 16px; }
  .report-footer { flex-direction: column; align-items: flex-start; }
  .report-header { flex-direction: column; align-items: stretch; }
  .report-header-waitlist { align-self: flex-start; }
}

/* ════════════════════════════════════════════
   REPORT v2 — enriched visuals
   ════════════════════════════════════════════ */

/* ── Hero Gauge (SVG radial arc) ── */
.hero-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  animation: fadeSlideUp 0.2s ease both;
}

.hero-gauge-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-gauge {
  width: 180px;
  height: 180px;
  overflow: visible;
}

.gauge-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-num {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--text);
}

.gauge-denom {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  text-anchor: middle;
  fill: var(--text-muted);
}

/* ── Radar Chart ── */
.radar-section {
  margin-bottom: 12px;
  animation: fadeSlideUp 0.2s ease 0.05s both;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  overflow: visible;
}

.radar-chart {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.radar-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.radar-axis {
  stroke: var(--border);
  stroke-width: 1;
}

.radar-data {
  fill: var(--accent);
  fill-opacity: 0.13;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  pointer-events: none;
}

.radar-data-hit {
  fill: transparent;
  stroke: transparent;
  cursor: default;
}

.radar-hit:hover .radar-data {
  fill-opacity: 0.22;
}

.radar-tooltip {
  position: absolute;
  top: 50%;
  z-index: 2;
  min-width: 168px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.15s ease;
}

.radar-tooltip.is-visible { opacity: 1; }

.radar-tooltip--left {
  right: calc(100% + 10px);
  left: auto;
}

.radar-tooltip--right {
  left: calc(100% + 10px);
  right: auto;
}

.radar-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.radar-tooltip-row + .radar-tooltip-row { margin-top: 4px; }

.radar-tooltip-name {
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
}

.radar-tooltip-score {
  font-weight: 600;
  white-space: nowrap;
}

.radar-tooltip-score.good { color: var(--good); }
.radar-tooltip-score.warn { color: var(--warn); }
.radar-tooltip-score.bad  { color: var(--bad);  }

.radar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-muted);
}

/* ── Dimension Bars ── */
.dim-bars-section {
  margin-bottom: 40px;
  animation: fadeSlideUp 0.2s ease 0.1s both;
}

.dim-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 36px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  margin-bottom: 14px;
}
.dim-bar-row:last-child { margin-bottom: 0; }

.dim-bar-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1;
  grid-row: 1;
}

.dim-bar-track {
  grid-column: 2;
  grid-row: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.dim-bar-fill.good { background: var(--good); }
.dim-bar-fill.warn { background: var(--warn); }
.dim-bar-fill.bad  { background: var(--bad);  }

.dim-bar-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
  grid-column: 3;
  grid-row: 1;
}
.dim-bar-score.good { color: var(--good); }
.dim-bar-score.warn { color: var(--warn); }
.dim-bar-score.bad  { color: var(--bad);  }

.dim-bar-note {
  grid-column: 2 / 4;
  grid-row: 2;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Agent Journey Strip ── */
.journey-section {
  margin-bottom: 40px;
  animation: fadeSlideUp 0.2s ease 0.15s both;
}

.journey-strip {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow-x: auto;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 0 4px;
}

.journey-connector {
  flex: 1;
  height: 2px;
  margin-top: 11px; /* align with dot center */
  flex-shrink: 0;
  min-width: 16px;
  max-width: 48px;
}
.journey-connector.ok     { background: var(--good); }
.journey-connector.to-stuck  { background: linear-gradient(to right, var(--good), var(--warn)); }
.journey-connector.to-failed { background: linear-gradient(to right, var(--good), var(--bad)); }
.journey-connector.stuck  { background: var(--warn); }
.journey-connector.failed { background: var(--bad); }
.journey-connector.muted  { background: var(--border); }

.journey-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
}
.journey-step.ok     .journey-dot { border-color: var(--good); color: var(--good); }
.journey-step.stuck  .journey-dot { border-color: var(--warn); color: var(--warn); }
.journey-step.failed .journey-dot { border-color: var(--bad);  color: var(--bad);  }

.journey-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.journey-step.ok     .journey-label { color: var(--good); }
.journey-step.stuck  .journey-label { color: var(--warn); }
.journey-step.failed .journey-label { color: var(--bad);  }

.journey-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  margin-top: 6px;
  max-width: 110px;
}

/* ── Severity Pills ── */
.sev-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  padding: 2px 6px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 7px;
  flex-shrink: 0;
}
.sev-pill.high { background: rgba(248,113,113,0.15); color: var(--bad);  border: 1px solid rgba(248,113,113,0.3); }
.sev-pill.med  { background: rgba(251,191,36,0.12);  color: var(--warn); border: 1px solid rgba(251,191,36,0.3);  }
.sev-pill.low  { background: rgba(74,222,128,0.1);   color: var(--good); border: 1px solid rgba(74,222,128,0.25); }

/* ── Entry animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-gauge-wrap,
  .radar-section,
  .dim-bars-section,
  .journey-section { animation: none; }
  .gauge-fill { transition: none; }
  .dim-bar-fill { transition: none; }
  body.is-scanning .page-wrap,
  body.is-scanning .bg-network { transition: none; }
  .scan-loading-overlay,
  .scan-loading-panel { animation: none; }
  .scan-status-text.is-changing { animation: none; }
}

/* ── Mobile adjustments for new components ── */
@media (max-width: 520px) {
  .hero-gauge { width: 140px; height: 140px; }
  .gauge-num  { font-size: 2.2rem; }

  .dim-bar-row {
    grid-template-columns: 100px 1fr 32px;
  }
  .dim-bar-name { font-size: 0.76rem; }

  .journey-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px;
  }
  .journey-step {
    flex-direction: row;
    align-items: flex-start;
    flex: none;
    width: 100%;
    gap: 12px;
    padding: 0 0 16px 0;
  }
  .journey-step:last-child { padding-bottom: 0; }
  .journey-dot { margin-bottom: 0; flex-shrink: 0; }
  .journey-connector {
    display: none; /* replaced by vertical spacing */
  }
  .journey-label { text-align: left; white-space: normal; }
  .journey-note  { text-align: left; max-width: none; margin-top: 2px; }

  .radar-tooltip--left,
  .radar-tooltip--right {
    top: 100%;
    left: 50%;
    right: auto;
    transform: translate(-50%, 10px);
  }
}

/* ── Waitlist Modal ── */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(4px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 28px 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  font-family: var(--font-ui);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.modal-title {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus {
  border-color: var(--accent);
}

.form-field input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.waitlist-error {
  font-size: 0.85rem;
  color: var(--bad);
  margin: 0;
}

.waitlist-error[hidden] {
  display: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.waitlist-success {
  text-align: center;
  padding-top: 8px;
}

.waitlist-success .modal-desc {
  margin-bottom: 24px;
}

.waitlist-success[hidden] {
  display: none;
}
