*{box-sizing:border-box}
body{margin:0;background:#f6f8fa;color:#1b2d3c;font:15px/1.45 "DM Sans",system-ui,-apple-system,sans-serif}
header{background:#162a3d;color:#d6e3ee;height:64px;display:flex;align-items:center;gap:18px;padding:0 30px}
header b{font-size:21px;color:white;letter-spacing:-.8px;white-space:nowrap}
.mark{color:#9bd6c5;margin-right:6px}
.divider{height:20px;width:1px;background:#6b859c}
.layout{display:grid;grid-template-columns:255px minmax(0,1fr);height:calc(100dvh - 64px)}
aside{padding:22px 15px;overflow:auto;border-right:1px solid #cbd7e2;background:#ebf0f5}
aside h2{margin:0 0 14px;font-size:18px}
input,select,button{font:inherit;color:inherit;border:1px solid #b5c4d2;border-radius:6px;background:white;padding:8px 11px}
input{min-width:0}
aside input{width:100%}
button,summary{cursor:pointer}
button:hover,summary:hover{background:#e2ecf4}
button:disabled{opacity:.4;cursor:default}
details{margin-top:15px}
summary{font-weight:650;padding:4px}
nav button{margin:1px 0;border:0;text-align:left;background:transparent;width:100%;padding:6px 10px;overflow-wrap:anywhere;font-size:14px}
nav button.active{background:#cfe2ef;color:#122d44;font-weight:650}
main{padding:26px clamp(15px,3vw,48px);min-height:0;display:flex;flex-direction:column}
#path,.muted,footer{color:#4f6678}
#path{font:12px/1.5 monospace;overflow-wrap:anywhere}
h1{font:normal clamp(32px,3.8vw,50px)/1.06 "Source Serif 4",Georgia,serif;margin:10px 0 0;letter-spacing:-1.5px;color:#122536}
.muted{margin:8px 0 18px}
.toolbar{display:flex;gap:8px;margin-bottom:15px}
.toolbar input{width:min(360px,60%)}
select{max-width:40%}
.grid{overflow:auto;border:1px solid #c9d5e0;border-radius:8px;background:white;min-height:100px}
table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid #e1e8ef;max-width:290px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
th{background:#e6edf4;position:sticky;top:0;z-index:1}
th button{font:inherit;font-weight:650;border:0;background:none;padding:0}
td:first-child,th:first-child{position:sticky;left:0;background:#f0f4f8}
th:first-child{z-index:2}
td button{font:inherit;padding:2px 7px}
tbody tr:hover td{background:#f2f7fb}
footer,.dialoghead{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0}
footer{font-size:13px}
dialog{color:inherit;width:min(740px,94vw);border:1px solid #aebfce;border-radius:12px;padding:12px 22px;max-height:85vh}
dialog::backdrop{background:#10223380}
.dialoghead{position:sticky;top:-12px;background:white}
.dialoghead h2{margin:0}
dt{font-weight:650}
dd{margin:3px 0 14px;white-space:pre-wrap;overflow-wrap:anywhere}

.navlinks{margin-left:auto;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.navlink{color:#d6e3ee;font-size:14px;text-decoration:none;padding:5px 10px;border-radius:6px;white-space:nowrap}
.navlink:hover{color:white;background:#233f59}
.navlink.active{color:white;background:#264b68;font-weight:650}

.explorer{max-width:1580px;margin:auto;width:100%}
.kpibar{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:0 0 16px}
.kpicard{background:white;border:1px solid #cdd9e4;border-radius:8px;padding:10px 14px}
.kpicard b{display:block;font-size:22px;line-height:1.15;color:#142d42;letter-spacing:-.5px}
.kpicard span{font-size:12px;color:#51687a}

.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.filters label{display:grid;gap:5px;font-weight:650;font-size:13px;color:#21394d}
.filters select,.filters input{max-width:100%;width:min(220px,84vw);font-weight:400}
.filters button{font-size:14px}

.atlasgrid{max-height:70vh}
.atlasgrid table{min-width:900px;table-layout:fixed}
.atlasgrid td,.atlasgrid th{white-space:normal;vertical-align:top;overflow-wrap:anywhere;max-width:none}
.atlasgrid th:nth-child(1){width:11%}
.atlasgrid th:nth-child(2){width:13%}
.atlasgrid th:nth-child(3){width:19%}
.atlasgrid th:nth-child(4){width:18%}
.atlasgrid td:first-child{background:#f5f8fb}
.atlasgrid small{display:block;color:#4f6678;margin-top:3px}
.atlasgrid p{margin:0 0 6px}
.atlasgrid details{margin-top:4px}
.atlasgrid summary,.atlasgrid a{color:#1d5575}
.atlasgrid section{border-top:1px solid #d6e1eb;padding:10px 0}
.atlasgrid details>p{padding:6px 0}
.atlasgrid th{z-index:3}
.explorer #count{margin:14px 0 8px;color:#3d586e;font-size:14px}

.pill{display:inline-block;padding:2px 8px;border-radius:999px;font-weight:700;font-size:13px}
.score-high{background:#d4edda;color:#14532d}
.score-liver{background:#d6eaf8;color:#1b4f72}
.score-mid{background:#fef3c7;color:#78350f}
.score-low{background:#e9eef2;color:#455a64}
.score-x{background:#fadbd8;color:#78281f}

.axes{display:flex;flex-wrap:wrap;gap:3px;margin-top:5px}
.axis{font:11px/1.3 monospace;background:#e8f0f6;color:#27445c;padding:1px 4px;border-radius:4px}
.evalcard{background:#f6f9fc;border:1px solid #d6e2ec;border-radius:6px;padding:10px 12px;margin:6px 0}
.evalcard p{margin:0 0 5px;font-size:12.5px}
.mutedline{color:#50687a}
.gaps{color:#7c2d12;margin-top:6px}

.contextpanels{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;margin:14px 0}
.panelcard{background:white;border:1px solid #c9d5e0;border-radius:8px;padding:12px 14px}
.panelcard h2{font-size:15px;margin:0 0 8px;color:#162a3d}
.panelcard ul{margin:0;padding-left:18px;font-size:13px}
.panelcard li{margin-bottom:5px}

.badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.badge{display:inline-block;font-size:11px;font-weight:650;padding:1px 6px;border-radius:999px}
.badge-rna{background:#d4edda;color:#14532d}
.badge-aso{background:#e0ecff;color:#1e40af}
.badge-curated{background:#d6eaf8;color:#1b4f72}
.badge-risk{background:#fadbd8;color:#78281f}
.badge-endo{background:#e8f0fe;color:#1a4b84}
.badge-pat{background:#f3e8ff;color:#5b21b6}
.badge-granted{background:#d4edda;color:#14532d}
.badge-pending{background:#fef3c7;color:#78350f}

.deliverygrid th:nth-child(1){width:12%}
.deliverygrid th:nth-child(2){width:16%}
.deliverygrid th:nth-child(3){width:20%}
.deliverygrid th:nth-child(4){width:19%}

.patentgrid th:nth-child(1){width:15%}
.patentgrid th:nth-child(2){width:27%}
.patentgrid th:nth-child(3){width:18%}
.patentgrid th:nth-child(4){width:16%}

.assetsbox{margin-top:18px}
.tabbar{display:flex;gap:8px;margin:14px 0 8px;flex-wrap:wrap}
.tabbtn{border:1px solid #b5c4d2;background:white;border-radius:6px;padding:7px 14px;font-weight:600;font-size:13.5px}
.tabbtn.active{background:#162a3d;color:white;border-color:#162a3d}

@media(max-width:720px){
  .layout{display:flex;flex-direction:column;height:auto}
  aside{max-height:175px}
  main{padding:16px}
  .grid{max-height:62vh}
  header{padding:0 16px;height:auto;min-height:54px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
}
