/* CarAI MCP frontend — premium marketing (www.carai.com cues)
   Tokens: brandBlue #3668FF, brandPurple #A754FF, storm #21065D,
   gradient #BA26FF→#3668FF, Saira headers, IBM Plex body, pill CTAs 100px */

:root {
  --brand-blue: #3668ff;
  --brand-purple: #a754ff;
  --brand-purple-deep: #ba26ff;
  --storm: #21065d;
  --storm-deep: #120430;
  --rise: #8188ff;
  --sundown: #f2a2c9;
  --sky: #b9e3ff;

  --n-000: #ffffff;
  --n-100: #f9fafb;
  --n-200: #efeff1;
  --n-300: #d5d7d9;
  --n-400: #ccccd1;
  --n-600: #87878b;
  --n-800: #38393a;
  --n-900: #080812;

  --gradient-cta: linear-gradient(90deg, #ba26ff 0%, #3668ff 100%);
  --gradient-cta-alt: linear-gradient(135deg, #3668ff 0%, #a754ff 100%);
  --gradient-hero: linear-gradient(165deg, #110430 0%, #1d186d 42%, #21065d 100%);

  --font-header: "Saira", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --radius-pill: 100px;
  --radius-card: 20px;
  --radius-panel: 16px;
  --shadow-m: 0 2px 4px -2px rgba(64, 64, 75, 0.1),
    0 4px 6px -1px rgba(64, 64, 75, 0.08);
  --shadow-l: 0 8px 24px -8px rgba(33, 6, 93, 0.18),
    0 16px 40px -12px rgba(54, 104, 255, 0.12);
  --max: 1080px;
  --max-wide: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--n-900);
  background: var(--n-000);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-header);
  color: var(--storm);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-top: 0;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
  color: var(--n-800);
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--brand-purple);
}

strong {
  color: var(--storm);
  font-weight: 600;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(54, 104, 255, 0.06);
  color: var(--storm);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid rgba(54, 104, 255, 0.1);
}

pre {
  background: linear-gradient(160deg, #0e0e18 0%, #141428 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-panel);
  overflow: auto;
  margin: 0 0 1.5rem;
  border: 1px solid rgba(129, 136, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-m);
}
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* —— Sticky translucent nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(30px) saturate(1.2);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  border-bottom: 1px solid rgba(213, 215, 217, 0.45);
}

.nav {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-right: auto;
}
.nav-brand:hover {
  opacity: 0.88;
}
.nav-brand img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--storm);
  text-decoration: none;
  position: relative;
  padding: 0.2rem 0;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brand-blue);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gradient-cta);
  border-radius: 2px;
}

.nav-cta {
  margin-left: 0.15rem;
  padding: 0.55rem 1.25rem !important;
  font-size: 0.9rem !important;
}

/* —— Layout —— */
main {
  flex: 1;
  width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem;
  width: 100%;
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.75rem;
  width: 100%;
}

/* —— Full-bleed storm hero —— */
.hero-bleed {
  position: relative;
  background: var(--gradient-hero);
  color: var(--n-000);
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.hero-bleed::before,
.hero-bleed::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
}

.hero-bleed::before {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  top: -18%;
  right: -8%;
  background: radial-gradient(
    circle,
    rgba(186, 38, 255, 0.45) 0%,
    rgba(54, 104, 255, 0.2) 45%,
    transparent 70%
  );
  animation: glow-drift 14s ease-in-out infinite alternate;
}

.hero-bleed::after {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  bottom: -22%;
  left: -6%;
  background: radial-gradient(
    circle,
    rgba(54, 104, 255, 0.4) 0%,
    rgba(129, 136, 255, 0.15) 50%,
    transparent 70%
  );
  animation: glow-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes glow-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-3%, 4%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bleed::before,
  .hero-bleed::after {
    animation: none;
  }
  .cta,
  .feature-row,
  .panel {
    transition: none !important;
  }
}

.hero-bleed .wrap {
  position: relative;
  z-index: 1;
}

.hero-bleed h1 {
  color: var(--n-000);
  max-width: 14ch;
  margin-bottom: 1.15rem;
}

.hero-bleed .lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 34rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.hero-bleed .lead strong {
  color: var(--n-000);
}

.hero-bleed a:not(.cta) {
  color: var(--sky);
}

.page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 2.75rem);
}

.page-hero h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.25rem);
  max-width: 18ch;
}

