/* ════════════════════════════════════════════════════════════
   Privacy Policy — Swiss system from home.css (tokens, grid, chrome).
   Here: the page head, the sticky numbered contents, and long-form
   typography for the policy text written in Admin → Privacy Policy.
   ════════════════════════════════════════════════════════════ */

/* ─── Head: title over the homepage's 12-column hairline grid ── */
.sw-policy-head { padding: clamp(48px, 7vw, 112px) 0 clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--sw-ink); }
.sw-policy-head .sw-grid {
  row-gap: clamp(20px, 2.5vw, 32px); align-items: end;
  background-image: linear-gradient(to right, var(--sw-rule) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%; background-origin: content-box; background-clip: content-box;
}
.sw-policy-title {
  grid-column: 1 / span 10;
  font-size: var(--sw-text-hero-title); font-weight: var(--sw-weight-display); font-stretch: var(--sw-width-display);
  line-height: 0.94; letter-spacing: -0.04em; text-wrap: balance;
}
.sw-policy-lead {
  grid-column: 1 / span 5; font-size: var(--sw-text-lg); line-height: 1.45; color: var(--sw-ink-2);
  background: var(--sw-white); padding-right: 12px; text-wrap: pretty;
}
.sw-policy-meta {
  grid-column: 7 / -1; display: flex; flex-wrap: wrap; gap: 16px clamp(24px, 3vw, 48px);
  background: var(--sw-white); border-top: 1px solid var(--sw-ink); padding-top: 14px;
}
.sw-policy-meta > div { flex: 0 1 auto; min-width: 0; }
.sw-policy-meta dt { font-size: var(--sw-text-sm); color: var(--sw-ink-2); }
.sw-policy-meta dd { font-weight: var(--sw-weight-strong); margin-top: 2px; overflow-wrap: anywhere; }
body.home .sw-policy-meta a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.home .sw-policy-meta a:hover { color: var(--sw-red); }

/* ─── Body: contents rail + text column ────────────────────── */
.sw-policy { padding: clamp(40px, 5vw, 80px) 0 var(--sw-section); border-bottom: 1px solid var(--sw-rule); }
.sw-policy .sw-grid { align-items: start; row-gap: 32px; }

.sw-policy-toc { grid-column: 1 / span 3; position: sticky; top: 96px; }
.sw-policy-toc[hidden] { display: none; }
.sw-policy-toc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-size: var(--sw-text-sm); font-weight: var(--sw-weight-strong); color: var(--sw-ink-2);
  padding-bottom: 12px; border-bottom: 1px solid var(--sw-ink);
}
.sw-policy-toc summary::-webkit-details-marker { display: none; }
.sw-policy-toc ol { list-style: none; }
.sw-policy-toc li { border-bottom: 1px solid var(--sw-rule); }
body.home .sw-policy-toc a {
  display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 10px 0;
  font-size: 0.9375rem; line-height: 1.3; color: var(--sw-ink-2);
  transition: color 150ms var(--sw-ease);
}
.sw-policy-toc .sw-toc-no { font-stretch: var(--sw-width-numeral); font-weight: var(--sw-weight-display); font-feature-settings: "kern", "tnum", "lnum"; color: #A5A5AC; transition: color 150ms var(--sw-ease); }
body.home .sw-policy-toc a:hover { color: var(--sw-ink); }
body.home .sw-policy-toc a[aria-current] { color: var(--sw-ink); font-weight: var(--sw-weight-strong); }
.sw-policy-toc a[aria-current] .sw-toc-no, .sw-policy-toc a:hover .sw-toc-no { color: var(--sw-red); }

.sw-policy-body { grid-column: 4 / span 8; min-width: 0; }
.sw-policy-toc[hidden] + .sw-policy-body { grid-column: 1 / span 9; }

/* Intro: the lines before the first numbered section */
.sw-policy-intro { font-size: var(--sw-text-lg); line-height: 1.55; padding-bottom: clamp(28px, 3.5vw, 44px); }
.sw-policy-intro > * + * { margin-top: 1em; }

/* Sections: big red numeral + heading, like the homepage register */
.sw-policy-section { padding: clamp(28px, 3.5vw, 44px) 0; border-top: 1px solid var(--sw-rule); scroll-margin-top: 96px; }
.sw-policy-section:first-child { border-top-color: var(--sw-ink); }
.sw-policy-h2 {
  display: grid; grid-template-columns: clamp(56px, 6vw, 88px) 1fr; gap: 8px; align-items: baseline;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); font-weight: var(--sw-weight-display); font-stretch: var(--sw-width-display);
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 20px;
}
.sw-policy-no {
  font-stretch: var(--sw-width-numeral); font-size: 1.35em; line-height: 0.85; letter-spacing: -0.03em;
  color: var(--sw-red); font-feature-settings: "kern", "tnum", "lnum";
}
.sw-policy-text { padding-left: calc(clamp(56px, 6vw, 88px) + 8px); }

