/* ==========================================================================
   StreetKidd — shared design system
   System fonts only (no webfont requests — keeps the privacy claim literal).
   ========================================================================== */

:root {
  /* Palette — muted derivative of the original brand mark (#9B008B / #8FF9BD) */
  --ink: #1a1a1f;
  --ink-soft: #4a4a52;
  --muted: #6e6e76;
  --bg: #fcfcfa;
  --surface: #ffffff;
  --surface-sunken: #f4f2ee;
  --border: #e3e1dd;
  --accent: #6b1060;
  --accent-ink: #ffffff;
  --accent-soft: #f4e9f2;
  --accent-2: #1f6b4c;
  --accent-2-soft: #e6f2ec;
  --warn: #8a4a12;
  --warn-soft: #fbf1e2;
  --warn-border: #e8cfa0;
  --link: #6b1060;
  --focus: #2f6fed;

  /* Type */
  --font-display: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.75vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.9rem + 2vw, 3.3rem);

  /* Space */
  --sp-1: 0.4rem;
  --sp-2: 0.8rem;
  --sp-3: 1.2rem;
  --sp-4: 1.8rem;
  --sp-5: 2.6rem;
  --sp-6: 4rem;

  --radius: 10px;
  --content-w: 720px;
  --wide-w: 980px;
  --shadow: 0 1px 2px rgba(20, 15, 20, 0.05), 0 6px 20px -8px rgba(20, 15, 20, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1eef2;
    --ink-soft: #cfc9d2;
    --muted: #9d97a3;
    --bg: #161318;
    --surface: #1e1a21;
    --surface-sunken: #241f28;
    --border: #35303a;
    --accent: #d9a6d1;
    --accent-ink: #1a1420;
    --accent-soft: #2c2130;
    --accent-2: #7fceac;
    --accent-2-soft: #182821;
    --warn: #eec38a;
    --warn-soft: #2c2318;
    --warn-border: #4a3a22;
    --link: #d9a6d1;
    --focus: #7fb1ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -10px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --ink: #f1eef2;
  --ink-soft: #cfc9d2;
  --muted: #9d97a3;
  --bg: #161318;
  --surface: #1e1a21;
  --surface-sunken: #241f28;
  --border: #35303a;
  --accent: #d9a6d1;
  --accent-ink: #1a1420;
  --accent-soft: #2c2130;
  --accent-2: #7fceac;
  --accent-2-soft: #182821;
  --warn: #eec38a;
  --warn-soft: #2c2318;
  --warn-border: #4a3a22;
  --link: #d9a6d1;
  --focus: #7fb1ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -10px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0 0 var(--sp-2); color: var(--ink); }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-top: var(--sp-5); }
h3 { font-size: var(--step-2); margin-top: var(--sp-4); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--sp-3); color: var(--ink-soft); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
ul, ol { padding-left: 1.3em; color: var(--ink-soft); }
li { margin-bottom: var(--sp-1); }
small, .caption { font-size: var(--step--1); color: var(--muted); }
code { font-family: var(--font-mono); background: var(--surface-sunken); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--wide-w); margin: 0 auto; padding: 0 var(--sp-3); }
.prose { max-width: var(--content-w); margin: 0 auto; padding: 0 var(--sp-3); }
.prose h2:first-child, .prose h1:first-child { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  background: var(--accent);
  display: grid; place-items: center;
}
.brand-mark svg { width: 16px; height: 16px; }
.site-nav { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.01em; }
.site-nav a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-6);
  padding: var(--sp-5) 0 var(--sp-6);
  background: var(--surface-sunken);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.footer-grid h4 { font-family: var(--font-body); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-2); }
.footer-grid a { display: block; color: var(--ink-soft); text-decoration: none; margin-bottom: var(--sp-1); font-size: var(--step--1); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--border); padding-top: var(--sp-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border-radius: 999px;
  padding: 0.75em 1.5em;
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-6) 0 var(--sp-5); }
.hero-inner { max-width: var(--content-w); }
.eyebrow { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: var(--sp-2); }
.hero h1 { margin-bottom: var(--sp-3); }
.hero .lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-3);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0; font-size: var(--step-1); }
.card p { margin: 0; font-size: var(--step--1); color: var(--muted); flex: 1; }
.card .card-cta { font-size: var(--step--1); font-weight: 700; color: var(--accent); }
.card.is-soon { opacity: 0.6; cursor: default; }
.card.is-soon .tag { background: var(--surface-sunken); color: var(--muted); }
.tag {
  display: inline-flex; align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.25em 0.7em; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Privacy badge ---------- */
.privacy-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--accent-2-soft);
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  padding: 0.5em 1em;
  font-size: var(--step--1);
  font-weight: 600;
  margin: var(--sp-2) 0 var(--sp-4);
}
.privacy-badge svg { width: 16px; height: 16px; flex: none; }

