/* Shared styling for the legal pages (privacy, terms).
   Deliberately loads no webfont: reading a privacy policy should not require
   contacting a third party, and the policy says so. */

:root { color-scheme: only light;
  --green: #1E6B4F; --green-d: #15523C; --green-soft: #EAF3EE; --green-border: #CBE2D6;
  --ink: #1A1F2B; --ink-soft: #5B6472; --ink-faint: #8B93A1;
  --bg: #FAFAF8; --surface: #fff; --border: #EAEAE6; --rule: #F0EFEA;
  --gold: #C9A455; --amber: #A16207; --amber-soft: #FBF3E4; --amber-border: #EBDCB4;
  --cream: #F5F3EC;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-size: 16px; line-height: 1.7;
}
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:visited { color: var(--green); }

.shell { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* ---------------------------------------------------------------- Nav */
nav { background: rgba(250,250,248,0.88); backdrop-filter: saturate(180%) blur(12px);
      position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17.5px;
        letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green);
             display: flex; align-items: center; justify-content: center; flex: none; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; font-weight: 600; flex: none; }
.nav-links a { text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.nav-links a:hover { color: var(--green); }
.nav-links a.here { color: var(--green); }

/* At 375px the wordmark and three links do not fit, and they collided.
   Contact is in the footer of every page, so it is the one to drop. */
@media (max-width: 560px) {
  .shell { padding: 0 20px; }
  .nav-in { gap: 16px; }
  .nav-links { gap: 16px; font-size: 14px; }
  .nav-links a.contact { display: none; }
  .logo { font-size: 16.5px; min-width: 0; }
}

/* ---------------------------------------------------------------- Layout */
.doc { display: grid; grid-template-columns: 1fr; gap: 0; padding: 52px 0 88px; }
@media (min-width: 1000px) {
  .doc { grid-template-columns: 232px minmax(0, 1fr); gap: 72px; }
}
.body-col { max-width: 700px; min-width: 0; }

/* ---------------------------------------------------------------- Sidebar */
.side { display: none; }
@media (min-width: 1000px) {
  .side { display: block; position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; }
}
.side-label { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
              color: var(--ink-faint); padding-left: 14px; margin-bottom: 12px; }
.side ol { list-style: none; counter-reset: s; }
.side li { counter-increment: s; }
.side a {
  display: block; text-decoration: none; color: var(--ink-soft);
  font-size: 13.5px; line-height: 1.45; padding: 6px 12px 6px 14px;
  border-left: 2px solid transparent; transition: color .12s ease, border-color .12s ease;
}
.side a::before { content: counter(s) ". "; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.side a:hover { color: var(--ink); }
.side a.active { color: var(--green); font-weight: 650; border-left-color: var(--green); }
.side a.active::before { color: var(--green); }

/* ---------------------------------------------------------------- Masthead */
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--green); text-transform: uppercase; }
h1 { font-size: clamp(30px, 4.4vw, 40px); font-weight: 800; letter-spacing: -0.028em;
     line-height: 1.12; margin-top: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stamp { display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
         border: 1px solid var(--border); border-radius: 99px; padding: 5px 13px;
         font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.stamp .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--green); flex: none; }
.lede { font-size: 17.5px; line-height: 1.62; color: var(--ink-soft); margin-top: 26px; }

/* ---------------------------------------------------------------- Sections */
h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.35;
     margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--rule); scroll-margin-top: 92px; }
h2 .n { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-weight: 650; margin-right: 9px; }
h3 { font-size: 15.5px; font-weight: 700; margin-top: 26px; }
p { margin-top: 15px; }
ul, ol { padding-left: 20px; margin-top: 12px; }
li { margin-top: 9px; }
li::marker { color: var(--ink-faint); }
strong { font-weight: 650; }
em { font-style: italic; }

/* ---------------------------------------------------------------- Callouts */
.callout, .warn {
  border-radius: 14px; padding: 20px 22px; margin-top: 26px; font-size: 15.5px; line-height: 1.65;
}
.callout { background: var(--green-soft); border: 1px solid var(--green-border); }
.warn { background: var(--amber-soft); border: 1px solid var(--amber-border); }
.callout p:first-child, .warn p:first-child { margin-top: 0; }
.callout .tag, .warn .tag {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 9px;
}
.callout .tag { color: var(--green); }
.warn .tag { color: var(--amber); }
.todo { background: var(--surface); border: 1.5px dashed var(--gold); border-radius: 14px;
        padding: 18px 22px; margin-top: 26px; font-size: 14.5px; color: var(--amber); line-height: 1.6; }

/* ---------------------------------------------------------------- Tables */
.tbl { margin-top: 20px; border: 1px solid var(--border); border-radius: 13px;
       overflow: hidden; background: var(--surface); }
.tbl-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; line-height: 1.55; }
th { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
     color: var(--ink-faint); background: var(--cream); white-space: nowrap; }
td { border-top: 1px solid var(--rule); }
td:first-child { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Footer */
footer { border-top: 1px solid var(--border); padding: 30px 0 40px; font-size: 13px; color: var(--ink-faint); }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; text-align: center; }
footer a { color: var(--green); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.foot-note { flex-basis: 100%; text-align: center; color: var(--ink-faint); }

/* ---------------------------------------------------------------- Mobile TOC */
.toc-m { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
         padding: 6px 20px 18px; margin-top: 30px; }
.toc-m summary { cursor: pointer; font-weight: 700; font-size: 14.5px; padding: 14px 0;
                 list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: "＋"; color: var(--ink-faint); font-weight: 400; }
.toc-m[open] summary::after { content: "−"; }
.toc-m ol { padding-left: 20px; margin-top: 4px; }
.toc-m li { margin-top: 7px; font-size: 14.5px; }
.toc-m a { text-decoration: none; }
.toc-m a:hover { text-decoration: underline; }
@media (min-width: 1000px) { .toc-m { display: none; } }

/* ---------------------------------------------------------------- Print */
@media print {
  nav, .side, .toc-m, .stamp .dot { display: none !important; }
  html { scroll-padding-top: 0; }
  body { background: #fff; font-size: 11pt; line-height: 1.5; }
  .shell { max-width: none; padding: 0; }
  .doc { display: block; padding: 0; }
  .body-col { max-width: none; }
  h1 { font-size: 22pt; }
  h2 { font-size: 13pt; margin-top: 22pt; padding-top: 10pt; break-after: avoid; }
  .callout, .warn, .todo, .tbl { break-inside: avoid; border: 1px solid #ccc; background: #fff; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  footer { border-top: 1px solid #ccc; }
}