.page-hero .lead {
  font-size: 1.15rem;
  color: var(--n-600);
  max-width: 38rem;
  margin-bottom: 0;
}

.lead {
  font-size: 1.1rem;
  color: var(--n-600);
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-header);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rise);
  margin-bottom: 0.85rem;
}

.hero-bleed .eyebrow {
  color: var(--sky);
}

/* —— CTAs —— */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
  margin: 1.75rem 0 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-primary {
  background: var(--gradient-cta);
  color: var(--n-000);
  box-shadow: 0 4px 20px -4px rgba(186, 38, 255, 0.45),
    0 2px 8px -2px rgba(54, 104, 255, 0.35);
}
.cta-primary:hover {
  color: var(--n-000);
  box-shadow: 0 8px 28px -4px rgba(186, 38, 255, 0.5),
    0 4px 12px -2px rgba(54, 104, 255, 0.4);
}

.cta-storm {
  background: var(--storm);
  color: var(--n-000);
}
.cta-storm:hover {
  background: var(--brand-blue);
  color: var(--n-000);
}

.cta-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  font-weight: 600;
}
.cta-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--n-000);
  border-color: rgba(255, 255, 255, 0.45);
}

.cta-quiet {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  box-shadow: none;
  font-weight: 500;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.cta-quiet:hover {
  color: var(--n-000);
  transform: none;
}

.cta-outline {
  background: transparent;
  color: var(--storm);
  border: 1.5px solid var(--n-300);
  box-shadow: none;
  font-weight: 600;
}
.cta-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--n-000);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}
.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--n-000);
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--n-100);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 36rem;
}

.section-label {
  font-family: var(--font-header);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.65rem;
}

.section-head p {
  color: var(--n-600);
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Feature rows — spacious, not card grids */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.feature-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--n-200);
  transition: opacity 0.2s ease;
}
.feature-row:first-child {
  padding-top: 0;
}
.feature-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feature-num {
  font-family: var(--font-header);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  min-width: 2.5rem;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.88),
      rgba(255, 255, 255, 0.88)
    ),
    linear-gradient(135deg, #ba26ff, #3668ff);
  color: var(--storm);
  flex-shrink: 0;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand-blue);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-body h3 {
  margin-bottom: 0.4rem;
  color: var(--storm);
}

.feature-body p {
  margin: 0;
  color: var(--n-600);
  max-width: 40rem;
  font-size: 1.05rem;
}

/* Elegant panels */
.panel {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-m);
  margin-bottom: 1.25rem;
}
.panel:last-child {
  margin-bottom: 0;
}
.panel h2,
.panel h3 {
  margin-top: 0;
}
.panel-soft {
  background: var(--n-100);
  border-color: transparent;
  box-shadow: none;
}
.panel-dark {
  background: linear-gradient(160deg, #0e0e18 0%, #16162a 100%);
  border: 1px solid rgba(129, 136, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-l);
}
.panel-dark h2,
.panel-dark h3,
.panel-dark strong {
  color: var(--n-000);
}
.panel-dark p,
.panel-dark li {
  color: rgba(255, 255, 255, 0.72);
}
.panel-dark code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sky);
  border-color: rgba(185, 227, 255, 0.15);
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Prompt / example rows */
.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1rem 1.75rem;
  align-items: baseline;
  padding: 1.35rem 1.5rem;
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-m);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.prompt-row:hover {
  border-color: rgba(54, 104, 255, 0.28);
  box-shadow: var(--shadow-l);
}
.prompt-row h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-blue);
}
.prompt-row p {
  margin: 0;
  color: var(--n-800);
  font-size: 1.05rem;
  font-style: italic;
}

/* Tool rows */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--n-200);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--n-000);
  box-shadow: var(--shadow-m);
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--n-200);
}
.tool-row:last-child {
  border-bottom: none;
}
.tool-row:hover {
  background: rgba(54, 104, 255, 0.03);
}
.tool-row code {
  font-size: 0.92rem;
  font-weight: 600;
}
.tool-row p {
  margin: 0;
  color: var(--n-600);
  font-size: 0.98rem;
}
.tool-auth {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--n-600);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.tool-auth.required {
  color: var(--brand-purple);
}

/* Legacy card grid kept for rare use — airier */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-m);
}
.card h3 {
  margin-top: 0;
}
.card p:last-child {
  margin-bottom: 0;
}

