/* ============================================================
   Cuff — legal pages (terms, privacy)
   Shares the Montserrat/cream/coal palette of the product page
   but stands alone: no colour-shifting, no JS.
   ============================================================ */

:root {
  --coal:    #14161b;
  --coal-2:  #1b1e25;
  --ink:     #f4efe8;
  --ink-2:   rgba(244, 239, 232, 0.72);
  --ink-3:   rgba(244, 239, 232, 0.46);
  --line:    rgba(244, 239, 232, 0.14);
  --line-2:  rgba(244, 239, 232, 0.08);
  --accent:  #c9d4ff;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--coal);
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 900; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== top bar ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem clamp(1.4rem, 5vw, 4rem);
  background: rgba(20, 22, 27, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 2.1rem; height: 2.1rem;
  background: currentColor;
  -webkit-mask: url('../assets/logo.svg') center / contain no-repeat;
  mask: url('../assets/logo.svg') center / contain no-repeat;
}
.brand-name { font-weight: 700; font-size: 0.94rem; letter-spacing: 0.34em; }
.topbar-doc { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }

/* ===== layout ===== */
.wrap {
  max-width: 78rem; margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 5.5rem) clamp(1.4rem, 5vw, 4rem) 5rem;
  display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 60rem) { .wrap { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; } }

/* ===== page head ===== */
.doc-head { grid-column: 1 / -1; max-width: 46rem; margin-bottom: clamp(0.6rem, 2vw, 1.4rem); }
.eyebrow { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.doc-head h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 800; line-height: 1.03; letter-spacing: -0.028em;
}
.doc-dates { margin-top: 1.1rem; font-size: 0.83rem; color: var(--ink-3); }
.doc-lede { margin-top: 1.5rem; font-size: 1.03rem; color: var(--ink-2); max-width: 40rem; }

/* ===== table of contents ===== */
.toc { position: sticky; top: 5.4rem; font-size: 0.82rem; }
.toc-title { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.9rem; }
.toc ol { list-style: none; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a {
  display: block; padding: 0.34rem 0 0.34rem 0.95rem; margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--ink-3); text-decoration: none; line-height: 1.45;
  transition: color 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}
.toc a::before { content: counter(toc) '. '; color: var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
@media (max-width: 60rem) {
  .toc { position: static; padding: 1.2rem 1.3rem; border: 1px solid var(--line-2); border-radius: 1rem; background: var(--coal-2); }
  .toc ol { columns: 2; column-gap: 1.4rem; }
  @media (max-width: 34rem) { .toc ol { columns: 1; } }
}

/* ===== body copy ===== */
.doc { max-width: 44rem; counter-reset: sec; }
.doc section { padding-top: 2.9rem; scroll-margin-top: 5.2rem; }
.doc section + section { border-top: 1px solid var(--line-2); margin-top: 2.9rem; padding-top: 2.9rem; }
.doc h2 {
  counter-increment: sec;
  font-size: 1.16rem; font-weight: 700; letter-spacing: -0.008em; line-height: 1.35;
  margin-bottom: 1rem; display: flex; gap: 0.7rem;
}
.doc h2::before { content: counter(sec); color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.doc h3 { font-size: 0.94rem; font-weight: 700; margin: 1.6rem 0 0.6rem; }
.doc p, .doc li { color: var(--ink-2); font-size: 0.94rem; }
.doc p + p { margin-top: 0.95rem; }
.doc ul, .doc ol { margin: 0.85rem 0 0; padding-left: 1.15rem; }
.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--ink-3); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.doc a:hover { color: var(--ink); }

/* a value the operator must fill in before publishing */
.fill { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* ===== callout — used for the refund rule ===== */
.callout {
  margin: 1.5rem 0 0.4rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: 0.9rem;
  background: var(--coal-2);
}
.callout-label {
  font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 0.6rem;
}
.callout p { color: var(--ink); font-size: 0.97rem; }

/* ===== definition rows (privacy: what we collect) ===== */
.rows { margin-top: 1.2rem; border-top: 1px solid var(--line-2); }
.row { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line-2); }
.row dt { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.row dd { font-size: 0.9rem; color: var(--ink-2); }
@media (max-width: 40rem) { .row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; } }

/* ===== foot ===== */
.doc-foot {
  grid-column: 1 / -1;
  margin-top: 4rem; padding-top: 1.6rem; border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: 0.7rem 1.6rem; align-items: center; justify-content: space-between;
  font-size: 0.79rem; color: var(--ink-3);
}
.doc-foot a { color: var(--ink-2); text-decoration: none; }
.doc-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.doc-foot nav { display: flex; gap: 1.4rem; }
