/* Shared styling for privacy-policy.html and terms-and-conditions.html.
   Colours come from legal-config.js (brand.accent) via a CSS variable set at
   runtime by legal.js, so this file rarely needs editing. */

:root {
  --accent: #0f7b5f;
  --bg: #ffffff;
  --panel: #f7f9fa;
  --ink: #1b2733;
  --muted: #5d6b7a;
  --line: #e1e7ec;
  --maxw: 780px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12181e;
    --panel: #1a222b;
    --ink: #e6ecf2;
    --muted: #9aa8b6;
    --line: #2a343f;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- header ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.masthead .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.masthead img { max-height: 44px; width: auto; }

.masthead .who { flex: 1 1 auto; min-width: 200px; }

.masthead .company { font-size: 17px; font-weight: 700; margin: 0; }

.masthead .kicker {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.masthead nav { display: flex; gap: 8px; flex-wrap: wrap; }

.masthead nav a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  background: var(--bg);
  white-space: nowrap;
}

.masthead nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- page shell ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 20px 72px;
}

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 6px; }

.stamp {
  margin: 0 0 28px;
  font-size: 13.5px;
  color: var(--muted);
}

.stamp span { white-space: nowrap; }

.stamp span + span::before { content: " · "; }

h2 {
  font-size: 20px;
  margin: 40px 0 10px;
  padding-top: 8px;
  scroll-margin-top: 16px;
  color: var(--accent);
}

h2 .num { color: var(--muted); font-weight: 600; margin-right: 8px; }

h3 { font-size: 16px; margin: 24px 0 6px; }

p, li { overflow-wrap: break-word; }

ul, ol { padding-left: 22px; }

li { margin: 5px 0; }

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

strong { font-weight: 650; }

/* ---------- summary + table of contents ---------- */

.lead {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 26px;
}

.lead p { margin: 0 0 8px; }
.lead p:last-child { margin-bottom: 0; }

.toc {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 8px;
  background: var(--panel);
}

.toc > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
}

.toc ol {
  margin: 12px 0 2px;
  columns: 2;
  column-gap: 28px;
  font-size: 14px;
}

.toc li { break-inside: avoid; margin: 3px 0; }

.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

@media (max-width: 560px) { .toc ol { columns: 1; } }

/* ---------- content blocks ---------- */

.note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14.5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14.5px;
}

th, td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}

th { background: var(--panel); font-weight: 650; }

.table-wrap { overflow-x: auto; }

dl.contact { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
dl.contact dt { color: var(--muted); }
dl.contact dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- footer ---------- */

footer.page {
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

footer.page .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

footer.page a { color: var(--accent); }

/* ---------- print ---------- */

@media print {
  :root { --bg: #fff; --panel: #fff; --ink: #000; --muted: #333; --line: #bbb; }
  .masthead nav, .toc { display: none; }
  body { font-size: 11pt; }
  main { max-width: none; padding: 0; }
  h2 { page-break-after: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
}
