/* Connector Hub website: the one stylesheet.
   It loads nothing: no imports, no font faces, no outside addresses. System fonts only.
   Colour meanings: blue = your knowledge and connections you approved, amber = a key you handed out,
   red dashed = a key you turned off. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;
  accent-color: var(--accent);

  --bg: #f6f7f9;
  --surface: #ffffff;
  --sunken: #eceff3;
  --ink: #15181d;
  --ink-muted: #4b5262;
  --ink-subtle: #5f6675;
  --line: #d8dde5;
  --field: #7a8292;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-tint: #e8effd;
  --on-accent: #ffffff;
  --pc-fill: #f3f7ff;
  --key-ink: #92400e;
  --key-line: #b45309;
  --key-fill: #fcd34d;
  --key-on-fill: #3d2604;
  --key-tint: #fff4d6;
  --stop-ink: #b42318;
  --stop-tint: #fdeceb;
  --ok-ink: #166534;
  --ok-tint: #e3f6e9;
  --test-ink: #5a3fc0;
  --test-tint: #efebfd;
  --plan-ink: #4b5262;
  --focus: #1d4ed8;
  --band-bg: #101828;
  --band-ink: #eef2f8;
  --band-muted: #b8c2d3;
  --band-accent: #8fb3ff;
  --band-line: #3a4a66;

  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 12px 32px -12px rgb(16 24 40 / .18);
  --shadow-lg: 0 2px 4px rgb(16 24 40 / .06), 0 30px 60px -24px rgb(16 24 40 / .32);

  --font-text: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, "Liberation Mono", monospace;

  --fs-h1-home: clamp(2.5rem, 1.7rem + 3.6vw, 4.25rem);
  --fs-h1: clamp(2.125rem, 1.6rem + 2.4vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-short: clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-tiny: 0.875rem;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --pill: 999px;

  --gutter: 16px;
  --gap: 16px;
  --section: clamp(56px, 8vw, 112px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --sunken: #0b0d10;
    --ink: #e6e8ec;
    --ink-muted: #b0b6c2;
    --ink-subtle: #9aa1ae;
    --line: #2a2f38;
    --field: #737b8c;
    --accent: #5b8def;
    --accent-strong: #8db0f5;
    --accent-tint: #172238;
    --on-accent: #0b1020;
    --pc-fill: #121a2b;
    --key-ink: #fbbf24;
    --key-line: #f59e0b;
    --key-fill: #f59e0b;
    --key-on-fill: #2a1a02;
    --key-tint: #2a2110;
    --stop-ink: #ff8a80;
    --stop-tint: #2e1414;
    --ok-ink: #7ee2a1;
    --ok-tint: #10291a;
    --test-ink: #b8a7ff;
    --test-tint: #221d3d;
    --plan-ink: #b0b6c2;
    --focus: #8db0f5;
    --band-bg: #151b28;
    --band-ink: #e6e8ec;
    --band-muted: #aab3c3;
    --band-accent: #8fb3ff;
    --band-line: #3a4558;

    --shadow: none;
    --shadow-lg: none;
  }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --gap: 24px; }
}

@media (min-width: 960px) {
  :root { --gutter: 32px; --gap: 24px; }
}

@media (min-width: 1280px) {
  :root { --gap: 32px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

p,
li,
dd {
  text-wrap: pretty;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

code {
  font-family: var(--font-mono);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

table {
  font-variant-numeric: tabular-nums;
}

section[id],
dt[id] {
  scroll-margin-top: 16px;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 880px;
}

/* ---------- Icons (inline SVG, 24 x 24) ---------- */

.ico {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  top: 8px;
  left: 16px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--s5);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--s4);
  margin: 0 0 0 -4px;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 12px 4px;
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.nav .nav-pill {
  display: none;
}

@media (min-width: 960px) {
  .nav ul {
    column-gap: var(--s5);
  }

  .nav .nav-pill {
    display: block;
  }

  .nav .nav-pill a {
    min-height: 40px;
    padding: 8px 18px;
    border: 1.5px solid var(--field);
    border-radius: var(--pill);
    font-weight: 600;
  }

  .nav .nav-pill a:hover {
    background: var(--surface);
    border-color: var(--ink-muted);
    text-decoration: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

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

.btn--primary:hover {
  background: var(--accent-strong);
}

.btn--secondary {
  background: transparent;
  border-color: var(--field);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--surface);
  border-color: var(--ink-muted);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s6);
}

@media (min-width: 600px) {
  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-text);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  vertical-align: 0.1em;
}

.badge::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge--built {
  background: var(--ok-tint);
  color: var(--ok-ink);
}

.badge--built::before {
  background: currentColor;
}

.badge--test {
  background: var(--test-tint);
  color: var(--test-ink);
}

