/* dpilot.dev public pages. Colors are copied from design/tokens.css (light) and its dark block,
   switched by prefers-color-scheme. System fonts only: the pages make no outside requests. */

:root {
  color-scheme: light dark;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --sunk: #efeee9;
  --ink: #121212;
  --ink-muted: #545455;
  --border: #d4d4d5;
  --hairline: #e3e2dd;
  --highlight: rgb(255 248 75 / 0.78);
  --highlight-blend: multiply;
  --focus: #121212;
  --focus-offset: #ffffff;
  --shell: #121212;
  --shell-text: #ffffff;
  --shell-muted: #bfbfbf;

  --font-display: "Aspekta", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161616;
    --surface: #1d1d1e;
    --sunk: #121213;
    --ink: #f2f2f2;
    --ink-muted: #bfbfbf;
    --border: #343436;
    --hairline: #2a2a2c;
    --highlight: rgb(255 248 75 / 0.30);
    --highlight-blend: normal;
    --focus: #fff84b;
    --focus-offset: #161616;
    --shell: #0b0b0c;
    --shell-text: #f4f4f4;
    --shell-muted: #a9a9aa;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* Ink slug bar */
.bar { background: var(--shell); color: var(--shell-text); }
.bar-inner, .wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; flex-wrap: wrap; }
.bar :focus-visible { outline-color: #fff84b; }
.brand { font-family: var(--font-display); font-weight: 620; letter-spacing: -0.015em; font-size: 1.0625rem; text-decoration: none; }
.bar nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.bar nav a { color: var(--shell-muted); text-decoration: none; font-size: 0.9375rem; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--shell-text); text-decoration: underline; }

main { padding: 2.5rem 0 3rem; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); margin: 0 0 1rem; }
h2 { font-size: 1.375rem; margin: 2.5rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.5rem; }

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
li > ul { margin-top: 0.35rem; }

/* The highlighter swipe: one word, uneven corners, ink text on it. */
.swipe {
  background: var(--highlight);
  mix-blend-mode: var(--highlight-blend);
  border-radius: 3px 7px 4px 6px;
  padding: 0 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
@media (prefers-color-scheme: dark) { .swipe { color: var(--ink); } }

.lead { font-size: 1.1875rem; color: var(--ink); }
.meta { color: var(--ink-muted); font-size: 0.9375rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.25rem;
  margin: 1.5rem 0;
}
.card h2 { border-top: 0; padding-top: 0; margin-top: 0; }

.notice {
  background: var(--sunk);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0 0; }
.toc h2 { border: 0; padding: 0; margin: 0 0 0.5rem; font-size: 1rem; }
.toc ol { margin: 0; padding-left: 1.5rem; columns: 2 16rem; column-gap: 2rem; }
.toc li { break-inside: avoid; }

.placeholder { background: var(--sunk); border: 1px dashed var(--ink-muted); border-radius: 4px; padding: 0 0.3em; font-size: 0.9375em; }

footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; color: var(--ink-muted); font-size: 0.9375rem; }
footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0; margin: 0 0 0.75rem; }
footer p { margin: 0; }

@media print {
  .bar, .skip, .toc { display: none; }
  body { background: #fff; color: #000; }
}
