:root {
  --page: #ffffff;
  --ink: #071923;
  --muted: #5d6b73;
  --subtle: #f4f7f8;
  --surface: #ffffff;
  --line: #e3eaed;
  --line-strong: #c7d2d8;
  --accent: #00a88e;
  --accent-dark: #00756a;
  --blue: #0b68b6;
  --amber: #b76622;
  --shadow: 0 22px 55px rgba(7, 25, 35, 0.09);
  --soft-shadow: 0 10px 30px rgba(7, 25, 35, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 168, 142, 0.42);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border: 1px solid var(--ink);
  background: #ffffff;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--soft-shadow);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.nav,
.hero,
.architecture-band,
.metrics,
.trust-strip,
.latest-update,
.section,
.about,
.notes,
.contact,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.nav,
.brand,
.nav-menu,
.nav-links,
.hero-actions,
.card-topline,
.contact {
  display: flex;
  align-items: center;
}

.nav {
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand {
  gap: 12px;
  min-width: 330px;
}

.brand img {
  width: 60px;
  height: auto;
}

.brand span {
  display: grid;
  gap: 3px;
}

.brand strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.05;
}

.brand small {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nav-menu {
  justify-content: flex-end;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
}

.nav-links {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(14px, 2.2vw, 30px);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.nav-links a {
  border-bottom: 2px solid transparent;
  padding: 28px 0 24px;
}

.nav-links a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

[id],
.section,
.hero {
  scroll-margin-top: 104px;
}

.hero {
  padding: clamp(78px, 9vw, 122px) 0 clamp(56px, 7vw, 88px);
}

.hero-banner {
  position: relative;
  width: 100%;
  min-height: clamp(620px, 72vh, 820px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 10, 18, 0.94) 0%, rgba(3, 10, 18, 0.82) 32%, rgba(3, 10, 18, 0.42) 68%, rgba(3, 10, 18, 0.18) 100%),
    linear-gradient(180deg, rgba(3, 10, 18, 0.08), rgba(3, 10, 18, 0.72)),
    url("/assets/hero-control-plane-banner.png?v=20260807") center / cover no-repeat;
  color: #ffffff;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  min-height: clamp(520px, 62vh, 720px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(220px, 1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.55rem, 4.25vw, 4.55rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.86rem, 2.8vw, 3.05rem);
  letter-spacing: 0;
  line-height: 1.08;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.28rem;
}

.lead,
.credential,
.section-heading p,
.project-card p,
.project-card li,
.evidence-grid p,
.screenshot-card figcaption,
.proof-strip span,
.contact p,
.site-footer p {
  color: var(--muted);
  line-height: 1.66;
}

.lead {
  max-width: 720px;
  margin-bottom: 16px;
  color: #43545d;
  font-size: 1.14rem;
  line-height: 1.7;
}

.hero-banner .eyebrow {
  color: #5ee4d1;
}

.hero-banner h1,
.hero-banner .hero-proof {
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

.hero-banner .lead,
.hero-banner .credential {
  color: rgba(255, 255, 255, 0.82);
}

.hero-proof {
  max-width: 720px;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.42rem, 2.2vw, 2.05rem);
  font-weight: 700;
  line-height: 1.16;
}

.credential {
  max-width: 650px;
  margin-bottom: 34px;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  font-size: 0.98rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  padding: 0 19px;
  font-size: 0.92rem;
  font-weight: 700;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.hero-banner .button.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--ink);
}

.hero-banner .button.primary:hover {
  background: #dff7f2;
}

.hero-banner .button.secondary {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hero-banner .button.secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.button.primary:hover {
  background: #12323e;
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: var(--accent-dark);
}

.system-map,
.project-card,
.metrics div,
.screenshot-card,
.evidence-grid div {
  border: 1px solid var(--line);
  background: var(--surface);
}

.system-map {
  min-height: 438px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--soft-shadow);
}

.architecture-band {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  margin-bottom: 22px;
}

.architecture-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.45fr);
  gap: clamp(20px, 3vw, 34px);
  min-height: 0;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.architecture-panel .map-header {
  align-content: center;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  padding: 0 clamp(18px, 3vw, 32px) 0 0;
}

