/* i5 Fiber ISP web application — layout per the Tel-Star Figma design, i5 palette. */

/* Latin subset of the Inter variable font (105KB vs the 856KB full TTF —
   regenerate with fontTools.subset from an upstream Inter release if the
   charset ever needs to grow). Preloaded from base.html. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fbfbfa;
  --surface: #f7f7f5;
  --card: #ffffff;
  --ink: #16161d;
  --ink-soft: #55555e;
  --ink-faint: #8a8a93;
  --line: #ececea;
  --accent: #16806c;
  --promo: #fdeb64;
  --promo-ink: #4a4206;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  /* One geometry for every interactive control (buttons + inputs). */
  --radius-control: 12px;
  --shadow: 0 1px 2px rgb(22 22 29 / 0.04), 0 10px 28px rgb(22 22 29 / 0.05);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  font-size: 16px;
}

img {
  max-width: 100%;
}

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

/* ---------- Layout chrome ---------- */

/* Slim universal top bar — 44px, light, matching i5fiber.com's scrolled
   header (the 2026 logo is a green circle + dark wordmark). */
.top-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.top-bar-logo {
  display: inline-flex;
  align-items: center;
}

.top-bar-logo img {
  height: 24px;
  width: auto;
  display: block;
}

.top-bar-back {
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.top-bar-back span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.top-bar-back:hover {
  color: var(--ink);
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.main-center {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 120px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-control);
  padding: 14px 32px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, transform 120ms ease;
}

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

.btn-primary:hover {
  background: #2c2c37;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--card);
}

.btn:focus-visible,
.pkg-card:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Landing / hero ---------- */

.search-hero,
.customize-intro {
  padding: 24px 0 0;
}

.hero-star {
  width: 120px;
  height: auto;
}

.text-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--ink-soft);
}

.search-hero h1,
.customize-intro h1,
.thank-you h1,
.not-in-service h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}

.search-hero p,
.customize-intro p,
.thank-you hgroup p,
.not-in-service hgroup p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.search-hero {
  width: min(640px, 100%);
  position: relative;
  display: grid;
  justify-items: center;
}

.main-landing {
  position: relative;
  overflow: hidden;
}

/* Radar rings — the service area radiating from the star */
.radar-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.radar-rings i {
  position: absolute;
  border: 1.5px dashed #dbdbd5;
  border-radius: 50%;
  animation: ring-breathe 7s ease-in-out infinite;
}

.radar-rings i:nth-child(1) { width: 420px; height: 420px; }
.radar-rings i:nth-child(2) { width: 680px; height: 680px; opacity: 0.7; animation-delay: 0.6s; }
.radar-rings i:nth-child(3) { width: 960px; height: 960px; opacity: 0.45; animation-delay: 1.2s; }
.radar-rings i:nth-child(4) { width: 1280px; height: 1280px; opacity: 0.25; animation-delay: 1.8s; }

@keyframes ring-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

/* Entrance — one subtle rise, staggered */
.rise {
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.rise-1 { animation-delay: 0.06s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.18s; }
.rise-4 { animation-delay: 0.24s; }

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

/* Capsule search + animated dropdown */
.ac-wrap {
  position: relative;
  /* Above the sibling .rise elements, whose animations create stacking
     contexts that would otherwise paint over the dropdown. */
  z-index: 30;
  width: min(620px, 100%);
  margin-top: 30px;
}

.cap-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 1px 2px rgb(22 22 29 / 0.04), 0 14px 40px rgb(22 22 29 / 0.07);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.cap-search:focus-within {
  border-color: #c9c9c2;
  box-shadow: 0 1px 2px rgb(22 22 29 / 0.05), 0 18px 48px rgb(22 22 29 / 0.11);
}

.cap-search > svg {
  flex: none;
  color: var(--ink-faint);
}

.cap-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  background: none;
  padding: 8px 0;
}

.cap-btn {
  flex: none;
  white-space: nowrap;
}

.cap-search.searching .cap-btn {
  opacity: 0.7;
  pointer-events: none;
}

.ac-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgb(22 22 29 / 0.06), 0 24px 60px rgb(22 22 29 / 0.12);
  text-align: left;
}

.ac-list.ac-open {
  animation: ac-in 160ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes ac-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ac-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background-color 90ms ease;
}

.ac-list li svg {
  flex: none;
  color: var(--ink-faint);
  align-self: center;
}

.ac-list li.active {
  background: var(--surface);
}

.ac-list li.active svg {
  color: var(--accent);
}

.ac-street {
  font-weight: 600;
  white-space: nowrap;
}

