/* Toni Hale portfolio. IBM Plex is used under the SIL Open Font License (see /fonts/OFL.txt). */

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

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

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

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

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

:root {
  --ink: #12263f;
  --navy: #1a365d;
  --navy-mid: #245082;
  --accent: #0f4c66;
  --accent-bright: #1f6b8a;
  --paper: #f4f1ea;
  --surface: #fffcf8;
  --mist: #e7eef2;
  --line: #d5ddd8;
  --muted: #3d5166;
  --text: #1b2a38;
  --ingest: #1f6b8a;
  --ingest-bg: #e5f2f6;
  --ingest-ink: #0f4c66;
  --transform: #1a365d;
  --transform-bg: #e7eef6;
  --transform-ink: #12263f;
  --decode: #a35b16;
  --decode-bg: #f8efe4;
  --decode-ink: #6a3d0c;
  --output: #1d6b45;
  --output-bg: #e7f4ec;
  --output-ink: #145233;
  --danger-bg: #f8ebe6;
  --danger-text: #6b3014;
  --radius: 8px;
  --max: 1120px;
  --read: 68ch;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --header: 4.85rem;
  --shadow: 0 1px 0 rgba(18, 38, 63, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.05rem;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--navy);
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--surface);
  color: var(--navy);
  padding: 0.55rem 0.85rem;
  z-index: 80;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--line);
}

.skip-link:focus {
  top: 0.75rem;
}

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

#main:focus {
  outline: none;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.prose {
  max-width: var(--read);
}

.phase,
.meta-row,
.spine,
.toc-label,
.status,
.depth,
.kind,
.filters button,
.score-value,
.example-caption,
.term {
  font-family: var(--mono);
}

.kicker {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.15;
  font-weight: 560;
  letter-spacing: -0.02em;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.35rem);
  margin: 0 0 0.85rem;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0 0 0.7rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 0.9rem;
}

.lead {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 42rem;
  margin-bottom: 0.9rem;
}

.support {
  max-width: 46ch;
  color: var(--muted);
}

.fine {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Header */

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

.site-nav {
  position: relative;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  line-height: 1.15;
  padding: 0.35rem 0;
}

.brand-name,
.brand-sub {
  display: block;
}

.brand-sub {
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.12rem;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.nav-actions a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.55rem;
}

.nav-links a:hover,
.nav-actions a:hover {
  color: var(--accent);
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent-bright);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--line);
}

.nav-actions a {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-mid);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: #b7c6d4;
}

.btn-secondary:hover {
  background: var(--mist);
  color: var(--ink);
}

.btn-small {
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  font-size: 0.92rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 1.1rem 0;
}

.tertiary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.tertiary a {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

/* Hero */

.hero {
  display: block;
  position: relative;
  padding: 3.6rem 0 1.6rem;
}

.motif {
  pointer-events: none;
}

.motif-hero {
  position: absolute;
  right: 0;
  top: 2.2rem;
  width: min(42%, 24rem);
  height: auto;
  z-index: 0;
}

.motif-hero path {
  fill: none;
  stroke: #1f6b8a;
  stroke-width: 1.4;
  opacity: 0.35;
}

.hero > :not(.motif) {
  position: relative;
  z-index: 1;
}

.river-rule {
  margin: 0 auto 0.2rem;
}

.river-rule svg {
  width: 100%;
  height: 1.4rem;
  display: block;
}

.river-rule path {
  fill: none;
  stroke: #1f6b8a;
  stroke-width: 1.4;
  opacity: 0.4;
}

.section-intro {
  max-width: 46rem;
  margin-top: -0.2rem;
}

.hero h1 {
  max-width: 11em;
}

.hero .lead,
.hero .support,
.invite {
  max-width: 40rem;
}

.invite {
  color: var(--ink);
  font-size: 1.08rem;
}

.spine {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spine li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spine li + li::before {
  content: ">";
  color: var(--accent-bright);
}

.map {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.4rem;
  margin: 1.5rem 0 0.5rem;
}

.map-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.map-canvas {
  display: none;
}

.map-canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-edge {
  stroke: #b7c9c4;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.map-dot {
  fill: var(--surface);
  stroke: var(--navy);
  stroke-width: 2.4;
}

.map-center-dot {
  fill: #f4f1ea;
  stroke: var(--navy);
  stroke-width: 1.5;
}

.map-label,
.map-center-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 13px;
}

.map-center-label {
  font-weight: 600;
  font-size: 13px;
}

.map-node {
  text-decoration: none;
}

.map-node:hover .map-dot,
.map-node:focus .map-dot {
  fill: var(--accent-bright);
}

.map-node:focus-visible {
  outline: none;
}

.map-node:focus-visible .map-dot {
  stroke: var(--accent);
  stroke-width: 3px;
}

.map-detail {
  margin-top: 0.6rem;
  min-height: 4.5rem;
}

.map-detail ul {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
}

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

.map-fallback summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink);
}

