/* The IT Dept — direction B3: graphite, layered surfaces, fibre-bundle topology */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  /* graphite ramp, cool-neutral, no accent */
  --g0: #141518;   /* wells, deepest */
  --g1: #18191c;   /* page */
  --g2: #1d1e22;   /* panel */
  --g3: #232428;   /* raised */
  --g4: #2a2b30;   /* hover */
  --g5: #34353b;
  --line: rgb(255 255 255 / 0.07);
  --line-2: rgb(255 255 255 / 0.11);
  --line-3: rgb(255 255 255 / 0.16);
  --edge: inset 0 1px 0 rgb(255 255 255 / 0.045);

  /* text — every step ≥ 4.5:1 on g0–g3 except t4 (icons/non-text, ≥ 3:1) */
  --t1: #e7e8eb;
  --t2: #a4a6ad;
  --t3: #8a8d95;
  --t4: #6a6d75;
  --t5: #4a4c52;   /* decoration only: ticks, rules */

  --fibre: #45474d;
  --fibre-lo: #36383d;
  --fibre-hi: #64676e;
  --fibre-on: #a9acb3;

  --dot-live: #b9bbc0;
  --dot-muted: #5b5d64;

  --ring: #d4d6da;

  --sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* 4px spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --wrap: 1152px;
  --pad: 24px;
  --rail: 240px;
  --r-panel: 14px;
  --r-well: 10px;
  --r-ctl: 8px;

  --shadow: 0 1px 1px rgb(0 0 0 / 0.25), 0 16px 40px -20px rgb(0 0 0 / 0.6);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--g1);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 18% -120px, rgb(255 255 255 / 0.045), transparent 70%),
    var(--g1);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "calt";
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
::selection { background: rgb(255 255 255 / 0.18); }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
[id] { scroll-margin-top: 80px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.mono {
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.link {
  color: var(--t1);
  text-decoration: underline;
  text-decoration-color: var(--t4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 140ms ease;
}
.link:hover { text-decoration-color: var(--t1); }

main { flex: 1 0 auto; }
.skip {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  top: -48px;
  padding: 8px 12px;
  background: var(--g3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  z-index: 20;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top)); }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(24 25 28 / 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top-in {
  display: flex;
  align-items: center;
  gap: var(--s6);
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: -6px;
  padding: 0 6px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-height: 40px;
  border-radius: var(--r-ctl);
}
.brand svg { color: var(--t2); transition: color 140ms ease; }
.brand:hover svg { color: var(--t1); }
.nav {
  display: flex;
  gap: 2px;
}
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--r-ctl);
  color: var(--t2);
  transition: color 140ms ease, background-color 140ms ease;
}
.nav a:hover { color: var(--t1); background: var(--g3); }
.nav a[aria-current="page"] { color: var(--t1); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -12px;
  height: 1px;
  background: var(--t1);
}
.top-mail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--t2);
  font-size: 13px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--g2);
  box-shadow: var(--edge);
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
}
.top-mail:hover { color: var(--t1); border-color: var(--line-2); background: var(--g3); }
.top-mail:focus-visible { border-radius: 999px; }

/* ---------- hero ---------- */
.hero { padding-top: 96px; }
.hero h1 {
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  font-stretch: 104%;
  max-width: 13em;
  text-wrap: balance;
}
.hero .lead {
  margin-top: var(--s5);
  max-width: 37em;
  font-size: 16px;
  line-height: 1.5;
  color: var(--t2);
  text-wrap: pretty;
}
.hero-art {
  margin-top: var(--s6);
  padding: 8px 0 var(--s7);
  overflow: hidden;
  /* strands enter from beyond the left edge and are fully lit by the content edge */
  --fade: max(var(--pad), calc((100% - var(--wrap)) / 2));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade));
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade));
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.topo { width: 100%; height: auto; overflow: visible; }
.topo-m { display: none; }

.fs { fill: none; stroke: var(--fibre); stroke-width: 1; transition: stroke 220ms var(--ease); }
.fs-lo { stroke: var(--fibre-lo); }
.fs-hi { stroke: var(--fibre-hi); }
.fs-dark { stroke: var(--fibre-lo); stroke-dasharray: 2 5; }

