/* Legal pages (offer, privacy, terms) — same look as the landing */

:root {
  --paper: #F2EFE9;
  --paper-deep: #E8E3DA;
  --surface: #FFFFFF;
  --ink: #161614;
  --stone: #6F6D66;
  --sage: #2F4A3B;
  --sage-soft: #DCE3DA;
  --line: rgba(22, 22, 20, 0.1);
  --font: "Inter Tight", "Manrope", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sage);
  color: var(--paper);
}

a {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-color: rgba(47, 74, 59, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

a:hover {
  text-decoration-color: var(--sage);
}

/* ── Top bar ── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 239, 233, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.wordmark em {
  margin-left: 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--stone);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.back-link:hover {
  background: var(--sage);
}

/* ── Layout ── */

.doc {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 16px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.toc {
  display: none;
}

.doc-body {
  min-width: 0;
  max-width: 760px;
}

/* ── Typography ── */

h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.date {
  margin: 0 0 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--stone);
  font-size: 14px;
}

h2 {
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.date + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

h3 {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 14px;
  color: rgba(22, 22, 20, 0.8);
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
  color: rgba(22, 22, 20, 0.8);
}

li::marker {
  color: var(--sage);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Callouts ── */

.highlight-box,
.warning-box {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 15px;
}

.highlight-box {
  background: var(--sage-soft);
  color: var(--sage);
}

.highlight-box strong {
  color: var(--sage);
}

.warning-box {
  background: #FBEDEA;
  color: #9B2C1F;
}

.warning-box strong {
  color: #9B2C1F;
}

/* ── Tables ── */

.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(22, 22, 20, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--stone);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

tr:last-child td {
  border-bottom: 0;
}

/* ── Table of contents (desktop) ── */

.toc-title {
  margin: 0 0 12px;
  color: var(--stone);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc li {
  margin: 0;
}

.toc ol a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid transparent;
  color: var(--stone);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.toc ol a:hover {
  color: var(--ink);
}

.toc ol a.is-active {
  border-left-color: var(--ink);
  color: var(--ink);
}

.docs-switch {
  margin-top: 32px;
  padding: 6px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(22, 22, 20, 0.06);
}

.docs-switch a {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--stone);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.docs-switch a:hover {
  color: var(--ink);
}

.docs-switch a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  color: var(--stone);
  font-size: 13px;
  text-align: center;
}

/* ── Desktop ── */

@media (min-width: 768px) {
  .topbar-inner {
    height: 80px;
    padding: 0 40px;
  }

  .doc {
    padding: 72px 40px 120px;
  }

  .footer {
    padding: 28px 40px;
  }
}

@media (min-width: 1024px) {
  .doc {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 72px;
  }

  .toc {
    display: block;
    position: sticky;
    top: 112px;
    align-self: start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
}

/* ── Print: plain document ── */

@media print {
  .topbar,
  .toc,
  .footer {
    display: none;
  }

  body {
    background: #fff;
  }

  .doc {
    display: block;
    padding: 0;
  }
}
