:root {
  --panel: #ffffff;
  --ink: #0b1224;
  --ink-2: #5b6478;
  --ink-3: #8a93a6;
  --line: #e7eaf1;
  --line-2: #eef1f7;
  --brand: #1d3fb8;
  --brand-2: #4f6df3;
  --brand-ink: #0b1f6b;
  --accent: #00c2a8;
  --soft: #f5f7fc;
  --pill: #eef2ff;
  --good: #0a8f6f;
  --danger: #b91c1c;
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .14);
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at -10% -20%, color-mix(in srgb, var(--brand) 12%, transparent) 0%, transparent 60%),
    radial-gradient(900px 500px at 110% -10%, color-mix(in srgb, var(--brand-2) 12%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, #f6f8ff 0%, #eef2fa 100%);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 690px; margin: 0 auto; min-height: 100vh;
  padding: 18px 16px 32px;
  display: flex; flex-direction: column; gap: 14px;
}
@media (min-width: 720px) { .shell { max-width: 780px; padding: 28px 16px; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .field { margin-bottom: 0; }
.form-grid .field.full { grid-column: 1 / -1; }
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }

/* Top bar (centered) */
.topbar { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand .logo {
  width: 110px; height: 110px; border-radius: 26px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; font-weight: 800; font-size: 36px; letter-spacing: .04em;
  display: grid; place-items: center;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--brand) 38%, transparent);
  overflow: hidden;
}
.brand .logo img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.brand .logo.has-image {
  width: 300px; height: 120px;
  padding: 14px 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}
.brand .logo.has-image img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.brand .title { font-size: 24px; font-weight: 800; letter-spacing: -.2px; }
.brand .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; letter-spacing: .04em; }