/* hovering or focusing a terminal traces its strands back through the core */
.topo:has(.term-net:hover, .term-net:focus-visible) .s-net,
.topo:has(.term-sw:hover, .term-sw:focus-visible) .s-sw,
.topo:has(.term-prj:hover, .term-prj:focus-visible) .s-prj { stroke: var(--fibre-on); }
.topo:has(.term-cmp:hover, .term-cmp:focus-visible) .s-cmp { stroke: var(--fibre-hi); }

.node { fill: url(#nf); stroke: var(--line-2); stroke-width: 1; }
.node-back { fill: var(--g2); stroke: var(--line); }
.node-hl { stroke: rgb(255 255 255 / 0.09); stroke-width: 1; fill: none; }
.port { fill: var(--g5); }
.port-lit { fill: #8c8f96; }
.t-node {
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: 11px;
  fill: var(--t1);
  letter-spacing: 0.01em;
}
.t-mono {
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: 11px;
  fill: var(--t3);
}
.t-mono-hi { fill: var(--t2); }
.tick { stroke: var(--t5); stroke-width: 1; fill: none; }

.term { cursor: pointer; outline: none; }
.term-hit { fill: transparent; stroke: transparent; stroke-width: 1.5; transition: fill 160ms ease; }
.term:hover .term-hit { fill: rgb(255 255 255 / 0.03); }
.term:focus-visible .term-hit { stroke: var(--ring); }
.term-port { fill: var(--g3); stroke: var(--line-2); }
.term-live .term-port { fill: #6f727a; stroke: rgb(255 255 255 / 0.18); }
.t-name { font-family: var(--sans); font-size: 14px; font-weight: 600; fill: var(--t1); }
.t-sub { font-family: var(--sans); font-size: 12px; fill: var(--t3); }
.term:not(.term-live) .t-name { fill: var(--t2); }

.pulse {
  fill: none;
  stroke: #e2e3e6;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 46 1000;
  stroke-dashoffset: 46;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 3.4s cubic-bezier(.45, 0, .25, 1) 0.35s 1 both; }
  .pulse.p1 { animation-delay: 0.6s; }
  .pulse.p2 { animation-delay: 0.85s; }
  .term-live .term-port { animation: lamp 3.6s ease-out 0.35s 1 both; }
  .port-lit { animation: blink 3.4s steps(1, end) 0.35s 1 both; }
  .port-lit:nth-of-type(2n) { animation-delay: 0.6s; }
}
@keyframes pulse {
  0% { stroke-dashoffset: 46; opacity: 0; }
  8% { opacity: 0.95; }
  88% { opacity: 0.95; }
  100% { stroke-dashoffset: -1000; opacity: 0; }
}
@keyframes lamp {
  0%, 80% { fill: var(--g3); }
  90% { fill: #c8cace; }
  100% { fill: #6f727a; }
}
/* ports wink as the light passes through the core */
@keyframes blink {
  0%, 55% { fill: var(--g5); }
  58% { fill: #d4d6da; }
  61% { fill: #8c8f96; }
  64% { fill: #d4d6da; }
  67%, 100% { fill: #8c8f96; }
}

/* ---------- page heads (inner pages) ---------- */
.page-head { padding-top: var(--s8); padding-bottom: var(--s7); }
.page-head h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-stretch: 104%;
}
.page-head .lead {
  margin-top: var(--s2);
  max-width: 40em;
  font-size: 15px;
  color: var(--t2);
  text-wrap: pretty;
}

/* ---------- sections: label rail + content ---------- */
.sec {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--s7);
  padding-top: var(--s7);
  padding-bottom: var(--s7);
  border-top: 1px solid var(--line);
}
main > .sec:last-child, main > .wrap:last-child > .sec:last-child { padding-bottom: var(--s9); }
.sec-h { min-width: 0; }
.sec-h h2 {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.sec-h p {
  margin-top: 2px;
  color: var(--t3);
  font-size: 13px;
}
.home .sec-h h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.home .sec-h p { margin-top: var(--s1); padding-left: 18px; }
.h-mono { font-family: var(--mono); font-stretch: 87.5%; font-weight: 500; letter-spacing: -0.03em; }

/* the terminal-port glyph from the hero, carried into section heads */
.port-glyph {
  flex: none;
  width: 6px;
  height: 20px;
  border-radius: 2px;
  background: #6f727a;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12);
}
.port-glyph.off { background: var(--g3); box-shadow: 0 0 0 1px var(--line-2); }

/* ---------- surfaces ---------- */
.panel {
  background: linear-gradient(180deg, var(--g2), rgb(29 30 34 / 0.92));
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--edge), var(--shadow);
}
.well {
  background: var(--g0);
  border: 1px solid var(--line);
  border-radius: var(--r-well);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35);
}

/* Underlay panel */
.ul-panel { padding: var(--s5); }
.ul-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s5);
}
.ul-title { font-size: 16px; letter-spacing: -0.01em; line-height: 1.5; }
.ul-copy { margin-top: 2px; color: var(--t2); max-width: 34em; }
.ul-copy-wide { margin-top: 0; max-width: none; align-self: center; }
.ul-top-flush { padding-bottom: 0; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; flex: none; }
.ul-panel .svc { margin-top: var(--s5); }
.ul-panel .facts { margin-top: var(--s4); }

.svc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.svc li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: var(--r-ctl);
  background: var(--g0);
  border: 1px solid var(--line);
  font-weight: 500;
}
.svc .lc { width: 24px; height: 16px; gap: 4px; }
.svc .lc i { width: 5px; height: 5px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-ctl);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--line-2);
  background: var(--g3);
  box-shadow: var(--edge);
  color: var(--t1);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn:hover { background: var(--g4); border-color: var(--line-3); }
.btn:active { background: var(--g3); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--t2); box-shadow: none; }
.btn-quiet:hover { color: var(--t1); background: var(--g3); border-color: var(--line-2); }
/* external links carry a small diagonal mark, internal ones don't */
.btn .ext-i { width: 10px; height: 10px; color: var(--t3); transition: transform 160ms var(--ease), color 140ms ease; }
.btn:hover .ext-i { color: var(--t1); transform: translate(1px, -1px); }

/* facts list (network facts in mono) */
.facts { padding: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: 0 8px 0 16px;
}
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--t3); font-size: 13px; }
.facts dd { color: var(--t1); min-width: 0; overflow-wrap: anywhere; }
.facts dd.sans { font-size: 14px; }
.facts .ext { display: flex; gap: var(--s4); flex-wrap: wrap; }
.facts-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
}
.facts-2 > div + div { border-top: 0; }
.facts-2 > div:not(:nth-child(3n + 1)) { border-top: 1px solid var(--line); }
.facts-2 > div:nth-child(n + 4) { border-left: 1px solid var(--line); }

