:root {
  --ink: #1a1a18;
  --ink-soft: #35352f;
  --muted: #66665f;
  --subtle: #8f8f86;
  --line: rgba(26, 26, 24, 0.1);
  --brand-gold: #b07816;
  --brand-deep: #936412;
  --good: #087443;
  --good-fill: #eaf8f0;
  --warn: #9a5b04;
  --warn-fill: #fff6e5;
  --bad: #a91f1f;
  --bad-fill: #fff0f0;
  --surface: #ffffff;
  --surface-muted: #f4f3f0;
  --shadow: 0 24px 70px -42px rgba(62, 43, 14, 0.32);
}

* { box-sizing: border-box; }

html { background: var(--surface-muted); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -8%, rgba(176, 120, 22, 0.14), transparent 34rem),
    radial-gradient(circle at 96% 0%, rgba(147, 100, 18, 0.11), transparent 30rem),
    var(--surface-muted);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(176, 120, 22, 0.45);
  outline-offset: 3px;
}

main { max-width: 900px; margin: 0 auto; padding: 30px 24px 64px; }

.site-header, .hero, .panel-heading, .chain-row, .site-footer { display: flex; align-items: center; }

.site-header { justify-content: space-between; margin-bottom: 72px; }

.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark img { display: block; width: 142px; height: auto; }

.header-links { display: flex; gap: 22px; color: var(--muted); font-size: 13px; font-weight: 650; }
.header-links a { text-decoration: none; transition: color 160ms ease; }
.header-links a:hover { color: var(--ink); }

.hero { align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--brand-deep); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-gold); box-shadow: 0 0 0 4px rgba(176,120,22,0.12); }
h1 { margin: 0; font-size: clamp(34px, 6vw, 54px); line-height: 1; letter-spacing: -0.055em; }
.subtitle { max-width: 570px; margin: 17px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.refresh-button { border: 1px solid rgba(176,120,22,0.22); border-radius: 999px; padding: 10px 15px; color: var(--brand-deep); background: rgba(255,255,255,0.78); box-shadow: 0 10px 24px -20px rgba(147,100,18,0.72); cursor: pointer; font: inherit; font-size: 13px; font-weight: 750; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.refresh-button:hover:not(:disabled) { border-color: rgba(176,120,22,0.48); background: white; transform: translateY(-1px); }
.refresh-button:disabled { cursor: wait; opacity: 0.58; }
.refresh-button span { margin-right: 4px; font-size: 17px; line-height: 0; vertical-align: -1px; }
.refresh-state { color: var(--subtle); font-size: 12px; }

.banner { display: flex; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 18px; padding: 17px 20px; border: 1px solid transparent; border-radius: 16px; box-shadow: var(--shadow); font-size: 14px; font-weight: 750; }
.banner-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; flex-shrink: 0; color: white; font-size: 15px; font-weight: 850; }
.banner-ok { color: var(--good); background: var(--good-fill); border-color: rgba(8,116,67,0.14); }
.banner-ok .banner-icon { background: var(--good); }
.banner-warn { color: var(--warn); background: var(--warn-fill); border-color: rgba(154,91,4,0.16); }
.banner-warn .banner-icon { background: #c27507; }
.banner-down { color: var(--bad); background: var(--bad-fill); border-color: rgba(169,31,31,0.14); }
.banner-down .banner-icon { background: #c52d2d; }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,0.9); box-shadow: var(--shadow); }
.panel-heading { justify-content: space-between; gap: 20px; padding: 24px 26px 21px; }
.section-kicker { margin-bottom: 6px; color: var(--subtle); letter-spacing: 0.12em; }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.035em; }
.summary { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; text-align: right; }
.chain-columns { display: grid; grid-template-columns: minmax(150px, 1.25fr) 110px minmax(120px, 0.95fr) minmax(145px, 1fr); padding: 11px 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.chain-row { display: grid; grid-template-columns: minmax(150px, 1.25fr) 110px minmax(120px, 0.95fr) minmax(145px, 1fr); gap: 12px; padding: 17px 26px; border-bottom: 1px solid var(--line); font-size: 13px; }
.chain-row:last-child { border-bottom: 0; }
.chain-name { font-weight: 750; }
.chain-badge { width: max-content; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800; }
.chain-ok .chain-badge { color: var(--good); background: var(--good-fill); }
.chain-warn .chain-badge { color: var(--warn); background: var(--warn-fill); }
.chain-down .chain-badge { color: var(--bad); background: var(--bad-fill); }
.chain-lag, .chain-checkpoint { color: var(--muted); font-size: 12px; }
.chain-checkpoint { color: var(--subtle); }
.empty-state { margin: 0; padding: 28px 26px; color: var(--muted); font-size: 13px; }
.updated-at { margin: 16px 2px 0; color: var(--muted); font-size: 12px; }

.independence-note { display: flex; align-items: flex-start; gap: 13px; margin-top: 52px; padding: 19px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.independence-note p { margin: 0; }
.independence-note strong { color: var(--ink-soft); }
.independence-note a { color: var(--brand-deep); text-underline-offset: 3px; }
.independence-note code { font-size: 11px; }
.note-mark { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 9px; color: var(--brand-deep); background: rgba(176,120,22,0.1); font-weight: 800; }
.site-footer { justify-content: space-between; margin-top: 42px; color: var(--subtle); font-size: 11px; }
.site-footer a { text-underline-offset: 3px; }
.noscript { position: fixed; inset: auto 16px 16px; padding: 12px 15px; border-radius: 10px; color: var(--bad); background: var(--bad-fill); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  main { padding: 22px 16px 48px; }
  .site-header { margin-bottom: 56px; }
  .header-links { gap: 13px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 20px; }
  .hero-actions { align-items: flex-start; }
  .chain-columns { display: none; }
  .chain-row { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 16px 18px; }
  .chain-name { grid-column: 1; grid-row: 1; }
  .chain-badge { grid-column: 2; grid-row: 1; }
  .chain-lag { grid-column: 1; grid-row: 2; }
  .chain-checkpoint { grid-column: 2; grid-row: 2; text-align: right; }
  .panel-heading { align-items: flex-start; flex-direction: column; padding: 21px 18px 18px; }
  .summary { text-align: left; }
}

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