:root {
  --navy: #1b2a4a;
  --navy-soft: #243558;
  --grey: #5b6577;
  --line: #d9dee8;
  --bg: #f5f7fb;
  --card: #ffffff;
  --accent: #2f6fed;
  --warn: #8a6d3b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 42, 74, 0.08);
  --max: 1080px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--navy); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 24px 20px 64px; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.brand { font-weight: 700; letter-spacing: 0.2px; font-size: 1.05rem; }
.brand span { color: var(--grey); font-weight: 500; margin-left: 8px; font-size: 0.9rem; }
.market {
  display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px 6px 14px; box-shadow: var(--shadow);
}
.market label { font-size: 0.85rem; color: var(--grey); }
.market select {
  border: 0; background: transparent; color: var(--navy); font-weight: 600; outline: none; cursor: pointer;
}
.hero {
  background: linear-gradient(160deg, var(--navy), var(--navy-soft));
  color: #fff; border-radius: 22px; padding: 36px 28px; box-shadow: var(--shadow); margin-bottom: 28px;
}
.hero h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; }
.hero p { margin: 0; max-width: 46rem; color: rgba(255,255,255,0.88); line-height: 1.5; }
.price {
  display: inline-block; margin-top: 18px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 8px 14px; font-size: 0.95rem;
}
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 20px; }
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 190px;
}
.card h2 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--grey); line-height: 1.45; flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; border-radius: 10px; padding: 11px 14px; font-weight: 600;
  border: 0; text-decoration: none; width: fit-content; min-height: 44px;
}
.btn:hover { background: var(--navy-soft); text-decoration: none; }
.btn.secondary { background: #eef2f8; color: var(--navy); }
.note {
  margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: #fff8e8; color: var(--warn);
  border: 1px solid #f0e0b8; font-size: 0.92rem; line-height: 1.45;
}
.footer {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--grey);
  font-size: 0.88rem; line-height: 1.5;
}
.footer .entity { color: var(--navy); font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 8px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: rgba(255,255,255,0.08); border-radius: 12px; padding: 14px; }
.step strong { display: block; margin-bottom: 4px; }
.page-hero { margin-bottom: 18px; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(1.4rem, 3.5vw, 2rem); }
.page-hero p { margin: 0; color: var(--grey); max-width: 44rem; line-height: 1.5; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.panel h2 { margin: 0 0 8px; font-size: 1.05rem; }
.panel ul { margin: 8px 0 0; padding-left: 18px; color: var(--grey); }
.panel li { margin: 4px 0; }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: #eaf1ff; border-radius: 999px; padding: 5px 10px; margin-bottom: 10px;
}

.card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #ffffff 0%, #eef3fb 100%);
  border-color: #b8c7e0;
  min-height: 160px;
}
.card.primary h2 { font-size: 1.35rem; }
.card .price-pill {
  display: inline-block; margin: 4px 0 8px; background: #eaf1ff; color: var(--accent);
  border-radius: 999px; padding: 5px 10px; font-size: 0.85rem; font-weight: 700;
}


/* Vedge brand watermark + copyright (all regions) */
.wrap { position: relative; }
.vedge-watermark {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
  opacity: 0.08; /* 8% — within 6–10% */
  user-select: none;
}
.vedge-watermark img {
  width: 56px;
  height: 56px;
  display: block;
}
.vedge-watermark .brand-mark {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}
.footer .copyright {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--grey);
}
.pii-block {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #c9b28a;
  border-radius: 10px;
  background: #fffaf0;
}
.pii-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a6d3b;
  background: #f5e6c8;
  border-radius: 999px;
  padding: 4px 8px;
  margin-bottom: 8px;
}
.pii-block label { color: var(--grey); }
.pii-block input[disabled] {
  background: #eef1f6;
  color: var(--grey);
  cursor: not-allowed;
  opacity: 0.85;
}
.upload-spec {
  margin: 8px 0 12px;
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .vedge-watermark img { width: 44px; height: 44px; }
  .vedge-watermark { right: 8px; bottom: 8px; opacity: 0.09; }
  .footer .copyright { font-size: 0.75rem; }
}
@media (min-width: 1280px) {
  .vedge-watermark img { width: 64px; height: 64px; }
  .vedge-watermark { right: 20px; bottom: 16px; }
}