.copy {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--t4);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: color 140ms ease, background-color 140ms ease;
}
.copy:hover { color: var(--t1); background: var(--g3); }
.copy svg { width: 14px; height: 14px; }
.copy .ok { display: none; }
.copy[data-done] .ok { display: block; }
.copy[data-done] .cp { display: none; }
.copy[data-done] { color: var(--t1); }
.copy::after {
  content: "Copied";
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translate(4px, -50%);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--g4);
  border: 1px solid var(--line-2);
  color: var(--t1);
  font: 500 12px/1.5 var(--sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 180ms var(--ease);
}
.copy[data-done]::after { opacity: 1; transform: translate(0, -50%); }

/* status */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--t2);
  font-size: 14px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-muted);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.03);
  flex: none;
}

/* compute: an unlit port, nothing more */
.dark-port {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 56px;
  padding: 0 var(--s5);
  border-radius: var(--r-panel);
  border: 1px dashed var(--line-2);
  color: var(--t2);
}

/* ---------- lists (apps, open source) ---------- */
.list { padding: 6px; }
.list-group + .list-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.list-cap {
  padding: 10px 12px 4px;
  color: var(--t3);
  font-size: 13px;
}
.row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s4);
  padding: 12px;
  border-radius: 10px;
  transition: background-color 140ms ease;
}
.row:has(a):hover { background: var(--g3); }
.row-name { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.row-name a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.row-name a:focus-visible { outline: none; }
.row-name a:focus-visible::after { outline: 2px solid var(--ring); outline-offset: -2px; }
.row-desc { color: var(--t2); font-size: 13px; margin-top: 1px; }
.row-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t3);
  font-size: 13px;
  white-space: nowrap;
  transition: color 140ms ease;
}
.row-meta.mono { font-size: 12px; }
.row-plain { grid-template-columns: minmax(0, 1fr) auto; min-height: 48px; padding: 8px 12px; }
.row-meta .ext-i { width: 10px; height: 10px; opacity: 0; transform: translate(-2px, 2px); transition: opacity 140ms ease, transform 160ms var(--ease); }
.row:hover .row-meta { color: var(--t1); }
.row:hover .row-meta .ext-i { opacity: 1; transform: none; }

.icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  object-fit: cover;
}
.icon-lg { width: 56px; height: 56px; border-radius: 13px; }

/* BoringApps as a home-screen folder */
.folder {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--g4);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--edge);
}
.folder img { width: 100%; height: 100%; border-radius: 3.5px; object-fit: cover; }
.folder-lg { width: 56px; height: 56px; border-radius: 13px; padding: 8px; gap: 5px; }
.folder-lg img { border-radius: 4.5px; }

.glyph {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--g3);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--edge);
  color: var(--t2);
}
.glyph svg { width: 20px; height: 20px; }
.glyph.dashed { background: transparent; box-shadow: none; border: 1px dashed var(--line-2); }

/* ---------- network page ---------- */
.patch-wrap { padding: var(--s2) var(--s5) var(--s5); }
.panel-clip { overflow: hidden; }
.patch-fibre { width: 100%; height: 64px; overflow: visible; }
.patch {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.patch li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: 0 8px 18px;
  text-align: center;
}
.patch .lc { margin-top: -9px; }
.patch li + li { border-left: 1px solid var(--line); }
.lc {
  width: 30px;
  height: 18px;
  border-radius: 4px;
  background: var(--g3);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: var(--edge);
}
.lc i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8c8f96;
  box-shadow: 0 0 0 1.5px var(--g0);
}
.patch span { font-size: 14px; font-weight: 500; }

/* ---------- apps page ---------- */
.apps { padding: 6px; }
.app {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--s5);
  align-items: center;
  padding: var(--s5) 18px;
}
.app + .app, .app + .suite + .app { border-top: 1px solid var(--line); }
.app h3 { font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; }
.app-copy { margin-top: 2px; color: var(--t2); max-width: 34em; }
.suite {
  margin: 0 18px 18px calc(18px + 56px + var(--s5));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
}
.suite a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
  padding: 10px;
  border-radius: var(--r-ctl);
  transition: background-color 140ms ease;
}
.suite a:hover { background: var(--g2); }
.suite a:hover small { color: var(--t2); }
.suite img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); }
.suite b { display: block; font-weight: 600; font-size: 14px; line-height: 1.4; }
.suite small { display: block; color: var(--t3); font-size: 13px; line-height: 1.4; transition: color 140ms ease; }

/* ---------- key / value ---------- */
.kv > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: var(--s4);
  min-height: 48px;
  padding: 0 8px 0 var(--s5);
  align-items: center;
}
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { color: var(--t3); font-size: 13px; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv dd .mono { font-size: 13px; }
.kv .pair { display: flex; gap: var(--s5); flex-wrap: wrap; }

/* ---------- projects ---------- */
/* home: two open lanes, no container */
.lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s7);
}
.lane h3 { font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; }
.lane > p { margin-top: 2px; color: var(--t2); }
.lane ul { margin-top: var(--s4); border-top: 1px solid var(--line-2); }
.lane li {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 0;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
}
.start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  margin-top: var(--s6);
}
.start p { color: var(--t2); text-wrap: pretty; }

