:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #11151a;
  --panel-2: #161b22;
  --panel-3: #1b222b;
  --line: #29313b;
  --line-soft: #20262e;
  --text: #f3f5f7;
  --muted: #98a3af;
  --muted-2: #6e7885;
  --accent: #e9f269;
  --accent-ink: #171a08;
  --green: #72d6a0;
  --amber: #f2c269;
  --red: #ef8c84;
  --blue: #7eb5f4;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 5%, rgba(126, 181, 244, .08), transparent 28rem),
    var(--bg);
  font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--line-soft);
  background: rgba(13, 16, 20, .94);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px 20px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #39424c;
  border-radius: 12px;
  color: var(--accent);
  background: #171b20;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 1px; }
.demo-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 7px 24px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
  font-size: 11px;
}
.demo-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); opacity: .7; }
.step-nav { display: grid; gap: 4px; overflow-y: auto; padding-right: 3px; }
.step-item {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr 8px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.step-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.step-item.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.step-item.visited .step-dot { background: rgba(114,214,160,.16); color: var(--green); border-color: rgba(114,214,160,.25); }
.step-icon { display: grid; place-items: center; }
.step-icon svg { width: 18px; }
.step-copy strong, .step-copy small { display: block; }
.step-copy strong { font-size: 13px; font-weight: 600; }
.step-copy small { margin-top: 1px; color: var(--muted-2); font-size: 10px; }
.step-dot { width: 6px; height: 6px; border: 1px solid var(--muted-2); border-radius: 50%; opacity: .75; }
.step-item.active .step-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(233,242,105,.07); }
.sidebar-footer { margin-top: auto; padding-top: 18px; }
.text-button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--text); background: rgba(255,255,255,.03); }
.text-button svg { width: 17px; }

main { min-width: 0; padding: 0 42px 28px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 0 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(var(--bg) 72%, rgba(11,13,16,.92));
  backdrop-filter: blur(18px);
}
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -.04em; }
.progress-wrap { width: min(220px, 28vw); color: var(--muted); font-size: 11px; text-align: right; }
.progress-track { height: 3px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: var(--line); }
.progress-track span { display: block; width: 11.11%; height: 100%; background: var(--accent); transition: width .35s ease; }
.vehicle-strip {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  align-items: center;
  gap: 18px;
  margin: 22px 0;
  padding: 13px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(17,21,26,.75);
}
.vehicle-thumb { display: grid; place-items: center; width: 70px; height: 48px; border-radius: 10px; color: var(--muted); background: var(--panel-3); }
.vehicle-thumb svg { width: 60px; height: 36px; stroke-width: 2; }
.vehicle-main strong, .vehicle-main span { display: block; }
.vehicle-main strong { letter-spacing: -.01em; }
.vehicle-main span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.vehicle-stat { min-width: 105px; padding-left: 18px; border-left: 1px solid var(--line-soft); }
.vehicle-stat small, .vehicle-stat strong { display: block; }
.vehicle-stat small { color: var(--muted); font-size: 10px; }
.vehicle-stat strong { margin-top: 2px; font-size: 16px; }
.risk-low { color: var(--green); }
.risk-high { color: var(--red); }

