:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --border: #e9ebef;
  --text: #15171c;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --accent: #e11d48;
  --ok: #16a34a;
  --blue: #2563eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ---------------------------------------------------------------- hero */

.hero {
  padding: 68px 0 4px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: .02em;
  color: var(--faint);
}

h1 {
  margin: 0;
  font-size: clamp(29px, 5.1vw, 47px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 20ch;
}

.lede {
  margin: 18px 0 0;
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}

/* Right side of the hero. The number is the only thing up here that moves,
   so it takes the weight and everything else stays quiet under it. */
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 18px 44px;
  align-items: start;
}

.here {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding-top: 8px;
}

.here .label { white-space: nowrap; }

.here-now {
  margin: 4px 0 2px;
  font-size: clamp(44px, 6.6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The record that sits under the live count. A hairline separates it from the
   number above, and the digits in it carry the weight of the line. */
.here-record {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.here .sub { font-size: 13.5px; }

.peak {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.peak b,
.sub b {
  font-weight: 650;
  color: var(--text);
}

.peak b {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.dot.ok { background: var(--ok); }
.dot.bad { background: var(--accent); }

/* ---------------------------------------------------------------- sections */

main > section {
  margin-top: 64px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.fresh {
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fresh.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-weight: 600;
  /* sits with the heading rather than at the far edge */
  margin-right: auto;
  margin-left: -7px;
}

.fresh.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22, 163, 74, .35); }
  50% { opacity: .65; box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .fresh.live i { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.headline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.headline.thirds {
  grid-template-columns: repeat(3, 1fr);
}

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

.stat {
  padding: 17px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat .bar {
  margin: 7px 0 0;
}

.label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.value {
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 660;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.value-sm {
  font-size: 15px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.sub {
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart {
  padding: 17px 18px 14px;
}

.spark {
  display: block;
  width: 100%;
  height: 64px;
}

.legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--faint);
}

.key::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 3px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

.key.down::before { background: var(--blue); }
.key.up::before { background: var(--ok); }

.meter {
  padding: 17px 18px 16px;
}

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

.bar {
  height: 7px;
  border-radius: 4px;
  background: #eef0f4;
  overflow: hidden;
  margin-bottom: 9px;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--blue);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

.mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* two headline stats share the top of the card */
.avail-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2px 28px;
  margin-bottom: 14px;
}

.avail-stats .sub { margin: 3px 0 0; }

.mini-card {
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ---------------------------------------------------------------- services */

.services-card {
  padding: 2px 18px;
}

.services {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.service:last-child { border-bottom: none; }

.service .ic {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.service .name {
  flex: 1;
  font-weight: 520;
}

.service .when {
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.avail {
  margin-top: 12px;
  padding: 17px 18px 15px;
}

.avail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.avail-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
}

.avail-value b {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.avail-value span {
  font-size: 13px;
  color: var(--faint);
}

.days-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--faint);
}

.days-axis span { white-space: nowrap; }

.avail .sub {
  margin: 9px 0 0;
}

.days {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
}

.day {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 3px;
  background: #f1f3f6;
  overflow: hidden;
}

.day i {
  display: block;
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--ok);
  opacity: .85;
  transition: height .4s ease;
}

.hits-bars .day i { background: var(--blue); }
.day.empty {
  background: #fafbfd;
  box-shadow: none;
}

/* ---------------------------------------------------------------- speed */

.speed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 20px;
  padding: 20px 22px;
}

.speed-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.speed-item b {
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 680;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.speed-item small {
  font-size: 13px;
  color: var(--muted);
}

.speed-meta {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 13px;
  color: var(--faint);
}

.speed-warn {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--accent);
}

.note {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--faint);
  max-width: 68ch;
}

/* ---------------------------------------------------------------- specs */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.spec {
  margin: 0;
  padding: 8px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.spec > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.spec > div:nth-last-child(-n+2) { border-bottom: none; }

.spec dt {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Icons inherit the colour around them, so they stay as quiet as the text
   they sit beside. Stroke values match the 24px grid of the source shapes. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* label-level icons: one size and colour, whether they sit in a flex row
   (the spec grid) or inline in front of a label's text */
.label .ic,
.spec .ic,
.speed-item small .ic {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.label .ic,
.speed-item small .ic {
  vertical-align: -2px;
  margin-right: 6px;
}

.spec dd {
  margin: 3px 0 0;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.stack {
  list-style: none;
  margin: 0;
  padding: 8px 18px;
}

.stack li {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--muted);
}

.stack li:last-child { border-bottom: none; }
.stack b { color: var(--text); font-weight: 620; }

/* ---------------------------------------------------------------- photos */

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.shots figure { margin: 0; }

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}

.shot:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 24, 40, .07), 0 10px 24px rgba(16, 24, 40, .06);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.shots figcaption {
  margin-top: 9px;
  font-size: 13px;
  color: var(--faint);
}

/* ---------------------------------------------------------------- lightbox */

dialog#lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  overflow: visible;
}

dialog#lightbox::backdrop {
  background: rgba(12, 14, 18, .78);
  backdrop-filter: blur(2px);
}

dialog#lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 84vh;
  margin: 0 auto;
  border-radius: 12px;
  background: #fff;
}

dialog#lightbox p {
  margin: 12px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* ---------------------------------------------------------------- footer */

footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0;
  font-size: 13.5px;
  color: var(--faint);
}

footer .credit { margin-top: 8px; }

footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: #cdd2da;
  text-underline-offset: 2px;
}

footer a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------- misc */

.muted { color: var(--faint); }

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

.shot:focus-visible { outline-offset: 3px; }

@media (max-width: 860px) {
  .headline { grid-template-columns: repeat(2, 1fr); }
  .headline.thirds { grid-template-columns: repeat(3, 1fr); }
  .hero-body { gap: 18px 30px; }
  .split { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 16px 48px; }
  .hero { padding-top: 44px; }
  .hero-body { grid-template-columns: 1fr; gap: 20px; }
  .here { align-items: flex-start; text-align: left; padding-top: 0; }
  .here-now { font-size: clamp(40px, 13vw, 54px); margin-top: 2px; }
  .here-record { align-items: flex-start; }
  .hero-top { align-items: center; gap: 10px; }
  .eyebrow { font-size: 12px; }
  .status { font-size: 12px; padding: 5px 10px; gap: 6px; }
  .dot { width: 6px; height: 6px; }
  main > section { margin-top: 48px; }
  .headline, .headline.thirds { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 15px; }
  .speed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: 1fr; }
  .spec > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .spec > div:last-child { border-bottom: none; }
  .shots { gap: 10px; }
  .shot img { aspect-ratio: 4 / 3; }
  .lightbox-close { top: -8px; right: -8px; }
}
