@font-face {
  font-family: "Cabinet Grotesk";
  src: url("./fonts/cabinet-grotesk-500.woff2") format("woff2");
  font-display: optional;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("./fonts/cabinet-grotesk-800.woff2") format("woff2");
  font-display: optional;
  font-style: normal;
  font-weight: 800;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("./fonts/noto-sans-sc-400.ttf") format("truetype");
  font-display: optional;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("./fonts/noto-sans-sc-500.ttf") format("truetype");
  font-display: optional;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("./fonts/noto-sans-sc-700.ttf") format("truetype");
  font-display: optional;
  font-style: normal;
  font-weight: 700;
}

:root {
  --paper: #f7f8f6;
  --paper-warm: #fbfaf7;
  --ink: #111312;
  --muted: #747a78;
  --faint: #aeb4b1;
  --line: rgba(17, 19, 18, 0.14);
  --line-soft: rgba(17, 19, 18, 0.075);
  --blue: #135cff;
  --coral: #ff624a;
  --green: #00a47a;
  --header-height: 48px;
  --serif: "Cabinet Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Cabinet Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scrollbar-color: var(--ink) transparent;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-sprite symbol,
.icon-button svg,
.route-action svg,
.active-domain svg,
.section-cue svg,
.service-card svg,
.active-type svg,
.command-dialog svg,
.scan-action svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 80;
  top: 20px;
  right: 3.2vw;
  left: 3.2vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  pointer-events: none;
  mix-blend-mode: normal;
}

.site-header > * {
  pointer-events: auto;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

.brand img {
  width: 42px;
  height: 42px;
  transform-origin: center;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 240ms ease;
}

.brand:hover img,
.brand:focus-visible img {
  filter: drop-shadow(0 7px 9px rgba(19, 92, 255, 0.12));
  transform: rotate(12deg) scale(1.045);
}

.brand span {
  display: grid;
  gap: 0;
  line-height: 1;
}

.brand strong {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  line-height: 0.92;
}

.brand small {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  font-weight: 500;
}

.chapter-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(17, 19, 18, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 28px rgba(20, 32, 45, 0.06);
  backdrop-filter: blur(16px);
}

.chapter-nav a {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  transition: color 180ms ease, background-color 180ms ease;
}

.chapter-nav a span {
  font-family: var(--serif);
  font-size: 8px;
  vertical-align: super;
}

.chapter-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(17, 19, 18, 0.055);
}

.header-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.global-health {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 500;
}

.global-health i,
.active-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 164, 122, 0.1);
}

.global-health[data-state="checking"] i,
.active-status[data-state="checking"] i {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(19, 92, 255, 0.1);
  animation: status-pulse 1.2s ease-in-out infinite;
}

.global-health[data-state="partial"] i,
.active-status[data-state="offline"] i {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 98, 74, 0.1);
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
  backdrop-filter: blur(14px);
}

.icon-button:hover {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-1px);
}

.icon-button:disabled {
  color: var(--faint);
  border-color: var(--line-soft);
  background: transparent;
  cursor: default;
  transform: none;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.command-button {
  width: 40px;
  border-radius: 50%;
  padding: 0;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: -31px;
  width: max-content;
  max-width: 140px;
  padding: 4px 7px;
  border-radius: 2px;
  color: #fff;
  background: var(--ink);
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

main {
  width: 100%;
}

.snap-section {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.route-stage {
  color: var(--ink);
  background: var(--paper);
}

.optical-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("./optical-backdrop.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.82;
  pointer-events: none;
}

.optical-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 248, 246, 0.22);
}

.page-home .optical-backdrop {
  background-image: none;
  background-color: #f5f7f4;
  opacity: 1;
}

.page-home .optical-backdrop::after {
  display: none;
}

.scene-shell {
  position: absolute;
  z-index: 2;
  top: 6.5%;
  right: 0.5%;
  bottom: 7.5%;
  left: 29%;
  contain: layout paint style;
  cursor: grab;
}

.page-home .scene-shell {
  left: 23%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%);
}

.scene-shell.is-dragging {
  cursor: grabbing;
}

.scene-shell.node-hover {
  cursor: pointer;
}

#route-scene,
.scene-labels,
.scene-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#route-scene {
  z-index: 1;
  touch-action: pan-y;
}

.scene-labels {
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.scene-node-label {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 2px 24px auto;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: min(220px, calc(100vw - 80px));
  padding: 5px 7px 5px 0;
  color: var(--muted);
  background: transparent;
  filter: drop-shadow(0 1px 5px rgba(247, 248, 246, 0.98));
  font-family: var(--display);
  font-size: 9px;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: left center;
  transition: color 180ms ease, opacity 180ms ease;
}

.scene-node-label::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 33px;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease, background-color 220ms ease;
}

.scene-node-label i {
  width: 2px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--service-accent), white 54%);
  box-shadow: none;
}

