:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --text: #142033;
  --muted: #5f6f85;
  --line: #d8e2ef;
  --blue: #1767c2;
  --blue-dark: #0f4f97;
  --green: #138a58;
  --green-soft: #e5f7ef;
  --red: #c4372f;
  --red-soft: #fff0ee;
  --amber: #946100;
  --amber-soft: #fff7df;
  --shadow: 0 20px 60px rgba(23, 47, 82, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(216, 226, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.header-note,
.install-timer {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.install-timer {
  color: var(--blue-dark);
}

.install-timer.is-low {
  color: var(--red);
}

.home-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 240px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.92)),
    url("/assets/prep/connection-check.png") center / cover;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.status-card h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius);
  background: #102744;
  box-shadow: var(--shadow);
}

.ready-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #fff;
}

.ready-item span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #28b982;
  color: #fff;
  font-weight: 900;
}

.ready-item strong {
  font-size: 1.1rem;
}

.ready-item small {
  color: #c7d6ea;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.guide-card {
  display: block;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 47, 82, 0.08);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 103, 194, 0.32);
  box-shadow: var(--shadow);
}

.guide-card-kicker {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-card h2 {
  margin: 10px 0;
  font-size: 1.6rem;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
}

.guide-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.guide-loading,
.fallback-card,
.status-card {
  max-width: 760px;
  margin: 64px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-card p {
  color: var(--muted);
  font-size: 1.05rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.guide-sidebar,
.step-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(23, 47, 82, 0.08);
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.guide-sidebar h1 {
  margin: 0 0 18px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.step-list li.is-active {
  color: var(--blue-dark);
  background: #e9f2ff;
}

.step-card {
  min-height: 680px;
  padding: clamp(20px, 4vw, 34px);
}

.support-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--amber);
  background: var(--amber-soft);
  font-weight: 800;
}

.device-banner {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid #b9d4f3;
  border-radius: var(--radius);
  background: #e9f2ff;
  color: var(--blue-dark);
}

.device-banner strong {
  font-weight: 900;
}

.device-banner span {
  color: var(--muted);
  font-weight: 700;
}

.step-count {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.step-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.05;
}

.lead {
  max-width: 70ch;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.step-media {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.step-media img,
.step-media video {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #fff;
}

.step-media figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.instruction-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding-left: 28px;
  color: var(--text);
  font-size: 1.02rem;
}

.expected-panel,
.success-panel,
.payment-placeholder,
.action-panel,
.calculator-inline,
.trouble-panel,
.blocked-panel,
.error-panel {
  margin: 18px 0;
  padding: 18px;
  border-radius: var(--radius);
}

.expected-panel {
  border: 1px solid #bfe7d4;
  background: var(--green-soft);
}

.expected-panel p,
.payment-placeholder p,
.action-panel p,
.calculator-inline p {
  margin: 6px 0 0;
  color: var(--muted);
}

.success-panel {
  border: 1px solid #a9dfc7;
  background: var(--green-soft);
}

.success-panel code,
.payment-placeholder code,
.inline-result code {
  display: inline-flex;
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #102744;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.payment-placeholder {
  border: 1px dashed #9cb7d7;
  background: #f0f6ff;
}

.action-panel,
.calculator-inline {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.calculator-inline {
  display: grid;
  gap: 12px;
}

.calculator-inline h3,
.action-panel h3,
.trouble-panel h3,
.payment-placeholder h3 {
  margin: 0 0 8px;
}

.field-label {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-weight: 800;
}

.field-label span,
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.text-input {
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #bac9da;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.inline-result {
  padding: 12px;
  border-radius: var(--radius);
  background: #fff;
}

.inline-success {
  border: 1px solid #a9dfc7;
  background: var(--green-soft);
}

.inline-error,
.error-panel {
  border: 1px solid #f1b5ae;
  color: var(--red);
  background: var(--red-soft);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.model-card {
  min-height: 74px;
  border: 1px solid #bac9da;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.model-card:hover,
.model-card.is-selected {
  transform: translateY(-1px);
  border-color: var(--blue);
  background: #e9f2ff;
  color: var(--blue-dark);
}

.year-panel {
  max-width: 500px;
  margin: 14px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.button-row,
.utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.button-row {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.btn-secondary {
  border-color: #bac9da;
  background: #fff;
  color: var(--blue-dark);
}

.btn-subtle {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-whatsapp {
  background: #16a065;
  color: #fff;
}

.btn-small {
  min-height: 36px;
  margin-left: 10px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.trouble-panel {
  border: 1px solid #f0d08a;
  background: var(--amber-soft);
}

.trouble-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.check-row input {
  margin-top: 4px;
}

.trouble-status {
  color: var(--amber);
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.blocked-panel {
  border: 1px solid #f1b5ae;
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 980px) {
  .hero-section,
  .guide-layout,
  .guide-cards {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .guide-sidebar {
    position: static;
  }

  .model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-shell,
  .guide-shell {
    width: min(100% - 20px, 1320px);
  }

  .hero-copy,
  .hero-panel,
  .step-card,
  .guide-sidebar {
    padding: 18px;
  }

  .hero-copy h1,
  .status-card h1,
  .step-card h2 {
    font-size: 2rem;
  }

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

  .button-row {
    justify-content: stretch;
  }

  .btn,
  .button-row .btn {
    width: 100%;
  }
}
