/* Shared chrome for the guide / comparison pages (/app-store-privacy-labels, /compare/*,
   /privacy-first-ios-analytics). One file on purpose: these four pages are the only ones that
   share a skin, so re-styling them after a site redesign is one edit, not four. Loaded as an
   external stylesheet — allowed by style-src 'self'; the site's CSP forbids inline <script>,
   never inline or external CSS. Tokens mirror docs.html so the pages read as one site. */

:root { --bg:#0b0e14; --panel:#141925; --panel-2:#1b2233; --line:#232c40; --text:#e7ecf5;
        --muted:#8b97ad; --faint:#5d6880; --accent:#5b8cff; --accent-2:#8b5cf6; --good:#34d399;
        --warn:#f5b342; --danger:#f87171;
        --accent-soft:rgba(91,140,255,.14); --good-soft:rgba(52,211,153,.12); --warn-soft:rgba(245,179,66,.12);
        --shadow:0 1px 3px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.35); }
@media (prefers-color-scheme: light) {
  :root { --bg:#f7f8fc; --panel:#fff; --panel-2:#f0f3fa; --line:#e3e8f2; --text:#10141d;
          --muted:#5d6880; --faint:#8b97ad; --accent:#4f7ef2; --accent-2:#7c4fe0; --good:#0e9f74;
          --warn:#b7791f; --danger:#dc2626;
          --accent-soft:rgba(79,126,242,.10); --good-soft:rgba(14,159,116,.10); --warn-soft:rgba(183,121,31,.10);
          --shadow:0 1px 3px rgba(20,30,60,.08), 0 18px 50px rgba(20,30,60,.10); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px;
       background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
      padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 12px 0; }
pre code { background: none; border: none; padding: 0; }
pre .c { color: var(--faint); }
pre .hl { color: var(--accent); font-weight: 600; }

/* ── Nav / footer ─────────────────────────────────────────────────────────── */
nav.top { border-bottom: 1px solid var(--line); }
.navrow { max-width: 880px; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; height: 58px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 740; letter-spacing: -.025em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .mark { width: 24px; height: 24px; flex: none; }
.navrow .links { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.navrow .links a { color: var(--muted); }
/* Four nav links plus the wordmark do not fit 375px at the default gap, and the overflow
   lands on <body> rather than inside anything scrollable. Tighten instead of hiding links. */
@media (max-width: 640px) {
  .navrow { gap: 12px; padding: 0 16px; }
  .navrow .links { gap: 13px; font-size: 13.5px; }
}
footer.site { border-top: 1px solid var(--line); margin-top: 60px; }
.footrow { max-width: 880px; margin: 0 auto; padding: 28px 22px 44px; display: flex; gap: 10px 20px;
           flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.footrow a { color: var(--muted); }
.footrow a:hover { color: var(--text); }
.footrow .made { color: var(--faint); margin-left: auto; }
@media (max-width: 700px) { .footrow .made { margin-left: 0; flex-basis: 100%; } }

/* ── Page body ────────────────────────────────────────────────────────────── */
main { max-width: 880px; margin: 0 auto; padding: 40px 22px 20px; }
h1 { font-size: clamp(28px, 4.2vw, 36px); letter-spacing: -.03em; line-height: 1.14; margin: 0 0 10px; text-wrap: balance; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 30px; max-width: 64ch; text-wrap: pretty; }
h2 { font-size: 22px; letter-spacing: -.02em; margin: 44px 0 10px; scroll-margin-top: 16px; text-wrap: balance; }
h3 { font-size: 16.5px; margin: 26px 0 6px; }
p, li { color: var(--muted); font-size: 15px; }
strong { color: var(--text); font-weight: 640; }
ul, ol { padding-left: 22px; }
li { margin: 5px 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 650; color: var(--accent);
        background: var(--accent-soft); border: 1px solid var(--line); padding: 3px 11px;
        border-radius: 999px; margin-bottom: 14px; }
.updated { color: var(--faint); font-size: 13px; }

/* ── Boxes ────────────────────────────────────────────────────────────────── */
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 16px 0; }
.box > p { margin: 0; }
.box > p + p { margin-top: 10px; }
.box.good { border-color: var(--good); background: var(--good-soft); }
.box.warn { border-color: var(--warn); background: var(--warn-soft); }
.box .t { font-weight: 700; color: var(--text); }
.box.good .t { color: var(--good); }
.box.warn .t { color: var(--warn); }

/* ── Tables (comparisons) ─────────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
     color: var(--faint); padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
th.us { color: var(--accent); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
td:first-child { color: var(--text); font-weight: 600; width: 21%; }
tbody tr:hover td { background: var(--panel); }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--faint); font-weight: 700; }

/* ── The two-column "who should pick what" cards ──────────────────────────── */
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 18px 0; }
.verdict .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.verdict .card.us { border-color: var(--accent); }
.verdict h3 { margin: 0 0 8px; font-size: 15.5px; color: var(--text); }
.verdict ul { margin: 0; padding-left: 20px; }
.verdict li { font-size: 14px; }

/* ── The privacy-label tool ───────────────────────────────────────────────── */
.toolgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 26px; align-items: start; }
@media (max-width: 900px) { .toolgrid { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 18px; }
@media (max-width: 900px) { .sticky { position: static; } }
/* minmax(0, 1fr), not 1fr: a bare 1fr track refuses to shrink below its content's min-content
   width, and the long code samples in .td (setUserProperties([...])) then push the whole row —
   and the page — past the viewport on a phone. Pair it with wrapping inside the code spans. */
.opt { display: grid; grid-template-columns: 30px minmax(0, 1fr) 44px; gap: 12px; align-items: start; cursor: pointer;
       padding: 14px 4px; border-top: 1px solid var(--line); }
.opt:first-of-type { border-top: none; }
.opt.sub { padding-left: 26px; grid-template-columns: 20px minmax(0, 1fr) 44px; }
.opt .td code, .opt .tt { overflow-wrap: anywhere; }
.opt .ic { font-size: 18px; line-height: 1.4; }
.opt .tt { font-weight: 650; color: var(--text); font-size: 14.5px; display: block; margin-bottom: 3px; }
.opt .td { color: var(--muted); font-size: 13.5px; display: block; }
.opt .td code { font-size: 12.5px; }
.lbl-chip { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; border-radius: 999px; padding: 2px 8px;
            margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.lbl-chip.always { color: var(--muted); background: var(--panel-2); }
.lbl-chip.none { color: var(--good); background: var(--good-soft); }
.lbl-chip.notlinked { color: var(--accent); background: var(--accent-soft); }
.lbl-chip.linked { color: var(--accent-2); background: rgba(139,92,246,.14); }
/* The switch */
.switch { position: relative; width: 40px; height: 24px; justify-self: end; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .trk { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-2);
               border: 1px solid var(--line); transition: background .15s, border-color .15s; pointer-events: none; }
.switch .trk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
                      border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .trk { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + .trk::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + .trk { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled { cursor: default; }
.switch input:disabled + .trk { opacity: .55; }
.subopts { border-left: 2px solid var(--line); margin: 0 0 0 14px; }
.subopts[hidden] { display: none; }

/* The App Store label preview card */
.privcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 14px;
            box-shadow: var(--shadow); }
.privcard .apphead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.privcard .apphead .icon { width: 40px; height: 40px; border-radius: 22%; flex: none; color: #fff; font-weight: 800;
                           display: flex; align-items: center; justify-content: center;
                           background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.privcard .nm { font-weight: 700; font-size: 15px; }
.privcard .sub2 { color: var(--faint); font-size: 12px; }
.privcard .sec { border-top: 1px solid var(--line); padding: 11px 0 9px; }
.privcard .sec:first-of-type { border-top: none; padding-top: 0; }
.privcard h4 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text); }
.privcard .exp { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.privcard .none { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.privcard .none .ti { width: 26px; height: 26px; border-radius: 8px; flex: none; background: var(--good-soft);
                      color: var(--good); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.privcard .types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
@media (max-width: 460px) { .privcard .types { grid-template-columns: 1fr; } }
.privcard .type { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.privcard .type .ti { width: 26px; height: 26px; border-radius: 8px; flex: none; background: var(--panel-2);
                      display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.privcard .cat { font-weight: 640; display: block; color: var(--text); }
.privcard .items { color: var(--faint); font-size: 11px; }
.privcard .fine { color: var(--faint); font-size: 11px; margin: 10px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.flash { animation: flash .5s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* The generated App Store Connect checklist */
.tick { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start;
        border-top: 1px solid var(--line); padding: 11px 0; }
.tick:first-child { border-top: none; }
.tick .box2 { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--good); color: var(--good);
              display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.tick .box2.n { border-color: var(--line); color: var(--muted); }
.tick b { color: var(--text); font-weight: 650; font-size: 14.5px; }
.tick .note { color: var(--muted); font-size: 13.5px; }
.tick .k { color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.btn { font: inherit; font-size: 13.5px; font-weight: 640; padding: 8px 15px; border-radius: 9px; cursor: pointer;
       border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.copyrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }

/* CTA strip at the foot of every guide */
.cta { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin: 40px 0 0;
       display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cta h3 { margin: 0 0 4px; font-size: 17px; color: var(--text); }
.cta p { margin: 0; font-size: 14px; }
.cta .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .cta .actions { margin-left: 0; } }
