/* Otobüs Nerede — deferred (below-the-fold). Critical CSS is inlined in index.html. */

:root {
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ─── Sections common ─── */

.section {
  padding-block: var(--section-gap);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--live);
  margin-bottom: 12px;
}

.section__title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.section__subtitle {
  margin: 0 0 48px;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__header .section__subtitle {
  margin-inline: auto;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.features-bento .reveal:nth-child(1) { transition-delay: 0.04s; }
.features-bento .reveal:nth-child(2) { transition-delay: 0.1s; }
.features-bento .reveal:nth-child(3) { transition-delay: 0.16s; }
.features-bento .reveal:nth-child(4) { transition-delay: 0.22s; }
.features-bento .reveal:nth-child(5) { transition-delay: 0.28s; }
.steps .reveal:nth-child(1) { transition-delay: 0.05s; }
.steps .reveal:nth-child(2) { transition-delay: 0.14s; }
.steps .reveal:nth-child(3) { transition-delay: 0.23s; }

/* ─── Features bento grid ─── */

.features-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "hero hero hero hero sideA sideA"
    "hero hero hero hero sideB sideB"
    "foot  foot  accent accent accent accent";
  gap: clamp(14px, 2vw, 20px);
  align-items: stretch;
}

.feature-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(22px, 3vw, 28px) clamp(20px, 2.5vw, 26px);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: var(--shadow-sm);
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    120% 80% at 100% 0%,
    color-mix(in srgb, var(--primary) 8%, transparent),
    transparent 55%
  );
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--text) 8%, transparent) 20%,
    color-mix(in srgb, var(--text) 8%, transparent) 80%,
    transparent
  );
  opacity: 0.65;
}

.feature-card--bento-hero {
  grid-area: hero;
  min-height: 280px;
  padding-bottom: clamp(24px, 3vw, 30px);
}

.feature-card--bento-side {
  min-height: 168px;
}

.feature-card--bento-side-a {
  grid-area: sideA;
}

.feature-card--bento-side-b {
  grid-area: sideB;
}

.feature-card--bento-foot {
  grid-area: foot;
  min-height: 168px;
}

.feature-card--bento-accent {
  grid-area: accent;
  min-height: 168px;
}

.feature-card--live::before {
  background: radial-gradient(
    90% 70% at 100% 0%,
    color-mix(in srgb, var(--live) 14%, transparent),
    transparent 60%
  );
  opacity: 1;
}

.feature-card--accent::before {
  background: radial-gradient(
    85% 65% at 0% 100%,
    color-mix(in srgb, var(--primary) 12%, transparent),
    transparent 58%
  );
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--live) 28%, var(--border));
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--live) 6%, transparent);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--live:hover {
  border-color: color-mix(in srgb, var(--live) 42%, var(--border));
  box-shadow: var(--shadow), var(--shadow-glow);
}

.feature-card--accent:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
  box-shadow: var(--shadow), 0 12px 40px color-mix(in srgb, var(--primary) 12%, transparent);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-weak);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.feature-card__icon--live {
  background: var(--live-weak);
  border-color: color-mix(in srgb, var(--live) 22%, transparent);
  color: var(--live);
}

.feature-card__icon--accent {
  background: var(--primary-weak);
  color: var(--primary);
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
}

.feature-card__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.18rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.feature-card__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.62;
  position: relative;
  z-index: 1;
  flex: 1;
}

.feature-card__cta {
  margin: 12px 0 0;
  position: relative;
  z-index: 1;
}

.feature-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--live);
  text-decoration: none;
}

.feature-card__link:hover,
.feature-card__link:focus-visible {
  text-decoration: underline;
}

.feature-card--bento-hero .feature-card__desc {
  max-width: 42em;
}

.feature-card__badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface-solid));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: var(--radius-pill);
  position: relative;
  z-index: 1;
}

.feature-card__thresholds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.feature-card__threshold {
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--live) 10%, var(--surface-solid));
  color: var(--live-hover);
  border: 1px solid color-mix(in srgb, var(--live) 22%, transparent);
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, transform 0.2s ease;
}

.feature-card--live:hover .feature-card__threshold {
  background: color-mix(in srgb, var(--live) 16%, var(--surface-solid));
}

:root[data-theme="dark"] .feature-card__threshold {
  color: var(--live);
}

@media (max-width: 1024px) {
  .features-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hero hero"
      "sideA sideB"
      "foot accent";
  }

  .feature-card--bento-hero {
    min-height: 240px;
  }

  .feature-card--bento-side,
  .feature-card--bento-foot,
  .feature-card--bento-accent {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .features-bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "sideA"
      "sideB"
      "foot"
      "accent";
    gap: 12px;
  }

  .feature-card--bento-hero {
    min-height: 0;
  }

  .feature-card {
    border-radius: var(--radius);
  }

  .feature-card:hover {
    transform: none;
  }
}

