/* ═══════════════════════════════════════════════════════════
   SHOPYBUILDER LEGAL PAGES
   Shared shell + prose styles. Same tokens as the app and home.
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --bg2: #fbfbfd;
  --card: #ffffff;
  --surface: #f5f5f7;
  --ink: #111114;
  --ink2: #2e2e33;
  --mut: #55555d;
  --mut2: #6e6e76;
  --line: #e5e5e7;
  --line2: #d2d2d7;
  --divider: #f0f0f2;
  --brand: #000000;
  --brand-hover: #2c2c2e;
  --r: 12px;
  --rs: 8px;
  --pill: 9999px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: #1d1d1f; color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--rs); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.btn.p { background: var(--brand); color: #fff; }
.btn.p:hover { background: var(--brand-hover); }
.btn.g { background: #fff; color: var(--ink); border-color: var(--line2); }
.btn.g:hover { background: var(--surface); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ── Header ── */
header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand img { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; }
.brand b { font-size: 15px; font-weight: 700; letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  padding: 7px 11px; border-radius: var(--rs);
  font-size: 13.5px; font-weight: 500; color: var(--ink2);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--surface); color: var(--ink); }
.nav-links a.on { background: var(--surface); color: var(--ink); font-weight: 600; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── Page head ── */
.page-head { padding: 54px 0 26px; }
.page-head .eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mut);
}
.page-head h1 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 700;
  letter-spacing: -0.032em; line-height: 1.12; margin: 12px 0 14px;
}
.page-head .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--mut); }
.page-head .meta span {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--pill); background: #fff;
}

/* ── Layout ── */
/* Reading layout: a soft page with the text and the contents list on white cards (phones: plain white) */
body { background: var(--page, #f4f4f6); }
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 8px 0 92px; align-items: start; }
.toc { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px 18px 18px; }
.toc h4 {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--ink); font-weight: 700; margin-bottom: 12px;
}
/* Contents: a quiet rail; the section being read is marked (site.js) */
.toc ol { list-style: none; counter-reset: t; display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.toc li { counter-increment: t; }
.toc a {
  display: flex; gap: 8px; padding: 7px 12px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: 13px; color: var(--ink2); line-height: 1.45;
  transition: color .15s ease, border-color .15s ease;
}
.toc a::before { content: counter(t); flex-shrink: 0; min-width: 14px; color: var(--mut2); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }
.toc a.on::before { color: var(--ink); }

/* ── Prose ── */
.doc { max-width: 840px; counter-reset: s; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 44px 52px 48px; }
.doc > section { counter-increment: s; padding-top: 8px; margin-bottom: 40px; }
.doc h2 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.022em;
  line-height: 1.3; margin-bottom: 14px;
}
/* Section numbers stay in the "On this page" list; headings read clean. Add class="numbered" to .doc to show them. */
.doc.numbered h2::before { content: counter(s) ". "; color: var(--mut2); font-variant-numeric: tabular-nums; }
.doc h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; margin: 22px 0 8px; }
.doc p { font-size: 14.5px; color: var(--ink2); line-height: 1.75; margin-bottom: 14px; }
.doc p:last-child { margin-bottom: 0; }
.doc a.ln { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line2); }
.doc a.ln:hover { border-bottom-color: var(--ink); }
.doc ul { list-style: none; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 9px; }
.doc ul li {
  position: relative; padding-left: 18px;
  font-size: 14.5px; color: var(--ink2); line-height: 1.7;
}
.doc ul li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--mut2);
}
.doc .intro { font-size: 15.5px; color: var(--ink2); line-height: 1.75; margin-bottom: 34px; }

/* Callout */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: var(--rs); background: var(--bg2);
  padding: 16px 18px; margin: 18px 0;
}
.note p { font-size: 14px; margin-bottom: 0; color: var(--ink2); }
.note b { color: var(--ink); }

/* Definition table */
.tbl { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 6px 0 18px; }
.tbl .row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--line); }
.tbl .row:last-child { border-bottom: 0; }
.tbl .k {
  padding: 13px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--bg2); border-right: 1px solid var(--line);
}
.tbl .v { padding: 13px 16px; font-size: 13.5px; color: var(--ink2); line-height: 1.6; }

/* Contact cards */
.ccards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 6px 0 20px; }
.ccard { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; background: #fff; }
.ccard h4 {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--mut); margin-bottom: 10px;
}
.ccard p { font-size: 14px; color: var(--ink); line-height: 1.65; margin: 0; }
.ccard a { border-bottom: 1px solid var(--line2); }
.ccard a:hover { border-bottom-color: var(--ink); }

/* ── Footer ── */
footer { border-top: 1px solid var(--line); padding: 54px 0 34px; background: #fff; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot p { font-size: 13px; color: var(--mut); margin-top: 12px; max-width: 30ch; line-height: 1.6; }
.foot h4 {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--mut); margin-bottom: 14px;
}
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.foot ul a { font-size: 13.5px; color: var(--ink2); }
.foot ul a:hover { color: var(--ink); }
.foot-bar {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--divider);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--mut2);
}

/* ── Responsive ── */
@media (max-width: 940px) {
  body { background: #fff; }
  .legal { grid-template-columns: 1fr; gap: 0; padding-top: 34px; }
  .doc { background: none; border: 0; border-radius: 0; padding: 0; max-width: none; }
  .toc {
    position: static; border: 0; border-radius: 14px;
    padding: 16px; margin-bottom: 34px; background: #f4f4f6;
  }
  .nav-links { display: none; }
  .foot { grid-template-columns: 1fr 1fr; gap: 30px; }
  .tbl .row { grid-template-columns: 1fr; }
  .tbl .k { border-right: 0; border-bottom: 1px solid var(--line); }
  .ccards { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 18px; }
  .foot { grid-template-columns: 1fr; }
}
