/* gochatta.com: one stylesheet for every page.
   Chatta's palette from the app (Chattr/Theme.swift): logo mint #4EF8AB used
   sparingly, ink and greys for everything else, plain surfaces, type first.
   Light and dark follow the phone. No web fonts, scripts or trackers. */

:root {
  --mint: #4EF8AB;
  --ink: #06210F;
  --bg: #FFFFFF;
  --surface: #F5F6F8;
  --hairline: #E2E5EA;
  --text: #111827;
  --muted: #4B5563;
  --link: #15803D;          /* mint is too light to read as text on white */
  --tag-bg: #111827;
  --tag-text: #FFFFFF;
  --gutter: 20px;
  --measure: 44rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090E0E;
    --surface: #151A1F;
    --hairline: #222831;
    --text: #FFFFFF;
    --muted: #9CA3AF;
    --link: #4EF8AB;
    --tag-bg: #FFFFFF;
    --tag-text: #111827;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

/* Read out, not shown. */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 12px; z-index: 2; }

/* Header: the wordmark, then four plain links. */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: 20px;
}
.brand { display: block; line-height: 0; }
.brand img { width: 112px; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a {
  color: var(--muted); text-decoration: none;
  font-size: 0.9375rem; font-weight: 600;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--mint); }

/* Page title. */
.page-head { padding: 28px 0 8px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.875rem; font-weight: 600;
}
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.lede { font-size: 1.1875rem; line-height: 1.55; margin: 18px 0 0; }

/* Body copy. */
main { padding-bottom: 56px; }
h2 {
  margin: 48px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 1.5rem; line-height: 1.25; font-weight: 750;
  letter-spacing: -0.012em;
  scroll-margin-top: 16px;
}
h3 { margin: 28px 0 6px; font-size: 1.125rem; line-height: 1.35; font-weight: 700; }
p { margin: 12px 0; }
ul, ol { margin: 10px 0; padding-left: 1.25em; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }
strong { font-weight: 700; }

/* "Rolling out": a small ink tag, like the map's count badges. */
.tag {
  display: inline-block;
  padding: 1px 7px 2px;
  border-radius: 6px;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 0.75rem; line-height: 1.5; font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 0.08em;
  white-space: nowrap;
}

/* A quiet panel for the short version. */
.panel {
  margin: 28px 0 8px;
  padding: 18px 22px 16px;
  background: var(--surface);
  border-radius: 16px;
}
.panel h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 1.125rem; }
.panel ul { margin-bottom: 0; }

/* On-this-page links. */
.toc { margin: 32px 0 0; }
.toc p { margin: 0 0 6px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.toc ol { margin: 0; padding: 0; list-style: none; columns: 2 15rem; column-gap: 32px; }
.toc li { margin: 0; padding: 3px 0; break-inside: avoid; font-size: 0.9375rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* The retention table: two columns on wide screens, stacked on phones. */
.table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 1rem; }
.table th {
  text-align: left; color: var(--muted);
  font-size: 0.8125rem; font-weight: 600;
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.table td { vertical-align: top; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--hairline); }
.table td:first-child { width: 34%; font-weight: 650; }
.table td:last-child, .table th:last-child { padding-right: 0; }
@media (max-width: 600px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
  .table td { padding: 0; border: 0; }
  .table td:first-child { width: auto; margin-bottom: 4px; }
}

/* Home page. */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(2.6rem, 11vw, 4.5rem); line-height: 1.02; }
.hero .mark {
  box-shadow: inset 0 -0.3em 0 var(--mint);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (prefers-color-scheme: dark) {
  .hero .mark { box-shadow: none; color: var(--mint); }
}
.facts { list-style: none; padding: 0; margin: 28px 0 0; }
.facts li {
  margin: 0; padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 1.125rem; font-weight: 650;
}
.facts li:last-child { border-bottom: 1px solid var(--hairline); }
.facts span { display: block; color: var(--muted); font-size: 1rem; font-weight: 400; }
.note { color: var(--muted); }

.links { list-style: none; padding: 0; margin: 12px 0 0; }
.links li { margin: 0; border-bottom: 1px solid var(--hairline); }
.links a {
  display: block; padding: 16px 0;
  color: var(--text); text-decoration: none;
}
.links a strong { display: block; font-size: 1.1875rem; }
.links a strong::after { content: " \2192"; color: var(--link); }
.links a span { color: var(--muted); }
.links a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* Numbered steps (age page). */
.steps { padding-left: 1.4em; }
.steps li::marker { font-weight: 700; color: var(--text); }

/* A plain callout for urgent help. */
.callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--surface);
}
.callout p { margin: 4px 0; }
.callout strong { font-size: 1.125rem; }

/* Footer. */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 max(36px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer p { margin: 6px 0; }
.site-footer a { color: var(--muted); }
.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.site-footer .foot-links a { color: var(--text); text-decoration: none; font-weight: 600; }

@media print {
  .site-nav, .toc, .skip { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