/* ─── How it works ─── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.step-card {
  position: relative;
  padding: 28px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 48px;
  right: -12px;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--live) 45%, transparent), transparent);
  z-index: 1;
}

.step-card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  background: var(--live-weak);
  border: 1px solid color-mix(in srgb, var(--live) 28%, transparent);
  color: var(--live-hover);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
}

:root[data-theme="dark"] .step-card__num {
  color: var(--live);
}

.step-card__title {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-card__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step-card__visual {
  margin-top: 22px;
  height: 84px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, var(--live-weak), transparent 60%),
    var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--live);
}

.step-card__visual svg {
  width: 34px;
  height: 34px;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 12px;
    border-left: 2px solid color-mix(in srgb, var(--live) 30%, var(--border));
    margin-left: 18px;
  }

  .step-card {
    border: none;
    background: transparent;
    padding: 8px 0 28px 24px;
    border-radius: 0;
  }

  .step-card:not(:last-child)::after {
    display: none;
  }

  .step-card__num {
    position: absolute;
    left: -39px;
    top: 8px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    margin: 0;
    background: var(--surface-solid);
  }

  .step-card__visual {
    display: none;
  }
}

/* ─── Install section ─── */

.install {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.install__panel {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
  margin-inline: auto;
}

.install__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.install__tab {
  flex: 1;
  padding: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.install__tab:hover {
  color: var(--text);
  background: var(--live-weak);
}

.install__tab.is-active {
  color: var(--live-hover);
  border-bottom-color: var(--live);
  background: var(--live-weak);
}

:root[data-theme="dark"] .install__tab.is-active {
  color: var(--live);
}

.install__content {
  padding: 32px;
}

.install__panel-body {
  display: none;
}

.install__panel-body.is-active {
  display: block;
}

.install__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.install__step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.install__step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.install__step-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-top: 3px;
}

.install__step-text strong {
  color: var(--text);
}

.install__cta {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.install__cta .btn--primary {
  color: #fff;
  text-decoration: none;
}

.install__cta--secondary {
  margin-top: 16px;
}

.install__cta-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 28rem;
}

.install__alt-label {
  margin: 28px 0 12px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.install__desktop-note {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.install__desktop-note a:not(.btn) {
  color: var(--primary);
  font-weight: 600;
}

.install__desktop-note .btn--primary {
  color: #fff;
}

/* ─── FAQ ─── */

.faq-list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-item[open] {
  border-color: color-mix(in srgb, var(--live) 32%, var(--border));
  box-shadow: var(--shadow-sm);
}

.faq-item__question {
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background 0.2s;
}

.faq-item__question h3 {
  margin: 0;
  font: inherit;
  color: inherit;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-item__question::after {
  transform: rotate(45deg);
}

.faq-item__question:hover {
  background: var(--live-weak);
}

.faq-item__answer {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item__answer p {
  margin: 0;
}

/* ─── CTA banner ─── */

.cta-banner {
  padding-block: var(--section-gap);
}

.cta-banner__inner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(48px, 9vw, 80px) clamp(24px, 5vw, 48px);
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid color-mix(in srgb, var(--live) 22%, var(--border));
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--live-weak) 80%, var(--surface-solid)) 0%,
      var(--surface-solid) 42%,
      color-mix(in srgb, var(--primary-weak) 55%, var(--surface-solid)) 100%
    );
  box-shadow: var(--shadow);
}

.cta-banner__glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  top: -80px;
  right: -40px;
  background: radial-gradient(circle, color-mix(in srgb, var(--live) 35%, transparent), transparent 68%);
  pointer-events: none;
  filter: blur(8px);
}

.cta-banner__glow--2 {
  top: auto;
  right: auto;
  bottom: -100px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 28%, transparent), transparent 70%);
}

.cta-banner__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--live) 28%, transparent);
  background: var(--live-weak);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--live-hover);
}

:root[data-theme="dark"] .cta-banner__eyebrow {
  color: var(--live);
}

.cta-banner__eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse-dot 2s ease-in-out infinite;
}

