/* KernelPanic Studios — site styles.
   Values are lifted from the "Signal × Blueprint" canvas (Main.dc.html / Lab.dc.html).
   When in doubt, the canvas wins. */

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0B11;
  --bg-2: #0C0E15;
  --card: #0F131B;
  --chip: #161B25;
  --lab: #0D1118;
  --cyan: #2CCBF2;
  --cyan-hover: #A5E9FB;
  --magenta: #E655D5;
  --magenta-text: #F4A3EA;
  --green: #4ADE80;
  --text: #E9EDF5;
  --text-2: #D5DBE6;
  --muted: #B9C2D0;
  --meta: #97A3B6;
  --nav: #C3CBD8;
  --pencil: #8A95A8;
  --pencil-text: #A9B3C3;
  --line: rgba(255, 255, 255, 0.07);

  --container: 1180px;
  --gutter: 32px;
  --r-card: 26px;
  --r-panel: 14px;
  --r-chip: 8px;

  --font-display: 'Michroma', 'Sora', sans-serif;
  --font-body: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .36s;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
img, svg { display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
p { margin: 0; }
code { font-family: var(--font-mono); }

/* The page root clips the hero glow's outer margin so it never causes a horizontal scrollbar. */
.page { overflow-x: hidden; overflow-x: clip; }

.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

/* Eyebrow labels and the little accent ticks beside them */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--cyan);
}
.tick { display: block; flex: none; width: var(--w, 22px); height: 3px; background: var(--cyan); }
.tick.m { background: var(--magenta); }

.section-title {
  margin: 16px 0 0; font-size: clamp(24px, 2.9vw, 36px); line-height: 1.2; letter-spacing: 0.01em;
}

/* ---------- Brand + nav (shared) ---------- */
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-name { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.02em; line-height: 1; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.42em; color: #8FB9D6; line-height: 1; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; font-size: 14.5px; }
.site-nav a { color: var(--nav); padding: 12px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--cyan); padding-bottom: 9px; border-bottom: 3px solid var(--cyan); }
.site-nav .nav-pill { color: var(--text); padding: 11px 18px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; }
.site-nav .nav-pill:hover { border-color: rgba(255, 255, 255, 0.32); }

.site-header {
  max-width: var(--container); margin: 0 auto; padding: 22px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-panel); font-size: 15.5px;
}
.btn-primary, .btn-primary:hover {
  background: var(--cyan); color: #041920; font-weight: 600;
  box-shadow: 0 0 28px rgba(44, 203, 242, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 36px rgba(44, 203, 242, 0.5); }
.btn-secondary, .btn-secondary:hover { border: 1px solid rgba(255, 255, 255, 0.18); color: var(--text); font-weight: 500; }
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.34); }

/* ---------- Home: hero ---------- */
.hero {
  position: relative; max-width: var(--container); margin: 0 auto; padding: 36px var(--gutter) 96px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px;
}
.hero-wash {
  position: absolute; left: -6%; top: -40px; width: 760px; height: 600px; pointer-events: none;
  background: radial-gradient(ellipse at 45% 50%, rgba(44, 203, 242, 0.10), rgba(44, 203, 242, 0) 62%);
}
.hero-logo-col { position: relative; flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
/* The layout box is the logo's tight crop (772×586). The PNG is that crop plus a baked glow and
   260px of transparent margin on every side, so it overflows the box freely and never moves layout. */
.hero-logo { position: relative; width: min(520px, 100%); aspect-ratio: 772 / 586; }
.hero-logo img { position: absolute; left: -33.679%; top: -44.369%; width: 167.358%; max-width: none; height: auto; }
.hero-text { position: relative; flex: 1.3 1 460px; min-width: 0; }
.hero-title { margin: 22px 0 0; font-size: clamp(25px, 2.9vw, 41px); line-height: 1.18; letter-spacing: 0.01em; text-wrap: balance; }
.hero-sub { margin: 22px 0 0; max-width: 54ch; font-size: 19px; font-weight: 300; line-height: 1.6; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.status-lines {
  display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 36px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--meta); letter-spacing: 0.04em;
}
.status { display: inline-flex; align-items: center; gap: 9px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* ---------- Home: projects ---------- */
.projects { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 96px; }
.eyebrow-row { display: flex; align-items: center; gap: 16px; }
.eyebrow-rule { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(44, 203, 242, 0.55), rgba(44, 203, 242, 0)); }

.projects-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px; margin-top: 40px;
}
.projects-grid.feat-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-card); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.card.is-featured { cursor: default; }

/* Featured rim light: a gradient ring cut out with a mask */
.card-rim {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(225deg, rgba(44, 203, 242, 0.95), rgba(44, 203, 242, 0) 20%, rgba(44, 203, 242, 0) 80%, rgba(44, 203, 242, 0.8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--dur);
}
.card.is-featured .card-rim { opacity: 1; }
.card:not(.is-featured):hover .card-rim { opacity: .5; }

.expand {
  position: absolute; top: 18px; right: 18px; z-index: 3; width: 36px; height: 36px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(22, 27, 37, 0.92); color: var(--cyan);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.card:not(.is-featured):hover .expand { border-color: rgba(44, 203, 242, 0.65); background: rgba(44, 203, 242, 0.12); }
.expand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 50%; }
.card.is-featured .expand { display: none; }

.card-body {
  display: flex; flex-direction: column; gap: 16px;
  flex: 1; padding: 30px 32px; transition: padding var(--dur) var(--ease);
}
.card.is-featured .card-body { padding: 34px 36px 30px; }
.card-head { display: flex; align-items: center; gap: 16px; }
.card-icon { width: 56px; height: 56px; flex: none; transition: width var(--dur) var(--ease), height var(--dur) var(--ease); }
.card.is-featured .card-icon { width: 64px; height: 64px; }
.card-icon.rounded { border-radius: 16px; }
.card-icon.contain { object-fit: contain; }
.card-titles { display: flex; flex-direction: column; gap: 7px; }
.card-title { margin: 0; font-size: 21px; line-height: 1; transition: font-size var(--dur) var(--ease); }
.card.is-featured .card-title { font-size: 24px; }
.meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--meta); }
.card-desc { max-width: 560px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.card-more { display: none; max-width: 560px; font-size: 15.5px; line-height: 1.65; color: var(--meta); }
.card.is-featured .card-more { display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12.5px; padding: 6px 10px; border-radius: var(--r-chip);
  background: var(--chip); color: #CFE9F5; box-shadow: inset 0 0 0 1px rgba(44, 203, 242, 0.22);
}

.card-link {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: auto; padding: 12px 0 4px; font-size: 14.5px; font-weight: 500;
}
/* A long repo URL may break rather than overflow the card on a phone */
.card-link span { overflow-wrap: anywhere; }

/* The screenshot panel takes the image's own shape: nothing is cropped, and the card grows to fit it. */
.shot {
  display: none; position: relative; flex: none; margin: 0 36px;
  border-radius: var(--r-panel) var(--r-panel) 0 0; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09); transition: opacity .3s;
}
.card.is-featured .shot { display: block; }
.card.is-leaving .shot { display: block; position: absolute; left: 36px; right: 36px; opacity: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot-dropwatch { background: #14110C; }
.shot-watchlist, .shot-readyup { background: #36373D; }

/* "Also built" strip */
.also-built {
  margin-top: 22px; padding: 28px 32px; background: var(--card); border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px;
}
.tile-icon {
  width: 56px; height: 56px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #171C27; color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(44, 203, 242, 0.3);
}
.also-titles { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.also-titles h3 { margin: 0; font-size: 18px; line-height: 1.2; }
.also-built p { flex: 2 1 360px; min-width: 0; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.also-built .text-link { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 14.5px; font-weight: 500; }

/* ---------- Blueprint grid ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(44, 203, 242, var(--major, 0.11)) 1px, rgba(44, 203, 242, 0) 1px),
    linear-gradient(90deg, rgba(44, 203, 242, var(--major, 0.11)) 1px, rgba(44, 203, 242, 0) 1px),
    linear-gradient(rgba(44, 203, 242, var(--minor, 0.05)) 1px, rgba(44, 203, 242, 0) 1px),
    linear-gradient(90deg, rgba(44, 203, 242, var(--minor, 0.05)) 1px, rgba(44, 203, 242, 0) 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

/* ---------- Home: In the Lab panel ---------- */
.lab-teaser { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 104px; }
.lab-panel {
  --major: 0.09; --minor: 0.04;
  position: relative; border-radius: var(--r-card); overflow: hidden;
  background-color: #0C1017; box-shadow: inset 0 0 0 1.5px rgba(44, 203, 242, 0.45);
}
.lab-panel-inner { padding: 36px clamp(24px, 3.4vw, 40px) 40px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 56px; }
.lab-intro { flex: 1 1 320px; min-width: 0; }
.lab-intro h2 { margin: 16px 0 0; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.2; letter-spacing: 0.01em; }
.lab-intro p { margin-top: 16px; max-width: 44ch; font-size: 16px; line-height: 1.65; color: var(--muted); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 13px 20px;
  border-radius: 12px; border: 1.5px solid var(--cyan); color: var(--cyan); font-weight: 500; font-size: 14.5px;
}
.btn-outline:hover { background: rgba(44, 203, 242, 0.1); }

.mini-sheets { flex: 1.6 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.mini-sheet {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 24px;
  background: rgba(10, 11, 17, 0.7); border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(44, 203, 242, 0.35);
}
.mini-sheet-head {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--meta);
}
.mini-sheet-head .rev { color: var(--magenta-text); }
.mini-sheet-title { display: flex; align-items: center; gap: 14px; }
.mini-sheet-title img { width: 44px; height: 44px; }
.mini-sheet-title img.rounded { border-radius: 11px; }
.mini-sheet-title h3 { margin: 0; font-size: 16px; line-height: 1.2; }
.mini-sheet p { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.progress { display: flex; gap: 6px; margin-top: 2px; }
.progress span { flex: 1; height: 8px; }
.progress .built { background: var(--cyan); }
.progress .wip { background: var(--magenta); }
.progress .planned { border: 1.5px dashed var(--pencil); }
.progress-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--meta); }

/* ---------- Home: about ---------- */
.about { border-top: 1px solid var(--line); background: var(--bg-2); }
.about-inner { max-width: var(--container); margin: 0 auto; padding: 88px var(--gutter); display: flex; flex-wrap: wrap; gap: 32px 72px; }
.about-head { flex: 1 1 360px; min-width: 0; }
.about-head h2 { line-height: 1.25; text-wrap: balance; }
.about-copy { flex: 1.2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 15px; font-weight: 500; }
.link-row a { padding: 12px 0; }

/* ---------- Home: footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner {
  max-width: var(--container); margin: 0 auto; padding: 30px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  font-size: 13.5px; color: var(--meta);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 34px; height: auto; }
.footer-line { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; }

/* ---------- Lab page ---------- */
.lab-page { --major: 0.11; --minor: 0.05; background-color: var(--bg); padding: clamp(10px, 1.6vw, 20px); }
.frame { position: relative; border: 1.5px solid rgba(44, 203, 242, 0.55); border-radius: 4px; }
.reg { position: absolute; width: 22px; height: 22px; border: 0 solid var(--cyan); }
.reg.tl { left: -1.5px; top: -1.5px; border-top-width: 3px; border-left-width: 3px; }
.reg.tr { right: -1.5px; top: -1.5px; border-top-width: 3px; border-right-width: 3px; }
.reg.bl { left: -1.5px; bottom: -1.5px; border-bottom-width: 3px; border-left-width: 3px; }
.reg.br { right: -1.5px; bottom: -1.5px; border-bottom-width: 3px; border-right-width: 3px; }

.lab-pad { padding-left: clamp(16px, 2.6vw, 36px); padding-right: clamp(16px, 2.6vw, 36px); }
.lab-header {
  border-bottom: 1px solid rgba(44, 203, 242, 0.35); padding-top: 18px; padding-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.dwg-strip {
  border-bottom: 1px dashed rgba(44, 203, 242, 0.45); padding-top: 10px; padding-bottom: 10px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--meta);
}

.lab-hero {
  position: relative; max-width: var(--container); margin: 0 auto; padding-top: 56px; padding-bottom: 72px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px;
}
.lab-hero-text { flex: 1.4 1 460px; min-width: 0; }
.lab-eyebrow { flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; letter-spacing: 0.16em; }
.lab-hero h1 { margin: 22px 0 0; font-size: clamp(32px, 4.5vw, 64px); line-height: 1.1; letter-spacing: 0.01em; }
.lab-hero-sub { margin-top: 24px; max-width: 52ch; font-size: 19px; font-weight: 300; line-height: 1.6; color: var(--text-2); }
.legend {
  display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 32px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; color: var(--muted);
}
.legend > span { display: inline-flex; align-items: center; gap: 10px; }
.legend i { width: 34px; height: 0; border-top: 2px solid var(--cyan); }
.legend i.wip { border-top-color: var(--magenta); }
.legend i.planned { border-top: 2px dashed var(--pencil); }

.fig0 { position: relative; flex: 1 1 300px; max-width: 400px; margin: 0; }
.fig0-grid { display: grid; grid-template-columns: minmax(0, 1fr) 42px; grid-template-rows: 42px auto; }
.fig0-grid img { width: 100%; height: auto; }
.dim-h {
  align-self: center; height: 18px; display: flex; align-items: center; gap: 10px;
  border-left: 1.5px solid var(--cyan); border-right: 1.5px solid var(--cyan);
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
}
.dim-h i { flex: 1; height: 1.5px; background: var(--cyan); }
.dim-v {
  justify-self: center; width: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-top: 1.5px solid var(--cyan); border-bottom: 1.5px solid var(--cyan);
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
}
.dim-v i { flex: 1; width: 1.5px; background: var(--cyan); }
.dim-v span { writing-mode: vertical-rl; }
.fig-caption { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--meta); }
.stamp {
  position: absolute; right: -6px; top: 8px; padding: 9px 14px;
  border: 2.5px solid var(--magenta); color: var(--magenta-text); background: rgba(10, 11, 17, 0.85);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.5;
  transform: rotate(8deg);
}

.sheets { border-top: 1px solid rgba(44, 203, 242, 0.35); }
.sheets-bar {
  padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(44, 203, 242, 0.35);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 32px;
}
.sheets-bar h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: 0.02em; }
.sheets-bar span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--meta); }
.sheets-list { max-width: var(--container); margin: 0 auto; padding-top: 36px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 28px; }

