/* Layout: an evidence ledger. Left-aligned columns, mono labels that read like citations, and one
   highlighter color reserved for what the evidence proves. Pass and fail colors are semantic only. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  /* Color */
  --paper: #f6f7fa;
  --sheet: #ffffff;
  --ink: #131a2c;
  --ink-2: #4a5370;
  --ink-3: #636c89;
  --rule: #dde1ea;
  --rule-2: #c5ccda;
  --mark: #ffe25c;
  --mark-ink: #131a2c;
  --mark-wash: #ffe25c;
  --on-ink: #ffffff;
  --console: #10172a;
  --console-2: #1a2440;
  --console-ink: #dfe5f3;
  --console-dim: #8d97b5;
  --console-mark: rgb(255 226 92 / 0.2);
  --console-mark-ink: #ffe9a6;
  --console-add: #7fdca6;
  --console-del: #ff9a91;
  --pass: #17784a;
  --pass-soft: #e2f2e9;
  --fail: #b5372f;
  --fail-soft: #fbe8e6;
  --warn: #8f5600;
  --warn-soft: #fff1d1;
  --focus: #2f54ff;
  --shadow: 0 1px 0 rgb(19 26 44 / 0.04), 0 10px 30px -18px rgb(19 26 44 / 0.25);

  /* Type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: clamp(1.9rem, 2.4vw + 1rem, 2.6rem);
  --step-5: clamp(2.4rem, 4.2vw + 1rem, 4.1rem);

  /* Shape */
  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1220;
    --sheet: #141a2b;
    --ink: #e8ecf6;
    --ink-2: #aab2c8;
    --ink-3: #8a93ad;
    --rule: #232c42;
    --rule-2: #323d58;
    --mark: #f2cb48;
    --mark-ink: #141a2b;
    --mark-wash: rgb(242 203 72 / 0.36);
    --on-ink: #0d1220;
    --console: #080c17;
    --console-2: #131a2e;
    --pass: #56c48f;
    --pass-soft: rgb(86 196 143 / 0.13);
    --fail: #f2837a;
    --fail-soft: rgb(242 131 122 / 0.13);
    --warn: #f0b94e;
    --warn-soft: rgb(240 185 78 / 0.13);
    --focus: #8fa3ff;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.3), 0 12px 32px -20px rgb(0 0 0 / 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d1220;
  --sheet: #141a2b;
  --ink: #e8ecf6;
  --ink-2: #aab2c8;
  --ink-3: #8a93ad;
  --rule: #232c42;
  --rule-2: #323d58;
  --mark: #f2cb48;
  --mark-ink: #141a2b;
  --mark-wash: rgb(242 203 72 / 0.36);
  --on-ink: #0d1220;
  --console: #080c17;
  --console-2: #131a2e;
  --pass: #56c48f;
  --pass-soft: rgb(86 196 143 / 0.13);
  --fail: #f2837a;
  --fail-soft: rgb(242 131 122 / 0.13);
  --warn: #f0b94e;
  --warn-soft: rgb(240 185 78 / 0.13);
  --focus: #8fa3ff;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.3), 0 12px 32px -20px rgb(0 0 0 / 0.8);
  color-scheme: dark;
}

/* Base */

/* Elements toggled with the hidden attribute stay hidden even when a class sets display. */
[hidden] {
  display: none !important;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--paper);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: var(--step-5);
  font-weight: 750;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--step-4);
  font-weight: 700;
}

h3 {
  font-size: var(--step-2);
  font-weight: 650;
}

p {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--rule-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--mark);
  text-decoration-thickness: 3px;
}

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

code,
kbd,
pre,
.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: -100px;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: calc(8px + env(safe-area-inset-top, 0px));
}

.draft-banner {
  background: var(--warn-soft);
  color: var(--warn);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: center;
  padding-block: 0.45rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 38rem;
}

