/* brbr.doverlabs.xyz. One stylesheet, no framework. Instrument Sans (OFL) for text,
   Commit Mono (OFL) for code and records, both served from this site. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url(/assets/fonts/instrument-sans-latin-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url(/assets/fonts/instrument-sans-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commit Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/fonts/commit-mono-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Commit Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/fonts/commit-mono-latin-600-normal.woff2) format("woff2");
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --ink-2: #44484e;
  --ink-3: #6b7078;
  --rule: #e7e8ea;
  --line: #cfd2d6;
  --wash: #f6f7f8;
  --accent: #1a4cd4;
  --ok: #0a7a50;
  --refused: #b3261e;
  --pep: #b7791f;
  --bar: #d7dade;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Commit Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-small: 0.8125rem;
  --fs-body: 1rem;
  --fs-lede: 1.125rem;
  --fs-h3: 1.0625rem;
  --fs-h2: 1.5rem;
  --fs-h1: clamp(2.25rem, 1.55rem + 2.9vw, 3.5rem);

  --gutter: 24px;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --ink: #ffffff;
    --ink-2: #b9bec5;
    --ink-3: #8f959c;
    --rule: #1e2023;
    --line: #34373b;
    --wash: #0d0e10;
    --accent: #7ea1ff;
    --ok: #4cc38a;
    --refused: #ff8a80;
    --pep: #e0a43a;
    --bar: #3a3d42;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--sans);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--ink-3); }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding-inline: var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.skip:focus { left: 8px; }

/* Header ---------------------------------------------------------------- */
.top { border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; }
.mark { font: 600 1rem/1 var(--mono); text-decoration: none; letter-spacing: -0.02em; }
.top nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; font-size: 0.9375rem; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; padding: 4px 0; }
.top nav a:hover { color: var(--ink); }
.top nav .lang { color: var(--ink-3); }
@media (max-width: 600px) { .top nav { gap: 16px; font-size: 0.875rem; } .top nav a[href="#specs"] { display: none; } }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font: 500 0.9375rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color 120ms, background-color 120ms;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--rule); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* Hero ------------------------------------------------------------------ */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px; align-items: start; padding-block: 80px 72px;
}
.hero h1 { font-size: var(--fs-h1); line-height: 1.02; font-stretch: 86%; font-weight: 600; letter-spacing: -0.035em; max-width: 12em; }
.lede { margin-top: 24px; font-size: var(--fs-lede); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.aside { margin-top: 20px; font-size: var(--fs-small); color: var(--ink-3); }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 48px; } }

.record { margin: 0; min-width: 0; }
.record-head, .record-body, .record-proof { border: 1px solid var(--rule); }
.record-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 10px 14px; border-radius: 8px 8px 0 0; border-bottom: 0;
  font: 400 0.8125rem/1.4 var(--mono); color: var(--ink-3);
}
.record-head code { font-size: inherit; color: var(--ink); font-weight: 600; }
.record-body {
  margin: 0; padding: 14px; background: var(--wash);
  font: 400 0.78rem/1.6 var(--mono); color: var(--ink);
  white-space: pre-wrap; word-break: break-all; max-height: 22rem; overflow-y: auto;
}
.record-body code { font-size: inherit; }
.record-body .k { color: var(--ink-2); }
.record-body .n { color: var(--accent); }
.record-proof { margin: 0; padding: 4px 14px; border-top: 0; border-radius: 0 0 8px 8px; font-size: var(--fs-small); }
.record-proof div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.record-proof div + div { border-top: 1px solid var(--rule); }
.record-proof dt { color: var(--ink-3); }
.record-proof dd { margin: 0; font-family: var(--mono); font-size: 0.78rem; overflow-wrap: anywhere; }
.record-proof dd code { font-size: inherit; }
.rsig[data-state="ok"] { color: var(--ok); }
.rsig[data-state="bad"] { color: var(--refused); }
.rsig[data-state="ok"]::before, .rsig[data-state="bad"]::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: currentColor; vertical-align: 1px;
}
.record figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-3); max-width: 44em; }

/* Sections -------------------------------------------------------------- */
.band { border-top: 1px solid var(--rule); padding-block: 72px; }
.sec-head { margin-bottom: 36px; }
.sec-head h2 { font-size: var(--fs-h2); font-stretch: 90%; letter-spacing: -0.02em; }
.sec-head p { margin-top: 10px; color: var(--ink-2); max-width: 40em; }
@media (max-width: 600px) { .band { padding-block: 52px; } }

/* Status markers: filled = built, half = core built, hollow = specified. */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font: 400 0.75rem/1.4 var(--mono); color: var(--ink-2); white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; flex: none; border: 1px solid var(--ink); }
.status[data-s="built"]::before { background: var(--ink); }
.status[data-s="core"]::before { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }

.modules { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.modules li {
  display: grid; grid-template-columns: 9.5rem 15rem minmax(0, 1fr);
  grid-template-areas: "status title desc" "status title refs";
  column-gap: 24px; padding: 22px 0; border-top: 1px solid var(--rule);
}
.modules .status { grid-area: status; align-self: start; margin-top: 3px; }
.modules h3 { grid-area: title; font-size: var(--fs-h3); line-height: 1.4; }
.modules .desc { grid-area: desc; color: var(--ink-2); max-width: 62ch; }
.modules .refs { grid-area: refs; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: var(--fs-small); }
.modules .refs a { color: var(--ink); }
@media (max-width: 960px) {
  .modules li { grid-template-columns: 9.5rem minmax(0, 1fr); grid-template-areas: "status title" "status desc" "status refs"; row-gap: 6px; }
}
@media (max-width: 600px) {
  .modules li { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "status" "desc" "refs"; }
  .modules .status { margin: 0 0 4px; }
}

/* Lab ------------------------------------------------------------------- */
.lab-status { color: var(--ink-3); font-size: var(--fs-small); }
.lab-status.error { color: var(--refused); }
.lab-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.scenarios { display: flex; flex-wrap: wrap; gap: 4px; }
.scenarios button {
  border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--ink-2);
  padding: 6px 10px; font: 500 0.875rem/1.3 var(--sans); cursor: pointer;
}
.scenarios button:hover { color: var(--ink); border-color: var(--rule); }
.scenarios button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.scenario-about { margin: 20px 0 24px; color: var(--ink-2); max-width: 70ch; }

.lab-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .lab-grid { grid-template-columns: minmax(0, 1fr); } }
.pane { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 18px; min-width: 0; }
.pane h3 { font-size: 0.875rem; color: var(--ink-2); font-weight: 600; margin-bottom: 8px; }
.pane h3:not(:first-child) { margin-top: 24px; }
.pane-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.supply { font-size: var(--fs-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.supply b { color: var(--ink); font-weight: 500; }

.entries { list-style: none; margin: 0; padding: 0; max-height: 36rem; overflow-y: auto; overscroll-behavior: contain; }
.entries li { padding: 12px 0 12px 12px; border-top: 1px solid var(--rule); border-left: 2px solid transparent; }
.entries li:first-child { border-top: 0; }
.entries li.current { border-left-color: var(--accent); }
.entries li.yours { background: var(--wash); }
.entries .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--fs-small); color: var(--ink-3); }
.entries .verdict { font-family: var(--mono); font-size: 0.75rem; color: var(--ok); }
.entries li.refused .verdict { color: var(--refused); }
.entries .schema { font-family: var(--mono); font-size: 0.75rem; color: var(--ink); }
.entries .note { margin-top: 4px; color: var(--ink); }
.entries .reason { margin-top: 4px; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); overflow-wrap: anywhere; }
.entries .meta { margin-top: 4px; font-size: var(--fs-small); color: var(--ink-3); }
.entries details { margin-top: 6px; font-size: var(--fs-small); }
.entries summary { cursor: pointer; color: var(--ink-3); width: max-content; }
.entries summary:hover { color: var(--ink); }
.entries details pre { margin: 8px 0 0; padding: 10px 12px; background: var(--wash); border-radius: var(--radius); font-size: 0.72rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 18rem; overflow-y: auto; }
.entries .setup { color: var(--ink-3); font-size: var(--fs-small); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; font-size: 0.75rem; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .bar i { display: block; background: var(--bar); }
.legend i { width: 10px; height: 4px; }
.legend i.pep, .bar i.pep { background: var(--pep); }
.legend i.rev, .bar i.rev { background: var(--accent); }
.acct-group h4 { font-size: 0.75rem; font-weight: 500; color: var(--ink-3); margin: 14px 0 2px; }
.acct { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--rule); }
.acct .name { font-weight: 500; }
.acct .bal { font-variant-numeric: tabular-nums; }
.acct .sub { grid-column: 1 / -1; font-size: 0.75rem; color: var(--ink-3); }
.acct .flag { color: var(--refused); }
.acct .bar { grid-column: 1 / -1; display: flex; gap: 1px; height: 4px; margin-top: 4px; }
.time-records { list-style: none; margin: 0; padding: 0; font-size: var(--fs-small); color: var(--ink-2); }
.time-records li { padding: 6px 0; border-top: 1px solid var(--rule); }
.time-records li:first-child { border-top: 0; }
.halted { margin: 8px 0 0; color: var(--refused); font-size: var(--fs-small); font-weight: 500; }

.act { margin-top: 20px; border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
.act h3 { font-size: 0.875rem; color: var(--ink-2); }
.act > p { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-small); max-width: 60ch; }
.act-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.act label { display: grid; gap: 6px; font-size: 0.75rem; color: var(--ink-3); }
.act label[hidden] { display: none; }
.act select, .act input {
  height: 40px; width: 100%; min-width: 0; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: 400 0.9375rem var(--sans);
}
.act-error { margin-top: 10px; color: var(--refused); font-size: var(--fs-small); min-height: 1em; }

/* Specs ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.specs { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.specs th, .specs td { text-align: left; padding: 12px 16px 12px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.specs thead th { border-top: 0; padding-top: 0; font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
.specs tbody tr:last-child th, .specs tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
.specs tbody th { font-weight: 500; }
.specs tbody th a { text-decoration: none; }
.specs tbody th a:hover { text-decoration: underline; }
.specs tbody th code { display: inline-block; min-width: 5.6em; color: var(--ink-3); font-size: 0.8125rem; }
.specs td { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status ---------------------------------------------------------------- */
.cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; }
@media (max-width: 960px) { .cols { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.cols h3 { font-size: var(--fs-h3); margin-bottom: 12px; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.facts dt { font-weight: 500; }
.facts dt code { font-size: 0.875rem; }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }

/* Footer ---------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 28px 44px; font-size: var(--fs-small); color: var(--ink-3); }

/* 404 ------------------------------------------------------------------- */
.notfound { padding-block: 72px; display: grid; gap: 16px; }
.notfound h1 { font-size: var(--fs-h2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
