/*
 * The documentation, in the site's language (src/design-tokens.css): ink and bone, Bodoni Moda
 * italic for titles, Inter Tight for reading, ember for the one thing that moves you on. Long
 * reading gets a narrow measure; a light reader gets the paper the terms page uses.
 */
:root {
  --ink: #0b0a0c;
  --ink-2: #151317;
  --bone: #efe9dc;
  --muted: #a39c90;
  --line: rgb(239 233 220 / 0.14);
  --line-strong: rgb(239 233 220 / 0.3);
  --ember: #ff5a36;
  --ember-soft: #ff8a6e;
  --aurora: #3cf2a8;
  --field: rgb(239 233 220 / 0.05);
  --warn-bg: rgb(255 90 54 / 0.09);
  --note-bg: rgb(60 242 168 / 0.06);
  --code-bg: #1b181d;
  --display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --text: 'Inter Tight', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --ink: #f4efe2;
    --ink-2: #ebe4d3;
    --bone: #221d16;
    --muted: #645b4e;
    --line: rgb(34 29 22 / 0.14);
    --line-strong: rgb(34 29 22 / 0.3);
    --ember: #c43c1c;
    --ember-soft: #a8341a;
    --aurora: #1f7a55;
    --field: rgb(34 29 22 / 0.04);
    --warn-bg: rgb(196 60 28 / 0.08);
    --note-bg: rgb(31 122 85 / 0.08);
    --code-bg: #e7dfcc;
    color-scheme: light;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 17px/1.62 var(--text);
}
a {
  color: inherit;
  text-decoration-color: var(--ember);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ember-soft);
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 5;
  background: var(--bone);
  color: var(--ink);
  padding: 6px 10px;
}
.top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .brand {
  font: italic 600 22px/1 var(--display);
  text-decoration: none;
}
.top .section {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.top .enter {
  margin-left: auto;
  background: var(--ember);
  color: #160805;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 64px;
}
.side {
  position: sticky;
  top: 72px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}
.side a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
}
.side a:hover {
  color: var(--bone);
  background: var(--field);
}
.side a[aria-current='page'] {
  color: var(--bone);
  background: var(--field);
  box-shadow: inset 2px 0 0 var(--ember);
}
.doc {
  min-width: 0;
  max-width: 76ch;
}
.doc h1 {
  font: italic 500 clamp(36px, 6vw, 58px) / 1.04 var(--display);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.doc .kicker {
  color: var(--ember-soft);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.doc .lead {
  font-size: 20px;
  color: var(--bone);
  opacity: 0.9;
  margin: 0 0 28px;
}
.doc h2 {
  font: italic 500 30px/1.15 var(--display);
  margin: 48px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.doc h3 {
  font-size: 18px;
  margin: 28px 0 6px;
}
.doc p,
.doc li {
  overflow-wrap: anywhere;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li + li {
  margin-top: 4px;
}
.doc small {
  color: var(--muted);
}
.doc code {
  font: 0.86em var(--mono);
  background: var(--code-bg);
  border-radius: 5px;
  padding: 1px 5px;
}
.doc pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font: 14px/1.5 var(--mono);
}
.doc pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.doc pre .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font: 12px var(--text);
  color: var(--muted);
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}
.warn,
.note,
.draft {
  border-radius: 12px;
  padding: 12px 16px;
  margin: 18px 0;
  border: 1px solid var(--line-strong);
}
.warn {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--ember) 55%, transparent);
}
.warn::before {
  content: 'Watch out · ';
  font-weight: 600;
  color: var(--ember-soft);
}
.note {
  background: var(--note-bg);
}
.draft {
  background: var(--warn-bg);
  border-style: dashed;
}
.warn > :first-child,
.note > :first-child {
  margin-top: 0;
}
.warn > :last-child,
.note > :last-child,
.draft > :last-child {
  margin-bottom: 0;
}
.table {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.4;
}
.table caption {
  caption-side: bottom;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.table thead th {
  font-weight: 600;
  background: var(--field);
}
.table tbody th {
  font-weight: 500;
  white-space: nowrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.cards li {
  margin: 0;
}
.cards a {
  display: block;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  background: var(--field);
}
.cards a:hover {
  border-color: var(--ember);
  color: inherit;
}
.cards b {
  display: block;
  font: italic 500 22px/1.2 var(--display);
  margin-bottom: 4px;
}
.cards span {
  color: var(--muted);
  font-size: 15px;
}
.tool {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 8px 0;
  padding: 8px 12px;
}
.tool summary {
  cursor: pointer;
}
.tool summary span {
  color: var(--muted);
  margin-left: 6px;
}
.tool .args {
  font-size: 15px;
}
kbd {
  font: 13px var(--mono);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 5px;
}
.foot {
  border-top: 1px solid var(--line);
  padding: 24px clamp(16px, 4vw, 48px) 40px;
  color: var(--muted);
  font-size: 14px;
}
.foot p {
  max-width: 1180px;
  margin: 4px auto;
}
/* The model checker. */
.drop {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 170px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  padding: 20px;
  background: var(--field);
  cursor: pointer;
}
.drop.over {
  border-color: var(--ember);
}
.drop b {
  font: italic 500 24px/1.2 var(--display);
}
#result {
  scroll-margin-top: 80px;
}
.verdict {
  font: italic 500 26px/1.2 var(--display);
  margin: 22px 0 6px;
}
.verdict.pass {
  color: var(--aurora);
}
.verdict.fail {
  color: var(--ember-soft);
}
.ok {
  color: var(--aurora);
}
.bad {
  color: var(--ember-soft);
}
.mid {
  color: #e0b85a;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
  font-size: 15px;
}

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }
  .shell {
    display: block;
    padding-top: 0;
  }
  .side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 -4px 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }
  .side a {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
  }
  .side a[aria-current='page'] {
    box-shadow: none;
    border-color: var(--ember);
  }
  .top .section {
    display: none;
  }
  /* Wide tables scroll sideways inside their frame; cells keep a readable width. */
  .table td {
    min-width: 8.5em;
  }
  .table table {
    font-size: 14px;
  }
  .doc .lead {
    font-size: 18px;
  }
}
@media print {
  .top,
  .side,
  .foot,
  .copy {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
