:root {
  --ink: #17211b;
  --paper: #f4f1e8;
  --lime: #c9ff4a;
  --coral: #ff6b4a;
  --mint: #72e6a5;
  --muted: #6a716c;
  --line: rgba(23, 33, 27, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 255, 74, 0.35), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

.landing-shell,
.stat-shell {
  min-height: 100vh;
}

.landing-shell {
  display: grid;
  padding: clamp(18px, 4vw, 52px);
  overflow: hidden;
  position: relative;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(23, 33, 27, 0.08) 0,
      rgba(23, 33, 27, 0.08) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: multiply;
}

.landing-card {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - clamp(36px, 8vw, 104px)));
  margin: auto;
  padding: clamp(24px, 5vw, 68px);
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: rgba(244, 241, 232, 0.86);
  box-shadow: 14px 14px 0 var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
}

.topline,
.stat-header,
.landing-footer,
.actions,
.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.wordmark span {
  display: inline-grid;
  place-items: center;
  width: 1.55em;
  height: 1.55em;
  margin-left: 0.1em;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
}

.node-state,
.auto-refresh {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.node-state i,
.status-pill i {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: #1ea85a;
  box-shadow: 0 0 0 5px rgba(30, 168, 90, 0.12);
}

.hero {
  width: min(920px, 100%);
  margin: auto 0;
  padding: clamp(70px, 12vh, 132px) 0;
}

.eyebrow {
  margin: 0 0 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero h1,
.stat-intro h1 {
  margin: 0;
  font-size: clamp(3.5rem, 9.5vw, 8.6rem);
  line-height: 0.88;
  letter-spacing: -0.075em;
  font-weight: 950;
}

.hero h1 em {
  color: var(--coral);
  font-style: normal;
}

.lede {
  max-width: 650px;
  margin: 40px 0;
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  font-weight: 620;
}

.actions {
  justify-content: flex-start;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 17px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none;
  font-weight: 900;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.microcopy {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.landing-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stat-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 58px);
}

.stat-header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.stat-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding: clamp(48px, 8vw, 100px) 0 42px;
}

.stat-intro h1 {
  max-width: 900px;
  font-size: clamp(3rem, 7vw, 7rem);
}

.stat-intro p:not(.eyebrow) {
  max-width: 650px;
  margin: 26px 0 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.summary-card {
  min-width: 210px;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--lime);
  box-shadow: 7px 7px 0 var(--ink);
}

.summary-number,
.summary-label,
.summary-time {
  display: block;
}

.summary-number {
  font-size: 3rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.summary-label {
  margin-top: 6px;
  font-weight: 900;
}

.summary-time {
  margin-top: 18px;
  font: 0.7rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(23, 33, 27, 0.72);
}

.table-card {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 9px 9px 0 var(--ink);
}

.table-meta {
  padding: 15px 18px;
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
}

.table-meta code {
  color: var(--lime);
}

.auto-refresh {
  color: var(--mint);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(23, 33, 27, 0.05);
  color: var(--muted);
  font: 700 0.69rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(201, 255, 74, 0.13);
}

td code {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(23, 33, 27, 0.08);
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 116px;
  padding: 7px 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font: 850 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.status-pill.alive {
  color: #0b7139;
  background: rgba(114, 230, 165, 0.23);
}

.status-pill.down {
  color: #a62817;
  background: rgba(255, 107, 74, 0.17);
}

.status-pill.down i {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 107, 74, 0.12);
}

.live-details {
  display: block;
  max-width: 190px;
  margin-top: 8px;
  color: var(--muted);
  font: 0.68rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.speed-button {
  min-width: 150px;
  padding: 10px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font: 850 0.68rem/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.025em;
}

.speed-button:hover:not(:disabled),
.speed-button:focus-visible:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.speed-button:disabled {
  color: var(--muted);
  background: rgba(23, 33, 27, 0.08);
  box-shadow: none;
  cursor: not-allowed;
}

.speed-latest {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 0.67rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.speed-section {
  margin-top: clamp(56px, 8vw, 100px);
}

.speed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.speed-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.speed-heading p:not(.eyebrow) {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
}

.speed-quota {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  font: 750 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.speed-message {
  min-height: 1.5em;
  margin: 24px 0 14px;
  color: var(--muted);
  font-weight: 750;
}

.speed-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.speed-card {
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
}

.speed-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.speed-card-heading h3 {
  margin: 0;
  font-size: 0.95rem;
}

.speed-card-heading code {
  font-weight: 850;
}

.speed-list {
  max-height: 360px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.speed-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}

.speed-list li:last-child {
  border-bottom: 0;
}

.speed-list time {
  grid-column: 2;
  color: var(--muted);
  font: 0.66rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.history-status {
  align-self: start;
  grid-row: 1 / span 2;
  min-width: 74px;
  color: #a62817;
  font: 850 0.64rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.history-status.success {
  color: #0b7139;
}

.history-status.running,
.history-status.partial {
  color: #805d00;
}

.speed-empty {
  color: var(--muted);
}

.stat-footnote {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 820px) {
  .landing-card {
    box-shadow: 7px 7px 0 var(--ink);
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16vw, 6rem);
  }

  .actions,
  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-footer {
    gap: 8px;
  }

  .stat-intro {
    grid-template-columns: 1fr;
  }

  .summary-card {
    width: 100%;
  }

  .table-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .speed-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