.tutorial-card {
  min-height: 480px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(25,31,38,.96), rgba(16,20,25,.98));
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.card-head h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 31px); letter-spacing: -.035em; }
.card-head p { max-width: 700px; margin: 0; color: var(--muted); }
.step-number { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(233,242,105,.22); border-radius: 50%; color: var(--accent); background: rgba(233,242,105,.055); font-size: 12px; font-weight: 700; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(9,12,15,.32); }
.panel.highlight { border-color: rgba(233,242,105,.24); background: rgba(233,242,105,.045); }
.panel-title { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.panel-title svg { width: 16px; }
.metric { font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.1; letter-spacing: -.04em; }
.metric small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 11px; }
.fake-input { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.file-box { display: grid; place-items: center; min-height: 150px; padding: 22px; border: 1px dashed #3b4653; border-radius: 13px; color: var(--muted); text-align: center; background: rgba(255,255,255,.015); }
.file-box svg { width: 28px; margin-bottom: 10px; color: var(--accent); }
.file-box strong { display: block; color: var(--text); }
.file-box small { margin-top: 4px; }
.status-list { display: grid; gap: 10px; }
.status-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.status-row:last-child { border: 0; }
.status-row span:first-child { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 999px; font-size: 11px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.green { color: var(--green); background: rgba(114,214,160,.09); }
.pill.amber { color: var(--amber); background: rgba(242,194,105,.09); }
.pill.red { color: var(--red); background: rgba(239,140,132,.09); }
.pill.blue { color: var(--blue); background: rgba(126,181,244,.09); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row small { color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 45px; height: 25px; border: 1px solid #46505b; border-radius: 20px; background: #222831; cursor: pointer; }
.switch span { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch.on { border-color: rgba(239,140,132,.45); background: rgba(239,140,132,.12); }
.switch.on span { transform: translateX(20px); background: var(--red); }
.cost-table { width: 100%; border-collapse: collapse; }
.cost-table td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cost-table td:first-child { color: var(--muted); }
.cost-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table tr.total td { padding-top: 15px; border: 0; color: var(--text); font-weight: 700; font-size: 16px; }
.timeline { position: relative; display: grid; gap: 4px; }
.timeline::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 17px; width: 1px; background: var(--line); }
.timeline-row { position: relative; display: grid; grid-template-columns: 36px 1fr auto; gap: 13px; align-items: center; min-height: 52px; }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin-left: 12px; border: 2px solid var(--panel-2); border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 1px var(--line); }
.timeline-row.done .timeline-dot { background: var(--green); }
.timeline-row.now .timeline-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(233,242,105,.08); }
.timeline-row small { color: var(--muted); }
.note { margin-top: 20px; padding: 14px 16px; border-left: 2px solid var(--blue); border-radius: 0 10px 10px 0; color: var(--muted); background: rgba(126,181,244,.05); }
.note strong { color: var(--text); }
.passport { overflow: hidden; border: 1px solid rgba(233,242,105,.22); border-radius: 16px; background: linear-gradient(150deg, rgba(233,242,105,.07), rgba(126,181,244,.04)); }
.passport-head { display: flex; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); }
.passport-head h3 { margin: 0; font-size: 21px; }
.passport-head p { margin: 4px 0 0; color: var(--muted); }
.passport-seal { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(114,214,160,.28); border-radius: 50%; color: var(--green); background: rgba(114,214,160,.06); }
.passport-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); }
.passport-grid div { padding: 16px 20px; background: rgba(14,17,21,.94); }
.passport-grid small, .passport-grid strong { display: block; }
.passport-grid small { color: var(--muted); }
.passport-grid strong { margin-top: 3px; }

.actionbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 0 0; }
.actionbar p { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; cursor: pointer; font-weight: 650; }
.button svg { width: 17px; }
.button.secondary { border: 1px solid var(--line); background: var(--panel); }
.button.secondary:hover { background: var(--panel-2); }
.button.primary { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.button.primary:hover { filter: brightness(1.04); }
.button:disabled { opacity: .35; cursor: default; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 340px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-3); color: var(--text); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 80px minmax(0, 1fr); }
  .sidebar { padding: 20px 12px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > div, .demo-chip, .step-copy, .sidebar-footer { display: none; }
  .step-item { grid-template-columns: 1fr; justify-items: center; padding: 8px; }
  .step-dot { display: none; }
  main { padding-inline: 24px; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { justify-content: flex-start; padding: 0; }
  .brand > div { display: block; }
  .step-nav { display: flex; margin-top: 12px; overflow-x: auto; }
  .step-item { flex: 0 0 48px; min-height: 42px; }
  main { padding: 0 16px 20px; }
  .topbar { padding-top: 17px; }
  .progress-wrap { width: 95px; }
  .vehicle-strip { grid-template-columns: 55px 1fr; gap: 12px; }
  .vehicle-thumb { width: 52px; }
  .vehicle-stat { display: none; }
  .tutorial-card { min-height: 0; padding: 20px; }
  .grid.two, .grid.three, .passport-grid { grid-template-columns: 1fr; }
  .actionbar { grid-template-columns: auto auto; justify-content: space-between; }
  .actionbar p { grid-column: 1 / -1; grid-row: 1; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* CSP-compatible dynamic presentation classes */
.progress-track span.progress-1 { width: 10%; }
.progress-track span.progress-2 { width: 20%; }
.progress-track span.progress-3 { width: 30%; }
.progress-track span.progress-4 { width: 40%; }
.progress-track span.progress-5 { width: 50%; }
.progress-track span.progress-6 { width: 60%; }
.progress-track span.progress-7 { width: 70%; }
.progress-track span.progress-8 { width: 80%; }
.progress-track span.progress-9 { width: 90%; }
.progress-track span.progress-10 { width: 100%; }
.metric-safe { color: var(--green); }
.metric-risk { color: var(--red); }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.module-map-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel);
  cursor: pointer;
}
.module-map-button:hover { color: var(--text); background: var(--panel-2); }
.module-map-button svg { width: 15px; }
.module-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 15px; }
.module-strip > span:first-child { margin-right: 2px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.module-chip { padding: 4px 8px; border: 1px solid rgba(126,181,244,.2); border-radius: 999px; color: var(--blue); background: rgba(126,181,244,.055); font-size: 10px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9,12,15,.32);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.service-card:last-child { grid-column: 1 / -1; }
.service-card:hover { border-color: #3a4551; background: rgba(255,255,255,.025); }
.service-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--accent); background: rgba(233,242,105,.055); }
.service-icon svg { width: 17px; }
.service-card strong, .service-card small { display: block; }
.service-card small { margin-top: 2px; color: var(--muted); }
.completion-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid rgba(114,214,160,.2); border-radius: 12px; background: rgba(114,214,160,.045); }
.completion-row span, .completion-row strong { display: block; }
.completion-row > div > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.completion-row strong { margin-top: 2px; }
.module-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.module-dialog::backdrop { background: rgba(4,6,8,.78); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; padding: 23px 25px 16px; }
.dialog-head h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.dialog-close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.dialog-close:hover { color: var(--text); background: var(--panel-2); }
.dialog-intro { margin: 0; padding: 0 25px 20px; color: var(--muted); }
.module-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0 25px 25px; overflow-y: auto; }
.module-group { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(9,12,15,.3); }
.module-group h3 { margin: 0 0 9px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.module-group button { display: flex; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.module-group button:last-child { border-bottom: 0; }
.module-group button:hover span { color: var(--accent); }
.module-group small { flex: 0 0 auto; color: var(--muted-2); }

@media (max-width: 760px) {
  .topbar-actions { gap: 10px; }
  .module-map-button span { display: none; }
  .module-map-button { width: 36px; padding: 0; justify-content: center; }
  .service-grid, .module-map { grid-template-columns: 1fr; }
  .service-card:last-child { grid-column: auto; }
  .module-dialog { max-height: calc(100vh - 20px); }
}

/* Independent first-time-user review fixes */
:root { --muted-2: #8994a0; }
.orientation-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid rgba(126,181,244,.2); border-radius: 11px; background: rgba(126,181,244,.045); }
.orientation-banner p { margin: 0; color: var(--muted); }
.orientation-banner strong { color: var(--text); }
.plain-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: -12px 0 16px; }
.plain-glossary span { padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.015); font-size: 11px; }
.plain-glossary strong { color: var(--text); }
.module-group button > span { min-width: 0; }
.module-group button strong, .module-group button small { display: block; }
.module-group button small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.module-group button em { flex: 0 0 auto; color: var(--muted-2); font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 900px) and (min-width: 681px) {
  .app-shell { grid-template-columns: 150px minmax(0, 1fr); }
  .brand { justify-content: flex-start; }
  .brand > div { display: block; }
  .demo-chip, .sidebar-footer { display: none; }
  .step-item { grid-template-columns: 24px 1fr; justify-items: stretch; padding-inline: 8px; }
  .step-copy { display: block; }
  .step-copy strong { font-size: 11px; }
  .step-copy small, .step-dot { display: none; }
}

@media (max-width: 680px) {
  .step-nav { gap: 6px; padding-bottom: 4px; }
  .step-item { flex: 0 0 82px; grid-template-columns: 1fr; gap: 3px; min-height: 58px; }
  .step-copy { display: block; width: 100%; text-align: center; }
  .step-copy strong { overflow: hidden; display: block; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
  .step-copy small { display: none; }
  .module-map-button { width: auto; min-width: 94px; padding: 0 9px; }
  .module-map-button span { display: inline; font-size: 9px; }
  .orientation-banner { align-items: flex-start; flex-direction: column; }
  .plain-glossary { grid-template-columns: 1fr; margin-top: -8px; }
  .module-strip { align-items: flex-start; }
  .module-strip > span:first-child { flex-basis: 100%; }
}