ol,
ul {
  padding-left: 1.25rem;
  color: var(--n-800);
  margin: 0 0 0.5rem;
}
li {
  margin-bottom: 0.55rem;
}
li::marker {
  color: var(--brand-blue);
}
.panel ol:last-child,
.panel ul:last-child {
  margin-bottom: 0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-m);
  border: 1px solid var(--n-200);
  background: var(--n-000);
  margin: 0 0 1.5rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--n-000);
}
th,
td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--n-200);
  vertical-align: top;
}
th {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--storm);
  background: var(--n-100);
}
tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: rgba(54, 104, 255, 0.03);
}

/* Content band for inner pages */
.content-band {
  padding: 0 0 clamp(3.5rem, 7vw, 5rem);
}

/* Quiet one-line status (replaces loud notice) */
.status-line {
  font-size: 0.85rem;
  color: var(--n-600);
  margin: 0;
  letter-spacing: 0.01em;
}
.status-line code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
}

/* —— Footer storm band —— */
.site-footer {
  background: var(--storm);
  color: rgba(255, 255, 255, 0.65);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(54, 104, 255, 0.25) 0%,
    transparent 55%
  );
  pointer-events: none;
}
.site-footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.25rem 1.75rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}
.site-footer a {
  color: var(--sky);
  font-weight: 500;
}
.site-footer a:hover {
  color: var(--n-000);
}
.site-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--n-000);
  text-decoration: none;
  font-family: var(--font-header);
  font-weight: 600;
}
.site-footer .footer-brand:hover {
  opacity: 0.9;
}
.site-footer .footer-brand img {
  height: 24px;
  width: auto;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  text-align: right;
}
.footer-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}
.footer-status {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}
.footer-status code {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(185, 227, 255, 0.7);
  border-color: transparent;
  font-size: 0.78em;
}

@media (max-width: 720px) {
  .nav {
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
  }
  .nav-links {
    gap: 1rem;
    width: 100%;
    order: 3;
  }
  .nav-cta {
    margin-left: auto;
  }
  .wrap,
  .wrap-wide,
  .site-footer-inner {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
  .feature-row {
    grid-template-columns: auto 1fr;
    gap: 1rem 1.15rem;
  }
  .prompt-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .tool-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .tool-auth {
    justify-self: start;
  }
  .footer-meta {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
  .footer-links {
    justify-content: flex-start;
  }
  .cta-row .cta-primary {
    width: 100%;
  }
}

/* —— Hero grid + embedded chat (EV.com chat-bff visual parity, CarAI tokens) —— */
.hero-bleed {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3.25rem, 7vw, 5.25rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 3.25rem);
  align-items: center;
}

.hero-copy {
  max-width: 34rem;
}

.hero-copy .cta-row {
  margin-top: 1.5rem;
}

.hero-chat {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  margin-right: 0;
}

.hero-chat-panel {
  display: flex;
  flex-direction: column;
  height: min(560px, 74dvh);
  max-height: 620px;
  background: linear-gradient(165deg, #16122e 0%, #1a1638 55%, #141028 100%);
  border: 1px solid rgba(129, 136, 255, 0.28);
  border-radius: 16px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(33, 6, 93, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hero-chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: rgba(33, 6, 93, 0.55);
  border-bottom: 1px solid rgba(129, 136, 255, 0.2);
}

.hero-chat-logo {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.hero-chat-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #fff;
}

.hero-chat-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(54, 104, 255, 0.28);
  color: #b9e3ff;
  border: 1px solid rgba(54, 104, 255, 0.45);
}

.hero-chat-badge[title*="Live"],
.hero-chat-badge:not([title*="demo"]):not([title*="Demo"]):not([title*="Static"]) {
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.45);
}

.hero-listings {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.hero-listing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(129, 136, 255, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.hero-listing-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(11, 18, 36, 0.95), rgba(22, 32, 68, 0.95));
  overflow: hidden;
}

.hero-listing-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #0b1224;
}

.hero-listing-img--fallback {
  object-fit: contain;
  background: transparent;
}

.hero-listing-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #b9e3ff;
  font-family: var(--font-header, "Saira", system-ui, sans-serif);
  pointer-events: none;
}

