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

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

@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/public-sans-latin-italic.woff2") format("woff2");
}

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

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --surface-primary: #0b1220;
  --surface-secondary: #111827;
  --surface-header: rgba(11, 18, 32, 0.96);
  --surface-overlay: rgba(11, 18, 32, 0.72);
  --text-primary: #ffffff;
  --text-body: rgba(255, 255, 255, 0.78);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: #aab4c3;
  --border-default: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --accent-primary: #60a5fa;
  --accent-soft: #93c5fd;
  --accent-surface: rgba(37, 99, 235, 0.14);
  --selection-surface: rgba(96, 165, 250, 0.12);
  --accent-border: rgba(96, 165, 250, 0.35);
  --progress: #f9423a;
  --focus-ring: #93c5fd;
  --reader-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.5), 0 4px 8px -4px rgba(0, 0, 0, 0.4);
  --code-surface: #0b1220;
  --code-toolbar: rgba(255, 255, 255, 0.03);
  --code-border: #aab4c3;
  --code-text: rgba(255, 255, 255, 0.82);
  --code-muted: #9ca3af;
  --code-keyword: #93c5fd;
  --code-value: #60a5fa;
  --diagram-surface: #111827;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --page-gutter: clamp(var(--space-5), 5vw, var(--space-12));
  --page-width: 71.25rem;
  --reading-width: 46rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --surface-primary: #f4f5f7;
  --surface-secondary: #ffffff;
  --surface-header: rgba(244, 245, 247, 0.95);
  --surface-overlay: rgba(17, 24, 39, 0.42);
  --text-primary: #111827;
  --text-body: rgba(17, 24, 39, 0.84);
  --text-secondary: rgba(17, 24, 39, 0.66);
  --text-tertiary: #4b5563;
  --border-default: rgba(17, 24, 39, 0.16);
  --border-subtle: rgba(17, 24, 39, 0.09);
  --accent-primary: #1d4ed8;
  --accent-soft: #2563eb;
  --accent-surface: rgba(37, 99, 235, 0.14);
  --selection-surface: rgba(37, 99, 235, 0.1);
  --accent-border: rgba(37, 99, 235, 0.4);
  --focus-ring: #1d4ed8;
  --reader-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.5), 0 4px 8px -4px rgba(0, 0, 0, 0.4);
  --code-surface: #ffffff;
  --code-toolbar: #f4f5f7;
  --code-border: #4b5563;
  --code-text: #111827;
  --code-muted: #4b5563;
  --code-keyword: #1d4ed8;
  --code-value: #0f766e;
  --diagram-surface: #ffffff;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--surface-primary);
  color: var(--text-body);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 150ms ease, color 150ms ease;
}

body.reader-open {
  overflow: hidden;
}

a {
  color: var(--accent-primary);
  text-decoration-color: color-mix(in srgb, var(--accent-primary) 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-soft);
  text-decoration-color: var(--accent-soft);
}

p {
  text-wrap: pretty;
}

::selection {
  background: #2563eb;
  color: #fff;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 200;
  padding: var(--space-2) var(--space-4);
  border-radius: 0.375rem;
  background: var(--surface-secondary);
  color: var(--text-primary);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-header);
}

.reading-progress {
  position: relative;
  height: 2px;
  overflow: hidden;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--progress);
  transform: scaleX(0);
  transform-origin: left;
}