.hl {
  background: linear-gradient(176deg, transparent 0 52%, var(--mark-wash) 52% 90%, transparent 90%);
  padding-inline: 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.logo-mark rect {
  fill: var(--ink);
}

.logo-speed {
  stroke: var(--mark);
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
}

.logo-check {
  stroke: var(--on-ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 600 0.9375rem / 1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-primary:hover {
  background: var(--ink-2);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-danger {
  background: var(--fail);
  color: var(--on-ink);
}

.btn-sm {
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  font-size: 0.875rem;
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.55;
  cursor: progress;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Site header */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 64px;
}

.primary-nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.primary-nav a,
.mobile-nav nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 550;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
}

.primary-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--mark);
}

.header-actions {
  display: flex;
  gap: 0.6rem;
}

.mobile-nav {
  display: none;
  margin-left: auto;
  position: relative;
}

.mobile-nav summary {
  list-style: none;
  display: grid;
  gap: 4px;
  place-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  cursor: pointer;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 0.25rem;
  min-width: 220px;
  padding: 0.75rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mobile-nav nav a:not(.btn) {
  padding: 0.5rem 0.4rem;
}

@media (max-width: 860px) {
  .primary-nav,
  .header-actions {
    display: none;
  }

  .mobile-nav {
    display: block;
  }
}

/* Sections */

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-sheet {
  background: var(--sheet);
  border-block: 1px solid var(--rule);
}

.section-head {
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

.hero-copy {
  display: grid;
  gap: 1.4rem;
  min-width: 0;
}

.hero-copy .lede {
  font-size: clamp(1.06rem, 0.5vw + 0.95rem, 1.22rem);
}

.install {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  background: var(--sheet);
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.install code {
  overflow-x: auto;
  white-space: nowrap;
}

.install code::before {
  content: "$ ";
  color: var(--ink-3);
}

.hero-note {
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* Console */

.console {
  min-width: 0;
  background: var(--console);
  color: var(--console-ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.console-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--console-2);
  color: var(--console-dim);
  font-size: 0.72rem;
}

.console pre {
  margin: 0;
  padding: 1rem 1.1rem 1.2rem;
  overflow-x: auto;
  font: inherit;
}

.c-dim {
  color: var(--console-dim);
}

.c-cmd {
  color: #ffffff;
  font-weight: 600;
}

.c-pass {
  color: var(--console-add);
}

.c-fail {
  color: var(--console-del);
}

.c-add {
  color: var(--console-add);
}

.c-del {
  color: var(--console-del);
}

.c-mark {
  background: var(--console-mark);
  color: var(--console-mark-ink);
  border-radius: 2px;
}

/* The loop: a real sequence, so it is numbered */

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  counter-increment: step;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.step-head::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 750;
  line-height: 1;
  color: var(--ink-3);
}

.step code.cmd {
  font-size: 0.95rem;
  font-weight: 650;
}

.step p {
  color: var(--ink-2);
}

.outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

/* Chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: nowrap;
}

.chip-pass {
  color: var(--pass);
  background: var(--pass-soft);
  border-color: transparent;
}

.chip-fail {
  color: var(--fail);
  background: var(--fail-soft);
  border-color: transparent;
}

.chip-warn {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: transparent;
}

.chip-mark {
  color: var(--mark-ink);
  background: var(--mark);
  border-color: transparent;
}

/* Guarantees */

.rules {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.rule {
  display: grid;
  gap: 0.4rem 2rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 820px) {
  .rule {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 17rem);
    align-items: baseline;
  }
}

.rule h3 {
  font-size: var(--step-1);
}

.rule p {
  color: var(--ink-2);
}

.rule .proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.refused {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fail);
  text-decoration: line-through;
  text-decoration-color: currentColor;
}

/* Data flow */

.flows {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .flows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.flow {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.flow-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.flow-path span {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.flow-path i {
  font-style: normal;
  color: var(--ink-3);
}

.flow ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  display: grid;
  gap: 0.35rem;
}

/* Pricing */

.plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.plan {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.plan[data-current] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.plan-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan-price small {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
}

.plan dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  align-content: start;
}

.plan dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--rule);
}

.plan dt {
  color: var(--ink-2);
}

.plan dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.plan p {
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sheet);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper);
  white-space: nowrap;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

td.num,
th.num {
  text-align: right;
}

/* FAQ */

.faq {
  display: grid;
  border-top: 1px solid var(--rule);
  max-width: 52rem;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font-weight: 650;
  font-size: var(--step-1);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--ink-3);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details > div {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  color: var(--ink-2);
  max-width: 44rem;
}

/* Closing band */

.band {
  background: var(--console);
  color: var(--console-ink);
}

.band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.band h2 {
  font-size: var(--step-3);
  color: #ffffff;
}

.band p {
  color: var(--console-dim);
}

.band .btn-primary {
  background: var(--mark);
  color: var(--mark-ink);
}

.band .btn-primary:hover {
  background: #ffffff;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem 1.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  }
}

.footer-brand {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.footer-brand p {
  color: var(--ink-2);
  max-width: 24rem;
}

.site-footer nav {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
}

.site-footer nav a {
  text-decoration: none;
  color: var(--ink-2);
}

.site-footer nav a:hover {
  color: var(--ink);
}

.footer-base {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.82rem;
}

/* Plain pages: legal, support, notices */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.page-narrow {
  max-width: 46rem;
}

.page-head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.page-head p.meta {
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* Prose (docs, legal) */

.prose {
  max-width: 46rem;
  min-width: 0;
}

.prose > * + * {
  margin-top: 1.1rem;
}

.prose h1 {
  font-size: var(--step-4);
  margin-top: 0.35rem;
}

.prose h2 {
  font-size: var(--step-3);
  margin-top: 2.75rem;
  padding-top: 0.25rem;
}

.prose h3 {
  font-size: var(--step-1);
  margin-top: 2rem;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.45rem;
}

.prose :not(pre) > code {
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.prose pre,
pre.code {
  position: relative;
  margin-block: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--console);
  color: var(--console-ink);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
}

.prose pre code {
  font: inherit;
}

.prose .table-wrap {
  margin-block: 1.25rem;
}

.prose td code,
.prose th code {
  white-space: nowrap;
}

.prose dl {
  display: grid;
  gap: 0.25rem 1.5rem;
}

.prose dt {
  font-weight: 650;
}

.prose dd {
  margin: 0 0 0.75rem;
  color: var(--ink-2);
}

.callout {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--sheet);
  border: 1px solid var(--rule);
}

.callout::before {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.callout-warn {
  background: var(--warn-soft);
  border-color: transparent;
}

.callout-warn::before {
  color: var(--warn);
}

.callout p {
  color: var(--ink);
}

kbd {
  font-size: 0.82em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--rule-2);
  border-bottom-width: 2px;
  border-radius: 4px;
}

mark {
  background: var(--mark-wash);
  color: inherit;
  padding-inline: 0.15em;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 6px;
  background: var(--console-2);
  color: var(--console-dim);
  font: 600 0.7rem / 1.4 var(--font-mono);
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease;
}

pre:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.install .copy-btn {
  position: static;
  opacity: 1;
  background: var(--paper);
  color: var(--ink-2);
  border-color: var(--rule-2);
}

@media (hover: none) {
  .copy-btn {
    opacity: 1;
  }
}

/* Docs layout */

.docs-layout {
  display: grid;
  gap: 2.5rem;
  padding-block: 2.5rem 4rem;
}

@media (min-width: 980px) {
  .docs-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 4rem;
  }
}

.docs-sidebar {
  display: none;
}

@media (min-width: 980px) {
  .docs-sidebar {
    display: block;
    position: sticky;
    top: calc(84px + env(safe-area-inset-top, 0px));
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .docs-mobile-nav {
    display: none;
  }
}

.docs-nav-section + .docs-nav-section {
  margin-top: 1.5rem;
}

.docs-nav-section h2 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.5rem;
}

.docs-nav-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}

.docs-nav-section a {
  display: block;
  padding: 0.3rem 0.6rem;
  margin-left: -0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.docs-nav-section a:hover {
  color: var(--ink);
  background: var(--sheet);
}

.docs-nav-section a[aria-current="page"] {
  color: var(--ink);
  background: var(--mark-wash);
  font-weight: 600;
}

.docs-mobile-nav {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sheet);
}

.docs-mobile-nav summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.docs-mobile-nav nav {
  padding: 0 1rem 1rem;
}

.docs-content {
  min-width: 0;
}

.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 46rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.docs-pager a {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.docs-pager a:hover {
  border-color: var(--ink);
}

.docs-pager .next {
  text-align: right;
}

.docs-pager small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Sign-in */

.signin {
  display: grid;
  place-items: center;
  padding-block: clamp(3rem, 10vw, 7rem);
}

.signin-card {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.signin-card h1 {
  font-size: var(--step-3);
}

.signin-card p {
  color: var(--ink-2);
}

.signin-card small {
  color: var(--ink-3);
}

.notice {
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.notice-fail {
  background: var(--fail-soft);
  color: var(--fail);
}

.notice-pass {
  background: var(--pass-soft);
  color: var(--pass);
}

/* Dashboard */

.layout-app {
  background: var(--paper);
}

.app-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--sheet);
  border-bottom: 1px solid var(--rule);
}

.app-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  min-height: 60px;
}

.app-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  order: 2;
  overflow-x: auto;
}

