:root {
  --ink:#14241f; --muted:#65736e; --paper:#f5f3ed; --surface:#fffefa; --line:#d9ddd7;
  --green:#197153; --green-soft:#dcece5; --amber:#a96012; --amber-soft:#f7e7d2;
  --red:#b8483a; --red-soft:#f5ded9; --navy:#16312a;
}
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font:14px/1.4 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; }
button,input,select { font:inherit; }
header { min-height:116px; padding:22px 36px; color:#fff; background:var(--navy); display:flex; justify-content:space-between; align-items:end; gap:24px; }
h1 { margin:2px 0 0; font:500 clamp(30px,4vw,46px)/1 Georgia,serif; letter-spacing:-.03em; }
h2 { margin:0; font-size:20px; }
.eyebrow { margin:0; color:#9fc5b5; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.eyebrow.ink { color:var(--green); }
.freshness { text-align:right; color:#bad0c7; font-size:12px; }
.freshness strong,.freshness span { display:block; }
.freshness strong { color:#fff; margin-bottom:3px; }
main { max-width:1600px; margin:auto; padding:30px 36px 64px; }
.access-panel { max-width:860px; margin:70px auto; padding:34px; background:var(--surface); border-top:4px solid var(--green); display:grid; grid-template-columns:1fr 1fr; gap:48px; box-shadow:0 20px 55px rgba(20,36,31,.08); }
.access-panel h2 { margin:6px 0 10px; font:500 30px/1.12 Georgia,serif; }
.access-panel p { color:var(--muted); }
label { display:block; margin-bottom:7px; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.token-row { display:flex; gap:8px; }
input,select { width:100%; border:1px solid var(--line); background:#fff; padding:10px 12px; outline:0; }
input:focus,select:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(25,113,83,.11); }
button { border:0; cursor:pointer; }
.token-row button { color:#fff; background:var(--green); padding:10px 16px; font-weight:750; white-space:nowrap; }
.form-error { min-height:20px; color:var(--red)!important; font-size:12px; }
.toolbar { margin:-30px -36px 30px; padding:0 36px; background:var(--surface); border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
nav { display:flex; gap:28px; }
.tab { color:var(--muted); background:transparent; padding:16px 0 13px; border-bottom:3px solid transparent; font-weight:700; }
.tab.active { color:var(--ink); border-color:var(--green); }
.actions { display:flex; gap:8px; }
.quiet { color:var(--green); background:transparent; padding:8px; font-weight:700; }
.view { display:none; }
.view.active { display:block; animation:rise .2s ease both; }
@keyframes rise { from { opacity:0; transform:translateY(6px); } }
.alert { min-height:78px; margin-bottom:28px; padding:17px 20px; border-left:6px solid var(--green); background:var(--green-soft); display:flex; align-items:center; justify-content:space-between; gap:20px; }
.alert.blocked { color:var(--ink); border-color:var(--red); background:var(--red-soft); }
.alert strong,.alert span { display:block; }
.alert span { color:var(--muted); font-size:12px; margin-top:3px; }
.badge { display:inline-flex!important; padding:5px 9px; border-radius:99px; color:var(--green); background:#fff; font-size:11px!important; font-weight:800; white-space:nowrap; }
.blocked .badge { color:var(--red); }
.metrics { display:grid; grid-template-columns:repeat(6,1fr); margin-bottom:36px; border-block:1px solid var(--line); }
.metric { min-width:0; padding:19px 16px 17px 0; margin-right:16px; border-right:1px solid var(--line); }
.metric:last-child { border:0; }
.metric-label { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.metric-value { margin-top:5px; font:500 30px/1.1 Georgia,serif; letter-spacing:-.025em; }
.metric-note { margin-top:4px; color:var(--muted); font-size:10px; }
.section-head { margin:30px 0 13px; display:flex; justify-content:space-between; align-items:end; gap:18px; }
.section-head p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.section-head input { max-width:320px; }
.table-wrap { overflow:auto; background:var(--surface); border-block:1px solid var(--line); }
table { width:100%; min-width:980px; border-collapse:collapse; }
th { padding:10px 12px; color:var(--muted); background:#faf9f5; border-bottom:1px solid var(--line); text-align:left; font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
td { padding:12px; border-bottom:1px solid #e8ebe7; font-size:12px; }
tbody tr:last-child td { border:0; }
tbody tr:hover { background:#f4f7f4; }
.clickable { cursor:pointer; }
.name { font-weight:800; }
.sub { margin-top:2px; color:var(--muted); font-size:10px; }
.num { text-align:right; font-variant-numeric:tabular-nums; }
.status { display:inline-flex; align-items:center; gap:7px; font-weight:700; }
.status::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.status.healthy { color:var(--green); }.status.blocked { color:var(--red); }.status.unknown { color:var(--amber); }
.stage { display:inline-flex; min-width:25px; height:25px; align-items:center; justify-content:center; border-radius:50%; color:#fff; background:var(--green); font-weight:800; }
.stage.s1,.stage.s2 { background:var(--amber); }
.footnote { color:var(--muted); font-size:11px; }
.backdrop { position:fixed; inset:0; z-index:40; background:rgba(10,25,20,.32); }
.drawer { position:fixed; z-index:41; top:0; right:0; bottom:0; width:min(1080px,96vw); padding:30px; overflow:auto; background:var(--surface); transform:translateX(100%); transition:transform .22s ease; box-shadow:-18px 0 54px rgba(20,36,31,.18); }
.drawer.open { transform:none; }
.drawer h2 { margin:6px 0 22px; font:500 31px/1.1 Georgia,serif; }
.drawer-close { float:right; width:34px; height:34px; background:#e9ece9; font-size:22px; }
.schema-stats { display:grid; grid-template-columns:repeat(4,1fr); margin-bottom:18px; border-block:1px solid var(--line); }
.schema-stats div { padding:13px 16px 12px 0; margin-right:16px; border-right:1px solid var(--line); }
.schema-stats div:last-child { border:0; }
.schema-stats span,.schema-stats strong { display:block; }
.schema-stats span { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.schema-stats strong { margin-top:3px; font:500 24px/1.1 Georgia,serif; }
.schema-boundary { margin:0 0 18px; padding:11px 13px; color:var(--muted); background:#edf2ee; border-left:3px solid var(--green); font-size:11px; }
.schema-controls { display:grid; grid-template-columns:1fr 190px 170px; gap:10px; align-items:end; margin:0 0 12px; }
.schema-controls label { margin:0; }
.schema-controls label span { display:block; margin-bottom:5px; }
.schema-table-wrap { max-height:50vh; overflow:auto; border-block:1px solid var(--line); }
.schema-field-table { min-width:1050px; }
.schema-field-table thead { position:sticky; top:0; z-index:1; }
.schema-field-table td { vertical-align:top; }
.schema-field-table code { color:#285342; font-size:10px; font-weight:700; overflow-wrap:anywhere; }
.field-label { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.muted { color:var(--muted); }
.type-chip,.coverage-chip { display:inline-flex; padding:3px 6px; border-radius:2px; font-size:9px; font-weight:800; white-space:nowrap; }
.type-chip { color:#3d554d; background:#edf0ed; }
.coverage-chip.projected { color:var(--green); background:var(--green-soft); }
.coverage-chip.not-projected { color:var(--amber); background:var(--amber-soft); }
.flag-list { display:flex; flex-wrap:wrap; gap:4px; }
.flag-list span { padding:2px 5px; color:var(--muted); background:#f0f1ed; font-size:8px; font-weight:750; white-space:nowrap; }
.ddl-preview,.relationship-preview { margin-top:16px; border-top:1px solid var(--line); padding-top:12px; }
.ddl-preview summary,.relationship-preview summary { cursor:pointer; color:var(--ink); font-weight:800; }
.ddl-preview p { margin:7px 0 10px; color:var(--muted); font-size:10px; }
.ddl-preview pre { max-height:400px; margin:0; padding:16px; overflow:auto; color:#d8e9e1; background:#10241e; font:10px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
.relationship-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.relationship-list code { padding:5px 7px; color:#285342; background:#edf2ee; font-size:9px; }
.empty { padding:34px; color:var(--muted); text-align:center; }
@media (max-width:1050px) { .metrics { grid-template-columns:repeat(3,1fr); }.metric:nth-child(3) { border-right:0; }.access-panel { grid-template-columns:1fr; gap:20px; } }
@media (max-width:700px) { header,main { padding-left:18px; padding-right:18px; }.freshness { display:none; }.toolbar { margin-left:-18px; margin-right:-18px; padding:0 18px; overflow:auto; }.actions { display:none; }.metrics { grid-template-columns:repeat(2,1fr); }.metric:nth-child(3) { border-right:1px solid var(--line); }.metric:nth-child(2n) { border-right:0; }.access-panel { margin:25px auto; padding:24px; }.token-row { flex-direction:column; }.section-head { align-items:start; flex-direction:column; }.section-head input { max-width:none; }.drawer { padding:22px 16px; }.schema-stats { grid-template-columns:repeat(2,1fr); }.schema-stats div:nth-child(2) { border-right:0; }.schema-controls { grid-template-columns:1fr; } }
