@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,600&family=Public+Sans:wght@400;500;600;700&display=swap");

:root {
  --paper: #fff3f8;
  --sheet: #ffffff;
  --ink: #1a1028;
  --muted: #5c4568;
  --line: #ffd0e4;
  --brick: #ff1b6d;
  --brick-deep: #d1005c;
  --g5: #ff2d87;
  --g4: #1d4dff;
  --g3: #ff9f0a;
  --g2: #8b4dff;
  --wire: #00c2b2;
  --focus: #ff1b6d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% -120px, #ffd0e6 0%, transparent 70%),
    radial-gradient(700px 360px at 100% 0, #d7e2ff 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: "Public Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

[hidden] { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 0;
  box-shadow: inset 0 -4px 0 #ff2d87;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar .mark {
  margin: 0;
  font-size: 18px;
}

.top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-links button,
#menu-btn,
.view-switch button,
.menu button,
.menu a,
.site-foot button {
  font: inherit;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  text-decoration: none;
}

.lang {
  color: var(--muted);
  font-size: 14px;
  padding-right: 8px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 18px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.menu a { color: var(--brick); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  min-height: 100vh;
}

.test-head {
  text-align: center;
}

.test-head h1 {
  max-width: none;
  margin: 8px auto 0;
  background: linear-gradient(100deg, #ff1b6d 0%, #1d4dff 72%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.view-switch button[aria-pressed="true"] {
  color: var(--brick);
  font-weight: 650;
}

.mark {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.01em;
  font-weight: 650;
  color: var(--brick);
}

h1 {
  margin: 0;
  max-width: 22ch;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 550;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--muted);
}

.banner {
  margin: 22px 0 0;
  padding: 10px 12px;
  background: var(--sheet);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  align-items: flex-end;
  margin-top: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
}

.field select,
.field input,
.mode button,
.chips button {
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 0;
}

.field select,
.field input {
  font-weight: 500;
  font-size: 16px;
  padding: 8px 10px;
}

.money {
  display: flex;
}

.money select {
  border-right: 0;
  width: 64px;
}

.money input {
  width: 110px;
}

.mode {
  display: flex;
  margin-left: auto;
}

.mode button,
.chips button {
  padding: 9px 14px;
  cursor: pointer;
}

.mode button[aria-pressed="true"],
.chips button[aria-pressed="true"] {
  background: var(--brick);
  color: #fff;
  border-color: var(--brick);
}

.radio-panel[hidden] { display: none; }

.radio-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.radio-panel h2,
.section-head h2,
.pulse h2,
.pulse h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quiet,
.note,
.status,
.reading {
  color: var(--muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.session {
  grid-column: 1 / -1;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.hero {
  margin-top: 28px;
  padding-top: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--brick);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.figure {
  margin: 4px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 550;
  font-size: clamp(44px, 12vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brick);
}

.sub,
.split {
  margin: 10px 0 0;
  max-width: 68ch;
}

.split { font-weight: 650; }

.ribbon-wrap { margin-top: 18px; }

.ribbon {
  display: flex;
  width: 100%;
  height: 22px;
  background: #ffe4f1;
  border-radius: 999px;
  overflow: hidden;
}

.ribbon span { display: block; height: 100%; }

.g-5g { background: var(--g5); }
.g-4g { background: var(--g4); }
.g-3g { background: var(--g3); }
.g-2g { background: var(--g2); }
.g-wire { background: var(--wire); }

.totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.totals div {
  padding-top: 8px;
  border-top: 2px solid var(--line);
}

.totals div.is-plan { border-top-width: 4px; }
.totals .gen-5g { border-top-color: var(--g5); }
.totals .gen-5g dd { color: var(--brick-deep); }
.totals .gen-4g { border-top-color: var(--g4); }
.totals .gen-4g dd { color: #1239c7; }
.totals .gen-3g { border-top-color: var(--g3); }
.totals .gen-3g dd { color: #c46a00; }
.totals .gen-2g { border-top-color: var(--g2); }
.totals .gen-2g dd { color: #6a2fd4; }

.totals dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.totals dd {
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 18px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  margin-top: 36px;
  align-items: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.legend span { display: inline-flex; align-items: center; gap: 6px; }

.swatch {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 3px;
}

.day {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.day-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.day-top strong { font-weight: 650; }

.day-5g {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.day-5g em,
.day-5g small {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick);
  font-weight: 650;
}

.day-5g small {
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.day-5g b {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 550;
  font-size: 28px;
  color: var(--brick-deep);
}

.day-rest {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.day .ribbon { height: 14px; }

.gens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.gens span {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.gens em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gens .zero { color: #8a837b; }

.empty {
  padding: 18px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.pulse {
  position: static;
  padding-top: 2px;
}

.server {
  margin: 18px auto 0;
  text-align: center;
}

.server-name {
  margin: 0;
  font-weight: 650;
  font-size: 18px;
}

.server-ip,
.server-place,
.connections {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#again-btn {
  margin-top: 10px;
  font: inherit;
  background: transparent;
  border: 0;
  color: var(--brick);
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.site-foot h2 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-foot p,
.site-foot button {
  display: block;
  margin: 0 0 6px;
  padding-left: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.stage {
  margin-top: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 0 0;
  text-align: center;
}

.dial {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 12px auto 0;
}

.gauge { width: 100%; height: 100%; display: block; }

.gauge-track,
#gauge-value {
  fill: none;
  stroke-width: 11;
}

.gauge-track { stroke: #ffd6ea; }

#gauge-value {
  stroke: var(--g4);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
}

#pulse-btn.go {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 150px;
  height: 150px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--g5);
  color: #fff;
  font-size: 44px;
  font-weight: 650;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 45, 135, 0.38);
}

#pulse-btn.go:hover,
#pulse-btn.go:focus-visible { background: var(--brick-deep); color: #fff; }

#pulse-btn.go:disabled { cursor: progress; background: #ff8ab8; color: #fff; box-shadow: none; }

.readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.live {
  margin: 0;
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.live-unit {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9aa3b2;
}

.phase {
  margin: 8px 0 0;
  min-height: 1.2em;
  color: #9aa3b2;
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.metrics button {
  background: transparent;
  border: 0;
  border-top: 2px solid var(--line);
  color: var(--muted);
  padding: 8px 2px 4px;
  cursor: pointer;
  font: inherit;
}

.metrics button span,
.metrics button em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics button strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.metrics button.is-hot { color: var(--g4); border-top-color: var(--g4); }
.metrics button.is-hot[data-metric="up"] { color: var(--g5); border-top-color: var(--g5); }
.metrics button.is-hot[data-metric="ping"] { color: var(--ink); border-top-color: var(--ink); }

.more {
  margin-top: 10px;
  background: none;
  border: 0;
  color: var(--brick);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.stage .pulse-grid {
  text-align: left;
  margin-top: 12px;
}

.stage .pulse-grid dt { color: var(--muted); }
.stage .pulse-grid dd { color: var(--ink); }
.stage .reading { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.pulse-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 14px 0 0;
  font-variant-numeric: tabular-nums;
}

.pulse-grid dt { color: var(--muted); }
.pulse-grid dd { margin: 0; font-weight: 650; text-align: right; }

.history {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.history li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.history li span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.story {
  max-width: 66ch;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.story h2 {
  margin: 0 0 12px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.02em;
  text-transform: none;
}

.story p {
  margin: 0 0 12px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 12px 14px; }
  .top-links { width: 100%; margin-left: 0; }
  .page { padding: 22px 16px 56px; }
  h1 { font-size: 32px; }
  .figure { font-size: 56px; }
  .dial { width: 240px; height: 240px; }
  .mode { margin-left: 0; }
  .radio-panel { grid-template-columns: 1fr; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-5g b { font-size: 22px; }
  .site-foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