.app-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
}

.app-nav a:hover {
  background: var(--paper);
  color: var(--ink);
}

.app-nav a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--mark);
}

.app-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  order: 3;
  font-size: 0.9rem;
}

.avatar {
  border-radius: 50%;
  border: 1px solid var(--rule);
}

.app-docs {
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.app-docs:hover {
  color: var(--ink);
}

.app-login {
  font-weight: 600;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .app-nav {
    order: 4;
    flex-basis: 100%;
    margin-inline: -0.5rem;
    padding-bottom: 0.4rem;
  }

  .app-user {
    margin-left: auto;
  }

  .app-docs {
    color: var(--ink-2);
    font-weight: 600;
    text-decoration: none;
  }

  .app-docs:hover {
    color: var(--ink);
  }

  .app-login {
    display: none;
  }
}

.app-main {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem 3rem;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.app-footer a {
  color: var(--ink-3);
  text-decoration: none;
}

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.app-head h1 {
  font-size: var(--step-4);
}

.app-head p {
  color: var(--ink-2);
}

.panel {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
  padding: 1.35rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.panel > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.panel h2 {
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel p {
  color: var(--ink-2);
}

.panel .table-wrap {
  border: 0;
  border-radius: 0;
  margin-inline: -1.35rem;
}

.panel .table-wrap th:first-child,
.panel .table-wrap td:first-child {
  padding-left: 1.35rem;
}

.panel .table-wrap th:last-child,
.panel .table-wrap td:last-child {
  padding-right: 1.35rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 820px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.grid-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.meter {
  display: grid;
  gap: 0.55rem;
}

.meter-figure {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.meter-figure strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.meter-figure span {
  color: var(--ink-3);
}

.meter-track {
  height: 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: inherit;
  transition: width 400ms ease;
}

.meter[data-level="warn"] .meter-fill {
  background: var(--warn);
}

.meter[data-level="full"] .meter-fill {
  background: var(--fail);
}

.meter small {
  color: var(--ink-3);
}

.kpi {
  display: grid;
  gap: 0.3rem;
  padding: 1.1rem 1.2rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.kpi strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi small {
  color: var(--ink-3);
}

.empty {
  display: grid;
  gap: 0.6rem;
  padding: 1.25rem;
  border: 1px dashed var(--rule-2);
  border-radius: var(--radius);
  color: var(--ink-2);
}

.empty pre {
  margin: 0;
}

.loading {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field small {
  color: var(--ink-3);
}

input[type="text"] {
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

input[type="text"]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
}

.inline-form .field {
  flex: 1 1 14rem;
}

.secret {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--mark-wash);
}

.secret code {
  display: block;
  padding: 0.6rem 0.75rem;
  background: var(--sheet);
  border-radius: 6px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.danger {
  border-color: var(--fail);
}

.danger h2 {
  color: var(--fail);
}

.bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 140px;
  padding-top: 0.5rem;
  border-bottom: 1px solid var(--rule-2);
}

.bars span {
  flex: 1;
  min-width: 4px;
  background: var(--ink-2);
  border-radius: 3px 3px 0 0;
}

.bars span:last-child {
  background: var(--mark);
}

.bars span.zero {
  background: var(--rule-2);
}

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.kv {
  display: grid;
  gap: 0.6rem 2rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  flex: 1;
  min-width: 0;
}

.kv dt {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.kv dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.kpi .chip {
  justify-self: start;
}

.bars-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.muted {
  color: var(--ink-3);
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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