/* Kehal website shell — privacy, terms, support, delete-account, 404, open.
   These pages used to carry a different design entirely (warm cream paper, Instrument Serif display,
   graphite "dark metal" panels) from a brand generation the landing page has since left behind. Read one
   after the other they looked like two different companies, so this sheet now paints with the LANDING's
   palette, type and shape language: the same cool blue-grey page, the same Geist, the same card radius
   and hairlines as /assets/landing/landing.css. Keep the two in step — a token changed there usually
   wants changing here.

   Light is the default here as it is on the landing: the base :root IS the light palette, dark is opt-in
   via data-theme, and boot-theme.js replays the saved choice before first paint so a reader who picked
   dark on the home page keeps it here.

   The old home-page rules (.hero, .band, .grid, .metal, .steps, .btn, .soon, .contact, .glyph, .display)
   are gone: the landing page brings its own shell, and nothing that uses this sheet referenced them. */
@font-face { font-family: "Geist"; src: url("fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  /* brand constants, the same in both themes */
  --blue: #2F5BEA;
  --gold: #FFC24D;
  --navy: #0C1728;

  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1100px;
  --prose: 720px;
  --gutter: clamp(16px, 4vw, 32px);
  --r: 18px;
  --r-sm: 12px;

  /* light palette, lifted from the landing page so the two sit on the same paper */
  --page: #F4F6FB;
  --band: #EDF1FA;
  --ink: #0A1322;
  --ink-2: #37455F;
  --muted: #5F6D88;
  --line: rgba(10, 19, 34, .10);
  --line-2: rgba(10, 19, 34, .17);
  --card: #FFFFFF;
  --card-hi: #FFFFFF;
  --card-shadow: 0 1px 2px rgba(10, 19, 34, .04), 0 14px 30px -14px rgba(10, 19, 34, .12);
  --glass: rgba(244, 246, 251, .82);
  /* --accent-ink is the landing's emphasis colour (gold at night). --link is kept separate because gold
     text on white fails contrast and a document is mostly links and prose, not emphasis. */
  --accent-ink: #2246C8;
  --link: #2246C8;
  --chip: rgba(47, 91, 234, .10);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #060C18;
  --band: #0C1728;
  --ink: #EEF2FA;
  --ink-2: #C9D4E6;
  --muted: #93A3BE;
  --line: rgba(214, 226, 248, .10);
  --line-2: rgba(214, 226, 248, .18);
  --card: rgba(255, 255, 255, .03);
  --card-hi: rgba(255, 255, 255, .06);
  --card-shadow: none;
  --glass: rgba(6, 12, 24, .74);
  --accent-ink: #FFC24D;
  --link: #A9BCFF;
  --chip: rgba(47, 91, 234, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page); }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--ink); margin: 0; }
p { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header: the landing page's bar, in sticky form.
   The landing's nav is fixed over a hero that pads for it; a document starts at the top, so this one
   sticks instead and carries the hairline from the start. */
.top { position: sticky; top: 0; z-index: 30; background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: block; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font: 600 22px/1 var(--sans); letter-spacing: -.04em; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 11px; border-radius: 10px; white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--chip); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }
.brand-name { white-space: nowrap; }

/* the light/dark switch, same control as the landing's */
.theme-btn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink-2);
  cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.theme-btn:hover { background: var(--card-hi); color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: block; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }

/* On a phone these are the only controls on the page, so they keep a finger-sized hit area: the padding
   grows as the text shrinks rather than shrinking with it. */
@media (max-width: 720px) {
  .top .wrap { gap: 10px; }
  .nav { gap: 0; }
  .nav a { padding: 11px 9px; font-size: 14px; }
  .nav .nav-extra { display: none; }
  .brand { gap: 8px; padding: 6px 0; }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 27px; height: 27px; }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
  .nav a { padding: 11px 7px; font-size: 13.5px; }
  .theme-btn { width: 38px; height: 38px; }
}

/* ---------- document pages ---------- */
.doc { padding-top: 56px; padding-bottom: 96px; }
@media (max-width: 640px) { .doc { padding-top: 36px; padding-bottom: 64px; } }

/* The head is the one piece of display type on the page, so it is the one thing sized like the landing's
   headlines: Geist 600, tight tracking, no second typeface. */
.doc-head { max-width: var(--prose); margin-bottom: 44px; }
.doc-head h1 { font: 600 clamp(36px, 5.2vw, 58px)/1.05 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.doc-head p { margin: 18px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; text-wrap: pretty; }
/* The effective date, set as a small label rather than another paragraph of prose. */
.doc-head .meta { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow);
  font-size: 13.5px; font-weight: 500; color: var(--muted); }
.doc-head .meta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }

.layout { display: grid; grid-template-columns: 216px minmax(0, var(--prose)); gap: 64px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .toc { display: none; } }

.toc { position: sticky; top: 88px; font-size: 14px; }
.toc p { margin: 0 0 12px; font-weight: 600; color: var(--muted); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent;
  color: var(--muted); text-decoration: none; line-height: 1.4; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); border-left-color: var(--gold); }

.prose { max-width: var(--prose); min-width: 0; }
.prose h2 { font: 600 clamp(22px, 2.4vw, 27px)/1.25 var(--sans); letter-spacing: -.03em; margin: 56px 0 14px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 600 18px/1.35 var(--sans); letter-spacing: -.02em; margin: 32px 0 8px; }
.prose p { margin: 0 0 15px; color: var(--ink-2); text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 600; }
/* Lists get the landing page's dot rather than a browser bullet, which is most of why these pages read
   as part of the same site. */
.prose ul, .prose ol { margin: 0 0 18px; padding: 0; display: grid; gap: 10px; list-style: none; }
.prose li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.6; }
.prose ul > li::before { content: ""; position: absolute; left: 5px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.prose ol { counter-reset: p; }
.prose ol > li { counter-increment: p; padding-left: 30px; }
.prose ol > li::before { content: counter(p); position: absolute; left: 0; top: .18em; display: grid; place-items: center;
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--chip); color: var(--accent-ink);
  font: 600 11.5px/1 var(--sans); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .prose ol > li::before { color: #AFC2FF; }
.prose code { font-size: .88em; background: var(--band); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; word-break: break-all; }

/* The "in short" box at the top of the policy pages. */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 26px; margin: 0 0 44px; box-shadow: var(--card-shadow); }
.summary h2 { margin: 0 0 12px !important; font-size: 17px !important; letter-spacing: -.02em; }
.summary ul { margin: 0; }
.summary li { font-size: 16px; }

/* An aside. The old treatment was a hard left bar with one square corner, the only sharp corner on the
   page; this is a soft tinted panel instead. */
.note { position: relative; background: var(--band); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 16px 18px 16px 20px; margin: 0 0 18px; overflow: hidden; }
.note::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.note p:last-child { margin-bottom: 0; }

.table { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 15.5px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table th { color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; padding-bottom: 8px; }
.table td:first-child { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .table td { border: 0; padding: 2px 0; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--card-shadow); }
.card h3 { margin: 0 0 8px; font: 600 18px/1.3 var(--sans); letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 10px 0 26px; }
@media (max-width: 640px) { .cards2 { grid-template-columns: minmax(0, 1fr); } }

/* A path inside the app, e.g. Settings > Delete account. */
.path { display: inline-block; font-weight: 600; color: var(--ink); background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; }

/* ---------- footer: the landing page's footer, same hairline and sizes ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-start; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot p { margin: 8px 0 0; }
.foot .brand-name { font-size: 19px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