.sheet {
  background: rgba(13, 17, 24, 0.85); border-radius: 22px; overflow: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(44, 203, 242, 0.45), 0 30px 60px rgba(0, 0, 0, 0.35);
}
.sheet-head {
  padding: 20px 30px; border-bottom: 1px solid rgba(44, 203, 242, 0.35);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}
.sheet-id { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.sheet-no { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.16em; color: var(--cyan); }
.sheet-icon {
  width: 48px; height: 48px; flex: none; border: 1.5px dashed rgba(44, 203, 242, 0.6); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sheet-icon.round { border-radius: 50%; }
.sheet-icon img { width: 38px; height: 38px; }
.sheet-icon img.rounded { border-radius: 9px; }
.sheet-head h3 { margin: 0; font-size: clamp(20px, 2.2vw, 27px); line-height: 1.1; }
.rev-pill {
  padding: 7px 14px; border: 1.5px solid var(--magenta); border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--magenta-text);
}
.sheet-body { padding: 30px; display: flex; flex-wrap: wrap; gap: 36px 48px; }
.sheet-fig { flex: 1.2 1 400px; min-width: 0; }
.sheet-text { flex: 1 1 340px; min-width: 0; }
.sheet-text > p { font-size: 16.5px; line-height: 1.65; color: var(--muted); }

/* Wireframe boxes: solid cyan = built, magenta = in progress, dashed grey = planned */
.wire { border: 1.5px solid var(--cyan); }
.wire.wip { border-color: var(--magenta); color: var(--magenta-text); }
.wire.planned { border-style: dashed; border-color: var(--pencil); color: var(--pencil-text); }

.udm-board {
  display: flex; min-height: 262px; border-radius: 12px; overflow: hidden;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
}
.udm-rail { flex: 0 0 122px; padding: 12px 10px; border-right: 1.5px solid var(--cyan); display: flex; flex-direction: column; gap: 7px; }
.udm-rail span { padding: 6px 8px; border-radius: 6px; }
.udm-tiles { flex: 1; min-width: 0; padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(104px, 100%), 1fr)); gap: 10px; align-content: start; }
.udm-tiles span { min-height: 92px; padding: 9px 10px; border-radius: 8px; }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; }
.flow > span { flex: 1 1 120px; min-height: 112px; padding: 10px 12px; border-radius: 8px; }
.flow svg { flex: none; }
.flow-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; }
.flow-row span { flex: 1 1 90px; padding: 10px 12px; border-radius: 8px; }
.flow-row span.wide { flex-basis: 120px; }

