:root{
    --bg:#0b0d12;
    --panel:#111522;
    --panel-2:#0f1420;
    --panel-3:#151b2a;
    --text:#e8edf7;
    --muted:#aab3c5;
    --faint:#7f8aa3;
    --border:#242b3d;
    --code:#0d1322;
    --accent:#7aa2ff;
    --accent2:#7bffcc;
    --accent3:#c8a8ff;
    --warn:#ffd27a;
    --shadow: 0 18px 60px rgba(0,0,0,.35);
    --radius: 12px;
    --max: 1180px;
    --content: 740px;
    --rail: 280px;
    --section-space: clamp(72px, 9vw, 112px);
    --sticky-offset: 62px;
    --border-strong: #354057;
    --surface-flat: #0d1118;
    --surface-raised: #111722;
    --success: #86d7b8;
    --danger: #ee9a9a;
    --info: #91adff;
    --shadow-soft: 0 12px 36px rgba(0,0,0,.22);
}

*{ box-sizing:border-box; }
html{
    color-scheme:dark;
    scroll-behavior:smooth;
    scroll-padding-top:calc(var(--sticky-offset) + 24px);
}
body{
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    background:
    radial-gradient(1200px 650px at 10% -10%, rgba(122,162,255,.18), transparent 60%),
    radial-gradient(900px 550px at 100% 0%, rgba(123,255,204,.08), transparent 55%),
    linear-gradient(180deg, #0a0d14 0%, #0b0d12 100%);
    color:var(--text);
    line-height:1.65;
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.shell{
    width:min(var(--max), calc(100% - 40px));
    margin:0 auto;
    padding:34px 0 80px;
}

.eyebrow{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:8px 12px;
    border:1px solid rgba(122,162,255,.25);
    background:rgba(122,162,255,.08);
    border-radius:999px;
    color:#d7e4ff;
    font-size:.83rem;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.hero{
    padding: 0px 0 22px;
}

.hero-grid{
    display:grid;
    grid-template-columns: 1.5fr .95fr;
    gap:28px;
    align-items:start;
}

h1{
    margin:16px 0 14px;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    line-height:.98;
    letter-spacing:-.04em;
}

.subtitle{
    max-width: 820px;
    font-size:1.18rem;
    color:var(--muted);
    margin:0 0 18px;
}

.hero-copy p{
    color:var(--muted);
    margin:0 0 14px;
    max-width:820px;
}

.pillrow{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
}

.pill{
    padding:9px 12px;
    border:1px solid var(--border);
    background:rgba(255,255,255,.03);
    border-radius:999px;
    color:#dbe4f7;
    font-size:.92rem;
}

.card{
    background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.hero-card{
    padding:18px;
    position:relative;
    overflow:hidden;
}

.hero-card:before{
    content:"";
    position:absolute;
    inset:-20% -10% auto auto;
    width:240px;
    height:240px;
    background: radial-gradient(circle, rgba(122,162,255,.16), transparent 65%);
    pointer-events:none;
}

.hero-card h2{
    margin:0 0 12px;
    font-size:1.5rem;
}

.metric-list{
    display:grid;
    gap:10px;
    margin:0;
    padding:0;
    list-style:none;
}

.metric-list li{
    display:grid;
    grid-template-columns: 120px 1fr;
    gap:12px;
    padding:10px 0;
    border-top:1px solid rgba(255,255,255,.06);
}

.metric-list li:first-child{ border-top:0; padding-top:0; }
.metric-list strong{ color:#dfe8fb; }
.metric-list span{ color:var(--muted); }

main{ margin-top:18px; }

.content-panel{
    margin-top:26px;
    padding:24px;
}

h2{
    margin:0 0 10px;
    font-size:1.65rem;
    letter-spacing:-.02em;
}

h3{
    margin:0 0 10px;
    font-size:1.08rem;
}

p{ margin:0 0 14px; }
p:last-child{ margin-bottom:0; }

.lede{
    color:#dbe4f7;
    font-size:1.05rem;
    max-width: 950px;
}

.muted{ color:var(--muted); }
.faint{ color:var(--faint); }

.grid{
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:18px;
}

.grid-3{
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap:16px;
}

.mini{
    padding:18px;
}

.mini h3{ margin-bottom:8px; }
.mini p, .mini li{ color:var(--muted); }
.mini ul{
    margin:10px 0 0 18px;
    padding:0;
}

.tldr{
    padding:18px 18px;
    background:
    linear-gradient(180deg, rgba(122,162,255,.08), rgba(122,162,255,.02));
    border:1px solid rgba(122,162,255,.2);
}

.falsification{
    background:
    linear-gradient(180deg, rgba(255,210,122,.075), rgba(122,162,255,.025));
    border-color:rgba(255,210,122,.28);
}

.falsification .step{
    border-color:rgba(255,210,122,.16);
    background:rgba(255,210,122,.035);
}

.falsification .step strong{
    color:#fff2d6;
}

.snapshot{
    padding:18px;
}

.snapshot-grid{
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:16px;
    margin-top:14px;
}

.stat{
    background:rgba(255,255,255,.025);
    border:1px solid rgba(255,255,255,.06);
    border-radius:14px;
    padding:14px;
}

.stat .label{
    color:var(--faint);
    font-size:.82rem;
    letter-spacing:.06em;
    text-transform:uppercase;
    margin-bottom:8px;
}

.stat .value{
    color:#eef4ff;
    font-size:1rem;
    font-weight:600;
    line-height:1.4;
}

.callout{
    padding:16px 18px;
    border:1px solid rgba(123,255,204,.2);
    background:linear-gradient(180deg, rgba(123,255,204,.08), rgba(123,255,204,.02));
    border-radius:14px;
    color:#dffcf2;
    margin-top:16px;
}

.callout.warn{
    border-color: rgba(255,210,122,.22);
    background: linear-gradient(180deg, rgba(255,210,122,.08), rgba(255,210,122,.02));
    color:#fff2d6;
}

.callout + p {
  margin-top: 16px;
}

ul.clean{
    margin:10px 0 0 18px;
    padding:0;
}

ul.clean li{ margin:8px 0; color:var(--muted); }

.diagram{
    margin-top:14px;
    padding:16px 18px;
    background:linear-gradient(180deg, rgba(13,19,34,.95), rgba(13,19,34,.75));
    border:1px solid rgba(122,162,255,.16);
    border-radius:14px;
    font: .92rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color:#dce7ff;
    overflow:auto;
    white-space:pre;
}

.diagram + p {
  margin-top: 18px;
}

.steps{
    display:grid;
    gap:12px;
    margin-top:14px;
}

.step{
    padding:14px 16px;
    border:1px solid rgba(255,255,255,.07);
    background:rgba(255,255,255,.025);
    border-radius:14px;
}

.step strong{
    display:block;
    margin-bottom:5px;
    color:#eef4ff;
}

.codeblock{
    margin-top:14px;
    background:linear-gradient(180deg, #0a1220, #0c1424);
    border:1px solid rgba(122,162,255,.16);
    border-radius:16px;
    overflow:hidden;
}

.codeblock pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.codehead{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 16px;
    border-bottom:1px solid rgba(255,255,255,.06);
    background:rgba(255,255,255,.02);
    color:var(--muted);
    font-size:.88rem;
}

pre{
    margin:0;
    padding:18px;
    overflow:auto;
    color:#dce8ff;
    font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.two-col-copy{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:18px;
    align-items:start;
}

.footer-note{
    margin-top:18px;
    color:var(--faint);
    font-size:.93rem;
}

@media (max-width: 980px){
    .hero-grid,
    .grid,
    .grid-3,
    .snapshot-grid,
    .two-col-copy{
    grid-template-columns: 1fr;
    }
    .metric-list li{
    grid-template-columns: 1fr;
    gap:4px;
    }
    .shell{
    width:min(var(--max), calc(100% - 24px));
    }
    .content-panel{ padding:20px; }
}

.site-header {
  margin-bottom: 28px;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  position: relative;
  padding-bottom: 6px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.active {
  color: var(--text);
  font-weight: 600;
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

@media (max-width: 768px) {

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

}

@media (max-width: 780px) {
  .site-title {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 0;
  }

  .site-title__name,
  .site-title__email {
    display: inline;
  }
}

.related {
  margin-top: 28px;
}

.related a {
  text-decoration: none;
}

.related .mini {
  transition: transform .12s ease, border-color .12s ease;
}

.related .mini:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.render-figure {
  margin-top: 20px;
  text-align: center;
}

.render-figure img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 540px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.site-title__name,
.site-title__email {
  display: block;
}

.site-title__email {
    color: var(--muted);
    font-size: 0.9rem;
}


/* =========================================================
   LoopRelay engineering case study
   ========================================================= */

body.project-page {
  background: linear-gradient(180deg, #0a0d13 0, #0b0d12 460px, #0b0d12 100%);
}

.project-page .shell {
  padding-top: 34px;
}

.case-study-page {
  width: 100%;
  margin-top: 0;
}

.case-study-page section[id] {
  scroll-margin-top: calc(var(--sticky-offset) + 24px);
}

.case-study-page .card {
  border-radius: var(--radius);
  box-shadow: none;
}

.case-study-page .card--raised {
  box-shadow: var(--shadow-soft);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #07101e;
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(122, 162, 255, .75);
  outline-offset: 3px;
  border-radius: 4px;
}

.project-hero {
  padding: clamp(52px, 8vw, 96px) 0 42px;
}

.project-hero .hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(34px, 6vw, 70px);
  align-items: center;
}

.project-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(3.25rem, 7vw, 5.4rem);
  line-height: .94;
}

.project-hero .eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
}

.hero-thesis {
  max-width: 760px;
  margin: 0 0 18px;
  color: #dce4f2;
  font-size: clamp(1.22rem, 2.2vw, 1.55rem);
  line-height: 1.42;
}

.hero-copy .hero-thesis {
  color: #dce4f2;
}

.hero-summary {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-motivation {
  position: relative;
  max-width: 700px;
  margin: 22px 0 0;
  padding-left: 18px;
  color: #dce5f3;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-motivation::before {
  position: absolute;
  inset: 3px auto 3px 0;
  width: 2px;
  background: var(--accent);
  content: "";
}

.hero-visual {
  position: relative;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  background: var(--surface-flat);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.hero-visual figcaption {
  margin-top: 14px;
  color: var(--faint);
  font-size: .78rem;
  line-height: 1.45;
}

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

.hero-visual__title {
  margin: 0 0 16px;
  color: var(--text);
  font-size: .98rem;
  letter-spacing: -.01em;
}

.runtime-diagrams {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(150px, .88fr);
  gap: 14px;
}

.runtime-diagram {
  min-width: 0;
}

.diagram-kicker,
.cli-example__label {
  margin: 0 0 9px;
  color: var(--faint);
  font: 700 .68rem/1.2 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.runtime-topology,
.invocation-flow {
  display: grid;
  gap: 6px;
}

.runtime-core {
  padding: 8px;
  background: rgba(122,162,255,.025);
  border: 1px solid rgba(122,162,255,.22);
  border-radius: 10px;
}

.runtime-core__cli {
  color: #dce7ff;
  font-weight: 700;
}

.runtime-systems {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.runtime-system,
.invocation-step {
  padding: 8px 9px;
  background: rgba(255,255,255,.018);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.runtime-system strong,
.runtime-system span {
  display: block;
}

.runtime-system strong {
  color: var(--text);
  font-size: .78rem;
  line-height: 1.3;
}

.runtime-system span {
  margin-top: 2px;
  color: var(--faint);
  font-size: .65rem;
  line-height: 1.35;
}

.invocation-step {
  color: #dce7ff;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.28;
  text-align: center;
}

.invocation-step--outcome {
  color: #fff0cf;
  background: rgba(255,210,122,.04);
  border-color: rgba(255,210,122,.2);
}

.physical-orientation {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, .72fr);
  gap: clamp(28px, 5vw, 64px);
  margin-top: 42px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.physical-orientation h2 {
  margin: 0 0 13px;
  color: var(--text);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}

.physical-orientation__copy p,
.cli-example__caption {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.physical-orientation__copy code,
.cli-example__caption code {
  color: #dce7ff;
  font-size: .92em;
}

.cli-example {
  min-width: 0;
}

.cli-example pre {
  max-width: 100%;
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: #dce7ff;
  background: #090f1b;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font: 500 .78rem/1.65 ui-monospace, monospace;
  white-space: pre;
}

.cli-example__caption {
  margin-top: 10px;
  color: var(--faint);
  font-size: .76rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: .94rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: background-color .14s ease, border-color .14s ease, transform .14s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button--primary {
  color: #08101f;
  background: var(--accent);
  border-color: var(--accent);
}

.button--primary:hover {
  color: #08101f;
  background: #91b0ff;
  border-color: #91b0ff;
}

.button--secondary {
  color: var(--text);
  background: rgba(255,255,255,.025);
}

.button--secondary:hover {
  border-color: var(--accent);
  background: rgba(122,162,255,.06);
}

.project-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: var(--muted);
  font-size: .77rem;
  font-weight: 650;
  letter-spacing: .045em;
  line-height: 1.35;
  text-transform: uppercase;
}

.status-chip::before {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  content: "";
}

.status-chip--public::before,
.status-chip--validated::before {
  background: var(--success);
}

.status-chip--bounded::before {
  background: var(--accent);
}

.status-chip--unproven::before {
  background: var(--warn);
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 42px;
  border-top: 1px solid var(--border);
}

.evidence-stat {
  min-width: 0;
  padding: 22px 24px;
  border-left: 1px solid var(--border);
}

.evidence-stat:first-child {
  border-left: 0;
}

.evidence-stat__value {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1;
}

.evidence-stat__label {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.evidence-caveat {
  max-width: 900px;
  margin-top: 14px;
  color: var(--faint);
  font-size: .84rem;
  line-height: 1.5;
}

.case-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-inline: 0;
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid var(--border);
  background: rgba(11,13,18,.9);
  backdrop-filter: blur(14px);
}

.case-nav__inner {
  display: flex;
  width: 100%;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.case-nav__inner::-webkit-scrollbar {
  display: none;
}

.case-nav a {
  flex: 0 0 auto;
  padding: 15px 14px;
  color: var(--faint);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.case-nav a:hover {
  color: var(--text);
}

.case-nav a[aria-current="true"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.case-study-page .case-section {
  margin: 0;
  padding: var(--section-space) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.case-study-page .case-section:first-child {
  border-top: 0;
}

.section-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.case-study-page .section-heading {
  max-width: 900px;
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.section-lede {
  max-width: 780px;
  margin: 0 0 34px;
  color: #d7deeb;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.55;
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(0,var(--content)) minmax(230px,var(--rail));
  gap: clamp(38px, 6vw, 76px);
  align-items: start;
  justify-content: space-between;
}

.section-copy {
  min-width: 0;
}

.section-rail {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.section-rail--sticky {
  position: sticky;
  top: calc(var(--sticky-offset) + 28px);
}

.section-rail__label {
  margin-bottom: 12px;
  color: var(--faint);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.section-rail p,
.section-rail li {
  color: var(--muted);
  font-size: .89rem;
}

.section-rail ul,
.source-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-rail li + li,
.source-links li + li {
  margin-top: 10px;
}

.section-wide {
  grid-column: 1 / -1;
}

.prose {
  max-width: var(--content);
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.prose code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose a:not(.button) {
  text-decoration: underline;
  text-decoration-color: rgba(122,162,255,.45);
  text-underline-offset: .18em;
}

.prose a:not(.button):hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 8px;
}

.figure {
  margin: 42px 0 0;
}

.figure__frame {
  padding: clamp(20px,3vw,32px);
  background: var(--surface-flat);
  border-radius: 12px;
}

.figure img,
.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  max-width: 820px;
  margin-top: 11px;
  color: var(--faint);
  font-size: .84rem;
  line-height: 1.5;
}

.figure--compact {
  max-width: 620px;
}

.figure--breakout {
  width: min(var(--max), calc(100vw - 40px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.case-study-page .render-figure img {
  max-width: none;
  border-radius: 10px;
}

.case-study-page .diagram {
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: none;
  font-size: clamp(.76rem,1.3vw,.9rem);
  line-height: 1.55;
}

.claim-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}

.claim-label--observed,
.claim-label--exercised {
  color: #cbd9ff;
  border-color: rgba(122,162,255,.34);
  background: rgba(122,162,255,.055);
}

.claim-label--implemented,
.claim-label--validated {
  color: #c9f4e4;
  border-color: rgba(134,215,184,.32);
  background: rgba(134,215,184,.05);
}

.claim-label--developing,
.claim-label--unproven {
  color: #ffe5b4;
  border-color: rgba(255,210,122,.3);
  background: rgba(255,210,122,.05);
}

.claim-label--assisted {
  color: #dfd3f8;
  border-color: rgba(200,168,255,.28);
  background: rgba(200,168,255,.05);
}

.claim-label--inferred {
  color: #d6dbe5;
  border-color: rgba(170,179,197,.3);
  background: rgba(170,179,197,.045);
}

.table-wrap {
  width: 100%;
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-flat);
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 15px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table th {
  color: #dce4f2;
  background: rgba(255,255,255,.025);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.data-table td {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.data-table td:first-child {
  color: var(--text);
  font-weight: 620;
}

.deletion-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 28px;
  margin-top: 34px;
}

.deletion-grid--single {
  grid-template-columns: minmax(0, var(--content));
}

.deletion-item {
  padding-top: 20px;
  border-top: 2px solid rgba(238,154,154,.55);
}

.deletion-number {
  display: block;
  color: var(--text);
  font-size: clamp(2rem,4vw,3.2rem);
  font-weight: 740;
  letter-spacing: -.045em;
  line-height: 1;
}

.deletion-label {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: .9rem;
}

.deletion-note {
  max-width: var(--content);
  margin-top: 18px;
  color: var(--faint);
  font-size: .84rem;
  line-height: 1.5;
}

.deletion-bar {
  height: 4px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.045);
  border-radius: 99px;
}

.deletion-bar > span {
  display: block;
  height: 100%;
  background: rgba(238,154,154,.7);
}

.deletion-bar--full > span { width: 100%; }

.hardening-stack {
  margin-top: 36px;
  border-top: 1px solid var(--border);
}

.hardening-case {
  display: grid;
  grid-template-columns: 66px minmax(0,1fr);
  gap: 26px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}

.hardening-index {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #d8e3fb;
  background: rgba(122,162,255,.07);
  border: 1px solid rgba(122,162,255,.2);
  border-radius: 50%;
  font: 700 .82rem/1 ui-monospace, monospace;
}

.hardening-case h3 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem,2.5vw,1.7rem);
}

.hardening-case p,
.hardening-case li {
  color: var(--muted);
}

.repository-link {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: baseline;
  margin-top: 22px;
  color: var(--faint);
  font-size: .8rem;
}

.repository-link a {
  color: #aebbd0;
  font-weight: 600;
  text-decoration: none;
}

.repository-link a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.repository-link__label {
  color: var(--faint);
  font: 700 .68rem/1.4 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-rail .repository-link {
  display: block;
}

.section-rail .repository-link__label {
  display: block;
  margin-bottom: 6px;
}

.section-rail .repository-link a {
  font-size: .82rem;
  line-height: 1.5;
}

.boundary-statement {
  display: grid;
  place-items: center;
  min-height: 88px;
  margin: 20px 0;
  padding: 16px;
  color: #dce7ff;
  background: var(--code);
  border: 1px solid rgba(122,162,255,.16);
  border-radius: 10px;
  font: 650 .92rem/1.55 ui-monospace, monospace;
  text-align: center;
}

.attribution-note {
  max-width: 960px;
  margin: 24px 0 0;
  padding: 18px 20px;
  color: #dfd3f8;
  background: rgba(200,168,255,.045);
  border: 1px solid rgba(200,168,255,.22);
  border-left: 3px solid var(--accent3);
  border-radius: 8px;
}

.attribution-note p {
  margin: 0;
}

.fit-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px;
  margin-top: 32px;
}

.permissions-boundary {
  max-width: 900px;
  margin: 38px 0;
  padding: 22px 24px;
  color: var(--muted);
  background: rgba(255,210,122,.045);
  border-left: 3px solid var(--warn);
  border-radius: 0 10px 10px 0;
}

.permissions-boundary__label {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.permissions-boundary strong {
  display: block;
  color: #fff0cf;
  font-size: clamp(1.05rem,2vw,1.3rem);
  line-height: 1.4;
}

.permissions-boundary p {
  max-width: 760px;
  margin: 10px 0 0;
}

.permissions-boundary code {
  color: #fff0cf;
}

.implementation-note {
  max-width: 900px;
  margin: 34px 0;
  padding: 20px 22px;
  color: var(--muted);
  background: rgba(122,162,255,.045);
  border: 1px solid rgba(122,162,255,.2);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
}

.implementation-note__label {
  display: block;
  margin-bottom: 9px;
  color: #afc3f3;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.implementation-note h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.4;
}

.implementation-note p:not(.repository-link) {
  margin: 10px 0 0;
}

.implementation-note code {
  overflow-wrap: anywhere;
  color: #dce7ff;
}

.fit-panel {
  padding: 22px 0 0;
  border-top: 1px solid var(--border-strong);
}

.fit-panel ul {
  margin-bottom: 0;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 28px;
  margin-top: 34px;
}

.principle {
  padding-left: 18px;
  border-left: 2px solid rgba(122,162,255,.42);
}

.principle__number {
  display: block;
  margin-bottom: 12px;
  color: var(--faint);
  font: 700 .74rem/1 ui-monospace, monospace;
}

.principle h3 {
  font-size: 1.15rem;
}

.principle p {
  color: var(--muted);
}

.closing-thesis {
  max-width: 940px;
  margin-top: 44px;
  padding: 28px 0 4px 28px;
  border-left: 3px solid var(--accent);
  color: #dce5f3;
  font-size: clamp(1.18rem,2.3vw,1.52rem);
  line-height: 1.5;
}

.decision-pullquote {
  max-width: 820px;
  margin: 38px 0;
  padding: 14px 0 14px 28px;
  color: #f1f5fb;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.42rem,3vw,2.05rem);
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.source-cta {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 30px;
  align-items: center;
  margin-top: 44px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.source-cta h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.source-cta p {
  max-width: 700px;
  color: var(--muted);
}

.source-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.todo-note {
  display: inline-block;
  padding: 3px 6px;
  color: #ffe5b4;
  background: rgba(255,210,122,.05);
  border: 1px solid rgba(255,210,122,.24);
  border-radius: 4px;
  font: 700 .69rem/1.2 ui-monospace, monospace;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: .86rem;
}

/* CSS diagrams */
.relay-loop,
.flow-stack {
  display: grid;
  gap: 8px;
}

.relay-node,
.flow-node,
.architecture-layer,
.sequence-step,
.authority-step,
.proof-step {
  padding: 11px 13px;
  color: #dce7ff;
  background: rgba(122,162,255,.045);
  border: 1px solid rgba(122,162,255,.18);
  border-radius: 8px;
  text-align: center;
}

.relay-node--human {
  color: #c9f4e4;
  background: rgba(134,215,184,.045);
  border-color: rgba(134,215,184,.25);
}

.relay-node--proof {
  color: #fff0cf;
  background: rgba(255,210,122,.04);
  border-color: rgba(255,210,122,.2);
}

.relay-arrow,
.flow-arrow,
.architecture-arrow,
.sequence-arrow,
.authority-arrow,
.proof-arrow {
  color: var(--faint);
  font: 700 1rem/1 ui-monospace, monospace;
  text-align: center;
}

.relay-branch {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.relay-judgment {
  margin-top: 16px;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: .83rem;
}

.comparison-diagram {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: clamp(24px,4vw,38px);
}

.diagram-panel {
  padding: clamp(24px,3.5vw,36px);
  background: rgba(255,255,255,.016);
  border-radius: 10px;
}

.diagram-panel h3 {
  margin-bottom: 18px;
  color: var(--faint);
  font: 700 .74rem/1 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flow-node--human {
  color: #fff0cf;
  background: rgba(255,210,122,.055);
  border-color: rgba(255,210,122,.28);
}

.architecture-stack {
  display: grid;
  gap: 10px;
}

.architecture-layer {
  padding: 16px;
  text-align: left;
}

.architecture-layer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.architecture-layer span {
  color: var(--muted);
  font-size: .86rem;
}

.architecture-layer--human {
  border-color: rgba(134,215,184,.25);
}

.architecture-layer--control {
  border-color: rgba(255,210,122,.23);
}

.architecture-split {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.architecture-layer--provider {
  border-style: dashed;
}

.figure__heading {
  margin-bottom: 16px;
}

.runtime-loop {
  display: grid;
  gap: 8px;
}

.runtime-loop__branches {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.runtime-loop__outcome {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 12px;
  color: #dce7ff;
  background: rgba(122,162,255,.045);
  border: 1px solid rgba(122,162,255,.18);
  border-radius: 8px;
  text-align: center;
}

.runtime-loop__outcome--wait {
  border-color: rgba(255,210,122,.28);
}

.runtime-loop__outcome--close {
  border-color: rgba(134,215,184,.25);
}

.runtime-loop__branch-arrow {
  color: var(--faint);
  font: 700 1rem/1 ui-monospace, monospace;
}

.runtime-loop__outcome span:last-child {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.scope-prune {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) auto minmax(220px,.65fr);
  gap: clamp(26px,4vw,44px);
  align-items: center;
}

.scope-root,
.scope-core {
  padding: clamp(22px,3vw,32px);
  border-radius: 12px;
}

.scope-root {
  background: linear-gradient(135deg, rgba(238,154,154,.065), rgba(255,255,255,.012));
}

.scope-core {
  background: linear-gradient(135deg, rgba(134,215,184,.07), rgba(255,255,255,.012));
}

.scope-root strong,
.scope-core strong {
  display: block;
  margin-bottom: 12px;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-list li {
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(238,154,154,.035);
  border-left: 2px solid rgba(238,154,154,.4);
  font-size: .82rem;
}

.scope-cut {
  color: var(--danger);
  font: 700 .82rem/1.45 ui-monospace, monospace;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.scope-core .flow-node {
  margin-top: 8px;
}

.figure-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  color: var(--muted);
  background: repeating-linear-gradient(-45deg,rgba(255,255,255,.018),rgba(255,255,255,.018) 10px,transparent 10px,transparent 20px);
  border: 1px dashed var(--border-strong);
  text-align: center;
}

.figure-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.sequence-flow,
.authority-flow,
.proof-ladder {
  display: grid;
  gap: 8px;
}

.architecture-control-flow strong,
.architecture-control-flow span {
  display: block;
}

.architecture-control-flow span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.architecture-control-flow__branches {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.architecture-control-flow__evidence {
  margin-top: 4px;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font-size: .82rem;
  text-align: center;
}

.sequence-step--intent {
  border-color: rgba(134,215,184,.25);
}

.sequence-step--unknown {
  color: #fff0cf;
  background: rgba(255,210,122,.05);
  border-color: rgba(255,210,122,.28);
}

.sequence-step--blocked {
  color: #ffcaca;
  background: rgba(238,154,154,.045);
  border-color: rgba(238,154,154,.24);
}

.drift-causal-flow .sequence-step strong,
.drift-causal-flow .sequence-step span {
  display: block;
}

.drift-causal-flow .sequence-step span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.authority-step--authority {
  border-color: rgba(200,168,255,.28);
  background: rgba(200,168,255,.045);
}

.authority-step--observation {
  border-color: rgba(134,215,184,.25);
  background: rgba(134,215,184,.04);
}

.proof-step {
  width: calc(58% + var(--proof-step, 0%));
  max-width: 100%;
  margin: 0 auto;
}

.proof-step--1 { --proof-step: 0%; }
.proof-step--2 { --proof-step: 10%; }
.proof-step--3 { --proof-step: 20%; }
.proof-step--4 { --proof-step: 30%; }
.proof-step--5 { --proof-step: 42%; border-color: rgba(134,215,184,.26); }

@media (max-width: 980px) {
  .project-hero .hero-grid,
  .section-layout,
  .principle-grid,
  .physical-orientation {
    grid-template-columns: 1fr;
  }

  .section-rail {
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .section-rail--sticky {
    position: static;
  }

  .evidence-strip {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .evidence-stat:nth-child(3) {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .evidence-stat:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .deletion-grid,
  .source-cta,
  .scope-prune {
    grid-template-columns: 1fr;
  }

  .source-cta__actions {
    justify-content: flex-start;
  }

  .scope-cut {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .runtime-loop__branches {
    grid-template-columns: 1fr;
  }

  .architecture-control-flow__branches {
    grid-template-columns: 1fr;
  }

  .responsive-table {
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .responsive-table tr:last-child {
    border-bottom: 0;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: 112px minmax(0,1fr);
    gap: 12px;
    padding: 8px 0;
    border: 0;
  }

  .responsive-table td::before {
    color: var(--faint);
    content: attr(data-label);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
}

@media (max-width: 700px) {
  .project-page .shell {
    width: min(var(--max),calc(100% - 24px));
  }

  .project-hero {
    padding-top: 44px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .project-status {
    gap: 6px;
  }

  .evidence-strip,
  .comparison-diagram,
  .architecture-split,
  .fit-grid,
  .relay-branch,
  .scope-list {
    grid-template-columns: 1fr;
  }

  .evidence-stat,
  .evidence-stat:first-child,
  .evidence-stat:nth-child(3),
  .evidence-stat:nth-child(4) {
    grid-column: auto;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .evidence-stat:first-child {
    border-top: 0;
  }

  .hardening-case {
    grid-template-columns: 1fr;
  }

  .figure--breakout {
    width: calc(100vw - 24px);
  }

  .case-nav__inner {
    width: 100%;
    padding-inline: 4px;
  }

  .responsive-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* LoopRelay case study */
.hero-argument {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.45fr);
  gap: clamp(28px, 5vw, 64px);
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-argument__lead {
  max-width: 430px;
  margin: 0;
  color: #dce5f3;
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  font-weight: 680;
  letter-spacing: -.018em;
  line-height: 1.42;
}

.hero-argument__principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 44px);
}

.hero-argument__principles p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-argument__principles strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: .96rem;
}

.operating-record {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 38px 0 42px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.operating-record__item {
  display: grid;
  grid-template-columns: minmax(96px, .34fr) minmax(0, 1fr);
  gap: 22px;
  padding: 28px 30px 28px 0;
}

.operating-record__item:nth-child(even) {
  padding-right: 0;
  padding-left: 30px;
  border-left: 1px solid var(--border);
}

.operating-record__item:nth-child(n + 3) {
  border-top: 1px solid var(--border);
}

.operating-record__value {
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 720;
  letter-spacing: -.04em;
  line-height: 1;
}

.operating-record__item h3 {
  margin: -3px 0 7px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.operating-record__item p {
  margin: 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.55;
}

.evidence-source {
  display: inline-block;
  margin-top: 10px;
  color: #c5d3f4;
  font-size: .78rem;
  font-weight: 650;
  text-underline-offset: .18em;
}

.evidence-digest {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--faint);
  font: 500 .66rem/1.45 ui-monospace, monospace;
}

.operating-record__item code {
  overflow-wrap: anywhere;
  color: #dce7ff;
  font-size: .86em;
}

@media (max-width: 980px) {
  .hero-argument {
    grid-template-columns: 1fr;
  }

  .operating-record {
    grid-template-columns: 1fr;
  }

  .operating-record__item,
  .operating-record__item:nth-child(even) {
    padding: 26px 0;
    border-left: 0;
  }

  .operating-record__item:nth-child(n + 2) {
    border-top: 1px solid var(--border);
  }

}

@media (max-width: 560px) {
  .runtime-diagrams {
    grid-template-columns: 1fr;
  }

  .hero-argument__principles {
    grid-template-columns: 1fr;
  }

  .operating-record__item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

}
