/* ============================================================================
   Privacy pages: self-contained styles. No external fonts, no trackers.
   Light + dark (prefers-color-scheme) + print. WCAG 2.1 AA contrast.
   ========================================================================== */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6370;
  --border: #e4e7ec;
  --accent: #2d5bff;
  --accent-ink: #1b39b3;
  --tldr-bg: #eef3ff;
  --tldr-border: #cdd9ff;
  --warn-bg: #fff6e6;
  --warn-border: #f3d79b;
  --warn-ink: #7a5300;
  --code-bg: #f1f3f7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --text: #e6e8eb;
    --muted: #a6adba;
    --border: #2a2f3a;
    --accent: #8aa4ff;
    --accent-ink: #b3c4ff;
    --tldr-bg: #16203a;
    --tldr-border: #2c3f6e;
    --warn-bg: #2a2413;
    --warn-border: #5c4a1e;
    --warn-ink: #e7c979;
    --code-bg: #1e222b;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  word-break: break-word;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: top 0.15s ease;
  z-index: 20;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.lockup b {
  font-size: 17px;
}
.lockup span {
  font-size: 13px;
  color: var(--muted);
}
.mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mark svg {
  width: 19px;
  height: auto;
}

/* layout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 940px) {
  .wrap {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
}

/* table of contents */
.toc {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
}
@media (min-width: 940px) {
  .toc {
    position: sticky;
    top: 24px;
  }
}
.toc > summary {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.toc > summary::-webkit-details-marker {
  display: none;
}
.toc > summary::after {
  content: " ▾";
  float: right;
}
.toc[open] > summary::after {
  content: " ▴";
}
@media (min-width: 940px) {
  .toc > summary {
    cursor: default;
  }
  .toc > summary::after {
    display: none;
  }
}
.toc ol {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}
.toc a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14.5px;
  color: var(--text);
  text-decoration: none;
}
.toc a:hover {
  background: var(--tldr-bg);
  color: var(--accent-ink);
}

.meta-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  font-size: 14px;
}
.meta-card dt {
  font-weight: 700;
  margin-top: 10px;
}
.meta-card dt:first-child {
  margin-top: 0;
}
.meta-card dd {
  color: var(--muted);
}

/* article */
article {
  min-width: 0;
}
.doc-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.doc-subtitle {
  color: var(--muted);
  font-size: 18px;
  margin-top: 6px;
}
article h2 {
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -0.01em;
  margin-top: 52px;
  margin-bottom: 12px;
  scroll-margin-top: 24px;
  padding-top: 4px;
}
article h3 {
  font-size: 17.5px;
  margin-top: 26px;
  margin-bottom: 6px;
}
article p {
  margin-bottom: 14px;
}
article ul {
  margin: 0 0 14px 1.2em;
}
article li {
  margin-bottom: 8px;
}
.lead {
  font-size: 18px;
}

/* callouts */
.callout {
  border-radius: 12px;
  padding: 18px 20px;
  margin: 8px 0 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.callout--tldr {
  background: var(--tldr-bg);
  border-color: var(--tldr-border);
}
.callout--warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.callout h2,
.callout h3 {
  margin-top: 0;
}
.callout__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout--warn .callout__title {
  color: var(--warn-ink);
}
.callout ul {
  margin: 6px 0 0 1.2em;
}
.callout li {
  margin-bottom: 6px;
}

/* permissions table */
.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  background: var(--code-bg);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody tr:last-child td {
  border-bottom: none;
}
td code {
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 22px;
  margin-top: 14px;
}
.contact-card .k {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card .v {
  margin: 2px 0 14px;
  font-size: 16px;
}
.contact-card .v:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0 20px;
}
.page-foot {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 48px;
}

/* print */
@media print {
  .toc,
  .meta-card,
  .skip-link,
  .site-header {
    display: none !important;
  }
  .wrap {
    display: block;
    max-width: none;
    padding: 0;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  .callout,
  .table-scroll,
  .contact-card {
    border-color: #999;
    break-inside: avoid;
  }
}
