/* ==========================================================================
   Nitin Dabas — console
   World: refinery process-control panel. Steel ground, engraved plates,
   annunciator lamps that report real state, mimic flow lines.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-400_700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martianmono-400_700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --steel-900: #22262a;

  --line: #474d53;
  --line-soft: #383e43;

  --ink: #efede8;
  --ink-2: #c6cbcf;
  --ink-3: #aab0b5;
  --ink-4: #a3abb2;

  --amber: #e3a62f;
  --amber-ink: #f0b843;
  --green: #63c181;

  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-title: 1.0625rem;
  --gutter: clamp(18px, 4vw, 56px);
  --measure: 1320px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-color: #4a5055 #1b1e21;
}

::selection {
  background: rgba(227, 166, 47, 0.3);
  color: #f7f5f0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--steel-900);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(115% 75% at 50% -8%, #34393e 0%, #262a2e 42%, #1b1e21 100%);
}


h1,
h2,
h3,
p,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

p,
li {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 80;
  padding: 12px 18px;
  background: var(--amber);
  color: #1b1e21;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Shared shell ------------------------------------------------------------ */

.bar,
.face,
.band,
.closing,
.foot {
  width: min(var(--measure), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.face,
.band,
.closing {
  scroll-margin-top: 86px;
}

/* Micro type -------------------------------------------------------------- */

.label,
.tag,
.plate,
.bar__role,
.bar__loc,
.tile__meta,
.panel__state,
.panel__foot,
.log__when,
.foot,
.btn {
  font-family: "Martian Mono", ui-monospace, monospace;
}

.label {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.tag span {
  color: var(--amber);
}

/* Console header ---------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
  background: #1e2226;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -20px #000;
}

.bar__id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.plate {
  padding: 9px 14px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 -1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: linear-gradient(180deg, #41474c, #333940);
  border: 1px solid #4d545a;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.bar__role {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

.bar__nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.bar__nav a {
  padding: 9px 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}

.bar__nav a:hover {
  color: var(--ink);
  border-color: var(--line);
}

.bar__nav a[aria-current="true"] {
  color: var(--amber-ink);
  border-color: #6b5122;
  background: rgba(227, 166, 47, 0.07);
}

.bar__loc {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

/* Hero console face ------------------------------------------------------- */

.face {
  position: relative;
  isolation: isolate;
  padding-block: clamp(18px, 2vw, 26px) clamp(32px, 3.6vw, 48px);
}

.face__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(125% 135% at 50% 42%, #000 42%, transparent 100%);
  mask-image: radial-gradient(125% 135% at 50% 42%, #000 42%, transparent 100%);
}

.face__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: grayscale(1) brightness(0.45) contrast(1.05);
  opacity: 0.24;
}

.face__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 30, 33, 0.9) 0%, rgba(27, 30, 33, 0.52) 28%, rgba(27, 30, 33, 0.62) 62%, rgba(27, 30, 33, 0.96) 100%);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 14px 56px;
  align-items: end;
  margin-bottom: clamp(16px, 1.8vw, 24px);
}

.masthead h1 {
  max-width: 24ch;
  font-size: clamp(1.85rem, 3.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #f6f4ef;
  text-wrap: balance;
}

.masthead__sub {
  max-width: 42ch;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink-3);
}

.face__grid {
  perspective: 1700px;
  perspective-origin: 50% 26%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: stretch;
}

.station {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2vw, 26px);
  background: linear-gradient(180deg, #30353a 0%, #282d31 100%);
  border: 1px solid var(--line);
  border-top: 3px solid #565d64;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 22px 34px -26px #000;
}

/* Monitor: a camera feed mounted in the plate. */
.monitor {
  position: relative;
  margin: calc(-1 * clamp(18px, 2vw, 26px)) calc(-1 * clamp(18px, 2vw, 26px)) 16px;
  aspect-ratio: 3.2;
  overflow: hidden;
  background: #0f1214;
  border-bottom: 1px solid #101315;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.monitor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: grayscale(1) contrast(1.25) brightness(0.7);
}

.monitor::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 23, 26, 0.9) 0%, rgba(20, 23, 26, 0.08) 32%, rgba(20, 23, 26, 0.18) 58%, rgba(20, 23, 26, 0.94) 100%);
}

