/* ==========================================================================
   Policy pages — refund, terms, privacy
   --------------------------------------------------------------------------
   These three used to be a single column of grey paragraphs. Nobody reads a
   wall like that, and the pages a buyer checks before paying are exactly the
   ones that should feel like the rest of the shop.

   The structure here is the same on all three: a titled masthead, a short
   "in plain words" summary a reader can act on without reading further, then
   numbered sections with a table of contents that parks itself on the side at
   desktop widths. Anything factual and repetitive — what data goes where, who
   processes it — is a table rather than prose, because that is what it is.
   ========================================================================== */

:root {
  --ink: #14243d;
  --ink-soft: rgba(20, 36, 61, .78);
  --ink-mute: rgba(20, 36, 61, .52);
  --ground: #f2efe6;
  --paper: #fbfaf6;
  --white: #fff;
  --line: #ded9ca;
  --line-soft: rgba(20, 36, 61, .10);
  --rust: #c1521c;
  --rust-wash: rgba(193, 82, 28, .07);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, .82);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-in {
  width: min(1080px, 100%); margin-inline: auto;
  padding: 14px clamp(18px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.back {
  font-size: 13.5px; color: var(--ink-mute); text-decoration: none;
  display: inline-flex; align-items: center; gap: .4em;
}
.back:hover { color: var(--rust); }

/* ── masthead ────────────────────────────────────────────────────────────── */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.masthead-in {
  width: min(1080px, 100%); margin-inline: auto;
  padding: clamp(38px, 6vw, 68px) clamp(18px, 4vw, 32px) clamp(30px, 4vw, 44px);
}
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--rust);
}
h1 {
  font-family: var(--display); font-style: italic; font-weight: 600;
  font-size: clamp(34px, 6vw, 56px); line-height: 1.02; letter-spacing: -.015em;
  margin: 0 0 16px; max-width: 16ch;
}
.standfirst {
  margin: 0; max-width: 58ch;
  font-size: clamp(17px, 2vw, 19.5px); line-height: 1.55; color: var(--ink-soft);
}
.stamp {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 6px 22px;
}

/* ── layout ──────────────────────────────────────────────────────────────── */

.shell {
  width: min(1080px, 100%); margin-inline: auto;
  padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 32px) 90px;
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(28px, 5vw, 62px);
  align-items: start;
}

/* ── table of contents ───────────────────────────────────────────────────── */

.toc { position: sticky; top: 78px; }
.toc-label {
  margin: 0 0 12px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute);
}
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px;
  padding: 6px 0; font-size: 13.5px; line-height: 1.35;
  color: var(--ink-mute); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono); font-size: 10.5px; color: var(--rust);
  padding-top: .25em;
}
.toc a:hover { color: var(--ink); }

/* ── article ─────────────────────────────────────────────────────────────── */

.doc { max-width: 68ch; }

/* The summary is the part most readers will actually finish, so it goes first
   and carries the accent. Everything below it is the long form of these lines. */
.summary {
  margin: 0 0 clamp(34px, 5vw, 52px);
  padding: clamp(22px, 3.4vw, 30px);
  background: var(--rust-wash);
  border: 1px solid rgba(193, 82, 28, .22);
  border-radius: 6px;
}
/* Scoped past `.doc h2`, which is declared later at the same specificity and
   would otherwise give this label the serif face, the section rule above it and
   the numbered-heading grid. */
.doc .summary h2 {
  margin: 0 0 14px; padding: 0; border: 0; display: block;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rust);
}
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.summary li { padding-left: 26px; position: relative; color: var(--ink); }
.summary li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rust); opacity: .5;
}
.summary strong { font-weight: 700; }

.doc section { scroll-margin-top: 86px; }

.doc h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(22px, 3vw, 27px); line-height: 1.2; letter-spacing: -.01em;
  margin: clamp(38px, 5vw, 54px) 0 14px;
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline;
}
.doc section:first-of-type h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h2 .n {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .06em; color: var(--rust); font-style: normal;
}

.doc h3 {
  font-size: 16px; font-weight: 700; letter-spacing: .005em;
  margin: 28px 0 8px;
}

.doc p { margin: 0 0 15px; color: var(--ink-soft); }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc a { color: var(--rust); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc a:hover { color: var(--ink); }

.doc ul, .doc ol { margin: 0 0 15px; padding-left: 1.25em; color: var(--ink-soft); }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--rust); }

/* A short factual aside — the "what this means for you" line after a clause. */
.note {
  margin: 18px 0; padding: 15px 18px;
  background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--rust);
  border-radius: 4px; font-size: 15px; color: var(--ink-soft);
}
.note strong { color: var(--ink); }

/* ── data tables ─────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; margin: 20px 0 24px; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; min-width: 460px; border-collapse: collapse;
  font-size: 14.5px; background: var(--white);
  border: 1px solid var(--line); border-radius: 5px;
}
caption {
  caption-side: top; text-align: left; padding: 0 0 10px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
thead th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
  background: rgba(20, 36, 61, .03);
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; }
td { color: var(--ink-soft); }

/* ── contact block ───────────────────────────────────────────────────────── */

.contact {
  margin-top: clamp(38px, 5vw, 54px); padding: clamp(22px, 3.4vw, 28px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
}
.doc .contact h2 {
  margin: 0 0 10px; padding: 0; border: 0; display: block;
  font-size: clamp(19px, 2.4vw, 22px);
}
.contact dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; font-size: 15px; }
.contact dt {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
  padding-top: .35em;
}
.contact dd { margin: 0; color: var(--ink-soft); }

/* ── footer ──────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line); background: var(--paper);
}
.foot-in {
  width: min(1080px, 100%); margin-inline: auto;
  padding: 26px clamp(18px, 4vw, 32px) 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
}
.foot-in a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.foot-in a:hover { color: var(--rust); border-bottom-color: var(--rust); }
.foot-in .sep { margin-left: auto; }

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* Stacked, the contents list stops being navigation and becomes a preview,
     so it collapses into a plain summary the reader can skip past. */
  .toc {
    position: static; margin-bottom: 32px; padding: 18px 20px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  }
  .toc ol { columns: 2; column-gap: 26px; }
  .toc li { break-inside: avoid; }
  .doc { max-width: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .toc ol { columns: 1; }
  .doc h2 { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .contact dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .contact dt { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }
