/* The second side of the site: building technologist.
   Same layout bones as the architect side, drawn in one-bit dither on a dark
   ground. Headlines use Redaction, a serif cut into pixels; text is mono. */

@font-face { font-family: "Redaction 35"; src: url("../assets/fonts/redaction-35-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Redaction 35"; src: url("../assets/fonts/redaction-35-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Redaction 20"; src: url("../assets/fonts/redaction-20-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Redaction 20"; src: url("../assets/fonts/redaction-20-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Redaction 20"; src: url("../assets/fonts/redaction-20-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --t-bg: #0c0e0d;
  --t-ink: #e8e5da;
  --t-dim: #8d928a;
  --t-line: rgba(232, 229, 218, .17);
  --mint: #8ff0c4;
  --pxl: "Redaction 35", "Libre Caslon Display", Georgia, serif;   /* big pixel serif */
  --pxl2: "Redaction 20", "Libre Caslon Display", Georgia, serif;  /* smaller sizes, finer pixels */
  --code: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

#wipe { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; display: none; image-rendering: pixelated; }
canvas.dz, .gate__band { image-rendering: pixelated; display: block; }

/* ----------------------------------------------- the switch in the bar */
.mode { position: relative; display: flex; border: 1px solid var(--rule); border-radius: 2rem; padding: 2px; font: 600 .6rem/1 var(--mont); letter-spacing: .16em; }
.mode a { position: relative; z-index: 1; padding: .5rem .8rem; border-radius: 2rem; color: var(--soft); transition: color .3s; white-space: nowrap; }
.mode a[aria-current="page"] { color: var(--sheet); }
.mode i { position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; width: var(--w, 50%); border-radius: 2rem; background: var(--ink); transform: translateX(var(--x, 0)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), width .5s cubic-bezier(.2, .8, .2, 1); }
.bar { gap: 1rem; }
.bar__name { margin-right: auto; }
@media (max-width: 52rem) {
  .mode a span { display: none; }
  .bar__nav a:first-child { display: none; }
}
@media (max-width: 30rem) { .bar__name { font-size: .58rem; letter-spacing: .06em; } .mode a { padding: .5rem .55rem; letter-spacing: .1em; } }

/* --------------------------- foot of the page: a slim strip to the other side */
.gate { position: relative; }
.gate__band { width: 100%; height: clamp(2.4rem, 7vh, 4rem); }
.gate__link { display: flex; align-items: baseline; justify-content: flex-end; gap: .7rem; max-width: 64rem; margin: 0 auto; padding: 1.2rem var(--gut) .9rem; text-decoration: none; font: 600 .62rem/1 var(--mont); letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.gate__link i { font-style: normal; transition: translate .4s cubic-bezier(.2, .7, .2, 1); }
.gate__link:hover { color: var(--ink); }
.gate__link:hover i { translate: .4rem 0; }
body[data-mode="tech"] .gate__link { font: 500 .64rem/1 var(--code); }

/* ------------------------------------------------------------ dark theme */
body[data-mode="tech"] {
  --sheet: var(--t-bg); --paper: var(--t-bg); --ink: var(--t-ink); --soft: #b9bbb0; --faint: var(--t-dim);
  --rule: var(--t-line); --red: #ff6b5e; --tint: var(--mint);
  background: var(--t-bg); color: var(--t-ink);
  font: 400 .84rem/1.75 var(--code);
}
body[data-mode="tech"] .bar__name { color: var(--t-ink); font-family: var(--code); font-weight: 500; letter-spacing: .1em; }
body[data-mode="tech"] .bar__nav, body[data-mode="tech"] .mode { font-family: var(--code); font-weight: 500; letter-spacing: .14em; }
body[data-mode="tech"] .bar__progress { display: block; }
body[data-mode="tech"] .bar__progress i { background: var(--mint); }
body[data-mode="tech"] ::selection { background: var(--mint); color: var(--t-bg); }
body[data-mode="tech"] .reveal { transform: none; transition: opacity .5s steps(5); }
body[data-mode="tech"] mark { color: var(--t-bg); background: linear-gradient(transparent 12%, var(--mint) 12% 90%, transparent 90%); padding: 0 .25em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
body[data-mode="tech"] :focus-visible { outline-color: var(--mint); }
body[data-mode="tech"] .lightbox__scroll img { background: #fff; }

.t-kicker { display: flex; align-items: center; gap: .7rem; font: 500 .64rem/1 var(--code); letter-spacing: .2em; text-transform: uppercase; color: var(--t-dim); }
.t-kicker i { width: .5rem; height: .5rem; background: var(--mint); }

/* ------------------------------------ the cover, same place, now in pixels */
.cover--tech .cover__layer--back canvas { width: 100%; height: 100%; }
.cover--tech .cover__bob canvas { width: 100%; aspect-ratio: 771 / 1346; }
.cover--tech .cover__title { color: var(--t-ink); }
.cover--tech .cover__name { font: 500 max(.6rem, 1.9cqw)/1.2 var(--code); letter-spacing: .1em; }
.cover--tech .cover__what { font: 700 max(.95rem, 4.3cqw)/1.1 var(--pxl); letter-spacing: .03em; text-transform: none; }
.cover--tech .cover__tagline { font: italic 400 clamp(.66rem, 1.4svh, .8rem)/2 var(--pxl2); letter-spacing: .3em; color: var(--t-dim); }
.cover--tech .cover__tagline span::after { background: var(--t-dim); }
.cover--tech .cover__tagline span:nth-child(3)::after { background: var(--t-ink); }
.cover--tech .cover__side { font-family: var(--code); font-weight: 500; color: var(--t-dim); }

/* ----------------------------------------------------------------- index */
.t-index { max-width: 64rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gut); }
.t-index__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 3rem; align-items: baseline; margin-bottom: 2rem; }
.t-index__head h2 { font: 700 clamp(1.6rem, 2.6vw, 2.2rem)/1.1 var(--pxl); }
.t-index__head p { color: #b9bbb0; max-width: 36em; }
.t-list li { border-top: 1px solid var(--t-line); }
.t-list li:last-child { border-bottom: 1px solid var(--t-line); }
.t-row { position: relative; display: grid; grid-template-columns: 2.6rem minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 3rem 1.5rem; gap: 1.2rem; align-items: baseline; padding: 1.05rem .6rem; text-decoration: none; isolation: isolate; }
.t-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--t-ink); clip-path: inset(0 100% 0 0); transition: clip-path .45s steps(9); }
.t-row:hover::before, .t-row:focus-visible::before { clip-path: inset(0); }
.t-row:hover, .t-row:focus-visible { color: var(--t-bg); }
.t-row__no { font: 500 .68rem/1 var(--code); letter-spacing: .14em; color: var(--t-dim); }
.t-row__title { font: 700 clamp(1.15rem, 1.9vw, 1.55rem)/1.1 var(--pxl2); letter-spacing: .01em; }
.t-row__kind { font: 400 .78rem/1.5 var(--code); }
.t-row__stack { font: 400 .64rem/1.5 var(--code); letter-spacing: .04em; color: var(--t-dim); }
.t-row__go { transform: translateX(-.5rem); opacity: 0; transition: transform .3s steps(4), opacity .3s steps(4); }
.t-row:hover .t-row__go { transform: none; opacity: 1; }
.t-row:hover .t-row__no, .t-row:hover .t-row__stack, .t-row:focus-visible .t-row__no, .t-row:focus-visible .t-row__stack { color: rgba(12, 14, 13, .65); }

.t-contact { max-width: 64rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--gut) clamp(3rem, 8vw, 5rem); }
.t-contact__mail { margin-top: 1.2rem; font: 400 clamp(1.1rem, 2.6vw, 1.8rem)/1.2 var(--pxl2); overflow-wrap: anywhere; }
.t-contact__mail a { text-decoration-thickness: 1px; text-underline-offset: .3em; }
.t-contact__mail a:hover { color: var(--mint); }

/* --------------------------------------------------------------- project */
.t-proj { max-width: 60rem; margin: 0 auto; padding: calc(var(--bar-h) + clamp(2rem, 6vw, 4.5rem)) var(--gut) 0; }
.t-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; font: 500 .64rem/1 var(--code); letter-spacing: .16em; text-transform: uppercase; color: var(--t-dim); }
.t-crumb a { text-decoration: none; color: var(--t-ink); }
.t-crumb a:hover { color: var(--mint); }
.t-ptitle { margin: 1.6rem 0 .5rem; font: 700 clamp(2.1rem, 5vw, 3.9rem)/1 var(--pxl); letter-spacing: .005em; text-wrap: balance; }
.t-kind { font: italic 400 clamp(1rem, 1.6vw, 1.25rem)/1.3 var(--pxl2); color: var(--t-dim); }
.t-what { max-width: 44em; margin-top: 1.8rem; font-size: .9rem; line-height: 1.85; color: #d6d3c8; }
.t-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
.t-tags li { padding: .35rem .55rem; border: 1px solid var(--t-line); font: 400 .62rem/1 var(--code); letter-spacing: .06em; color: #b9bbb0; }

.t-demo { margin: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(2.5rem, 6vw, 4.5rem); display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); }

.t-pnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--t-line); border: 1px solid var(--t-line); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.t-pnav a { display: block; padding: 1.2rem; background: var(--t-bg); text-decoration: none; transition: background-color .25s steps(3), color .25s steps(3); }
.t-pnav a + a { text-align: right; }
.t-pnav span { display: block; font: 500 .6rem/1 var(--code); letter-spacing: .18em; text-transform: uppercase; color: var(--t-dim); margin-bottom: .7rem; }
.t-pnav strong { font: 700 clamp(1rem, 1.9vw, 1.35rem)/1.1 var(--pxl2); }
.t-pnav a:hover { background: var(--t-ink); color: var(--t-bg); }
.t-pnav a:hover span { color: rgba(12, 14, 13, .6); }

/* ================================================================= demos */
.demo { border: 1px solid var(--t-line); padding: clamp(.8rem, 2vw, 1.3rem); display: grid; gap: 1rem; min-width: 0; }
.demo__tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.demo__tabs button { padding: .5rem .7rem; border: 1px solid var(--t-line); font: 500 .62rem/1.2 var(--code); letter-spacing: .08em; text-transform: uppercase; color: #b9bbb0; text-align: left; transition: background-color .2s steps(2), color .2s steps(2), border-color .2s; }
.demo__tabs button:hover { border-color: var(--t-ink); color: var(--t-ink); }
.demo__tabs button[aria-pressed="true"] { background: var(--t-ink); color: var(--t-bg); border-color: var(--t-ink); }
.demo__tabs--toggle button[aria-pressed="true"] { background: none; color: var(--mint); border-color: var(--mint); }
.demo__tabs button b { font-weight: 400; opacity: .6; margin-left: .4em; }
.demo__stack { display: grid; }
.demo__layer { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .35s steps(5), visibility 0s .35s; align-self: start; }
.demo__layer.is-on { opacity: 1; visibility: visible; transition: opacity .35s steps(5); }
.demo__foot { font: 400 .64rem/1.4 var(--code); color: var(--t-dim); }
.demo__info { min-height: 1.4em; font: 400 .68rem/1.4 var(--code); letter-spacing: .04em; color: var(--mint); }
.demo__code { margin: 0; padding: .9rem 1rem; background: rgba(232, 229, 218, .05); border-left: 2px solid var(--mint); font: 400 .68rem/1.6 var(--code); color: #d6d3c8; overflow: auto; white-space: pre; max-height: 22rem; }
.demo__range { display: grid; grid-template-columns: 3.6rem 1fr; align-items: center; gap: .6rem; font: 500 .6rem/1 var(--code); letter-spacing: .14em; text-transform: uppercase; color: var(--t-dim); }
.demo__range input { appearance: none; height: 1px; background: var(--t-line); accent-color: var(--mint); }
.demo__range input::-webkit-slider-thumb { appearance: none; width: .7rem; height: .7rem; background: var(--mint); cursor: ew-resize; }
.demo__range input::-moz-range-thumb { width: .7rem; height: .7rem; border: 0; border-radius: 0; background: var(--mint); cursor: ew-resize; }

/* every picture of a set sits in the frame of the first, so switching never moves the page */
.demo__stack--fit { position: relative; max-height: 76svh; width: 100%; margin-inline: auto; background: #fff; }
.demo__stack--fit .demo__layer { position: absolute; inset: 0; }
.demo__stack--fit .t-shot, .demo__stack--fit .t-shot img { width: 100%; height: 100%; max-height: none; }

/* real pictures, never dithered */
.t-shot { display: block; background: #fff; }
.t-shot img { width: 100%; height: auto; max-height: 76svh; object-fit: contain; }
body[data-mode="tech"] .fig__zoom::after { border-color: var(--mint); }

/* plans */
.plan { width: 100%; height: auto; max-height: 30rem; display: block; }
.plan__room { fill: rgba(232, 229, 218, .05); stroke: none; transition: fill .2s; }
.plan__room:hover { fill: rgba(143, 240, 196, .18); }
.plan__label { fill: #b9bbb0; font: 400 260px var(--code); text-anchor: middle; dominant-baseline: middle; pointer-events: none; text-transform: uppercase; letter-spacing: 20px; }
.plan__wall { stroke: var(--t-ink); stroke-width: 150; stroke-linecap: square; cursor: crosshair; }
.plan__wall--in { stroke-width: 70; stroke: #b9bbb0; }
.plan__wall:hover { stroke: var(--mint); }
.plan__door { stroke: #ff6b5e; stroke-width: 190; cursor: crosshair; }
.plan__window { stroke: var(--mint); stroke-width: 190; cursor: crosshair; }
/* LAM v2 */
.lam2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem 1.6rem; align-items: start; }
.lam2 .demo__info { grid-column: 1 / -1; }
.lam2 .plan__room { stroke: var(--t-ink); stroke-width: 60; }
.lam2 .plan__room--bathroom, .lam2 .plan__room--toilet, .lam2 .plan__room--wc { fill: rgba(143, 240, 196, .14); }
.lam2 .plan__room--bedroom { fill: rgba(232, 229, 218, .11); }
.lam2 .plan__room--balcony { fill: none; stroke-dasharray: 160 120; }
.lam2__plan { min-height: 14rem; display: grid; align-items: center; }
.lam2__none { text-align: center; color: var(--t-dim); font-size: .74rem; }
.lam2__brief { font: italic 400 1.05rem/1.4 var(--pxl2); color: var(--t-ink); }
.lam2__stats { margin: 1rem 0; }
.lam2__stats div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--t-line); font-size: .7rem; }
.lam2__stats dt { color: var(--t-dim); }
.lam2__stats dd span { color: var(--t-dim); margin-left: .5em; }
.lam2__items li { position: relative; padding: .18rem 0 .18rem 1.3rem; font-size: .7rem; }
.lam2__items li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; background: var(--mint); }
.lam2__items li.is-no { color: var(--t-dim); }
.lam2__items li.is-no::before { background: none; border: 1px solid #ff6b5e; }
.lam2__bad { margin-top: .9rem; font-size: .66rem; line-height: 1.6; color: #ff9d94; }

@media (max-width: 52rem) {
  .t-index__head { grid-template-columns: 1fr; }
  .t-row { grid-template-columns: 2.2rem minmax(0, 1fr); gap: .3rem 1rem; }
  .t-row__kind, .t-row__stack { grid-column: 2; }
  .t-row__go { display: none; }
  .nadx, .lam2, .ifc { grid-template-columns: 1fr; }
}

/* grid children may shrink, so long code lines scroll inside their box */
.ifc > *, .lam2 > *, .nadx > *, .t-demo > * { min-width: 0; }
.demo__code { max-width: 100%; }

/* ------------------------------------------ what each block is, said up front */
.demo__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--t-line); }
.demo__tag { padding: .32rem .5rem; background: var(--mint); color: var(--t-bg); font: 700 .58rem/1 var(--code); letter-spacing: .14em; text-transform: uppercase; }
.demo--shots .demo__tag { background: none; color: var(--t-ink); border: 1px solid var(--t-ink); }
.demo__title { font: 700 clamp(1.05rem, 1.7vw, 1.35rem)/1.2 var(--pxl2); }
.demo__row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .6rem; align-items: start; }
.demo__label { padding-top: .5rem; font: 500 .58rem/1.2 var(--code); letter-spacing: .16em; text-transform: uppercase; color: var(--t-dim); }
p.demo__label { padding-top: 0; margin: 1.1rem 0 .45rem; }
p.demo__label:first-child { margin-top: 0; }
.t-open { display: inline-block; margin-top: 1.4rem; padding: .6rem .9rem; border: 1px solid var(--mint); color: var(--mint); text-decoration: none; font: 500 .66rem/1 var(--code); letter-spacing: .12em; text-transform: uppercase; }
.t-open:hover { background: var(--mint); color: var(--t-bg); }

/* NAD Mapper: a material laid onto the marked wall */
.nadx { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.2rem 1.6rem; align-items: start; }
.nadx__stage { position: relative; overflow: hidden; background: #fff; }
.nadx__photo, .nadx__shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nadx__clip { position: absolute; inset: 0; isolation: isolate; transition: opacity .35s; }
.nadx__clip.is-off { opacity: 0; }
.nadx__tex { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.nadx__tex i { position: absolute; left: -100%; top: -100%; width: 300%; height: 300%; background-repeat: repeat; background-size: calc(var(--size, 200) * 1px) auto; transform: rotate(calc(var(--rot, 0) * 1deg)); }
/* the photo's own light and shadow, laid back over the material */
.nadx__shade { filter: grayscale(1) brightness(1.55) contrast(1.05); mix-blend-mode: multiply; }
.nadx__outline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nadx__outline polygon { fill: none; stroke: var(--mint); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0; transition: opacity .3s; }
.nadx__stage.is-plain .nadx__outline polygon, .nadx__stage:hover .nadx__outline polygon { opacity: 1; }
.nadx__side { display: grid; gap: 1rem; }
.nadx__side .demo__row { grid-template-columns: 1fr; gap: .35rem; }
.nadx__side .demo__label { padding-top: 0; }
.nadx__mats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.nadx__mats button { aspect-ratio: 1.4; background-size: cover; background-position: center; border: 1px solid var(--t-line); outline-offset: 2px; font: 500 .56rem/1.2 var(--code); letter-spacing: .08em; text-transform: uppercase; color: #b9bbb0; }
.nadx__mats button[aria-pressed="true"] { outline: 2px solid var(--mint); }
.nadx .demo__range { grid-template-columns: 5.2rem 1fr; }

/* LAM */
.lam2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem 1.6rem; align-items: start; }
.lam2__items li { display: flex; justify-content: space-between; gap: 1rem; }
.lam2__items li b { font-weight: 400; color: var(--mint); flex: none; }
.lam2__items li.is-no b { color: #ff9d94; }
.plan__key { margin-top: .5rem; display: flex; align-items: center; gap: .4rem; font: 400 .6rem/1 var(--code); color: var(--t-dim); }
.plan__key i { width: 1rem; height: .25rem; margin-left: .6rem; }
.plan__key i:first-child { margin-left: 0; }
.plan__key .k-door { background: #ff6b5e; }
.plan__key .k-window { background: var(--mint); }

/* IFC to Neo4j */
.ifc { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem 1.6rem; align-items: start; }
.ifc__view { width: 100%; aspect-ratio: 4 / 3; max-height: 70svh; display: block; background: rgba(232, 229, 218, .03); cursor: grab; touch-action: pan-y; }
.ifc__view:active { cursor: grabbing; }
.ifc__count { font: 700 1.2rem/1.2 var(--pxl2); color: var(--mint); margin-bottom: .4rem; }
.ifc__rows li { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; border-top: 1px solid var(--t-line); font-size: .64rem; }
.ifc__rows span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifc__rows b { font-weight: 400; color: var(--t-dim); flex: none; }
.ifc__rows .ifc__more { color: var(--t-dim); }

@media (max-width: 52rem) { .demo__row { grid-template-columns: 1fr; gap: .3rem; } .demo__label { padding-top: 0; } }

/* the warped material is far larger than its frame before it is clipped; keep it from widening the page */
.nadx__stage { contain: paint; overflow: clip; }
.nadx__clip { overflow: hidden; contain: paint; }

@media (max-width: 52rem) { .nadx, .lam2, .ifc { grid-template-columns: 1fr; } }

/* year of development */
.t-row__year { font: 500 .72rem/1 var(--code); letter-spacing: .1em; color: var(--mint); text-align: right; }
.t-row:hover .t-row__year, .t-row:focus-visible .t-row__year { color: var(--t-bg); }
.t-year { color: var(--mint); }
@media (max-width: 52rem) { .t-row { grid-template-columns: 2.2rem minmax(0, 1fr) 3rem; } .t-row__year { grid-column: 3; grid-row: 1; } }

/* LAM: two designers side by side, the brief on the right */
@media (max-width: 60rem) { .lamx { grid-template-columns: 1fr; } .lamx__brief { order: -1; } }
@media (max-width: 36rem) { .lamx__plans { grid-template-columns: 1fr; } .lamx__card figcaption { min-height: 0; } }


.t-what a { color: var(--mint); text-underline-offset: .25em; text-decoration-thickness: 1px; }
.t-what a:hover { background: var(--mint); color: var(--t-bg); text-decoration: none; }

/* ==================================================================
   Demo stages, second pass: open layouts with corner marks instead of
   boxes, and pieces that move the way the architect side does.
   ================================================================== */
.demo { border: 0; padding: clamp(1rem, 2.4vw, 1.6rem) 0 0; position: relative; }
.demo::before, .demo::after { content: ""; position: absolute; top: 0; width: 1.1rem; height: 1.1rem; border-top: 1px solid var(--t-ink); }
.demo::before { left: 0; border-left: 1px solid var(--t-ink); }
.demo::after { right: 0; border-right: 1px solid var(--t-ink); }
.demo__head { border: 0; padding: 0 0 0 1.6rem; }
.demo__title { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
.demo__veil { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; image-rendering: pixelated; pointer-events: none; background: var(--t-bg); }

/* ---- NAD Mapper: swatches on a tray, dragged onto the wall */
.nadx { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1.4rem 2.2rem; align-items: center; }
.nadx__stage { cursor: default; }
.nadx__stage.is-target .nadx__outline polygon { opacity: 1; stroke-width: 2.5; }
.nadx__stage.is-target .nadx__clip { opacity: .55; }
.nadx__clip.is-new { animation: resolve .5s steps(7) both; }
@keyframes resolve { from { opacity: 0; } }
.nadx__tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem .9rem; padding: .6rem .4rem 1.2rem; }
.nadx__chip { position: relative; aspect-ratio: 1; background-size: cover; background-position: center; rotate: var(--r); box-shadow: .25rem .45rem 0 rgba(0, 0, 0, .55); transition: rotate .35s cubic-bezier(.2, .7, .2, 1), translate .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; cursor: grab; touch-action: none; }
.nadx__chip:hover { rotate: 0deg; translate: 0 -.35rem; box-shadow: .35rem .8rem 0 rgba(0, 0, 0, .5); }
.nadx__chip:active { cursor: grabbing; }
.nadx__chip span { position: absolute; left: 0; right: 0; top: calc(100% + .35rem); font: 500 .5rem/1.2 var(--code); letter-spacing: .1em; text-transform: uppercase; color: var(--t-dim); text-align: center; white-space: nowrap; }
.nadx__chip[aria-pressed="true"] { outline: 2px solid var(--mint); outline-offset: 3px; }
.nadx__chip[aria-pressed="true"] span { color: var(--mint); }
.nadx__chip--none { background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(232, 229, 218, .16) 5px 6px); border: 1px solid var(--t-line); }
.nadx__ghost { position: fixed; left: 0; top: 0; z-index: 60; width: 4.6rem; height: 4.6rem; margin: -2.3rem 0 0 -2.3rem; background-size: cover; pointer-events: none; outline: 2px solid var(--mint); box-shadow: .5rem 1rem 0 rgba(0, 0, 0, .45); rotate: -6deg; }
.nadx__photos { display: flex; gap: .35rem; margin-top: .4rem; }
.nadx__photos button { padding: .45rem .7rem; border: 1px solid var(--t-line); font: 500 .58rem/1 var(--code); letter-spacing: .12em; text-transform: uppercase; color: #b9bbb0; }
.nadx__photos button[aria-pressed="true"] { background: var(--t-ink); color: var(--t-bg); border-color: var(--t-ink); }

/* ---- Detectron: one picture, scrubbed through its stages */
.scrub { display: grid; gap: 1.2rem; }
.scrub__stage { position: relative; background: #fff; overflow: hidden; max-height: 74svh; margin-inline: auto; width: 100%; }
.scrub__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; user-select: none; }
.scrub__open { position: absolute; z-index: 4; right: .6rem; top: .6rem; width: 2.2rem; height: 2.2rem; background: var(--t-bg); color: var(--t-ink); border: 1px solid var(--t-ink); font-size: 1rem; cursor: pointer; }
.scrub__open:hover { background: var(--mint); color: var(--t-bg); border-color: var(--mint); }
.scrub__track { position: relative; padding-top: .3rem; }
.scrub__track input { appearance: none; display: block; width: 100%; height: 1.4rem; margin: 0; background: linear-gradient(var(--t-line), var(--t-line)) center / 100% 1px no-repeat; cursor: ew-resize; }
.scrub__track input::-webkit-slider-thumb { appearance: none; width: .9rem; height: 1.4rem; background: var(--mint); }
.scrub__track input::-moz-range-thumb { width: .9rem; height: 1.4rem; border: 0; border-radius: 0; background: var(--mint); }
.scrub__track ol { display: flex; justify-content: space-between; margin-top: .5rem; }
.scrub__track li { flex: 1; text-align: center; }
.scrub__track li:first-child { text-align: left; }
.scrub__track li:last-child { text-align: right; }
.scrub__track button { font: 500 .58rem/1.4 var(--code); letter-spacing: .1em; text-transform: uppercase; color: var(--t-dim); transition: color .2s; }
.scrub__track button b { display: block; font: 700 1rem/1.2 var(--pxl2); letter-spacing: 0; }
.scrub__track button:hover, .scrub__track button.is-on { color: var(--mint); }

/* ---- LAM: plans that draw themselves */
.plan--draw .plan__room { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; animation: roomLine .7s ease-out forwards, roomFill .5s ease-out forwards; animation-delay: calc(var(--k) * 110ms), calc(var(--k) * 110ms + 450ms); }
.plan--draw .plan__label { opacity: 0; animation: roomFill .4s forwards; animation-delay: calc(var(--k) * 110ms + 500ms); }
.plan--draw .plan__door, .plan--draw .plan__window { opacity: 0; animation: roomFill .5s forwards; animation-delay: calc(var(--n) * 110ms + 600ms); }
@keyframes roomLine { to { stroke-dashoffset: 0; } }
@keyframes roomFill { to { opacity: 1; fill-opacity: 1; } }

/* ---- IFC to Neo4j: a typed question, then the answer in two views */
.ask { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-top: .6rem; }
.ask__arrow { width: 2.6rem; height: 2.6rem; border: 1px solid var(--t-line); font: 400 1rem/1 var(--code); transition: background-color .2s steps(2), color .2s steps(2), border-color .2s; }
.ask__arrow:hover { background: var(--t-ink); color: var(--t-bg); border-color: var(--t-ink); }
.ask__q { min-height: 2.5em; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 clamp(1.3rem, 3vw, 2.3rem)/1.15 var(--pxl); color: var(--t-ink); }
.ask__q i { flex: none; width: .45em; height: .95em; margin-left: .18em; background: var(--mint); animation: caret 1s steps(1) infinite; }
.ask__dots { display: flex; justify-content: center; gap: .5rem; }
.ask__dots button { width: 1.6rem; height: .9rem; position: relative; }
.ask__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--t-line); transition: background-color .2s; }
.ask__dots button.is-on::before, .ask__dots button:hover::before { background: var(--mint); }
.ask__cypher { margin: 0 auto; max-width: 100%; min-height: 3.6em; padding: .7rem 1rem; font: 400 .72rem/1.6 var(--code); color: var(--mint); white-space: pre-wrap; overflow-wrap: anywhere; text-align: center; border-block: 1px solid var(--t-line); }
.ifc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.ifc__pane { position: relative; margin: 0; }
.ifc__pane figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .5rem; text-transform: none; letter-spacing: 0; font: 400 .64rem/1.3 var(--code); color: var(--mint); }
.ifc__pane figcaption b { font: 700 1.05rem/1.2 var(--pxl2); color: var(--t-ink); }
.ifc__pane figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifc__graph, .ifc__view { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 70svh; background: rgba(232, 229, 218, .03); touch-action: pan-y; }

/* ---- Node GUI: a loose stack of screenshots */
.deck { position: relative; aspect-ratio: 16 / 10.6; margin-top: 2.6rem; perspective: 1600px; --mx: 0; --my: 0; }
.deck__card {
  position: absolute; left: 0; right: 9%; bottom: 0; z-index: calc(10 - var(--p)); cursor: pointer;
  transform: translate3d(calc(var(--p) * 3% + var(--mx) * var(--p) * -14px), calc(var(--p) * -2.4rem + var(--my) * var(--p) * -8px), 0) scale(calc(1 - var(--p) * .035));
  transform-origin: 0 100%;
  filter: brightness(calc(1 - var(--p) * .2));
  transition: transform .75s cubic-bezier(.2, .8, .2, 1), filter .5s;
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, .55);
}
.deck__card .t-shot img { max-height: none; }
.deck__card:not(.is-front) .t-shot { pointer-events: none; }
.deck__card:not(.is-front):hover { filter: brightness(calc(1.08 - var(--p) * .2)); }
.deck__tab { position: absolute; left: calc(var(--i) * 24.5%); bottom: 100%; padding: .4rem .7rem; background: var(--t-ink); color: var(--t-bg); font: 500 .56rem/1 var(--code); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.deck__tab b { margin-right: .5em; font-weight: 700; }
.deck__card.is-front .deck__tab { background: var(--mint); }

@media (max-width: 52rem) {
  .nadx, .ifc { grid-template-columns: 1fr; }
  .nadx__tray { grid-template-columns: repeat(6, 1fr); gap: .5rem; padding-bottom: 1.6rem; }
  .nadx__chip span { display: none; }
  .ask { gap: .5rem; }
  .ask__arrow { width: 2.2rem; height: 2.2rem; }
  .scrub__track button { font-size: 0; }
  .scrub__track button b { font-size: .95rem; }
  .deck { margin-top: 5.5rem; }
  .deck__tab { left: 0; bottom: calc(100% + var(--i) * 0rem); }
  .deck__card:not(.is-front) .deck__tab { display: none; }
}

/* ==================================================================
   LAM demo, third pass: the brief as a strip on top, two large plans
   below it (grey for the language model alone, colour for LLM + LAM),
   and a switch between the plan and its two graphs.
   ================================================================== */
.demo--lam2 { --lamw: min(calc(100vw - 2 * var(--gut)), 82rem); width: var(--lamw); margin-inline: calc((100% - var(--lamw)) / 2); }
.lamx { display: grid; gap: clamp(1.2rem, 2.6vw, 2rem); }
.lamx > * { min-width: 0; }
.lamx__brief { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem 1.8rem; padding: 1.1rem 0; border-block: 1px solid var(--t-line); }
.lamx__brief .demo__label { padding: 0; white-space: nowrap; }
.lamx__brief .demo__label b { font-weight: 500; color: var(--mint); margin-left: .6em; }
.lamx__brief .lam2__brief { margin: 0; font-size: clamp(1.05rem, 1.9vw, 1.5rem); min-height: 2.8em; display: flex; align-items: center; }
.lamx__brief .lam2__brief::after { content: ""; flex: none; width: .5em; height: 1em; margin-left: .15em; background: var(--mint); animation: caret 1s steps(1) infinite; }
.lamx__nav { display: flex; gap: .4rem; }
.lamx__nav button { width: 2.4rem; height: 2.4rem; border: 1px solid var(--t-line); font: 400 .9rem/1 var(--code); transition: background-color .2s steps(2), color .2s steps(2), border-color .2s; }
.lamx__nav button:hover { background: var(--t-ink); color: var(--t-bg); border-color: var(--t-ink); }
.lamx__views { display: flex; justify-content: center; }
.lamx__views button { padding: .6rem 1rem; margin-left: -1px; border: 1px solid var(--t-line); font: 500 .58rem/1 var(--code); letter-spacing: .12em; text-transform: uppercase; color: #b9bbb0; transition: color .2s, background-color .2s steps(2); }
.lamx__views button:hover { color: var(--mint); }
.lamx__views button[aria-pressed="true"] { position: relative; background: var(--t-ink); color: var(--t-bg); border-color: var(--t-ink); }
.lamx__plans { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2.8rem); }
.lamx__card { margin: 0; display: grid; gap: .8rem; align-content: start; }
.lamx__card figcaption { margin: 0; display: flex; align-items: center; gap: .6rem; text-transform: none; letter-spacing: 0; font: 700 clamp(1.1rem, 1.8vw, 1.5rem)/1.1 var(--pxl2); color: var(--mint); }
.lamx__card figcaption::before { content: ""; width: .6rem; height: .6rem; background: currentColor; }
.lamx__card[data-way="llm_alone"] figcaption { color: #8d8f88; }
.lamx__plan { min-height: 16rem; display: grid; align-items: center; }
.lamx__plan .plan { max-height: min(36rem, 72svh); }

/* colour by room type; the language model alone is drawn in grey */
.lamx__plan .plan__room, .lamx__plan .plan__node { --c: #e8e5da; }
.lamx__plan .plan__room--living, .lamx__plan .plan__node--living { --c: #ffd166; }
.lamx__plan .plan__room--kitchen, .lamx__plan .plan__node--kitchen { --c: #ff9a56; }
.lamx__plan .plan__room--bedroom, .lamx__plan .plan__node--bedroom { --c: #7fb0ff; }
.lamx__plan .plan__room--bathroom, .lamx__plan .plan__node--bathroom { --c: #8ff0c4; }
.lamx__plan .plan__room--storage, .lamx__plan .plan__node--storage { --c: #c79bff; }
.lamx__plan .plan__room--balcony, .lamx__plan .plan__node--balcony { --c: #b6e36a; }
.lamx__plan .plan__room { fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: var(--t-ink); stroke-width: 70; stroke-linejoin: round; }
.lamx__plan .plan__room:hover { fill: color-mix(in srgb, var(--c) 48%, transparent); }
.lamx__plan .plan__label { fill: var(--t-ink); }
.lamx__plan .plan__passage { stroke: var(--t-bg); stroke-width: 110; }
.lamx__card[data-way="llm_alone"] .plan__room, .lamx__card[data-way="llm_alone"] .plan__node { --c: #8d8f88; }
.lamx__card[data-way="llm_alone"] .plan__room { fill: color-mix(in srgb, var(--c) 16%, transparent); stroke: #8d8f88; }
.lamx__card[data-way="llm_alone"] .plan__label { fill: #8d8f88; }
.lamx__card[data-way="llm_alone"] .plan__door { stroke: #a9aba2; }
.lamx__card[data-way="llm_alone"] .plan__window { stroke: #62645e; }

/* the graphs sit on the plan they come from */
.plan--graph .plan__room { fill-opacity: .4; stroke-opacity: .28; }
.plan--graph .plan__window, .plan--adj .plan__door, .plan--adj .plan__passage { display: none; }
.plan--graph .plan__label { translate: 0 520px; font-size: 220px; }
.plan__edge { stroke: var(--mint); stroke-width: 75; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: roomLine .5s ease-out forwards; animation-delay: calc(var(--k) * 60ms + 250ms); }
.plan__edge--entry { stroke-dasharray: .09 .07; stroke-dashoffset: 0; opacity: 0; animation: roomFill .4s forwards; animation-delay: calc(var(--k) * 60ms + 250ms); }
.plan__node { fill: var(--c); stroke: var(--t-bg); stroke-width: 70; transform-box: fill-box; transform-origin: center; animation: nodeIn .4s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--k) * 50ms); }
.plan__entry { fill: var(--t-bg); stroke: var(--mint); stroke-width: 70; }
@keyframes nodeIn { from { scale: 0; } }
.lamx__card[data-way="llm_alone"] .plan__edge, .lamx__card[data-way="llm_alone"] .plan__entry { stroke: #8d8f88; }

/* ---- IFC question: a quoted line on the left, smaller than the title */
.ask { grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem; }
.ask__q { justify-content: flex-start; text-align: left; min-height: 2.7em; margin: 0 .8rem 0 0; font: italic 400 clamp(1rem, 1.6vw, 1.2rem)/1.35 var(--pxl2); }
.ask__q span::before { content: "\201C"; }
.ask__q span::after { content: "\201D"; }
.ask__dots { justify-content: flex-start; }
.ask__cypher { margin: 0; text-align: left; }

@media (max-width: 52rem) {
  .lamx__brief { grid-template-columns: minmax(0, 1fr) auto; }
  .lamx__brief .lam2__brief { grid-column: 1 / -1; grid-row: 2; min-height: 4.2em; }
  .lamx__plans { grid-template-columns: 1fr; }
  .lamx__views button { padding: .6rem .6rem; letter-spacing: .06em; }
}

/* IFC question, again: small demo title, large italic question, arrows right after its last word */
.demo--ifc .demo__title { font-size: clamp(.95rem, 1.4vw, 1.1rem); }
.ask { display: flex; align-items: flex-end; gap: .4rem; }
.ask__q { flex: 0 1 auto; min-width: 0; min-height: 0; margin: 0 .8rem 0 0; font: italic 700 clamp(1.3rem, 3vw, 2.3rem)/1.15 var(--pxl); }
.ask__arrow { flex: none; }

/* the dither that rises when you keep scrolling past the foot of a page */
#over { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 99; pointer-events: none; display: none; image-rendering: pixelated; }

/* the runway: extra scroll below a page, during which the page stays pinned and the dither rises */
#runway { display: none; height: 190svh; pointer-events: none; }
body.has-runway #runway { display: block; }
body.has-runway #app { position: sticky; top: calc(100svh - var(--app-h, 100svh)); }
