:root {
  /* Brand */
  --nights-watch: #8FDCFF;   /* logo, NW mark, route line, panel highlights, toggles, links */
  --nights-watch-glow: rgba(225,246,255,.9);
  --accent: var(--nights-watch);
  /* Base */
  --black: #02050C;          /* page background */
  --bg: #080D1A;             /* map background, navy */
  --panel: rgba(3,5,10,.85); /* side panel / rail glass (blur 18px, saturate 140%) */
  --panel-solid: rgba(3,5,10,.95); /* popups, dropdowns, legend */
  /* Side rail edge */
  --edge-gold: #F5B841;
  --edge-gold-light: #FFD27A;
  --edge-glow: rgba(245,184,65,.8);
  /* Text */
  --text: #E5EBF2;
  --text-muted: #9AA8B8;
  --text-dim: #697789;
  /* Crime dots, most to least serious */
  --crime-violent: #FF1F4B; --crime-robbery: #E8202A; --crime-burglary: #FF4D1A; --crime-vehicle: #FF6A2B;
  --crime-drugs: #FF8A3D; --crime-theft: #FFA552; --crime-asb: #FFC07A; --crime-other: #FFD3A8;

  /* Derived */
  --accent-hi: #CDEFFF;
  --accent-deep: #44ACE4;
  --accent-ink: #04121C;
  --accent-soft: rgba(127, 212, 255, 0.12);
  --accent-faint: rgba(127, 212, 255, 0.05);
  --accent-line: rgba(127, 212, 255, 0.24);
  --violet: #8FDCFF;
  --silver: #DDE7F2;
  --silver-grey: #A9B8C8;
  --line: rgba(229, 235, 242, 0.08);
  --line-strong: rgba(229, 235, 242, 0.16);
  --text-soft: #C3CDD8;
  --surface: rgba(4, 10, 24, 0.72);
  --glass: blur(18px) saturate(140%);

  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wordmark: "Pirata One", serif;

  --radius: 6px;
  --max: 1200px;
  --sheet-width: 384px;
  --scroll-track: rgba(4, 10, 24, 0.55);
  --scroll-thumb: rgba(143, 220, 255, 0.42);
  --scroll-thumb-hover: rgba(180, 234, 255, 0.62);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--black);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(127, 212, 255, 0.28); color: #FFFFFF; }

/* Glassy cyan scrollbars on the whole site (hero, sheet, details) — never gold. */
html, body, .hero, .sheet, .sheet-body, .darkest-list, .details-main, * {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.hero::-webkit-scrollbar,
.sheet::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar,
.darkest-list::-webkit-scrollbar,
.details-main::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(2, 6, 16, 0.35), rgba(4, 10, 24, 0.62));
  border: 1px solid rgba(167, 215, 240, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}
::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(127, 212, 255, 0.12) 38%, rgba(127, 212, 255, 0.4));
  background-color: var(--scroll-thumb);
  border: 1px solid rgba(200, 236, 255, 0.38);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -8px 12px rgba(127, 212, 255, 0.12),
    0 0 10px rgba(127, 212, 255, 0.22);
}
::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(160, 228, 255, 0.2) 38%, rgba(143, 220, 255, 0.58));
  background-color: var(--scroll-thumb-hover);
  border-color: rgba(220, 246, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 14px rgba(127, 212, 255, 0.4);
}
::-webkit-scrollbar-corner { background: transparent; }

a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.92em; color: var(--nights-watch); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--nights-watch); outline-offset: 2px; }

.wordmark {
  font-family: var(--wordmark);
  font-weight: 400;
  color: var(--nights-watch);
  letter-spacing: 0.005em;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(127, 212, 255, 0.45), 0 0 36px rgba(127, 212, 255, 0.2);
}

