/* SoSimpleTracking website. System fonts only: no third-party requests. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --text: #14161f;
  --muted: #5b6072;
  --border: #e4e6ee;
  --primary: #4338ca;
  --primary-hover: #3730a3;
  --primary-text: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e6f6f4;
  --primary-soft: #eef0ff;
  --code-bg: #f1f2f7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 31, 0.05), 0 8px 24px rgba(20, 22, 31, 0.06);
  --max: 1120px;
  --prose: 760px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f16;
    --bg-soft: #131622;
    --surface: #161a27;
    --text: #eceef6;
    --muted: #a3a8bb;
    --border: #262b3c;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-text: #0d0f16;
    --accent: #5eead4;
    --accent-soft: #10302d;
    --primary-soft: #1c2040;
    --code-bg: #1d2131;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0.5rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 760px) { .site-nav { display: none; } .header-inner .button { margin-left: auto; } }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.8rem 1.25rem; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; font-size: 1rem; line-height: 1.2; }
.button-primary { background: var(--primary); color: var(--primary-text); }
.button-primary:hover { background: var(--primary-hover); color: var(--primary-text); }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-secondary:hover { border-color: var(--muted); color: var(--text); }
.button-small { padding: 0.5rem 0.9rem; font-size: 0.92rem; }
.button.is-disabled { opacity: 0.75; cursor: default; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Sections */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }

/* Hero */
.hero { padding-top: clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-note { margin-top: 1rem; font-size: 0.92rem; color: var(--muted); }

/* Flow diagram */
.flow { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; box-shadow: var(--shadow); display: grid; gap: 0.6rem; }
.flow-node { border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 1rem; background: var(--bg-soft); }
.flow-node strong { display: block; font-size: 0.98rem; }
.flow-node span { font-size: 0.86rem; color: var(--muted); }
.flow-node.is-core { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.flow-arrow { text-align: center; color: var(--muted); font-size: 0.82rem; line-height: 1; }
.flow-arrow::before { content: "↓"; display: block; font-size: 1.1rem; margin-bottom: 0.15rem; }
.flow-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.chip { font-size: 0.8rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }

/* Cards & grids */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: 0.95rem; }
.step-number { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; margin-bottom: 0.75rem; }
.platform-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.checklist li { padding-left: 1.8rem; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.checklist li::after { content: ""; position: absolute; left: 0.36rem; top: 0.55em; width: 0.32rem; height: 0.55rem; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* FAQ */
.faq { display: grid; gap: 0.75rem; max-width: var(--prose); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 0.6rem; }
.faq details p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .button-row { justify-content: center; }
.cta-band .lead { margin-inline: auto; }

/* Legal & docs prose */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1rem; }
.page-head p { color: var(--muted); }
.prose { max-width: var(--prose); padding-bottom: 4rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.5rem; padding-top: 0.5rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.94rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg-soft); font-weight: 600; }
.callout { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--bg-soft); border-radius: 10px; padding: 1rem 1.2rem; margin: 0 0 1.5rem; }
.callout p:last-child { margin-bottom: 0; }
.toc { border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 2rem; background: var(--surface); }
.toc strong { display: block; margin-bottom: 0.4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
@media (max-width: 620px) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 0.25rem; font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.75rem; }
.site-footer nav a { display: block; color: var(--text); text-decoration: none; font-size: 0.95rem; margin-bottom: 0.45rem; }
.site-footer nav a:hover, .site-footer nav a[aria-current="page"] { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.25rem; }

/* Small screens: let grid items shrink below their content width. */
.hero-grid > *, .grid > *, .footer-grid > *, .flow-split > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .flow-split { grid-template-columns: 1fr; }
  .header-inner { gap: 0.75rem; }
  .brand span { font-size: 0.98rem; }
  .button-row .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
h1, h2, h3 { overflow-wrap: break-word; }
.grid-split { align-items: start; gap: 3rem; }
.grid-spaced { margin-bottom: 2rem; }
