/* Scanwright site. Hand-written, no frameworks, no web fonts, no scripts. */
:root {
  color-scheme: dark light;
  --bg: #0a0e16;
  --panel: #101826;
  --ink: #eaf0f8;
  --muted: #a8b5c8;
  --line: #243148;
  --accent: #37cfe0;
  --on-accent: #04222a;
  --link: #6fe0ee;
  --note-bg: #2a2110;
  --note-line: #6b5120;
  --note-ink: #f1d9a6;
  --code-bg: rgba(127, 140, 160, 0.18);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fa;
    --panel: #ffffff;
    --ink: #0d1626;
    --muted: #46556c;
    --line: #d5dce8;
    --accent: #087585;
    --on-accent: #ffffff;
    --link: #065f6d;
    --note-bg: #fff6e1;
    --note-line: #e1c27a;
    --note-ink: #5b3a00;
    --code-bg: rgba(70, 85, 108, 0.12);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.wrap { width: min(100% - 2rem, 46rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem .8rem; z-index: 10; }
.skip:focus { left: 0; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 22%; display: block; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-block: 1.6rem 2.4rem; color: var(--muted); font-size: .92rem; }
.site-footer p { margin: .35rem 0; }
.site-footer .fine { font-size: .82rem; }

/* Type */
main { padding-block: 2rem 1rem; }
h1 { font-size: clamp(1.85rem, 5.5vw, 2.6rem); line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 2.4rem 0 .6rem; padding-top: .4rem; }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 .5rem; }
p, ul, ol, dl { margin: .7rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: .35rem 0; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
strong { font-weight: 650; }
code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; }
.meta { color: var(--muted); font-size: .95rem; margin-top: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .6rem; }

/* Blocks */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; margin: 1.1rem 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.note { background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note-ink); border-radius: 12px; padding: 1rem 1.15rem; margin: 1.3rem 0; }
.note a { color: inherit; }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }
.summary { border-left: 4px solid var(--accent); padding: .1rem 0 .1rem 1rem; margin: 1.4rem 0; }
.facts { display: grid; grid-template-columns: 1fr; gap: .15rem 1rem; }
.facts dt { font-weight: 650; color: var(--muted); font-size: .88rem; margin-top: .55rem; }
.facts dd { margin: 0; }
@media (min-width: 40rem) {
  .facts { grid-template-columns: 9.5rem 1fr; }
  .facts dt { margin-top: 0; padding-top: .12rem; }
}
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }
.btn { display: inline-block; padding: .7rem 1.1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 650; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.hero { display: flex; gap: 1.25rem; align-items: center; margin: .5rem 0 1rem; }
.hero img { width: 84px; height: 84px; border-radius: 22%; flex: none; }
@media (max-width: 30rem) { .hero { flex-direction: column; align-items: flex-start; } }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.2rem 0; }
.grid .card { margin: 0; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1.1rem; margin: .8rem 0; }
details[open] { padding-bottom: 1rem; }
summary { cursor: pointer; font-weight: 650; }
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
details p:first-of-type { margin-top: .7rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  :root { --bg: #fff; --panel: #fff; --ink: #000; --muted: #333; --line: #bbb; --link: #000; --note-bg: #fff; --note-ink: #000; --note-line: #888; }
  .site-header nav, .actions, .skip { display: none; }
  a { text-decoration: underline; }
  .card, .note, details { break-inside: avoid; }
}