.scene-node-label span {
  color: var(--service-accent);
  font-size: 8px;
  font-weight: 800;
}

.scene-node-label strong {
  overflow: visible;
  color: inherit;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.scene-node-label:hover,
.scene-node-label.hovered,
.scene-node-label.active {
  color: var(--ink);
}

.scene-node-label.active::after {
  background: var(--service-accent);
  transform: scaleX(1);
}

.scene-node-label.active i {
  background: var(--service-accent);
}

.scene-node-label.behind {
  opacity: 0.35;
}

.scene-fallback {
  display: none;
  place-items: center;
}

.scene-fallback i {
  position: absolute;
  width: 45%;
  aspect-ratio: 1.5;
  border: 1px solid rgba(19, 92, 255, 0.25);
  border-radius: 50%;
  transform: rotate(22deg);
}

.scene-fallback i:nth-child(2) {
  border-color: rgba(255, 98, 74, 0.22);
  transform: rotate(-46deg);
}

.scene-fallback i:nth-child(3) {
  border-color: rgba(0, 164, 122, 0.2);
  transform: rotate(78deg);
}

.webgl-fallback .scene-fallback {
  display: grid;
}

.chapter-kicker {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 800;
}

.chapter-kicker span {
  color: var(--blue);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
}

.route-stage > .chapter-kicker {
  position: absolute;
  z-index: 5;
  top: 13%;
  left: 5.2%;
}

.active-service {
  position: absolute;
  z-index: 6;
  top: 48%;
  left: 5.2%;
  width: 29%;
  max-width: 440px;
  transform: translateY(-44%);
}

.active-type {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 800;
}

.active-type svg {
  width: 17px;
  height: 17px;
  color: var(--active-accent, var(--blue));
}

.active-type b {
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--coral);
  font-size: 7px;
  font-weight: 700;
}

.active-service h1 {
  max-width: 560px;
  margin: 25px 0 16px;
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 400;
  line-height: 0.98;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.active-service h1[data-fit="long"] {
  font-size: 52px;
}

.active-service h1[data-fit="xlong"] {
  font-size: 46px;
}

.active-description {
  margin: 0 0 14px;
  color: #4f5552;
  font-size: 14px;
  line-height: 1.75;
}

.active-domain {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
}

.active-domain::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.active-domain:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.active-domain svg {
  width: 13px;
  height: 13px;
}

.active-meta {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.9fr;
  gap: 18px;
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.active-meta small,
.active-meta p {
  margin: 0;
}

.active-meta small {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 7px;
  font-weight: 800;
}

.active-meta p {
  color: #4f5552;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
}

.active-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.active-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
}

.route-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 132px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease;
}

.route-action:hover {
  color: var(--ink);
  background: transparent;
}

.route-action svg {
  width: 15px;
  height: 15px;
}

.route-counter {
  position: absolute;
  z-index: 8;
  top: 47%;
  right: 4.5%;
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateY(-50%);
}

.route-counter strong,
.route-counter small {
  font-family: var(--serif);
  font-weight: 400;
}

.route-counter strong {
  color: var(--blue);
  font-size: 17px;
}

.route-counter small {
  color: var(--faint);
  font-size: 12px;
}

.route-counter span {
  width: 1px;
  height: 84px;
  background: var(--line);
}

.route-counter span::before {
  content: "";
  display: block;
  width: 3px;
  height: 24px;
  background: var(--blue);
  transform: translateX(-1px);
}

.scene-toggle {
  position: absolute;
  z-index: 10;
  right: 4.1%;
  bottom: 8.5%;
}

.scene-toggle .play-icon,
.scene-toggle.paused .pause-icon {
  display: none;
}

.scene-toggle.paused .play-icon {
  display: block;
}

.section-cue {
  position: absolute;
  z-index: 9;
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 9px;
  transform: translateX(-50%);
}

.section-cue i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.section-cue:hover i {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(3px);
}

.section-cue svg {
  width: 13px;
  height: 13px;
}

.directory {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  min-height: 100vh;
  min-height: 100dvh;
  gap: 0;
  padding: 88px 4.2vw 18px;
  color: var(--ink);
  background: #f6f8f8;
  isolation: isolate;
}

.directory::before,
.directory::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.directory::before {
  background: url("./optical-backdrop.webp") center / cover no-repeat;
  opacity: 0.18;
  filter: saturate(0.82) contrast(0.94);
}

.directory::after {
  background-image:
    linear-gradient(rgba(17, 19, 18, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 18, 0.026) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.48) 27%, rgba(0, 0, 0, 0.16) 100%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.48) 27%, rgba(0, 0, 0, 0.16) 100%);
}

.directory-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(250px, 0.72fr) auto;
  align-items: end;
  gap: 34px;
  padding-bottom: 18px;
}

.directory-header h1 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 54px;
  font-weight: 500;
  line-height: 0.84;
  text-wrap: balance;
}

