:root {
  --shop: #0e141c;
  --shop-2: #17202b;
  --pump: #3d7ad6;
  --pump-deep: #163a72;
  --steel: #c8d0d8;
  --bubble: #f4f7fb;
  --mute: #8b97a6;
  --warn: #e8a04a;
  --fail: #d4523a;
  --display: "Barlow Condensed", "Noto Sans SC", sans-serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  color: var(--bubble);
  background: var(--shop);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

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

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

.app-link {
  color: var(--pump);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

code {
  font-family: var(--mono);
  background: rgba(61, 122, 214, 0.18);
  padding: 0.05em 0.35em;
}

.steel-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.12;
  background-image: url("images/texture.webp");
  background-size: 260px auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 12px;
  top: 8px;
  z-index: 40;
  background: var(--pump);
  color: var(--bubble);
  padding: 6px 10px;
}

.bench-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(14, 20, 28, 0.92);
  border-bottom: 1px solid rgba(200, 208, 216, 0.2);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 22px;
}

.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0.14em;
}

.water-column {
  width: 14px;
  height: 32px;
  background: linear-gradient(180deg, var(--steel), var(--pump-deep));
  border-radius: 7px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(244, 247, 251, 0.35);
}

.cav-bubble {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bubble);
  left: 4px;
  top: 8px;
  box-shadow: 0 8px 0 0 var(--bubble);
}

.bench-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 14px;
}

.bench-nav a.is-active {
  color: var(--pump);
  box-shadow: inset 0 -2px 0 var(--pump);
}

.bench-nav .live {
  background: var(--pump);
  color: var(--shop);
  padding: 4px 10px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--pump);
  color: var(--shop);
  border: 0;
  width: 40px;
  height: 40px;
  font-family: var(--display);
  font-size: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: 88vh;
  position: relative;
  z-index: 2;
}

.hero figure {
  margin: 0;
  border-right: 1px solid rgba(200, 208, 216, 0.18);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 88vh;
}

.hero-copy {
  padding: 48px 40px 40px;
  background:
    linear-gradient(180deg, rgba(61, 122, 214, 0.16), transparent 42%),
    var(--shop);
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--pump);
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  margin: 0 0 16px;
}

.lead {
  margin: 0 0 18px;
  max-width: 44em;
  color: #d5dce4;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--pump);
  padding: 3px 8px;
  color: var(--steel);
}

.chip.warn {
  border-color: var(--warn);
  color: var(--warn);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
}

.btn-fill {
  background: var(--pump);
  color: var(--shop);
}

.btn-ghost {
  border: 1px solid var(--steel);
}

.skid {
  position: relative;
  z-index: 2;
  padding: 56px 40px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.skid-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.vlabel {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--pump);
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: max-content;
}

.skid-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  margin: 0 0 8px;
}

.three-col,
.value-grid,
.role-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

.three-col article,
.value-grid article,
.role-row article {
  background: var(--shop-2);
  padding: 18px 18px 8px;
  border-left: 4px solid var(--pump);
}

.three-col ul,
.rule-list {
  padding-left: 1.1em;
}

.column-read {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  background: var(--shop-2);
  border: 1px solid rgba(200, 208, 216, 0.16);
  padding: 18px;
}

.npsh-panel label {
  display: block;
  font-size: 13px;
  color: var(--mute);
  margin: 12px 0 6px;
}

.npsh-num {
  font-family: var(--mono);
  font-size: 40px;
  margin: 4px 0;
  color: var(--steel);
}

#npsha {
  width: 100%;
  accent-color: var(--pump);
}

.tri-state {
  font-family: var(--mono);
  font-size: 13px;
  margin: 0;
}

.tri-state.ok {
  color: #7dce9a;
}

.tri-state.warn {
  color: var(--warn);
}

.tri-state.late {
  color: var(--fail);
}

.qh-spine {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.qh-spine li {
  background: var(--shop);
  border: 1px solid rgba(200, 208, 216, 0.16);
  padding: 12px 10px;
  font-size: 13px;
  min-height: 120px;
}

.qh-spine li span {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--steel);
}

.qh-spine li small {
  display: block;
  margin-top: 8px;
  color: var(--mute);
}

.qh-spine li.is-now {
  outline: 2px solid var(--pump);
}

.qh-spine li.is-late {
  background: #2a1514;
  border-color: var(--fail);
}

.steel-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.steel-sheet th,
.steel-sheet td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(200, 208, 216, 0.14);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

.steel-sheet th {
  font-size: 12px;
  color: var(--mute);
}

.steel-sheet tr.duty td {
  color: var(--pump);
  background: rgba(61, 122, 214, 0.12);
}

.pond-table {
  overflow-x: auto;
  margin-bottom: 22px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.inset,
.pair figure {
  margin: 22px 0 0;
}

.inset img,
.pair img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border: 1px solid rgba(200, 208, 216, 0.16);
}

figcaption {
  font-size: 13px;
  color: var(--mute);
  margin-top: 8px;
}

.rule-list li {
  margin-bottom: 8px;
}

.vib-tremor {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--pump) 0 6px, transparent 6px 12px);
}

.seal-drip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--steel);
}

.bench-foot {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  padding: 28px 40px 48px;
  background: #080c12;
  color: var(--steel);
  border-top: 3px solid var(--pump-deep);
}

@media (max-width: 900px) {
  .hero,
  .skid-head,
  .three-col,
  .value-grid,
  .role-row,
  .column-read,
  .pair,
  .qh-spine {
    grid-template-columns: 1fr;
  }

  .hero img {
    min-height: 42vh;
  }

  .nav-toggle {
    display: block;
  }

  .bench-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--shop);
    padding: 12px 18px 18px;
    border-bottom: 1px solid var(--pump);
    flex-direction: column;
  }

  .bench-nav.open {
    display: flex;
  }

  .vlabel {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .skid,
  .hero-copy,
  .bench-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
}