.monitor__cap {
  position: absolute;
  inset: auto 14px 11px 14px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: space-between;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.monitor--energy img {
  object-position: center 32%;
}

.monitor__tag {
  color: var(--amber-ink);
}

.monitor__note {
  color: #cfd4d8;
}

/* mounted-panel lip */
.station::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -6px;
  height: 6px;
  background: linear-gradient(180deg, #1d2023, #14171a);
  border: 1px solid #101315;
  border-top: 0;
}

.station__name {
  margin-top: 16px;
  font-size: clamp(1.85rem, 2.55vw, 2.42rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #f6f4ef;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 -1px 0 rgba(255, 255, 255, 0.04);
  text-wrap: balance;
}

.station__sub {
  margin-top: 10px;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.station__body {
  margin-top: 16px;
  max-width: 48ch;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink-2);
}

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

.facts::before {
  content: "";
  order: -1;
  flex-basis: 100%;
  height: 1px;
  margin-bottom: 18px;
  background: var(--line-soft);
}

.fact dt {
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.fact dd {
  margin-top: 7px;
}

.fact b {
  display: block;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  font-weight: 700;
  line-height: 1;
  color: #f6f4ef;
  font-variant-numeric: tabular-nums;
}

.fact b.fact--word {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--fs-title);
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 600;
  color: var(--amber-ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.state {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  background: linear-gradient(180deg, #202428 0%, #1a1e22 100%);
  border: 1px solid #3a4045;
  border-radius: 2px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.state .btn {
  margin-top: auto;
}

.state__value {
  margin-top: 8px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--ink);
}

.state__value--mono {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 -1px 0 rgba(255, 255, 255, 0.08);
  color: #f7f5f0;
  background: linear-gradient(180deg, #5e666d, #474e54);
  border: 1px solid #202428;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 2px 0 #14171a, 0 10px 20px -12px #000;
  transition: filter 160ms var(--ease), transform 120ms var(--ease), box-shadow 120ms var(--ease);
}

.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 3px 0 #14171a, 0 14px 24px -14px #000;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 1px 0 #14171a;
}

/* Rack bus ---------------------------------------------------------------- */

.rack {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  height: 56px;
  margin-top: 20px;
}

.rack__bus {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: #4a5055;
  transform-origin: left center;
  animation: bus-draw 900ms var(--ease) backwards;
}

.rack__bus::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #63c181 45%, #63c181 55%, transparent);
  animation: bus-travel 3.6s linear infinite;
}

.rack__cell {
  position: relative;
}

.rack__cell::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #4a5055;
}

.rack__cell::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #63c181;
  opacity: 0;
  animation: drop-pulse 2.8s linear infinite;
}

.rack__cell:nth-child(3)::before {
  animation-delay: 0.35s;
}

.rack__cell:nth-child(4)::before {
  animation-delay: 0.7s;
}

.rack__cell:nth-child(5)::before {
  animation-delay: 1.05s;
}

@keyframes bus-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes drop-pulse {
  0% {
    top: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes bus-travel {
  from {
    left: -60px;
  }
  to {
    left: 100%;
  }
}

@media (max-width: 1180px) {
  .rack {
    display: none;
  }
}

@media (min-width: 1181px) {
  .station::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -26px;
    width: 2px;
    height: 19px;
    margin-left: -1px;
    background: #4a5055;
  }
}

/* Annunciator tiles ------------------------------------------------------- */

.annunciators {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: linear-gradient(180deg, #1e2226, #1a1e22);
  border: 1px solid #3a4045;
  border-radius: 2px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.lamp {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #6a7177;
  color: #6a7177;
  box-shadow: 0 0 0 1px #1b1e21 inset;
  position: relative;
}

.lamp::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 68%);
  opacity: 0.36;
  pointer-events: none;
}

.tile[data-state="live"] .lamp,
.panel .lamp[data-state="live"] {
  background: var(--green);
  color: var(--green);
  box-shadow: 0 0 0 1px #1b1e21 inset;
}

.tile[data-state="maintained"] .lamp,
.panel .lamp[data-state="maintained"] {
  background: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 1px #1b1e21 inset;
}

.tile__name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
}

.tile__meta {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* Bands ------------------------------------------------------------------- */

.band {
  padding-top: clamp(56px, 7vw, 104px);
  padding-bottom: clamp(44px, 4.5vw, 68px);
  border-top: 1px solid var(--line-soft);
}

/* The one mounted plate in the console: credentials are paper. */
.band--paper {
  width: 100%;
  margin-inline: 0;
  padding-block: clamp(44px, 5vw, 84px);
  background: transparent;
  border-top: 1px solid var(--line-soft);
}

.record {
  position: relative;
  width: min(var(--measure), 100% - (var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(26px, 3.6vw, 52px);
  background: #ece8df;
  border: 1px solid #c4bcab;
  border-top: 3px solid #dcd5c6;
  box-shadow: 0 1px 0 #fbf8f1 inset, 0 30px 60px -42px #000;
  color: #17191c;
}

.record__perf {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -4.5px;
  height: 9px;
  pointer-events: none;
  background-image: radial-gradient(circle at 4.5px 4.5px, #22262a 4.3px, transparent 4.6px);
  background-size: 15px 9px;
  background-repeat: repeat-x;
}

.band--paper .band__head h2 {
  color: #14161a;
}

.band--paper .label {
  color: #5f6266;
}

.band--paper .ledger__col li {
  color: #2b2e32;
}

.band--paper .ledger__col ul:not(.chips) li::before {
  background: #b7b0a1;
}

.band--paper .chips li {
  border-color: #ccc5b5;
  color: #2b2e32;
  background: #f5f2eb;
}

.band__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 20px 56px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.band__head .tag {
  grid-column: 1 / -1;
}

.band__head h2 {
  max-width: 24ch;
  font-size: clamp(1.85rem, 3.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f4f2ed;
  text-wrap: balance;
}

.band__lede {
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 46ch;
}

/* Integration schematic ---------------------------------------------------- */

.schematic {
  margin: 0 0 clamp(26px, 3vw, 42px);
}

.schematic svg {
  width: 100%;
  height: auto;
}

.sch__wire path {
  fill: none;
  stroke: #4a5055;
  stroke-width: 2;
}

.sch__plate rect {
  fill: #1e2226;
  stroke: #3a4045;
}

.sch__lamp--live {
  fill: #63c181;
}

.sch__lamp--held {
  fill: #e3a62f;
}

.sch__label text {
  fill: #c6cbcf;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.sch__core {
  fill: #24282c;
  stroke: #4a5055;
}

.sch__core-title {
  fill: #f0b843;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.14em;
}

.sch__core-sub {
  fill: #8d949a;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.sch__out {
  fill: #f6f4ef;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sch__out-label {
  fill: #8d949a;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
}

@media (max-width: 1180px) {
  .schematic {
    display: none;
  }
}

.schematic-m {
  display: none;
}

@media (max-width: 1180px) {
  .schematic-m {
    display: block;
    position: relative;
    margin: 0 0 clamp(24px, 3vw, 36px);
    padding-left: 20px;
  }

  .schematic-m::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: var(--line);
  }

  .schematic-m__sources {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
  }

  .schematic-m__sources li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-family: "Martian Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ink-2);
  }

  .schematic-m__sources li::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    width: 9px;
    height: 1px;
    background: var(--line-soft);
  }

  .schematic-m__sources .lamp {
    width: 9px;
    height: 9px;
  }

  .schematic-m__sources li[data-state="live"] .lamp {
    background: var(--green);
    color: var(--green);
    box-shadow: 0 0 0 1px #1b1e21 inset;
  }

  .schematic-m__sources li[data-state="maintained"] .lamp {
    background: var(--amber);
    color: var(--amber);
    box-shadow: 0 0 0 1px #1b1e21 inset;
  }

  .schematic-m__core {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--line);
    background: #24282c;
    font-family: "Martian Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber-ink);
  }

  .schematic-m__out {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: #1e2226;
    font-family: "Martian Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
  }

  .schematic-m__out b {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: #f6f4ef;
  }
}

/* Integration panels ------------------------------------------------------ */

.panels {
  perspective: 1700px;
  perspective-origin: 50% 40%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  min-height: 268px;
  background: linear-gradient(180deg, #1e2226, #1a1e22);
  border: 1px solid #3a4045;
  border-radius: 2px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.panel__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.panel__top .lamp {
  margin-top: 6px;
}

.panel__top h3 {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.panel .panel__state {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.panel p {
  font-size: var(--fs-sm);
  line-height: 1.62;
  color: var(--ink-3);
}

.panel__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8d949a;
}

/* Delivery log ------------------------------------------------------------ */

.log {
  position: relative;
  padding-left: 30px;
  border-top: 1px solid var(--line);
}

.log::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.log__row {
  position: relative;
  display: grid;
  grid-template-columns: 168px 200px minmax(0, 1fr);
  gap: 16px 34px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.log__row::before {
  content: "";
  position: absolute;
  left: -34.5px;
  top: 25px;
  width: 9px;
  height: 9px;
  background: var(--steel-900);
  border: 1px solid var(--line);
}

.log__row::after {
  content: "";
  position: absolute;
  left: -26px;
  top: 29px;
  width: 26px;
  height: 1px;
  background: var(--line-soft);
}

.log__when {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-ink);
  padding-top: 4px;
}

.log__where {
  font-size: var(--fs-title);
  font-weight: 600;
  color: var(--ink);
}

.log__what {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 72ch;
}

/* Ledger ------------------------------------------------------------------ */

.ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 48px;
}

.ledger__col h3 {
  margin-bottom: 16px;
}

.ledger__col h3.label--spaced {
  margin-top: 30px;
}

.ledger__col ul:not(.chips) {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ledger__col li {
  position: relative;
  padding-left: 18px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink-2);
}

.ledger__col ul:not(.chips) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background: var(--line);
}

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

.chips li {
  padding: 7px 11px;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);
}

/* Closing ----------------------------------------------------------------- */

.closing {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px 64px;
  align-items: end;
  padding-block: clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--line-soft);
}

.closing__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.closing__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: grayscale(1) brightness(0.55) contrast(1.12);
  opacity: 0.72;
}

.closing__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27, 30, 33, 0.5) 0%, rgba(27, 30, 33, 0.74) 52%, rgba(27, 30, 33, 0.94) 100%);
}

.closing .label {
  grid-column: 1 / -1;
}

.closing h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #f6f4ef;
  max-width: 16ch;
  text-wrap: balance;
}

.closing__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 44ch;
}

.closing .btn {
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
  min-width: 250px;
}

/* Footer ------------------------------------------------------------------ */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 26px 40px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.foot__credit {
  flex-basis: 100%;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #8d949a;
}

/* Entrance ---------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .station,
  .state,
  .mimic,
  .annunciators {
    animation: rise 700ms var(--ease) backwards;
  }

  .station:nth-child(1) {
    animation-delay: 40ms;
  }

  .station:nth-child(2) {
    animation-delay: 110ms;
  }

  .state {
    animation-delay: 180ms;
  }

  .mimic {
    animation-delay: 240ms;
  }

  .annunciators {
    animation-delay: 300ms;
  }

  .tile .lamp {
    animation: lamp-in 620ms var(--ease) backwards;
  }

  .tile:nth-child(1) .lamp {
    animation-delay: 380ms;
  }

  .tile:nth-child(2) .lamp {
    animation-delay: 470ms;
  }

  .tile:nth-child(3) .lamp {
    animation-delay: 560ms;
  }

  .tile:nth-child(4) .lamp {
    animation-delay: 650ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lamp-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  55% {
    opacity: 1;
    transform: scale(1.18);
  }
  72% {
    opacity: 0.45;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

  .rack__bus::after {
    display: none;
  }

  .mimic__flow {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Pointer physicality ------------------------------------------------------ */

