/* addresstest.com — global styles
 * Design language modeled on campsite.com: warm paper background, white
 * surfaces, near-black ink, black primary buttons, one warm-orange accent,
 * large radii, soft layered shadows, generous whitespace. */
:root {
  --bg: #faf9f7;               /* warm paper */
  --surface: #ffffff;
  --ink: #171717;              /* campsite --text-primary */
  --ink-2: #525252;            /* campsite --text-secondary */
  --ink-3: #737373;            /* campsite --text-tertiary */
  --line: rgba(28, 25, 23, 0.09);
  --line-strong: rgba(28, 25, 23, 0.16);
  --accent: #ea580c;           /* campsite brand orange (#ff591e family), softened */
  --accent-dark: #c2410c;      /* links / active text — ≥4.5:1 on white */
  --accent-soft: #fdf1e7;
  --accent-line: #f3ddc7;
  --ok: #047857;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05);
  --shadow-pop: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 12px rgba(28, 25, 23, 0.05), 0 24px 64px rgba(28, 25, 23, 0.08);
  /* campsite's button shadow: inset top highlight + stacked soft drops */
  --shadow-btn: inset 0 1px 0 #ffffff, 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 2px rgba(0, 0, 0, 0.04), 0 3px 3px rgba(0, 0, 0, 0.02);
}

* { box-sizing: border-box; }

::selection { background: rgba(234, 88, 12, 0.16); }

/* the `hidden` attribute must always win over display rules below
 * (.lang-toggle, .badge, .btn all set display and would otherwise show) */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-dark); }
/* long URLs (e.g. the sources list on country pages) must wrap on small screens */
main a { overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; }
h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin: 48px 0 14px; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header {
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: rgba(28, 25, 23, 0.05); }

/* hero */
.hero {
  padding: 88px 0 60px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 20px;
}
.hero p {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 36px;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* eyebrow pill above the hero H1 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin: 0 0 24px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.14);
}
.btn-primary:hover { background: #313131; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
}
.btn-ghost:hover { background: #f5f4f2; border-color: rgba(28, 25, 23, 0.24); }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* white OAuth-style button (Google) */
.btn-google {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-btn);
}
.btn-google:hover { background: #faf9f7; }
.btn-google svg { width: 18px; height: 18px; flex: none; }

/* cards & grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.grid .card { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28, 25, 23, 0.05), 0 16px 40px rgba(28, 25, 23, 0.08);
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0 0 14px; color: var(--ink-2); font-size: 0.95rem; }
.card .more { color: var(--accent-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.card .more:hover { text-decoration: underline; }
.card-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 6px;
}

/* sections */
.section { padding: 56px 0; }
.section h2 { margin-top: 0; }
.section .container > h2:not(:first-child) { margin-top: 48px; }
.lead { color: var(--ink-2); }

/* address output — dark, warm-ink card */
.addr-output {
  background: #1c1917;
  color: #f5f4f2;
  border-radius: 14px;
  padding: 24px 28px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 120px;
  margin: 16px 0;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(28, 25, 23, 0.14);
}
.addr-output:empty::before { content: ""; }
.addr-output .phone-line { color: #a8a29e; }
.addr-output strong { color: #d6d3d1; font-weight: 600; }

/* forms */
.field-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
select, input[type="text"], input[type="email"], input[type="password"], textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select:hover, input:hover, textarea:hover { border-color: var(--line-strong); }
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: rgba(28, 25, 23, 0.4);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.07);
}
select { min-width: 240px; }
textarea { width: 100%; min-height: 120px; font-family: inherit; }
input[type="file"] { font-size: 0.95rem; color: var(--ink-2); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }

progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #f0efec;
}
progress::-webkit-progress-bar { background: #f0efec; }
progress::-webkit-progress-value { background: var(--ink); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--ink); border-radius: 999px; }

/* tool panel — the tool itself is the hero (spec 008) */
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  margin: 28px 0;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.tool-panel .field-row { justify-content: center; }
.tool-panel select { min-width: 280px; padding: 14px 16px; font-size: 1.05rem; }
.tool-panel .btn { padding: 14px 28px; font-size: 1.05rem; }
.tool-panel textarea { text-align: left; min-height: 140px; padding: 14px 16px; font-size: 1.05rem; }

