:root {
  --bg: #0a100f;
  --surface: #111a18;
  --surface-2: #17231f;
  --line: #273a34;
  --text: #eef7f3;
  --muted: #93a9a1;
  --green: #42d3a4;
  --green-2: #7bf2c9;
  --amber: #f0b75a;
  --red: #ef6b65;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% 0, #162c26 0, var(--bg) 32rem); color: var(--text); }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(10,16,15,.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand small { color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--green); border-radius: 10px; color: var(--green-2); font-weight: 800; }
nav { display: flex; gap: 6px; }
nav a { color: var(--muted); padding: 9px 12px; border-radius: 8px; }
nav a.active, nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
main { width: min(1460px, 92vw); margin: 0 auto; padding: 38px 0 64px; }
body > footer { color: var(--muted); border-top: 1px solid var(--line); padding: 20px 4vw; font-size: .85rem; }
h1 { font-size: clamp(1.9rem, 3vw, 3rem); letter-spacing: -.04em; margin: .2rem 0; }
h2 { margin: .2rem 0 1rem; }
h3 { margin: 0; }
.eyebrow { color: var(--green); letter-spacing: .14em; font-size: .72rem; font-weight: 800; margin: 0; }
.muted, small { color: var(--muted); }
.page-head, .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.head-actions { display: flex; gap: 10px; }
.button, button { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 9px; padding: 10px 14px; font: inherit; cursor: pointer; }
button:hover, .button:hover { border-color: var(--green); text-decoration: none; }
.primary { background: var(--green); color: #06110e; border-color: var(--green); font-weight: 800; }
.quiet { background: transparent; }
.panel { background: linear-gradient(145deg, rgba(23,35,31,.94), rgba(14,23,20,.94)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.16); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.stat-grid strong { font-size: 2rem; color: var(--green-2); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.export-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(10,16,15,.4); }
.export-toolbar > div { display: grid; gap: 3px; margin-right: auto; }
.export-toolbar label { min-width: 130px; }
.row-selector { width: 18px; height: 18px; accent-color: var(--green); }
.row-selector:disabled { opacity: .35; cursor: not-allowed; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: var(--text); background: #0e1715; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(66,211,164,.35); border-color: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: 10px; }
td { border-top: 1px solid var(--line); padding: 13px 10px; vertical-align: middle; }
td small, td strong { display: block; }
.score { display: inline-grid; place-items: center; min-width: 42px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 900; }
.score.high { color: var(--amber); border-color: rgba(240,183,90,.45); }
.score.critical { color: #fff; background: #793d27; border-color: var(--amber); }
.score.jumbo { width: 82px; height: 62px; font-size: 1.8rem; }
.pill, .health { display: inline-block; padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; }
.health.healthy { color: var(--green-2); }
.health.degraded { color: var(--amber); }
.health.failed { color: var(--red); }
.health.access-approved { color: var(--green-2); }
.health.access-submitted,
.health.access-awaiting_response,
.health.access-response_received { color: var(--amber); }
.health.access-blocked,
.health.access-invalid { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
.map-panel { padding: 0; min-height: 400px; overflow: hidden; }
#parcel-map { min-height: 400px; }
.facts dl { margin: 0; }
.facts dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-transform: capitalize; }
.contributions { display: grid; gap: 12px; }
.contributions article { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 14px; background: rgba(10,16,15,.5); border-radius: 10px; }
.contributions article > strong { color: var(--green-2); font-size: 1.5rem; }
.contributions p { margin: 4px 0; color: var(--muted); }
blockquote { margin: 12px 0; padding: 16px 18px; border-left: 3px solid var(--green); background: rgba(10,16,15,.52); }
blockquote p { font-family: ui-serif, Georgia, serif; font-size: 1.05rem; line-height: 1.6; }
blockquote footer { color: var(--muted); font-size: .8rem; }
.review-actions form, .stack { display: grid; gap: 14px; }
.review-actions form { grid-template-columns: 1fr 3fr auto; align-items: end; }
.diligence-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.diligence-grid legend { color: var(--muted); font-size: .82rem; font-weight: 700; padding: 0 6px; }
.context-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; color: var(--muted); }
.audit-json { overflow-x: auto; padding: 14px; border-radius: 10px; background: #0e1715; color: var(--green-2); white-space: pre-wrap; }
.hash-value { overflow-wrap: anywhere; text-transform: none !important; }
.match-review-form { display: grid; gap: 8px; min-width: 260px; }
.match-review-actions { display: flex; gap: 8px; }
.match-review-actions button { flex: 1; padding: 7px 10px; }
.login-shell { min-height: calc(100vh - 210px); display: grid; place-items: center; }
.login-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 6vw, 54px); }
.notice { padding: 12px; border-radius: 8px; margin: 16px 0; }
.notice.danger { background: rgba(239,107,101,.13); border: 1px solid rgba(239,107,101,.5); }
.gold-provenance { margin: 0; display: grid; gap: 8px; }
.gold-provenance div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.gold-provenance dt { color: var(--muted); }
.gold-provenance dd { margin: 0; }
.gold-page-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.gold-page-image { max-height: 78vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gold-page-image img { display: block; width: 100%; height: auto; }
.gold-page-text { min-width: 0; max-height: 78vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #0e1715; }
.gold-page-text pre { margin: 0; padding: 16px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.gold-page-text .notice { margin: 0; border-radius: 0; border-bottom: 1px solid rgba(240,183,90,.4); color: var(--amber); background: rgba(240,183,90,.08); }
.gold-page-labels { display: grid; grid-template-columns: minmax(220px, .6fr) 2fr; gap: 18px; margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.gold-page-labels legend, fieldset > legend { color: var(--muted); font-size: .82rem; font-weight: 700; padding: 0 7px; }
.gold-traits { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.gold-traits label, .gold-choice-row label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 7px; }
.gold-traits input, .gold-choice-row input { width: auto; }
.gold-choice-row { display: flex; flex-wrap: wrap; gap: 22px; }
.gold-signals { display: grid; gap: 10px; }
.gold-signals details { border: 1px solid var(--line); border-radius: 10px; background: rgba(10,16,15,.35); }
.gold-signals summary { padding: 13px 15px; cursor: pointer; color: var(--green-2); font-weight: 700; }
.gold-signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 15px 15px; }
.gold-submit-row { display: flex; justify-content: flex-end; gap: 10px; }
fieldset:disabled { opacity: .72; }
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .export-toolbar { align-items: stretch; }
  .review-actions form { grid-template-columns: 1fr; }
  .diligence-grid { grid-template-columns: 1fr 1fr; }
  .gold-page-grid, .gold-page-labels, .gold-signal-grid { grid-template-columns: 1fr; }
  nav { display: none; }
}
@media (max-width: 560px) {
  main { width: 94vw; padding-top: 24px; }
  .stat-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .topbar { padding: 0 3vw; }
  .diligence-grid { grid-template-columns: 1fr; }
}
