/* Long-form layout for public/{terms,privacy,consent}.html.
   Loaded after site.css (tokens + header/footer). Greenhouse look:
   linen page, one white article card, sticky contents list on wide
   screens (built by site.js from the article's h2s). */

.policy-head { padding: 48px 0 32px; }
.policy-head h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.18;
  font-weight: 800; letter-spacing: -0.045em;
}
.effective {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 14px; font-weight: 700; color: var(--ink-sub);
}
.effective::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }

.doc-tabs {
  display: flex; gap: 4px; width: max-content; max-width: 100%; margin-top: 28px; padding: 5px;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tabs a {
  flex-shrink: 0; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-sub); text-decoration: none; white-space: nowrap;
}
.doc-tabs a:hover { background: var(--chip); color: var(--ink); }
.doc-tabs a[aria-current="page"] { background: var(--deep); color: #fff; }

.policy-grid {
  display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start;
  padding-bottom: 104px;
}

.toc {
  position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow: auto;
  padding: 18px 12px 18px 14px; border-radius: var(--r-md); background: rgba(255,255,255,0.55);
}
.toc p { margin: 0 0 10px 8px; font-size: 13px; font-weight: 800; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 7px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--ink-sub); text-decoration: none;
}
.toc a:hover { background: rgba(27,31,26,0.05); color: var(--ink); }
.toc a[aria-current="true"] { background: var(--sage-tint); color: var(--deep); font-weight: 800; }

article {
  padding: 48px 52px 52px; border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--shadow-card);
  font-size: 15.5px; line-height: 1.85;
}
article > p:first-child { margin-top: 0; }
article > *:last-child { margin-bottom: 0; }

article h2 {
  margin: 40px 0 12px; padding-top: 32px; border-top: 1px solid var(--line-soft);
  font-size: 19px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.45; color: var(--ink);
  scroll-margin-top: 92px;
}
article > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
article h3 { margin: 22px 0 8px; font-size: 15.5px; font-weight: 800; color: var(--deep); }

article p { margin: 0.6em 0; color: var(--ink-sub); }
article strong { color: var(--ink); font-weight: 700; }
article ul, article ol { margin: 0.6em 0; padding-left: 1.4em; color: var(--ink-sub); }
article li { margin: 0.4em 0; }
article li::marker { color: var(--sage); font-weight: 700; }
article ol > li { padding-left: 0.2em; }
article ul ul, article ol ul { margin: 0.2em 0; }
article a { color: var(--deep); word-break: break-all; }
article a:hover { color: var(--sage); }

.table-scroll { overflow-x: auto; margin: 1em 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line-soft); -webkit-overflow-scrolling: touch; }
article table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; }
article th, article td {
  padding: 12px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft); color: var(--ink-sub); line-height: 1.65;
}
article th { background: var(--sage-tint); color: var(--deep); font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; }
article tr:last-child td { border-bottom: 0; }

.callout {
  margin: 32px 0 0; padding: 18px 20px; border-radius: 20px;
  background: var(--sage-tint); color: var(--deep); font-size: 14.5px;
}
.callout p { margin: 0.2em 0; color: var(--deep); }
.callout strong { color: var(--deep); }

@media (max-width: 960px) {
  .policy-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .policy-head { padding: 32px 0 24px; }
  article { padding: 30px 20px 32px; border-radius: 26px; font-size: 15px; }
  article h2 { font-size: 17.5px; margin-top: 32px; padding-top: 26px; }
}

@media print {
  .site-header, .site-footer, .toc, .doc-tabs, .skip { display: none !important; }
  body { background: #fff; }
  .policy-grid { display: block; padding: 0; }
  article { box-shadow: none; padding: 0; }
}