.cta-banner__title {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.cta-banner__title-accent {
  background: linear-gradient(120deg, var(--live) 0%, var(--primary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-banner__subtitle {
  position: relative;
  margin: 0 auto 30px;
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.65;
  color: var(--text-muted);
}

.cta-banner__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-banner__btn {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}

.cta-banner__btn:hover {
  box-shadow: 0 6px 28px color-mix(in srgb, var(--primary) 40%, transparent);
}

.cta-banner__btn-ghost {
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.cta-banner__btn-ghost:hover {
  border-color: color-mix(in srgb, var(--live) 35%, var(--border));
  background: var(--live-weak);
}

/* ─── Footer ─── */

.landing-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.landing-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.landing-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

.landing-footer__logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow-sm);
}

.landing-footer__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 320px;
}

.landing-footer__heading {
  margin: 0 0 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.landing-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-footer__link {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.landing-footer__link:hover {
  color: var(--primary);
}

.landing-footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

@media (max-width: 768px) {
  .landing-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* Mobil: below-the-fold type tweaks */
@media (max-width: 768px) {
  .section__title {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    padding-top: 0.08em;
  }

  .section__eyebrow {
    letter-spacing: 0.08em;
    margin-bottom: 10px;
  }

  .section__header {
    margin-bottom: 36px;
  }

  .feature-card__title,
  .step-card__title {
    line-height: 1.3;
    letter-spacing: -0.015em;
    padding-top: 0.06em;
  }

  .cta-banner__title {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
    line-height: 1.22;
    letter-spacing: -0.02em;
    padding-top: 0.1em;
  }

  .cta-banner__inner {
    padding-top: clamp(40px, 8vw, 56px);
  }
}


/* ─── Landing assistant demo ─── */
.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;
}

.section--assistant {
  position: relative;
}

.assistant-demo {
  max-width: 720px;
  margin: 0 auto;
}

.assistant-demo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.assistant-demo__chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-solid, #fff);
  color: var(--text);
  border-radius: var(--radius-pill, 999px);
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.assistant-demo__chip:hover,
.assistant-demo__chip:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--primary-weak, rgba(135, 0, 252, 0.1));
  color: var(--primary);
  outline: none;
}

.assistant-demo__chip:disabled {
  opacity: 0.55;
  cursor: wait;
}

.assistant-demo__panel {
  border: 1px solid var(--border);
  border-radius: var(--radius, 18px);
  background: var(--surface, rgba(255, 255, 255, 0.82));
  box-shadow: var(--shadow, 0 8px 28px rgba(15, 27, 45, 0.06));
  overflow: hidden;
  backdrop-filter: blur(12px);
}

:root[data-theme="dark"] .assistant-demo__panel {
  background: color-mix(in srgb, var(--surface-solid, #12151c) 92%, transparent);
}

.assistant-demo__messages {
  max-height: 360px;
  overflow-y: auto;
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.assistant-demo__msg {
  max-width: 92%;
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.assistant-demo__msg p {
  margin: 0;
}

.assistant-demo__msg--bot {
  align-self: flex-start;
  background: color-mix(in srgb, var(--bg, #f3f5f7) 70%, var(--surface-solid, #fff));
  color: var(--text);
  border: 1px solid var(--border);
}

:root[data-theme="dark"] .assistant-demo__msg--bot {
  background: color-mix(in srgb, var(--surface-solid, #1a1f2a) 88%, #000);
}

.assistant-demo__msg--user {
  align-self: flex-end;
  background: var(--primary-grad, linear-gradient(135deg, #6d28d9 0%, #8700fc 55%, #a855f7 100%));
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}

.assistant-demo__clarify,
.assistant-demo__handoff {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.15rem 0.85rem;
}

.assistant-demo__clarify[hidden],
.assistant-demo__handoff[hidden],
.assistant-demo__progress[hidden] {
  display: none !important;
}

.assistant-demo__choice {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--live) 35%, var(--border));
  background: var(--live-weak, rgba(13, 148, 136, 0.12));
  color: var(--live-hover, #0a5f56);
  border-radius: var(--radius-sm, 12px);
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.assistant-demo__choice:hover,
.assistant-demo__choice:focus-visible {
  border-color: var(--live);
  outline: none;
}

.assistant-demo__handoff .btn {
  text-decoration: none;
}

.assistant-demo__progress {
  margin: 0;
  padding: 0 1.15rem 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.assistant-demo__form {
  display: flex;
  gap: 0.55rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-solid, #fff) 88%, transparent);
}

.assistant-demo__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  background: var(--bg-elevated, #fff);
  color: var(--text);
}

.assistant-demo__input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.assistant-demo__send {
  flex-shrink: 0;
  padding-inline: 1.1rem;
}

.assistant-demo__send:disabled {
  opacity: 0.6;
  cursor: wait;
}

.assistant-demo__note {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.assistant-demo__note a {
  color: var(--live);
  font-weight: 600;
  text-decoration: none;
}

.assistant-demo__note a:hover,
.assistant-demo__note a:focus-visible {
  text-decoration: underline;
}

.assistant-demo__note-sep {
  margin: 0 0.25rem;
}

@media (max-width: 640px) {
  .assistant-demo__messages {
    max-height: 300px;
    padding: 0.95rem;
  }

  .assistant-demo__form {
    flex-direction: column;
  }

  .assistant-demo__send {
    width: 100%;
  }

  .assistant-demo__chip {
    font-size: 0.82rem;
  }
}