.tiny { font-size: 12px; line-height: 1.6; color: var(--text-muted); margin: 8px 0 0; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Gradient hairline border: blue at the top left, neutral along the sides, a hint of silver at the bottom right */
.frame { position: relative; }
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(127, 212, 255, 0.75) 0%,
    rgba(127, 212, 255, 0.22) 18%,
    rgba(229, 235, 242, 0.1) 42%,
    rgba(229, 235, 242, 0.07) 70%,
    rgba(221, 231, 242, 0.38) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent {
  background: linear-gradient(180deg, var(--accent-hi), var(--nights-watch) 55%, var(--accent-deep));
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.45), 0 0 22px rgba(127, 212, 255, 0.28);
}
.btn-accent:hover { box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.7), 0 8px 34px rgba(127, 212, 255, 0.45); }
.btn-small { padding: 9px 14px; font-size: 11.5px; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.link-btn:hover { color: var(--nights-watch); }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1200;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(16px, 4vw, 40px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.nav.scrolled {
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-bottom-color: var(--line);
}
.nav-brand { font-size: 28px; line-height: 1; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--nights-watch); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-content: start;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 40% at 50% 100%, rgba(127, 212, 255, 0.07) 0%, transparent 60%),
    radial-gradient(55% 50% at 86% 8%, rgba(169, 184, 200, 0.07), transparent 70%),
    radial-gradient(110% 80% at 50% 100%, #0e1a38 0%, #080e20 45%, var(--black) 88%);
}
.moon {
  position: absolute;
  z-index: -1;
  top: 15%;
  right: 11%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 60%, rgba(102, 117, 134, 0.3) 0 11%, transparent 13%),
    radial-gradient(circle at 40% 70%, rgba(102, 117, 134, 0.22) 0 8%, transparent 10%),
    radial-gradient(circle at 58% 32%, rgba(102, 117, 134, 0.18) 0 6%, transparent 8%),
    radial-gradient(circle at 36% 34%, #F7FAFD 0%, #D7E0E9 38%, #9AA8B8 70%, #667586 100%);
  box-shadow:
    0 0 18px rgba(190, 210, 230, 0.55),
    0 0 56px rgba(190, 210, 230, 0.3),
    0 0 140px rgba(127, 212, 255, 0.2),
    inset -7px -9px 15px rgba(40, 55, 72, 0.45);
  opacity: 0.96;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-inner {
  width: min(100%, 920px);
  padding: clamp(104px, 15vh, 170px) 24px 240px;
  text-align: center;
}
.hero-wordmark {
  font-size: clamp(3.6rem, 10vw, 8.5rem);
  line-height: 0.95;
  margin: 0 0 20px;
  text-shadow:
    0 0 22px rgba(127, 212, 255, 0.5),
    0 0 80px rgba(127, 212, 255, 0.25);
}
.hero .hero-inner .eyebrow {
  color: #C8D3DE;
  text-shadow: 0 0 12px rgba(190, 210, 230, 0.4), 0 0 26px rgba(127, 212, 255, 0.14);
}
.hero-headline {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #DDE5ED;
  text-shadow: 0 0 18px rgba(187, 200, 213, 0.16);
  text-wrap: balance;
}
.lede {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.75;
  color: var(--text-soft);
  text-shadow: 0 1px 14px rgba(3, 5, 10, 0.9);
  text-wrap: pretty;
}

.hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: space-between;
  gap: 20px 32px;
  padding: 44px clamp(16px, 4vw, 48px) 26px;
  background: linear-gradient(to top, rgba(3, 5, 10, 0.94), rgba(3, 5, 10, 0.55) 60%, transparent);
}
.hud-item { display: grid; gap: 6px; align-content: start; }
.hud-value { font-size: 20px; font-weight: 400; line-height: 1.15; color: #F3F6FA; font-variant-numeric: tabular-nums; }
.hud-sub { font-size: 11.5px; color: var(--text-muted); }
.hud-call { text-align: right; }
.hud-call .hud-value { font-size: 17px; color: var(--nights-watch); text-shadow: 0 0 18px rgba(127, 212, 255, 0.35); }

/* Sections */
.section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 110px 0 40px;
}
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.section-head .eyebrow, .about-copy .eyebrow { display: flex; align-items: center; gap: 12px; color: var(--nights-watch); }
.section-head .eyebrow::before, .about-copy .eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px var(--nights-watch-glow);
}
.section-lede { margin: 16px 0 0; color: var(--text-muted); font-size: 15px; line-height: 1.75; }
.fineprint { margin: 18px 0 0; font-size: 12.5px; color: var(--text-muted); max-width: 820px; }
.fineprint a { color: var(--text); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.fineprint a:hover { color: var(--nights-watch); }

/* Map: full-screen section with a glass rail down the left */
.map-app {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  scroll-margin-top: -80px;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.map-app #leaflet { position: absolute; inset: 0; z-index: 0; }
.map-app .leaflet-top { top: 64px; }

.sheet {
  position: absolute;
  z-index: 1000;
  top: 64px;
  left: 0;
  bottom: 0;
  width: var(--sheet-width, 384px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.4);
}
.sheet.frame::before { display: none; }
.sheet::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -2px;
  width: 8px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 13, 26, 0.12), rgba(8, 13, 26, 0.55) 70%, rgba(127, 212, 255, 0.1)),
    rgba(8, 13, 26, 0.4);
  border-right: 1px solid rgba(143, 220, 255, 0.35);
  box-shadow:
    0 0 16px rgba(127, 212, 255, 0.22),
    inset 0 0 12px rgba(127, 212, 255, 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  animation: edge-pulse 5s ease-in-out infinite;
}
@keyframes edge-pulse {
  50% {
    opacity: 0.82;
    box-shadow:
      0 0 10px rgba(127, 212, 255, 0.16),
      inset 0 0 12px rgba(127, 212, 255, 0.06);
  }
}
.sheet-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-faint), transparent);
}
.sheet-head .eyebrow { margin: 0 0 6px; }
.sheet-status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sheet-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--nights-watch); box-shadow: 0 0 8px var(--nights-watch-glow); animation: soft-pulse 2.4s ease-in-out infinite; }
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px;
  counter-reset: module;
}

.sheet-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -7px;
  width: 14px;
  z-index: 5;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}
.sheet-resize::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  right: 4px;
  width: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(127, 212, 255, 0.16) 40%, rgba(143, 220, 255, 0.62));
  border: 1px solid rgba(200, 236, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 12px rgba(127, 212, 255, 0.38);
  opacity: 0.85;
}
.sheet-resize:hover::before,
.sheet-resize:focus-visible::before,
body.is-sheet-resizing .sheet-resize::before {
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 16px rgba(127, 212, 255, 0.55);
}
body.is-sheet-resizing {
  cursor: col-resize;
  user-select: none;
}
body.is-sheet-resizing .leaflet-container { pointer-events: none; }

.module-label {
  counter-increment: module;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.module-label::before { content: none; }
.module-label::after { content: ""; order: 1; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.module-label .link-btn { order: 2; white-space: nowrap; }

.directions { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-bottom: 12px; }
.fields { position: relative; display: grid; gap: 8px; }
.fields::before { content: ""; position: absolute; left: 17px; top: 26px; bottom: 26px; border-left: 1px dashed rgba(229, 235, 242, 0.26); }
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: rgba(229, 235, 242, 0.03);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field:focus-within { border-color: rgba(127, 212, 255, 0.7); background: var(--accent-faint); box-shadow: 0 0 0 3px rgba(127, 212, 255, 0.1), 0 0 18px rgba(127, 212, 255, 0.14); }
.field input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
}
.field input::placeholder { color: var(--text-muted); }
.swap {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(229, 235, 242, 0.02);
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}
.swap:hover { color: var(--nights-watch); border-color: var(--accent-line); }

.pin-dot { flex: none; width: 9px; height: 9px; transform: rotate(45deg); }
.pin-from { border: 1.5px solid var(--text); background: var(--bg); box-shadow: 0 0 8px rgba(229, 235, 242, 0.4); }
.pin-to { background: var(--nights-watch); box-shadow: 0 0 10px var(--nights-watch-glow); }

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 0;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 1px solid var(--accent-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
.suggestions li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.suggestions li > span:last-child { display: grid; min-width: 0; }
.suggestions strong, .suggestions small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions strong { font-weight: 600; }
.suggestions small { color: var(--text-muted); font-size: 11.5px; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--accent-soft); }
.suggestions li.empty { cursor: default; color: var(--text-muted); font-size: 12.5px; background: none; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong);
  background: rgba(229, 235, 242, 0.02);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--accent-line); }