.ac-rest {
  color: var(--ink-faint);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Flow preview + stats */
.flow-steps {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.flow-steps li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.flow-steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  font-weight: 400;
}

.hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.hero-stats b {
  color: var(--ink);
  font-weight: 700;
}

/* Traditional alert banner: icon left, title + body left-aligned, soft
   amber field. Spans the full content width, flush with the card grid.
   Shown to business addresses. */
.pool-banner {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: #fdf6d8;
  border: 1px solid #ecd98a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--promo-ink);
}

.pool-banner-icon {
  flex: none;
  display: inline-flex;
  margin-top: 1px;
  color: #a8891a;
}

.pool-banner-body {
  display: block;
  line-height: 1.5;
}

.pool-banner-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* ---------- Customize layout ---------- */

.main-customize {
  padding-bottom: 120px; /* room for the sticky step bar */
}

.customize-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* Summary card */

/* Summary pane — styled to the Figma frames 1294:310–312 (Jul 25).
   Pane-scoped tokens so the design's softer greys don't leak app-wide. */
.summary-card {
  --p-ink: #494949;
  --p-muted: #949494;
  --p-line: #e9e9e9;
  --p-accent: #16806c;
  position: sticky;
  top: 16px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 24px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.01);
  padding: 28px 28px 24px;
  color: var(--p-ink);
}

.summary-card h2,
.summary-heading {
  font-size: 1.3125rem; /* 21px */
  font-weight: 700;
  line-height: 1.07;
  color: var(--p-ink);
  margin: 0 0 14px;
}

.summary-edit {
  float: right;
  color: var(--ink-faint);
  line-height: 1;
}

.summary-edit:hover {
  color: var(--ink);
}

.summary-group.clickable {
  cursor: pointer;
  transition: background-color 140ms ease;
}

.summary-group.clickable:hover,
.summary-group.clickable:focus-visible {
  background: #fafafa;
  box-shadow: inset 0 0 0 1px var(--p-line);
}

.summary-group.clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.summary-group.clickable:hover .summary-jump-icon,
.summary-group.clickable:focus-visible .summary-jump-icon {
  color: var(--ink);
}

/* Rows own their hover surface (padding + negative margin), and dividers are
   drawn as separate lines — so a highlight can never overlap a divider. */
.summary-group {
  position: relative;
  padding: 8px 16px;
  margin-inline: -16px;
  border-radius: 12px;
}

/* "Pricing details" reads as its own section, peer to "Package details". */
.summary-pricing {
  padding-top: 14px;
}

.summary-pricing h2 {
  margin-bottom: 10px;
}

/* Dividers only where the comp draws them: after the address block and
   before Pricing details — never between the service groups. */
.summary-group[data-summary="internet"]::before,
.summary-group.summary-pricing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--p-line);
}

.summary-group:first-of-type {
  padding-top: 0;
}

.summary-group h3 {
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  color: var(--p-ink);
  margin: 0 0 8px;
}

.summary-address {
  margin: 0;
  color: var(--p-ink);
  font-size: 0.75rem;
  line-height: 1.4;
}

.summary-group dl {
  margin: 0;
  display: grid;
  gap: 3px;
}

.summary-group dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem; /* 12px, Inter Light */
  font-weight: 300;
}

.summary-group dt {
  color: var(--p-ink);
}

.summary-group dd {
  margin: 0;
  color: var(--p-ink);
  text-align: right;
}

/* Sub-total row carries regular weight; the discount rows sit muted —
   plain grey text per the Figma frames (no pills, no minus notation). */
.summary-pricing dl > div:first-child {
  font-weight: 400;
}

.summary-pricing dl > div:not(:first-child) dt,
.summary-pricing dl > div:not(:first-child) dd {
  color: var(--p-muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--p-line);
  padding-top: 16px;
  margin-top: 4px;
  font-size: 1.3125rem; /* 21px */
  font-weight: 700;
  color: var(--p-ink);
}

.summary-total strong {
  font-size: 1.3125rem;
  font-weight: 600;
  color: #686868;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Steps + package cards */

.step-title {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: 4px 0 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px 16px;
  padding-top: 14px; /* room for the promo badge above cards */
}

.pkg-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  /* Uniform square tiles across every step (phone's short cards included).
     Acts as a minimum: a card still grows taller if its content demands. */
  aspect-ratio: 1 / 1;
}

.pkg-card:hover {
  border-color: var(--ink-faint);
}

.pkg-card:has(input:checked) {
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

.pkg-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pkg-banner {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--promo);
  color: var(--promo-ink);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  padding: 3px 12px;
  white-space: nowrap;
}

.pkg-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.pkg-name {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
}

.pkg-price {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 3px;
}

.pkg-price em {
  font-style: normal;
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 0.72rem;
}

.pkg-radio {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid #d5d5d0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 120ms ease;
}

.pkg-card:has(input:checked) .pkg-radio {
  border-color: var(--ink);
}

.pkg-card:has(input:checked) .pkg-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
}