/* Long-form text */
.sw-policy-body p, .sw-policy-body li { max-width: 68ch; text-wrap: pretty; }
.sw-policy-text > * + * { margin-top: 1em; }
.sw-policy-body h3 { font-size: var(--sw-text-lg); font-weight: var(--sw-weight-strong); letter-spacing: -0.01em; margin-top: 1.6em; }
.sw-policy-body h4 { font-size: 1rem; font-weight: var(--sw-weight-strong); margin-top: 1.4em; }
.sw-policy-body h3 + *, .sw-policy-body h4 + * { margin-top: 0.5em; }
.sw-policy-body strong, .sw-policy-body b { font-weight: var(--sw-weight-strong); }
.sw-policy-body ul, .sw-policy-body ol { padding-left: 0; list-style: none; }
.sw-policy-body ul > li, .sw-policy-body ol > li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--sw-rule); }
.sw-policy-body ul > li:first-child, .sw-policy-body ol > li:first-child { border-top: 1px solid var(--sw-rule); }
.sw-policy-body ul > li::before { content: ""; position: absolute; left: 4px; top: calc(10px + 0.62em); width: 8px; height: 8px; background: var(--sw-red); }
.sw-policy-body ol { counter-reset: policy-li; }
.sw-policy-body ol > li::before {
  counter-increment: policy-li; content: counter(policy-li); position: absolute; left: 0; top: 10px;
  font-weight: var(--sw-weight-display); color: var(--sw-red); font-feature-settings: "tnum";
}
body.home .sw-policy-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; word-break: break-word; }
body.home .sw-policy-body a:hover { color: var(--sw-red); }
.sw-policy-body blockquote { border-left: 3px solid var(--sw-red); padding: 4px 0 4px 18px; color: var(--sw-ink-2); }
.sw-policy-body hr { border: none; border-top: 1px solid var(--sw-rule); margin: 2em 0; }
.sw-policy-body table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--sw-ink); font-size: 0.9375rem; display: block; overflow-x: auto; }
.sw-policy-body th { text-align: left; font-weight: var(--sw-weight-strong); color: var(--sw-ink-2); font-size: var(--sw-text-sm); }
.sw-policy-body th, .sw-policy-body td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--sw-rule); vertical-align: top; }

/* Empty / error state */
.sw-policy-empty { border-top: 1px solid var(--sw-ink); padding-top: 28px; }
.sw-policy-empty p { color: var(--sw-ink-2); max-width: 56ch; margin-top: 10px; }
.sw-policy-empty .sw-policy-empty-title { font-size: var(--sw-text-lg); font-weight: var(--sw-weight-strong); color: var(--sw-ink); margin-top: 0; }

/* Loading placeholder */
.sw-policy-skeleton { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--sw-ink); padding-top: 28px; }
.sw-policy-skeleton span { display: block; height: 14px; width: 100%; background: var(--sw-paper); animation: sw-policy-pulse 1.4s var(--sw-ease) infinite alternate; }
.sw-policy-skeleton .is-short { width: 55%; }
.sw-policy-skeleton .is-heading { height: 28px; width: 40%; margin-top: 18px; }
@keyframes sw-policy-pulse { to { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .sw-policy-skeleton span { animation: none; } }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sw-policy-toc, .sw-policy-body, .sw-policy-toc[hidden] + .sw-policy-body { grid-column: 1 / -1; }
  .sw-policy-toc { position: static; }
  .sw-policy-toc summary { font-size: 1rem; color: var(--sw-ink); padding: 14px 0; border-top: 1px solid var(--sw-ink); border-bottom: 1px solid var(--sw-rule); }
  .sw-policy-toc summary::after { content: "+"; font-size: 1.5rem; line-height: 1; font-weight: 400; }
  .sw-policy-toc details[open] summary::after { content: "\2212"; }
  .sw-policy-meta { grid-column: 1 / -1; }
  .sw-policy-lead { grid-column: 1 / span 10; }
}
@media (min-width: 1025px) {
  .sw-policy-toc summary { pointer-events: none; }
}
@media (max-width: 768px) {
  .sw-policy-head .sw-grid { background-size: calc(100% / 4) 100%; }
  .sw-policy-title, .sw-policy-lead { grid-column: 1 / -1; }
  .sw-policy-text { padding-left: 0; }
  .sw-policy-h2 { grid-template-columns: 1fr; gap: 6px; }
}