.chip[aria-pressed="true"] { color: var(--nights-watch); border-color: var(--nights-watch); background: var(--accent-soft); box-shadow: 0 0 12px rgba(127, 212, 255, 0.18); }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.modes button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 9px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.modes button:last-child { border-right: 0; }
.modes button:hover { color: var(--text); background: rgba(229, 235, 242, 0.03); }
.modes button[aria-checked="true"] { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-hi), var(--nights-watch) 60%, var(--accent-deep)); box-shadow: 0 0 18px rgba(127, 212, 255, 0.35); }

.route-results { display: grid; gap: 8px; margin-top: 12px; }
.route-status { font-size: 12px; color: var(--text-muted); margin: 0; }
.route-status.warn { color: var(--text); padding-left: 10px; border-left: 2px solid var(--nights-watch); }
.route-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(229, 235, 242, 0.025);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.route-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 0.2s; }
.route-card:hover { border-color: var(--line-strong); }
.route-card[aria-pressed="true"] { border-color: rgba(127, 212, 255, 0.55); background: linear-gradient(90deg, rgba(127, 212, 255, 0.1), rgba(127, 212, 255, 0.01)); box-shadow: 0 0 24px rgba(127, 212, 255, 0.1); }
.route-card[aria-pressed="true"]::before { background: var(--nights-watch); box-shadow: 0 0 12px var(--nights-watch-glow); }
.route-card-top { display: flex; align-items: center; gap: 8px; }
.route-idx { font-size: 10.5px; letter-spacing: 0.1em; color: var(--nights-watch); }
.route-card-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.route-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.route-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.route-stats > span { display: grid; gap: 3px; }
.route-stats small { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.route-stats b { font-size: 16px; font-weight: 500; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.route-stats i { margin-left: 3px; font-style: normal; font-size: 10px; font-weight: 400; color: var(--text-muted); }
.route-safety b { color: var(--nights-watch); }
.score-bar { height: 3px; border-radius: 2px; background: rgba(229, 235, 242, 0.1); overflow: hidden; }
.score-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent-hi)); box-shadow: 0 0 8px var(--nights-watch-glow); }