/* Built / next / planned checklist. Moving a row along = change the li's class and its label. */
.checklist { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; font-size: 15px; line-height: 1.5; }
.checklist li { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.checklist .mk { width: 10px; height: 10px; flex: none; background: var(--cyan); }
.checklist .item { flex: 1; }
.checklist .state { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--cyan); }
.checklist li.next .mk { background: var(--magenta); transform: rotate(45deg); }
.checklist li.next .state { color: var(--magenta-text); }
.checklist li.planned .mk { background: none; border: 1.5px dashed var(--pencil-text); }
.checklist li.planned .item { color: var(--muted); }
.checklist li.planned .state { color: var(--pencil-text); }

.title-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 1px;
  border-top: 1px solid rgba(44, 203, 242, 0.35); background: rgba(44, 203, 242, 0.35);
  font-family: var(--font-mono); font-size: 12.5px;
}
.title-block > div { background: var(--lab); padding: 12px 30px; display: flex; flex-direction: column; gap: 4px; }
.tb-label { font-size: 11px; letter-spacing: 0.14em; color: var(--meta); }

.lab-footer {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px;
  border-top: 1.5px solid rgba(44, 203, 242, 0.55); background: rgba(44, 203, 242, 0.4);
  font-family: var(--font-mono); font-size: 13px;
}
.lab-footer > * { background: var(--bg); padding: 16px 22px; display: flex; flex-direction: column; gap: 6px; }
.lab-footer .lf-brand { flex-direction: row; align-items: center; gap: 12px; }
.lab-footer .lf-brand img { width: 34px; height: auto; }
.lab-footer nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 22px; padding-top: 6px; padding-bottom: 6px; }
.lab-footer nav a { padding: 13px 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: flex; flex-direction: column; }
.notfound main {
  flex: 1; max-width: var(--container); width: 100%; margin: 0 auto; padding: 48px var(--gutter) 96px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px;
}
.notfound .wordmark { width: min(380px, 80vw); height: auto; }
.notfound h1 { margin: 12px 0 0; font-size: clamp(25px, 2.9vw, 41px); line-height: 1.18; }
.notfound p { max-width: 54ch; font-size: 19px; font-weight: 300; line-height: 1.6; color: var(--text-2); }

/* ---------- Phone ---------- */
@media (max-width: 799px) {
  .projects-grid, .projects-grid.feat-right { grid-template-columns: minmax(0, 1fr); }
  .card { grid-column: auto !important; grid-row: auto !important; }
}
/* Phone: the hero eyebrow's wide tracking wrapped it to three lines; tighter tracking keeps it to two,
   and the .nowrap phrases (each carrying its trailing "·") mean it only ever breaks after a dot. */
@media (max-width: 599px) {
  .hero-text .eyebrow { letter-spacing: 0.2em; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .card-rim, .card-body, .card-icon, .card-title, .shot, .expand { transition: none; }
}
