:root {
  color-scheme: dark;
  --ink: #f5f7ff;
  --muted: #98a2bd;
  --line: rgba(161, 177, 224, 0.16);
  --surface: rgba(17, 22, 42, 0.84);
  --surface-2: rgba(27, 34, 61, 0.76);
  --blue: #7c9cff;
  --violet: #a47cff;
  --green: #65e6b3;
  --amber: #ffc96a;
  --red: #ff7d91;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #080b16; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% -10%, rgba(80, 124, 255, 0.28), transparent 34rem),
    radial-gradient(circle at 100% 22%, rgba(132, 68, 255, 0.2), transparent 32rem),
    linear-gradient(180deg, #090d1a 0%, #070914 100%);
}
button { font: inherit; }
.shell { width: min(1050px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 44px; }
.hero { max-width: 760px; }
.eyebrow, .kicker { color: #a9baff; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.pulse { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px var(--green); }
h1 { margin: 18px 0 14px; font-size: clamp(2.7rem, 8vw, 5.8rem); line-height: 0.92; letter-spacing: -0.065em; }
h1 span { color: transparent; background: linear-gradient(95deg, #81a5ff, #b78bff 72%); background-clip: text; -webkit-background-clip: text; }
.lead { max-width: 650px; color: #b1bad0; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.7; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.badge, .state { display: inline-flex; align-items: center; width: max-content; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; }
.safe, .fixed, .readonly { color: var(--green); background: rgba(64, 207, 153, 0.08); }
.warn, .pending { color: var(--amber); background: rgba(255, 190, 84, 0.08); }
.blocked { color: var(--red); background: rgba(255, 90, 119, 0.08); }
.tabs { position: sticky; top: 14px; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 56px 0 20px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8, 11, 22, 0.84); backdrop-filter: blur(18px); }
.tab, .chip { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.tab { min-height: 44px; border-radius: 11px; font-weight: 750; }
.tab:hover, .tab:focus-visible, .tab.active { color: white; background: linear-gradient(120deg, rgba(91, 128, 255, 0.24), rgba(146, 92, 255, 0.2)); outline: none; }
.panel { border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 34px); background: linear-gradient(145deg, rgba(19, 25, 48, 0.9), rgba(10, 14, 29, 0.9)); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24); }
.panel[hidden] { display: none; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-head h2 { margin: 7px 0 0; font-size: clamp(1.55rem, 4vw, 2.25rem); letter-spacing: -0.035em; }
.kicker { margin: 0; }
.controls { display: flex; gap: 8px; margin: 28px 0 18px; overflow-x: auto; scrollbar-width: none; }
.controls::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.chip:hover, .chip:focus-visible, .chip.active { color: white; border-color: rgba(130, 157, 255, 0.54); background: rgba(105, 134, 255, 0.15); outline: none; }
.quote-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric, .evidence, .wallet-card, .test-grid article { border: 1px solid var(--line); border-radius: 17px; background: var(--surface-2); }
.metric { min-height: 132px; padding: 18px; }
.metric span, .wallet-card span { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.metric strong { display: block; margin: 18px 0 5px; font-size: 1.45rem; }
.metric small { color: #7f89a4; line-height: 1.35; }
.metric.accent { background: linear-gradient(145deg, rgba(89, 123, 255, 0.2), rgba(131, 75, 245, 0.15)); }
.evidence { margin-top: 14px; padding: clamp(18px, 3vw, 25px); }
.live-error { border-color: rgba(255, 104, 130, 0.22); background: linear-gradient(145deg, rgba(69, 25, 43, 0.45), rgba(24, 20, 39, 0.72)); }
.root-cause { border-color: rgba(101, 230, 179, 0.22); }
.evidence-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; }
.evidence h3 { margin: 16px 0 10px; font-size: 1.12rem; }
.evidence p, .evidence li { color: #b5bdd2; line-height: 1.65; }
.evidence ul { margin: 10px 0 0; padding-left: 20px; }
.evidence code { color: #cad3ff; overflow-wrap: anywhere; }
.note { margin-bottom: 0; color: #8792af !important; font-size: 0.86rem; }
dl { margin: 18px 0 0; }
dl div { display: grid; grid-template-columns: minmax(130px, 0.6fr) minmax(0, 1fr); gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 0.78rem; }
dd { margin: 0; font-size: 0.86rem; overflow-wrap: anywhere; }
.bad { color: var(--red); font-weight: 750; }
.wallet-card { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 8px; overflow: hidden; }
.wallet-card > div { min-height: 116px; padding: 17px; border-right: 1px solid var(--line); }
.wallet-card > div:last-child { border-right: 0; }
.wallet-card strong { display: block; margin-top: 16px; font-size: 0.93rem; line-height: 1.35; }
.muted { color: #8a94ae; }
.test-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 28px; }
.test-grid article { padding: 22px 18px; }
.test-grid strong { display: block; font-size: 1.55rem; color: #c9d3ff; }
.test-grid span { display: block; margin-top: 7px; color: var(--muted); font-size: 0.78rem; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 4px 0; color: #707a96; font-size: 0.75rem; }

@media (max-width: 820px) {
  .quote-grid, .test-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-card { grid-template-columns: 1fr; }
  .wallet-card > div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .wallet-card > div:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 1050px); padding-top: 42px; }
  .tabs { top: 8px; }
  .tab { font-size: 0.72rem; }
  .panel { border-radius: 20px; }
  .section-head { flex-direction: column; }
  .quote-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 120px; padding: 15px; }
  .metric strong { font-size: 1.15rem; }
  dl div { grid-template-columns: 1fr; gap: 5px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: breathe 2.2s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: 0.45; box-shadow: 0 0 8px var(--green); } }
}
