:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: #081121;
  --surface-2: #0d1729;
  --surface-3: #111e33;
  --line: #1c2b42;
  --line-bright: #29415f;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, .12);
  --blue: #60a5fa;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --slate: #a8b2c1;
  --shadow: 0 18px 60px rgba(0, 0, 0, .32);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(700px 420px at 85% -5%, rgba(34, 211, 238, .12), transparent 65%),
    radial-gradient(560px 380px at -10% 15%, rgba(37, 99, 235, .12), transparent 68%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #67e8f9; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { width: min(100%, 1040px); min-height: 100vh; margin: 0 auto; }
.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(66px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: rgba(2, 6, 23, .86);
  border-bottom: 1px solid rgba(41, 65, 95, .65);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { border-radius: 12px; box-shadow: 0 5px 22px rgba(34, 211, 238, .2); }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-size: .98rem; letter-spacing: -.01em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px currentColor; }
.connection-dot.online { background: var(--green); }
.connection-dot.offline { background: var(--red); }
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.icon-button svg { width: 21px; height: 21px; }
.icon-button.spinning svg { animation: spin .75s linear infinite; }
.refresh-track { position: sticky; z-index: 51; top: calc(65px + env(safe-area-inset-top)); height: 2px; }
.refresh-track span { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); transition: width .2s; }

