:root {
  --shell: #e9eef3;
  --paper: #f9fbfc;
  --ink: #172433;
  --muted: #657586;
  --rule: #becbd6;
  --blueprint: #285c8f;
  --copper: #c66b32;
  --healthy: #347a5e;
  --fault: #ad413d;
  --shadow: rgba(23, 36, 51, 0.12);
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--shell); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(40, 92, 143, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 92, 143, 0.055) 1px, transparent 1px),
    var(--shell);
  background-size: 24px 24px;
  font-family: var(--body);
  line-height: 1.5;
}

button, a { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: .65rem 1rem;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.site-header, main, footer {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: .16em;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 6px;
  border: 2px solid var(--blueprint);
}

.brand-mark i { height: 2px; background: var(--copper); }
.brand-mark i:nth-child(2) { width: 72%; }
.brand-mark i:nth-child(3) { width: 42%; }

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--utility);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.privacy-note span { color: var(--healthy); }

main { padding-block: clamp(2rem, 5vw, 4.75rem) 3rem; }

.status-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  min-height: 400px;
}

.eyebrow, .instrument-label {
  margin: 0 0 .75rem;
  color: var(--blueprint);
  font-family: var(--utility);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.status-heading {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.state-lamp {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: .9rem;
  border: 3px solid var(--shell);
  outline: 1px solid var(--muted);
  border-radius: 50%;
  background: var(--muted);
}

.state-lamp[data-tone="healthy"] { background: var(--healthy); outline-color: var(--healthy); }
.state-lamp[data-tone="active"] { background: var(--copper); outline-color: var(--copper); }
.state-lamp[data-tone="fault"] { background: var(--fault); outline-color: var(--fault); }

h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .88;
  text-wrap: balance;
}

.state-detail {
  max-width: 600px;
  margin: 1.6rem 0 0 2.1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.layer-gauge {
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  padding: 50px 34px 25px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 14px 14px 0 rgba(40, 92, 143, .09);
}

.gauge-nozzle {
  position: absolute;
  top: 17px;
  left: 28%;
  width: 44%;
  height: 23px;
  border-top: 7px solid var(--ink);
}

.gauge-nozzle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 30px;
  height: 21px;
  background: var(--ink);
  transform: translateX(-50%);
}

.gauge-nozzle span {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 12px solid var(--copper);
  transform: translateX(-50%);
}

.gauge-bed {
  position: relative;
  height: 180px;
  border-bottom: 7px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(40, 92, 143, .13) 50%, transparent 50.5%),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(40, 92, 143, .12) 17px 18px);
  overflow: hidden;
}

.gauge-build {
  position: absolute;
  inset: auto 12% 0;
  height: 0%;
  min-height: 0;
  opacity: .35;
  background: repeating-linear-gradient(0deg, var(--copper) 0 4px, #e5a06f 4px 7px);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  transition: height 600ms cubic-bezier(.2, .75, .3, 1), opacity 300ms ease;
}

.gauge-build.has-progress { min-height: 3px; opacity: .95; }

.gauge-reading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 18px;
}

.gauge-reading strong {
  font-family: var(--display);
  font-size: 2.7rem;
  line-height: 1;
}

.gauge-reading span {
  color: var(--muted);
  font-family: var(--utility);
  font-size: .7rem;
  text-align: right;
  text-transform: uppercase;
}

.instrument-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--rule);
  background: rgba(249, 251, 252, .78);
  box-shadow: 0 14px 35px var(--shadow);
}

.instrument {
  min-height: 164px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.6rem;
}

.instrument + .instrument { border-left: 1px solid var(--rule); }
.instrument-label { margin-bottom: .4rem; }
.instrument h2 { margin: 0; font-family: var(--display); font-size: 1.8rem; line-height: 1.1; }
.instrument p:last-child { margin: .55rem 0 0; color: var(--muted); font-size: .86rem; }

.instrument-icon {
  position: relative;
  width: 48px;
  height: 48px;
  color: var(--blueprint);
}

.camera-icon { border: 2px solid currentColor; }
.camera-icon::before { content: ""; position: absolute; width: 13px; height: 13px; inset: 50% auto auto 50%; border: 2px solid currentColor; border-radius: 50%; transform: translate(-50%, -50%); }
.camera-icon span { position: absolute; width: 12px; height: 4px; top: 7px; right: 7px; background: currentColor; }

.signal-icon { display: flex; align-items: end; justify-content: center; gap: 4px; border-bottom: 2px solid currentColor; padding: 8px; }
.signal-icon i { width: 6px; background: currentColor; }
.signal-icon i:nth-child(1) { height: 10px; }
.signal-icon i:nth-child(2) { height: 20px; }
.signal-icon i:nth-child(3) { height: 30px; }

.clock-icon { border: 2px solid currentColor; border-radius: 50%; }
.clock-icon::before, .clock-icon span { content: ""; position: absolute; left: 22px; top: 10px; width: 2px; height: 14px; background: currentColor; transform-origin: bottom; }
.clock-icon span { transform: rotate(120deg); }

.boundary {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: end;
  margin-top: 2.3rem;
  padding: 2.3rem 0;
  border-block: 1px solid var(--rule);
}

.boundary h2 { max-width: 640px; margin: 0; font-family: var(--display); font-size: clamp(1.9rem, 3.5vw, 3.2rem); line-height: 1; letter-spacing: -.03em; }
.boundary > p { margin: 0; color: var(--muted); }

footer {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .84rem;
}

footer button {
  padding: .65rem .9rem;
  color: var(--blueprint);
  background: transparent;
  border: 1px solid var(--blueprint);
  cursor: pointer;
}

footer button:hover { color: white; background: var(--blueprint); }
footer button:focus-visible, .skip-link:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
footer button:disabled { cursor: wait; opacity: .6; }

@media (max-width: 820px) {
  .status-stage { grid-template-columns: 1fr; min-height: auto; }
  .layer-gauge { width: 100%; justify-self: stretch; }
  .instrument-grid { grid-template-columns: 1fr; }
  .instrument + .instrument { border-left: 0; border-top: 1px solid var(--rule); }
  .boundary { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 24px, 1160px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 1.2rem; }
  main { padding-top: 2.2rem; }
  .status-heading { gap: .7rem; }
  .state-lamp { width: 12px; height: 12px; margin-top: .5rem; }
  .state-detail { margin-left: 0; }
  .layer-gauge { padding-inline: 20px; box-shadow: 7px 7px 0 rgba(40, 92, 143, .09); }
  .instrument { grid-template-columns: 44px 1fr; padding: 1.25rem; }
  .instrument-icon { width: 40px; height: 40px; transform: scale(.84); transform-origin: top left; }
  footer { align-items: flex-start; flex-direction: column; padding-block: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

