/*
 * Lab wall theme for the public pages.
 *
 * The page is drawn as a section of a laboratory wall. Content sits in
 * hardware mounted on that wall, and each kind of hardware is one component:
 *
 *   .housing + .screen   a monitor recessed into the wall
 *   .port                a bolted observation window holding a specimen
 *   .placard             a steel notice plate screwed to the wall
 *   .projection          a panel of light thrown by an emitter
 *   .prose-block         a calm reading surface for long text
 *
 * Permanent content is hardware. Light is reserved for things that appear and
 * go away, such as a confirmation. The theme is dark only by design.
 */

/*
 * Fonts are served from this site because the content security policy only
 * allows fonts from the same origin. All four families are under the SIL Open
 * Font License; the license texts sit next to the files in /assets/fonts.
 * Only the weights used below are included. The body face also carries a
 * Greek subset, which browsers fetch only when a page contains Greek text.
 */
@font-face {
  font-family: "Chakra Petch";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/chakra-petch-500.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/chakra-petch-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-greek-400.woff2") format("woff2");
  unicode-range: U+0370-03FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-greek-500.woff2") format("woff2");
  unicode-range: U+0370-03FF;
}

@font-face {
  font-family: "VT323";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/vt323-400.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --wall: #141b22;
  --wall-hi: #1b242d;
  --steel-1: #2c3742;
  --steel-2: #1c252e;
  --steel-3: #141b22;
  --edge: #06080b;
  --plate-1: #4a5661;
  --plate-2: #36414b;
  --plaque-1: #98a5af;
  --plaque-2: #6e7b86;
  --glass: #041010;
  --phos: #5ef2cf;
  --phos-soft: #b4fbe9;
  --phos-dim: #4fa893;
  --flesh: #ef9b86;
  --warn: #f2b24a;
  --bad: #ff5b52;
  --ink: #d5e1e3;
  --ink-strong: #eaf6f3;
  --muted: #a9bcc1;
  --label: #8fa3a9;
  --beam: 90, 175, 255;
  --bolt: radial-gradient(circle at 9px 9px, #9aa7b3 0 2px, #1a222a 3px 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 9px) 9px, #9aa7b3 0 2px, #1a222a 3px 4px, transparent 5px),
    radial-gradient(circle at 9px calc(100% - 9px), #9aa7b3 0 2px, #1a222a 3px 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #9aa7b3 0 2px, #1a222a 3px 4px, transparent 5px);
  --font-ui: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-readout: "VT323", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --font-code: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { background: #0d1217; }

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.65 var(--font-body);
  /* Plates: rivets at the seam crossings, then seams, then the room light. */
  background:
    radial-gradient(circle at 10px 10px, #6b7884 0 2px, #1a222a 3px 4px, transparent 5px) 0 0 / 320px 260px,
    radial-gradient(circle at 310px 10px, #6b7884 0 2px, #1a222a 3px 4px, transparent 5px) 0 0 / 320px 260px,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .55) 0 2px, rgba(255, 255, 255, .05) 2px 3px, transparent 3px 320px),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .55) 0 2px, rgba(255, 255, 255, .05) 2px 3px, transparent 3px 260px),
    radial-gradient(ellipse 70% 520px at 50% 420px, rgba(62, 224, 196, .10), transparent 70%),
    linear-gradient(180deg, var(--wall-hi), var(--wall) 40%, #10161c);
}

a { color: var(--phos); }
a:hover { color: var(--phos-soft); }
:focus-visible { outline: 2px solid var(--phos); outline-offset: 2px; }

.wall {
  position: relative;
  /* 100vw includes the scrollbar, so full-bleed children would otherwise
     cause a sliver of sideways scrolling. */
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

.wall-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* Pipe runs. They extend past the content column to read as part of the wall. */
/* Pipe runs and dividers span the whole viewport, past the content column,
   so they read as part of the wall on wide screens instead of stopping at
   the edge of the content. The margin pulls each side out to the viewport
   edge from a centred container of any width. */
.rail,
.pipes,
.hazard {
  margin-inline: calc(50% - 50vw);
}

/* Inside the page a rail is a divider, so it loses the drop shadow that
   makes the top rail look attached to the ceiling. */
main .rail { box-shadow: none; }

.rail {
  height: 14px;
  background: linear-gradient(180deg, #07090c, #2b3641 30%, #6b7884 42%, #2b3641 62%, #0b0f13);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .5);
}

.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, rgba(242, 178, 74, .5) 0 12px, #11161b 12px 24px);
}

.pipes {
  height: 30px;
  background:
    linear-gradient(180deg, #07090c, #26303a 30%, #56636f 45%, #1d252d 75%, #07090c) 0 0 / 100% 12px no-repeat,
    linear-gradient(180deg, #07090c, #26303a 30%, #56636f 45%, #1d252d 75%, #07090c) 0 18px / 100% 8px no-repeat;
}

/* ---------- sign plate and navigation ---------- */

.sign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 22px;
  border-radius: 4px;
  border: 1px solid #0a0e12;
  background: var(--bolt), linear-gradient(180deg, #2a3540, #1a232c 55%, var(--steel-3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .45), 0 8px 18px rgba(0, 0, 0, .5);
}

.plaque {
  display: block;
  padding: 8px 18px;
  border-radius: 3px;
  color: #11181e;
  text-decoration: none;
  background: linear-gradient(180deg, var(--plaque-1), var(--plaque-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 3px 8px rgba(0, 0, 0, .5);
}

.plaque:hover { color: #11181e; }

.plaque strong {
  display: block;
  font: 600 16px var(--font-ui);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.plaque span {
  display: block;
  font: 500 13px var(--font-ui);
  letter-spacing: .04em;
}

.wall-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid var(--edge);
  font: 600 13px var(--font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #b8c6cc;
  background: linear-gradient(180deg, #3a4753, #26313b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 3px 0 #0a0e12;
}

.key::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #11181e;
  box-shadow: inset 0 1px 2px #000;
}

.key:hover { color: var(--ink-strong); }

/* The current page is a key held down, with its lamp lit. */
.key[aria-current="page"] {
  color: var(--ink-strong);
  background: linear-gradient(180deg, #151c23, #1f2a34);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7);
  transform: translateY(2px);
}

.key[aria-current="page"]::before {
  background: var(--phos);
  box-shadow: 0 0 8px var(--phos);
}

/* ---------- housing and screen ---------- */

.housing {
  min-width: 0;
  display: flex;
  padding: 16px;
  border-radius: 9px;
  border: 1px solid var(--edge);
  background: var(--bolt), linear-gradient(180deg, var(--steel-1), var(--steel-2) 30%, var(--steel-3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .5), 0 14px 28px rgba(0, 0, 0, .55);
}

.screen {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  padding: 20px 24px 24px;
  border-radius: 5px;
  background: radial-gradient(ellipse at 50% 40%, #082020, var(--glass) 75%);
  box-shadow: inset 0 0 0 2px #05080a, inset 0 6px 22px rgba(0, 0, 0, .95);
}

/* Scanlines and a glass glare. Kept faint so body text stays easy to read. */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .045), transparent 38%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px);
}

.screen > :first-child { margin-top: 0; }
.screen > :last-child { margin-bottom: 0; }

.screen h2,
.screen-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  font: 500 12px var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
}

.screen-label b { font-weight: 500; color: var(--phos); }
.screen-label b.warn { color: var(--warn); }

.screen p { color: var(--muted); }
.screen p strong { color: var(--ink); font-weight: 500; }

h1 {
  margin: 0 0 16px;
  font: 600 clamp(42px, 7vw, 84px)/1 var(--font-ui);
  letter-spacing: -.01em;
  color: var(--ink-strong);
  text-shadow: 0 0 18px rgba(94, 242, 207, .32);
}

.lede,
.hero > p:first-of-type {
  max-width: 34em;
  font-size: 19px;
  color: var(--ink);
}

.hero { display: flex; flex-direction: column; }
.hero p { max-width: 36em; margin: 0 0 14px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  font: 600 13px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  color: #03140f;
  background: var(--phos);
  box-shadow: 0 0 14px rgba(94, 242, 207, .35);
}

.button:hover { color: #03140f; background: var(--phos-soft); }

.button.ghost {
  color: var(--phos);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(94, 242, 207, .5);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 12px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- wall grid: rows of mounted hardware ---------- */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: stretch;
}

.row > .housing { flex: 1 1 380px; }
.row > .wide { flex: 999 1 520px; }
.row > .side { flex: 1 1 340px; min-width: 0; }
.row > .full { flex: 1 1 100%; }

/* ---------- observation port ---------- */

.port-frame {
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--edge);
  background:
    radial-gradient(circle at 16px 16px, #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 16px) 16px, #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    radial-gradient(circle at 16px calc(100% - 16px), #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    radial-gradient(circle at 50% 10px, #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    radial-gradient(circle at 50% calc(100% - 10px), #aab6c0 0 3px, #1a222a 4px 5px, transparent 6px),
    linear-gradient(180deg, #3a4753, #232d37 35%, #161d24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 14px 28px rgba(0, 0, 0, .55);
}

/* The bezel is its own box so nothing inside the glass can cover it. */
.port-bezel {
  padding: 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0a0e12, #4b5866 45%, #0a0e12);
}

.port {
  position: relative;
  overflow: hidden;
  height: 290px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 80% 45% at 50% 100%, rgba(62, 224, 196, .6), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(62, 224, 196, .22), transparent 70%),
    linear-gradient(180deg, #071719, #0a2a29);
  box-shadow: inset 0 10px 40px rgba(0, 0, 0, .9);
}

.port.small { height: 170px; }

.port img.specimen {
  height: 78%;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 16px rgba(62, 224, 196, .5));
  animation: bob 6s ease-in-out infinite;
}

.port img.cover,
.port svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reflection on the glass, drawn above whatever the port holds. */
.port::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .15) 28%, rgba(255, 255, 255, .03) 34%, transparent 40%, transparent 68%, rgba(255, 255, 255, .07) 73%, transparent 78%);
}

.port-tag {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 10px;
  font: 500 10px var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

@keyframes bob {
  50% { transform: translateY(-7px); }
}

.port-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.leds {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid var(--edge);
  background: #0d1216;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7);
}

.leds i {
  width: 10px;
  height: 10px;
  background: var(--phos);
  box-shadow: 0 0 8px var(--phos);
}

.leds i:last-child { background: #17242a; box-shadow: none; }

.nameplate {
  padding: 7px 14px;
  border-radius: 3px;
  color: #11181e;
  font: 600 11px var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--plaque-1), var(--plaque-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(0, 0, 0, .5);
}

.nameplate span {
  display: block;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: none;
}

.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- gauges ---------- */

.gauges { display: flex; flex-direction: column; gap: 14px; }

.gauge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
}

.gauge-name {
  flex: 0 0 170px;
  font: 500 15px var(--font-ui);
  letter-spacing: .04em;
  color: #e6eef0;
}

.gauge-cells {
  flex: 1 1 200px;
  display: flex;
  gap: 3px;
  height: 16px;
}

.gauge-cells i { flex: 1; border-radius: 1px; background: #12262a; }
.gauge-cells i.on { background: var(--phos); box-shadow: 0 0 6px var(--phos); }
.gauge.low .gauge-cells i.on { background: var(--warn); box-shadow: 0 0 6px var(--warn); }

.gauge-value {
  flex: 0 0 64px;
  text-align: right;
  font: 30px/1 var(--font-readout);
  color: var(--phos);
  text-shadow: 0 0 8px rgba(94, 242, 207, .4);
}

.gauge.low .gauge-value { color: var(--warn); text-shadow: 0 0 8px rgba(242, 178, 74, .4); }

.readout { display: flex; flex-direction: column; gap: 14px; }

/* A line of text with a status badge, such as "Rust > French | Pending". */
.badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 26px/1 var(--font-readout);
  color: var(--warn);
  text-shadow: 0 0 8px rgba(242, 178, 74, .4);
}

.badge-row b {
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font: 500 11px var(--font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: none;
}

.badge-row.good { color: var(--phos); text-shadow: 0 0 8px rgba(94, 242, 207, .45); }
.badge-row.bad { color: var(--bad); text-shadow: 0 0 8px rgba(255, 91, 82, .4); }

/* ---------- log: a task list shown as a status readout ---------- */

.log ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.log li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 26px/1 var(--font-readout);
  color: var(--warn);
  text-shadow: 0 0 8px rgba(242, 178, 74, .4);
}

.log li input { display: none; }

.log li::after {
  content: "Pending";
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font: 500 11px var(--font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: none;
}

.log li:has(input:checked) { color: var(--phos); text-shadow: 0 0 8px rgba(94, 242, 207, .45); }
.log li:has(input:checked)::after { content: "Done"; }

/* ---------- placards ---------- */

.placards { display: flex; flex-direction: column; gap: 14px; }

.placards > h2,
.stencil {
  align-self: flex-start;
  margin: 0;
  padding: 4px 12px;
  border-radius: 2px;
  border: 1px solid var(--edge);
  background: #0d1216;
  font: 500 12px var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--warn);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7);
}

.placard-row { display: flex; flex-wrap: wrap; gap: 26px; align-items: stretch; }

.placard {
  flex: 1 1 300px;
  min-width: 0;
  padding: 24px 24px 22px;
  border-radius: 3px;
  color: #d9e2e7;
  background: var(--bolt), linear-gradient(180deg, var(--plate-1), var(--plate-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -1px 0 rgba(0, 0, 0, .4), 0 8px 16px rgba(0, 0, 0, .5);
}

.placard h3 { margin: 0 0 10px; font: 600 20px var(--font-ui); color: #f1f5f7; }
.placard p { margin: 0 0 8px; }
.placard ul { margin: 0; padding-left: 18px; }
.placard > :last-child { margin-bottom: 0; }

/* ---------- projection ---------- */

.projection { display: flex; flex-direction: column; align-items: center; }

.projection-panel {
  width: 100%;
  padding: 22px 26px;
  border-radius: 4px;
  color: #e2f1ff;
  border: 1px solid rgba(150, 205, 255, .6);
  background: linear-gradient(180deg, rgba(var(--beam), .20), rgba(var(--beam), .07));
  box-shadow: 0 0 28px rgba(80, 170, 255, .28), inset 0 0 24px rgba(80, 170, 255, .14);
}

.projection-panel h2 {
  margin: 0 0 6px;
  font: 600 13px var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #a8d6ff;
}

.projection-panel h1 { font-size: clamp(30px, 4vw, 40px); text-shadow: none; color: #fff; margin-bottom: 8px; }
.projection-panel p { margin: 0; }
.projection-panel a { color: #a8d6ff; }

.projection::after {
  content: "";
  width: 30%;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, #3a4753, #1a222a);
  box-shadow: inset 0 2px 0 #8fd0ff, 0 0 12px rgba(80, 170, 255, .5);
}

.projection-beam {
  width: 70%;
  height: 26px;
  background: linear-gradient(180deg, rgba(var(--beam), .22), transparent);
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
}

/* ---------- reading surface ---------- */

/* A matte panel, so wall seams and rivets never run through long text. */
.prose-block {
  min-width: 0;
  max-width: 860px;
  padding: 28px 34px 30px;
  border-radius: 6px;
  border: 1px solid #26313b;
  background: #10171d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 22px rgba(0, 0, 0, .4);
  font-size: 17px;
  line-height: 1.75;
}

.prose-block > :last-child { margin-bottom: 0; }

.prose-block h2 {
  margin: 34px 0 12px;
  font: 600 30px/1.15 var(--font-ui);
  color: var(--ink-strong);
}

.prose-block h3 { margin: 26px 0 8px; font: 600 21px var(--font-ui); color: var(--ink-strong); }
.prose-block > :first-child { margin-top: 0; }

/* Shared by every place Markdown is rendered. */
code {
  font: .9em var(--font-code);
  padding: 2px 6px;
  border-radius: 3px;
  background: #10201f;
  color: var(--phos-soft);
}

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 6px;
  border: 7px solid #1c252e;
  outline: 1px solid var(--edge);
  background: var(--glass);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .9);
  font: 15px/1.6 var(--font-code);
  color: var(--phos-soft);
}

pre code { padding: 0; background: none; font-size: inherit; }

blockquote {
  margin: 18px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid #3a4753;
  color: var(--muted);
}

/* Callouts written as "> [!WARNING]" and friends. */
blockquote[class^="markdown-alert"] {
  position: relative;
  padding: 26px 20px 14px;
  border: 1px solid rgba(242, 178, 74, .45);
  border-radius: 4px;
  background: #1b160c;
  color: #f1dfbd;
}

blockquote[class^="markdown-alert"]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-radius: 4px 4px 0 0;
  background: repeating-linear-gradient(-45deg, rgba(242, 178, 74, .75) 0 10px, transparent 10px 20px);
}

blockquote.markdown-alert-note,
blockquote.markdown-alert-tip {
  border-color: rgba(94, 242, 207, .4);
  background: #0a1a18;
  color: #cdeee6;
}

blockquote.markdown-alert-note::before,
blockquote.markdown-alert-tip::before {
  background: repeating-linear-gradient(-45deg, rgba(94, 242, 207, .6) 0 10px, transparent 10px 20px);
}

blockquote p { margin: 0 0 8px; }
blockquote > :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 18px 0; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #26313b; }
th { font: 500 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--label); }

img { max-width: 100%; }

/* ---------- project archive ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 14px 4px 0;
}

.page-head h1 { font-size: clamp(40px, 6vw, 68px); margin: 0; }
.page-head p { margin: 12px 0 0; color: var(--muted); }

.eyebrow {
  margin: 0 0 8px;
  font: 500 12px var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--phos);
}

.counter {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 4px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 207, .14);
  font: 500 11px var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
}

.counter b {
  font: 40px/1 var(--font-readout);
  color: var(--phos);
  text-shadow: 0 0 8px rgba(94, 242, 207, .5);
}

.project-grid { display: flex; flex-wrap: wrap; gap: 26px; align-items: stretch; }

.project-card {
  flex: 1 1 460px;
  flex-direction: column;
  gap: 12px;
}

.project-card .port { height: 170px; border-radius: 5px; }

.project-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 6px 0;
}

.project-card h2 { margin: 0; font: 600 28px/1.1 var(--font-ui); }
.project-card h2 a { color: #e6eef0; text-decoration: none; }
.project-card h2 a:hover { color: var(--phos-soft); }
.project-card p { margin: 0; color: var(--muted); }
.project-card .link { margin-top: auto; }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font: 500 11px var(--font-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--phos-soft);
  text-decoration: none;
}

.pill.warn { color: var(--warn); }
.port .pill { position: absolute; z-index: 1; right: 14px; top: 10px; background: rgba(4, 16, 16, .7); }

.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.project-meta a.pill { color: var(--phos); }
.project-meta a.pill:hover { color: var(--phos-soft); }

.project-summary { display: flex; flex-wrap: wrap; gap: 26px; align-items: stretch; }
.project-summary .housing { flex: 999 1 520px; }
.project-summary .screen { display: flex; flex-direction: column; gap: 14px; }
.project-summary h1 { margin: 0; font-size: clamp(48px, 8vw, 96px); }
.project-summary .lede { margin: 0; }
.project-summary .side { flex: 1 1 320px; min-width: 0; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-wrap: wrap; gap: 18px; }

.field {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font: 500 12px var(--font-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label);
}

.field input,
.field textarea {
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 3px;
  border: 1px solid #1f3a39;
  background: #020a0a;
  color: #e6eef0;
  font: 16px/1.6 var(--font-body);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8);
}

.field textarea { resize: vertical; }
.form .button { align-self: flex-start; position: relative; z-index: 1; }
.form, .screen a, .screen .actions { position: relative; z-index: 1; }

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

/* ---------- floor ---------- */

.floor {
  position: relative;
  margin: 10px -16px 0;
  padding: 30px 32px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, #131a21, #0a0e12);
  color: #a0b1b7;
  font-size: 14px;
}

.floor::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(-45deg, rgba(242, 178, 74, .5) 0 12px, #11161b 12px 24px);
}

.floor nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.floor a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

/* ---------- page transitions between the archive and a project ---------- */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  .port img.specimen { animation: none; }
  @view-transition { navigation: none; }
}

/* A procedural banner is drawn wide. On a project page its port takes the
   banner's shape instead of the tall specimen shape, so the drawing is shown
   whole and not cropped to a square. */
.project-summary .side:has(.port > svg),
.project-summary .side:has(.port > img.cover) {
  flex-basis: 420px;
}

/* A cover image keeps its own proportions here too. Covers are usually wide
   banners, and filling the tall specimen shape would crop them. */
.project-summary .port:has(> img.cover) {
  display: block;
  height: auto;
  /* Keeps the port open while the image loads, or if it fails to load. */
  min-height: 120px;
}

.project-summary .port > img.cover {
  position: static;
  display: block;
  height: auto;
  max-height: 460px;
}

.project-summary .port:has(> svg) {
  height: auto;
  aspect-ratio: 48 / 17;
}

/*
 * Wide screens. The wall continues past the content column, so on a large
 * monitor the page is framed as one bay of that wall: a structural girder on
 * each side, and the plating beyond them falling into shadow. Pipes and
 * dividers run behind the girders. Nothing but decoration lives out here,
 * because on smaller screens this area does not exist.
 */
@media (min-width: 1480px) {
  .wall::before,
  .wall::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 34px;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 14px, #9aa7b3 0 2px, #10161c 3px 4px, transparent 5px) 0 0 / 100% 130px,
      linear-gradient(90deg, #07090c 0, #2b3641 12%, #4b5866 30%, #26303a 55%, #1a222a 84%, #07090c 100%);
    box-shadow: 0 0 26px rgba(0, 0, 0, .65);
  }

  .wall::before { left: calc(50% - 590px - 86px); }
  .wall::after { right: calc(50% - 590px - 86px); }

  /* Shadow outside the bay, darkening toward the edges of the window. */
  .wall > .wall-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      rgba(4, 7, 9, .72) 0,
      rgba(4, 7, 9, .35) calc(50% - 700px),
      transparent calc(50% - 676px),
      transparent calc(50% + 676px),
      rgba(4, 7, 9, .35) calc(50% + 700px),
      rgba(4, 7, 9, .72) 100%
    );
  }

  /* Content sits above the shadow and girders. Pipes and dividers stay
     below, so they pass behind the girders. */
  .wall > .wall-inner > .sign,
  .wall > .wall-inner > main > *,
  .floor { position: relative; z-index: 2; }

  .wall > .wall-inner > main > .pipes,
  .wall > .wall-inner > main > .rail,
  .wall > .wall-inner > main > .hazard { z-index: 0; }
}