.header-inner,
.section-shell,
.footer-inner {
  width: auto;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.header-inner {
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand-link,
.site-nav a,
.theme-toggle,
.section-eyebrow,
.reader-meta,
.back-link,
.footer-brand,
.contact-links,
.case-card-number,
.case-card-topics,
.case-card-action,
.topic-filters button,
.grid-toggle,
.beat-nav,
.arc-links,
.arc-number,
.reader-navigation,
.case-detail-footer {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.brand-link {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.625rem;
}

.site-nav a,
.theme-toggle {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  transition: color 130ms ease-out;
}

.site-nav a:hover,
.theme-toggle:hover {
  color: var(--text-primary);
}

.theme-toggle {
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.3125rem 0.75rem;
  background: transparent;
  cursor: pointer;
}

.section-shell {
  padding-block: clamp(4rem, 9vw, 6.875rem);
}

.section-block {
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: 4rem;
}

.hero {
  padding-block: clamp(4.5rem, 12vh, 8.75rem) clamp(4rem, 10vh, 7.5rem);
  scroll-margin-top: 4.5rem;
}

.section-eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .section-eyebrow {
  margin-bottom: var(--space-6);
  color: var(--accent-soft);
  font-weight: 500;
  letter-spacing: 0.18em;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.hero-cursor {
  width: 0.1em;
  height: 0.78em;
  display: inline-block;
  margin-left: 0.12em;
  background: var(--progress);
  transform: translateY(0.06em);
  animation: cursor-blink 1.1s steps(1) infinite;
}

.section-shell > h2 {
  max-width: 24ch;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-copy {
  max-width: 62ch;
  margin-top: var(--space-10);
  color: color-mix(in srgb, var(--text-primary) 75%, transparent);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.7;
}

.hero-copy p,
.section-intro p,
.arc-copy p,
.principle p {
  margin: 0;
}

.hero-copy strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.125rem;
  margin-top: 1.75rem;
}

.primary-link {
  border: 1px solid color-mix(in srgb, var(--accent-primary) 50%, transparent);
  border-radius: 999px;
  padding: 0.5625rem 1.25rem;
  background: transparent;
  color: var(--accent-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.secondary-link {
  color: color-mix(in srgb, var(--text-primary) 55%, transparent);
  text-decoration: none;
}

.primary-link,
.secondary-link {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  transition: color 130ms ease-out, border-color 130ms ease-out;
}

.primary-link {
  font-size: 0.78125rem;
  font-weight: 500;
}

.primary-link:hover,
.secondary-link:hover {
  color: var(--text-primary);
}

.section-intro {
  max-width: 58ch;
  margin-top: var(--space-6);
  color: var(--text-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.section-intro p + p {
  margin-top: var(--space-4);
}

.arc-list {
  max-width: 55rem;
  margin-top: var(--space-16);
}

.arc-step {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0 clamp(1rem, 3vw, 1.75rem);
  padding-bottom: var(--space-12);
}

.arc-step::before {
  content: "";
  position: absolute;
  top: 2.875rem;
  bottom: 0;
  left: 1.1875rem;
  width: 1px;
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
}

.arc-step:last-child {
  padding-bottom: 0;
}

.arc-step:last-child::before {
  display: none;
}

.arc-number {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 0.375rem;
  background: var(--surface-secondary);
  color: var(--accent-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.arc-copy {
  max-width: 62ch;
  margin-top: 0.125rem;
  color: var(--text-body);
  font-size: 1.03125rem;
  line-height: 1.65;
}

.arc-copy strong {
  color: var(--text-primary);
  font-weight: 600;
}

.arc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: var(--space-4);
}

.arc-links a,
.topic-list span {
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  color: var(--text-secondary);
  font-size: 0.71875rem;
  line-height: 1.4;
  text-decoration: none;
}

.arc-links a:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.arc-arrow {
  position: absolute;
  bottom: 0.75rem;
  left: 1.21875rem;
  z-index: 1;
  padding: 0.1875rem 0.125rem;
  background: var(--surface-primary);
  color: var(--accent-primary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1;
  transform: translateX(-50%);
}

.spotlight {
  max-width: 50rem;
  margin: 4.5rem 0 0;
  scroll-margin-top: 6rem;
}

.spotlight-header {
  margin-bottom: 0;
}

.spotlight-header h3,
.reader-title {
  max-width: 24ch;
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.spotlight-header h3 em {
  color: var(--accent-soft);
}

.reader-meta {
  margin: 0 0 var(--space-5);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.topic-list span {
  font-size: 0.71875rem;
}

.topic-list .topic-featured {
  border-color: var(--accent-border);
  color: var(--accent-soft);
}

.beat-nav {
  position: sticky;
  top: 4.5rem;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: var(--space-10);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--border-subtle);
}

.beat-nav a {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--surface-secondary);
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  text-decoration: none;
}

.beat-nav a span {
  color: var(--text-secondary);
}

.beat-nav a[aria-current="true"],
.beat-nav a:hover {
  color: var(--accent-soft);
}

.beat-nav a[aria-current="true"] span {
  color: var(--text-primary);
}

.topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 2.25rem;
}

.topic-filters button,
.grid-toggle {
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 0.3125rem 0.875rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
}

.topic-filters button:hover,
.topic-filters button[aria-pressed="true"],
.grid-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-soft);
}

.topic-filters button[aria-pressed="true"] {
  background: var(--selection-surface);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(17.5rem, 100%), 1fr));
  gap: var(--space-4);
  margin-top: 1.75rem;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
  padding: 1.375rem;
  background: var(--surface-secondary);
  color: var(--text-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  scroll-margin-top: 5rem;
  transition: border-color 130ms ease-out;
}

.case-card:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 55%, transparent);
}

.case-card-featured {
  border-color: var(--accent-border);
  background: var(--accent-surface);
}

:root[data-theme="light"] .case-card {
  border-color: rgba(17, 24, 39, 0.1);
}

:root[data-theme="light"] .case-card-featured {
  border-color: var(--accent-border);
}

.case-card-number,
.case-card-topics,
.case-card-action {
  font-size: 0.6875rem;
  text-transform: lowercase;
}

.case-card-number,
.case-card-topics {
  color: var(--text-secondary);
}

.case-card-action {
  color: var(--accent-primary);
}

.case-card-title {
  color: var(--text-primary);
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.case-card-summary {
  color: var(--text-body);
  font-size: 0.875rem;
  line-height: 1.6;
}

.case-proof {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
}

.case-proof > div {
  min-width: 0;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3);
}

.case-proof dt {
  margin-bottom: var(--space-2);
  color: var(--accent-primary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.65625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-proof dd {
  margin: 0;
  color: var(--text-body);
  font-size: 0.875rem;
  line-height: 1.55;
}

.case-card-proof {
  gap: var(--space-3);
  margin-top: 0;
}

.case-card-proof > div {
  padding-top: var(--space-2);
}

.case-card-proof dt {
  margin-bottom: var(--space-1);
}

.case-card-proof dd {
  font-size: 0.8125rem;
}

.spotlight-proof,
.case-detail-proof {
  max-width: 50rem;
}

@media (min-width: 43.75rem) {
  .spotlight-proof,
  .case-detail-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.case-card-topics {
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.65625rem;
}

.grid-toggle-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}

.grid-toggle {
  padding: 0.5625rem 1.5rem;
  border-color: color-mix(in srgb, var(--accent-primary) 50%, transparent);
  color: var(--accent-soft);
  font-size: 0.78125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.principle-list {
  max-width: 50rem;
  margin-top: var(--space-12);
}

.principle {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-subtle);
}

.principle > span {
  padding-top: 0.375rem;
  color: var(--accent-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
}

.principle h3 {
  margin-bottom: 0.625rem;
  font-size: 1.375rem;
  font-weight: 600;
}

.principle p {
  max-width: 64ch;
  color: color-mix(in srgb, var(--text-primary) 70%, transparent);
  line-height: 1.7;
}

.prose {
  counter-reset: prose-section;
  color: var(--text-body);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose p,
.prose li {
  hyphens: none;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.prose > h2,
.reader-prose > h3 {
  counter-increment: prose-section;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 3.5rem 0 1.25rem;
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: normal;
  text-transform: uppercase;
}

.spotlight-prose > h2:first-child,
.reader-prose > h3:first-child {
  margin-top: 3.5rem;
}

.spotlight-prose > p:last-child {
  margin-bottom: 0;
}

.prose > h2::before,
.reader-prose > h3::before {
  content: counter(prose-section, decimal-leading-zero);
  color: var(--accent-soft);
  font-weight: 600;
}

.prose > h2::after,
.reader-prose > h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.prose p {
  margin: 0 0 var(--space-5);
  max-width: min(65ch, var(--reading-width));
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose em {
  color: var(--text-primary);
}

.prose a {
  color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.prose ul,
.prose ol {
  margin: 0 0 var(--space-8);
  padding-left: 1.35rem;
}

.prose li {
  padding-left: var(--space-2);
}

.prose li + li {
  margin-top: var(--space-3);
}

.spotlight-prose > ul {
  counter-reset: spotlight-list;
  display: grid;
  gap: 0;
  margin: var(--space-6) 0;
  padding: 0;
  list-style: none;
}

.spotlight-prose > ul > li {
  counter-increment: spotlight-list;
  position: relative;
  display: block;
  margin: 0;
  border-top: 1px solid var(--border-subtle);
  padding: 1.375rem 0 1.375rem 3rem;
  color: color-mix(in srgb, var(--text-primary) 72%, transparent);
  font-size: 1rem;
  line-height: 1.7;
}

.spotlight-prose > ul > li:last-child {
  padding-bottom: 0;
}

.spotlight-prose > ul > li > p {
  max-width: none;
  margin: 0;
  color: color-mix(in srgb, var(--text-primary) 72%, transparent);
  font-size: 1rem;
  line-height: 1.7;
}

.spotlight-prose > ul > li::before {
  content: counter(spotlight-list, lower-alpha) ".";
  position: absolute;
  top: 1.5rem;
  left: 0;
  padding-top: 0.125rem;
  color: var(--accent-primary);
  font: 600 0.8125rem/normal "IBM Plex Mono", ui-monospace, monospace;
}

.prose blockquote {
  margin: 0 0 var(--space-10);
  border-left: 2px solid var(--accent-border);
  padding-left: clamp(1rem, 3.5vw, 1.625rem);
  color: var(--text-primary);
}

.spotlight-prose > h2:nth-of-type(3) + p {
  border-left: 2px solid var(--accent-border);
  padding-left: clamp(1rem, 3.5vw, 1.625rem);
}

.code-exhibit {
  margin: 0 0 var(--space-6);
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: 0.5rem;
  background: var(--code-surface);
  color: var(--code-text);
}

.media-exhibit {
  position: relative;
  left: 50%;
  width: min(var(--media-exhibit-width, 100%), calc(100vw - (2 * var(--page-gutter))));
  max-width: none;
  margin: 0 0 var(--space-6);
  transform: translateX(-50%);
}

.media-exhibit-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: #0b1220;
  color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
}

.media-exhibit-stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(0.375rem, 1vw, 0.75rem);
  background: #080e19;
}

.exhibit-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: 0.625rem var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.code-exhibit .exhibit-toolbar {
  border-bottom-color: var(--code-border);
  background: var(--code-toolbar);
}

.exhibit-dots {
  display: flex;
  gap: var(--space-2);
  flex: 0 0 auto;
}

.exhibit-dots i {
  width: 0.5625rem;
  height: 0.5625rem;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.code-exhibit .exhibit-dots i {
  background: var(--code-border);
}

.exhibit-filename {
  min-width: 0;
  margin-left: var(--space-2);
  overflow: hidden;
  color: #9ca3af;
  font: 0.75rem/normal "IBM Plex Mono", ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-exhibit .exhibit-filename {
  color: var(--code-muted);
}

.exhibit-badge {
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.25rem;
  padding: 0.125rem var(--space-2);
  color: #9ca3af;
  font: 0.625rem/normal "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.code-exhibit .exhibit-badge {
  border-color: var(--code-border);
  color: var(--code-muted);
}

.prose .code-exhibit pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  background: var(--code-surface);
  color: var(--code-text);
  font: 0.8125rem/1.75 "IBM Plex Mono", ui-monospace, monospace;
  tab-size: 2;
}

.code-exhibit .token.comment,
.code-exhibit .token.prolog,
.code-exhibit .token.doctype,
.code-exhibit .token.cdata {
  color: var(--code-muted);
  font-style: italic;
}

.code-exhibit .token.property,
.code-exhibit .token.tag,
.code-exhibit .token.constant,
.code-exhibit .token.symbol,
.code-exhibit .token.attr-name,
.code-exhibit .token.key,
.code-exhibit .token.keyword {
  color: var(--code-keyword);
}

.code-exhibit .token.boolean,
.code-exhibit .token.number,
.code-exhibit .token.string,
.code-exhibit .token.char,
.code-exhibit .token.attr-value,
.code-exhibit .token.builtin,
.code-exhibit .token.inserted,
.code-exhibit .token.selector {
  color: var(--code-value);
}

.prose :not(pre) > code {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  box-decoration-break: clone;
  border: 1px solid var(--accent-border);
  border-radius: 0.25rem;
  padding: 0.12em 0.38em;
  background: var(--accent-surface);
  color: var(--accent-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.88em;
  font-weight: 500;
  line-height: 1;
  vertical-align: -0.35em;
  white-space: nowrap;
  -webkit-box-decoration-break: clone;
}

.prose .inline-code-unit {
  white-space: nowrap;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: var(--space-8) 0;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  background: var(--surface-secondary);
}

.prose .media-exhibit img,
.prose .media-exhibit video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.prose .media-exhibit .exhibit-caption {
  margin: 0.625rem 0 0;
  padding-inline: 0.125rem;
  color: var(--text-secondary);
  font: 0.75rem/1.5 "IBM Plex Mono", ui-monospace, monospace;
  text-align: center;
}

.exhibit-caption span {
  color: var(--accent-primary);
}

.diagram-exhibit {
  --bg: #0b1220;
  --w88: #ffffff;
  --w45: #aab4c3;
  --w42: #aab4c3;
  --w5: #aab4c3;
  --w55: var(--w45);
  --w7: var(--w88);
  --ab4: #60a5fa;
  --ok: var(--code-value);
  --okb5: var(--ok);
  max-width: 100%;
  margin: 0 0 var(--space-6);
  overflow-x: auto;
  border: 1px solid var(--code-border);
  border-radius: 0.5rem;
  padding: 1.125rem 1.375rem;
  background: var(--diagram-surface);
}

:root[data-theme="light"] .diagram-exhibit {
  --bg: #ffffff;
  --w88: #111827;
  --w45: #4b5563;
  --w42: #4b5563;
  --w5: #4b5563;
  --ab4: #1d4ed8;
}

.diagram-exhibit-label {
  width: 100%;
  max-width: none;
  margin-bottom: 0.875rem;
  color: var(--code-muted);
  font: 0.65625rem/normal "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-align: center;
}

.diagram-exhibit-label-secondary {
  margin-top: 1.25rem;
}

.diagram-exhibit svg {
  width: 100%;
  max-width: 45rem;
  height: auto;
  display: block;
  margin: 0 auto;
}

.concept-diagram {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 var(--space-6);
}

.concept-diagram .diagram-exhibit {
  box-sizing: border-box;
  min-width: 0;
  margin-bottom: 0;
}

.concept-diagram .exhibit-caption {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: var(--space-4) 0 0;
  color: var(--text-secondary);
  font: 0.75rem/1.5 "IBM Plex Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

@media (max-width: 30rem) {
  .diagram-exhibit svg {
    min-width: 45rem;
  }
}

.teardown-exhibit {
  margin: 1.75rem 0 0;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
  border-radius: 0.5rem;
  padding: 1.125rem 1.375rem;
  background: var(--diagram-surface);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.teardown-exhibit > p {
  width: 100%;
  max-width: none;
  margin: 0 0 0.875rem;
  color: var(--code-muted);
  font-size: 0.65625rem;
  letter-spacing: 0.16em;
  line-height: normal;
  text-align: center;
}

.teardown-exhibit > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  font-size: 0.78125rem;
  line-height: normal;
}

.teardown-exhibit span {
  border: 1px solid color-mix(in srgb, var(--accent-primary) 45%, transparent);
  border-radius: 0.25rem;
  padding: 0.25rem 0.6875rem;
  color: var(--accent-soft);
}

.teardown-exhibit i {
  color: color-mix(in srgb, var(--text-primary) 40%, transparent);
  font-style: normal;
}

.reader {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: clamp(var(--space-4), 4vw, var(--space-12));
  overflow-y: auto;
  scroll-padding-top: calc(var(--space-12) + 2.75rem);
  background: var(--surface-overlay);
  color: var(--text-body);
}

.reader::backdrop {
  background: transparent;
}

.reader[open] .reader-shell {
  animation: reader-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reader-shell {
  box-sizing: border-box;
  width: min(100%, 52.5rem);
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--text-primary) 14%, transparent);
  border-radius: 0.75rem;
  padding: clamp(var(--space-6), 5vw, 3.5rem);
  background: var(--surface-primary);
  box-shadow: var(--reader-shadow);
}

:root[data-theme="light"] .reader-shell {
  border-color: var(--border-default);
}

.reader-toolbar {
  position: sticky;
  top: var(--space-4);
  z-index: 5;
  min-height: 2.75rem;
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-8);
  background: transparent;
  pointer-events: none;
}

.reader-close {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  padding: 0;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.08em;
  pointer-events: auto;
  cursor: pointer;
  transition: color 130ms ease, border-color 130ms ease, background-color 130ms ease;
  transform: translateX(calc(2.75rem - var(--space-2)));
}

.reader-close:hover {
  border-color: var(--accent-primary);
  background: var(--accent-surface);
  color: var(--text-primary);
}

.reader-study {
  padding: 0 var(--space-2) 0 0;
}

.reader-study > .reader-meta {
  margin-bottom: var(--space-4);
  color: var(--text-body);
}

.reader-meta-number {
  color: var(--accent-primary);
  font-weight: 600;
}

.reader-meta-topics {
  color: var(--text-tertiary);
  font-weight: 400;
  text-transform: lowercase;
}

.reader-study > .reader-title {
  max-width: 30ch;
  margin-bottom: 2.25rem;
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: wrap;
}

.reader-prose {
  font-size: 1.03125rem;
  line-height: 1.7;
}

.reader-prose > h3 {
  margin-top: var(--space-10);
  margin-bottom: 1.125rem;
  color: color-mix(in srgb, var(--text-primary) 55%, transparent);
}

.reader-prose > h3:first-child {
  margin-top: 0;
}

.reader-prose p {
  max-width: min(65ch, 100%);
}

.reader-prose .media-exhibit {
  left: auto;
  width: 100%;
  max-width: 100%;
  transform: none;
}

.reader-prose > p:has(+ ul) {
  margin-bottom: var(--space-2);
}

.reader-prose > ul {
  counter-reset: reader-list;
  display: grid;
  gap: 0;
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.reader-prose > ul > li {
  counter-increment: reader-list;
  position: relative;
  display: block;
  margin: 0;
  border-top: 1px solid var(--border-subtle);
  padding: 1.125rem 0 1.125rem 2.625rem;
  color: color-mix(in srgb, var(--text-primary) 72%, transparent);
  font-size: 1rem;
  line-height: 1.7;
}

.reader-prose > ul > li:last-child {
  padding-bottom: 0;
}

.reader-prose > ul > li > p {
  margin: 0;
  color: color-mix(in srgb, var(--text-primary) 72%, transparent);
  font-size: 1rem;
  line-height: 1.7;
}

.reader-prose > ul > li::before {
  content: counter(reader-list, lower-alpha) ".";
  position: absolute;
  top: 1.25rem;
  left: 0;
  width: 1.75rem;
  padding-top: 0.125rem;
  color: var(--accent-primary);
  font: 600 0.8125rem/normal "IBM Plex Mono", ui-monospace, monospace;
}

.reader-prose > .diagram-exhibit {
  margin-bottom: var(--space-10);
}

.reader-prose > h3:nth-of-type(3) + p {
  margin-bottom: var(--space-10);
  border-left: 2px solid var(--accent-border);
  padding-left: clamp(1rem, 3.5vw, 1.625rem);
}

.reader-prose > p:last-child {
  margin-bottom: 0;
}

.reader-navigation,
.case-detail-adjacent,
.case-detail-footer {
  margin-top: var(--space-12);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-5);
  font-size: 0.75rem;
}

.reader-navigation,
.case-detail-adjacent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.case-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.reader-navigation button,
.case-detail-adjacent a,
.case-detail-footer a {
  border: 1px solid var(--border-default);
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color 130ms ease, border-color 130ms ease, background-color 130ms ease;
}

.reader-navigation button,
.case-detail-adjacent a {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-1);
  border-radius: 0.5rem;
  padding: var(--space-4);
  background: var(--surface-secondary);
  text-align: left;
}

.reader-navigation [data-reader-direction="next"],
.case-detail-adjacent [data-study-direction="next"] {
  align-items: flex-end;
  text-align: right;
}

.reader-navigation button:hover,
.case-detail-adjacent a:hover {
  border-color: var(--accent-primary);
  background: var(--accent-surface);
  color: var(--text-primary);
}

.case-detail-footer a:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 60%, transparent);
  color: var(--text-primary);
}

[data-reader-direction-kicker],
.case-detail-adjacent-kicker {
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

[data-reader-case-number],
.case-detail-adjacent-number {
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

[data-reader-case-title],
.case-detail-adjacent-title {
  max-width: 100%;
  overflow: visible;
  color: var(--text-primary);
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: break-word;
  white-space: normal;
}

.case-detail {
  box-sizing: border-box;
  width: min(100%, 52.5rem);
  margin-inline: auto;
  padding: clamp(var(--space-16), 10vw, var(--space-24)) var(--page-gutter);
}

.case-detail-header {
  margin-bottom: var(--space-16);
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-10);
  color: var(--accent-soft);
  font-size: 0.75rem;
  text-decoration: none;
}

.case-detail-header h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.case-detail-summary {
  max-width: 38rem;
  margin: var(--space-6) 0 0;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.65;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: 5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-10);
  padding-block: clamp(3rem, 7vw, 5rem);
}

.footer-brand {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.footer-note {
  max-width: 44ch;
  margin: 0.875rem 0 0;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.8125rem;
}

.contact-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.contact-links a:hover {
  color: var(--accent-soft);
}

.back-to-top {
  position: fixed;
  right: clamp(var(--space-4), 3vw, var(--space-8));
  bottom: clamp(var(--space-4), 3vw, var(--space-8));
  z-index: 60;
  border: 1px solid var(--border-default);
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, color 130ms ease, border-color 130ms ease;
}

.back-to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.back-to-top:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 60%, transparent);
  color: var(--text-primary);
}

.brand-link,
.site-nav a,
.theme-toggle,
.hero-actions > a,
.arc-links a,
.topic-filters button,
.grid-toggle,
.reader-close,
.reader-navigation button,
.case-detail-adjacent a,
.back-link,
.case-detail-footer a,
.contact-links a,
.back-to-top {
  box-sizing: border-box;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reader-navigation button,
.case-detail-adjacent a {
  justify-content: flex-start;
}

.reader-navigation [data-reader-direction="previous"],
.case-detail-adjacent [data-study-direction="previous"] {
  align-items: flex-start;
}

@media (max-width: 600px) {
  .reader-navigation,
  .case-detail-adjacent {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes reader-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cursor-blink {
  0%,
  55% {
    opacity: 1;
  }

  56%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 7rem;
  }

  .header-inner {
    height: auto;
    min-height: 3.5rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.125rem var(--space-4);
    padding-block: 0.625rem 0.75rem;
  }

  .site-nav {
    justify-content: flex-start;
    gap: var(--space-2);
  }

  .arc-step {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0 clamp(1rem, 3vw, 1.75rem);
  }

  .reader {
    padding: var(--space-4);
  }

  .reader-shell {
    padding: 1.75rem;
  }

  .back-to-top {
    position: static;
    display: none;
    width: max-content;
    margin: 0 var(--page-gutter) var(--space-8) auto;
  }

  .back-to-top[data-visible="true"] {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 10rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .arc-step {
    gap: 0 var(--space-4);
  }

  .arc-links a {
    font-size: 0.71875rem;
  }

  .footer-inner {
    flex-direction: column;
  }

}

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