[data-plate],
[data-sheen] {
  position: relative;
  isolation: isolate;
}

.sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--sheen-r, 240px) circle at var(--sx, 50%) var(--sy, 0%),
    rgba(255, 255, 255, var(--sheen-a, 0.1)),
    rgba(227, 166, 47, var(--sheen-b, 0.05)) 42%,
    transparent 72%
  );
  transition: opacity 300ms var(--ease);
}

[data-tilt="on"] .sheen {
  opacity: 1;
}

/* Boards tilt. */
[data-tilt="on"] [data-plate] {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 220ms var(--ease);
}

[data-tilt="on"] .station .station__name {
  transform: translateZ(11px);
}

[data-tilt="on"] .station .facts {
  transform: translateZ(7px);
}

/* Cards only catch the light, and the pool scales to their size. */
.panel .sheen {
  --sheen-r: 220px;
  --sheen-a: 0.08;
  --sheen-b: 0.04;
}

.tile .sheen {
  --sheen-r: 130px;
  --sheen-a: 0.09;
  --sheen-b: 0.045;
}

.schematic .sheen {
  --sheen-r: 420px;
  --sheen-a: 0.05;
  --sheen-b: 0.025;
}

.closing .sheen {
  --sheen-r: 520px;
  --sheen-a: 0.07;
  --sheen-b: 0.03;
}

