/* Cream "document" pages: privacy policy and the privacy index. Loaded after site.css. */

body.doc-page {
  background: var(--cream);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
body.doc-page > main { flex: 1; }

.doc-page .site-header { background: var(--green-deep); }
.doc-page .site-footer { background: var(--green-deep); }

.doc {
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 6vw, 5rem);
}
.doc .title { color: var(--ink); font-size: clamp(2rem, 4.6vw, 3.2rem); }
.doc .caps { color: rgba(18, 56, 44, 0.8); }

.doc a { color: #b24a00; text-underline-offset: 3px; }
.doc a:hover { color: var(--mango); }
.doc :focus-visible { outline-color: #b24a00; }

.doc-wrap {
  display: grid;
  grid-template-columns: minmax(12rem, 22%) minmax(0, 1fr);
  gap: clamp(1.5rem, 6vw, 5rem);
  max-width: 76rem;
  margin: 0 auto;
}
.doc-wrap > article { max-width: 68ch; }

.doc h2 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--ink);
  margin: 2.2rem 0 0.6rem;
  scroll-margin-top: 1.5rem;
}
.doc p, .doc li { color: rgba(18, 56, 44, 0.88); font-size: 1.02rem; line-height: 1.7; }
.doc ul { padding-left: 1.3rem; }

.doc-meta { margin: 1rem 0 2rem; }

/* ---------- table of contents ---------- */
.toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  border-left: 1px solid rgba(18, 56, 44, 0.15);
  padding-left: 1.2rem;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  line-height: 1;
}
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; }
.toc a {
  position: relative;
  display: block;
  padding: 0.7rem 0;
  color: rgba(18, 56, 44, 0.8);
  text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); font-weight: 600; }
.toc a[aria-current]::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 3px;
  height: 1.2rem;
  transform: translateY(-50%);
  background: var(--mango);
  border-radius: 2px;
}

/* ---------- summary cards ---------- */
.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.summary > div {
  background: #fff8ec;
  border: 1px solid rgba(18, 56, 44, 0.1);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.summary h2 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.summary p { font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* ---------- list of policies ---------- */
.doc .policy-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.policy-list a {
  display: inline-block;
  padding: 0.6rem 0;
  font-family: var(--font-title);
  font-size: 1.3rem;
}

/* ---------- narrow screens ---------- */
@media (max-width: 820px) {
  .doc-wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; border-left: 0; padding-left: 0; border-bottom: 1px solid rgba(18, 56, 44, 0.15); margin: 0 calc(-1 * clamp(1.25rem, 6vw, 5rem)); }
  .toc ol { display: flex; overflow-x: auto; padding: 0 clamp(1.25rem, 6vw, 5rem); -webkit-overflow-scrolling: touch; }
  .toc a { white-space: nowrap; padding: 0.85rem 0.9rem; }
  .toc a[aria-current]::before { left: 0.9rem; right: 0.9rem; top: auto; bottom: 0; width: auto; height: 3px; transform: none; }
  .doc-meta { letter-spacing: 0.2em; }
  .summary { grid-template-columns: minmax(0, 1fr); }
  .site-header nav { gap: 1.2rem; }
  .logo { letter-spacing: 0.2em; }
}

/* ---------- print ---------- */
@media print {
  body.doc-page, .doc-page .site-header, .doc-page .site-footer { background: #fff; }
  body.doc-page, .doc, .doc p, .doc li, .doc h1, .doc h2, .doc .title, .doc .caps,
  .doc-page .site-header .logo, .doc-page .site-footer span, .doc-page .site-footer a { color: #000; }
  .toc, .site-header nav, .sprite, .logo svg, svg { display: none; }
  .doc-wrap { display: block; }
  .doc a { color: #000; text-decoration: underline; }
  .summary > div { background: #fff; border-color: #000; break-inside: avoid; }
  .doc h2 { break-after: avoid; }
}