.pkg-specs {
  display: block;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.pkg-spec {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.72rem;
  padding: 2.5px 0;
}

.pkg-spec-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.pkg-spec-leader {
  flex: 1;
  border-bottom: 1.5px dotted #d9d9d4;
  transform: translateY(-3px);
  min-width: 12px;
}

.pkg-spec-value {
  color: var(--ink-soft);
  text-align: right;
  /* Long values (e.g. "Best for" lines) wrap instead of crowding the
     dotted leader off the row. */
  max-width: 62%;
  overflow-wrap: break-word;
}

/* "None" opt-out card — dashed ghost that solidifies when selected */
.none-ghost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  background: transparent;
  border: 1.5px dashed #d5d5d0;
  box-shadow: none;
  min-height: 150px;
}

.none-ghost:hover {
  border-color: var(--ink-faint);
  background: rgb(255 255 255 / 0.6);
}

.none-ghost .pkg-radio {
  position: absolute;
  top: 16px;
  right: 16px;
}

.none-ghost .ng-icon {
  color: var(--ink-faint);
  transition: color 140ms ease;
}

.none-ghost .pkg-name {
  color: var(--ink-soft);
}

.none-ghost .ng-sub {
  font-size: 0.75rem;
  color: var(--ink-faint);
  max-width: 22ch;
}

.none-ghost:has(input:checked) {
  border: 1.5px solid var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
}

.none-ghost:has(input:checked) .ng-icon,
.none-ghost:has(input:checked) .pkg-name {
  color: var(--ink);
}

/* ---------- Sign-up form ---------- */

.signup-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  background: #fff;
  width: 100%;
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #d64545;
}

/* Required-field asterisks (client request, Jul 23) */
.field:has(input[required], select[required]) > span::after,
.agreement:has(input[required]) strong::after {
  content: " *";
  color: #d64545;
}

.agreements {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.agreement {
  display: flex;
  gap: 12px;
  cursor: pointer;
}

.agreement input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
}

/* Checkboxes have no border to tint, so flag invalid ones with an outline
   and color the label — text inputs alone highlighting was the Jul 23 bug. */
.agreement input[aria-invalid="true"] {
  outline: 2px solid #d64545;
  outline-offset: 2px;
}

.agreement:has(input[aria-invalid="true"]) strong {
  color: #d64545;
}

.agreement strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Policy links inside agreements: inherit ink, underline to signal linkness.
   Browsers route clicks on the anchor to the link, not the checkbox label. */
.agreement a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.agreement small {
  display: block;
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-top: 4px;
  max-width: 60ch;
}

.form-error {
  color: #d64545;
  font-size: 0.85rem;
  margin: 12px 0 0;
}

/* "Bundles & promotions" — bordered card at the foot of the summary pane
   (Figma 1294:311/312). Descriptive notes; amounts live in Pricing details. */
.summary-promos {
  margin-top: 16px;
  border: 1px solid var(--p-line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.01);
}

.summary-promos > h3 {
  font-size: 0.6875rem; /* 11px */
  font-weight: 700;
  color: var(--p-ink);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--p-line);
}

/* Divider only between two VISIBLE notes — a hidden play-note still counts
   as a DOM sibling, which used to double the hairline under the heading. */
.promo-note:not([hidden]) + .promo-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--p-line);
}

.promo-note h4 {
  font-size: 0.6875rem; /* 11px */
  font-weight: 700;
  color: var(--p-ink);
  margin: 0 0 6px;
}

.promo-note p {
  margin: 0;
  font-size: 0.625rem; /* 10px */
  line-height: 1.4;
  color: var(--p-ink);
}