/* step pills (batch flow) */
.step-pills { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 24px; }
.step-pill {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.step-arrow { color: var(--ink-3); }

/* one-line small print */
.fine-print { font-size: 0.85rem; color: var(--ink-3); margin: 8px 0 16px; }

/* pricing numbers */
.price { font-size: 2.2rem; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.03em; color: var(--ink); }
.price-unit { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }

/* faq (country pages) */
.faq h3 { margin: 22px 0 4px; font-size: 1.05rem; }
.faq p { margin: 0; color: var(--ink-2); }

/* tool internal links (country pages) */
.tool-links li { margin-bottom: 6px; }

/* format example block */
.addr-example {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 14px 0;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}

/* spec table */
.spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.spec-table th, .spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  color: var(--ink-2);
  font-weight: 600;
  width: 170px;
  background: #fcfbf9;
  border-right: 1px solid var(--line);
}
code {
  background: #f5f4f2;
  color: #44403c;
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.88em;
}

/* country index chips */
.country-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.country-chips a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.country-chips a:hover { border-color: rgba(28, 25, 23, 0.3); color: var(--ink); }
.country-chips a.chip-all { border-style: dashed; color: var(--accent); font-weight: 600; }
.country-chips a.chip-all:hover { border-color: var(--accent); color: var(--accent-dark); }

/* promo box (scenario A cross-sell) — soft pastel accent card */
.promo {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.promo h3 { margin: 0 0 6px; color: #9a3412; }
.promo p { margin: 0 0 14px; color: var(--ink-2); font-size: 0.95rem; }

/* disclaimer */
.disclaimer {
  font-size: 0.85rem;
  color: var(--ink-2);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
}

/* language dropdown (header, spec 012) */
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 30px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23737373' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
  min-width: 0;
  cursor: pointer;
}
.lang-switch select:hover { border-color: var(--line-strong); color: var(--ink); }

/* language toggle (generator, spec 011) */
.lang-toggle { display: flex; gap: 8px; margin: 4px 0 12px; }
.lang-btn {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lang-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.lang-btn.active { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 600; }

/* column chips (batch mapping) */
.col-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.col-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.col-chip:hover { border-color: var(--line-strong); }
.col-chip:has(input:checked) { border-color: var(--ink); background: #f5f4f2; color: var(--ink); font-weight: 600; }

/* validation result */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.remaining { font-size: 0.85rem; color: var(--ink-3); }
.issue-list li { margin-bottom: 4px; }
.attribution { font-size: 0.8rem; color: var(--ink-3); margin-top: 16px; }

/* ---------- account / auth (campsite-style centered card) ---------- */
.auth-section { padding: 72px 0 96px; }
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-pop);
  text-align: center;
}
.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28);
}
.auth-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; }
.auth-sub { color: var(--ink-2); font-size: 0.94rem; margin: 0 0 26px; }

/* sign in / sign up segmented control */
.seg-control {
  display: flex;
  gap: 4px;
  background: #f5f4f2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}
.seg-btn {
  flex: 1;
  padding: 9px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.1), 0 0 0 1px rgba(28, 25, 23, 0.05);
}

.auth-card form { margin: 0; }
.auth-field { margin-bottom: 12px; text-align: left; }
.auth-card input { width: 100%; }
.auth-card form .btn-primary { margin-top: 8px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-foot { margin: 20px 0 0; font-size: 0.9rem; }
.auth-foot a { color: var(--ink-2); text-decoration: none; }
.auth-foot a:hover { color: var(--accent-dark); text-decoration: underline; }

/* signed-in state */
.account-wrap { max-width: 560px; margin: 0 auto; }
.account-wrap > .auth-title { text-align: center; margin-bottom: 28px; }
.account-wrap .card { margin-bottom: 16px; }
.account-email { font-size: 1.15rem; margin: 0 0 14px; word-break: break-all; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  margin-top: 72px;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.site-footer a {
  color: var(--ink-2);
  margin-right: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .note { margin-top: 14px; font-size: 0.8rem; max-width: 720px; }

/* mobile */
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 2.1rem; }
  .hero p { font-size: 1.05rem; }
  .section { padding: 40px 0; }
  h1 { font-size: 1.7rem; }
  .tool-panel { padding: 22px; }
  .tool-panel select { min-width: 0; width: 100%; }
  .tool-panel .btn { flex: 1; }
  .auth-section { padding: 40px 0 64px; }
  .auth-card { padding: 28px 20px 24px; }
  .site-header .container { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; }
  .site-nav a { padding: 5px 9px; font-size: 0.88rem; }
  .spec-table th { width: 110px; }
  .spec-table th, .spec-table td { padding: 10px 12px; }
}

/* stripe embedded checkout modal */
.stripe-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.stripe-modal {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(23, 23, 23, 0.25);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stripe-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.stripe-modal-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.stripe-modal-close:hover { background: var(--bg); color: var(--ink); }
.stripe-modal-body { overflow-y: auto; min-height: 320px; }

/* account loading state (no login flash) */
.auth-loading { text-align: center; }
.auth-loading .auth-logo { margin: 0 auto 12px; display: block; animation: at-pulse 1.4s ease-in-out infinite; }
@keyframes at-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