.map-fallback details p {
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.map-fallback ul {
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

/* Sections */

.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.section-head p {
  max-width: 46ch;
  color: var(--muted);
  margin: 0;
}

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

.trio article,
.card,
.case-block,
.panel,
.callout,
.work-card,
.lab-card,
.research-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.15rem;
}

.section-alt .trio article,
.section-alt .work-card,
.section-alt .card {
  background: var(--paper);
}

.trio h3 {
  font-size: 1.45rem;
}

.trio ol,
.link-list,
.plain-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.link-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.work-feature {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.work-card h3 {
  font-size: 1.25rem;
}

.work-card h3 a,
.research-card h3 a,
.lab-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.work-card h3 a:hover,
.research-card h3 a:hover,
.lab-card h3 a:hover {
  color: var(--accent);
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.fact-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
}

.fact-list strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  padding-top: 0.25rem;
}

.kind,
.status,
.depth {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.4rem;
  margin: 0 0.3rem 0.3rem 0;
}

.artifact {
  margin: 0;
}

.artifact svg {
  width: 100%;
  height: auto;
  display: block;
}

.artifact figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Matrix and filters */

.matrix details,
.timeline details,
.disclose {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.matrix summary,
.timeline summary,
.disclose summary,
.toc-toggle {
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.35rem 0.2rem;
  list-style: none;
}

.matrix summary::-webkit-details-marker,
.timeline summary::-webkit-details-marker,
.disclose summary::-webkit-details-marker {
  display: none;
}

.matrix summary::after,
.timeline summary::after,
.disclose summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  color: var(--muted);
}

.matrix details[open] summary::after,
.timeline details[open] summary::after,
.disclose details[open] summary::after {
  content: "-";
}

.matrix .domain-body,
.timeline .entry-body,
.disclose .disclose-body {
  padding: 0 0.2rem 1rem;
}

.domain-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.8rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.filters button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filters button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.empty {
  border: 1px dashed var(--line);
  padding: 1rem;
  color: var(--muted);
}

/* Timeline */

.timeline details {
  padding: 0 0.2rem;
}

.entry-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
}

.entry-line span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0.6rem 0;
}

/* Article */

.page-hero {
  padding: 3.2rem 0 1.2rem;
}