.hero-listing-ph span {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.hero-listing-ph small {
  font-size: 0.72rem;
  color: rgba(129, 136, 255, 0.9);
}

.hero-listing-body {
  padding: 0.55rem 0.7rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.hero-listing-title {
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.3;
  color: #fff;
  letter-spacing: -0.01em;
}

.hero-listing-trim {
  font-weight: 400;
  color: rgba(185, 227, 255, 0.72);
  font-size: 0.78em;
}

.hero-listing-price {
  margin-top: 0.1rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #bbf7d0;
  letter-spacing: -0.015em;
}

.hero-listing-dealer {
  margin-top: 0.05rem;
  font-size: 0.88rem;
  color: rgba(185, 227, 255, 0.9);
  line-height: 1.3;
}

.hero-listing-meta {
  margin-top: 0.05rem;
  font-size: 0.82rem;
  color: rgba(185, 227, 255, 0.7);
  text-transform: capitalize;
}

.hero-listing-id {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  opacity: 0.85;
}

@media (min-width: 420px) {
  .hero-listing {
    grid-template-columns: minmax(132px, 42%) 1fr;
    align-items: stretch;
  }

  .hero-listing-media {
    aspect-ratio: auto;
    min-height: 100%;
    align-self: stretch;
  }

  .hero-listing-body {
    padding: 0.6rem 0.75rem 0.7rem;
    justify-content: center;
  }
}

.hero-chat-send:disabled,
.hero-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hero-chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  -webkit-overflow-scrolling: touch;
}

.hero-bubble {
  max-width: 94%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  word-break: break-word;
  font-size: 0.98rem; /* ~15.7px */
  line-height: 1.55;
  border: 1px solid rgba(129, 136, 255, 0.18);
}

.hero-bubble .body {
  font-size: 0.98rem;
  line-height: 1.55;
}

.hero-bubble.user {
  align-self: flex-end;
  background: rgba(54, 104, 255, 0.28);
  border-color: rgba(54, 104, 255, 0.4);
  border-bottom-right-radius: 4px;
  color: #f0f4ff;
  white-space: pre-wrap;
}

.hero-bubble.asst {
  align-self: flex-start;
  background: rgba(33, 6, 93, 0.55);
  border-bottom-left-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-bubble.typing .body {
  color: rgba(185, 227, 255, 0.65);
  font-style: italic;
}

.hero-bubble .meta {
  font-size: 0.72rem;
  color: rgba(185, 227, 255, 0.65);
  margin-bottom: 0.28rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-bubble .body a {
  color: #b9e3ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.hero-bubble .body a:hover {
  color: #fff;
}

.hero-bubble .body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em;
  background: rgba(0, 0, 0, 0.35);
  color: #c8d4ff;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: none;
}

.hero-chat-chips {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.75rem 0.55rem;
}

.hero-chip {
  appearance: none;
  border: 1px solid rgba(54, 104, 255, 0.4);
  background: rgba(54, 104, 255, 0.12);
  color: #dce6ff;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.3;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hero-chip:hover,
.hero-chip:focus-visible {
  background: rgba(54, 104, 255, 0.28);
  border-color: rgba(54, 104, 255, 0.7);
  color: #fff;
  outline: none;
}

.hero-chat-composer {
  flex-shrink: 0;
  padding: 0.55rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(129, 136, 255, 0.2);
  background: rgba(33, 6, 93, 0.45);
}

.hero-chat-composer form {
  display: flex;
  gap: 0.4rem;
  background: rgba(8, 8, 18, 0.45);
  border: 1px solid rgba(129, 136, 255, 0.22);
  border-radius: 12px;
  padding: 0.3rem;
}

.hero-chat-composer input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #f0f4ff;
  font-family: var(--font-body);
  font-size: 1rem;
}

.hero-chat-composer input[type="text"]:focus {
  outline: none;
}

.hero-chat-composer input[type="text"]::placeholder {
  color: rgba(185, 227, 255, 0.45);
}

.hero-chat-send {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.hero-chat-send:hover {
  background: #2a56e0;
}

.hero-chat-note {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: rgba(185, 227, 255, 0.45);
  text-align: center;
}

.hero-chat-note a {
  color: rgba(185, 227, 255, 0.75);
  font-weight: 500;
}

.hero-chat-note a:hover {
  color: #fff;
}

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

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-chat {
    max-width: 100%;
    margin: 0 auto;
  }
  .hero-chat-panel {
    height: min(520px, 66dvh);
  }
  .hero-bleed h1 {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero-chat-panel {
    height: min(480px, 62dvh);
    border-radius: 14px;
  }
  .hero-chip {
    font-size: 0.8rem;
  }
  .hero-bubble,
  .hero-bubble .body {
    font-size: 0.95rem;
  }
}