.architecture-panel .map-header strong {
  max-width: 430px;
}

.architecture-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.map-header {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.map-header img {
  width: 58px;
  height: 58px;
}

.map-header span,
.map-row span,
.card-topline span,
.card-topline em {
  color: var(--accent-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.map-header strong {
  max-width: 370px;
  font-size: 1.36rem;
  line-height: 1.24;
}

.map-row {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 14px;
  border-left: 2px solid var(--accent);
  background: #fbfcfd;
  padding: 17px;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.architecture-rows .map-row {
  margin-top: 0;
}

.map-row:nth-child(3) {
  border-left-color: var(--blue);
}

.map-row:nth-child(4) {
  border-left-color: #4367df;
}

.map-row:hover {
  background: #f4fbf9;
  box-shadow: var(--soft-shadow);
  transform: translateY(-2px);
}

.map-row small {
  color: var(--muted);
  line-height: 1.5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 98px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--ink);
  margin-bottom: 0;
}

.trust-strip span {
  flex: 1 1 180px;
  min-height: 62px;
  border-right: 1px solid var(--line);
  padding: 21px 18px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.trust-strip span:last-child {
  border-right: 0;
}

.latest-update {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.35fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  margin-top: 18px;
  margin-bottom: 92px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #fbfcfd;
  padding: clamp(18px, 2.6vw, 26px);
  box-shadow: var(--soft-shadow);
}

.latest-update .eyebrow {
  margin-bottom: 8px;
}

.latest-update h2 {
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.42rem);
  line-height: 1.2;
}

.latest-update p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.latest-update a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  padding: 0 16px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.latest-update a:hover {
  border-color: var(--accent-dark);
  background: #effbf8;
}

.metrics div {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border-width: 0 1px 0 0;
  padding: 28px;
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  color: var(--ink);
  font-size: clamp(1.78rem, 3vw, 2.45rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
}

.section {
  padding-bottom: 108px;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1fr);
  gap: clamp(34px, 5vw, 70px);
  border-top: 1px solid var(--line);
  padding-top: 72px;
  padding-bottom: 108px;
}

.about-copy {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--soft-shadow);
}

.about-copy p {
  color: var(--muted);
  line-height: 1.72;
}

.about-copy p:last-of-type {
  margin-bottom: 22px;
}

.about-copy a {
  color: var(--blue);
  font-weight: 800;
}

.section-heading {
  max-width: 830px;
}

.screenshot-section .section-heading {
  max-width: 900px;
}

.screenshot-card {
  margin: 38px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-card figcaption {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 16px 18px;
  background: #ffffff;
  font-size: 0.94rem;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.proof-strip div {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.proof-strip strong {
  display: block;
  margin-bottom: 8px;
}

.proof-strip span {
  display: block;
  font-size: 0.92rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.project-card {
  min-height: 0;
  padding: 26px;
  scroll-margin-top: 104px;
  box-shadow: var(--soft-shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card > * {
  min-width: 0;
}

.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-card.featured {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  column-gap: clamp(24px, 4vw, 48px);
  grid-column: 1 / -1;
  border-top: 3px solid var(--accent);
}

.project-card.featured > .card-topline,
.project-card.featured > h3,
.project-card.featured > .repo-signals,
.project-card.featured > .project-promise,
.project-card.featured > .tag-row,
.project-card.featured > .case-study-grid,
.project-card.featured > .project-actions {
  grid-column: 2;
}

.project-card.featured > .project-visual {
  grid-column: 1;
  grid-row: 1 / span 7;
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  min-height: 100%;
}

.project-card.research-card {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 48px);
  grid-column: 1 / -1;
  border-top: 3px solid #4367df;
}

.project-card.research-card > .card-topline,
.project-card.research-card > h3,
.project-card.research-card > .repo-signals,
.project-card.research-card > .project-promise,
.project-card.research-card > .tag-row,
.project-card.research-card > .case-study-grid,
.project-card.research-card > .project-actions {
  grid-column: 2;
}

.project-card.research-card > .project-visual,
.project-card.research-card > .project-visual-stack {
  grid-column: 1;
  grid-row: 1 / span 7;
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.project-card.research-card > .project-visual {
  min-height: 100%;
}

.project-visual-stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

.project-visual-stack .project-visual {
  margin: 0;
}

.project-visual-stack .project-visual--diagram {
  aspect-ratio: 16 / 9;
}

.project-visual--console {
  aspect-ratio: 16 / 9;
  background: #ffffff;
}

.project-visual--console img {
  object-fit: cover;
  object-position: top left;
}

.card-topline {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.card-topline em {
  color: var(--amber);
}

.project-visual {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--subtle);
  aspect-ratio: 16 / 9;
}

.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.project-visual--diagram {
  background: #f7fafb;
}

.project-visual--diagram img {
  object-fit: contain;
  object-position: center;
  padding: clamp(10px, 1.6vw, 18px);
}

.project-visual figcaption,
.project-visual span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(11, 31, 40, 0.86);
  padding: 6px 8px;
  color: #ffffff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-visual:focus-visible {
  outline: 3px solid rgba(0, 168, 142, 0.42);
  outline-offset: 4px;
}

.project-card ul {
  display: grid;
  gap: 9px;
  margin: 14px 0 22px;
  padding-left: 19px;
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.case-study-grid div {
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 16px;
}

.case-study-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.92rem;
}

.case-study-grid p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.project-promise {
  margin-bottom: 14px;
  color: var(--ink) !important;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5 !important;
}

.repo-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: -4px 0 15px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.repo-signals a,
.repo-signals span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-right: 1px solid var(--line);
  padding: 0 10px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.repo-signals a:last-child,
.repo-signals span:last-child {
  border-right: 0;
}

.repo-signals a {
  color: var(--accent-dark);
}

.repo-signals a:hover {
  background: #effbf8;
  color: var(--ink);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tag-row span {
  border: 1px solid var(--line);
  background: var(--subtle);
  padding: 6px 9px;
  color: var(--accent-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card a:not(.button):not(.project-visual) {
  display: inline-block;
  color: var(--blue);
  font-weight: 800;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.project-actions .button {
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.project-actions .repo-link {
  min-height: 40px;
  display: inline-flex !important;
  align-items: center;
  color: var(--muted) !important;
  font-size: 0.88rem;
  line-height: 1;
}

.project-actions .repo-link:hover {
  color: var(--blue) !important;
}

.evidence {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  align-items: start;
  gap: 46px;
  border-top: 1px solid var(--line);
  padding-top: 72px;
}

.evidence-grid {
  display: grid;
  gap: 14px;
}

.evidence-grid div {
  min-height: 138px;
  padding: 20px;
}

.evidence-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.notes {
  border-top: 1px solid var(--line);
  padding-top: 72px;
}

.notes-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-top: 34px;
}

.note-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 230px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--soft-shadow);
}

.note-card-featured {
  border-top: 3px solid var(--accent);
}

.notes-list {
  display: grid;
  gap: 10px;
}

.note-link {
  display: grid;
  gap: 8px;
  min-height: 72px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 17px 18px;
  box-shadow: var(--soft-shadow);
}

.note-link:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.note-card span,
.note-link span,
.article-meta {
  color: var(--accent-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note-card h3 {
  margin-bottom: 0;
}

.note-link strong {
  color: var(--ink);
  line-height: 1.25;
}

.note-card p {
  color: var(--muted);
  line-height: 1.62;
}

.note-card a,
.article-body a {
  color: var(--blue);
  font-weight: 800;
}

.identity-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.identity-links a,
.research-identity a {
  overflow-wrap: anywhere;
}

.research {
  border-top: 1px solid var(--line);
  padding-top: 72px;
}

.research-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 34px;
}

.research-paper {
  display: grid;
  align-content: start;
  gap: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--soft-shadow);
}

.primary-paper {
  border-top: 3px solid var(--accent);
}

.research-paper h3 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.research-paper p {
  color: var(--muted);
  line-height: 1.68;
}

.boundary-note {
  border-left: 3px solid var(--blue);
  background: #f7fafb;
  padding: 14px 16px;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.research-identity {
  margin-top: 18px;
  color: var(--muted);
}

.research-identity a {
  color: var(--blue);
  font-weight: 800;
}

.article-nav-links {
  justify-content: flex-end;
}

.article-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 92px) 0 88px;
}

.article-page h1 {
  max-width: 820px;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.02;
}

.article-lead {
  max-width: 760px;
  margin-bottom: 34px;
  color: #43545d;
  font-size: 1.16rem;
  line-height: 1.7;
}

.article-body {
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.article-body h2 {
  margin-top: 38px;
  font-size: clamp(1.42rem, 2.3vw, 2rem);
}

.article-body p,
.article-body li {
  color: var(--muted);
  line-height: 1.74;
}

.article-body ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.article-body ol {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.article-figure {
  margin: 34px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-figure a,
.article-figure img {
  display: block;
}

.article-figure figcaption a {
  color: var(--blue);
  display: inline;
  font-weight: 800;
}

.article-figure img {
  width: 100%;
  height: auto;
}

.article-figure figcaption {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.architecture-diagram {
  background: #f7fafb;
}

.architecture-diagram img {
  padding: clamp(10px, 2vw, 18px);
}

.wide-diagram {
  width: min(1180px, calc(100vw - 40px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.case-diagram {
  background: #f7fafb;
  box-shadow: none;
}

.case-diagram img {
  padding: clamp(8px, 1.6vw, 16px);
}

.diagram-view-body {
  background: #f5f8fa;
}

.workflow-viewer-page {
  width: min(100% - 20px, 1760px);
  margin: 0 auto;
  padding: 10px 0 18px;
}

.workflow-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 8px 10px 8px 14px;
}

.workflow-viewer-header h1 {
  max-width: none;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.workflow-viewer-header p:not(.article-meta) {
  margin-top: 3px;
  margin-bottom: 0;
  max-width: none;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.workflow-viewer-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workflow-viewer-actions .button {
  min-height: 38px;
  padding: 10px 14px;
  font-size: 0.86rem;
}

.workflow-diagram-viewer {
  margin: 0;
  border: 1px solid var(--line);
  background: #f7fafb;
  box-shadow: var(--shadow);
}

.workflow-diagram-scroll {
  overflow: auto;
  padding: 12px;
  max-height: calc(100vh - 154px);
}

.workflow-diagram-scroll:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.workflow-diagram-scroll img {
  display: block;
  width: 1600px;
  max-width: none;
  height: auto;
}

.workflow-diagram-viewer figcaption {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.evidence-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.evidence-link-grid a {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 17px 18px;
}

.evidence-link-grid a:hover {
  border-color: var(--accent-dark);
  background: #effbf8;
}

.evidence-link-grid span {
  color: var(--accent-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evidence-link-grid strong {
  color: var(--ink);
}

.capability-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.capability-matrix div {
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 17px 18px;
}

.capability-matrix strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.capability-matrix p {
  margin-bottom: 0;
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.contact {
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 46px;
  padding-bottom: 72px;
}

.contact div {
  max-width: 760px;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  justify-content: end;
  max-width: 520px;
}

.contact-actions .button {
  justify-content: center;
  width: 100%;
  text-align: center;
}

.contact-actions .button:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 34px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-start;
  min-width: 220px;
}

.footer-links a {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.legal-page .article-body h2:first-child {
  margin-top: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .about,
  .architecture-panel,
  .evidence {
    grid-template-columns: 1fr;
  }

  .metrics,
  .project-grid,
  .proof-strip,
  .notes-layout,
  .research-grid,
  .evidence-link-grid,
  .capability-matrix,
  .architecture-rows {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-template-columns: 1fr;
  }

  .project-card.research-card {
    grid-template-columns: 1fr;
  }

  .project-card.featured > .card-topline,
  .project-card.featured > h3,
  .project-card.featured > .repo-signals,
  .project-card.featured > .project-promise,
  .project-card.featured > .tag-row,
  .project-card.featured > .case-study-grid,
  .project-card.featured > .project-actions,
  .project-card.featured > .project-visual,
  .project-card.research-card > .card-topline,
  .project-card.research-card > h3,
  .project-card.research-card > .repo-signals,
  .project-card.research-card > .project-promise,
  .project-card.research-card > .tag-row,
  .project-card.research-card > .case-study-grid,
  .project-card.research-card > .project-actions,
  .project-card.research-card > .project-visual,
  .project-card.research-card > .project-visual-stack {
    grid-column: auto;
    grid-row: auto;
  }

  .project-card.featured > .project-visual,
  .project-card.research-card > .project-visual {
    margin-bottom: 20px;
    min-height: 0;
  }

  .metrics div {
    border-width: 0 0 1px 0;
  }

  .latest-update {
    grid-template-columns: 1fr;
  }

  .latest-update a {
    justify-self: start;
  }

  .system-map {
    min-height: 0;
  }

  .architecture-band {
    margin-top: 20px;
  }

  .architecture-panel .map-header {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 22px;
  }

  .hero-banner {
    min-height: 0;
    background-position: 58% center;
  }

  .hero-grid {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .nav,
    .hero,
    .architecture-band,
    .metrics,
    .trust-strip,
    .latest-update,
    .section,
    .about,
    .notes,
    .contact,
    .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .nav,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .paper-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .paper-actions .button {
    justify-content: center;
    width: 100%;
  }

  .nav {
    padding: 12px 0;
  }

  .nav-menu {
    width: 100%;
    align-items: flex-end;
    flex-direction: column;
  }

  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line-strong);
    padding: 0 13px;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }

  .nav-toggle-label::after {
    content: "+";
    margin-left: 10px;
    color: var(--accent-dark);
  }

  .nav-toggle:checked + .nav-toggle-label::after {
    content: "-";
  }

  .brand img {
    width: 58px;
  }

  .nav-links {
    display: none;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 0 0 10px;
  }

  .hero-banner {
    padding-top: 34px;
    padding-bottom: 38px;
  }

  .hero-banner h1 {
    font-size: clamp(1.86rem, 8.25vw, 2.48rem);
    line-height: 1.05;
    margin-bottom: 18px;
  }

  .hero-banner .lead {
    margin-bottom: 12px;
    font-size: 0.96rem;
    line-height: 1.58;
  }

  .hero-banner .hero-proof {
    margin-bottom: 14px;
    font-size: 1.16rem;
  }

  .hero-banner .credential {
    margin-bottom: 20px;
    padding-left: 14px;
    font-size: 0.86rem;
    line-height: 1.52;
  }

  .hero-actions {
    gap: 10px;
  }

  .button {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.86rem;
  }

  .trust-strip span {
    flex-basis: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .trust-strip span:last-child {
    border-bottom: 0;
  }

  .latest-update {
    margin-bottom: 66px;
    padding: 18px;
  }

  .latest-update h2 {
    font-size: 1.1rem;
  }

  .project-card {
    min-height: 0;
    padding: 18px;
  }

  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .repo-signals {
    display: inline-flex;
  }

  .repo-signals a,
  .repo-signals span {
    min-height: 30px;
  }

  .article-page {
    width: min(100% - 28px, 860px);
  }

  .card-topline {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .contact-actions {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .contact-actions .button:nth-child(n + 3) {
    grid-column: auto;
  }

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