/* Lamplight, the app's default look (apps/mobile/lib/app/theme.dart). */
:root {
  --bg: #f5f2ec;
  --surface: #fdfcfa;
  --line: #e3dcd0;
  --text: #231e18;
  --muted: #5e5548;
  --accent: #f2b65a;
  --accent-text: #8a5300;
  --care: #2d5e99;
}
/* A theme saved on the home page (html[data-theme]) wins over the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130f;
    --surface: #221e19;
    --line: #3a342d;
    --text: #f3ede4;
    --muted: #bfb5a6;
    --accent-text: #f2b65a;
    --care: #8fb8e8;
  }
}
:root[data-theme="dark"] {
  --bg: #16130f;
  --surface: #221e19;
  --line: #3a342d;
  --text: #f3ede4;
  --muted: #bfb5a6;
  --accent-text: #f2b65a;
  --care: #8fb8e8;
}

/* The app's own type: IBM Plex Sans for text, Plex Sans Condensed for headings and numbers
   (Latin subsets, built by site/tools/build-media.sh). The fallbacks are sized to Plex so
   swapping fonts doesn't shift the layout. */
@font-face { font-family: "Plex"; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("/fonts/IBMPlexSansCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Fallback"; src: local("Arial"), local("Helvetica"), local("Roboto"); size-adjust: 101%; ascent-override: 101%; descent-override: 27%; }
@font-face { font-family: "Plex Condensed Fallback"; src: local("Arial Narrow"), local("Roboto Condensed"), local("Arial"); size-adjust: 88%; ascent-override: 116%; descent-override: 31%; }

:root {
  --font-text: "Plex", "Plex Fallback", system-ui, sans-serif;
  --font-head: "Plex Condensed", "Plex Condensed Fallback", "Plex", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-text);
}
/* The lamp glow at the top of a page. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 360px;
  background: radial-gradient(ellipse 60% 100% at 50% 0, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  pointer-events: none;
  z-index: -1;
}
main, header, footer { max-width: 680px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 28px; display: flex; align-items: center; gap: 10px; }
header a { color: var(--text); text-decoration: none; font: 700 22px var(--font-head); }
.mark { width: 32px; height: 32px; border-radius: 9px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }
h1 { font-size: clamp(32px, 7vw, 48px); margin: 56px 0 16px; letter-spacing: 0; }
h2 { font-size: 22px; margin: 40px 0 8px; }
p, li { color: var(--text); }
.lead { font-size: 20px; color: var(--muted); }
.muted { color: var(--muted); }
a { color: var(--accent-text); }
ul { padding-left: 22px; }
li { margin: 6px 0; }
.points { list-style: none; padding: 0; display: grid; gap: 12px; margin: 32px 0; }
.points li {
  margin: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.points strong { display: block; font-family: var(--font-head); font-size: 19px; }
.note {
  border-left: 3px solid var(--care);
  padding: 4px 0 4px 14px;
  color: var(--muted);
}
footer { margin-top: 64px; padding-bottom: 40px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 15px; color: var(--muted); }
footer a { margin-right: 16px; }

/* Legal pages: summary box, contents, tables. */
h3 { font-size: 18px; margin: 24px 0 4px; }
.legal h2[id] { scroll-margin-top: 16px; }
.summary {
  margin: 28px 0;
  padding: 4px 20px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.summary h2 { margin-top: 16px; }
.summary.care { border-left: 4px solid var(--care); }
.toc ol { padding-left: 22px; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 2px 0; break-inside: avoid; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--muted); }
