:root {
  color-scheme: light;
  --ink: #12151f;
  --muted: #596174;
  --line: #dde2ea;
  --paper: #f6f7f9;
  --white: #ffffff;
  --blue: #1457d9;
  --cyan: #00a6b4;
  --green: #15915f;
  --red: #cf2e2e;
  --yellow: #f3b51b;
  --orange: #f36c21;
  --shadow: 0 18px 50px rgba(14, 24, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  gap: 6px;
}

nav a,
.button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

nav a:hover,
.button.secondary:hover {
  background: #edf1f6;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: clamp(28px, 5vw, 64px);
  min-height: calc(100svh - 70px);
  padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 64px) 30px;
  align-items: center;
  background: #f8fbff;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(46px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button.primary {
  color: #fff;
  background: var(--blue);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero-panel {
  min-height: 520px;
  display: grid;
  align-content: space-between;
  gap: 24px;
}

.speed-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.speed-card span,
.speed-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.speed-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.mini-road {
  position: relative;
  min-height: 260px;
  border-radius: 8px;
  background: #202838;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lane {
  position: absolute;
  inset: 0;
  border-top: 5px dashed rgba(255, 255, 255, 0.38);
  background: transparent;
  height: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.car {
  position: absolute;
  width: 122px;
  height: 54px;
  border-radius: 22px 30px 14px 14px;
  background: var(--blue);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

.car::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -14px;
  width: 54px;
  height: 28px;
  border-radius: 22px 22px 6px 6px;
  background: rgba(255, 255, 255, 0.82);
}

.car::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  box-shadow: 68px 0 0 #111;
}

.car-one {
  left: 8%;
  top: 42px;
  background: var(--green);
}

.car-two {
  right: 10%;
  top: 118px;
  background: var(--yellow);
}

.car-three {
  left: 24%;
  bottom: 28px;
  background: var(--red);
}

.stats-strip,
.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats-strip span,
.summary-row span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stats-strip b,
.summary-row b {
  display: block;
  color: var(--ink);
  font-size: 24px;
}

.insight-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.insight-band article {
  min-height: 170px;
  padding: 28px clamp(18px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.insight-band article:last-child {
  border-right: 0;
}

.insight-band span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.insight-band strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.section,
.simulator {
  padding: clamp(48px, 7vw, 90px) clamp(18px, 5vw, 64px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.55fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head.compact {
  display: block;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.model-card {
  display: grid;
  min-height: 240px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--heat-color, #15915f);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(14, 24, 44, 0.08);
}

.model-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  align-self: start;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--heat-color, #eef4ff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.model-card h3 {
  margin-bottom: 4px;
  font-size: 22px;
}

.price {
  display: block;
  margin: 8px 0;
  font-size: 34px;
  font-weight: 800;
}

.delta {
  color: var(--heat-color, var(--green));
  font-weight: 800;
}

.model-card ul,
.notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-card li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.model-card a,
.notes a {
  color: var(--blue);
  font-weight: 800;
}

.point-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.point {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.point i {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.point.pro i {
  background: var(--green);
}

.point.mid i {
  background: var(--yellow);
}

.point.con i {
  background: var(--red);
}

.chart-section {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chart-wrap {
  display: grid;
  gap: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
}

.bar-shell {
  position: relative;
  height: 34px;
  border-radius: 8px;
  background: #e9edf4;
  overflow: hidden;
}

.bar-list,
.bar-promo {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 8px;
}

.bar-list {
  background: #c8d1df;
}

.bar-promo {
  background: var(--blue);
}

.chart-row strong {
  font-size: 15px;
}

.chart-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.simulator {
  background: #f5f8fb;
  color: var(--ink);
}

.simulator p {
  color: var(--muted);
}

.sim-intro {
  max-width: 760px;
}

.control-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 18px;
}

.control-panel label {
  display: grid;
  gap: 10px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(14, 24, 44, 0.08);
}

.control-panel label > span,
.control-panel output {
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--cyan);
}

.toggle {
  align-content: center;
}

.toggle input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--cyan);
}

.toggle span {
  font-size: 14px;
  line-height: 1.35;
}

.summary-row {
  margin-bottom: 14px;
}

.summary-row span {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.summary-row b {
  color: var(--ink);
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.heat-card {
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--heat-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(14, 24, 44, 0.1);
}

.heat-card.best {
  outline: 3px solid #59b894;
}

.heat-card.unavailable {
  opacity: 0.82;
}

.heat-card strong {
  display: block;
  margin: 8px 0;
  font-size: 30px;
}

.heat-card small,
.heat-card span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.heat-card h3 {
  margin-bottom: 2px;
  font-size: 18px;
}

.financial-verdict {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(14, 24, 44, 0.08);
}

.financial-verdict h2 {
  font-size: clamp(26px, 3vw, 42px);
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.verdict-card {
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 8px solid var(--yellow);
  border-radius: 8px;
  background: #fff;
}

.verdict-card.good {
  border-left-color: var(--green);
}

.verdict-card.warn {
  border-left-color: var(--yellow);
}

.verdict-card span,
.verdict-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.verdict-card strong {
  display: block;
  margin: 8px 0;
  font-size: 24px;
}

.verdict-card b {
  display: block;
  margin: 10px 0 6px;
}

.verdict-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.advisor {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 18px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(14, 24, 44, 0.08);
}

.advisor-copy h2 {
  font-size: clamp(26px, 3vw, 42px);
}

.advisor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.advisor-chips button,
.advisor-form button {
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.advisor-chips button {
  background: #eef3f8;
  color: var(--ink);
  border: 1px solid var(--line);
}

.advisor-box {
  display: grid;
  gap: 10px;
}

.advisor-log {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 210px;
  max-height: 330px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.advisor-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(14, 24, 44, 0.06);
}

.advisor-msg.user {
  justify-self: end;
  background: #1457d9;
  color: #fff;
}

.advisor-msg.bot {
  border-left: 5px solid var(--green);
}

.advisor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(14, 24, 44, 0.08);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-weight: 700;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.best-row {
  background: #e9f7f0;
}

.heat-row {
  background: #fff;
}

.notes {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 30px;
}

.notes li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .section-head,
  .notes,
  .advisor,
  .financial-verdict {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: 46px;
  }

  .hero-panel {
    min-height: 420px;
  }

  .insight-band,
  .stats-strip,
  .summary-row,
  .control-panel,
  .verdict-grid,
  .heat-grid {
    grid-template-columns: 1fr;
  }

  .insight-band article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