/* Region selector (10 Nov 2026) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

html.region-pending body .wrap,
body.region-pending .wrap {
  visibility: hidden;
  pointer-events: none;
}

.region-control {
  display: flex;
  align-items: center;
}
.region-control-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  min-height: 44px;
  min-width: 180px;
  max-width: min(280px, 86vw);
  text-align: left;
  color: var(--navy);
  font: inherit;
}
.region-control-btn:hover { border-color: #b8c7e0; }
.region-control-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.region-control-kicker {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.7rem;
  color: var(--grey);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.region-control-value {
  grid-column: 1;
  grid-row: 2;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.region-control-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--grey);
  font-size: 0.85rem;
}

.region-gate[hidden] { display: none !important; }
.region-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg);
  overflow: auto;
}
.region-gate.is-change {
  background: rgba(27, 42, 74, 0.45);
  backdrop-filter: blur(4px);
}
.region-dialog {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  margin: auto;
}
.region-dialog h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  outline: none;
}
.region-dialog #region-dialog-desc {
  margin: 0 0 18px;
  color: var(--grey);
  line-height: 1.45;
  font-size: 0.95rem;
}
.region-choices {
  display: grid;
  gap: 10px;
}
.region-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 52px;
  cursor: pointer;
  color: var(--navy);
  font: inherit;
}
.region-choice:hover,
.region-choice:focus-visible {
  border-color: var(--accent);
  background: #eaf1ff;
}
.region-choice:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.region-choice-name { font-weight: 700; font-size: 1rem; }
.region-choice-sub { font-size: 0.82rem; color: var(--grey); }

.country-search-panel { margin-top: 14px; }
.country-search-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.country-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* avoid iOS zoom */
  color: var(--navy);
  background: #fff;
}
.country-search:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.country-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px;
  max-height: min(240px, 40vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.country-list li[role="option"] {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 40px;
}
.country-list li[role="option"]:hover,
.country-list li[role="option"].is-active {
  background: #eaf1ff;
}
.country-empty {
  padding: 12px;
  color: var(--grey);
  font-size: 0.9rem;
}
.region-cancel {
  margin-top: 16px;
  background: transparent;
  border: 0;
  color: var(--grey);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 4px;
}
.region-cancel:hover { color: var(--navy); }
.region-cancel:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn.is-disabled,
a.btn[aria-disabled="true"] {
  background: #c5cad3;
  color: #fff;
  pointer-events: none;
  cursor: not-allowed;
}
.price-pill.is-soon { background: #eef1f6; color: var(--grey); }

@media (max-width: 760px) {
  .region-control-btn { min-width: 0; width: auto; }
  .region-dialog { padding: 22px 18px 18px; }
  .topbar { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .region-gate { backdrop-filter: none; }
}


/* Test-mode banner (STRIPE_MODE=test only; never rendered in live) */
.mode-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1b2a4a;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  line-height: 1.35;
}
body.region-gate-open .mode-banner,
html.region-pending .mode-banner,
body.region-pending .mode-banner {
  /* Keep the banner visible above the region gate */
  z-index: 60;
}
.region-gate {
  top: 44px;
}
body:not(:has(.mode-banner)) .region-gate {
  top: 0; /* live: no banner above the gate */
}

.footer .conduct-line,
.footer .adviser-line,
.region-dialog .adviser-line {
  margin: 8px 0 0;
  color: var(--grey);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 52rem;
}
.region-dialog .adviser-line { margin-top: 0; margin-bottom: 14px; }

.ww-hold {
  background: #fff4e5;
  border: 1px solid #f0d3a0;
  color: #5c3d0a;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
  font-weight: 650;
  line-height: 1.45;
}
.paywall-accept {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 0;
  color: var(--grey);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 40rem;
}
.paywall-accept input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.paywall-accept.is-disabled,
.paywall-accept input:disabled {
  cursor: not-allowed;
}
.paywall-accept a { font-weight: 650; }
.to-confirm {
  display: inline;
  background: #fff3bf;
  border-bottom: 1px dashed #b08900;
  padding: 0 3px;
  font-weight: 650;
  color: #5c3d0a;
}
.legal-block h2 { margin-top: 1.4em; }
.legal-block p, .legal-block li { color: var(--grey); line-height: 1.55; }
.legal-draft-note {
  font-size: 0.9rem;
  color: var(--grey);
  margin: 0 0 16px;
}
.field-help { display: block; margin-top: 4px; color: var(--grey); font-size: 0.8rem; font-weight: 400; }

/* Terms of Service (Counsel text rendered from legal/terms_nz.md) */
.terms table { border-collapse: collapse; margin: 8px 0 12px; }
.terms th, .terms td { border: 1px solid #d7deea; padding: 6px 10px; text-align: left; }
.terms h2.part { margin-top: 28px; }