.tag { font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: rgba(229, 235, 242, 0.07); color: var(--text-muted); }
.tag-safest { background: var(--accent-soft); color: var(--nights-watch); }
.tag-fastest { background: rgba(229, 235, 242, 0.08); color: var(--text); }
.tag-balanced { background: transparent; color: var(--text-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }

.sheet-section { border-top: 1px solid var(--line); }
.route-results + .sheet-section { margin-top: 18px; }
.sheet-section summary {
  counter-increment: module;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.sheet-section summary::-webkit-details-marker { display: none; }
.sheet-section summary::before { content: none; }
.sheet-section summary::after { content: "+"; margin-left: auto; font-size: 14px; letter-spacing: 0; color: var(--nights-watch); }
.sheet-section[open] summary::after { content: "−"; }
.sheet-section summary:hover { color: var(--text); }
.sheet-section[open] { padding-bottom: 16px; }
.section-actions { display: flex; justify-content: flex-end; margin: -4px 0 6px; }

.toggle { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.toggle em { color: var(--text-muted); font-style: normal; font-size: 11px; }
.toggle input, .categories input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid rgba(229, 235, 242, 0.3);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.toggle input::after, .categories input::after { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--nights-watch); transform: scale(0); transition: transform 0.15s; }
.toggle input:checked, .categories input:checked { border-color: var(--nights-watch); background: var(--accent-soft); box-shadow: 0 0 8px rgba(127, 212, 255, 0.3); }
.toggle input:checked::after, .categories input:checked::after { transform: scale(1); }

.hotspot-controls { margin-top: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(229, 235, 242, 0.02); display: grid; gap: 10px; }
.hotspot-controls label { display: grid; gap: 4px; font-size: 12px; color: var(--text-muted); grid-template-columns: 1fr auto; }
.hotspot-controls output { color: var(--text); font-size: 12px; }
.hotspot-controls input[type="range"] { grid-column: 1 / -1; accent-color: var(--nights-watch); width: 100%; }

.categories { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.categories label { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; cursor: pointer; }
.cat-name { display: grid; gap: 5px; min-width: 0; }
.cat-name > span:first-child { display: flex; align-items: center; gap: 8px; }
.cat-bar { height: 2px; border-radius: 1px; background: var(--c); opacity: 0.8; box-shadow: 0 0 6px var(--c); }
.cat-count { font-size: 11.5px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.cat-count small { display: block; font-size: 9.5px; letter-spacing: 0.04em; color: var(--text-dim); }

.swatch {
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 4px var(--c), 0 0 10px color-mix(in srgb, var(--c) 55%, transparent);
}

.overview-total { margin: 0 0 10px; font-size: 12.5px; color: var(--text-muted); }
.overview-total strong { font-size: 22px; font-weight: 500; color: var(--nights-watch); margin-right: 4px; text-shadow: 0 0 16px rgba(127, 212, 255, 0.3); }
.borough-rank { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.borough-rank button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
}
.borough-rank button:hover { background: var(--accent-faint); }
.rank-num { font-size: 10.5px; color: var(--nights-watch); opacity: 0.85; }
.rank-name { display: grid; gap: 4px; }
.rank-bar { height: 2px; border-radius: 1px; background: linear-gradient(90deg, #7a0a1f, var(--crime-violent)); box-shadow: 0 0 6px rgba(255, 31, 75, 0.45); }
.rank-count { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.darkest-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.darkest-field { display: grid; gap: 4px; min-width: 0; }
.darkest-field span {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.darkest-field select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(229, 235, 242, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.darkest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.darkest-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 7px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
}
.darkest-list button:hover,
.darkest-list button.is-active { background: var(--accent-faint); }
.darkest-name { display: grid; gap: 2px; min-width: 0; }
.darkest-name strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.darkest-name small {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.darkest-count {
  font-size: 11.5px;
  color: var(--nights-watch);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 1px;
}
#route-street-warn[hidden],
#darkest-empty[hidden],
#darkest-streets[hidden],
#insights[hidden] { display: none; }
@media (max-width: 420px) {
  .darkest-filters { grid-template-columns: 1fr; }
}

#insights { min-width: 0; overflow-x: hidden; }
.ins-types { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; }
.ins-types li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 2px 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.ins-type-name { grid-column: 1; min-width: 0; }
.ins-type-pct {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}
.ins-type-bar {
  grid-column: 1;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--nights-watch), transparent);
  width: var(--p);
  box-shadow: 0 0 6px rgba(127, 212, 255, 0.35);
}
.ins-stats { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.ins-stats li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.ins-stats strong { color: var(--nights-watch); font-variant-numeric: tabular-nums; font-weight: 500; }
.ins-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 4px 0 8px;
  overflow: visible;
}
.ins-svg .ins-eq { stroke: rgba(229, 235, 242, 0.22); stroke-width: 1; stroke-dasharray: 4 4; }
.ins-svg .ins-curve { stroke: #7FD4FF; stroke-width: 2; fill: none; }
.ins-svg .ins-axis {
  fill: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-anchor: middle;
}
.ins-svg circle {
  stroke: rgba(8, 13, 26, 0.85);
  stroke-width: 1;
  cursor: pointer;
}
.ins-svg circle:focus,
.ins-svg circle:focus-visible {
  outline: 2px solid var(--nights-watch);
  outline-offset: 2px;
}
.ins-svg circle[aria-current="true"] {
  stroke: #E5EBF2;
  stroke-width: 2;
}
.ins-hot { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ins-hot li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.ins-hot-main { display: grid; gap: 2px; min-width: 0; }
.ins-hot-main strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ins-hot-main small { font-size: 11px; color: var(--text-muted); }
.ins-lq { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; }
.ins-lq li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.ins-lq strong { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--silver); }
.ins-lq-hi span, .ins-lq-hi strong { color: var(--nights-watch); }
.ins-lq-lo span, .ins-lq-lo strong { color: var(--text-dim); }
.ins-similar-label {
  margin: 10px 0 6px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ins-similar { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ins-similar .link-btn { display: flex; justify-content: space-between; width: 100%; text-align: left; letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.ins-similar .link-btn span { color: var(--nights-watch); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .ins-hot li { grid-template-columns: 1fr; }
}

.borough-label span {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(229, 235, 242, 0.8);
  text-shadow: 0 0 4px var(--bg), 0 0 8px var(--bg);
}

.map-hint {
  position: absolute;
  top: 80px;
  left: calc(50% + (var(--sheet-width, 384px) / 2));
  transform: translateX(-50%);
  z-index: 800;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--accent-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: opacity 0.3s;
}
.map-hint.hidden { opacity: 0; }

.map-legend {
  position: absolute;
  right: 14px;
  bottom: 28px;
  z-index: 800;
  display: grid;
  gap: 7px;
  min-width: 232px;
  padding: 13px 15px 12px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  font-size: 11px;
  color: var(--text-muted);
}
.legend-title { margin: 0 0 2px; font-size: 9.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); }
.legend-types { list-style: none; margin: 0 0 3px; padding: 0 0 10px; display: grid; gap: 5px; border-bottom: 1px solid var(--line); }
.legend-types li { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; color: var(--text); }
.legend-types code { font-size: 10px; letter-spacing: 0.04em; color: var(--text-dim); }
.legend-row { display: flex; align-items: center; gap: 10px; }
.legend-line { width: 28px; height: 3px; border-radius: 2px; }
.legend-safe { background: var(--nights-watch); box-shadow: 0 0 8px var(--nights-watch-glow); }
.legend-alt { background: #4F6A8F; }
.legend-ring { width: 10px; height: 10px; margin: 0 9px; border-radius: 50%; border: 2px solid var(--crime-violent); }

/* Leaflet theming */
.leaflet-container { font-family: var(--font-mono); background: var(--bg); cursor: crosshair; }
.leaflet-container.is-rotating, .leaflet-container.is-rotating .leaflet-interactive { cursor: grabbing; }
.leaflet-container a { color: var(--text-muted); }
.leaflet-control-attribution { background: rgba(3, 5, 10, 0.72) !important; color: var(--text-dim) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-muted); }
.leaflet-control-attribution a:hover { color: var(--nights-watch); }

.leaflet-bar, .leaflet-touch .leaflet-bar {
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  background-clip: border-box;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.leaflet-bar a, .leaflet-touch .leaflet-bar a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: transparent;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.leaflet-touch .leaflet-bar a:first-child, .leaflet-touch .leaflet-bar a:last-child { border-radius: 0; }
.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-bar .leaflet-control-zoom-in, .leaflet-bar .leaflet-control-zoom-out { font: 300 20px/36px var(--font-mono); text-indent: 0; }
.leaflet-bar a:hover, .leaflet-bar a:focus { background: var(--accent-soft); color: var(--nights-watch); }
.leaflet-bar a.leaflet-disabled { background: transparent; color: var(--text-dim); }

.leaflet-control-rotate { display: grid; justify-items: center; gap: 6px; }
.leaflet-control-rotate-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--accent-line);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(127, 212, 255, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.leaflet-control-rotate-toggle:hover, .leaflet-control-rotate-toggle:focus-visible {
  border-color: rgba(127, 212, 255, 0.6);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 14px rgba(127, 212, 255, 0.25);
}
.leaflet-control-rotate-arrow { display: block; width: 24px; height: 24px; }
.leaflet-control-rotate-arrow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.needle-n { fill: var(--edge-gold); filter: drop-shadow(0 0 3px var(--edge-glow)); }
.needle-s { fill: rgba(229, 235, 242, 0.32); }
.needle-pin { fill: var(--black); stroke: var(--edge-gold-light); stroke-width: 0.8; }
.leaflet-control-rotate-readout {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-solid); color: var(--text); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); border: 1px solid var(--accent-line); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-content { margin: 12px 14px; font-size: 12.5px; line-height: 1.5; }
.leaflet-popup-content h4 { margin: 0 0 6px; font-size: 14px; }
.leaflet-popup-content ul { margin: 0; padding-left: 16px; color: var(--text-muted); }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--nights-watch); }
.leaflet-tooltip { background: var(--panel-solid); color: var(--text); border: 1px solid var(--accent-line); border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.leaflet-tooltip-top::before { border-top-color: var(--panel-solid); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--panel-solid); }
.leaflet-tooltip-left::before { border-left-color: var(--panel-solid); }
.leaflet-tooltip-right::before { border-right-color: var(--panel-solid); }
.area-tip { font-size: 12px; line-height: 1.45; }
.area-tip::before { display: none; }
.dot-type { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }

.leaflet-tile-pane { filter: sepia(1) hue-rotate(185deg) saturate(1.6) brightness(.38) contrast(1.2); }
.nw-labels { filter: sepia(1) hue-rotate(185deg) saturate(1.2) brightness(.82) contrast(1.1); }
.labels-pane { pointer-events: none; }
.leaflet-heatmap-layer { opacity: 0.75; }

.route-glow { filter: drop-shadow(0 0 6px rgba(127, 212, 255, 0.9)) drop-shadow(0 0 16px rgba(127, 212, 255, 0.5)); }
.hotspot-shape { filter: drop-shadow(0 0 8px rgba(255, 31, 75, 0.7)); }

.nw-pin { position: relative; }
.nw-pin span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin);
  box-shadow: 0 0 16px var(--pin), inset 0 0 0 5px rgba(10, 14, 31, 0.9);
}

.nw-popup .leaflet-popup-content { margin: 16px 18px; }
.b-card h4 { font-size: 16px; margin: 0 0 6px; }
.b-big { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.1; color: var(--nights-watch); text-shadow: 0 0 16px rgba(127, 212, 255, 0.3); }
.b-big span { font-size: 12px; font-weight: 400; color: var(--text-muted); text-shadow: none; }
.b-meta { margin: 6px 0 12px; font-size: 11.5px; color: var(--text-muted); }
.b-cats { list-style: none; margin: 0 0 14px; padding: 0 !important; display: grid; gap: 8px; }
.b-cats li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12px; color: var(--text); }
.b-cats li span:last-of-type { color: var(--text-muted); }
.b-cats i { grid-column: 1 / -1; display: block; height: 3px; border-radius: 2px; background: var(--crime-violent); box-shadow: 0 0 6px rgba(255, 31, 75, 0.45); }
.b-zoom {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-hi), var(--nights-watch) 55%, var(--accent-deep));
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(127, 212, 255, 0.25);
}

/* About */
.about { padding-top: 130px; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.about-lead {
  margin: 0 0 22px;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.6;
  color: #F3F6FA;
  text-wrap: pretty;
}
.about-body { margin: 0; max-width: 640px; font-size: 15px; line-height: 1.8; color: var(--text-soft); }
.about-body + .about-body { margin-top: 16px; }
.about-sign {
  margin: 26px 0 0;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: var(--nights-watch);
  text-shadow: 0 0 26px rgba(127, 212, 255, 0.4);
}

.watch-card {
  padding: 26px 26px 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(127, 212, 255, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(16, 24, 54, 0.75), rgba(3, 5, 10, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(229, 235, 242, 0.05);
}
.watch-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.watch-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.watch-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.watch-status.on { color: var(--nights-watch); }
.watch-status.on::before { background: var(--nights-watch); box-shadow: 0 0 10px var(--nights-watch-glow); animation: soft-pulse 2.4s ease-in-out infinite; }
.watch-call { margin: 22px 0 30px; font-size: clamp(19px, 1.9vw, 24px); font-weight: 600; line-height: 1.25; color: #F3F6FA; }
.watch-track { position: relative; height: 2px; margin: 0 8px; border-radius: 1px; background: rgba(229, 235, 242, 0.12); }
.watch-progress { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(169, 184, 200, 0.18), var(--silver)); box-shadow: 0 0 8px rgba(127, 212, 255, 0.45); }
.lantern {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: radial-gradient(circle, #F2F6FA 0 30%, var(--silver-grey) 60%, rgba(169, 184, 200, 0) 72%);
  box-shadow: 0 0 14px 4px rgba(221, 231, 242, 0.4), 0 0 26px 8px rgba(127, 212, 255, 0.22);
  animation: soft-pulse 2.4s ease-in-out infinite;
}
.watch-ends { display: flex; justify-content: space-between; margin-top: 16px; }
.watch-ends div { display: grid; gap: 2px; }
.watch-ends div:last-child { text-align: right; }
.watch-ends strong { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.watch-ends small { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.watch-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-muted); }
@keyframes soft-pulse { 50% { opacity: 0.6; } }

/* How it works: a journey from data to route */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-right: 8px; }
.step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--nights-watch);
  background: radial-gradient(circle, rgba(127, 212, 255, 0.2), rgba(3, 5, 10, 0.96) 70%);
  border: 1px solid rgba(127, 212, 255, 0.65);
  box-shadow: 0 0 0 6px var(--black), 0 0 20px rgba(127, 212, 255, 0.45), inset 0 0 10px rgba(127, 212, 255, 0.25);
}
.step::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 46px;
  right: -24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(127, 212, 255, 0.7), rgba(127, 212, 255, 0.14));
}
.step::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 46px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 8px var(--nights-watch), 0 0 16px var(--nights-watch-glow);
  opacity: 0;
  animation: travel 4.8s ease-in-out infinite;
}
.step:nth-child(2)::after { animation-delay: 1.2s; }
.step:nth-child(3)::after { animation-delay: 2.4s; }
.step:last-child::before, .step:last-child::after { display: none; }
@keyframes travel {
  0% { left: 46px; opacity: 0; }
  12%, 70% { opacity: 1; }
  80%, 100% { left: calc(100% + 16px); opacity: 0; }
}
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.7; }