/* projects page: what we do, patched across to where we run it */
.xc {
  --row: 48px;
  --cap: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 168px) minmax(0, 264px);
  padding: var(--s4) var(--s5) var(--s5);
}
.xc-cap { height: var(--cap); display: flex; align-items: center; color: var(--t3); font-size: 13px; }
.xc-work li {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  height: var(--row);
}
.xc-work span { align-self: center; line-height: 1.35; text-wrap: balance; }
/* the strand starts where the words stop */
.xc-work i {
  flex: 1 1 0;
  min-width: var(--s4);
  height: 1px;
  margin-top: calc(var(--row) / 2);
  background: var(--fibre);
  transition: background-color 220ms var(--ease);
}
.xc-fibre {
  width: 100%;
  height: calc(var(--row) * var(--rows));
  margin-top: var(--cap);
  overflow: visible;
}
.xc-col:last-child .xc-cap { padding-left: var(--s5); }
.xc-run { display: grid; grid-template-rows: repeat(var(--rows), var(--row)); }
.xc-run li { display: flex; align-items: center; min-width: 0; }
.xc-run a {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  min-height: 44px;
  padding-right: var(--s3);
  border-radius: var(--r-ctl);
  transition: background-color 160ms ease;
}
.xc-run a:hover { background: rgb(255 255 255 / 0.03); }
.tport {
  flex: none;
  width: 8px;
  height: 28px;
  border-radius: 2px;
  background: #6f727a;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
  transition: background-color 220ms var(--ease);
}
.xc-run a:hover .tport { background: #c8cace; }
.xc-t { min-width: 0; display: grid; }
.xc-t b { font-weight: 600; line-height: 1.4; }
.xc-t b.mono { font-weight: 500; font-size: 13px; }
.xc-t small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t3);
  font-size: 13px;
  line-height: 1.4;
  transition: color 140ms ease;
}
.xc-t .ext-i { width: 10px; height: 10px; transition: transform 160ms var(--ease); }
.xc-run a:hover small { color: var(--t1); }
.xc-run a:hover .ext-i { transform: translate(1px, -1px); }
/* pointing at where it runs traces the strands back to the work */
.xc:has(.xc-run .g1 a:is(:hover, :focus-visible)) path.g1,
.xc:has(.xc-run .g2 a:is(:hover, :focus-visible)) path.g2,
.xc:has(.xc-run .g3 a:is(:hover, :focus-visible)) path.g3 { stroke: var(--fibre-on); }
.xc:has(.xc-run .g1 a:is(:hover, :focus-visible)) .xc-work .g1 i,
.xc:has(.xc-run .g2 a:is(:hover, :focus-visible)) .xc-work .g2 i,
.xc:has(.xc-run .g3 a:is(:hover, :focus-visible)) .xc-work .g3 i { background: var(--fibre-on); }

.begin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding: var(--s5);
}
.begin-t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.5; }
.begin-s { margin-top: 2px; color: var(--t2); }
.begin .actions { align-items: center; gap: var(--s1); }
.aside { margin-top: var(--s4); padding-left: var(--s5); color: var(--t3); font-size: 13px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--g0), var(--g1) 160px);
  padding: var(--s7) 0 calc(var(--s7) + env(safe-area-inset-bottom));
  color: var(--t2);
  font-size: 13px;
}
.foot-grid {
  display: grid;
  grid-template-columns: var(--rail) repeat(3, minmax(0, 1fr));
  gap: var(--s7);
}
.foot-grid > :first-child { grid-column: 1; }
.foot-col { display: grid; gap: var(--s2); align-content: start; }
.foot-h { color: var(--t3); margin-bottom: var(--s1); }
.foot-col a {
  justify-self: start;
  color: var(--t2);
  border-radius: 4px;
  transition: color 140ms ease;
}
.foot-col a:hover { color: var(--t1); text-decoration: underline; text-decoration-color: var(--t4); text-underline-offset: 3px; }
.foot-col a[aria-current="page"] { color: var(--t1); }
.foot-id { display: grid; gap: var(--s2); align-content: start; }
.foot-id .brand { margin-bottom: var(--s1); font-size: 14px; }
.foot-id .mono { font-size: 12px; color: var(--t2); }
.foot-id .fine { color: var(--t3); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  :root { --rail: 200px; }
  .sec { gap: var(--s6); }
  .xc { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 216px); }
  /* the wide drawing shrinks with the page; keep its lettering readable */
  .topo-d .t-name { font-size: 19px; transform: translateY(-2px); }
  .topo-d .t-sub { font-size: 16px; transform: translateY(3px); }
  .topo-d .t-mono { font-size: 15px; }
  .topo-d .t-node { font-size: 14px; }
}