/* ---------- Tool shell ---------- */
.tool-intro { padding-top: var(--sp-5); }
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-4);
  margin: var(--sp-4) 0;
}
.field { display: flex; flex-direction: column; gap: 0.35em; }
.field label { font-size: var(--step--1); font-weight: 700; color: var(--ink); }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.field input, .field select {
  font: inherit;
  padding: 0.65em 0.8em;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.form-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }

.result-panel {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-top: var(--sp-3);
}
.result-panel[hidden] { display: none; }
.result-headline { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.result-headline .value { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; }
.result-headline .label { font-size: var(--step--1); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.breakdown { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.breakdown th, .breakdown td { text-align: left; padding: 0.55em 0.7em; border-bottom: 1px solid var(--border); }
.breakdown tr:last-child td { border-bottom: none; }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; }
.breakdown tr.total td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--border); }
.flag-row td { color: var(--warn); font-weight: 600; }

/* ---------- Disclaimer / notice boxes ---------- */
.notice {
  border: 1px solid var(--warn-border);
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: var(--radius);
  padding: var(--sp-3);
  font-size: var(--step--1);
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 0.15em; }
.notice strong { color: inherit; }
.notice p { color: inherit; margin: 0; }

/* ---------- Sources block ---------- */
.sources-block {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
  margin-top: var(--sp-5);
  font-size: var(--step--1);
  color: var(--muted);
}
.sources-block h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-2); }
.sources-block ol { padding-left: 1.2em; }
.sources-block a { overflow-wrap: break-word; word-break: break-word; }
.sources-block .last-updated { font-weight: 700; color: var(--ink-soft); margin-bottom: var(--sp-2); }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--sp-4) 0;
  background: var(--surface-sunken);
}
.ad-slot[data-slot="leaderboard"] { min-height: 90px; }
.ad-slot[data-slot="in-content"] { min-height: 250px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); padding: var(--sp-3) 0; }
.faq-item h3 { margin: 0 0 var(--sp-2); font-size: var(--step-1); }

/* ---------- Comparison table (SEO asset) ---------- */
.compare-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 640px; }
.compare-table th, .compare-table td { text-align: left; padding: 0.75em 0.9em; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table thead th { background: var(--surface-sunken); font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; color: var(--muted); }
.compare-table tbody tr:hover { background: var(--surface-sunken); }

/* ---------- Coming soon strip (landing) ---------- */
.section { padding: var(--sp-6) 0; }
.section-head { max-width: 56ch; margin-bottom: var(--sp-4); }
.section-head h2 { margin-top: 0; }
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.why-block h3 { font-size: var(--step-1); margin-top: 0; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.text-left { text-align: left; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-5 { margin-bottom: var(--sp-5); }
.pt-5 { padding-top: var(--sp-5); }
.pt-6 { padding-top: var(--sp-6); }
.section-sunken { background: var(--surface-sunken); }
.field-inline { flex-direction: row; align-items: center; gap: 0.6em; }
.field-narrow { max-width: 320px; }
.field-inline input[type="checkbox"] { width: auto; }
.field-inline label { font-weight: 600; }
.result-headline .value.is-compact { font-size: var(--step-1); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink);
  padding: 0.6em 1em; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Consent banner ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px -12px rgba(0,0,0,0.3);
  padding: var(--sp-3);
}
.consent-banner .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; max-width: var(--wide-w); }
.consent-banner p { margin: 0; font-size: var(--step--1); color: var(--ink-soft); max-width: 56ch; }
.consent-actions { display: flex; gap: var(--sp-2); }

@media (max-width: 640px) {
  .site-nav { gap: var(--sp-3); }
  .hero { padding: var(--sp-5) 0 var(--sp-4); }
  .section { padding: var(--sp-5) 0; }
}