.flow {
  margin-top: 48px;
  padding: 30px 28px;
  border-radius: var(--radius);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(127, 212, 255, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(10, 14, 31, 0.85), rgba(3, 5, 10, 0.85));
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-col { display: grid; gap: 10px; flex: 0 1 auto; }
.node {
  position: relative;
  flex: 0 1 auto;
  display: grid;
  gap: 3px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(3, 5, 10, 0.75);
  box-shadow: inset 0 1px 0 rgba(229, 235, 242, 0.04);
  font-size: 12.5px;
  font-weight: 600;
}
.node small { font-weight: 400; color: var(--text-muted); font-size: 11px; }
.node-source { border-color: var(--line); background: rgba(229, 235, 242, 0.02); }
.node-db { border-color: rgba(127, 212, 255, 0.55); background: linear-gradient(180deg, rgba(127, 212, 255, 0.1), rgba(3, 5, 10, 0.75)); box-shadow: 0 0 24px rgba(127, 212, 255, 0.12); }
.node-ml { border-style: dashed; border-color: rgba(255, 31, 75, 0.55); }
.node-ml small { color: #FF7A93; }
.node-ui {
  color: var(--accent-hi);
  border-color: var(--nights-watch);
  background: linear-gradient(180deg, rgba(127, 212, 255, 0.18), rgba(127, 212, 255, 0.04));
  box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.2), 0 0 30px rgba(127, 212, 255, 0.25);
}
.flow-arrow { position: relative; flex: 1 0 28px; min-width: 28px; height: 1px; background: linear-gradient(90deg, rgba(127, 212, 255, 0.12), rgba(127, 212, 255, 0.7)); }
.flow-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 4.5px solid transparent; border-left: 7px solid rgba(127, 212, 255, 0.85); border-right: 0; }
.flow-arrow::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 8px var(--nights-watch);
  animation: packet 2.6s linear infinite;
}
@keyframes packet {
  0% { left: 0; opacity: 0; }
  20%, 70% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

/* Stack: a manifest table */
.stack-list {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(10, 14, 31, 0.8), rgba(3, 5, 10, 0.7));
  overflow: hidden;
}
.stack-row {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1.1fr 1.4fr 1.4fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  transition: background 0.2s;
}
.stack-row:first-child { border-top: 0; }
.stack-head {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(229, 235, 242, 0.02);
}
.stack-row:not(.stack-head)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--nights-watch);
  box-shadow: 0 0 10px var(--nights-watch-glow);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}