.badge--test::before {
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.badge--plan {
  border: 1.5px dashed var(--field);
  color: var(--plan-ink);
}

.badge--plan::before {
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.badge--undecided {
  border: 1.5px dotted var(--field);
  color: var(--plan-ink);
}

.badge--undecided::before {
  border: 1.5px dotted currentColor;
}

.badge--demo {
  background: var(--sunken);
  border: 1.5px dashed var(--field);
  color: var(--ink);
}

.badge--demo::before {
  border-radius: 1px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* ---------- Section frame: eyebrow, h2, short answer ---------- */

.section {
  padding-block: var(--section);
}

.section + .section,
.hero + .section {
  padding-top: calc(var(--section) * 0.5);
}

.eyebrow {
  margin-bottom: var(--s3);
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.2em;
}

.eyebrow .badge {
  margin-left: 8px;
}

.short {
  max-width: 46ch;
  margin: var(--s4) 0 var(--s6);
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-size: var(--fs-short);
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 960px) {
  .short {
    margin-bottom: var(--s7);
  }
}

.lead {
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.lead + .lead {
  margin-top: var(--s4);
}

.note {
  max-width: 58ch;
  margin-top: var(--s4);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.status {
  display: flex;
  gap: 10px;
  max-width: 58ch;
  margin-top: var(--s5);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--test-ink) 50%, transparent 50%);
  box-shadow: inset 0 0 0 1.5px var(--test-ink);
}

/* Headings that open a block inside a section */
.sub {
  margin: var(--s7) 0 var(--s4);
}

.sub:first-child {
  margin-top: 0;
}

/* ---------- Cards ---------- */

.card {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3,
.card h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.card p + p {
  margin-top: var(--s3);
}

.card > h3 + p {
  margin-top: var(--s2);
}

.grid-2 {
  display: grid;
  gap: var(--s4);
}

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

/* ---------- Arrow link ---------- */

.more {
  display: inline-block;
  margin-top: var(--s4);
  padding-block: 10px;
  font-weight: 600;
  line-height: 1.45;
}

.more .ico {
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: -2px;
}

.nobr {
  white-space: nowrap;
}

/* ---------- Glyph lists ---------- */

.ticks,
.crosses,
.rings,
.squares,
.dots {
  display: grid;
  gap: var(--s3);
  max-width: 58ch;
  list-style: none;
}

.ticks > li,
.crosses > li,
.rings > li,
.squares > li,
.dots > li {
  position: relative;
  padding-left: 32px;
}

.ticks > li::before,
.crosses > li::before,
.rings > li::before,
.squares > li::before,
.dots > li::before {
  content: "";
  position: absolute;
  left: 0;
}

.ticks > li::before {
  top: 0.32em;
  left: 6px;
  width: 7px;
  height: 13px;
  border: solid var(--accent);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.crosses > li::before {
  top: 0.42em;
  left: 2px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(45deg, transparent calc(50% - 1.25px), var(--ink-muted) calc(50% - 1.25px), var(--ink-muted) calc(50% + 1.25px), transparent calc(50% + 1.25px)),
    linear-gradient(-45deg, transparent calc(50% - 1.25px), var(--ink-muted) calc(50% - 1.25px), var(--ink-muted) calc(50% + 1.25px), transparent calc(50% + 1.25px));
}

.rings > li::before {
  top: 0.4em;
  left: 2px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--field);
  border-radius: 50%;
}

.squares > li::before {
  top: 0.55em;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--ink-muted);
}

.dots > li {
  padding-left: 24px;
}

.dots > li::before {
  top: 0.62em;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--field);
}

/* Two lists side by side */
.pair {
  display: grid;
  gap: var(--s6);
}

.pair h3 {
  margin-bottom: var(--s4);
}

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

/* ---------- Callouts ---------- */

.callout {
  max-width: 880px;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--ink);
}

.callout a {
  color: var(--accent-strong);
}

.callout h2,
.callout h3 {
  margin-bottom: var(--s3);
}

.callout--key {
  border-left-color: var(--key-line);
  background: var(--key-tint);
}

.callout--limit {
  border-left-color: var(--field);
  background: var(--sunken);
}

.callout > p + p {
  margin-top: var(--s3);
}

.callout > p {
  max-width: 58ch;
}

.callout .dots > li::before {
  background: var(--ink-muted);
}

.callout--key .dots > li::before {
  background: var(--key-line);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 6vw, 96px) var(--section);
}

.hero h1 {
  margin-bottom: var(--s5);
}

.hero--home {
  overflow-x: clip;
}

.hero--home h1 {
  font-size: var(--fs-h1-home);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero-grid {
  display: grid;
  gap: var(--s7);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: center;
  }

  .hero-text {
    grid-column: 1 / span 7;
  }

  .hero-tag {
    grid-column: 8 / span 5;
  }
}

/* ---------- Key tag (home hero) ---------- */

.hero-tag {
  position: relative;
  isolation: isolate;
}

.keytag {
  max-width: 30rem;
  margin: 0;
}

@media (min-width: 960px) {
  .keytag {
    max-width: none;
  }
}

.keytag-card {
  position: relative;
  padding: 24px 24px 24px 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* The punched hole */
.keytag-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--line);
}

/* The split key ring through the hole: its left half only */
.keytag-card::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 3px solid var(--key-line);
  border-radius: 50%;
  clip-path: inset(0 50% 0 0);
}

.keytag-label {
  display: inline-block;
  padding: 3px 12px;
  border: 1.5px dashed var(--key-line);
  border-radius: var(--pill);
  background: var(--key-tint);
  color: var(--key-ink);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.3;
}

