:root {
  --paper: #f4f1e9;
  --paper-deep: #ebe7dd;
  --ink: #111725;
  --muted: #59616e;
  --line: rgba(17, 23, 37, .52);
  --blue: #135ec8;
  --red: #cc412d;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
  background-image: radial-gradient(rgba(17, 23, 37, .06) .55px, transparent .55px);
  background-size: 7px 7px;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background: linear-gradient(110deg, transparent 0 47%, rgba(255,255,255,.5) 48%, transparent 54%); mix-blend-mode: soft-light; }
a { color: inherit; }
.shell { width: min(1500px, calc(100% - 84px)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 10; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { left: 10px; }
.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; }

.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 94px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 2rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: clamp(1.6rem, 4vw, 3.8rem); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.site-nav a { text-decoration: none; transition: color .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--blue); }
.menu-toggle { display: none; border: 0; background: none; }

.hero { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(460px, .94fr); gap: clamp(3rem, 6vw, 7rem); padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: 2.5rem; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .hero-index { margin: 0 0 1.6rem; color: var(--muted); font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; line-height: 1.8; text-transform: uppercase; }
.eyebrow span, .hero-index span { margin-inline: .55rem; color: var(--red); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -.045em; }
h1 { max-width: 840px; font-size: clamp(2.16rem, 3.66vw, 4.26rem); line-height: .94; }
.hero-dek { margin: 2.1rem 0 1.9rem; color: #233450; font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 2rem); }
.button { display: inline-flex; align-items: center; gap: 1.4rem; min-height: 58px; padding: .85rem 1.55rem; font-family: var(--serif); font-size: 1.25rem; text-decoration: none; border: 1px solid var(--ink); transition: transform .2s ease, background .2s ease; }
.button:hover, .button:focus-visible { transform: translateY(-3px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.button-dark { color: var(--paper); background: #1a2943; box-shadow: 4px 4px 0 rgba(17, 23, 37, .13); }
.button-light { color: var(--ink); background: transparent; }
.hero-index { margin-top: 2.1rem; margin-bottom: 0; }
.hero-visual { position: relative; min-width: 0; padding-top: 1.4rem; }
.transformer-diagram { width: 100%; overflow: visible; }
.svg-label { font: 700 17px var(--mono); }
.svg-copy { font: 16px var(--serif); }
.brace { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.arrow path { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.proof-tags { display: flex; justify-content: center; gap: 1.1rem; margin-top: -1rem; }
.tag { display: inline-block; padding: .55rem 1.25rem; background: rgba(255,255,255,.35); border: 1px solid; font-family: var(--serif); font-size: 1rem; }
.tag-blue { color: var(--blue); border-color: var(--blue); }
.tag-red { color: var(--red); border-color: var(--red); }
.margin-note { position: absolute; color: #67707e; font-family: "Bradley Hand", "Segoe Print", cursive; font-size: .9rem; font-style: italic; line-height: 1.25; transform: rotate(-5deg); }
.note-top { right: -1rem; top: .2rem; text-align: right; }
.note-bottom { right: -.8rem; bottom: 2rem; transform: rotate(-8deg); text-align: right; }

.what-is { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; padding-top: 3.2rem; padding-bottom: 3.6rem; border-top: 1px solid var(--line); }
.what-is h2 { max-width: 600px; font-size: clamp(1.68rem, 2.88vw, 3.12rem); line-height: .95; }
.what-is-copy { max-width: 580px; color: #536176; font-size: 1.04rem; font-weight: 400; line-height: 1.75; }
.what-is-copy p { margin: 0; }
.what-is-copy p + p { margin-top: 1.2rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; padding-top: 1.2rem; padding-bottom: 5rem; border-top: 1px solid var(--line); }
.card { min-height: 290px; padding: 1.5rem 1.5rem 1.3rem; border: 1px solid rgba(17,23,37,.23); background: rgba(255,255,255,.13); }
.card-number { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; }
.card-number span { display: block; width: 42px; height: 1px; background: var(--line); }
.card-body { display: grid; grid-template-columns: 1fr 110px; align-items: end; gap: 1rem; min-height: 225px; }
.card h3 { margin: .5rem 0 1rem; font-size: clamp(1.62rem, 2.04vw, 2.4rem); line-height: .95; }
.card p { max-width: 360px; margin: 0 0 1.5rem; color: #293549; font-size: .98rem; line-height: 1.45; }
.card a { color: var(--blue); font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.card a:hover, .card a:focus-visible { text-decoration: underline; }
.card-sketch { align-self: center; justify-self: end; position: relative; width: 110px; height: 130px; }
.sketch-language { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding-top: 34px; transform: rotate(-1deg); }
.sketch-language span { aspect-ratio: 1; background: #b4cae5; border: 1px solid rgba(255,255,255,.6); }
.sketch-language span:nth-child(3n) { background: #e1e8ef; }
.sketch-chart { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 22px, rgba(19,94,200,.12) 23px); }
.chart-line { position: absolute; display: block; width: 125px; height: 48px; left: -5px; border-top: 2px solid; transform: skewY(-20deg) rotate(-9deg); }
.chart-line::before { content: ""; position: absolute; inset: -3px 0 0; border-top: 1px solid; transform: rotate(25deg); }
.chart-line.blue { top: 35px; color: var(--blue); }
.chart-line.red { top: 61px; color: var(--red); transform: skewY(-14deg) rotate(-11deg); }
.chart-line.grey { top: 88px; color: #a2abb9; transform: skewY(-9deg) rotate(-8deg); }
.sketch-world { border: 1px solid rgba(17,23,37,.5); background-image: linear-gradient(rgba(17,23,37,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(17,23,37,.15) 1px, transparent 1px); background-size: 22px 22px; }
.dot { position: absolute; left: 57px; top: 76px; width: 12px; height: 12px; border-radius: 50%; background: #3d4757; }
.flag { position: absolute; left: 74px; top: 27px; width: 1px; height: 34px; background: var(--red); }
.flag::after { content: ""; position: absolute; top: 0; left: 1px; border-top: 6px solid var(--red); border-right: 10px solid transparent; }

.use-cases { padding-top: 4.2rem; padding-bottom: 5rem; border-top: 1px solid var(--line); }
.use-cases-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; margin-bottom: 2.4rem; }
.use-cases-intro h2 { max-width: 660px; font-size: clamp(1.8rem, 3vw, 3.3rem); line-height: .94; }
.use-cases-intro > p { max-width: 550px; margin: 0 0 .4rem; color: #293549; font-size: 1.08rem; line-height: 1.6; }
.use-case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.use-case { min-height: 430px; padding: 1.45rem 1.5rem 1.3rem; border: 1px solid rgba(17,23,37,.28); background: rgba(255,255,255,.13); }
.use-case-label { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.use-case-label span { color: var(--red); }
.use-case h3 { margin: 1.25rem 0 1rem; font-size: clamp(1.41rem, 1.8vw, 2.1rem); line-height: .95; }
.use-case > p:not(.use-case-label):not(.use-case-note) { min-height: 84px; margin: 0; color: #293549; font-size: .98rem; line-height: 1.5; }
.use-case ol, .use-case ul { margin: 1.45rem 0 1.5rem; padding: 1rem 0 1rem 1.4rem; border-top: 1px solid rgba(17,23,37,.2); border-bottom: 1px solid rgba(17,23,37,.2); color: #293549; font-size: .93rem; }
.use-case li { margin: .58rem 0; padding-left: .25rem; }
.use-case li::marker { color: var(--blue); font-family: var(--mono); font-size: .78rem; }
.use-case-note { margin: 0; color: var(--blue); font-family: var(--serif); font-size: 1rem; line-height: 1.35; }
.iteration-note { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: center; margin-top: 2.4rem; padding: 1.2rem 1.4rem; background: #1a2943; color: var(--paper); }
.iteration-label { color: #ff8d70; font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.iteration-note p { max-width: 760px; margin: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; }

.method { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding-top: 4rem; padding-bottom: 5rem; border-top: 1px solid var(--line); }
.method h2 { max-width: 610px; font-size: clamp(1.74rem, 3vw, 3.24rem); line-height: .95; }
.method > p { max-width: 540px; margin: 2.7rem 0 0; color: #293549; font-size: 1.1rem; line-height: 1.6; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.3rem; padding-bottom: 1.8rem; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { max-width: 800px; margin-inline: auto; width: 100%; }
  h1 { max-width: 900px; }
  .note-top { right: 1rem; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 36px, 600px); }
  .site-header { min-height: 76px; }
  .wordmark { font-size: 1.1rem; letter-spacing: .1em; }
  .menu-toggle { display: block; width: 42px; height: 42px; padding: .6rem; cursor: pointer; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 25px; height: 1px; background: var(--ink); transition: transform .2s ease; }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -7px; }
  .menu-icon::after { top: 7px; }
  .site-nav { display: none; position: absolute; top: 75px; left: 18px; right: 18px; z-index: 5; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem; background: var(--paper); border: 1px solid var(--line); box-shadow: 3px 3px 0 rgba(17,23,37,.1); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid rgba(17,23,37,.15); }
  .site-nav a:last-child { border-bottom: 0; }
  .hero { padding-top: 2.8rem; }
  h1 { font-size: clamp(1.92rem, 9vw, 3.18rem); }
  .hero-dek { font-size: 1.3rem; }
  .hero-visual { margin-top: 1rem; }
  .transformer-diagram { min-width: 640px; width: 140%; max-width: none; margin-left: -13%; }
  .hero-visual { overflow: hidden; }
  .proof-tags { flex-wrap: wrap; gap: .55rem; }
  .tag { font-size: .86rem; padding: .45rem .75rem; }
  .margin-note { display: none; }
  .what-is { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 3.2rem; }
  .what-is-copy { margin: 0; }
  .cards { grid-template-columns: 1fr; padding-bottom: 3.5rem; }
  .card { min-height: 250px; }
  .use-cases { padding-top: 3.2rem; padding-bottom: 3.5rem; }
  .use-cases-intro { grid-template-columns: 1fr; gap: 1.4rem; margin-bottom: 1.6rem; }
  .use-cases-intro > p { margin: 0; }
  .use-case-grid { grid-template-columns: 1fr; }
  .use-case { min-height: 0; }
  .use-case > p:not(.use-case-label):not(.use-case-note) { min-height: 0; }
  .iteration-note { grid-template-columns: 1fr; gap: .7rem; }
  .method { grid-template-columns: 1fr; gap: 0; padding-block: 3.2rem; }
  .method > p { margin-top: 1.4rem; }
  .site-footer { flex-direction: column; gap: .4rem; padding-bottom: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Lab identity and editorial sections use the existing paper, ink, and type palette. */
section[id] { scroll-margin-top: 1.5rem; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.wordmark { display: flex; flex-direction: column; flex-shrink: 0; gap: .25rem; }
.wordmark-subtitle { font-family: var(--mono); font-size: .65rem; font-weight: 400; letter-spacing: .24em; color: var(--muted); }
.site-header { gap: 2rem; }
.site-nav { gap: clamp(1rem, 2.2vw, 2.3rem); }
.hero-context { max-width: 580px; margin: 0 0 1.8rem; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.hero { padding-bottom: 4rem; }
.section-note { margin: -.7rem 0 1.8rem; color: var(--muted); font-size: .9rem; }
.toolkit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 1.5rem; }
.toolkit-cards .card h3 { font-size: clamp(1.38rem, 2.04vw, 2.22rem); overflow-wrap: break-word; }
.toolkit-cards .card-body { grid-template-columns: minmax(0, 1fr) 110px; }
.toolkit-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2rem; padding-bottom: 4rem; }
.toolkit-links p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .98rem; }
.text-link { display: inline-block; color: var(--blue); font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.what-is-copy .text-link { margin-top: 1.5rem; }
.programme { align-items: start; padding-block: 4rem; }
.section-copy { max-width: 540px; margin-top: 2.7rem; color: #293549; font-size: 1.05rem; line-height: 1.75; }
.section-copy p { margin: 0 0 1.2rem; }
@media (min-width: 761px) and (max-width: 1150px) {
  .site-header { flex-wrap: wrap; padding-block: 1.2rem; gap: 1.3rem; }
  .site-nav { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .wordmark { font-size: clamp(.85rem, 4vw, 1.1rem); letter-spacing: .08em; }
  .wordmark-subtitle { font-size: .58rem; }
  .menu-toggle { flex-shrink: 0; }
  .site-header { position: relative; gap: .7rem; }
  .site-nav { top: calc(100% - 1px); left: 0; right: 0; }
  .hero-context { font-size: .98rem; }
  .transformer-diagram { min-width: 0; width: 100%; margin-left: 0; }
  .proof-tags { margin-top: 0; }
  .hero-actions .button { font-size: 1.1rem; }
  .toolkit-cards { grid-template-columns: 1fr; }
  .toolkit-cards .card-body { grid-template-columns: minmax(0, 1fr) 80px; }
  .toolkit-cards .card-sketch { width: 80px; height: 105px; overflow: hidden; }
  .toolkit-links { align-items: flex-start; flex-direction: column; padding-bottom: 3.2rem; }
  .section-note { margin-top: 0; }
  .programme { padding-block: 3.2rem; }
  .section-copy { margin-top: 1.4rem; }
}

.project-parts .use-case { min-height: 0; }
.project-parts .use-case > p:not(.use-case-label) { min-height: 0; }
.project-parts .text-link { margin-top: 1.5rem; }