.stack-row:not(.stack-head):hover { background: var(--accent-faint); }
.stack-row:not(.stack-head):hover::before { transform: scaleY(1); }
.stack-role { display: flex; align-items: baseline; gap: 10px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.stack-role b { font-weight: 500; letter-spacing: 0.06em; color: var(--nights-watch); }
.stack-row h3 { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.stack-row p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--text-muted); }
.stack-row .stack-value { color: var(--text-soft); }

/* Data model */
.schema-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.schema-stat { display: grid; gap: 6px; padding: 16px 20px; background: rgba(3, 5, 10, 0.96); }
.schema-stat strong { font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--nights-watch); font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(127, 212, 255, 0.3); }

.schema-group { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.group-head { position: sticky; top: 96px; align-self: start; }
.group-num { display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: 0.16em; color: var(--nights-watch); }
.group-head h3 { margin-bottom: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.group-head p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-muted); }
.group-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }

.table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(10, 14, 31, 0.9), rgba(3, 5, 10, 0.9));
  overflow: hidden;
  transition: opacity 0.25s, border-color 0.25s, box-shadow 0.25s;
  outline: none;
}
.table-card:focus-visible { border-color: var(--nights-watch); }
.schema.focusing .table-card { opacity: 0.28; }
.schema.focusing .table-card.is-focus { opacity: 1; border-color: var(--nights-watch); box-shadow: 0 0 0 1px var(--nights-watch), 0 0 30px rgba(127, 212, 255, 0.18); }
.schema.focusing .table-card.is-related { opacity: 1; border-color: rgba(127, 212, 255, 0.45); }
.table-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(127, 212, 255, 0.07), transparent); }
.table-card[data-stage="v2"] .table-head { background: linear-gradient(180deg, rgba(181, 169, 255, 0.08), transparent); }
.table-card[data-stage="ml"] .table-head { background: linear-gradient(180deg, rgba(255, 31, 75, 0.07), transparent); }
.table-head-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.table-head h4 { font-size: 14px; font-weight: 600; }
.table-head p { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }
.stage { font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; }
.stage-core { background: var(--accent-soft); color: var(--nights-watch); }
.stage-v2 { background: rgba(143, 220, 255, 0.14); color: var(--violet); }
.stage-ml { background: rgba(255, 31, 75, 0.14); color: var(--crime-violent); }
.columns { list-style: none; margin: 0; padding: 8px 0; }
.columns li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 5px 16px; font-size: 12px; }
.columns li:hover { background: rgba(229, 235, 242, 0.03); }
.col-name { color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.col-type { color: var(--text-muted); text-align: right; }
.col-note { grid-column: 1 / -1; font-size: 11px; color: var(--text-dim); }
.badge { font-size: 9px; font-weight: 600; letter-spacing: 0.06em; padding: 1px 5px; border-radius: 3px; }
.badge-pk { background: var(--silver); color: var(--black); }
.badge-fk { background: var(--accent-soft); color: var(--nights-watch); cursor: pointer; transition: background 0.2s; }
.badge-fk:hover { background: rgba(127, 212, 255, 0.22); }
.badge-geo { background: rgba(221, 231, 242, 0.08); color: var(--silver); box-shadow: inset 0 0 0 1px rgba(221, 231, 242, 0.32); }
.badge-uq { background: rgba(229, 235, 242, 0.06); color: var(--text-muted); }
.table-foot { padding: 8px 16px 12px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--text-muted); }