.keytag-title {
  margin-top: var(--s4);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.keytag-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4) var(--s5);
  margin-top: var(--s4);
}

.keytag-facts dt {
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.keytag-facts dd {
  margin-top: 2px;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.35;
}

.code-strip {
  margin-top: var(--s5);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.keytag figcaption {
  margin-top: var(--s4);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

@media (min-width: 960px) {
  .hero-tag::before {
    content: "";
    position: absolute;
    inset: -18% -14%;
    z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--key-fill) 30%, transparent), transparent);
  }

  .keytag-card {
    transform: rotate(-2deg);
  }

  .keytag figcaption {
    padding-left: 8px;
  }
}

/* ---------- Skim list ---------- */

.skim {
  display: grid;
  gap: var(--s5);
  counter-reset: skim;
  list-style: none;
}

.skim > li {
  position: relative;
  padding-left: 44px;
  counter-increment: skim;
  break-inside: avoid;
}

.skim > li::before {
  content: counter(skim);
  content: counter(skim) / "";
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.skim-q {
  display: inline-block;
  margin-block: -10px;
  padding-block: 10px;
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.skim-q:hover {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
}

.skim p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);
  line-height: 1.55;
}

@media (min-width: 960px) {
  .skim {
    display: block;
    columns: 2;
    column-gap: var(--s8);
  }

  .skim > li {
    display: block;
    margin-bottom: var(--s5);
  }
}

/* ---------- Diagram ---------- */

