/* Pile Pop — shared site styles */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1c1b19;
  --muted: #5f5b54;
  --border: #e4e0d8;
  --accent: #d9480f;
  --accent-ink: #ffffff;
  --accent-soft: #fdecdf;
  --ok: #2b8a3e;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1c1b18;
    --surface-2: #24221f;
    --text: #efece6;
    --muted: #a8a299;
    --border: #34312c;
    --accent: #ff8a4c;
    --accent-ink: #1a0d05;
    --accent-soft: #3a2316;
    --ok: #69db7c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  word-break: break-all;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 480px) { .nav a.hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } .hero { padding: 104px 0 88px; } }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Illustration: stacked boxes */
.art {
  position: relative; aspect-ratio: 1 / 1; max-width: 420px; width: 100%; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  display: grid; place-items: center; overflow: hidden;
}
.art svg { width: 78%; height: auto; }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 10px; line-height: 1.2; }
.section-head p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.icon svg { width: 22px; height: 22px; }

.privacy-band {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; display: grid; gap: 28px;
}
@media (min-width: 820px) { .privacy-band { grid-template-columns: 1fr 1fr; padding: 44px; align-items: center; } }
.privacy-band h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.2; }
.privacy-band p { color: var(--muted); margin: 0 0 22px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Policy page ---------- */
.doc-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--border); }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.1; }
.doc-hero .lede { margin-bottom: 26px; }
.meta {
  display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .meta { grid-template-columns: repeat(3, 1fr); } }
.meta div { background: var(--surface); padding: 14px 18px; }
.meta dt { font-size: 0.76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.meta dd { margin: 0; font-weight: 600; }

.doc-layout { display: grid; gap: 40px; padding: 40px 0 72px; }
@media (min-width: 960px) { .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; } }

.toc { font-size: 0.93rem; }
.toc-inner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 14px; }
@media (min-width: 960px) {
  .toc-inner { position: sticky; top: 88px; background: transparent; border: 0; padding: 0; }
}
.toc h2 { font-size: 0.76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; border-left: 2px solid transparent;
}
.toc a::before { content: counter(toc) "."; font-variant-numeric: tabular-nums; min-width: 1.4em; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.active { color: var(--text); font-weight: 600; background: var(--surface-2); border-left-color: var(--accent); border-radius: 0 8px 8px 0; }

.doc { max-width: 720px; }
.doc section { padding: 8px 0 28px; }
.doc section + section { border-top: 1px solid var(--border); padding-top: 32px; }
.doc h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 0 0 14px; line-height: 1.3; display: flex; gap: 12px; align-items: baseline; }
.doc h2 .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.doc h2 a.anchor { margin-left: auto; color: var(--border); text-decoration: none; font-weight: 400; font-size: 1rem; opacity: 0; transition: opacity .15s; }
.doc h2:hover a.anchor, .doc h2 a.anchor:focus { opacity: 1; color: var(--muted); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }

.summary-grid { display: grid; gap: 10px; margin: 6px 0 4px; }
.summary-grid div {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.summary-grid svg { flex: none; width: 20px; height: 20px; color: var(--ok); margin-top: 3px; }

.callout {
  background: var(--accent-soft); border-radius: 12px; padding: 16px 18px; margin: 0 0 14px;
  border-left: 4px solid var(--accent);
}
.callout p:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.contact-card strong { display: block; }
.contact-card span { color: var(--muted); font-size: 0.93rem; }

.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.btn-sm { padding: 9px 14px; font-size: 0.9rem; }
button.btn { cursor: pointer; font-family: inherit; }

/* Print */
@media print {
  .site-header, .toc, .site-footer, .doc-actions, .skip, a.anchor { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc-layout { display: block; padding: 0; }
  .doc { max-width: none; }
  .doc section { break-inside: avoid; }
  .summary-grid div, .meta div, .contact-card { border-color: #ccc; background: #fff; }
  a { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
