:root{color-scheme:dark;--bg:#0d1016;--surface:#141922;--line:#293240;--text:#f0f3f7;--muted:#9ba8ba;--bid:#49d7ab;--ask:#ff8091;--accent:#ffac64;--nav-height:48px}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
main{width:min(1200px,100%);margin:0 auto;padding:24px 28px 20px}
h1,h2,h3,p{margin:0}
a{color:#b9c6d8;text-underline-offset:4px;text-decoration-thickness:1px}
a:hover{color:var(--text)}
button,select,input{font:inherit}
button,select{height:40px;border:1px solid #3a4659;border-radius:6px;padding:0 13px;background:#1c2430;color:var(--text)}
button{cursor:pointer;font-weight:600;white-space:nowrap}
button:hover{background:#293446}
button:disabled{cursor:wait;color:var(--muted)}
button:focus-visible,select:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.primary-button{background:var(--accent);border-color:var(--accent);color:#1a1510}
.primary-button:hover{background:#ffbd83;border-color:#ffbd83}
.primary-button:disabled{background:#705239;border-color:#705239;color:#e0c4ad}
.header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:20px}
.brand{min-width:0}
h1{font-size:27px;letter-spacing:-.8px;font-weight:650;line-height:1.3;white-space:nowrap}
h1 span{color:var(--muted);font-weight:400;font-size:21px;letter-spacing:-.4px}
.subtitle{color:var(--muted);font-size:12px;margin-top:4px}
.source-link{font-size:inherit;white-space:nowrap;text-decoration:none}
.market-summary{text-align:right;flex-shrink:0}
.label{color:var(--muted);font-size:11px}
.quote-value{display:flex;align-items:baseline;justify-content:flex-end;gap:7px;margin-top:1px}
.quote-value strong{font-size:28px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.7px;line-height:1.25}
.quote-value>span{font-size:11px;color:var(--muted)}
.secondary{font-size:11px;color:var(--muted)}
.section-nav{position:sticky;top:0;z-index:3;display:flex;gap:5px;height:var(--nav-height);padding:5px;background:var(--bg);border:1px solid var(--line);border-radius:8px}
.section-nav button{flex:1;min-width:0;height:36px;background:transparent;color:var(--muted);border-color:transparent;font-size:13px}
.section-nav button:hover{background:#1c2430;color:var(--text)}
.section-nav button[aria-selected=true]{background:#293446;color:var(--text);border-color:#46546a}
.status-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 0 17px;color:var(--muted);font-size:11px;min-height:45px}
.status{display:flex;align-items:center;gap:7px}
.status:before{content:"";width:6px;height:6px;background:var(--muted);border-radius:50%;flex-shrink:0}
.status.live:before{background:var(--bid)}
.status.error:before{background:var(--ask)}
.status.stale:before,.status.loading:before{background:var(--accent)}
#timestamp{text-align:right;font-variant-numeric:tabular-nums}
.notice{border-left:2px solid var(--accent);padding:10px 13px;background:#211c17;color:#f0c59d;margin:0 0 16px;font-size:12px;line-height:1.7}
.tab-panel{padding-bottom:24px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.section-heading>div{min-width:0;flex:1}
.section-heading>button{flex-shrink:0}
h2{font-size:18px;font-weight:600;letter-spacing:-.3px;line-height:1.4}
.section-heading p{font-size:12px;color:var(--muted);margin-top:3px}
.book-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.precision-label{display:flex;align-items:center;gap:10px;font-size:12px;color:#c2cbd7}
select{font-size:12px;cursor:pointer;min-width:140px}
.auto{display:flex;align-items:center;gap:7px;min-height:32px;white-space:nowrap;font-size:12px;color:#bac5d4;cursor:pointer}
.book-toolbar .auto{margin-left:auto}
input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px;margin:0;flex-shrink:0;cursor:pointer}
.book-explanation{display:flex;flex-wrap:wrap;gap:2px 6px;font-size:12px;line-height:1.7;padding:10px 12px;border-left:2px solid #8b735a;background:var(--surface);color:#b1bdcc}
.book-explanation strong{font-weight:600;color:#e3e8ef}
.book-view-options{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:14px 0 12px}
.book-view-options label{display:flex;align-items:center;gap:8px;font-size:12px;color:#c2cbd7;cursor:pointer}
.pool-explainer{margin:0 0 14px;padding:9px 12px;border-left:2px solid #8293ac;font-size:12px;color:#b1bdcc;background:var(--surface)}
.books{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
.book{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:8px;overflow:clip}
.side-heading{display:flex;align-items:center;justify-content:space-between;gap:6px 10px;padding:13px 15px;border-bottom:1px solid var(--line);flex-wrap:wrap}
h3{font-size:15px;font-weight:600;line-height:1.4}
.side-heading>span{font-size:10px;color:var(--muted)}
.bids h3,.bids td:first-child strong{color:var(--bid)}
.asks h3,.asks td:first-child strong{color:var(--ask)}
table{width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}
th,td{text-align:right;padding:8px 15px;font-size:13px}
th:first-child,td:first-child{text-align:left;width:40%}
thead th{position:sticky;top:var(--nav-height);z-index:1;font-size:11px;font-weight:500;line-height:1.6;color:#c2cbd7;background:#11161e;padding-top:10px;padding-bottom:10px;box-shadow:0 1px 0 var(--line)}
thead th span{color:var(--muted);font-size:10px}
tbody tr{border-top:1px solid #222b37}
tbody tr:hover{background:#1a2330}
tbody td{height:49px}
td:first-child strong{font-weight:500;font-size:13px;display:block}
.range{display:none;font-size:9px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.pool-column{display:none}
.show-pool .pool-column{display:table-cell}
.show-pool .range{display:block}
.show-pool #order-book th:first-child,.show-pool #order-book td:first-child{width:36%}
.zero{color:#718095}
.depth-cell{position:relative;isolation:isolate}
.depth-cell:before{content:"";position:absolute;right:0;top:0;bottom:0;width:var(--depth);z-index:-1;pointer-events:none}
.bids .depth-cell:before{background:rgb(73 215 171 / 9%)}
.asks .depth-cell:before{background:rgb(255 128 145 / 9%)}
.bid-alert-status{margin:0 0 12px;font-size:12px;line-height:1.7;color:var(--muted)}
.bid-alert-status.active{padding:9px 12px;border:1px solid #d8ac4d;border-radius:6px;background:#302718;color:#ffe1a0;font-weight:600}
#order-book .book.has-large-bid{border-color:#e1b552;box-shadow:0 0 0 1px rgb(225 181 82 / 30%)}
#bids tr.liquidity-alert td{background:rgb(225 181 82 / 11%);box-shadow:inset 0 1px #b88d39,inset 0 -1px #b88d39}
#bids tr.liquidity-alert td:first-child{border-left:2px solid #e1b552}
#bids tr.liquidity-alert td:last-child,body:not(.show-pool) #bids tr.liquidity-alert td:nth-child(2){border-right:2px solid #e1b552}
#bids tr.liquidity-alert td:first-child strong{color:#ffe1a0;font-weight:650}
.liquidity-flag{display:block;margin-top:3px;font-size:10px;font-weight:600;color:#ffe1a0;line-height:1.5}
.amm{color:#b2bdcc}
.dollar-value{display:block;font-size:11px;line-height:1.6;color:var(--muted);white-space:nowrap}
tfoot{border-top:1px solid #384355;background:#11161e}
tfoot th,tfoot td{font-size:11px;padding-top:12px;padding-bottom:12px;font-weight:500}
tfoot th{color:var(--muted)}
.empty{height:120px;color:var(--muted);text-align:center!important;font-size:12px;line-height:1.8}
.feature-help{font-size:12px;color:var(--muted);line-height:1.8;margin-top:10px;max-width:980px}
.feature-status{font-size:12px;color:#bac5d4;line-height:1.7;margin:12px 0}
.feature-error,.partial-fill{color:var(--ask)}
.data-details{margin-top:18px;border-top:1px solid var(--line)}
.data-details summary{padding:12px 0 0;font-size:12px;color:#b1bdcc;cursor:pointer;line-height:1.8}
.notes{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding-top:18px}
.notes h2{font-size:13px;color:#c2cbd7;margin-bottom:8px}
.notes p{font-size:12px;color:var(--muted);line-height:1.8;margin-bottom:9px}
.notes b{font-weight:500;color:#d3dce7}
.source-links{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;padding-top:5px}
.simulation-form{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
.simulation-form label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#c2cbd7}
.simulation-form input,.address-inspector input{height:40px;min-height:40px;background:#0f141c;color:var(--text);border:1px solid #3a4659;border-radius:6px;padding:0 12px;font-size:14px;min-width:0}
.simulation-form input{width:170px}
.simulation-form input:disabled{color:var(--muted)}
.simulation-results{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-top:16px}
.simulation-side{border:1px solid var(--line);border-radius:8px;padding:18px;background:var(--surface)}
.simulation-side.buy h3{color:var(--bid)}
.simulation-side.sell h3{color:var(--ask)}
.simulation-metrics{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px 20px;margin:18px 0 0;font-variant-numeric:tabular-nums}
.simulation-metrics dt{font-size:11px;color:var(--muted);margin-bottom:5px}
.simulation-metrics dd{font-size:17px;line-height:1.4;margin:0;letter-spacing:-.3px;overflow-wrap:anywhere}
.simulation-metrics small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.metric-primary{padding-bottom:14px;border-bottom:1px solid var(--line)}
.metric-primary dd{font-size:23px;font-weight:600}
.buy .metric-primary:nth-child(2) dd{color:var(--bid)}
.sell .metric-primary:nth-child(2) dd{color:var(--ask)}
.address-inspector{padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:8px;scroll-margin-top:calc(var(--nav-height) + 12px)}
#address-form{display:flex;flex-direction:column;gap:8px}
#address-form>label{font-size:12px;color:#c2cbd7}
.address-search{display:flex;gap:10px}
#address-input{flex:1;width:100%;font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px}
#address-submit{min-width:104px}
#address-status{margin:9px 0 0}
#address-detail{scroll-margin-top:calc(var(--nav-height) + 12px)}
#address-detail:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.address-identity{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;padding:16px 0 12px;font-size:12px}
.address-full{font-family:ui-monospace,SFMono-Regular,monospace;overflow-wrap:anywhere;color:#e2e9f2;user-select:all;flex:1 1 330px}
.address-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.address-actions a{font-size:11px;white-space:nowrap}
.quiet-button{height:30px;padding:0 9px;background:#1c2430;font-size:11px;font-weight:500}
.copy-status{font-size:11px;color:var(--bid);flex-basis:100%}
.copy-status:empty{display:none}
.address-metrics{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.address-side{padding:14px;border:1px solid var(--line);border-radius:6px;background:#10151e}
.address-side:only-child{grid-column:1/-1}
.address-side h3{font-size:14px}
.address-side dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;margin:15px 0 0;font-variant-numeric:tabular-nums}
.address-side:only-child dl{grid-template-columns:repeat(4,minmax(0,1fr))}
.address-side dt{font-size:11px;color:var(--muted)}
.address-side dd{font-size:14px;margin:4px 0 0;overflow-wrap:anywhere}
.address-side dl>div:nth-child(-n+2) dd{font-size:19px;font-weight:600}
.ranking-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:18px 0 12px}
.ranking-toolbar .feature-status{margin:0;font-size:11px}
.coverage-note{color:#ceb89e;font-size:11px;line-height:1.8;margin-top:3px}
.ranking-count{font-size:11px;color:var(--muted);flex-shrink:0}
.ranking-count select{height:34px;min-width:85px;margin-left:7px;font-size:12px}
.ranking-side-toggle{display:none}
.ranking-table th:first-child,.ranking-table td:first-child{width:39%}
.ranking-table th:last-child,.ranking-table td:last-child{width:25%}
.ranking-table td{font-size:13px}
.address-button{height:auto;padding:4px 0;background:none;border:0;color:#c7d6e8;font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;font-weight:500;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
.address-button:hover{background:none;color:var(--text)}
.ranking-number{display:inline-block;min-width:12px;color:var(--muted);font-size:10px;margin-right:5px}
.ranking-table tr.is-selected{background:#223143;box-shadow:inset 3px 0 #9cb9df}
.ranking-table tr.is-selected .address-button{color:#fff}
footer{border-top:1px solid var(--line);padding-top:14px;color:#8897ad;font-size:11px}
@media(max-width:900px){.books,.simulation-results{gap:16px}.side-heading{padding:12px}th,td{padding-left:12px;padding-right:12px}.show-pool #order-book th,.show-pool #order-book td{padding-left:10px;padding-right:10px}.ranking-table td{font-size:12px}.ranking-table th:first-child,.ranking-table td:first-child{width:42%}.ranking-number{min-width:10px;margin-right:4px}.simulation-metrics{gap:16px 12px}.metric-primary dd{font-size:20px}.address-side:only-child dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){main{padding:20px 16px 18px}.header{gap:12px;padding-bottom:17px}h1{font-size:23px}h1 span{font-size:17px}.subtitle{font-size:11px}.quote-value strong{font-size:25px}.quote-value>span{font-size:10px}.market-summary .label{font-size:10px}.books,.simulation-results,.address-metrics{grid-template-columns:minmax(0,1fr);gap:16px}.status-row{gap:10px;font-size:10px;padding:10px 0 16px}.status{max-width:54%}#timestamp{max-width:46%}.section-heading{align-items:flex-start;gap:12px}.section-heading h2{font-size:17px}.section-heading p{font-size:11px}.section-heading>button{height:34px;padding:0 10px;font-size:11px}.book-toolbar{gap:10px}.precision-label{flex:1;align-items:flex-start;flex-direction:column;gap:6px}.precision-label select{width:100%;min-width:0}.book-toolbar>button{align-self:flex-end}.book-toolbar .auto{margin-left:0;order:3;width:100%;min-height:24px}.book-view-options{gap:8px}.side-heading{padding:12px 14px}th,td{padding-left:14px;padding-right:14px}.notes{grid-template-columns:minmax(0,1fr);gap:16px}.simulation-form{padding:14px;gap:12px}.simulation-form label{flex:1;min-width:110px}.simulation-form input{width:100%}.simulation-form button{width:100%}.simulation-side{padding:16px}.simulation-metrics{gap:16px}.metric-primary dd{font-size:22px}.address-inspector{padding:12px}.address-side:only-child dl{grid-template-columns:repeat(2,minmax(0,1fr))}.ranking-toolbar{align-items:flex-start;flex-wrap:wrap;gap:8px}.ranking-count{display:flex;align-items:center;justify-content:space-between;width:100%}.ranking-count select{margin-left:0}.ranking-table th:first-child,.ranking-table td:first-child{width:42%}.ranking-table td{padding-left:11px;padding-right:11px}.ranking-table th:last-child,.ranking-table td:last-child{width:25%}.address-button{font-size:11px}.address-actions{gap:10px}.feature-help{font-size:11px}.address-side dl>div:nth-child(-n+2) dd{font-size:18px}}
@media(max-width:380px){h1{font-size:21px}h1 span{font-size:15px}.subtitle{font-size:10px}.quote-value strong{font-size:23px}.quote-value{gap:4px}.section-nav button{padding:0 8px}.address-search{flex-direction:column}.address-search button{width:100%}.section-heading{flex-wrap:wrap}.section-heading>button{margin-left:auto}.book-view-options{align-items:flex-start;flex-direction:column}.ranking-table td,.ranking-table th{padding-left:9px;padding-right:9px}.ranking-table .dollar-value{font-size:10px}.ranking-number{min-width:9px;margin-right:3px}.simulation-metrics{gap:14px 10px}.metric-primary dd{font-size:19px}.address-actions{gap:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
@media(max-width:380px){.section-heading{flex-wrap:nowrap}}
@media(max-width:680px){.ranking-side-toggle{display:flex;gap:6px;padding:4px;margin-bottom:12px;border:1px solid var(--line);border-radius:7px}.ranking-side-toggle button{flex:1;height:34px;font-size:12px;background:transparent;border-color:transparent;color:var(--muted)}.ranking-side-toggle button[aria-pressed=true]{background:#293446;border-color:#46546a;color:var(--text)}.positions-books[data-side=long] #short-ranking-book,.positions-books[data-side=short] #long-ranking-book{display:none}}