.directory-header h1 em {
  font-family: var(--serif);
  font-size: 66px;
  font-weight: 400;
}

.directory-intro {
  max-width: 340px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  text-wrap: pretty;
}

.directory-tools {
  display: grid;
  justify-items: end;
  gap: 11px;
  min-width: 330px;
  margin-bottom: 2px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
}

.filter-tabs button {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  transition: color 180ms ease;
}

.filter-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.filter-tabs button:hover,
.filter-tabs button[aria-pressed="true"] {
  color: var(--ink);
}

.filter-tabs button[aria-pressed="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.filter-tabs small {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 8px;
}

.directory-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 245px;
  height: 34px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color 180ms ease, border-color 180ms ease;
}

.directory-search:focus-within {
  color: var(--ink);
  border-color: var(--blue);
}

.directory-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.directory-search input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.directory-search input::placeholder {
  color: var(--faint);
}

.gallery-summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 37px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
}

.gallery-summary p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.gallery-summary p:last-child {
  justify-self: end;
}

.gallery-summary p:last-child i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 164, 122, 0.09);
}

.gallery-summary strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 400;
}

.page-dots {
  display: flex;
  gap: 5px;
}

.page-dots i {
  width: 14px;
  height: 2px;
  background: var(--line);
  transition: width 180ms ease, background-color 180ms ease;
}

.page-dots i.active {
  width: 30px;
  background: var(--blue);
}

.service-gallery {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(244px, 29vh, 266px);
  gap: 10px;
  min-height: 0;
  padding: 0 0 10px;
  perspective: 1200px;
  touch-action: pan-y;
}

.service-card {
  --spot-x: 50%;
  --spot-y: 45%;
  position: relative;
  min-width: 0;
  min-height: 244px;
  overflow: hidden;
  border: 1px solid rgba(17, 19, 18, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 15px 45px rgba(45, 60, 75, 0.045), inset 0 1px rgba(255, 255, 255, 0.82);
  transform-style: preserve-3d;
  transition: border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: -1px;
  right: 18px;
  left: 18px;
  height: 2px;
  background: var(--service-accent);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(circle at var(--spot-x) var(--spot-y), color-mix(in srgb, var(--service-accent) 13%, transparent) 0, transparent 38%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.service-card-light {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.44), transparent 44%),
    linear-gradient(to bottom, transparent 70%, color-mix(in srgb, var(--service-accent) 5%, transparent));
  pointer-events: none;
}

.service-card:hover,
.service-card:focus-within,
.service-card.is-hovered {
  border-color: color-mix(in srgb, var(--service-accent) 38%, rgba(17, 19, 18, 0.14));
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 58px rgba(41, 61, 84, 0.1), inset 0 1px rgba(255, 255, 255, 0.95);
}

.service-card:hover::before,
.service-card:focus-within::before,
.service-card.is-hovered::before {
  transform: scaleX(1);
}

.service-card:hover::after,
.service-card:focus-within::after,
.service-card.is-hovered::after {
  opacity: 1;
}

.service-card-primary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100% - 48px);
  min-height: 194px;
  padding: 15px 17px 13px;
  transform: translateZ(12px);
}

.service-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
}

.service-card-index,
.service-card-health,
.service-card-head b {
  font-family: var(--display);
  font-size: 7px;
}

.service-card-index {
  color: var(--service-accent);
  font-family: var(--serif);
  font-size: 10px;
}

.service-card-health {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
}

.service-card-health i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 164, 122, 0.08);
}

.service-card-health[data-state="checking"] i {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(19, 92, 255, 0.08);
  animation: status-pulse 1.2s ease-in-out infinite;
}

.service-card-health[data-state="offline"] i {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 98, 74, 0.08);
}

.service-card-head b {
  padding: 1px 4px;
  border: 1px solid var(--service-accent);
  border-radius: 1px;
  color: var(--service-accent);
  font-weight: 700;
}

.service-card-arrow {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  color: var(--faint);
  transform: translate(-3px, 3px);
  opacity: 0;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.service-card:hover .service-card-arrow,
.service-card:focus-within .service-card-arrow {
  color: var(--service-accent);
  transform: translate(0, 0);
  opacity: 1;
}

.service-card-visual {
  position: absolute;
  z-index: -1;
  top: 42px;
  right: 14px;
  width: 158px;
  height: 108px;
  overflow: hidden;
  pointer-events: none;
  transform-style: preserve-3d;
}

.service-signal-map,
.service-card-glyph {
  position: absolute;
}

.service-signal-map {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0.72;
  transition: opacity 260ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-signal-map path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.signal-grid path {
  stroke: rgba(17, 19, 18, 0.075);
  stroke-width: 0.7;
}

.signal-trace {
  stroke: color-mix(in srgb, var(--service-accent) 38%, rgba(17, 19, 18, 0.24));
  stroke-width: 1;
}

.signal-flow {
  stroke: color-mix(in srgb, var(--service-accent) 78%, white);
  stroke-width: 1.2;
  stroke-dasharray: 3 12;
  stroke-linecap: round;
  animation: service-signal-flow 4.8s linear infinite;
}

.signal-flow-2 {
  animation-direction: reverse;
  animation-duration: 5.6s;
}

.signal-flow-3 {
  animation-duration: 4.2s;
}

.signal-nodes circle {
  fill: rgba(255, 255, 255, 0.9);
  stroke: var(--service-accent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: r 260ms ease, fill 260ms ease;
}

.service-card-glyph {
  top: 50%;
  left: 66%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--service-accent) 62%, rgba(17, 19, 18, 0.12));
  border-radius: 3px;
  color: var(--service-accent);
  background: rgba(250, 252, 252, 0.9);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.54), 0 8px 22px color-mix(in srgb, var(--service-accent) 10%, transparent);
  transform: translate(-50%, -50%);
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, background-color 220ms ease;
}

