:root {
  color-scheme: dark;
  --background: #101921;
  --surface: #192733;
  --line: #3b5364;
  --text: #f4f8fb;
  --muted: #bdccd7;
  --accent: #bcf785;
  font: 100%/1.6 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.frame { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 750; color: var(--text); text-decoration: none; }
.skip { position: absolute; top: .5rem; left: 1rem; background: var(--background); padding: .6rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
h1, h2 { line-height: 1.08; }
h1 { font-size: clamp(2.25rem, 7vw, 5.3rem); letter-spacing: -.055em; margin: 1.6rem 0 1rem; }
p { max-width: 68ch; }
.intro { font-size: clamp(1rem, 2.1vw, 1.28rem); color: var(--muted); margin-bottom: 2rem; }
.hero { margin-block: 2rem; padding: clamp(1.25rem, 5vw, 4rem); background-color: var(--surface);
  background-image: linear-gradient(90deg, transparent 95%, #7698b01c 95%),
    linear-gradient(transparent 95%, #7698b01c 95%);
  background-size: 32px 32px; border: 1px solid var(--line); }
.mono, output { font-family: ui-monospace, monospace; }
.mono { color: var(--accent); }
.primary, button { color: #102010; background: var(--accent); border: 1px solid var(--accent);
  font: inherit; font-weight: 700; display: inline-block; border-radius: .2rem;
  padding: .65rem 1rem; text-decoration: none; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.cards, .workbench { display: grid; gap: 1rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.workbench { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); min-width: 0; }
.card { text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card p, aside p { color: var(--muted); }
.crumb { margin-top: 1.5rem; }
.fields { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
label { display: grid; gap: .3rem; }
input { width: 100%; border: 1px solid var(--line); border-radius: .2rem; background: var(--background);
  color: var(--text); font: inherit; padding: .6rem .7rem; }
.result { margin-block: 1.2rem; background: var(--background); padding: .8rem; overflow-wrap: anywhere; min-height: 3.2rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
[role="status"] { min-height: 1.6em; margin-bottom: 0; }
.footer { margin-top: 3rem; padding-block: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 45rem) { .workbench { grid-template-columns: 1fr; } }
select { background: var(--background); color: var(--text); border: 1px solid var(--line);
  font: inherit; padding: .55rem; width: 100%; }
[data-viewmodel] .fields { margin-top: 1rem; }
[data-viewmodel] output { white-space: pre-wrap; }
details { margin-top: 1rem; }
summary { cursor: pointer; color: var(--accent); }
pre { padding: .7rem; background: var(--background); overflow: auto; }
fieldset { min-width: 0; border: 1px solid var(--line); margin: 0 0 .9rem; }
.choice { display: flex; align-items: center; gap: .45rem; }
.choice input { width: auto; accent-color: var(--accent); }
[data-cfg-builder] output { white-space: pre-wrap; }
canvas[data-crosshair-preview] {
  display: block; width: 100%; height: auto; border: 1px solid var(--line);
  background: linear-gradient(30deg, #70836d 36%, #273d4b 36% 64%, #b39b72 64%);
}
[data-crosshair] output { white-space: pre-wrap; }
canvas[data-crosshair-sample] { display: block; width: 100%; height: auto;
  background: linear-gradient(28deg, #344654 45%, #776850 45%); border: 1px solid var(--line); }
.catalog-cards { margin-top: 1rem; }
[data-crosshair-filters] output { display: inline-block; margin: 1rem 1rem .4rem 0; }
.bar nav { display: flex; gap: .45rem 1rem; flex-wrap: wrap; }
@media (max-width: 28rem) { .bar { flex-wrap: wrap; align-content: center; padding-block: .65rem; gap: .2rem; } }
.table-wrap { overflow: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: .65rem; }
tr.different { background: #243a37; }
tr.different th { border-left: 2px solid var(--accent); }
.article { max-width: 55rem; }
.article h1 { max-width: 20ch; }
.article section { margin-block: 2.2rem; scroll-margin-top: 1rem; }
.article figure { margin: 1.2rem 0; }
.article figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.article figcaption, .muted { color: var(--muted); }
.article .panel h2 { margin-top: 0; }
[data-site-search] button { margin-top: .75rem; }
.lab-hero { margin: 2rem 0 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(1rem, 5vw, 3.5rem);
  background: linear-gradient(120deg, #172734 40%, #203a46); border: 1px solid var(--line); }
.lab-intro h1 { margin: .6rem 0 1rem; }
.hero-search label { margin-bottom: .45rem; color: var(--muted); }
.hero-search div { display: flex; gap: .5rem; }
.hero-search input { min-width: 0; }
.inline-link { display: inline-block; margin-top: .85rem; }
.console-card { border: 1px solid #496477; border-radius: .4rem; padding: 1rem; background: #111c26; overflow: hidden; }
.console-top { display: flex; gap: .75rem; justify-content: space-between; align-items: center;
  padding-bottom: .65rem; border-bottom: 1px solid var(--line); color: var(--muted); flex-wrap: wrap; }
.console-card pre { line-height: 1.85; background: #0b131a; color: var(--accent); }
.console-card p { color: var(--muted); }
.catalog-band, .profile-line, .tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-band a, .profile-line a, .tool-grid a { padding: 1rem; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); }
.catalog-band a { display: flex; align-items: center; gap: .75rem; border-top: 0; }
.catalog-band strong { font: 700 1.9rem ui-monospace, monospace; color: var(--accent); }
.topic a:hover, .catalog-band a:hover, .profile-line a:hover, .tool-grid a:hover { background: var(--surface); }
.home-section { margin-block: 2.8rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .7rem; }
.profile-line { gap: .75rem; }
.profile-line a, .tool-grid a, .article-list li { display: grid; gap: .4rem; }
.profile-line strong, .tool-grid strong { color: var(--accent); }
.profile-line span, .tool-grid span, .article-list span { color: var(--muted); }
.home-editorial { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.article-list { list-style: none; padding: 0; }
.article-list li { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
@media (max-width: 51rem) {
  .lab-hero, .home-editorial { grid-template-columns: 1fr; }
}
@media (max-width: 35rem) {
  .catalog-band, .profile-line { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
}
.article h1, .crumb, .article p { overflow-wrap: anywhere; }
h1, h2, h3, .article a, .article summary { overflow-wrap: anywhere; }
