:root {
  --paper: #dedcd6;
  --ink: #111110;
  --muted: #6b6963;
  --hairline: #11111033;
  --gutter: clamp(16px, 4vw, 48px);
  --pad: clamp(16px, 2.6vw, 32px);
  --rail: 76px;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0 var(--gutter);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.plain { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.6; }

.strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rule { flex: 1; height: 1px; background: var(--ink); }
.lang { display: flex; align-items: center; gap: 5px; flex: none; }
.lang button { padding: 2px; border: 0; background: none; color: var(--muted); font: inherit; letter-spacing: inherit; cursor: pointer; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.lang button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.frame {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  border: 1px solid var(--ink);
}
main { min-width: 0; overflow: clip; }

/* Level rail */
.rail { border-right: 1px solid var(--ink); }
.rail-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}
.mark { font-size: 16px; font-weight: 600; text-decoration: none; }
.levels { width: 100%; display: flex; flex-direction: column; margin: auto 0; }
.levels a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 9px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.levels b { font-size: 17px; font-weight: 500; }
.levels small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.levels a:hover { background: #1111100f; }
.levels a.active { background: var(--ink); color: var(--paper); }
.levels a.active small { color: #dedcd6b3; }

/* Shared type and controls */
.lead {
  margin: 0;
  max-width: 24em;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.button {
  display: inline-flex;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.button:hover { background: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.section-title {
  margin: 0 0 clamp(24px, 4vw, 48px);
  font-size: clamp(30px, 4.4vw, 60px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}

/* Home hero */
.hero { padding: var(--pad); }
.hero-top { display: flex; justify-content: space-between; gap: 16px; }
#wordmark {
  margin: 20px 0 clamp(20px, 3vw, 40px);
  font-size: 15vw;
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.035em;
  text-transform: uppercase;
  white-space: nowrap;
}
#wordmark span { display: inline-block; }
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(16px, 2.4vw, 32px);
  align-items: stretch;
}
.hero-copy { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.hero-meta { margin: 20px 0; }
/* --hero-offset is set in main.js so the hero fits one screen for any name length. */
.hero-image { width: 100%; height: max(300px, calc(100svh - var(--hero-offset, 420px) - var(--pad))); object-fit: cover; object-position: 50% 62%; filter: grayscale(1); }
.panel-photo > img { filter: grayscale(1); }

/* Levels */
.level { padding: var(--pad); border-top: 1px solid var(--ink); }
.level-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: clamp(24px, 4vw, 48px); }

/* Title panels: home cards and the heads of the two discipline pages */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
}
.panel-page { aspect-ratio: auto; height: min(72vh, 640px); min-height: 380px; }
.panel-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.panel-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #111110d9, #11111000 62%); }
a.panel:hover > img { transform: scale(1.03); }
.panel-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  width: 100%;
  padding: clamp(16px, 2.4vw, 32px);
}
.panels .panel-text { flex-direction: column; align-items: flex-start; gap: 10px; }
.panels .panel-note { flex: none; max-width: 26em; }
.panel-title { margin: 0; font-size: clamp(36px, 5vw, 76px); font-weight: 500; line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.panel-page .panel-title { font-size: clamp(48px, 9vw, 136px); }
.panel-note { flex: 0 1 19em; margin: 0; font-size: 14px; line-height: 1.35; }
.panel-caption { margin: 12px 0 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(16px, 2.4vw, 32px); }
.project { display: block; grid-column: span 7; text-decoration: none; }
.project:nth-child(4n + 2) { grid-column: span 5; margin-top: clamp(40px, 9vw, 130px); }
.project:nth-child(4n + 3) { grid-column: span 5; }
.project:nth-child(4n) { margin-top: clamp(40px, 6vw, 80px); }
.project-image { display: block; overflow: hidden; }
.project img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.project:nth-child(4n + 2) img, .project:nth-child(4n + 3) img { aspect-ratio: 4 / 5; }
.project:hover img { transform: scale(1.03); }
@media (min-width: 761px) {
  .project:last-child:nth-child(4n + 1) { grid-column: 1 / -1; margin-top: 0; }
  .project:last-child:nth-child(4n + 1) img { aspect-ratio: 21 / 9; }
}
.project-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.project-title { display: block; margin-top: 6px; font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.02em; }

/* Add-in schedule */
.tools { border-top: 1px solid var(--ink); }
.tool {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) 170px 44px 20px;
  gap: 16px;
  align-items: center;
  padding: 22px 8px 22px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: background .2s, color .2s, padding .2s, opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
.tool:last-child { border-bottom-color: var(--ink); }
.tool-name { font-size: clamp(20px, 2vw, 26px); font-weight: 500; letter-spacing: -.015em; line-height: 1.1; }
.tool-does { color: var(--muted); font-size: 15px; line-height: 1.3; transition: color .2s; }
.tool-arrow { font-size: 18px; }
.tool:hover { background: var(--ink); color: var(--paper); padding-left: 12px; }
.tool:hover .tool-does { color: #dedcd6b3; }

/* Add-in detail */
.tool-title { margin: 0; font-size: clamp(40px, 6.6vw, 96px); font-weight: 500; line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.tool-story { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.tool-story > p { margin: 0; max-width: 40em; font-size: 18px; line-height: 1.42; }
.tool-story h2 { margin: 0 0 10px; }

/* Diagrams */
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sub-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.sub-head i { flex: 1; height: 1px; background: var(--ink); }
.down { margin: 14px 0; text-align: center; font-size: 17px; }
.tag { display: inline-block; align-self: flex-start; padding: 2px 6px; border: 1px solid currentColor; font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.4; }
.tag-dashed { border-style: dashed; }
.badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10px; font-weight: 500; flex: none; }
.badge-light { background: var(--paper); color: var(--ink); }

.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.setup-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 2.7fr); }
.setup-single { grid-template-columns: minmax(0, 380px); }
.setup-card { padding: clamp(14px, 1.6vw, 20px); border: 1px solid var(--ink); }
.setup-head { display: flex; gap: 10px; margin-bottom: 14px; }
.setup-head h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.01em; line-height: 22px; }
.setup-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.3; }

.mock { background: #eae8e3; border: 1px solid var(--hairline); font-size: 12px; line-height: 1.3; }
.mock-bar { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-bottom: 1px solid var(--hairline); color: var(--muted); }
.mock-bar .dots { width: 26px; height: 6px; background: radial-gradient(circle at 3px 3px, #1111104d 3px, transparent 3.5px) 0 0 / 10px 6px repeat-x; }
.mock-bar .active { color: var(--ink); font-weight: 500; box-shadow: 0 9px 0 -8px var(--ink); }
.mock-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.mock-row + .mock-row { border-top: 1px solid var(--hairline); }
.mock-row > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.mock-row strong { font-weight: 500; font-size: 13px; }
.mock-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ink); flex: none; }
.status { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.mock-text { color: var(--muted); }
.mock-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mock-table th { padding: 8px 12px; text-align: left; font-weight: 500; border-bottom: 1px solid var(--hairline); }
.mock-table td { padding: 6px 12px; }
.mock-table tr.hi td { background: var(--ink); color: var(--paper); }
.mock-foot { padding: 8px 12px 12px; }
.mock-foot span, .mock-buttons span, .mock-actions span { display: inline-block; padding: 3px 9px; border: 1px solid var(--ink); font-size: 11px; }
.ribbon-tool { padding: 12px; }
.ribbon-tool span { display: inline-flex; flex-direction: column; gap: 6px; padding: 9px 12px; background: var(--ink); color: var(--paper); }
.mock-dialog { display: grid; grid-template-columns: 1.1fr 1fr .95fr; }
.mock-dialog > div { padding: 10px 12px; min-width: 0; }
.mock-dialog > div + div { border-left: 1px solid var(--hairline); }
.mock-heading { margin-bottom: 7px; font-weight: 600; }
.mock-sub { margin: 7px 0 3px; font-size: 11px; color: var(--muted); }
.mock-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); }
.mock-buttons { display: flex; gap: 5px; margin-top: 8px; }
.mock-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--hairline); }
.mock-actions .primary { background: var(--ink); color: var(--paper); padding: 3px 16px; }
.opt { display: flex; align-items: center; gap: 7px; padding: 2.5px 3px; overflow-wrap: anywhere; }
.opt .icon { width: 13px; height: 13px; }
.opt-hi { background: var(--ink); color: var(--paper); }
.opt-hi .ck.on { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.opt-tree { font-weight: 500; }
.ck, .rd { flex: none; display: inline-block; width: 11px; height: 11px; border: 1px solid var(--ink); }
.ck.on { background: var(--ink); box-shadow: inset 0 0 0 2px #eae8e3; }
.rd { border-radius: 50%; }
.rd.on { background: var(--ink); box-shadow: inset 0 0 0 2px #eae8e3; }
.field { display: block; min-height: 24px; padding: 4px 7px; border: 1px solid var(--ink); }

.step-row { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.step-row + .down { margin: 6px 0 14px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 31px; left: calc(50% + 31px); width: calc(100% - 62px); height: 1px; background: var(--ink); }
.step-icon { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid var(--ink); border-radius: 50%; }
.step-icon.dashed { border-style: dashed; }
.step-icon .badge { position: absolute; top: -6px; right: -6px; }
.step-text { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.step-text strong { color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.step-text .tag { align-self: center; color: var(--ink); margin-top: 3px; }

.result-head { margin-top: clamp(20px, 3vw, 36px); }
.result-head span { padding: 4px 9px; background: var(--ink); color: var(--paper); }
.band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(16px, 2.4vw, 32px); background: var(--ink); color: var(--paper); }
.band-wide { grid-template-columns: minmax(0, 1fr); }
.band-lead { display: flex; align-items: center; gap: 18px; min-width: 0; }
.band-output { min-width: 0; background: var(--paper); color: var(--ink); }
.band-output-label { padding: 7px 12px; border-bottom: 1px solid var(--ink); }
.band-output-body { padding: 14px; overflow-x: auto; }
.band-output-foot { padding: 7px 12px; border-top: 1px solid var(--hairline); }
.output-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.output-images figure { margin: 0; }
.output-images img { width: 100%; height: auto; }
.output-images figcaption { margin-top: 6px; }
.band-icon { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid #dedcd666; border-radius: 50%; flex: none; }
.band-icon .badge { position: absolute; top: -6px; right: -6px; }
.band-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 15px; line-height: 1.35; color: #dedcd6b3; }
.band-text strong { color: var(--paper); font-size: clamp(22px, 2.5vw, 34px); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; }
.isolate .light { fill: #b9b7b1; }
.isolate .mid { fill: #6b6963; }
.isolate .dark { fill: #2c2c2a; }
.drawing .faint { fill: none; stroke: var(--ink); stroke-width: .8; opacity: .35; }

/* Redraws of real program windows */
.uiw { margin-bottom: clamp(32px, 4vw, 52px); font-size: 12px; line-height: 1.3; }
.uiw-row { display: grid; grid-template-columns: var(--w, 560px) minmax(0, 1fr); align-items: center; }
.uiw-cell { align-self: stretch; min-width: 0; padding: 9px 18px; border: solid var(--ink); border-width: 0 2px; }
.uiw-row:first-child .uiw-cell { padding: 0; border-width: 2px 2px 0; }
.uiw-last .uiw-cell { padding-bottom: 14px; border-width: 0 2px 2px; }
.uiw-side p { position: relative; margin: 0; padding-left: 72px; font-size: 15px; line-height: 1.3; }
.uiw-side p + p { margin-top: 12px; }
.uiw-side p::before { content: ""; position: absolute; left: 0; top: .65em; width: 60px; height: 1px; background: var(--ink); }
.uiw-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.uiw-icon { display: grid; place-items: center; width: 15px; height: 15px; background: var(--ink); color: var(--paper); font-size: 10px; font-style: normal; font-weight: 600; }
.uiw-controls { display: flex; gap: 18px; margin-left: auto; }
.uiw-controls b { font-weight: 400; }
.uiw-heading { margin: 4px 0 10px; font-weight: 600; font-size: 13px; }
.uiw-title-big { margin: 6px 0 4px; font-size: 17px; font-weight: 600; }
.uiw-label { margin-bottom: 3px; }
.uiw-label.strong { font-weight: 600; margin-bottom: 7px; }
.uiw-hint { margin-bottom: 7px; color: var(--muted); }
.uiw-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.uiw-line .uiw-label { margin: 0; }
.uiw-line:last-child { margin-bottom: 0; }
.uiw-field { display: block; min-height: 23px; padding: 3px 6px; border: 1px solid var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uiw-select { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.uiw-select b { font-weight: 400; }
.uiw-btn { display: inline-block; padding: 4px 14px; border: 1px solid var(--ink); white-space: nowrap; text-align: center; }
.uiw-btn.primary { background: var(--ink); color: var(--paper); }
.uiw-actions { display: flex; justify-content: flex-end; gap: 8px; }
.uiw-opt { display: flex; align-items: flex-start; gap: 6px; }
.uiw-ck, .uiw-rd { position: relative; flex: none; display: inline-block; width: 12px; height: 12px; margin-top: 1px; border: 1px solid var(--ink); }
.uiw-ck.on::after { content: "✓"; position: absolute; inset: -3px 0 0 1px; font-size: 11px; font-style: normal; font-weight: 600; }
.uiw-rd { border-radius: 50%; }
.uiw-rd.on::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--ink); }
.uiw-row-opts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.uiw-tight { margin-bottom: 7px; }
.uiw-box { position: relative; padding: 4px 18px 4px 6px; border: 1px solid var(--ink); }
.uiw-box.has-hbar { padding-bottom: 18px; }
.uiw-box-in { height: 100%; overflow: hidden; white-space: nowrap; }
.uiw-vbar { position: absolute; top: 0; right: 0; bottom: 0; width: 13px; border-left: 1px solid var(--hairline); }
.uiw-vbar i { position: absolute; left: 3px; right: 3px; background: #1111104d; }
.uiw-hbar { position: absolute; left: 0; right: 13px; bottom: 0; height: 13px; border-top: 1px solid var(--hairline); }
.uiw-hbar i { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 72%; background: #1111104d; }
.uiw-node { display: flex; align-items: center; gap: 5px; height: 18px; }
.uiw-node.bold { font-weight: 600; }
.uiw-node .uiw-ck { margin-top: 0; }
.uiw-node span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.uiw-arrow { width: 9px; flex: none; font-size: 7px; font-weight: 400; }
.uiw-note-text { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; color: var(--muted); font-size: 11.5px; }
.uiw-split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.uiw-split .uiw-field { margin-bottom: 5px; }
.uiw-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; }
.uiw-table { width: 100%; min-width: 470px; border-collapse: collapse; }
.uiw-table th { padding: 7px 6px; background: var(--ink); color: var(--paper); font-weight: 600; text-align: left; }
.uiw-table td { padding: 5px 6px; border-bottom: 1px solid var(--hairline); }
.uiw-table td:first-child { color: var(--muted); }
.uiw-table .uiw-select { margin: 0; }
.uiw-remove { text-align: center; }
.uiw-pan { overflow-x: auto; }
.uiw-win { min-width: var(--min, 860px); border: 2px solid var(--ink); }
.uiw-top { padding: 8px 12px; border-bottom: 1px solid var(--hairline); }
.uiw-cols { display: grid; grid-template-columns: var(--cols); }
.uiw-col { min-width: 0; padding: 12px; }
.uiw-foot { padding: 0 12px 12px; }
.uiw-pair-hint { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: center; font-size: 11px; text-align: center; }
.uiw-pair-hint b { font-size: 22px; font-weight: 400; }
.uiw-pair { display: flex; align-items: center; gap: 6px; padding: 7px; border: 1px solid var(--ink); }
.uiw-pair dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; flex: 1; min-width: 0; margin: 0; }
.uiw-pair dt { font-weight: 600; }
.uiw-pair dd { margin: 0; overflow-wrap: anywhere; }
.uiw-x { padding: 3px 7px; border: 1px solid var(--ink); }
.uiw-group { margin: 0 0 12px; padding: 7px 10px 9px; border: 1px solid var(--ink); }
.uiw-group legend { padding: 0 4px; }
.uiw-group .uiw-opt + .uiw-opt { margin-top: 7px; }
.uiw-under { display: grid; grid-template-columns: var(--cols); padding: 0 2px; }
.uiw-under-col { min-width: 0; padding: 0 16px 0 12px; }
.uiw-under-col:not(:empty)::before { content: ""; display: block; width: 1px; height: 24px; margin-bottom: 8px; background: var(--ink); }
.uiw-under-col p { margin: 0 0 10px; font-size: 15px; line-height: 1.3; }

.pbi-brand { margin-bottom: 8px; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.pbi-report { margin: 12px 0; text-align: center; }
.pbi-kpi { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 6px; align-items: baseline; margin-bottom: 12px; }
.pbi-kpi b { font-size: 16px; font-weight: 500; }
.pbi-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pbi-chips span { padding: 1px 8px; border: 1px solid var(--ink); border-radius: 9px; font-size: 11px; }
.pbi-chips .on { background: var(--ink); color: var(--paper); }
.pbi-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.pbi-panel { padding: 8px; background: #1111101a; }
.pbi-title { margin-bottom: 6px; font-weight: 600; }
.pbi-chart { padding: 8px; border: 1px solid var(--hairline); }
.pbi-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 130px; padding-bottom: 18px; border-bottom: 0; }
.pbi-bars span { position: relative; width: 34px; background: var(--ink); opacity: .55; }
.pbi-bars em { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); font-size: 10px; font-style: normal; color: var(--ink); }
.pbi-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.pbi-table th { padding: 5px; background: var(--ink); color: var(--paper); font-weight: 600; text-align: left; }
.pbi-table td { padding: 4px 5px; border-bottom: 1px solid var(--hairline); }
.pbi-table .total td { font-weight: 600; }
.pbi-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.pbi-action { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.pbi-button { padding: 8px; background: #1111101a; }
.pbi-button .uiw-btn { padding: 4px 6px; font-weight: 600; white-space: normal; }
.pbi-button p { margin: 8px 0 0; font-size: 10.5px; line-height: 1.25; }
.pbi-model { min-height: 118px; background: repeating-linear-gradient(115deg, #1111102e 0 1px, transparent 1px 11px), repeating-linear-gradient(25deg, #1111102e 0 1px, transparent 1px 11px), #11111012; }

@media (max-width: 1000px) {
  .uiw-row { grid-template-columns: minmax(0, 1fr); }
  .uiw-side { border: solid var(--ink); border-width: 0 2px; padding: 0 18px 8px; }
  .uiw-side:empty { display: none; }
  .uiw-side p { padding: 0; color: var(--muted); font-size: 14px; }
  .uiw-side p::before { display: none; }
  .uiw-last .uiw-side { order: -1; }
}
@media (max-width: 760px) {
  .uiw-under { display: block; padding: 0; }
  .uiw-under-col { padding: 0; }
  .uiw-under-col:not(:empty)::before { display: none; }
  .uiw-under-col:first-child p:first-child { margin-top: 12px; }
  .uiw-under-col p { color: var(--muted); font-size: 14px; }
  .uiw-split { grid-template-columns: minmax(0, 1fr); }
  .uiw-line { flex-wrap: wrap; }
  .uiw-stack { flex-direction: row; flex-wrap: wrap; margin-top: 0; }
}

/* Technical drawings */
.drawing { display: block; width: 100%; height: auto; overflow: visible; }
.drawing text { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.drawing .wall { fill: url(#hatch); stroke: var(--ink); stroke-width: .8; }
.drawing .thin { fill: none; stroke: var(--ink); stroke-width: .8; }
.drawing .line { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.drawing .heavy { fill: none; stroke: var(--ink); stroke-width: 3; }
.drawing .solid { fill: var(--ink); }
.drawing .dashed { stroke-dasharray: 3 3; }
.drawing .ghost { opacity: .28; }
.drawing .tag-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.drawing .cell { fill: none; stroke: var(--ink); stroke-width: 1; }
.drawing .outline { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 2; }
.ribbon-strip { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.ribbon-strip span { padding: 6px 10px; border: 1px solid var(--hairline); font-size: 12px; }
.ribbon-strip .active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; margin: 0 0 clamp(32px, 4vw, 52px); }
.plan-row figcaption { margin-top: 10px; }
.plan-row p { margin: 0; max-width: 32em; font-size: 17px; line-height: 1.4; }
.annotated { margin-bottom: clamp(32px, 4vw, 52px); }
.annotated + .annotated { margin-top: -8px; }
.annotated-title { width: var(--ui, 340px); padding: 12px 20px 4px; border: 2px solid var(--ink); border-bottom: 0; font-size: 16px; }
.annotated-row { display: grid; grid-template-columns: var(--ui, 340px) minmax(0, 1fr); align-items: center; }
.annotated-field { padding: 8px 20px; border: solid var(--ink); border-width: 0 2px; font-size: 13px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.annotated-field label { display: block; margin-bottom: 4px; }
.annotated-field .ck.on, .annotated-field .rd.on { box-shadow: inset 0 0 0 2px var(--paper); }
.annotated-field .mock-table { font-size: 12px; }
.annotated-field .mock-table th, .annotated-field .mock-table td { padding-left: 4px; }
.annotated-field .mock-note { font-size: 12px; line-height: 1.35; }
.annotated-field .mock-sub { margin-top: 0; }
.annotated-last .mock-buttons { justify-content: center; margin-top: 0; }
.annotated-row > p { position: relative; margin: 0; padding-left: 72px; font-size: 15px; line-height: 1.3; }
.annotated-row > p::before { content: ""; position: absolute; left: 0; top: 50%; width: 60px; height: 1px; background: var(--ink); }
.annotated-last .annotated-field { padding-bottom: 14px; border-width: 0 2px 2px; }
.drawing-elements { max-width: 640px; }
.goal { display: flex; align-items: center; gap: 20px; margin: clamp(20px, 3vw, 36px) 0; }
.goal span { font-size: clamp(36px, 4vw, 56px); line-height: 1; }
.goal p { margin: 0; max-width: 30em; font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) clamp(16px, 2.4vw, 32px); }
.room { margin: 0; }
.room figcaption { margin-bottom: 8px; }
.nf-options { display: grid; grid-template-columns: minmax(0, 1fr) clamp(70px, 10vw, 130px); gap: clamp(20px, 4vw, 56px); margin-bottom: clamp(32px, 4vw, 52px); }
.nf-option { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: end; margin: 0 0 24px; }
.nf-option figcaption { display: flex; flex-direction: column; gap: 3px; font-size: 14px; line-height: 1.3; color: var(--muted); }
.nf-option strong { color: var(--ink); font-weight: 500; }
.nf-params { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.nf-params img { width: 100%; max-width: 560px; border: 1px solid var(--ink); }

/* Project case study */
.case-head { padding: var(--pad); }
.back { display: inline-block; margin-bottom: clamp(20px, 3vw, 40px); text-decoration: none; }
.back:hover { text-decoration: underline; }
.case-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: end; }
.case-title { margin: 0 0 16px; font-size: clamp(48px, 9vw, 136px); font-weight: 500; line-height: .95; letter-spacing: -.035em; }
.case-alt { margin: 14px 0 0; font-size: 13px; }
.case-links-head { margin-top: 24px !important; }
.case-links { font-size: 15px; overflow-wrap: anywhere; }
.case-image { width: 100%; height: min(78vh, 720px); min-height: 320px; object-fit: cover; }
.case-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 16px var(--pad); border-top: 1px solid var(--ink); }
.case-facts dt { color: var(--muted); margin-bottom: 4px; }
.case-facts dd { margin: 0; }
.section-text { margin: 0 0 18px; max-width: 46em; font-size: 18px; line-height: 1.42; }
.section-text + .strip-block, .section-text + .sheets, .section-text + .notes { margin-top: clamp(28px, 4vw, 48px); }
.sheets { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: clamp(12px, 1.8vw, 24px); align-items: start; }
.sheets + .sheets, .sheets + .notes, .notes + .sheets { margin-top: clamp(24px, 3.4vw, 44px); }
.sheet { margin: 0; }
.sheet img { width: 100%; height: auto; }
/* White drawing sheets take on the page's paper colour. */
.sheet-drawing img, .strip-image { mix-blend-mode: multiply; }
.sheet figcaption { margin-top: 8px; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(16px, 2.4vw, 32px); }
.notes > div { padding-top: 10px; border-top: 1px solid var(--ink); }
.notes h3, .strip-list h3 { margin: 0 0 5px; font-size: 18px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.notes p, .strip-list p { margin: 0; font-size: 15px; line-height: 1.38; color: var(--muted); }
.strip-list .strip-sub { margin-bottom: 5px; color: var(--ink); font-weight: 500; }
.strip-block { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.strip-image { width: 100%; height: auto; }
.strip-list { position: relative; margin: 0; padding: 0; list-style: none; }
.strip-list li { position: absolute; top: var(--top); left: 0; right: 0; max-width: 34em; }
.next { display: block; padding: var(--pad); border-top: 1px solid var(--ink); text-decoration: none; transition: background .2s, color .2s; }
.next-title { display: block; margin-top: 8px; font-size: clamp(32px, 6vw, 88px); font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.next:hover { background: var(--ink); color: var(--paper); }
.next:hover .muted { color: #dedcd6b3; }

/* About */
.about-head { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 44px); }
.portrait { flex: none; width: clamp(96px, 12vw, 156px); height: auto; border-radius: 50%; }
.about-role { margin: 0; line-height: 1.7; }
.about-summary { margin: 0; max-width: 30em; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.22; letter-spacing: -.015em; text-wrap: pretty; }
.expertise { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px clamp(16px, 2.4vw, 32px); }
.expertise > div { padding-top: 10px; border-top: 1px solid var(--ink); }
.expertise h2 { margin: 0 0 10px; font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.cv { border-top: 1px solid var(--ink); }
.cv-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.cv-row:last-child { border-bottom-color: var(--ink); }
.cv-row h2 { margin: 0; font-size: clamp(19px, 1.9vw, 24px); font-weight: 500; line-height: 1.15; letter-spacing: -.015em; }
.cv-row h2 a { text-decoration: none; }
.cv-row h2 a:hover { text-decoration: underline; text-underline-offset: .15em; }
.cv-org { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.cv-line { margin: 0; max-width: 40em; font-size: 16px; line-height: 1.35; }
.cv-points { margin: 12px 0 0; padding-left: 16px; max-width: 46em; font-size: 15px; line-height: 1.4; }
.cv-points li + li { margin-top: 4px; }
.email {
  display: block;
  font-size: clamp(21px, 5.2vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .1em; }
.contact-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }

/* Scroll-in motion */
.reveal { opacity: 0; transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal[data-from="below"] { transform: translateY(32px); }
.reveal[data-from="right"] { transform: translateX(56px); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero-body { grid-template-columns: minmax(0, 1fr); }
  .hero-image { order: -1; height: 56vh; }
  .expertise { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-intro, .panels, .tool-story, .setup, .setup-wide, .plan-row, .nf-params { grid-template-columns: minmax(0, 1fr); }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; }
  .tool-name { grid-area: 1 / 1; }
  .tool-does { grid-area: 2 / 1; }
  .tool-software { grid-area: 3 / 1; }
  .tool-year { display: none; }
  .tool-arrow { grid-area: 1 / 2; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* On phones the level rail becomes a bottom bar. */
@media (max-width: 760px) {
  body { padding-bottom: 60px; }
  .frame { display: block; }
  .rail { border: 0; }
  .rail-inner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 5;
    height: 56px;
    padding: 0;
    background: var(--paper);
    border-top: 1px solid var(--ink);
  }
  .mark { display: none; }
  .levels { flex-direction: row; height: 100%; }
  .levels a { flex: 1; justify-content: center; padding: 0; border: 0; }
  .levels b { font-size: 14px; }
  .strip { padding: 18px 0; }
  .panel { aspect-ratio: 4 / 5; }
  .panel-page { aspect-ratio: auto; height: 62vh; }
  .panel-text { flex-direction: column; align-items: flex-start; }
  .panel-note { flex: none; }
  .mock-table { font-size: 11px; }
  .mock-table th, .mock-table td { padding-left: 6px; padding-right: 6px; overflow-wrap: anywhere; }
  .col-empty { display: none; }
  .mock-dialog { grid-template-columns: minmax(0, 1fr); }
  .mock-dialog > div + div { border-left: 0; border-top: 1px solid var(--hairline); }
  .step-row { grid-template-columns: minmax(0, 1fr); }
  .step { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 16px; padding: 0 0 22px; text-align: left; }
  .step:last-child { padding-bottom: 0; }
  .step:not(:last-child)::after { top: 62px; left: 31px; width: 1px; height: calc(100% - 62px); }
  .step-text { align-items: flex-start; margin-top: 2px; }
  .step-text .tag { align-self: flex-start; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .output-images { grid-template-columns: minmax(0, 1fr); }
  .strip-right { display: none; }
  .band-lead { align-items: flex-start; }
  .annotated-title { width: 100%; }
  .annotated-row { grid-template-columns: minmax(0, 1fr); }
  .annotated-row > p { padding: 0 20px 8px; border: solid var(--ink); border-width: 0 2px; color: var(--muted); font-size: 14px; }
  .annotated-row > p::before { display: none; }
  .annotated-last > p { order: -1; }
  .rooms { grid-template-columns: minmax(0, 1fr); }
  .nf-options { grid-template-columns: minmax(0, 1fr) 54px; gap: 14px; }
  .nf-option { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project, .project:nth-child(4n + 2), .project:nth-child(4n + 3) { grid-column: auto; margin-top: 0; }
  .project:nth-child(4n) { margin-top: 0; }
  .project img, .project:nth-child(4n + 2) img, .project:nth-child(4n + 3) img { aspect-ratio: 5 / 4; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-image { height: auto; min-height: 0; }
  .cv-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .about-head { align-items: flex-start; flex-direction: column; }
  .sheets, .notes, .strip-block { grid-template-columns: minmax(0, 1fr); }
  .strip-image { max-width: 240px; margin: 0 auto; }
  .strip-list li { position: static; max-width: none; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .reveal { opacity: 1; transform: none !important; }
}