.service-card-glyph svg {
  width: 18px;
  height: 18px;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover .service-card-glyph {
  background: #fff;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--service-accent) 8%, white), 0 13px 30px color-mix(in srgb, var(--service-accent) 18%, transparent);
  transform: translate(calc(-50% - 7px), -50%) scale(1.045);
}

.service-card:hover .service-card-glyph svg {
  transform: scale(1.06);
}

.service-card:hover .service-signal-map,
.service-card:focus-within .service-signal-map {
  opacity: 1;
  transform: translateX(-3px);
}

.service-card:hover .signal-flow,
.service-card:focus-within .signal-flow {
  animation-duration: 1.45s;
}

.service-card:hover .signal-nodes circle,
.service-card:focus-within .signal-nodes circle {
  fill: color-mix(in srgb, var(--service-accent) 18%, white);
  r: 3.1px;
}

.signal-readout {
  position: absolute;
  right: 3px;
  bottom: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 6px;
  font-variant-numeric: tabular-nums;
}

.signal-readout i {
  width: 4px;
  height: 4px;
  background: var(--service-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--service-accent) 60%, transparent);
}

.signal-readout b {
  font: inherit;
  font-weight: 500;
}

@keyframes service-signal-flow {
  to { stroke-dashoffset: -60; }
}

.service-card-copy {
  align-self: end;
  width: 64%;
  min-width: 0;
  padding: 24px 0 9px;
}

.service-card-copy p {
  margin: 0;
}

.service-card-copy > p:first-child {
  overflow: hidden;
  color: var(--service-accent);
  font-family: var(--display);
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card-copy h2 {
  margin: 5px 0 5px;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.02;
  text-wrap: balance;
}

.service-card-copy > p:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.service-card-meta div {
  min-width: 0;
}

.service-card-meta dt,
.service-card-meta dd {
  margin: 0;
  font-family: var(--display);
}

.service-card-meta dt {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 6px;
  font-weight: 800;
}

.service-card-meta dd {
  overflow: hidden;
  color: #4a514e;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card-meta div:last-child {
  text-align: right;
}

.service-card-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 9px 0 17px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.4);
  transform: translateZ(16px);
}

.service-stack {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
  white-space: nowrap;
}

.service-stack span {
  overflow: hidden;
  max-width: 92px;
  text-overflow: ellipsis;
}

.service-stack i {
  color: var(--faint);
  font-family: var(--serif);
  font-style: normal;
}

.service-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.service-card-actions .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-color: transparent;
  background: transparent;
}

.service-card-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.card-launch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 8px;
  border-left: 1px solid var(--line);
  font-size: 8px;
  font-weight: 700;
}

.card-launch svg {
  width: 13px;
  height: 13px;
  transition: color 180ms ease, transform 180ms ease;
}

.card-launch:hover svg {
  color: var(--service-accent);
  transform: translate(2px, -2px);
}

.gallery-empty {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 360px;
  place-items: center;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.gallery-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding-top: 8px;
}

.edge-facts {
  display: flex;
  align-items: center;
  gap: 44px;
}

.edge-facts p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.edge-facts span {
  color: var(--faint);
  font-family: var(--display);
  font-size: 6px;
  font-weight: 800;
}

.edge-facts strong {
  font-family: var(--display);
  font-size: 8px;
  font-weight: 500;
}

.gallery-controls,
.pagination {
  display: flex;
  align-items: center;
}

.gallery-controls {
  gap: 18px;
}

.pagination {
  gap: 8px;
}

.pagination .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  background: transparent;
}

.pagination .icon-button svg {
  width: 13px;
  height: 13px;
}

.pagination > span {
  min-width: 52px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 10px;
  text-align: center;
}

.scan-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.scan-action svg {
  width: 13px;
  height: 13px;
}

.scan-action.scanning svg {
  animation: rotate 0.8s linear infinite;
}

.command-dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: rgba(250, 251, 249, 0.96);
  box-shadow: 0 30px 100px rgba(15, 23, 32, 0.18);
  backdrop-filter: blur(24px);
}

