/* Shared chrome for the document pages (privacy, support).
   Tokens mirror the home page's system so the three pages read as one site.
   The home page carries its own inline styles — it is the only page whose
   layout is unique enough to justify them. */

:root {
  color-scheme: light dark;

  --background:       #FBFAF8;
  --surface:          #FFFFFF;
  --surface-sunken:   #F4F2EE;
  --text-primary:     #16140F;
  --text-secondary:   #5D584F;
  --text-tertiary:    #8E887D;
  --border:           #E2DED6;
  --border-subtle:    #EDEAE4;
  --accent:           #1B7C8D;
  --accent-hover:     #14606E;

  --radius-small:  8px;
  --radius-medium: 14px;
  --radius-large:  24px;
  --radius-full:   999px;

  --space-2: 8px;  --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --text-body:  1.0625rem;
  --text-small: 0.9375rem;
  --text-label: 0.75rem;

  --ease:   cubic-bezier(.22, .61, .36, 1);
  --dur-ui: 190ms;

  --content: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background:     #0E0D0C;
    --surface:        #171614;
    --surface-sunken: #131211;
    --text-primary:   #F5F3EF;
    --text-secondary: #A9A399;
    --text-tertiary:  #7C766D;
    --border:         #2C2A26;
    --border-subtle:  #232120;
    --accent:         #4FC3D4;
    --accent-hover:   #7AD6E3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-small); }

.shell { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--space-5); }
@media (min-width: 768px) { .shell { padding-inline: var(--space-7); } }

.skip {
  position: absolute; left: -9999px; top: var(--space-3);
  background: var(--surface); color: var(--text-primary);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-medium);
  border: 1px solid var(--border); z-index: 100;
}
.skip:focus { left: var(--space-5); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner { display: flex; align-items: center; gap: var(--space-6); height: 60px; }
.wordmark {
  display: flex; align-items: center; gap: var(--space-3);
  font-weight: 620; letter-spacing: -0.015em; color: var(--text-primary); text-decoration: none;
}
.wordmark img { width: 30px; height: 30px; border-radius: var(--radius-small); }
.nav-menu { margin-left: auto; display: flex; gap: var(--space-6); font-size: var(--text-small); }
.nav-menu a { color: var(--text-secondary); text-decoration: none; transition: color var(--dur-ui) var(--ease); }
.nav-menu a:hover { color: var(--text-primary); }

/* document */
main.doc { max-width: 68ch; margin-inline: auto; padding: var(--space-8) var(--space-5) var(--space-9); }
@media (min-width: 768px) { main.doc { padding-inline: var(--space-7); } }
main.doc h1 {
  margin: 0 0 var(--space-2); font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 640; line-height: 1.08; letter-spacing: -0.032em;
}
main.doc h2 {
  margin: var(--space-8) 0 var(--space-4); font-size: 1.3rem;
  font-weight: 620; letter-spacing: -0.02em; line-height: 1.25;
}
main.doc h3 {
  margin: var(--space-6) 0 var(--space-2); font-size: 1.0625rem;
  font-weight: 620; letter-spacing: -0.012em;
}
main.doc p  { margin: 0 0 var(--space-4); }
main.doc ul { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
main.doc li { margin: var(--space-2) 0; }
main.doc strong { font-weight: 620; }
.lede, .effective { color: var(--text-tertiary); margin-top: 0; }

.contact {
  margin: var(--space-6) 0; padding: var(--space-5) var(--space-5);
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-large);
}
.contact a { font-weight: 600; }

/* footer */
footer.site {
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-8);
  color: var(--text-tertiary); font-size: var(--text-small);
}
.foot-grid { display: flex; flex-wrap: wrap; gap: var(--space-7); justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.foot-links a { color: var(--text-secondary); text-decoration: none; transition: color var(--dur-ui) var(--ease); }
.foot-links a:hover { color: var(--text-primary); }
.foot-legal { margin-top: var(--space-7); font-size: var(--text-label); line-height: 1.6; }

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

/* coloring-page library
   The document layout is a 68ch reading column, which is right for privacy and
   support but too narrow for a page whose subject is a picture. .lib widens the
   column and lets the prose keep its own measure inside it. */
main.doc.lib { max-width: 880px; }
main.doc.lib > p,
main.doc.lib > .lede,
main.doc.lib > .diff-note { max-width: 68ch; }

.crumbs {
  font-size: var(--text-small); color: var(--text-tertiary);
  margin-bottom: var(--space-5);
}
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
.crumbs span[aria-hidden] { padding-inline: var(--space-2); color: var(--border); }

.facts {
  list-style: none; padding: 0;
  margin: var(--space-5) 0 var(--space-7);
  display: flex; flex-wrap: wrap; gap: var(--space-3);
}
.facts li {
  margin: 0; padding: var(--space-3) var(--space-5);
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-small); font-weight: 600;
}
.facts li span {
  display: block; font-size: var(--text-label); font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary);
}

.pair {
  margin: 0 0 var(--space-8);
  display: grid; gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 660px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair img {
  width: 100%; height: auto; border-radius: var(--radius-medium);
  border: 1px solid var(--border-subtle); background: #fff;
}
.pair figcaption {
  grid-column: 1 / -1; margin: 0;
  font-size: var(--text-small); color: var(--text-tertiary);
}

.diff-note { font-weight: 600; color: var(--text-secondary); }

.palette {
  list-style: none; padding: 0; margin: var(--space-5) 0 var(--space-7);
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.palette li {
  margin: 0; display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-small);
}
.palette .sw {
  flex: none; width: 26px; height: 26px; border-radius: var(--radius-small);
  border: 1px solid rgb(0 0 0 / .16);
}
.palette code {
  margin-left: auto; color: var(--text-tertiary);
  font-size: var(--text-label); letter-spacing: .02em;
}

.cta b { color: var(--text-primary); }

.grid, .related {
  list-style: none; padding: 0; margin: var(--space-6) 0 0;
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.grid li, .related li { margin: 0; }
.grid a, .related a {
  display: block; text-decoration: none; color: inherit;
  transition: transform var(--dur-ui) var(--ease);
}
.grid a:hover, .related a:hover { transform: translateY(-3px); }
.grid img, .related img {
  width: 100%; height: auto; border-radius: var(--radius-medium);
  border: 1px solid var(--border-subtle); background: #fff;
}
.grid h2 {
  margin: var(--space-3) 0 0 !important; font-size: 1rem !important;
}
.grid p {
  margin: 2px 0 0; font-size: var(--text-small); color: var(--text-tertiary);
}
.related span {
  display: block; margin-top: var(--space-3);
  font-size: var(--text-small); font-weight: 600;
}