/* Footer: the night side of the Earth */
.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 110px;
  padding: 230px 24px 56px;
  text-align: center;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(229, 235, 242, 0.7), transparent),
    radial-gradient(1px 1px at 27% 58%, rgba(229, 235, 242, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 41% 14%, rgba(229, 235, 242, 0.6), transparent),
    radial-gradient(1px 1px at 63% 36%, rgba(229, 235, 242, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(229, 235, 242, 0.55), transparent),
    radial-gradient(1px 1px at 90% 48%, rgba(229, 235, 242, 0.4), transparent);
  background-size: 100% 220px;
  background-repeat: no-repeat;
}
.horizon {
  position: absolute;
  z-index: -1;
  top: 120px;
  left: 50%;
  width: max(1100px, 180vw);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 35% at 50% 0%, #101b3c 0%, #080d1d 50%, var(--black) 100%);
  box-shadow:
    0 -1px 0 rgba(190, 234, 255, 0.85),
    0 -6px 22px rgba(127, 212, 255, 0.4),
    0 -24px 90px rgba(127, 212, 255, 0.2),
    inset 0 10px 28px rgba(127, 212, 255, 0.2);
}
.horizon::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 30%;
  right: 30%;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(127, 212, 255, 0.22), transparent 70%);
  filter: blur(8px);
}
.footer-inner { position: relative; max-width: 760px; margin: 0 auto; display: grid; justify-items: center; gap: 16px; }
.footer-word { font-size: clamp(48px, 8vw, 88px); line-height: 1; text-shadow: 0 0 22px rgba(127, 212, 255, 0.55), 0 0 70px rgba(127, 212, 255, 0.3); }
.footer-tag { margin: 0; font-size: 13px; letter-spacing: 0.04em; color: var(--text-soft); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  width: 100%;
  margin-top: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.footer-links a { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--text-muted); transition: color 0.2s, text-shadow 0.2s; }
.footer-links a:hover { color: var(--nights-watch); text-shadow: 0 0 12px var(--nights-watch-glow); }
.footer-credits { margin: 6px 0 0; max-width: 680px; font-size: 11.5px; line-height: 1.8; color: var(--text-dim); }
.footer-credits a { color: var(--text-muted); text-underline-offset: 3px; }
.footer-credits a:hover { color: var(--nights-watch); }