.command-dialog::backdrop {
  background: rgba(222, 227, 229, 0.68);
  backdrop-filter: blur(5px);
}

.command-shell {
  padding: 10px;
}

.command-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
}

.command-search > svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.command-search input {
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.command-search input::placeholder {
  color: var(--faint);
}

.command-search .icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-color: transparent;
  background: transparent;
}

.command-title {
  margin: 16px 14px 8px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 8px;
  font-weight: 800;
}

.command-results {
  display: grid;
  max-height: 500px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.command-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 130px 20px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 3px;
}

.command-result.selected {
  background: rgba(19, 92, 255, 0.055);
}

.command-result-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.command-result-icon svg {
  width: 17px;
  height: 17px;
}

.command-result > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.command-result strong,
.command-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-result strong {
  font-family: var(--display);
  font-size: 13px;
}

.command-result small,
.command-result em {
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
  font-style: normal;
}

.command-result em {
  text-align: right;
}

.command-arrow {
  width: 15px;
  height: 15px;
}

.command-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.command-shell > footer {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 8px 14px 0;
  color: var(--muted);
  font-size: 8px;
}

.command-shell kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-right: 2px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  font-family: var(--display);
  font-size: 7px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 3px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 35px rgba(15, 23, 32, 0.18);
  font-size: 10px;
}

.toast.visible {
  display: flex;
}

.toast svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@keyframes status-pulse {
  50% { opacity: 0.45; transform: scale(0.82); }
}

.page-home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.home-stage {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.home-stage {
  contain: paint;
}

.services-main {
  min-height: 100vh;
  min-height: 100dvh;
}

.home-signature {
  position: absolute;
  z-index: 8;
  right: 4.2%;
  bottom: 28px;
  display: grid;
  justify-items: end;
  gap: 1px;
  margin: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 7px;
}

.home-signature strong {
  color: var(--ink);
  font-size: 8px;
  font-weight: 500;
}

.page-wipe {
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: hidden;
  background: rgba(237, 242, 243, 0.998);
  box-shadow: none;
  pointer-events: none;
  transform: translate3d(-101%, 0, 0);
  transition: transform 320ms cubic-bezier(0.77, 0, 0.18, 1);
}

.page-wipe::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: #20b9bf;
  opacity: 1;
}

.js:not(.page-ready):not(.page-leaving) .page-wipe {
  transform: translate3d(0, 0, 0);
  transition: none;
}

.page-ready:not(.page-leaving) .page-wipe {
  transform: translate3d(101%, 0, 0);
}

.page-leaving .page-wipe {
  transform: translate3d(0, 0, 0);
}

.page-system {
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
}

.system-scroll {
  scroll-snap-type: none;
}

.system-optical-backdrop {
  position: fixed;
  z-index: 0;
  inset: -8%;
  background-image: url("./optical-backdrop.webp");
  background-position: center;
  background-size: cover;
  opacity: 0.54;
  pointer-events: none;
  will-change: transform;
}

.system-optical-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 248, 246, 0.28);
}

.system-scene-shell {
  position: fixed;
  z-index: 2;
  top: 10%;
  right: 18%;
  bottom: 10%;
  left: 31%;
  pointer-events: none;
  contain: layout paint style;
  will-change: transform;
}

#system-scene {
  width: 100%;
  height: 100%;
}

.system-story {
  position: relative;
  z-index: 3;
}