main { padding: 20px 18px calc(100px + env(safe-area-inset-bottom)); outline: none; }
.view { animation: view-in .24s ease-out; }
.view-head { margin-bottom: 20px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { width: 18px; height: 1px; background: currentColor; content: ""; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.06; letter-spacing: -.04em; }
h2 { margin-bottom: 7px; font-size: 1.3rem; letter-spacing: -.025em; }
h3 { margin-bottom: 7px; font-size: 1rem; }
.subtitle { max-width: 68ch; margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.gradient-text { background: linear-gradient(100deg, var(--cyan), var(--blue)); background-clip: text; color: transparent; }

.landing-hero {
  position: relative;
  padding: 24px 4px 12px;
  overflow: hidden;
}
.landing-hero::after {
  position: absolute;
  z-index: -1;
  top: -150px;
  right: -170px;
  width: 430px;
  height: 430px;
  background: radial-gradient(circle, rgba(34, 211, 238, .16), rgba(37, 99, 235, .05) 45%, transparent 70%);
  content: "";
}
.landing-hero h1 { max-width: 780px; margin: 13px 0 18px; font-size: clamp(2.35rem, 9vw, 4.25rem); line-height: 1.02; }
.landing-lede { max-width: 700px; margin-bottom: 0; color: #c7d2e1; font-size: clamp(1rem, 2.5vw, 1.16rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-primary { min-width: 170px; box-shadow: 0 12px 35px rgba(34, 211, 238, .2); }
.registered-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; font-size: .78rem; }
.registered-line a { color: var(--muted); }

.confidence-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 25px 0 42px; }
.confidence-stat {
  min-width: 0;
  padding: 17px 15px;
  background: rgba(8, 17, 33, .8);
  border: 1px solid var(--line);
  border-radius: 17px;
}
.confidence-stat strong { display: block; color: var(--text); font-size: 1.55rem; line-height: 1; letter-spacing: -.04em; }
.confidence-stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.trust-intro { max-width: 670px; margin-bottom: 16px; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.benefit-card {
  padding: 19px;
  background: linear-gradient(155deg, rgba(13, 23, 41, .88), rgba(6, 14, 29, .82));
  border: 1px solid var(--line);
  border-radius: 20px;
}
.benefit-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 15px; color: var(--cyan); background: var(--cyan-soft); border-radius: 12px; }
.benefit-icon svg { width: 21px; height: 21px; }
.benefit-card h3 { margin-bottom: 8px; font-size: 1.02rem; }
.benefit-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.operations-card { border-color: rgba(34, 211, 238, .22); }
.operations-summary { margin: 17px 0 14px; color: #dbe5f1; font-size: 1rem; font-weight: 650; line-height: 1.55; }
.integrity-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.integrity-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: #b7c5d7;
  background: rgba(52, 211, 153, .06);
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 999px;
  font-size: .66rem;
}
.integrity-row span::before { color: var(--green); content: "✓"; }
.featured-decision .proposal-card { min-height: auto; }
.home-delegate-card {
  margin-top: 30px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .13), rgba(8, 17, 33, .98) 55%);
  border-color: rgba(34, 211, 238, .34);
}
.home-delegate-card p { max-width: 720px; margin-bottom: 0; color: #cbd5e1; font-size: .9rem; line-height: 1.65; }
.home-drep-id {
  margin: 17px 0 13px;
  padding: 12px 13px;
  overflow-wrap: anywhere;
  color: #dbe5f1;
  background: rgba(2, 6, 23, .65);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-family: var(--mono);
  font-size: .72rem;
}

.card {
  padding: 18px;
  background: linear-gradient(160deg, rgba(13, 23, 41, .96), rgba(6, 14, 29, .96));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.hero-card { position: relative; overflow: hidden; padding: 22px; }
.hero-card::after {
  position: absolute; inset: auto -50px -80px auto; width: 210px; height: 210px;
  background: radial-gradient(circle, rgba(34, 211, 238, .13), transparent 67%); content: "";
}
.live-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-pill, .mode-pill, .status-pill, .type-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: 1px solid var(--line-bright); border-radius: 999px; font-family: var(--mono);
  font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.live-pill { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 2s infinite; }
.mode-pill { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(34, 211, 238, .3); }
.hero-summary { position: relative; z-index: 1; margin: 20px 0 12px; font-size: 1.1rem; font-weight: 650; line-height: 1.45; }
.timestamp { color: var(--dim); font-family: var(--mono); font-size: .72rem; }
.epoch-clock { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.epoch-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; }
.epoch-top b { color: var(--text); }
.progress { height: 5px; margin-top: 10px; overflow: hidden; background: #030914; border-radius: 999px; }
.progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width 1s linear; }
.epoch-dashboard {
  padding: 21px;
  background:
    radial-gradient(380px 180px at 90% 0, rgba(34, 211, 238, .13), transparent 70%),
    linear-gradient(155deg, rgba(13, 23, 41, .98), rgba(5, 12, 26, .98));
  border-color: rgba(34, 211, 238, .3);
}
.epoch-dashboard-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.epoch-number { margin-top: 13px; color: var(--muted); font-size: 1rem; }
.epoch-number strong { display: block; margin-top: 2px; color: var(--text); font-size: clamp(2.7rem, 10vw, 4.4rem); line-height: .95; letter-spacing: -.06em; }
.epoch-remaining { text-align: right; }
.epoch-remaining span { display: block; color: var(--dim); font-size: .7rem; }
.epoch-remaining strong { display: block; margin-top: 5px; font-family: var(--mono); font-size: clamp(.92rem, 3vw, 1.2rem); }
.epoch-progress { height: 9px; margin-top: 22px; }
.epoch-scale { display: flex; justify-content: space-between; margin-top: 7px; color: var(--dim); font-family: var(--mono); font-size: .62rem; }
.epoch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.epoch-stats div { min-width: 0; padding: 12px; background: rgba(2, 6, 23, .55); border: 1px solid var(--line); border-radius: 13px; }
.epoch-stats strong { display: block; font-size: 1.22rem; letter-spacing: -.03em; }
.epoch-stats span { display: block; margin-top: 5px; color: var(--muted); font-size: .66rem; line-height: 1.3; }
.live-status-line { display: flex; justify-content: space-between; gap: 14px; margin: 13px 2px 5px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.live-status-line small { flex: none; color: var(--dim); font-family: var(--mono); }
.live-filters { margin-top: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 28px; }
.stat { min-width: 0; padding: 15px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.stat strong { display: block; font-size: 1.65rem; line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 7px; color: var(--muted); font-size: .72rem; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 28px 0 13px; }
.section-title h2 { margin: 0; }
.section-title a { font-size: .82rem; font-weight: 700; }
.card-list { display: grid; gap: 12px; }

.proposal-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform .16s, border-color .16s, background .16s;
}
.proposal-card:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-bright); transform: translateY(-1px); }
.proposal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.proposal-title { flex: 1; margin: 0; font-size: 1rem; line-height: 1.35; letter-spacing: -.015em; }
.type-pill { flex: none; max-width: 40%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.verdict { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: .85rem; font-weight: 800; }
.verdict::before { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; content: ""; }
.v-yes { color: var(--green); } .v-no { color: var(--red); } .v-abstain { color: var(--slate); } .v-info { color: var(--amber); }
.summary-line { margin: 11px 0 0; color: #cbd5e1; font-size: .86rem; line-height: 1.55; }
.reason-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; color: var(--cyan); font-size: .8rem; font-weight: 750; }
.proposal-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 12px; color: var(--dim); font-family: var(--mono); font-size: .68rem; }
.proposal-meta .urgent { color: var(--amber); }

.filters { position: sticky; z-index: 20; top: calc(68px + env(safe-area-inset-top)); padding: 10px 0 12px; background: linear-gradient(var(--bg) 82%, transparent); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.archive-segmented { grid-template-columns: repeat(3, 1fr); }
.segmented button, .chip {
  min-height: 42px; color: var(--muted); background: transparent; border: 0; border-radius: 11px; cursor: pointer;
}
.segmented button.active { color: var(--text); background: var(--surface-3); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.search-wrap { position: relative; margin-top: 10px; }
.search-wrap svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; color: var(--dim); transform: translateY(-50%); }
.search {
  width: 100%; min-height: 48px; padding: 0 14px 0 42px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px; outline: 0;
}
.search:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.chips { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); font-size: .75rem; }
.chip.active { color: var(--text); border-color: var(--cyan); background: var(--cyan-soft); }
.distribution { display: flex; height: 9px; margin: 14px 0 7px; overflow: hidden; background: var(--surface); border-radius: 999px; }
.distribution span { min-width: 2px; }
.distribution-label { display: flex; justify-content: space-between; color: var(--dim); font-size: .68rem; }
.result-count { margin: 16px 0 10px; color: var(--muted); font-size: .78rem; }
.empty { padding: 40px 20px; color: var(--muted); text-align: center; }

.rule-grid, .link-grid, .method-grid { display: grid; gap: 12px; }
.method-hero {
  background:
    radial-gradient(360px 190px at 92% 0, rgba(34, 211, 238, .14), transparent 70%),
    linear-gradient(145deg, rgba(34, 211, 238, .1), rgba(13, 23, 41, .96) 52%);
  border-color: rgba(34, 211, 238, .3);
}
.method-kicker {
  margin-bottom: 10px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.method-question-grid { display: grid; gap: 9px; margin-top: 16px; }
.method-question-grid div {
  padding: 13px;
  background: rgba(2, 6, 23, .48);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.method-question-grid strong { display: block; margin-bottom: 5px; }
.method-question-grid span { display: block; color: #cbd5e1; font-size: .84rem; line-height: 1.5; }
.pipeline-card { margin-top: 14px; }
.pipeline-steps { display: grid; gap: 9px; margin-top: 15px; }
.pipeline-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, .55fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pipeline-steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--cyan);
  background: var(--cyan-soft);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: .74rem;
}
.pipeline-steps strong { font-size: .9rem; }
.pipeline-steps span { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.compact-rules .rule-card p { margin-bottom: 0; }
.rule-card { border-top: 3px solid var(--line-bright); }
.rule-card.yes { border-top-color: var(--green); } .rule-card.no { border-top-color: var(--red); }
.rule-card.abstain { border-top-color: var(--slate); } .rule-card.info { border-top-color: var(--amber); }
.rule-card p, .rule-card li, .copy-card p, .verify-copy { color: #cbd5e1; font-size: .88rem; line-height: 1.6; }
.rule-card ul { margin: 10px 0 0; padding-left: 19px; }
.gate-card { margin-bottom: 14px; border-color: rgba(251, 191, 36, .34); background: rgba(251, 191, 36, .06); }
.hierarchy { margin-top: 14px; }
.hierarchy ol { margin: 13px 0 0; padding: 0; list-style: none; counter-reset: hierarchy; }
.hierarchy li { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); color: #cbd5e1; font-size: .86rem; counter-increment: hierarchy; }
.hierarchy li::before { color: var(--cyan); font-family: var(--mono); content: "0" counter(hierarchy); }

.link-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--text); }
.link-card:hover { color: var(--text); border-color: var(--cyan); }
.link-card small { display: block; margin-top: 4px; color: var(--muted); }
.link-card svg { flex: none; width: 20px; height: 20px; color: var(--cyan); }
.verify-hero { border-color: rgba(34, 211, 238, .28); background: linear-gradient(145deg, rgba(34, 211, 238, .1), rgba(13, 23, 41, .96) 52%); }
.verify-steps { margin: 16px 0 0; padding-left: 20px; color: #cbd5e1; font-size: .88rem; line-height: 1.65; }
.repo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.repo-row a { padding: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 700; }
.repo-row small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.delegate-card { margin-top: 24px; background: linear-gradient(145deg, rgba(34, 211, 238, .11), rgba(8, 17, 33, .98)); border-color: rgba(34, 211, 238, .28); }
.drep-id { margin: 13px 0; padding: 11px; overflow-wrap: anywhere; background: rgba(2, 6, 23, .7); border: 1px solid var(--line); border-radius: 12px; font-family: var(--mono); font-size: .7rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 0 16px;
  color: #021016; background: var(--cyan); border: 0; border-radius: 13px; font-size: .82rem; font-weight: 800; cursor: pointer;
}
.button.secondary { color: var(--text); background: var(--surface-3); border: 1px solid var(--line-bright); }

.detail-head { display: flex; align-items: center; gap: 11px; margin: -5px 0 18px; }
.back-button { flex: none; }
.detail-head span { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero h1 { margin-top: 13px; font-size: clamp(1.65rem, 6vw, 2.5rem); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-section { margin-top: 15px; }
.detail-section h2 { display: flex; align-items: center; gap: 9px; }
.detail-section h2 span { display: grid; place-items: center; width: 27px; height: 27px; color: var(--cyan); background: var(--cyan-soft); border-radius: 9px; font-family: var(--mono); font-size: .7rem; }
.preview {
  max-height: 330px; margin: 12px 0 0; padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  color: #cbd5e1; background: #030914; border: 1px solid var(--line); border-radius: 13px; font-family: var(--mono); font-size: .72rem; line-height: 1.6;
}
.callout { padding: 14px; background: var(--surface-3); border-left: 3px solid var(--cyan); border-radius: 0 13px 13px 0; color: #dbe5f1; line-height: 1.65; }
.fix-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.fix-list li { padding: 12px 13px; color: #cbd5e1; background: var(--surface-3); border: 1px solid var(--line); border-radius: 13px; font-size: .84rem; line-height: 1.5; }
.assessment-status {
  margin-top: 12px;
  padding: 11px 12px;
  color: var(--muted);
  background: rgba(2, 6, 23, .55);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: .78rem;
}
.assessment-status strong { color: var(--text); text-transform: capitalize; }
.assessment-list { display: grid; gap: 10px; margin-top: 12px; }
.assessment-item {
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-bright);
  border-radius: 13px;
}
.assessment-item.ready, .assessment-item.complete { border-left-color: var(--green); }
.assessment-item.blocked { border-left-color: var(--red); }
.assessment-item.thin, .assessment-item.incomplete { border-left-color: var(--amber); }
.assessment-item-head { display: flex; justify-content: space-between; gap: 10px; }
.assessment-item-head strong { font-size: .9rem; }
.assessment-item-head span { flex: none; color: var(--muted); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; }
.assessment-item p { margin: 9px 0 0; color: #cbd5e1; font-size: .82rem; line-height: 1.55; }
.assessment-item ul { display: grid; gap: 5px; margin: 10px 0 0; padding-left: 18px; color: #cbd5e1; font-size: .78rem; line-height: 1.45; }
.missing-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.missing-list b, .missing-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
}
.missing-list b { color: var(--amber); background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .24); }
.missing-list span { color: #dbe5f1; background: var(--surface-3); border: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.metric { min-width: 0; padding: 11px; background: var(--surface-3); border-radius: 12px; }
.metric span { display: block; color: var(--dim); font-size: .64rem; text-transform: uppercase; }
.metric strong { display: block; margin-top: 5px; overflow: hidden; font-family: var(--mono); font-size: .78rem; text-overflow: ellipsis; }
.proof-list { display: grid; gap: 9px; margin-top: 13px; }
.proof-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); font-size: .76rem; }
.proof-row span { color: var(--muted); }
.proof-row code { overflow-wrap: anywhere; color: #dbe5f1; font-family: var(--mono); }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail-links a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px; font-size: .78rem; font-weight: 700; }
.missing { color: var(--amber); }

.tab-bar {
  position: fixed; z-index: 60; right: 0; bottom: 0; left: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 1040px); min-height: calc(70px + env(safe-area-inset-bottom));
  margin: auto; padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  background: rgba(4, 10, 25, .94); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.tab-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; color: var(--dim); border-radius: 14px; font-size: .65rem; font-weight: 700; }
.tab-bar svg { width: 22px; height: 22px; }
.tab-bar a.active { color: var(--cyan); background: var(--cyan-soft); }
.detail-open .tab-bar { visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(110%); }

.view-loading { display: grid; gap: 13px; }
.skeleton { min-height: 90px; overflow: hidden; background: var(--surface); border-radius: 18px; }
.skeleton::after { display: block; width: 55%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent); animation: shimmer 1.35s infinite; content: ""; }
.hero-skeleton { min-height: 240px; }
.card-skeleton { min-height: 150px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.toast {
  position: fixed; z-index: 100; bottom: calc(85px + env(safe-area-inset-bottom)); left: 50%; padding: 10px 15px;
  color: var(--text); background: #17243a; border: 1px solid var(--line-bright); border-radius: 999px;
  box-shadow: var(--shadow); font-size: .78rem; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes shimmer { from { transform: translateX(-130%); } to { transform: translateX(230%); } }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  main { padding-right: 26px; padding-left: 26px; }
  .app-header { padding-right: 26px; padding-left: 26px; }
  .card-list { grid-template-columns: 1fr 1fr; }
  .rule-grid { grid-template-columns: 1fr 1fr; }
  .link-grid { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-question-grid { grid-template-columns: repeat(3, 1fr); }
  .proposal-card { min-height: 205px; }
  .filters { top: calc(69px + env(safe-area-inset-top)); }
}
@media (max-width: 430px) {
  .landing-hero { padding-top: 13px; }
  .landing-hero h1 { font-size: 2.38rem; }
  .confidence-grid { grid-template-columns: 1fr 1fr; margin-bottom: 34px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .hero-actions .button { flex: 1; }
  .stat-grid { gap: 7px; }
  .stat { padding: 13px 10px; }
  .stat strong { font-size: 1.42rem; }
  .proposal-top { display: block; }
  .type-pill { max-width: 100%; margin-top: 8px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .proof-row { grid-template-columns: 1fr; gap: 4px; }
  .epoch-dashboard-top { align-items: flex-start; }
  .epoch-stats { grid-template-columns: 1fr 1fr; }
  .live-status-line { display: block; }
  .live-status-line small { display: block; margin-top: 5px; }
  .archive-segmented button { padding: 0 6px; font-size: .72rem; }
  .pipeline-steps div { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .pipeline-steps span { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