/* Responsive */
@media (max-width: 1040px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .step:nth-child(2n)::before, .step:nth-child(2n)::after { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .hud { grid-template-columns: repeat(3, auto); }
  .hud-boroughs { display: none; }
  .hud-call { grid-column: 1 / -1; text-align: left; }
  .schema-group { grid-template-columns: 1fr; gap: 18px; }
  .group-head { position: static; max-width: 640px; }
  .flow { flex-direction: column; align-items: stretch; gap: 8px; }
  .flow-col { grid-template-columns: 1fr 1fr; }
  .node { text-align: center; }
  .flow-arrow { flex: none; align-self: center; width: 1px; min-width: 0; height: 26px; background: linear-gradient(180deg, rgba(127, 212, 255, 0.12), rgba(127, 212, 255, 0.7)); }
  .flow-arrow::after { right: auto; top: auto; left: -4px; bottom: -1px; border: 4.5px solid transparent; border-top: 7px solid rgba(127, 212, 255, 0.85); border-bottom: 0; }
  .flow-arrow::before { left: -2px; top: 0; animation-name: packet-down; }
  .stack-row { grid-template-columns: 120px 1fr 1.3fr 1.3fr; gap: 18px; padding-left: 20px; padding-right: 20px; }
}
@keyframes packet-down {
  0% { top: 0; opacity: 0; }
  20%, 70% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .map-app { height: auto; min-height: 0; scroll-margin-top: 0; display: flex; flex-direction: column; }
  .map-app #leaflet { position: relative; inset: auto; height: 64svh; min-height: 380px; }
  .sheet {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: auto;
    background: linear-gradient(180deg, rgba(10, 14, 31, 0.92), var(--black));
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .sheet::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 8px;
    background:
      linear-gradient(180deg, rgba(8, 13, 26, 0.12), rgba(8, 13, 26, 0.55) 70%, rgba(127, 212, 255, 0.1)),
      rgba(8, 13, 26, 0.4);
    border-right: 0;
    border-bottom: 1px solid rgba(143, 220, 255, 0.35);
    box-shadow:
      0 0 16px rgba(127, 212, 255, 0.22),
      inset 0 0 12px rgba(127, 212, 255, 0.08);
  }
  .sheet-body { overflow: visible; }
  .sheet-resize { display: none; }
  .map-hint { top: 76px; left: 50%; max-width: calc(100% - 128px); white-space: normal; text-align: center; }
  .map-legend { display: none; }
  .moon { top: 11%; right: 8%; width: 44px; height: 44px; }
  .stack-head { display: none; }
  .stack-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; }
  .stack-row:nth-child(2) { border-top: 0; }
  .stack-row h3 { margin-bottom: 4px; }
  .stack-row p::before { content: "Why it’s there"; display: block; margin: 6px 0 2px; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
  .stack-row .stack-value::before { content: "Resume value"; }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; row-gap: 30px; }
  .step { min-height: 46px; padding: 0 0 0 66px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }
  .step h3 { padding-top: 12px; }
  .step::before { top: 52px; bottom: -24px; left: 23px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, rgba(127, 212, 255, 0.6), rgba(127, 212, 255, 0.12)); }
  .step:nth-child(2n)::before { display: block; }
  .step:last-child::before { display: none; }
  .step::after { display: none; }
  .hud { grid-template-columns: 1fr 1fr; gap: 16px 20px; padding-bottom: 20px; }
  .hud-value { font-size: 17px; }
  .hero-inner { padding-bottom: 280px; }
  .group-tables { grid-template-columns: 1fr; }
  .flow { padding: 22px 16px; }
  .flow-col { grid-template-columns: 1fr; }
  .footer { padding-top: 190px; }
  .horizon { top: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .step::after, .flow-arrow::before { display: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  * { scrollbar-color: #7ab8d4 #0a1220; }
  ::-webkit-scrollbar-track {
    background: #0a1220;
    border-color: #1c3344;
    box-shadow: none;
  }
  ::-webkit-scrollbar-thumb,
  ::-webkit-scrollbar-thumb:hover {
    background: #7ab8d4;
    border-color: #9ecfe4;
    box-shadow: none;
  }
  .sheet-resize::before,
  .sheet-resize:hover::before,
  .sheet-resize:focus-visible::before,
  body.is-sheet-resizing .sheet-resize::before {
    background: #7ab8d4;
    border-color: #9ecfe4;
    box-shadow: none;
  }
  .sheet::after {
    background: #0a1220;
    border-right-color: #7ab8d4;
    border-bottom-color: #7ab8d4;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Watch mark */
.nav-brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.watch-logo {
  display: block;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 5px rgba(221, 231, 242, 0.32)) drop-shadow(0 0 14px rgba(127, 212, 255, 0.22));
  animation: nw-float 6s ease-in-out infinite;
}
@keyframes nw-float { 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .watch-logo { animation: none; } }

/* Deep-space blue page background (no purple) */
html, body {
  background-color: #02050C;
  background-image:
    radial-gradient(1200px 700px at 70% -10%, rgba(18, 52, 110, 0.35), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(8, 30, 70, 0.4), transparent 60%);
  background-attachment: fixed;
}

/* Opening cover, graded toward the hero's navy */
html.intro-open { overflow: hidden; scroll-behavior: auto; scrollbar-gutter: stable; }
.intro-open .hero-inner { opacity: 0; translate: 0 14px; }
.hero-inner { transition: opacity 0.9s ease 0.1s, translate 0.9s ease 0.1s; }

.intro-cover {
  position: fixed;
  inset: 0;
  z-index: 5000;
  overflow: hidden;
  background: var(--black);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.intro-cover.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-cover video { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.7) brightness(0.88); }
.intro-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #122C5C;
  mix-blend-mode: color;
  opacity: 0.4;
  pointer-events: none;
}
.intro-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(60% 36% at 50% 50%, rgba(2, 5, 12, 0.55), rgba(2, 5, 12, 0.18) 62%, transparent),
    radial-gradient(90% 40% at 50% 100%, rgba(127, 212, 255, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(2, 5, 12, 0.6), rgba(8, 13, 26, 0.12) 30%, rgba(8, 13, 26, 0.16) 70%, rgba(2, 5, 12, 0.8));
  pointer-events: none;
}
.intro-copy h1 {
  margin: 0;
  font-family: var(--wordmark);
  font-size: clamp(3.6rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--text);
  text-shadow:
    0 0 14px rgba(221, 231, 242, 0.42),
    0 0 22px rgba(127, 212, 255, 0.5),
    0 0 80px rgba(127, 212, 255, 0.25);
  opacity: 0;
  animation: intro-copy-in 0.8s 4.6s forwards;
}
.intro-copy p {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 17px);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #C8D3DE;
  text-shadow: 0 0 12px rgba(190, 210, 230, 0.4), 0 0 26px rgba(127, 212, 255, 0.14), 0 1px 14px rgba(3, 5, 10, 0.9);
  opacity: 0;
  animation: intro-copy-in 0.8s 5.1s forwards;
}
.intro-copy .btn {
  margin-top: 32px;
  pointer-events: auto;
  opacity: 0;
  animation: intro-copy-in 0.5s 1s forwards;
}
@keyframes intro-copy-in { from { translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

.sheet-head { position: relative; padding-left: 64px; min-height: 72px; }
.rail-logo {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 4px rgba(221, 231, 242, 0.3)) drop-shadow(0 0 10px rgba(127, 212, 255, 0.2));
}

/* Separate architecture page */
.details-page { min-height: 100%; }
.details-main { padding-top: 74px; }
.details-main .section:first-child { padding-top: 100px; }
.details-main .section-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.details-page .step {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(127, 212, 255, 0.05), rgba(3, 5, 10, 0.35));
}
.details-page .step::before,
.details-page .step::after { display: none; }
.details-page .step h3 { margin: 0 0 10px; }
.details-page .stack-role { color: var(--nights-watch); }
.details-page .group-head h3 { margin-top: 0; }

@media (max-width: 600px) {
  .details-page .step { min-height: 0; padding: 20px; }
  .details-page .step h3 { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-cover video { display: none; }
  .intro-cover { background: #02050c url("../media/poster.jpg") center / cover no-repeat; }
  .intro-copy h1, .intro-copy p, .intro-copy .btn { opacity: 1; animation: none; }
}
