/* Customer pages. Phone first. Colors come from color-system.css. */

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
}

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

a {
  color: var(--brand-primary);
}

button,
textarea,
select,
input {
  font: inherit;
  color: inherit;
}

.skip {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  top: 0;
  transform: translateY(-150%);
  background: var(--scheme-navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 4;
}

.skip:focus {
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 3px solid var(--maroon);
  backdrop-filter: blur(8px);
}

.header-inner,
.container {
  width: min(calc(720px + 1.5rem), 100%);
  margin-inline: auto;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.7rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
}

.nav a[aria-current='page'] {
  background: var(--scheme-navy);
  color: #fff;
}

.theme-toggle {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.container {
  padding-block: 1rem 2.5rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.page-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
}

.sheet,
.card,
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 10px 30px var(--shadow);
}

.hero {
  padding: 1.2rem 1.1rem 1.25rem;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  max-width: 100%;
  padding: 0.4rem 0.9rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--scheme-navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.1;
}

.step-pill,
.step-pill .step-pill-kicker {
  color: #fff;
}

.step-pill-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-head {
  position: sticky;
  top: calc(4.85rem + env(safe-area-inset-top, 0px));
  z-index: 2;
  margin: -0.15rem -0.15rem 0;
  padding: 0.15rem 0.15rem 0.45rem;
  background: var(--surface);
}

.step-title {
  margin-top: 0.75rem;
  color: var(--text);
  font-size: clamp(1.9rem, 8vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.step-title em {
  font-style: normal;
  color: var(--brand-red);
}

.step-title em.gold-word {
  color: var(--gold-ink);
}

.lede,
.business-summary {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  max-width: 38ch;
}

.hero .btn,
.card .btn {
  width: 100%;
  margin-top: 1.1rem;
}

.section-label {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.hint,
.fine-print,
.plan-count {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.plan-count {
  margin-top: 0.2rem;
}

.module-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-ready {
  background: var(--status-danger-bg);
  border: 3px solid var(--scheme-maroon);
}

.module-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.card h2,
.question-title,
.results h2 {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card p:not(.step-pill) {
  margin-top: 0.4rem;
  color: var(--text-secondary);
}

.badge {
  flex: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-subtle);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.badge--ready {
  color: #14532d;
  background: #d8f3e2;
}

.badge--maroon {
  color: #fff;
  background: var(--scheme-maroon);
}

.badge--gold {
  color: var(--scheme-gold-ink);
  background: var(--scheme-gold-fill);
}

.btn,
.choice {
  min-height: 56px;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta,
.btn-book {
  background: var(--scheme-cta);
  color: var(--scheme-cta-ink);
  border-color: var(--scheme-cta-press);
  box-shadow: 0 6px 0 var(--scheme-cta-shadow);
}

.btn-cta:hover,
.btn-book:hover {
  background: var(--scheme-cta-hover);
  transform: translateY(-2px);
}

.btn-cta:active,
.btn-book:active {
  background: var(--scheme-cta-press);
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--scheme-cta-shadow);
}

.btn-navy {
  background: var(--scheme-navy);
  color: #fff;
  border-color: var(--scheme-navy-deep);
  box-shadow: 0 6px 0 var(--scheme-navy-press);
}

.btn-navy:hover {
  background: var(--scheme-navy-hover);
  transform: translateY(-2px);
}

.btn-navy:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--scheme-navy-press);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--scheme-navy);
  box-shadow: none;
}

.btn-book {
  width: 100%;
  margin-top: 0.85rem;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand-primary);
  transition: width 0.28s ease;
}

.step-dots {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  padding: 0;
}

.step-dots.is-numbered {
  grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
}

.dot {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
}

.dot.is-current {
  background: var(--scheme-navy);
  border-color: var(--scheme-navy);
  color: #fff;
}

.dot.is-done {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.step-panel {
  animation: sheet-in 0.32s ease;
}

.step-panel.is-back {
  animation-name: sheet-in-back;
}

.questions {
  margin: 0;
}

.question {
  margin: 1rem 0 0;
  padding: 0.95rem 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  min-inline-size: 0;
}

.question-title {
  font-size: 1.05rem;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.choice {
  width: 100%;
  justify-content: flex-start;
  background: var(--surface);
  color: var(--text);
  border-color: #d5cfc3;
  text-align: left;
  box-shadow: none;
}

.choice:hover {
  transform: translateY(-2px);
}

.choice:active {
  transform: translateY(1px);
}

.choice.is-selected {
  background: var(--selected-fill);
  border: 3px solid var(--selected-line);
  color: var(--selected-ink);
}

.choice.is-no.is-selected {
  background: var(--scheme-maroon);
  border-color: var(--scheme-maroon);
  color: #fff;
}

.choice-label {
  flex: 1;
}

.choice-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}

.choice-check {
  margin-left: auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--scheme-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex: none;
}

.choice.is-no .choice-check {
  background: #fff;
  color: var(--scheme-maroon);
}

.yesno-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.yesno-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.yesno-label {
  font-weight: 800;
}

.yesno-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.choice-yn {
  justify-content: flex-start;
}

textarea,
select,
input {
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.9rem 0.85rem;
  border: 2px solid #d5cfc3;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

.more {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-muted);
}

.more textarea {
  font-weight: 400;
  color: var(--text);
}

.step-nav {
  display: flex;
  gap: 0.6rem;
}

.step-nav .btn {
  flex: 1;
}

.done-banner {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #d8f3e2;
  color: #14532d;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.results {
  scroll-margin-top: 5rem;
}

.results h2 {
  font-size: clamp(1.55rem, 6vw, 2rem);
}

.plan-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.plan-line {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.plan-line.is-new {
  animation: rise 0.4s ease;
}

.plan-icon {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-subtle);
  font-size: 1.2rem;
}

.book-note {
  margin-top: 0.7rem;
}

.package-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--scheme-navy);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.price-placeholder {
  width: 100%;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 2px dashed var(--border-control);
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 800;
}

.plan-line-price {
  padding: 0;
  background: transparent;
  border: 0;
}

.text-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 800;
}

.uses-line {
  margin-top: 0.45rem;
}

.plan-dock {
  display: none;
}

@media (max-width: 959px) {
  body.has-plan-dock {
    padding-bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  }

  .plan-dock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    position: fixed;
    left: max(0.65rem, env(safe-area-inset-left, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    bottom: max(0.55rem, env(safe-area-inset-bottom, 0px));
    z-index: 4;
    width: auto;
    min-height: 0;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid var(--scheme-maroon);
    background: var(--scheme-navy);
    color: #fff;
    text-align: left;
    box-shadow: 0 12px 28px rgba(20, 46, 72, 0.28);
  }

  .plan-dock-kicker {
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .plan-dock-line {
    width: 100%;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .plan-dock.is-hidden {
    display: none;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  color: var(--text-muted);
  font-size: 0.92rem;
}

:focus-visible {
  outline: 3px solid var(--scheme-navy);
  outline-offset: 3px;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheet-in-back {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .nav a {
    font-size: 0.78rem;
    padding: 0.35rem 0.4rem;
  }

  .theme-toggle {
    padding-inline: 0.55rem;
  }
}

@media (max-width: 360px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .header-actions {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .nav {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
  }
}

@media (min-width: 720px) {
  .hero .btn,
  .card .btn {
    width: auto;
  }

  .step-dots {
    grid-template-columns: repeat(4, 1fr);
  }

  .yesno-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .yesno-pair {
    width: min(320px, 52%);
  }
}

@media (min-width: 960px) {
  .header-inner,
  .container {
    width: min(calc(1040px + 2rem), 100%);
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .checkup {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1rem;
    align-items: start;
  }

  .plan-column {
    position: sticky;
    top: calc(4.6rem + env(safe-area-inset-top, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .btn-cta:hover,
  .btn-book:hover,
  .btn-navy:hover,
  .choice:hover,
  .btn-cta:active,
  .btn-book:active,
  .btn-navy:active,
  .choice:active {
    transform: none;
  }
}

[data-theme='dark'] .choice {
  border-color: #4a5562;
}

[data-theme='dark'] .choice.is-no.is-selected {
  color: #fff;
}

[data-theme='dark'] .step-pill {
  box-shadow: inset 0 0 0 1px var(--scheme-maroon);
}

[data-theme='dark'] textarea,
[data-theme='dark'] select,
[data-theme='dark'] input {
  border-color: #4a5562;
}

[data-theme='dark'] :focus-visible {
  outline-color: var(--brand-primary-light);
}

[data-theme='dark'] .btn-ghost,
[data-theme='dark'] .btn-navy {
  border-color: var(--brand-primary-light);
}

[data-theme='dark'] .badge--gold {
  color: var(--scheme-gold-bright);
  background: var(--scheme-gold-badge-bg);
}

.steps-4,
.price-grid,
.faq,
.compare-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-amount,
.plan-price {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-mo {
  color: var(--brand-red);
  font-weight: 800;
  font-size: 1.15rem;
}

.price-card.is-popular {
  border-color: var(--brand-red);
  box-shadow: inset 0 0 0 2px var(--brand-red);
}

.plan-line-nudge {
  background: var(--bg-subtle);
  border-color: var(--border-control);
}

.table-wrap {
  overflow-x: auto;
}

.addon-table {
  width: 100%;
  border-collapse: collapse;
}

.addon-table caption {
  text-align: left;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.addon-table th,
.addon-table td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.call-form,
.confirm {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.call-field {
  display: grid;
  gap: 0.25rem;
  font-weight: 800;
}

.call-time {
  border: 0;
  margin: 0;
  padding: 0;
}

.call-time legend {
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.form-error {
  color: var(--scheme-maroon);
  font-weight: 800;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-print {
  width: 100%;
}

@media (min-width: 800px) {
  .price-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .steps-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .skip,
  .business-picker,
  .checkup-main,
  .progress,
  .questions,
  .step-nav,
  .plan-dock,
  .fine-print,
  .call-form,
  .call-slot,
  .btn-print,
  .page-kicker {
    display: none !important;
  }

  body,
  .results,
  .sheet {
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  .checkup,
  .plan-column {
    display: block;
  }

  .plan-price,
  .package-badge,
  .price-mo,
  .gold-word,
  .badge--gold,
  .btn-cta,
  .btn-book,
  .btn-navy,
  .btn-ghost {
    color: #000;
    background: transparent;
    box-shadow: none;
  }
}