.promo-note a {
  color: var(--p-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Server-side validation fallback page (reserve-error.html) */
.reserve-errors {
  margin: 0 0 24px;
  padding: 0 0 0 20px;
  text-align: left;
}

.reserve-errors li {
  margin-bottom: 6px;
}

.reserve-errors li::marker {
  color: #d64545;
}

/* ---------- Sticky step bar ---------- */

.step-bar {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 6vw, 120px);
  z-index: 10;
}

.step-progress {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.step-progress li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 110px;
}

.step-progress .node {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d5d5d0;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  z-index: 1;
}

/* connector line between nodes */
.step-progress li + li::before {
  content: "";
  position: absolute;
  top: 9px;
  right: calc(50% + 12px);
  width: calc(100% - 24px);
  height: 1.5px;
  background: #e4e4e0;
}

.step-progress li.active {
  color: var(--ink);
  font-weight: 600;
}

.step-progress li.active .node,
.step-progress li.done .node {
  border-color: var(--ink);
}

.step-progress li.active .node::after,
.step-progress li.done .node::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.step-progress li.done + li::before {
  background: var(--ink);
}

.btn-next {
  background: var(--ink);
  color: #fff;
  min-width: 220px;
  padding: 14px 40px;
}

.btn-next:hover:not(:disabled) {
  background: #2c2c37;
}

.btn-next:disabled {
  background: var(--surface);
  color: #b9b9b3;
  border: 1px solid var(--line);
  cursor: not-allowed;
}

.step-actions {
  display: flex;
  gap: 10px;
}

.step-bar .mobile-total {
  display: none;
  font-weight: 700;
}

/* ---------- Thank you ---------- */

.thank-you {
  text-align: center;
  padding: 24px 8px 48px;
  width: min(460px, 100%);
}

.thank-you-art {
  width: 200px;
}

.timeline {
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
  text-align: left;
}

.timeline li {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.timeline p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.timeline-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.timeline-dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
}

/* ---------- Not in service ---------- */

.not-in-service {
  width: min(640px, 100%);
  text-align: center;
  padding: 24px 0 48px;
}

.not-in-service .signup-card {
  margin-top: 28px;
  text-align: left;
}

.not-in-service .btn {
  margin-top: 24px;
  width: 100%;
}

/* Live-update toast (shown when pricing changes while the page is open) */
.update-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 26px rgb(22 22 29 / 0.14);
  padding: 12px 14px 12px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  max-width: min(92vw, 460px);
}

/* ---------- Admin ---------- */

.admin-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-control) + 4px);
  padding: 6px;
  width: fit-content;
}

.admin-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-control);
}

.admin-nav a:hover {
  background: var(--surface);
}

.admin-nav a.active {
  background: var(--ink);
  color: #fff;
}

.admin-page {
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 64px;
}

.admin-narrow {
  max-width: 640px;
}

.admin-page h1 {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-faint);
}

.admin-flash {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-flash.ok {
  background: var(--promo);
  color: var(--promo-ink);
}

.admin-flash.error {
  background: #fde8e8;
  color: #9b2222;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-decoration: none;
  color: var(--ink-soft);
  display: grid;
  gap: 4px;
}

.stat-card strong {
  font-size: 1.5rem;
  color: var(--ink);
}

.stat-card span {
  font-size: 0.8rem;
}

.stat-card:hover,
.stat-card.active {
  border-color: var(--ink);
}

.admin-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-section-head h2 {
  font-size: 1.05rem;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  color: var(--ink-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.admin-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table .empty {
  color: var(--ink-faint);
  text-align: center;
  padding: 24px;
}

.admin-table input,
.admin-table select {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.85rem;
  max-width: 180px;
}

.spec-cell {
  color: var(--ink-faint);
  font-size: 0.75rem;
  max-width: 300px;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.row-actions form {
  display: inline;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-danger {
  background: transparent;
  color: #b23030;
  border: 1px solid #ecc9c9;
}

.btn-danger:hover {
  background: #fdf0f0;
}

.promo-chip {
  background: var(--promo);
  color: var(--promo-ink);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 0.75rem;
}

.admin-inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.admin-inline-form .field {
  min-width: 140px;
}

.admin-inline-form .field-xs {
  min-width: 70px;
  max-width: 90px;
}

.admin-search {
  display: flex;
  gap: 8px;
}

.admin-search input {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 9px 12px;
  font: inherit;
  font-size: 0.85rem;
  min-width: 240px;
}

.admin-form textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  width: 100%;
  resize: vertical;
}

.admin-form .field-full {
  margin-top: 16px;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.admin-hint {
  color: var(--ink-faint);
  font-size: 0.82rem;
  max-width: 70ch;
}

.admin-pager {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .admin-table {
    display: block;
    overflow-x: auto;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .customize-layout {
    grid-template-columns: 1fr;
  }

  /* Summary collapses under the intro; order content first on small screens */
  .summary-card {
    position: static;
    order: 2;
  }

  .customize-steps {
    order: 1;
  }

  .step-bar .mobile-total {
    display: block;
  }
}

@media (max-width: 600px) {
  .cap-search {
    padding-left: 14px;
  }

  .cap-search .cap-btn {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .radar-rings i:nth-child(1) { width: 300px; height: 300px; }
  .radar-rings i:nth-child(2) { width: 480px; height: 480px; }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .step-progress {
    display: none;
  }

  .step-bar {
    padding: 10px 16px;
  }

  .step-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .step-actions .btn {
    margin-left: auto;
  }

  .btn-next {
    min-width: 0;
  }

  .btn {
    padding: 13px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Phone-line quantity stepper (business phone card) ---------- */

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.qty-label {
  font-weight: 600;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qty-count {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Thank-you CTA row: schedule (primary) beside back-to-website (ghost). */
.thank-you-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#schedule-installation[disabled] {
  opacity: 0.75;
  cursor: default;
}
