/* Keep the desktop composition; mobile gets its own reading and touch layout. */
.phone-use-intro > .eyebrow { color: #a5afa1; margin-bottom: 20px; }
.phone-use-intro > p:not(.eyebrow) { color: #adb6a7; font-size: 16px; max-width: 47ch; margin-top: 20px; }
.phone-demo-open { display: none; }
.phone-stage { max-width: 380px; margin-inline: auto; }
/* The frame keeps phone proportions; the app scrolls inside its screen. */
.phone-shell { aspect-ratio: 390 / 844; display: flex; flex-direction: column; }
.phone-screen { position: relative; flex: 1; min-height: 0; }
.phone-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .nav { height: auto; min-height: 110px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-top: 12px; }
  .nav .wordmark { grid-column: 1; grid-row: 1; min-height: 44px; font-size: 24px; }
  .nav-login { grid-column: 2; grid-row: 1; min-height: 44px; padding: 11px 16px; font-size: 13px; text-align: center; }
  .nav nav { display: grid; grid-column: 1 / -1; grid-template-columns: 1.2fr 1fr 1.1fr; gap: 8px; border-top: 1px solid var(--line); }
  .nav nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 0; font-size: 12px; text-align: center; line-height: 1.3; }
  .tesla-hero, .tesla-hero-inner { min-height: 0; }
  .tesla-hero-inner { padding-top: 28px; padding-bottom: clamp(238px, 63vw, 320px); }
  .tesla-hero h1 { font-size: clamp(55px, 14.3vw, 82px); }
  .tesla-hero-image { height: clamp(250px, 66vw, 340px); }
  .tesla-hero .actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
  .tesla-hero .button { min-height: 48px; padding: 12px 9px; gap: 8px; }
  .tesla-free { font-size: 12px; align-items: flex-start; }
  .tesla-free > span { flex-shrink: 0; }
  .hardware-section { padding-top: 32px; }
  .hardware-section-heading h2 { font-size: clamp(30px, 8.4vw, 42px); }
  .hardware-section-heading > p { margin-top: 12px; }
  .hardware-note { line-height: 1.6; }
  .board-catalog-link { min-height: 44px; margin-top: 0; }

  .feature-comparison > summary { min-height: 80px; gap: 12px; }
  .feature-comparison > summary strong { font-size: 18px; }
  .comparison-table thead th:first-child { width: 52%; }
  .comparison-table thead th { position: sticky; top: 0; z-index: 2; font-size: 12px; }
  .comparison-table thead th, .comparison-table tbody th, .comparison-table tbody td { padding: 13px 5px; }
  .comparison-table tbody th strong { font-size: 14px; line-height: 1.45; }

  .demo-section { padding-block: 36px; }
  .demo-grid { grid-template-areas: 'intro' 'preview' 'steps' 'launch'; gap: 24px; }
  .phone-use-copy { display: contents; }
  .phone-use-intro { grid-area: intro; }
  .phone-use-intro .eyebrow { margin-bottom: 14px; }
  .phone-use-copy h2 { font-size: clamp(37px, 10vw, 52px); line-height: 1.02; }
  .phone-use-intro > p:not(.eyebrow) { font-size: 15px; line-height: 1.65; margin-top: 16px; }
  .phone-stage { grid-area: preview; max-width: 390px; min-width: 0; }
  .phone-shell { padding: 35px 5px 17px; border-radius: 40px; box-shadow: 0 16px 28px #080d0933, inset 0 0 0 3px #252926, inset 0 0 0 5px #060a07; }
  .phone-status { left: 5px; right: 5px; top: 5px; background: #202620; }
  .phone-screen { border-radius: 0 0 29px 29px; }
  .phone-preview-note { font-size: 12px; line-height: 1.6; max-width: 31ch; }
  .phone-demo-open { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; border: 1px solid #87947c; margin-bottom: 16px; color: #f1f2ec; font-size: 14px; font-weight: 600; }
  .phone-use-steps { grid-area: steps; margin: 0; }
  .phone-use-steps li { padding-block: 16px; }
  .phone-use-steps h3 { font-size: 16px; }
  .phone-use-steps p { font-size: 14px; }
  .phone-use-open { grid-area: launch; width: 100%; min-height: 48px; margin: 0; }
  .compatibility { display: block; margin-top: 24px; }
  .compatibility > strong { display: block; max-width: none; margin-bottom: 5px; }
  .start-section { padding-block: 36px; }
  .start-heading { display: block; }
  .start-heading h2, .faq-section h2 { font-size: clamp(32px, 8.8vw, 42px); }
  .start-heading > a { display: inline-flex; min-height: 44px; align-items: center; margin-top: 12px; padding-bottom: 0; font-size: 14px; }
  .setup-steps { margin-top: 22px; gap: 18px; }
  .setup-steps h3 { font-size: 17px; }
  .setup-steps p { font-size: 14px; line-height: 1.7; }
  .faq-section { padding-bottom: 36px; gap: 20px; }
  .faq-list summary { min-height: 60px; font-size: 15px; gap: 16px; }
  .faq-list summary > span { flex-shrink: 0; }
  .faq-list details > p { padding-right: 0; font-size: 14px; }
  .closing h2 { font-size: clamp(30px, 8.5vw, 40px); }
  .closing .button { width: 100%; min-height: 48px; }
  .footer { gap: 12px 20px; padding-block: 22px; }
  .footer a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 600px) {
  .hardware-showcase { gap: 16px; }
  .hardware-showcase .hardware-card { display: grid; grid-template-columns: 42% minmax(0, 1fr); column-gap: 12px; padding: 20px 16px 16px; }
  .hardware-card-heading { grid-column: 1 / -1; padding: 0; margin-bottom: 12px; }
  .hardware-card-heading h2 { font-size: 30px; }
  .channel-tag { font-size: 12px; padding: 6px 10px; }
  .product-visual { grid-column: 1; grid-row: 2 / span 2; height: 238px; min-width: 0; }
  .product-visual img { width: 200px; top: 43%; }
  .product-visual img.rotate-board { width: 195px; }
  .product-shadow { width: 100px; bottom: 30px; }
  .product-visual figcaption { left: 0; right: 0; bottom: 0; display: block; text-align: center; letter-spacing: 0; }
  .product-visual figcaption > span:first-child { display: none; }
  .product-visual figcaption > span:last-child { font-size: 12px; line-height: 1.4; }
  .board-difference { grid-column: 2; grid-row: 2; padding: 8px 0 0; align-self: center; }
  .board-difference h3 { font-size: 18px; line-height: 1.3; }
  .board-difference p { font-size: 13px; line-height: 1.65; margin-top: 10px; }
  .hardware-showcase .hardware-card-foot { grid-column: 2; grid-row: 3; padding: 8px 0 0; margin-top: 0; align-self: start; }
  .board-catalog-link { font-size: 12px; gap: 6px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 360px) {
  .comparison-table thead th:first-child { width: 48%; }
}