.page-hero .lead {
  max-width: 48ch;
  font-size: 1.2rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.layout {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}

.thread {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
  margin: 1rem 0 1.4rem;
}

.thread ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.case-block + .case-block {
  margin-top: 0.8rem;
}

.mode-switch,
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.mode-switch button,
.tablist button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

.mode-switch button[aria-selected="true"],
.tablist button[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
  color: var(--muted);
}

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

.toc-toggle {
  display: none;
}

.callout {
  background: var(--mist);
  margin: 1rem 0;
}

.callout.what-matters {
  border-left: 3px solid var(--navy);
}

.phase {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.45rem;
}

.phase .shape {
  width: 0.55rem;
  height: 0.55rem;
  display: inline-block;
  flex: none;
}

.phase.ingest {
  background: var(--ingest-bg);
  color: var(--ingest-ink);
}

.phase.ingest .shape {
  border-radius: 50%;
  background: var(--ingest);
}

.phase.transform {
  background: var(--transform-bg);
  color: var(--transform-ink);
}

.phase.transform .shape {
  background: var(--transform);
}

.phase.decode {
  background: var(--decode-bg);
  color: var(--decode-ink);
}

.phase.decode .shape {
  background: var(--decode);
  transform: rotate(45deg);
  width: 0.48rem;
  height: 0.48rem;
}

.phase.output {
  background: var(--output-bg);
  color: var(--output-ink);
}

.phase.output .shape {
  background: var(--output);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.example-bar {
  position: sticky;
  top: var(--header);
  z-index: 6;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  margin: 0.5rem 0 1rem;
}

.example-line {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.tok,
.tok-btn {
  font-family: var(--mono);
  font-size: 0.92rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0.2rem 0.45rem;
  line-height: 1.4;
}

.tok.is-new {
  background: var(--output-bg);
  border-color: var(--output);
}

.tok small,
.id-chip small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.example-caption,
.cache-flag {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.cache-flag[hidden] {
  display: none;
}

.pipeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.pipeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.stage {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.9rem;
  min-width: 0;
}

.stage.is-current {
  border-color: var(--navy);
  box-shadow: inset 3px 0 0 var(--navy);
}

.stage-visual {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.layer-split {
  display: grid;
  gap: 0.4rem;
  width: 100%;
}

.layer-box {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  background: var(--paper);
}

.layer-box strong {
  display: block;
  font-size: 0.92rem;
}

.score {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  margin: 0.15rem 0;
}

.score-label {
  font-family: var(--mono);
  font-size: 0.85rem;
}

meter {
  width: 100%;
  height: 0.75rem;
}

.score.is-out {
  opacity: 0.45;
}

.vec {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.35rem 0.45rem;
  margin: 0;
}

.loop-note {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* Terms */

.term-wrap {
  position: relative;
  display: inline;
}

.term {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.92em;
  padding: 0 0.05rem;
  border-bottom: 1px dotted var(--accent-bright);
  cursor: help;
  font-weight: 500;
  line-height: inherit;
}

/* The spoken definition lives in the fixed bar. This node stays in the
   accessibility tree for aria-describedby and is not painted over the prose. */
.term-pop {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.definition-bar {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--ink);
  color: #f4f7f8;
  padding: 0.85rem 1.1rem calc(0.85rem + env(safe-area-inset-bottom));
  border-top: 3px solid var(--accent-bright);
}

.definition-bar[hidden] {
  display: none;
}

.definition-bar p {
  margin: 0;
  max-width: 75ch;
}

.definition-bar strong {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.definition-bar button {
  flex: none;
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  color: #f4f7f8;
  border: 1px solid #8aa0b3;
  font: inherit;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.glossary-block {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.glossary-block summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink);
}

.glossary-block dt {
  font-weight: 600;
  margin-top: 0.8rem;
}

.glossary-block dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

/* Attention and playground */

.token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0;
}

.tok-btn {
  min-height: 44px;
  cursor: pointer;
}

.tok-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.tok-btn.is-hot:not([aria-pressed="true"]) {
  background: #d7e6ef;
  border-color: var(--accent-bright);
  font-weight: 600;
}

.tok-btn.is-warm:not([aria-pressed="true"]) {
  background: var(--mist);
}

.control {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.8rem;
}

.control input[type="range"] {
  width: 100%;
  min-height: 44px;
}

.control-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
}

.control-head output {
  font-family: var(--mono);
  font-weight: 400;
}

.playground .prompt {
  font-family: var(--mono);
  font-size: 0.95rem;
}

.sample-result {
  min-height: 1.5rem;
  font-family: var(--mono);
}

.workload-visual {
  display: grid;
  gap: 0.7rem;
  margin: 0.8rem 0;
}

.track {
  position: relative;
  height: 3rem;
  border: 1px dashed var(--line);
  background: var(--paper);
  overflow: hidden;
}

.flow {
  position: absolute;
  top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--navy);
  padding: 0.2rem 0.4rem;
}

.prefill-flows .flow:nth-child(1) { left: 8%; }
.prefill-flows .flow:nth-child(2) { left: 28%; }
.prefill-flows .flow:nth-child(3) { left: 48%; }
.prefill-flows .flow:nth-child(4) { left: 68%; }

.decode-flows .flow {
  left: 12%;
}

.cache-pile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cache-pile span {
  font-family: var(--mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.2rem 0.4rem;
  background: var(--mist);
}

.js .mode-panel:not(.is-active),
.js .workload-panel:not(.is-active) {
  display: none;
}

.js .is-animated .prefill-flows .flow {
  animation: march 2.8s linear infinite;
}

.js .is-animated .decode-flows .flow {
  animation: stepin 2.4s ease-in-out infinite;
}

@keyframes march {
  from { transform: translateX(0); } to { transform: translateX(18px); }
}

@keyframes stepin {
  0% { transform: translateX(0); opacity: 0.4; }
  30% { opacity: 1; }
  100% { transform: translateX(70px); opacity: 1; }
}

.stack {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.stack li {
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  background: var(--surface);
}

.stack li:nth-child(2) { margin-left: 0.6rem; }
.stack li:nth-child(3) { margin-left: 1.2rem; }
.stack li:nth-child(4) { margin-left: 1.8rem; }
.stack li:nth-child(5) { margin-left: 2.4rem; }

.portrait {
  width: min(240px, 60vw);
  height: auto;
  border: 1px solid var(--line);
  display: block;
}

.path {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.path li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.7rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.path strong {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

/* Forms */

form {
  display: grid;
  gap: 0.35rem;
  max-width: 38rem;
}

label {
  font-weight: 600;
  margin-top: 0.45rem;
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #b7c6d4;
  padding: 0.6rem 0.65rem;
  width: 100%;
  border-radius: var(--radius);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.note {
  background: var(--danger-bg);
  color: var(--danger-text);
  padding: 0.7rem 0.8rem;
  border: 1px solid #efd2c6;
}

.sources {
  padding-left: 1.1rem;
}

.sources li {
  margin-bottom: 0.55rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: var(--surface);
}

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

.footer-river {
  width: 100%;
  height: 1.6rem;
  display: block;
}

.footer-river path {
  fill: none;
  stroke: #1f6b8a;
  stroke-width: 1.25;
  opacity: 0.45;
}

.footer-name {
  margin: 0 0 0.2rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.footer-brand p:last-child {
  margin: 0;
  max-width: 28rem;
}

.footer-copy {
  margin: 0.2rem 0 0;
}

.footer-login {
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.88rem;
}

pre {
  background: var(--ink);
  color: #e7eef2;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

.breakout {
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.4rem 0.45rem;
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.about-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.crumb {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

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

.map-head {
  display: block;
  margin-bottom: 0.8rem;
}

.map-head p:last-child {
  max-width: 62ch;
  color: var(--muted);
}

.map-switch {
  display: none;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem;
}

.js .map-switch {
  display: flex;
}

.js .map-fallback {
  display: none;
}

.no-js .map-detail {
  display: none;
}

.map-switch-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.map-switch-btn[aria-pressed="true"],
.map-node.is-selected .map-dot {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.map-node.is-selected .map-dot {
  fill: var(--accent-bright);
  stroke: var(--ink);
  stroke-width: 3px;
}

.map-detail {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 1rem;
}

.map-detail-title {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.map-detail h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0.9rem 0 0.25rem;
}

.map-insight {
  color: var(--muted);
  font-style: italic;
}

.method-stage {
  display: grid;
  gap: 1rem;
}

.method-ring {
  display: none;
  position: relative;
  width: min(100%, 46rem);
  margin-inline: auto;
}

.method-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.method-hub {
  fill: var(--surface);
  stroke: rgba(18, 38, 63, 0.1);
  stroke-width: 1.35;
}

/* Phase band: river blue, muted teal, warm clay. */
.method-seg-phase.phase-understand .method-seg-shape { fill: #aecfe0; }
.method-seg-phase.phase-solve .method-seg-shape { fill: #9dc9bf; }
.method-seg-phase.phase-improve .method-seg-shape { fill: #dfc29a; }

/* Step band: lighter tints of the parent phase, still clearly related. */
.method-seg-step.phase-understand .method-seg-shape { fill: #cfe6ef; }
.method-seg-step.phase-solve .method-seg-shape { fill: #c7e3db; }
.method-seg-step.phase-improve .method-seg-shape { fill: #f0e0c4; }

.method-seg-shape {
  stroke: rgba(255, 252, 248, 0.7);
  stroke-width: 1.1;
  stroke-linejoin: round;
  transition: fill 160ms ease, stroke 160ms ease, stroke-width 160ms ease;
}

.method-seg {
  cursor: pointer;
}

.method-seg:focus {
  outline: none;
}

.method-seg:focus-visible .method-seg-shape,
.method-seg:focus-visible .method-comm-band {
  stroke: var(--ink);
  stroke-width: 2.4;
}

/* Understated selected state: slight deepen + subtle outline, no control chrome. */
.method-seg[aria-pressed="true"] .method-seg-shape {
  stroke: rgba(18, 38, 63, 0.55);
  stroke-width: 1.55;
}

.method-seg-phase.phase-understand[aria-pressed="true"] .method-seg-shape,
.method-seg-phase.phase-understand.is-active .method-seg-shape {
  fill: #97c4d4;
}

.method-seg-phase.phase-solve[aria-pressed="true"] .method-seg-shape,
.method-seg-phase.phase-solve.is-active .method-seg-shape {
  fill: #88bcb0;
}

.method-seg-phase.phase-improve[aria-pressed="true"] .method-seg-shape,
.method-seg-phase.phase-improve.is-active .method-seg-shape {
  fill: #d8b686;
}

.method-seg-step.phase-understand[aria-pressed="true"] .method-seg-shape,
.method-seg-step.phase-understand.is-active .method-seg-shape {
  fill: #b5d6e4;
}

.method-seg-step.phase-solve[aria-pressed="true"] .method-seg-shape,
.method-seg-step.phase-solve.is-active .method-seg-shape {
  fill: #a6d0c5;
}

.method-seg-step.phase-improve[aria-pressed="true"] .method-seg-shape,
.method-seg-step.phase-improve.is-active .method-seg-shape {
  fill: #e4c9a0;
}

.method-seg-label,
.method-comm-label {
  fill: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  pointer-events: none;
  user-select: none;
}

.method-seg-phase .method-seg-label {
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.method-seg-step .method-seg-label {
  font-size: 17px;
  font-weight: 500;
  fill: rgba(18, 38, 63, 0.88);
}

.method-comm-band {
  fill: rgba(61, 81, 102, 0.12);
  fill-rule: evenodd;
  stroke: rgba(61, 81, 102, 0.42);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.method-seg-comm:hover .method-comm-band,
.method-seg-comm:focus-visible .method-comm-band {
  fill: rgba(61, 81, 102, 0.18);
  stroke: rgba(26, 54, 93, 0.62);
}

.method-seg-comm[aria-pressed="true"] .method-comm-band,
.method-seg-comm.is-active .method-comm-band {
  fill: rgba(61, 81, 102, 0.22);
  stroke: rgba(26, 54, 93, 0.7);
  stroke-width: 1.45;
  stroke-dasharray: 4 5;
}

.method-comm-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: rgba(61, 81, 102, 0.72);
}

.method-arrow {
  fill: none;
  stroke: rgba(26, 54, 93, 0.55);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0.55;
}

.method-inline {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid rgba(18, 38, 63, 0.28);
  background: rgba(255, 252, 248, 0.72);
  color: var(--ink);
  cursor: pointer;
  padding: 0.35rem 0.8rem;
}

.method-inline[aria-pressed="true"] {
  background: rgba(26, 54, 93, 0.12);
  color: var(--ink);
  border-color: rgba(26, 54, 93, 0.55);
  box-shadow: inset 0 0 0 1px rgba(26, 54, 93, 0.18);
}

.method-inline:focus-visible,
.method-seg:focus-visible,
.career-row:focus-visible,
.map-switch-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.method-linear {
  display: grid;
  gap: 0.75rem;
}

.method-linear-phase {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: var(--radius);
}

.method-linear-phase[data-phase-region="understand"] { background: #e4f2f7; }
.method-linear-phase[data-phase-region="solve"] { background: #e3f3ef; }
.method-linear-phase[data-phase-region="improve"] { background: #f6eee0; }

.method-linear-phase.is-current {
  box-shadow: inset 3px 0 0 var(--ink);
}

.method-linear-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.method-linear-comm {
  padding: 0.35rem 0;
}

.method-comm-btn {
  width: 100%;
  border-style: dashed;
  background: rgba(61, 81, 102, 0.08);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.method-comm-btn[aria-pressed="true"] {
  background: rgba(61, 81, 102, 0.16);
  color: var(--ink);
  border-style: solid;
  border-color: rgba(26, 54, 93, 0.55);
  box-shadow: inset 0 0 0 1px rgba(26, 54, 93, 0.12);
}

.method-detail {
  background: var(--surface);
  border: 1px solid rgba(18, 38, 63, 0.12);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 1.05rem;
  color: var(--ink);
}

.method-detail.hub-tint-understand {
  background: #f3f8fb;
}

.method-detail.hub-tint-solve {
  background: #f2f8f6;
}

.method-detail.hub-tint-improve {
  background: #f8f4ec;
}

.method-detail.hub-tint-communicate {
  background: #f4f5f7;
}

.method-detail.hub-tint-default {
  background: var(--surface);
}

.method-detail h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  margin: 0 0 0.4rem;
}

.method-kicker {
  margin: 0 0 0.15rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.method-why {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92em;
}

.method-evidence {
  max-width: 42rem;
  margin: 1rem auto 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid rgba(18, 38, 63, 0.1);
}

.method-evidence[hidden] {
  display: none;
}

.method-evidence-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.method-evidence-list {
  margin: 0;
}

.method-cycle {
  max-width: 62ch;
  margin: 0.9rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .method-seg-shape {
    transition: none;
  }
}

.method-static h3 {
  margin-top: 1.2rem;
}

.method-static h4 {
  margin: 0.8rem 0 0.3rem;
}

.js .method-static {
  display: none;
}

.no-js .method-stage,
.no-js .method-cycle {
  display: none;
}

.work-card,
.idea-card,
.card {
  border-radius: var(--radius);
}

.work-card:hover,
.idea-card:hover,
.work-card:focus-within,
.idea-card:focus-within {
  border-color: #8aa0b5;
}

.idea-card h2,
.idea-card h3 {
  font-family: var(--font);
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.idea-card h2 a,
.idea-card h3 a,
.work-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.idea-card h2 a:hover,
.idea-card h3 a:hover,
.work-card h3 a:hover {
  color: var(--accent);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 0.45rem;
}

.status-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-more {
  margin: 1.1rem 0 0;
}

.about-preview {
  display: grid;
  gap: 1.4rem;
  align-items: center;
}

.about-preview img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.connect-band {
  background: var(--ink);
  color: #f7f4ee;
  padding: 4.5rem 0;
}

.connect-band h2,
.connect-band p {
  color: #f7f4ee;
}

.connect-band .kicker {
  color: #b7d4e0;
}

.connect-band .fine {
  color: #d5e0e8;
}

.connect-band .lead,
.connect-band p {
  max-width: 40rem;
}

.btn-on-dark {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.btn-on-dark:hover {
  background: var(--mist);
  color: var(--ink);
}

.btn-on-dark-quiet {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-on-dark-quiet:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.connect-band :focus-visible {
  outline-color: #fff;
}

.page-hero h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.35rem);
  max-width: 18ch;
}

.portrait {
  border-radius: var(--radius);
}

/* Desktop */

@media (min-width: 800px) {
  .trio {
    grid-template-columns: repeat(3, 1fr);
  }

  .work-grid {
    grid-template-columns: 1fr 1fr;
  }

  .method-phases {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-preview {
    grid-template-columns: 180px 1fr;
  }

  .about-grid {
    grid-template-columns: 240px 1fr;
  }

  .loop-note {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .path li {
    grid-template-columns: 9rem 1fr;
  }
}

@media (min-width: 980px) {
  .hero {
    padding-top: 4.5rem;
    padding-bottom: 1.5rem;
  }

  .js .map-canvas {
    display: block;
  }

  .js .map-switch {
    display: none;
  }

  .work-grid-home {
    grid-template-columns: repeat(3, 1fr);
  }

  .work-feature {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .layout.with-toc {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
  }

  .toc {
    position: sticky;
    top: calc(var(--header) + 0.8rem);
  }

  .toc-toggle {
    display: block;
    padding: 0;
    min-height: 0;
    cursor: default;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
  }

  .pipeline {
    grid-auto-flow: column;
    grid-auto-columns: minmax(16.5rem, 18.5rem);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 0.6rem;
  }

  .stage {
    scroll-snap-align: start;
  }

  .layer-split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 979px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 1rem 1rem;
    gap: 0.2rem;
  }

  .js .nav-panel.is-open {
    display: flex;
  }

  .js .nav-links,
  .js .nav-actions {
    flex-direction: column;
    align-items: stretch;
    border-left: 0;
    padding-left: 0;
  }

  .toc-toggle {
    display: flex;
  }

  .js .toc:not(.is-open) ol {
    display: none;
  }

  .stack li,
  .stack li:nth-child(n) {
    margin-left: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .tok.is-new {
    background: var(--output-bg);
  }
}

.about-open {
  display: grid;
  gap: 1.4rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.about-story {
  display: grid;
  gap: 0.4rem;
}

.about-story > section {
  padding-top: 1.6rem;
}

.about-copy,
.about-story {
  max-width: 46rem;
}

.about-story {
  max-width: none;
}

.about-story p,
.about-copy p {
  max-width: 42rem;
}

.place-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.photo-slot {
  margin: 0 0 1rem;
  max-width: 100%;
}

.photo-roebling {
  max-width: 40rem;
}

.photo-museum {
  max-width: 22rem;
}

.photo-slot img,
.photo-placeholder {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.ratio-3-2 img,
.ratio-3-2 .photo-placeholder {
  aspect-ratio: 3 / 2;
}

.ratio-4-5 img,
.ratio-4-5 .photo-placeholder {
  aspect-ratio: 4 / 5;
}

.photo-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 20% 30%, rgba(31, 107, 138, 0.14), transparent 55%),
    linear-gradient(165deg, #f7f4ee 0%, #e4eef2 100%);
  color: var(--ink);
  text-align: center;
}

.placeholder-contour {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 55%;
}

.placeholder-contour path {
  fill: none;
  stroke: #1f6b8a;
  stroke-width: 1.4;
  opacity: 0.45;
}

.photo-placeholder span {
  position: relative;
  z-index: 1;
  padding: 0.7rem 0.8rem;
  font-weight: 600;
  font-size: 0.92rem;
  max-width: 14rem;
  line-height: 1.35;
}

.pet-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  max-width: 46rem;
  margin-top: 0.4rem;
}

.pet-card {
  min-width: 0;
}

.pet-card .photo-slot {
  margin: 0 0 0.55rem;
}

.pet-card h3 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.2rem;
}

.pet-card p {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  max-width: none;
}

.pet-fact {
  color: var(--muted);
  font-size: 0.9rem;
}

.pet-fact strong {
  color: var(--ink);
  font-weight: 600;
}

.career-list {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.career-row {
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
  padding: 0.7rem 0 0.7rem 0.95rem;
  border-left: 2px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.career-row:hover {
  background: rgba(31, 107, 138, 0.06);
}

.career-meta {
  display: grid;
  gap: 0.1rem;
}

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

.career-dates {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.career-axis,
.career-track,
.career-legend-bars {
  display: none;
}

.career-legend {
  color: var(--muted);
  max-width: 46rem;
}

.experience-entry {
  scroll-margin-top: 5.75rem;
  border-radius: var(--radius);
}

.experience-entry:target {
  background: #e7f3f6;
  box-shadow: inset 3px 0 0 var(--accent-bright);
}

@media (min-width: 800px) {
  .about-open {
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
    gap: 2rem;
  }

  .place-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(12rem, 0.7fr);
  }

  .about-story {
    max-width: 52rem;
  }
}

@media (min-width: 900px) {
  .motif-hero {
    display: block;
  }

  .section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
  }

  .method-stage {
    display: grid;
    gap: 0;
    justify-items: center;
    position: relative;
  }

  .method-ring {
    display: block;
    width: min(100%, 44rem);
  }

  .method-linear {
    display: none;
  }

  /* Circular detail hub aligned with the SVG center opening. No scrollbar. */
  .method-detail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(42%, 17.25rem);
    height: min(42%, 17.25rem);
    max-height: none;
    overflow: hidden;
    margin: 0;
    padding: 1.05rem 1.1rem;
    border-radius: 50%;
    border: 1px solid rgba(18, 38, 63, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 248, 0.55);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background-clip: padding-box;
  }

  .method-detail h3 {
    font-size: clamp(1.05rem, 1.65vw, 1.32rem);
    margin: 0 0 0.28rem;
  }

  .method-detail p {
    font-size: 0.84rem;
    line-height: 1.35;
    margin: 0 0 0.35rem;
  }

  .method-detail .method-why {
    font-size: 0.78rem;
    margin: 0.15rem 0 0;
  }

  .method-detail .method-kicker {
    font-size: 0.72rem;
  }

  .method-evidence {
    max-width: min(100%, 44rem);
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1.5fr) auto auto;
    align-items: start;
  }

  .footer-river,
  .footer-copy {
    grid-column: 1 / -1;
  }

  .career-axis {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    align-items: end;
    min-height: 1.4rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
  }

  .career-ticks {
    display: block;
    width: 100%;
    height: 1.4rem;
    overflow: visible;
  }

  .career-tick {
    fill: var(--muted);
    font-family: var(--font);
    font-size: 14px;
  }

  .career-row {
    grid-template-columns: 16.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-left: 0;
    padding: 0.35rem 0.35rem 0.35rem 0;
    min-height: 3.4rem;
  }

  .career-track {
    display: block;
    width: 100%;
    height: 1.65rem;
    background: rgba(18, 38, 63, 0.04);
    border-radius: 999px;
  }

  .career-bar {
    fill: var(--navy);
  }

  .career-bar-teaching {
    stroke: var(--ink);
    stroke-width: 0.8;
  }

  .career-legend-bars {
    display: inline;
  }
}

@media (min-width: 1100px) {
  .method-ring {
    width: min(100%, 48rem);
  }

  .method-detail {
    width: min(43%, 18.5rem);
    height: min(43%, 18.5rem);
    padding: 1.15rem 1.2rem;
  }

  .method-detail h3 {
    font-size: clamp(1.12rem, 1.45vw, 1.4rem);
  }

  .method-evidence {
    max-width: min(100%, 48rem);
  }
}

@media (max-width: 799px) {
  .motif-hero {
    display: none;
  }
}

@media (max-width: 700px) {
  .pet-row {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }
}

@media (max-width: 520px) {
  .photo-placeholder span {
    font-size: 0.78rem;
    padding: 0.45rem 0.35rem;
  }
}

/* Analytics platform cost & architecture case study */
.ap-page .ap-main {
  min-width: 0;
}

.ap-mental-model {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 48ch;
}

.ap-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin: 1rem 0 0.75rem;
}

.ap-mode-btn {
  font: inherit;
  font-family: var(--display);
  font-weight: 600;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.ap-mode-btn[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.ap-live-status {
  min-height: 1.4em;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.ap-step-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
}

.ap-step-btn {
  font: inherit;
  font-size: 0.88rem;
  min-height: 40px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.ap-step-btn[aria-current="step"] {
  background: var(--mist);
  color: var(--ink);
  border-color: var(--navy);
  font-weight: 600;
}

.ap-step-panel h3 {
  font-family: var(--display);
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.ap-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ap-readonly-field {
  margin: 0;
  align-self: end;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.55rem 0;
}

.ap-priority-controls,
.ap-constraint-controls {
  display: grid;
  gap: 0.75rem;
}

.ap-priority-row {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) minmax(6rem, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.ap-priority-row label,
.ap-constraint-item label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.ap-constraint-item {
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}

.ap-fallback-msg {
  color: var(--muted);
  font-size: 0.95rem;
}

.ap-demonstrate-list {
  margin-bottom: 1rem;
}

.ap-ref-block {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.ap-scenario-board-wide {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
}

.ap-scenario-board-wide .ap-scenario {
  flex: 0 0 min(18rem, 85vw);
  scroll-snap-align: start;
}

.ap-override-matrix .ap-override-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.ap-override-mark {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 0.1rem 0.3rem;
}

.ap-override-mark-idle {
  border-color: var(--line);
  color: var(--muted);
}

.ap-cell-overridden {
  background: var(--mist);
}

.ap-override-badge {
  border: 1px dashed var(--navy);
}

.ap-linkish {
  font: inherit;
  font-size: 0.8rem;
  color: var(--navy);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.ap-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;
}

.js .ap-fallback-msg {
  display: none;
}

.ap-inputs fieldset {
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 1rem;
}

.ap-inputs legend {
  font-family: var(--display);
  font-weight: 600;
  padding: 0 0.35rem;
  color: var(--ink);
}

.ap-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
}

.ap-field-row label,
.ap-inputs label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.ap-field-row input,
.ap-field-row select,
.ap-inputs input,
.ap-inputs select,
.ap-scenario select {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0.35rem 0.55rem;
}

.ap-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.8rem 0 1.2rem;
}

.ap-table th,
.ap-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.5rem;
}

.ap-table caption {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.ap-table tfoot th {
  font-weight: 600;
}

.ap-scroll {
  overflow-x: auto;
}

.ap-scenario-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ap-scenario {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
}

.ap-scenario header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.ap-scenario h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}

.ap-badge,
.ap-status {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
}

.ap-badge {
  background: var(--mist);
  color: var(--navy);
}

.ap-status.ap-ok {
  background: var(--output-bg);
  color: var(--output-ink);
}

.ap-status.ap-fail {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.ap-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0.75rem 0;
}

.ap-kpi-row dt {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.ap-kpi-row dd {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.ap-scenario-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.4rem;
}

.ap-scenario-actions label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1 1 8rem;
}

.ap-scenario,
.ap-cost-breakdown {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ap-cost-breakdown {
  margin: 0.35rem 0 0.15rem;
  max-width: 100%;
}

.ap-cost-caption {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.ap-cost-layer + .ap-cost-layer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.ap-cost-layer-title {
  margin: 0 0 0.4rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.ap-cost-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ap-cost-line {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.ap-cost-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ap-cost-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
}

.ap-cost-item {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
}

.ap-cost-amount {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.ap-cost-basis,
.ap-cost-explanation {
  margin: 0.18rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.ap-cost-meta-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-mid);
}

.ap-cost-totals {
  display: grid;
  gap: 0.3rem;
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.ap-cost-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.ap-cost-totals dt {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.ap-cost-totals dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 600;
}

.ap-criteria .ap-criterion {
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem 1rem;
}

.ap-criteria legend {
  font-weight: 600;
  color: var(--ink);
}

.ap-reco-card {
  background: var(--mist);
  border-left: 3px solid var(--navy);
  padding: 1rem 1.1rem;
}

.ap-reco-card h3 {
  font-family: var(--display);
  margin: 0.2rem 0 0.55rem;
  color: var(--ink);
}

.ap-story {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.ap-story > div {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.ap-story dt {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.ap-story dd {
  margin: 0.25rem 0 0;
}

.status-note {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .ap-scenario-board {
    grid-template-columns: 1fr;
  }

  .ap-field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-scenario,
  .ap-reco-card {
    transition: none;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .filters,
  .mode-switch,
  .pipeline-controls,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .term-pop {
    display: none !important;
  }

  a {
    text-decoration: underline;
  }
}
