@font-face {
  font-family: Urbanist;
  src: url("../assets/urbanist.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../assets/ibm-plex-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
.joshua {
  color-scheme: dark;
  --paper: #0d1825;
  --ink: #edf4fc;
  --muted: #becde0;
  --accent: #a7e0cd;
  --button-ink: #0d2023;
  --rule: #415572;
  --panel: #15253a;
  --example: #111f31;
}
.distiller {
  color-scheme: light;
  --paper: #f5eee6;
  --ink: #271e26;
  --muted: #564451;
  --accent: #8a2b53;
  --button-ink: #fff6fb;
  --rule: #baa6aa;
  --panel: #fffaf2;
  --example: #e9dddb;
}
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 "IBM Plex Sans", Arial, sans-serif; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, .pitch { font-family: Urbanist, "Helvetica Neue", Arial, sans-serif; font-weight: 750; line-height: .98; }
h1 { font-size: clamp(3.25rem, 8.4vw, 9rem); letter-spacing: -.065em; }
h2 { font-size: clamp(2.6rem, 5.1vw, 5.5rem); letter-spacing: -.045em; }
h2 + p { margin-top: .95rem; }
.wrap { width: min(86rem, 100% - clamp(2rem, 8.5vw, 9rem)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; inset: .75rem auto auto .8rem; padding: .68rem .95rem; transform: translateY(-185%); background: var(--accent); color: var(--button-ink); }
.skip:focus { transform: translateY(0); }

.masthead { background: #081421; color: #f4f7fc; border-bottom: 1px solid #40546b; }
.masthead :focus-visible { outline-color: #b5e5ff; }
.bar, .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.bar { min-height: 4.45rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand img { width: clamp(6.65rem, 20vw, 7.5rem); height: auto; }
.back, .foot { font-size: .92rem; }
.foot { min-height: 4.45rem; border-top: 1px solid var(--rule); }
.foot a, .back { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .35rem; }

.hero, .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: clamp(1.8rem, 6vw, 7rem); align-items: start; }
.hero { padding-block: clamp(2.85rem, 7.5vw, 8rem); align-items: center; }
.label { color: var(--accent); font: 670 .77rem/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .105em; text-transform: uppercase; }
.status { margin-bottom: .8rem; }
.pitch { max-width: 23ch; margin-top: .85rem; font-size: clamp(1.6rem, 3.25vw, 3.2rem); letter-spacing: -.036em; line-height: 1.04; }
.lede { max-width: 52ch; margin-top: .9rem; color: var(--muted); font-size: clamp(1.02rem, 1.35vw, 1.18rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: fit-content; min-height: 2.85rem; padding: .64rem .9rem; background: var(--accent); color: var(--button-ink); text-decoration: none; font-weight: 720; line-height: 1.3; }
.button:hover { text-decoration: underline; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; margin-top: 1.4rem; }
.hero-actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; }
.source-note { margin-top: .65rem; color: var(--muted); font-size: .86rem; }

.joshua h1 { font-size: clamp(3rem, 6.7vw, 7.6rem); }
.joshua .hero { grid-template-columns: minmax(0, 1.22fr) minmax(0, .71fr); gap: clamp(1.6rem, 3.4vw, 3.65rem) clamp(2.1rem, 6.8vw, 7.9rem); align-items: end; }
.engineering-intro .lede { margin-top: 0; }
.joshua .routing { grid-column: 1 / -1; padding: clamp(1rem, 2.7vw, 2.55rem); }
.routing {
  border-top: .38rem solid var(--accent);
  background: var(--panel);
  padding: clamp(1.1rem, 3.4vw, 2.8rem);
}
.routing ol { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: .95rem 0 0; }
.routing ol::before { content: ""; position: absolute; inset: .23rem 0 auto; border-top: 1px solid #6b9aaf; }
.routing li { position: relative; display: grid; align-content: start; gap: .24rem; padding: 1rem .85rem .15rem 0; }
.signal { position: absolute; top: 0; left: 0; width: .52rem; height: .52rem; background: var(--panel); border: 1px solid var(--accent); border-radius: 50%; }
.routing li:last-child .signal { background: var(--accent); }
.routing strong { color: #f2f7ff; font-weight: 700; }
.routing small { color: #c9daef; font-size: .91rem; }
.handoff { display: grid; margin-top: 1.35rem; border-top: 1px solid var(--rule); }
.handoff div { display: grid; grid-template-columns: minmax(5rem, .35fr) minmax(0, 1fr); gap: .35rem .7rem; padding-block: .63rem; border-bottom: 1px solid var(--rule); }
.handoff dt { color: var(--accent); font-weight: 700; }
.handoff dd { color: var(--muted); }

.distiller .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .89fr); grid-template-areas: "document introduction"; }
.distiller .distiller-intro { grid-area: introduction; }
.distiller .annotation { grid-area: document; }
.distiller .pitch { max-width: 20ch; }
.annotation { position: relative; background: var(--panel); border-top: .3rem solid var(--accent); padding: clamp(1.05rem, 3.1vw, 2.6rem); box-shadow: .53rem .53rem 0 #dac3c8; }
.annotation blockquote { margin-top: .8rem; font: clamp(1.5rem, 3vw, 3.25rem)/1.13 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.citation { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.excerpt { margin-top: 1.25rem; padding: .78rem 0 .85rem; border-block: 1px solid #ccb9bf; }
.excerpt p + p { margin-top: .32rem; }
.provenance { display: flex; flex-wrap: wrap; gap: .65rem 1.45rem; margin-top: .8rem; font-size: .9rem; }
.provenance dt { font-weight: 720; }
.provenance dd { color: var(--muted); }
.evidence-steps .acceptance { color: #4e2144; }

.example { background: var(--example); border-block: 1px solid var(--rule); }
.example .wrap, .closing { padding-block: clamp(2.8rem, 6.8vw, 7rem); }
.example h2, .concept h2 { margin-top: .7rem; }
.example h2 + p, .closing p, .steps p, .concept header > p:last-child { max-width: 54ch; color: var(--muted); }
.steps { border-top: .22rem solid var(--accent); }
.steps details { border-bottom: 1px solid var(--rule); }
.steps summary { display: list-item; min-height: 2.85rem; padding: .72rem .4rem; cursor: pointer; font-weight: 700; }
.steps summary::marker { color: var(--accent); }
.steps summary:hover { color: var(--accent); }
.steps p { padding: .1rem .4rem 1rem; }

.concept { display: grid; grid-template-columns: minmax(0, .52fr) minmax(0, 1fr); grid-template-areas: "intro video" "transcript video"; align-items: start; gap: .65rem clamp(1.4rem, 5vw, 5rem); margin-bottom: clamp(2.7rem, 6vw, 6rem); padding-top: clamp(1.75rem, 4vw, 3.5rem); border-top: 1px solid var(--rule); }
.concept header { grid-area: intro; }
.concept video { grid-area: video; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #081421; }
.concept-description { grid-area: transcript; max-width: 64ch; }
.concept-description summary { min-height: 2.75rem; padding: .56rem .2rem; cursor: pointer; font-weight: 700; }
.concept-description ol { padding-left: 1.4rem; }
.concept-description li + li { margin-top: .55rem; }
.closing { align-items: center; }
.closing .button { justify-self: end; }

@media (max-width: 52rem) {
  .hero, .distiller .hero, .joshua .hero, .split { grid-template-columns: 1fr; }
  .distiller .hero { grid-template-areas: "introduction" "document"; }
  .closing .button { justify-self: start; }
  .concept { grid-template-columns: 1fr; grid-template-areas: "intro" "video" "transcript"; }
}
@media (max-width: 35rem) {
  .hero { padding-top: 2.3rem; }
  .hero-actions { margin-top: 1.05rem; }
  .routing ol { grid-template-columns: 1fr; padding-left: 1rem; }
  .routing ol::before { inset: .38rem auto 1.35rem 0; border-top: 0; border-left: 1px solid #6b9aaf; }
  .routing li { padding: .12rem 0 .72rem; }
  .signal { top: .45rem; left: -1.22rem; }
  .foot { padding-block: .35rem; }
}
@media (max-width: 23rem) {
  h1 { font-size: 2.95rem; }
  .joshua h1 { font-size: 2.68rem; }
  h2 { font-size: 2.45rem; }
}

.performance-cta { padding: 1.5rem max(1.25rem, calc((100% - 72rem)/2)); background: #e9f1fc; color: #0a203c; }
.performance-cta p { margin: 0 0 .5rem; }
.performance-cta a { display: inline-flex; align-items: center; min-height: 44px; color: #064a9b; font-weight: 700; text-underline-offset: .2em; }

/* Shared Redegal presentation */
.joshua { --accent: #94efcf; --paper: #071b2d; --panel: #102d40; --example: #0c2638; }
.distiller { --paper: #eff4f2; --ink: #071b2d; --muted: #3c5360; --accent: #245d58; --button-ink: #071b2d; --rule: #b1c9c4; --panel: #fff; --example: #e1eeea; }
h1, h2, .pitch { line-height: 1.05; }
.button { background: #94efcf; color: #071b2d; }
.button:hover { background: #c6f9e6; color: #071b2d; }
.routing { padding: clamp(1.25rem, 3vw, 2.5rem); border: 1px solid #527c79; background: #102d40; }
.routing ol { font-size: 1rem; }
.routing li { gap: .5rem; }
.routing small { font-size: 1rem; line-height: 1.5; }
.joshua .performance-cta { background: #102d40; color: #f4f7f6; }
.joshua .performance-cta a { color: #94efcf; }
:focus-visible { outline: 3px solid #94efcf; outline-offset: 4px; }
:is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #0059bf; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