.fit-frame {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Phones narrower than 390 px: the frame uses half the gutter, so the drawing's text stays at 14 px or more. */
@media (max-width: 389.98px) {
  .fit-frame {
    margin-inline: calc(var(--gutter) * -0.5);
    padding: 8px;
    border-radius: var(--r-lg);
  }
}

@media (min-width: 600px) {
  .fit-frame {
    padding: 24px;
  }
}

@media (min-width: 1120px) {
  .fit-frame {
    padding: 32px;
  }
}

.fit {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  font-family: inherit;
  overflow: visible;
}

.fit--tall {
  max-width: 440px;
}

.fit--wide {
  display: none;
  max-width: 960px;
}

@media (min-width: 1120px) {
  .fit--wide {
    display: block;
  }

  .fit--tall {
    display: none;
  }
}

.d-chip,
.d-mem,
.d-app {
  fill: var(--surface);
  stroke: var(--field);
  stroke-width: 1.5;
}

.d-pc {
  fill: var(--pc-fill);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.d-mem--shared {
  fill: var(--accent-tint);
  stroke: var(--accent);
  stroke-width: 2;
}

.d-mem--private {
  fill: var(--sunken);
  stroke: var(--field);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.d-app--key {
  stroke: var(--key-line);
  stroke-width: 2;
}

.d-app--off {
  fill: var(--sunken);
  stroke: var(--stop-ink);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.d-link,
.d-flow-out,
.d-link--key,
.d-flow-out--key,
.d-link--off,
.d-flow-off,
.d-flow-in {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-link,
.d-flow-out {
  stroke: var(--accent);
}

.d-link--key,
.d-flow-out--key {
  stroke: var(--key-line);
}

.d-link,
.d-link--key {
  stroke-width: 2.5;
}

.d-flow-out,
.d-flow-out--key {
  stroke-width: 3;
}

.d-link--off,
.d-flow-off {
  stroke: var(--stop-ink);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  stroke-linecap: butt;
}

.d-flow-in {
  stroke: var(--ink-subtle);
  stroke-width: 1.5;
}

.d-head {
  fill: var(--accent);
}

.d-head--key {
  fill: var(--key-line);
}

.d-head--muted {
  fill: var(--ink-subtle);
}

.d-gate {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 3;
}

.d-gate--key {
  fill: var(--key-fill);
  stroke: var(--key-line);
  stroke-width: 2.5;
}

.d-gate--off {
  fill: var(--stop-tint);
  stroke: var(--stop-ink);
  stroke-width: 2;
}

.d-glyph,
.d-glyph--key,
.d-glyph--off {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-glyph {
  stroke: var(--on-accent);
}

.d-glyph--key {
  stroke: var(--key-on-fill);
}

.d-glyph--off {
  stroke: var(--stop-ink);
}

.d-dot {
  fill: var(--accent);
}

.fit text {
  fill: currentColor;
}

.d-zone {
  color: var(--ink-subtle);
  fill: currentColor;
  font-weight: 650;
}

.d-label,
.d-title,
.d-mem-name,
.d-app-title,
.d-strong {
  color: var(--ink);
  fill: currentColor;
}

.d-title {
  font-weight: 700;
}

.d-mem-name,
.d-app-title,
.d-strong {
  font-weight: 650;
}

.d-meta,
.d-mem-meta,
.d-note,
.d-body,
.d-app-title--muted {
  color: var(--ink-muted);
  fill: currentColor;
}

.d-accent {
  color: var(--accent-strong);
  fill: currentColor;
}

.d-key {
  color: var(--key-ink);
  fill: currentColor;
  font-weight: 650;
}

.d-stop {
  color: var(--stop-ink);
  fill: currentColor;
  font-weight: 650;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.4;
  list-style: none;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legend svg {
  display: block;
  flex: none;
  width: 32px;
  height: 12px;
  overflow: visible;
}

/* ---------- Your knowledge ---------- */

.terms {
  display: grid;
  gap: var(--s4);
}

@media (min-width: 600px) {
  .terms {
    gap: var(--s5);
  }
}

@media (min-width: 960px) {
  .terms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }
}

.terms dt {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.terms dd {
  margin-top: var(--s2);
  color: var(--ink-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--s3);
  list-style: none;
}

.chips li {
  padding: 6px 14px;
  border: 1px solid var(--field);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.3;
}

.ask {
  display: grid;
  gap: var(--s6);
  margin-top: var(--s7);
}

.ask-cards {
  display: grid;
  gap: var(--s4);
}

.ask-cards h4 {
  margin-bottom: var(--s2);
}

.ask-cards p {
  color: var(--ink-muted);
}

@media (min-width: 600px) {
  .ask-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
  }
}

@media (min-width: 960px) {
  .ask {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--gap);
    align-items: start;
  }

  .ask-cards {
    grid-template-columns: 1fr;
  }
}

/* Example answer mock */
.mock-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mock-bar {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--line);
  background: var(--sunken);
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 600;
  line-height: 1.2;
}

.mock-body {
  display: grid;
  gap: var(--s4);
  padding: var(--s5);
}

.mock-q {
  justify-self: end;
  max-width: 88%;
  padding: 10px 16px;
  border-radius: 16px 16px 4px 16px;
  background: var(--sunken);
  color: var(--ink);
}

.mock-a {
  color: var(--ink);
}

.cite {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 2px 0 4px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: var(--fs-tiny);
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.15em;
}

.mock-files {
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

.mock-files-label {
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.3;
}

.mock-files ol {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s2);
  list-style: none;
}

.mock-files li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.mock-files .ico {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent-strong);
}

.mock figcaption {
  margin-top: var(--s3);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

/* ---------- Data band ---------- */

.band {
  padding-block: var(--section);
  background: var(--band-bg);
  color: var(--band-ink);
}

.band h2,
.band h3 {
  color: var(--band-ink);
}

.band .eyebrow {
  color: var(--band-muted);
}

.band .eyebrow::before {
  background: var(--band-accent);
}

.band .short {
  border-left-color: var(--band-accent);
  color: var(--band-ink);
}

.band a {
  color: var(--band-accent);
}

.band :focus-visible {
  outline-color: var(--band-accent);
}

.band-grid {
  display: grid;
  gap: var(--s4);
}

@media (min-width: 600px) {
  .band-grid {
    gap: var(--s5);
  }
}

@media (min-width: 960px) {
  .band-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
    gap: var(--gap);
  }
}

.band-card {
  display: flex;
  flex-direction: column;
  padding: var(--s5);
  border: 1px solid var(--band-line);
  border-radius: var(--r-lg);
}

.band-card h3 {
  margin-bottom: var(--s4);
}

.band-card ul {
  display: grid;
  gap: var(--s3);
  list-style: none;
}

.band-card li {
  position: relative;
  padding-left: 22px;
  color: var(--band-ink);
  font-size: 1rem;
  line-height: 1.55;
}

.band-card li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--band-accent);
}

.band-nothing {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.band-card p + p {
  margin-top: var(--s3);
}

.band-card .more {
  align-self: flex-start;
  margin-top: auto;
}

.band-card p + .more {
  margin-top: auto;
  padding-top: var(--s5);
}

/* ---------- Access keys ---------- */

.props {
  display: grid;
  gap: var(--s5);
}

@media (min-width: 600px) {
  .props {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s6) var(--s5);
  }
}

@media (min-width: 1280px) {
  .props {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
}

.props > div {
  padding-top: var(--s4);
  border-top: 2px solid var(--line);
}

.props dt {
  display: grid;
  gap: var(--s3);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.props dt .ico {
  color: var(--key-ink);
}

.props dd {
  margin-top: var(--s2);
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.keys-note {
  margin-top: var(--s7);
}

/* ---------- Demo ---------- */

.dk {
  margin-top: 0;
  padding: var(--s3);
  border: 1.5px dashed var(--field);
  border-radius: var(--r-xl);
}

/* Narrow phones: slightly smaller step pills, so the five steps take three rows, not four. */
@media (max-width: 599.98px) {
  .dk-steps label {
    font-size: var(--fs-tiny);
  }
}

@media (min-width: 600px) {
  .dk {
    padding: var(--s5);
  }
}

@media (min-width: 960px) {
  .dk {
    padding: var(--s6);
  }
}

.dk-intro {
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.dk-table {
  margin-top: var(--s5);
}

.dk-steps {
  min-width: 0;
  margin: var(--s5) 0 0;
  padding: 0;
  border: 0;
}

.dk-steps legend,
.dk-group legend {
  padding: 0;
}

.dk-steps legend {
  margin-bottom: var(--s3);
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dk-steps label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0 2px 8px 0;
  padding: 6px 12px 6px 9px;
  border: 1.5px solid var(--field);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
}

.dk-steps label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 0.5px var(--accent);
  color: var(--accent-strong);
  font-weight: 650;
}

.dk input {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.dk input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.dk label:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* The live region, right under the step buttons: the script writes one sentence there after each change, so on
   phones, where both screens are far below, the change is seen at once. Empty (no script, or before the first
   change), it takes no space. Never display: none, so it is a live region from the start. */
.dk-say {
  margin-top: var(--s3);
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.dk-say:empty {
  padding: 0;
  margin: 0;
}

.dk-screens {
  display: grid;
  gap: var(--s5);
  margin-top: var(--s4);
}

@media (min-width: 960px) {
  .dk-screens {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    align-items: start;
  }

  /* Their screen is short: it stays in view while you work through your screen. */
  .dk-them {
    position: sticky;
    top: 16px;
  }
}

.dk-screen h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s3);
  font-size: 1.0625rem;
}

.dk-screen h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dk-you h3::before {
  background: var(--accent);
}

.dk-them h3::before {
  border: 2px solid var(--field);
}

.dk-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dk-bar {
  padding: 8px var(--s4);
  border-bottom: 1px solid var(--line);
  background: var(--sunken);
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 600;
  line-height: 1.4;
}

.dk-body {
  display: grid;
  gap: var(--s4);
  padding: var(--s4);
}

@media (min-width: 600px) {
  .dk-body {
    padding: var(--s5);
  }
}

.dk-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dk-group legend {
  margin-bottom: var(--s2);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}

.dk-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.3;
  cursor: pointer;
}

.dk-group label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-strong);
}

.dk-hint {
  flex-basis: 100%;
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.45;
}

.dk-out {
  display: grid;
  gap: var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

.dk-at > * + * {
  margin-top: var(--s3);
}

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

.dk-banner {
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--ink);
}

.dk-banner--off {
  border-left: 4px dashed var(--stop-ink);
  background: var(--stop-tint);
}

.dk-key {
  padding: 12px 14px;
  border: 1.5px dashed var(--key-line);
  border-radius: var(--r-md);
  background: var(--key-tint);
}

.dk-key-tag {
  color: var(--key-ink);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.3;
}

.dk-key-text {
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.dk-mockbtns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.dk-mockbtns li {
  padding: 4px 12px;
  border: 1.5px dashed var(--field);
  border-radius: var(--pill);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.4;
  cursor: default;
}

.dk-note,
.dk-caption,
.dk-small {
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.dk-notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--key-line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.dk-notice-label {
  margin-bottom: 4px;
  color: var(--key-ink);
  font-size: var(--fs-tiny);
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dk-pill {
  display: inline-flex;
  align-items: center;
  margin: 2px 0;
  padding: 2px 10px;
  border-radius: var(--pill);
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
  vertical-align: 0.05em;
}

.dk-conn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.dk-summary {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

/* On phones a value that does not fit beside its label moves under it; from 600 px, two columns. */
.dk-summary > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding: 6px 0;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.dk-summary dt {
  flex: 0 0 8.5rem;
}

.dk-summary dd {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 600px) {
  .dk-summary > div {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 12px;
  }
}

.dk-summary > div + div {
  border-top: 1px solid var(--line);
}

.dk-summary dt {
  color: var(--ink-subtle);
  font-weight: 650;
}

.dk-summary dd {
  color: var(--ink);
}

.dk-revoked {
  align-items: center;
  gap: 6px;
  color: var(--stop-ink);
  font-weight: 650;
}

.dk-revoked .ico {
  width: 16px;
  height: 16px;
}

.dk-list-label {
  font-weight: 650;
}

.dk-list {
  display: grid;
  gap: 6px;
  list-style: none;
}

.dk-list li {
  padding: 8px 12px 8px 14px;
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-tint);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
}

.dk-connected {
  color: var(--ink);
  font-weight: 600;
}

.dk-none,
.dk-none-them {
  padding: 10px 14px;
  border: 1.5px dashed var(--field);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.dk-off {
  display: grid;
  gap: var(--s2);
  padding: 14px 16px;
  border-left: 4px dashed var(--stop-ink);
  border-radius: var(--r-md);
  background: var(--stop-tint);
  color: var(--ink);
}

/* Demo states (spec 4.4). Most state rules have the specificity of their target class, so the order below
   decides: hidden by default, shown for its step, then the "no Memory ticked" and revoked overrides. The few
   that hide by child or by group (:not(), :has(#id)) are more specific and win wherever they sit. */

@supports selector(:has(*)) {
  .dk-live[hidden] {
    display: block;
  }

  .dk-table {
    display: none;
  }
}

.dk-at,
.dk-only-2,
.dk-only-3,
.dk-pick,
.dk-whoc,
.dk-poss,
.dk-end,
.dk-none,
.dk-none-them,
.dk-revoked,
.dk-conn-1 {
  display: none;
}

:where(.dk-live:has(#dk-s0:checked)) .dk-at-0,
:where(.dk-live:has(#dk-s1:checked)) .dk-at-1,
:where(.dk-live:has(#dk-s2:checked)) :is(.dk-at-2, .dk-only-2),
:where(.dk-live:has(#dk-s3:checked)) :is(.dk-at-3, .dk-only-3),
:where(.dk-live:has(#dk-s4:checked)) .dk-at-4 {
  display: revert;
}

:where(.dk-live:has(#dk-m1:checked)) li.dk-pick-m1,
:where(.dk-live:has(#dk-m2:checked)) li.dk-pick-m2,
:where(.dk-live:has(#dk-m3:checked)) li.dk-pick-m3,
:where(.dk-live:has(#dk-m4:checked)) li.dk-pick-m4 {
  display: list-item;
}

:where(.dk-live:has(#dk-m1:checked)) span.dk-pick-m1,
:where(.dk-live:has(#dk-m2:checked)) span.dk-pick-m2,
:where(.dk-live:has(#dk-m3:checked)) span.dk-pick-m3,
:where(.dk-live:has(#dk-m4:checked)) span.dk-pick-m4 {
  display: inline;
}

:where(.dk-live:has(#dk-w1:checked)) :is(.dk-whoc-1, .dk-poss-1),
:where(.dk-live:has(#dk-w2:checked)) :is(.dk-whoc-2, .dk-poss-2),
:where(.dk-live:has(#dk-w3:checked)) :is(.dk-whoc-3, .dk-poss-3),
:where(.dk-live:has(#dk-e1:checked)) .dk-end-1,
:where(.dk-live:has(#dk-e2:checked)) .dk-end-2,
:where(.dk-live:has(#dk-e3:checked)) .dk-end-3 {
  display: inline;
}

/* No Memory ticked: the two "tick a Memory" lines show, and in steps 1 to 3 no key is shown at all. */
:where(.dk-live:not(:has(.dk-mem:checked))) :is(.dk-none, .dk-none-them) {
  display: block;
}

:where(.dk-live:not(:has(.dk-mem:checked, #dk-s4:checked))) :is(.dk-at-1, .dk-at-2, .dk-at-3) > :not(.dk-none-them),
:where(.dk-live:not(:has(.dk-mem:checked, #dk-s4:checked))) .dk-summary {
  display: none;
}

/* Revoked (step 4) */
:where(.dk-live:has(#dk-s4:checked)) .dk-none,
:where(.dk-live:has(#dk-s4:checked)) .dk-active,
:where(.dk-live:has(#dk-s2:checked, #dk-s3:checked)) .dk-conn-0 {
  display: none;
}

:where(.dk-live:has(#dk-s4:checked)) .dk-revoked {
  display: inline-flex;
}

:where(.dk-live:has(#dk-s2:checked, #dk-s3:checked)) .dk-conn-1 {
  display: inline;
}

:where(.dk-live:has(#dk-s4:checked)) .dk-summary {
  border-left: 4px dashed var(--stop-ink);
}

/* A revoked key can't be edited: in step 4 the choices hide, and the summary keeps what the key opened. */
:where(.dk-live:has(#dk-s4:checked)) .dk-group {
  display: none;
}

:where(.dk-live:has(#dk-s4:checked)) .dk-out {
  padding-top: 0;
  border-top: 0;
}

/* Who and When are chosen at Start. From step 1 the summary shows them and only "Which Memories?" stays, so each
   step's result sits close to the step buttons on phones, and a past notice can't be renamed. */
:where(.dk-live:not(:has(#dk-s0:checked))) .dk-group:has(#dk-w1, #dk-e1) {
  display: none;
}

/* After the demo */
.dk-after {
  margin-top: var(--s7);
}

/* ---------- Your own AI app ---------- */

.ways {
  display: grid;
  gap: var(--s4);
}

@media (min-width: 600px) {
  .ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
  }
}

.ways dt {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.ways dd {
  margin-top: var(--s2);
  color: var(--ink-muted);
}

.ways .card--muted {
  background: var(--sunken);
  box-shadow: none;
}

.ways .card--muted dt,
.ways .card--muted dd {
  color: var(--ink-muted);
}

/* ---------- What you'll need ---------- */

.needs {
  display: grid;
  gap: var(--s5);
  list-style: none;
}

@media (min-width: 960px) {
  .needs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s6) var(--gap);
  }
}

.needs > li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
}

.needs .ico {
  margin-top: 1px;
  color: var(--accent);
}

.needs-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.needs-title strong {
  font-weight: 650;
}

.needs p:not(.needs-title) {
  color: var(--ink-muted);
}

.needs .more {
  margin-top: var(--s2);
}

.setup {
  max-width: 880px;
  margin-top: var(--s7);
  padding: var(--s5);
  border: 1.5px dashed var(--field);
  border-radius: var(--r-lg);
}

.setup h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: var(--s2);
}

.setup p {
  max-width: 58ch;
  color: var(--ink-muted);
}

/* ---------- Where things stand ---------- */

.board {
  display: grid;
  gap: var(--s4);
}

@media (min-width: 600px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
  }
}

@media (min-width: 1280px) {
  .board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
}

.board h3 {
  margin-bottom: var(--s4);
  line-height: 1;
}

.board h3 .badge {
  font-size: 1rem;
  padding: 5px 12px;
}

.board ul {
  display: grid;
  gap: var(--s3);
  list-style: none;
}

.board li {
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);
  line-height: 1.5;
}

.board li:first-child {
  padding-top: 0;
  border-top: 0;
}

.status-lists {
  margin-top: var(--s7);
}

/* ---------- FAQ ---------- */

.qa {
  border-bottom: 1px solid var(--line);
}

.qa details {
  border-top: 1px solid var(--line);
}

.qa summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 44px 14px 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

.qa summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background:
    linear-gradient(currentColor, currentColor) center / 16px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 16px no-repeat;
}

.qa details[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 16px 2px no-repeat;
}

.qa summary:hover {
  color: var(--accent-strong);
}

.qa-a {
  max-width: 58ch;
  padding-bottom: 18px;
  color: var(--ink-muted);
  font-size: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);
  line-height: 1.6;
}

.qa-a p + p {
  margin-top: var(--s3);
}

.qa--single {
  max-width: 880px;
  margin-top: var(--s5);
}

/* ---------- Glossary ---------- */

.words {
  display: grid;
}

@media (min-width: 960px) {
  .words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s7);
  }
}

.words > div {
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}

.words dt {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
}

.words dd {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.words dt:target,
.words dt:target + dd {
  background: var(--accent-tint);
  box-shadow: -10px 0 0 var(--accent-tint), 10px 0 0 var(--accent-tint);
}

.words dt:target {
  border-radius: 6px 6px 0 0;
}

.words dt:target + dd {
  margin-top: 0;
  padding: 4px 0 6px;
  border-radius: 0 0 6px 6px;
}

/* ---------- Inner pages ---------- */

.toc {
  margin-top: var(--s6);
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.page .section + .section > .wrap {
  position: relative;
}

.page .section + .section > .wrap::before {
  content: "";
  position: absolute;
  top: calc(var(--section) * -0.75);
  right: var(--gutter);
  left: var(--gutter);
  height: 1px;
  background: var(--line);
}

.prose > h2 {
  max-width: 32ch;
}

.prose > p,
.prose > ul,
.prose > ol {
  max-width: 58ch;
}

.prose > * + * {
  margin-top: var(--s4);
}

.prose > h2 + * {
  margin-top: var(--s5);
}

.prose > * + h3,
.prose > * + .pair,
.prose > * + .callout,
.prose > * + .qa--single,
.prose > * + .cards,
.prose > * + .grid-2,
.prose > * + .keyfig,
.prose > * + .table {
  margin-top: var(--s6);
}

.prose > h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.prose > h3 + * {
  margin-top: var(--s3);
}

.prose > p > .badge:first-child {
  margin-right: 6px;
}

.back {
  padding-bottom: var(--s8);
}

.back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Steps */
.steps {
  display: grid;
  max-width: 58ch;
  counter-reset: step;
  list-style: none;
}

.steps > li {
  position: relative;
  min-height: 48px;
  padding: 3px 0 var(--s5) 52px;
  counter-increment: step;
}

.steps > li:last-child {
  padding-bottom: 0;
}

.steps > li::before {
  content: counter(step);
  content: counter(step) / "";
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.steps > li::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 6px;
  left: 15px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.steps > li:last-child::after {
  display: none;
}

/* Key figure (/sharing) */
.keyfig {
  max-width: 100%;
  margin-top: var(--s4);
}

.keyfig-strip {
  padding: 16px;
  border: 2px dashed var(--key-line);
  border-radius: var(--r-md);
  background: var(--key-tint);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.keyfig-pre {
  color: var(--key-ink);
  font-weight: 700;
}

.keyfig-marks {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s3);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.keyfig-marks p {
  position: relative;
  padding-left: 16px;
}

.keyfig-marks p::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 4px;
  width: 1px;
  height: calc(0.7em + 6px);
  background: var(--field);
}

.keyfig-marks p::after {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 4px;
  width: 8px;
  height: 1px;
  background: var(--field);
}

.keyfig figcaption {
  margin-top: var(--s3);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

@media (min-width: 720px) {
  .keyfig {
    width: max-content;
    max-width: 100%;
  }

  .keyfig-strip {
    white-space: nowrap;
  }

  /* The marks row uses the strip's font, so ch and em here match the strip's characters:
     18 px of padding and border, then 2.5 characters to the middle of hcak_, 29.5 to the middle of the groups. */
  .keyfig-marks {
    position: relative;
    display: block;
    height: 56px;
    margin-top: 0;
    font-family: var(--font-mono);
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    letter-spacing: 0.02em;
  }

  .keyfig-marks p {
    position: absolute;
    top: 0;
    padding: 0;
  }

  .keyfig-marks .mark-pre {
    left: calc(18px + 2.5 * (1ch + 0.02em));
  }

  .keyfig-marks .mark-groups {
    left: calc(18px + 29.5 * (1ch + 0.02em));
  }

  .keyfig-marks p::before {
    top: 0;
    left: 0;
    height: 30px;
  }

  .keyfig-marks p::after {
    top: 29px;
    left: 0;
    width: 8px;
  }

  .keyfig-marks span {
    display: block;
    padding: 18px 0 0 14px;
    font-family: var(--font-text);
    font-size: var(--fs-small);
    letter-spacing: 0;
    white-space: nowrap;
  }
}

/* Definition list (/sharing, change your mind) */
.prose > .deflist {
  max-width: 880px;
}

.deflist > div {
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}

.deflist > div:last-child {
  border-bottom: 1px solid var(--line);
}

.deflist dt {
  font-weight: 650;
}

.deflist dd {
  max-width: 58ch;
  margin-top: 4px;
  color: var(--ink-muted);
}

@media (min-width: 960px) {
  .deflist > div {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--s5);
  }

  .deflist dd {
    margin-top: 0;
  }
}

/* Cards grid (/your-data, protection) */
.cards {
  display: grid;
  gap: var(--s4);
}

@media (min-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s5);
  }

  .cards > :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }
}

.cards h3 {
  margin-bottom: var(--s3);
  font-size: 1.125rem;
}

.cards p {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.cards .card--lead p {
  max-width: 58ch;
}

@media (min-width: 960px) {
  .cards .card--lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--gap);
    align-items: start;
  }

  .cards .card--lead > h3 + p {
    margin-top: 0;
  }
}

.cards .card--lead {
  border-left: 4px solid var(--field);
}

/* ---------- Tables (stacked cards below 720 px) ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
}

/* Two-column tables stop at 50rem, so their long column stays near 75 characters a line on wide screens. */
.prose > .table--two {
  max-width: 50rem;
}

.table caption {
  padding-bottom: var(--s3);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
}

.table,
.table tbody,
.table tr,
.table th,
.table td {
  display: block;
}

.table caption {
  display: block;
}

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

.table tbody tr {
  margin-top: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.table tbody tr:first-child {
  margin-top: 0;
}

.table tbody th {
  margin-bottom: var(--s2);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
}

.table td {
  padding: var(--s2) 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.table td::before {
  content: attr(data-label);
  content: attr(data-label) / "";
  display: block;
  margin-bottom: 2px;
  color: var(--ink-subtle);
  font-size: var(--fs-tiny);
  font-weight: 650;
  line-height: 1.4;
}

.table td:last-child {
  padding-bottom: 0;
}

.table .badge {
  margin-left: 2px;
}

@media (min-width: 720px) {
  .table {
    display: table;
    border-collapse: separate;
    border-spacing: 0;
  }

  .table caption {
    display: table-caption;
  }

  .table thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }

  .table tbody {
    display: table-row-group;
  }

  .table tr,
  .table tbody tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  .table th,
  .table td,
  .table tbody th {
    display: table-cell;
    margin: 0;
    padding: 12px 14px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    font-size: var(--fs-small);
    line-height: 1.55;
    text-align: left;
    vertical-align: top;
  }

  .table td::before {
    content: none;
  }

  .table td:last-child {
    padding-bottom: 12px;
  }

  .table tr > :first-child {
    border-left: 1px solid var(--line);
  }

  .table tr > :last-child {
    border-right: 1px solid var(--line);
  }

  .table thead th,
  .table thead td {
    border-top: 1px solid var(--line);
    background: var(--sunken);
    color: var(--ink);
    font-weight: 650;
  }

  .table tbody th {
    color: var(--ink);
    font-weight: 650;
  }

  .table thead tr > :first-child {
    border-top-left-radius: var(--r-lg);
  }

  .table thead tr > :last-child {
    border-top-right-radius: var(--r-lg);
  }

  .table tbody tr:last-child > :first-child {
    border-bottom-left-radius: var(--r-lg);
  }

  .table tbody tr:last-child > :last-child {
    border-bottom-right-radius: var(--r-lg);
  }

  .table--ways th[scope="row"] {
    width: 13%;
  }

  .table--ways td:last-child {
    background: var(--sunken);
    color: var(--ink-muted);
  }

  .table--two th[scope="row"] {
    width: 34%;
  }

  .table--leaves th[scope="row"] {
    width: 24%;
  }

  .table--leaves td:nth-of-type(1) {
    width: 34%;
  }
}

/* ---------- 404 ---------- */

.hero--404 {
  padding-block: clamp(56px, 10vw, 144px);
}

.links-404 {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-top: var(--s5);
  list-style: none;
}

.links-404 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: var(--s8) var(--s7);
  border-top: 1px solid var(--line);
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  line-height: 1.55;
}

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

.footer-grid {
  display: grid;
  gap: var(--s6);
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: var(--gap);
  }
}

.foot-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s3);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
}

.site-footer nav ul {
  display: grid;
  list-style: none;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.foot-small p + p {
  margin-top: var(--s3);
}

/* ---------- Motion (only when the visitor has not asked for less) ---------- */

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .btn,
  .qa summary,
  .toc a,
  .dk label {
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, text-decoration-color 120ms ease;
  }

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

  .qa details[open] > .qa-a {
    animation: fade-in 150ms ease-out;
  }

  .dk-at {
    animation: fade-in 160ms ease-out;
  }
}

/* ---------- Print ---------- */

@media print {
  .skip,
  .nav,
  .toc {
    display: none;
  }

  .dk-live[hidden] {
    display: none;
  }

  .dk-table {
    display: block;
  }

  .band {
    background: none;
    color: inherit;
  }
}