.system-chapter {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.system-chapter .chapter-copy {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 5.2%;
  width: 42%;
  max-width: 610px;
  transform: translateY(-50%);
}

.system-chapter .chapter-copy-right {
  right: 5.5%;
  left: auto;
  width: 34%;
}

.system-chapter .chapter-copy-lower {
  top: 58%;
}

.system-chapter h1,
.system-chapter h2 {
  margin: 18px 0 22px;
  max-width: 100%;
  overflow-wrap: normal;
  font-family: var(--display);
  font-size: 60px;
  font-weight: 500;
  line-height: 0.98;
  text-wrap: balance;
}

.system-chapter h1 em,
.system-chapter h2 em {
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 400;
}

.system-chapter .chapter-copy > p:last-child,
.chapter-lede {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.chapter-roman {
  margin: 0;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 14px;
}

.intro-coordinates {
  position: absolute;
  right: 5.2%;
  bottom: 8%;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 38px;
  margin: 0;
}

.intro-coordinates div {
  display: grid;
  gap: 5px;
}

.intro-coordinates dt,
.intro-coordinates dd {
  margin: 0;
  font-family: var(--display);
  font-size: 8px;
}

.intro-coordinates dt {
  color: var(--faint);
  font-weight: 800;
}

.intro-coordinates dd {
  color: var(--ink);
  font-weight: 500;
}

.story-next {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  transform: translateX(-50%);
}

.story-next svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.story-rail {
  position: fixed;
  z-index: 20;
  top: 43%;
  right: 4%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.story-rail::before {
  content: "";
  grid-row: 2;
  width: 1px;
  height: 94px;
  background: var(--line);
}

.story-rail span {
  position: absolute;
  top: 24px;
  width: 2px;
  height: 94px;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: top;
}

.story-rail strong,
.story-rail small {
  font-family: var(--serif);
  font-weight: 400;
}

.story-rail strong {
  color: var(--blue);
  font-size: 14px;
}

.story-rail small {
  color: var(--faint);
  font-size: 10px;
}

.orbit-note {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  column-gap: 10px;
  min-width: 165px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.orbit-note svg {
  grid-row: 1 / 3;
  width: 23px;
  height: 23px;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.orbit-note span,
.orbit-note strong {
  font-family: var(--display);
  font-size: 8px;
}

.orbit-note span {
  color: var(--faint);
}

.orbit-note strong {
  font-weight: 500;
}

.note-top {
  top: 17%;
  left: 47%;
}

.note-right {
  top: 42%;
  right: 7%;
}

.note-bottom {
  right: 20%;
  bottom: 13%;
}

.protocol-list {
  position: absolute;
  z-index: 5;
  bottom: 12%;
  left: 5.2%;
  width: 31%;
  border-top: 1px solid var(--line);
}

.protocol-list > div {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line-soft);
}

.protocol-list span {
  color: var(--blue);
  font-family: var(--serif);
  font-size: 10px;
}

.protocol-list strong {
  font-family: var(--display);
  font-size: 13px;
}

.protocol-list small {
  color: var(--muted);
  font-size: 8px;
}

.runtime-figures {
  position: absolute;
  z-index: 5;
  top: 18%;
  right: 7%;
  display: grid;
  grid-template-columns: repeat(2, 130px);
}

.runtime-figures div {
  display: grid;
  min-height: 112px;
  align-content: center;
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.runtime-figures strong {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
}

.runtime-figures span {
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
}

.system-outro {
  background: rgba(251, 250, 247, 0.76);
}

.outro-copy {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: min(620px, 80vw);
  text-align: center;
  transform: translate(-50%, -50%);
}

.outro-copy h2 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 400;
}

.outro-copy > p:not(.chapter-roman) {
  color: var(--muted);
}

.outro-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 28px;
}

.outro-actions > a:last-child {
  border-bottom: 1px solid currentColor;
  font-size: 10px;
}

.story-footer {
  position: absolute;
  right: 4.2%;
  bottom: 22px;
  left: 4.2%;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 8px;
}

@media (max-width: 1180px) {
  .active-service {
    width: 34%;
  }

  .active-service h1 {
    font-size: 54px;
  }

  .active-service h1[data-fit="long"] {
    font-size: 48px;
  }

  .active-service h1[data-fit="xlong"] {
    font-size: 42px;
  }

  .scene-shell {
    left: 33%;
  }

  .page-home .scene-shell {
    left: 27%;
  }

  .directory-header {
    grid-template-columns: minmax(300px, 1fr) auto;
  }

  .directory-intro {
    display: none;
  }

  .directory-tools {
    grid-column: 2;
  }

  .service-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(245px, 31vh, 270px);
  }
}

@media (max-height: 700px) and (min-width: 721px) {
  :root {
    --header-height: 40px;
  }

  .site-header {
    top: 12px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .route-stage > .chapter-kicker {
    top: 11%;
  }

  .active-service h1 {
    margin-top: 16px;
    font-size: 50px;
  }

  .active-service h1[data-fit="long"] {
    font-size: 44px;
  }

  .active-service h1[data-fit="xlong"] {
    font-size: 39px;
  }

  .active-description {
    margin-bottom: 8px;
  }

  .active-meta {
    margin-top: 20px;
  }

  .active-actions {
    margin-top: 15px;
  }

  .scene-toggle {
    bottom: 7%;
  }

  .section-cue {
    bottom: 14px;
  }

  .directory {
    grid-template-rows: auto auto auto auto;
    padding-top: 61px;
    padding-bottom: 10px;
  }

  .directory-header {
    padding-bottom: 10px;
  }

  .directory-header h1 {
    margin-top: 4px;
    font-size: 42px;
  }

  .directory-header h1 em {
    font-size: 48px;
  }

  .directory-header .chapter-kicker {
    font-size: 8px;
  }

  .gallery-summary {
    min-height: 30px;
  }

  .service-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 244px;
  }

  .service-card-copy {
    width: 70%;
  }

  .service-card-visual {
    width: 112px;
    height: 112px;
  }
}

@media (max-width: 1120px) and (min-width: 721px) {
  .directory {
    grid-template-rows: auto auto auto auto;
  }

  .service-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(245px, 31vh, 270px);
  }
}

@media (max-width: 720px) {
  html {
    scroll-snap-type: none;
  }

  .site-header {
    top: max(10px, env(safe-area-inset-top));
    right: 15px;
    left: 15px;
    grid-template-columns: 1fr auto 1fr;
    height: 40px;
  }

  .brand {
    gap: 5px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand span {
    display: none;
  }

  .chapter-nav a {
    gap: 3px;
    padding: 6px 7px;
    font-size: 0;
  }

  .chapter-nav a::after {
    content: attr(href);
    font-size: 0;
  }

  .chapter-nav a span {
    font-size: 9px;
  }

  .header-tools {
    gap: 7px;
  }

  .global-health span,
  .command-button kbd {
    display: none;
  }

  .global-health {
    gap: 0;
  }

  .command-button,
  .icon-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    padding: 0;
    border-radius: 50%;
  }

  [data-tooltip]::after {
    display: none;
  }

  .route-stage > .chapter-kicker {
    top: 69px;
    left: 18px;
  }

  .optical-backdrop {
    background-position: 64% center;
    opacity: 0.62;
  }

  .scene-shell {
    top: 8%;
    right: -14%;
    bottom: 38%;
    left: -14%;
  }

  .page-home .scene-shell {
    left: -14%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .scene-node-label {
    grid-template-columns: 2px 20px;
    gap: 5px;
    max-width: 40px;
  }

  .scene-node-label strong,
  .scene-node-label::after {
    display: none;
  }

  .scene-node-label i {
    width: 2px;
    height: 11px;
  }

  .scene-node-label span {
    font-size: 7px;
  }

  .scene-node-label.behind {
    opacity: 0.24;
  }

  .active-service {
    top: auto;
    right: 18px;
    bottom: 70px;
    left: 18px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .active-service h1 {
    margin: 13px 0 8px;
    font-size: 40px;
    line-height: 1;
  }

  .active-service h1[data-fit="long"] {
    font-size: 34px;
  }

  .active-service h1[data-fit="xlong"] {
    font-size: 30px;
  }

  .active-description {
    display: none;
  }

  .active-domain {
    font-size: 10px;
  }

  .active-meta {
    grid-template-columns: 0.9fr 1fr;
    gap: 15px;
    margin-top: 16px;
    padding-top: 10px;
  }

  .active-meta > div:first-child {
    display: none;
  }

  .active-actions {
    position: absolute;
    right: 0;
    bottom: -1px;
    margin: 0;
  }

  .active-actions .route-action {
    min-width: 108px;
    height: 38px;
    gap: 14px;
    font-size: 10px;
  }

  .active-actions .icon-button {
    display: none;
  }

  .route-counter {
    top: 82px;
    right: 18px;
    gap: 6px;
    transform: none;
  }

  .route-counter span {
    height: 45px;
  }

  .route-counter span::before {
    height: 14px;
  }

  .scene-toggle {
    right: 18px;
    bottom: 205px;
  }

  .section-cue {
    bottom: 17px;
  }

  .directory {
    grid-template-rows: auto auto auto auto;
    min-height: 100dvh;
    padding: 64px 14px 12px;
  }

  .directory-header {
    display: block;
    padding-bottom: 12px;
  }

  .directory-header h1 {
    margin-top: 4px;
    font-size: 34px;
    line-height: 0.9;
  }

  .directory-header h1 em {
    font-size: 40px;
  }

  .directory-header .chapter-kicker {
    font-size: 7px;
  }

  .directory-header .chapter-kicker span {
    font-size: 10px;
  }

  .directory-tools {
    display: grid;
    min-width: 0;
    justify-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }

  .filter-tabs {
    gap: 17px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-tabs button {
    flex: 0 0 auto;
    font-size: 10px;
  }

  .filter-tabs small {
    display: none;
  }

  .directory-search {
    width: 100%;
    height: 36px;
  }

  .gallery-summary {
    grid-template-columns: 1fr auto;
    min-height: 36px;
  }

  .gallery-summary p:last-child {
    display: none;
  }

  .gallery-summary .page-dots {
    display: none;
  }

  .service-gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(272px, auto);
    gap: 10px;
    padding-bottom: 12px;
  }

  .service-card {
    min-height: 272px;
  }

  .service-card-primary {
    min-height: 222px;
    padding: 16px 17px 13px;
  }

  .service-card-copy {
    width: 66%;
    padding-top: 32px;
  }

  .service-card-copy h2 {
    font-size: 24px;
  }

  .service-card-copy > p:last-child {
    font-size: 10px;
  }

  .service-card-visual {
    top: 40px;
    right: 18px;
    width: 128px;
    height: 128px;
  }

  .service-card-meta dd {
    font-size: 9px;
  }

  .gallery-footer {
    min-height: 48px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  .edge-facts {
    gap: 0;
  }

  .edge-facts p:not(:first-child) {
    display: none;
  }

  .gallery-controls {
    gap: 7px;
  }

  .scan-action {
    width: 30px;
    padding: 0;
    justify-content: center;
    border-right: 0;
  }

  .scan-action span {
    display: none;
  }

  .pagination .icon-button {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .gallery-empty {
    min-height: 360px;
  }

  .command-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .command-shell {
    padding: 7px;
  }

  .command-result {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    min-height: 55px;
    padding: 7px 9px;
  }

  .command-result em {
    display: none;
  }

  .command-shell > footer {
    gap: 8px;
    justify-content: space-between;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 390px) {
  .filter-tabs {
    gap: 9px;
  }

  .filter-tabs button {
    font-size: 8px;
  }

  .active-service h1 {
    font-size: 36px;
  }

  .active-service h1[data-fit="long"] {
    font-size: 32px;
  }

  .active-service h1[data-fit="xlong"] {
    font-size: 28px;
  }

  .active-meta {
    max-width: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .brand:hover img,
  .brand:focus-visible img {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(17, 19, 18, 0.34);
    --line-soft: rgba(17, 19, 18, 0.22);
    --muted: #4f5552;
    --faint: #686e6b;
  }
}

@media (max-width: 1180px) {
  .system-scene-shell {
    right: 11%;
    left: 28%;
  }

  .system-chapter h1,
  .system-chapter h2 {
    font-size: 48px;
  }

  .system-chapter h1 em,
  .system-chapter h2 em {
    font-size: 55px;
  }

  .system-chapter .chapter-copy-right {
    width: 38%;
  }

  .note-right {
    right: 5%;
  }

  .protocol-list {
    width: 35%;
  }
}

@media (max-height: 700px) and (min-width: 721px) {
  .system-chapter h1,
  .system-chapter h2 {
    margin: 12px 0 14px;
    font-size: 42px;
  }

  .system-chapter h1 em,
  .system-chapter h2 em {
    font-size: 48px;
  }

  .system-chapter .chapter-copy > p:last-child,
  .chapter-lede {
    font-size: 11px;
  }

  .intro-coordinates {
    bottom: 5%;
  }

  .runtime-figures div {
    min-height: 86px;
  }
}

@media (max-width: 720px) {
  .home-signature {
    display: none;
  }

  .page-system .site-header {
    position: fixed;
  }

  .system-optical-backdrop {
    inset: -4%;
    opacity: 0.45;
  }

  .system-scene-shell {
    top: 7%;
    right: -18%;
    bottom: auto;
    left: -18%;
    height: 44svh;
    opacity: 0.9;
  }

  .system-chapter {
    min-height: 100svh;
  }

  .system-chapter .chapter-copy,
  .system-chapter .chapter-copy-right,
  .system-chapter .chapter-copy-lower {
    top: auto;
    right: 18px;
    bottom: 9%;
    left: 18px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .system-intro .chapter-copy {
    bottom: 18%;
  }

  .system-chapter h1,
  .system-chapter h2 {
    margin: 9px 0 12px;
    font-size: 34px;
    line-height: 1;
  }

  .system-chapter h1 em,
  .system-chapter h2 em {
    font-size: 39px;
  }

  .system-chapter .chapter-copy > p:last-child,
  .chapter-lede {
    max-width: 340px;
    font-size: 11px;
    line-height: 1.7;
  }

  .intro-coordinates {
    right: 18px;
    bottom: 5%;
    left: 18px;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 18px;
  }

  .intro-coordinates div:last-child {
    display: none;
  }

  .story-next,
  .story-rail {
    display: none;
  }

  .orbit-note {
    min-width: 120px;
    grid-template-columns: 22px auto;
    gap: 5px;
    padding: 6px 0;
  }

  .orbit-note svg {
    width: 18px;
    height: 18px;
  }

  .orbit-note span,
  .orbit-note strong {
    font-size: 7px;
  }

  .note-top {
    top: 14%;
    left: 18px;
  }

  .note-right {
    top: 26%;
    right: 18px;
  }

  .note-bottom {
    right: auto;
    bottom: auto;
    top: 40%;
    left: 34%;
  }

  .protocol-list {
    top: 14%;
    bottom: auto;
    left: 18px;
    width: 48%;
  }

  .protocol-list > div {
    grid-template-columns: 25px 1fr;
    min-height: 42px;
  }

  .protocol-list strong {
    font-size: 10px;
  }

  .protocol-list small {
    display: none;
  }

  .runtime-figures {
    top: 13%;
    right: 18px;
    grid-template-columns: repeat(2, 82px);
  }

  .runtime-figures div {
    min-height: 76px;
    padding: 10px;
  }

  .runtime-figures strong {
    font-size: 27px;
  }

  .runtime-figures span {
    font-size: 6px;
  }

  .outro-copy {
    width: calc(100vw - 36px);
  }

  .outro-copy h2 {
    font-size: 48px;
  }

  .outro-copy > p:not(.chapter-roman) {
    font-size: 11px;
  }

  .story-footer {
    right: 18px;
    left: 18px;
    font-size: 6px;
  }
}