.bar__time {
  color: var(--ink-3);
}

/* Cursor: a plotting-table pointer ----------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  html[data-cursor="on"],
  html[data-cursor="on"] * {
    cursor: none;
  }
}

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9));
  transition: opacity 200ms var(--ease);
  will-change: transform;
}

html[data-cursor="on"] .cursor {
  opacity: 1;
}

/* the hotspot: exact, always visible */
.cursor__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  left: -2.5px;
  top: -2.5px;
  background: var(--amber-ink);
  transition: transform 160ms var(--ease);
}

/* the selection box: only appears over something operable */
.cursor__box {
  position: absolute;
  width: 24px;
  height: 24px;
  left: -12px;
  top: -12px;
  border: 1px solid rgba(240, 184, 67, 0.85);
  opacity: 0;
  transform: scale(0.45);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.cursor.is-target .cursor__box {
  opacity: 1;
  transform: scale(1);
}

.cursor.is-press .cursor__dot {
  transform: scale(0.55);
}

.cursor.is-press .cursor__box {
  transform: scale(0.88);
}

/* Anyone asking for more contrast keeps their own cursor. */
@media (prefers-contrast: more) {
  html[data-cursor="on"],
  html[data-cursor="on"] * {
    cursor: auto;
  }

  html[data-cursor="on"] .cursor {
    display: none;
  }
}

@keyframes monitor-on {
  from {
    opacity: 0;
    filter: grayscale(1) contrast(1.25) brightness(0);
  }
  to {
    opacity: 1;
    filter: grayscale(1) contrast(1.25) brightness(0.7);
  }
}

[data-boot="first"] .monitor img {
  animation: monitor-on 900ms var(--ease) 200ms backwards;
}

[data-boot="first"] .station:nth-child(2) .monitor img {
  animation-delay: 340ms;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1180px) {
  .face__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .state {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 26px;
    align-items: start;
  }

  .state .btn {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: 4px;
  }

  .panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .bar {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 12px;
  }

  .bar__nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .face,
  .band,
  .closing {
    scroll-margin-top: 132px;
  }

  .bar__loc {
    display: none;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .masthead h1 {
    max-width: 28ch;
  }

  .band__head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .log__row {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .log__what {
    grid-column: 2;
  }

  .ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closing {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .closing .btn {
    grid-column: 1;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .bar {
    position: static;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 12px;
  }

  .bar__id {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .face__bg::after {
    background: linear-gradient(180deg, rgba(27, 30, 33, 0.97) 0%, rgba(27, 30, 33, 0.88) 45%, rgba(27, 30, 33, 0.95) 100%);
  }

  .monitor {
    aspect-ratio: 2.4;
  }

  .monitor__note {
    display: none;
  }

  .bar__nav {
    order: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    margin-left: 0;
  }

  .bar__nav::-webkit-scrollbar {
    display: none;
  }

  .state {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .state .btn {
    justify-self: stretch;
    margin-top: 4px;
  }

  .bar__nav a {
    padding: 8px 10px;
    font-size: 11px;
  }

  .face__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .annunciators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }


  .face,
  .band,
  .closing {
    scroll-margin-top: 20px;
  }

  .tile {
    padding: 13px 14px;
    gap: 11px;
  }

  .panels,
  .ledger {
    grid-template-columns: minmax(0, 1fr);
  }

  .log__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .log__what {
    grid-column: 1;
  }

  .closing h2 {
    max-width: none;
  }

  .closing .btn {
    width: 100%;
    min-width: 0;
  }

  .foot {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .annunciators {
    grid-template-columns: minmax(0, 1fr);
  }


  .facts {
    gap: 12px 24px;
  }
}