/* Progress */
.progress-wrap {
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow);
}
.progress-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; margin-bottom: 8px;
}
.progress-top .step-name { color: var(--ink); letter-spacing: .04em; text-transform: none; font-size: 13px; }
.progress-bar { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  border-radius: 999px; transition: width .3s ease;
}

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.panel h3 {
  margin: 0 0 12px; font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 700;
}

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--brand-ink); margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; background: #fff; color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.field.has-error input { border-color: var(--danger); background: #fff5f5; }
.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(185,28,28,.18); }
.field-error {
  color: var(--danger); font-size: 11px; font-weight: 700;
  margin-top: 6px; letter-spacing: .02em;
}
.notice {
  background: #fff5f5; border: 1px solid #fecaca; color: var(--danger);
  border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.5; margin-bottom: 12px;
}
.notice strong { font-weight: 800; letter-spacing: .04em; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; text-align: left; background: #fff;
  cursor: pointer; transition: all .15s ease;
}
.chip .c-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.chip .c-sub  { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.chip.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.chip.active .c-sub { color: var(--brand); }

.stepper {
  display: grid; grid-template-columns: 56px 1fr 56px;
  align-items: center; background: var(--soft);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.stepper button { border: 0; background: transparent; height: 56px; font-size: 22px; font-weight: 700; color: var(--ink); cursor: pointer; }
.stepper button:active { background: #e9eef9; }
.stepper input {
  border: 0; background: transparent; text-align: center;
  height: 56px; font-size: 22px; font-weight: 800; color: var(--ink);
  width: 100%; outline: none; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-meta { font-size: 11px; color: var(--ink-3); margin-top: 8px; text-align: center; }

/* Date picker */
.datepicker { position: relative; }
.dp-trigger {
  width: 100%; position: relative;
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
  display: flex; align-items: center;
}
.dp-trigger:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); background: #fff; }
.dp-trigger input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  padding: 14px 8px 14px 16px; font-size: 15px; font-weight: 600; color: var(--ink);
  font-family: inherit;
}
.dp-trigger input::placeholder { color: var(--ink-3); font-weight: 500; }
.dp-trigger .cal-btn { background: transparent; border: 0; cursor: pointer; padding: 0 12px; height: 100%; display: grid; place-items: center; }
.dp-trigger .cal-ico {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.dp-trigger.invalid { border-color: var(--danger); }
.dp-hint { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.dp-hint.error { color: var(--danger); }
.dp-popover {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: 280px; max-width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 10px; z-index: 20; display: none;
}
.dp-popover.open { display: block; }
.dp-quick { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.dp-quick button {
  border: 1px solid var(--line); background: var(--soft); color: var(--ink-2);
  padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; cursor: pointer;
}
.dp-quick button:hover { border-color: var(--brand); color: var(--brand); background: var(--pill); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dp-head .dp-title { font-size: 12px; font-weight: 800; }
.dp-head button {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; font-size: 12px;
  display: grid; place-items: center; line-height: 1;
}
.dp-head button:hover { color: var(--brand); border-color: var(--brand); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dp-dow { font-size: 9px; font-weight: 800; color: var(--ink-3); letter-spacing: .08em; text-align: center; padding: 3px 0; }
.dp-day { border: 0; background: transparent; height: 30px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.dp-day:hover { background: var(--pill); color: var(--brand); }
.dp-day.muted { color: var(--ink-3); opacity: .4; }
.dp-day.past, .dp-day:disabled { color: var(--ink-3); opacity: .25; cursor: not-allowed; text-decoration: line-through; }
.dp-day.past:hover, .dp-day:disabled:hover { background: transparent; color: var(--ink-3); }
.dp-day.today { background: var(--soft); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
.dp-day.selected {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; box-shadow: 0 3px 6px color-mix(in srgb, var(--brand) 30%, transparent);
}
.dp-day.selected:hover { color: #fff; }

/* Add-ons grid */
.addon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .addon-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.addon-card {
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; padding: 12px; cursor: pointer; transition: all .15s ease;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; min-height: 110px;
}
.addon-card:hover { border-color: #c5cee6; }
.addon-card.on {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.addon-card .a-name { font-size: 13px; font-weight: 700; line-height: 1.25; padding-right: 52px; }
.addon-card .a-desc { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.addon-card .a-price {
  font-size: 11px; color: var(--brand); font-weight: 700;
  background: var(--pill); padding: 3px 8px; border-radius: 999px;
  align-self: flex-start; margin-top: auto;
}
.addon-card .a-setup {
  font-size: 10px; color: var(--ink-3); font-weight: 600;
  margin-top: 2px;
}
.addon-card .switch {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 22px; border-radius: 999px;
  background: #d8dde8; transition: background .2s;
}
.addon-card .switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: left .2s;
}
.addon-card.on .switch { background: var(--brand); }
.addon-card.on .switch::after { left: 16px; }

/* Pricing card */
.pricing {
  background: linear-gradient(160deg, #0b1020 0%, var(--brand-ink) 60%, var(--brand) 100%);
  color: #fff; border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.pricing::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-2) 35%, transparent), transparent);
  pointer-events: none;
}
.pricing .label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #a9b6e8; font-weight: 700; }
.pricing .price { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 0; line-height: 1.05; }
.pricing .price small { font-size: 14px; font-weight: 600; color: #c9d2f3; margin-left: 6px; letter-spacing: 0; }
.pricing .meta { margin-top: 8px; font-size: 12px; color: #c9d2f3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pricing .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: #6c7bc7; }
.period {
  display: grid; grid-template-columns: repeat(3,1fr);
  margin-top: 16px; gap: 4px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  padding: 5px; border-radius: 12px;
}
.period button {
  border: 0; background: transparent; color: #c9d2f3;
  padding: 12px 8px; font-size: 14px; font-weight: 700;
  border-radius: 8px; cursor: pointer; letter-spacing: .2px;
}
.period button.active { background: #fff; color: var(--brand-ink); }

.pricing .onetime-line {
  margin-top: 16px;
  background: rgba(0,194,168,.18);
  border: 1px solid rgba(0,194,168,.4);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
}
.pricing .onetime-line .ot-label {
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: #6ff0d3; font-weight: 800;
}
.pricing .onetime-line .ot-value {
  font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -.4px;
  margin-left: auto;
}
.pricing .onetime-line .ot-suffix {
  font-size: 14px; font-weight: 600; color: #c9d2f3;
}
[hidden] { display: none !important; }

/* Step-1 light price summary */
.price-summary {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px;
  align-items: center;
}
.price-summary .ps-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.price-summary .ps-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.price-summary .ps-amount { text-align: right; }
.price-summary .ps-value { font-size: 28px; font-weight: 800; letter-spacing: -.4px; color: var(--brand-ink); }
.price-summary .ps-unit { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.price-summary .ps-onetime {
  grid-column: 1 / -1;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px;
  padding: 14px 18px; margin-top: 12px;
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
}
.price-summary .ps-onetime .ot-label {
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--good); font-weight: 800;
}
.price-summary .ps-onetime .ot-value {
  margin-left: auto;
  font-size: 28px; font-weight: 800; color: var(--good); letter-spacing: -.3px;
}
.price-summary .ps-onetime .ot-suffix {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
}

/* Nav */
.nav-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.nav-row.solo { grid-template-columns: 1fr; }
.btn { border: 0; cursor: pointer; padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 800; letter-spacing: .3px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 40%, transparent);
}
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }

.step { display: none; flex-direction: column; gap: 14px; }
.step.active { display: flex; }

.thanks {
  text-align: center; padding: 40px 16px;
}
.thanks h2 { font-size: 22px; }
.thanks p { color: var(--ink-2); }
.thanks a { color: var(--brand); font-weight: 700; }