@media (max-width: 900px) {
  .sec { grid-template-columns: 1fr; gap: var(--s4); }
  .home .sec { gap: var(--s5); }
  .facts-2 { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .facts-2 > div:nth-child(n + 4) { border-left: 0; }
  .facts-2 > div + div { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; }
  .top { top: -48px; }
  .top-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 48px 44px;
    gap: 0;
    height: auto;
  }
  .brand { justify-self: start; }
  .top-mail { margin-left: 0; }
  .nav { grid-column: 1 / -1; grid-row: 2; margin: 0 -10px; gap: 0; }
  .nav a { padding: 0 10px; min-height: 44px; border-radius: 0; }
  .nav a:hover { background: transparent; }
  .nav a[aria-current="page"]::after { left: 10px; right: 10px; bottom: -1px; }

  .lanes { grid-template-columns: 1fr; gap: var(--s6); }
  .start { flex-direction: column; align-items: flex-start; gap: var(--s4); margin-top: var(--s5); }

  .xc { display: block; padding: var(--s2) var(--s4) var(--s3); }
  .xc-fibre, .xc-work i { display: none; }
  .xc-work li { height: auto; min-height: 44px; padding: 10px 0; }
  .xc-work li + li { border-top: 1px solid var(--line); }
  .xc-col:last-child { margin-top: var(--s3); padding-top: var(--s1); border-top: 1px solid var(--line-2); }
  .xc-col:last-child .xc-cap { padding-left: 0; }
  .xc-run { display: block; }
  .xc-run a { min-height: 56px; }

  .begin { flex-direction: column; align-items: flex-start; gap: var(--s4); padding: var(--s4); }
  .aside { padding-left: 0; }

  .hero { padding-top: var(--s7); }
  .hero h1 { font-size: 40px; line-height: 1.05; letter-spacing: -0.032em; }
  .hero .lead { font-size: 15px; margin-top: var(--s4); }
  .lead-2 { display: block; }
  .hero-art {
    margin-top: var(--s4);
    padding-bottom: var(--s5);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 40px);
    mask-image: linear-gradient(180deg, transparent 0, #000 40px);
  }
  .topo-d { display: none; }
  .topo-m { display: block; max-width: 380px; }

  .page-head { padding-top: var(--s7); padding-bottom: var(--s6); }
  .page-head .lead { font-size: 14px; }

  .sec { padding-top: var(--s6); padding-bottom: var(--s6); }
  .home .sec-h h2 { font-size: 22px; }
  main > .sec:last-child, main > .wrap:last-child > .sec:last-child { padding-bottom: var(--s8); }

  .ul-panel { padding: var(--s4); }
  .ul-top { flex-direction: column; gap: var(--s4); }
  .facts > div { grid-template-columns: 96px minmax(0, 1fr) auto; padding: 0 4px 0 12px; gap: 10px; }

  .row { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 12px 10px; }
  .row-meta { display: none; }
  .row-plain { grid-template-columns: minmax(0, 1fr) auto; }
  .row-plain .row-meta { display: inline-flex; }
  .ul-top-flush { padding-bottom: 0; }

  .dark-port { padding: 0 var(--s4); }

  .patch-wrap { padding: var(--s4); }
  .patch-fibre { display: none; }
  .patch { grid-template-columns: 1fr; }
  .patch li { flex-direction: row; justify-content: flex-start; padding: 12px 14px; gap: 14px; }
  .patch .lc { margin-top: 0; }
  .patch li + li { border-left: 0; border-top: 1px solid var(--line); }

  .app { grid-template-columns: 56px minmax(0, 1fr); gap: var(--s4); padding: var(--s4) 10px; }
  .app .actions { grid-column: 2; }
  .suite { margin: 0 10px 10px; grid-template-columns: 1fr; }

  .kv > div { grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: 10px 6px 10px var(--s4); }
  .kv dt { grid-column: 1; }
  .kv dd { grid-column: 1; }
  .kv > div > .copy { grid-column: 2; grid-row: 1 / span 2; }

  .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--s6) var(--s4); }
  .foot-grid > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .foot-grid > :nth-child(3) { grid-column: 2; grid-row: 2 / span 2; }
  .foot-grid > :nth-child(4) { grid-column: 1; grid-row: 3; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- privacy, 404 ---------- */
.page-head .updated { margin-top: var(--s3); color: var(--t3); font-size: 13px; }
.prose { max-width: 40em; }
.prose > p { color: var(--t2); font-size: 15px; text-wrap: pretty; }
.prose > p + p { margin-top: var(--s3); }
.prose > .panel { margin-top: var(--s4); }
.page-404 { padding-bottom: var(--s9); }
.page-404 .actions { margin-top: var(--s5); }
