:root{
    --bg:#0b0b0f;
    --panel:#101116;
    --panel2:#0e0f14;
    --line:rgba(255,255,255,.08);
    --text:#f5f5f5;
    --muted:rgba(245,245,245,.65);
    --btc:#f7931a;
    --ok:#2bd4a7;
    --warn:#f3c14b;
    --bad:#fb7185;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial;
    --shadow: 0 12px 40px rgba(0,0,0,.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
    margin:0;
    font-family:var(--sans);
    background: var(--bg);
    color:var(--text);
    position:relative;
    z-index:0;
}

body::before{
    content:none;
}

.wrap{
    max-width:1120px;
    margin:0 auto;
    padding:26px 16px 44px;
    position:relative;
    z-index:1;
}

header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
    border-bottom:1px solid var(--line);
    padding-bottom:14px;
}

.brand{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.kicker{
    display:flex;
    align-items:center;
    gap:10px;
    font-family:var(--mono);
    letter-spacing:.4px;
    font-size:12px;
    color:var(--muted);
    text-transform:uppercase;
}

.kicker .dot{
    width:8px;
    height:8px;
    background:var(--btc);
}

h1{
    margin:0;
    font-size: clamp(22px, 3vw, 34px);
    line-height:1.05;
    letter-spacing:.2px;
    font-weight:820;
}

.sub{
    color:var(--muted);
    font-size:13.5px;
    line-height:1.4;
    max-width:72ch;
}

.meta{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:8px;
    min-width: 220px;
}

.stamp{
    font-family:var(--mono);
    font-size:12px;
    color:var(--muted);
}

.stamp strong{
    color:var(--text);
    font-weight:720;
}

.grid{
    display:grid;
    grid-template-columns: 1.2fr .8fr;
    gap:14px;
    margin-top:14px;
}

@media (max-width: 980px){
    .grid{ grid-template-columns:1fr; }
    header{ flex-direction:column; align-items:flex-start; }
    .meta{ align-items:flex-start; min-width:auto; }
}

.panel{
    background: var(--panel);
    border:1px solid var(--line);
    box-shadow: var(--shadow);
}

.panelHd{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    padding:14px 14px 10px;
    border-bottom:1px solid var(--line);
}

.panelHd h2{
    margin:0;
    font-size:14px;
    font-weight:820;
    letter-spacing:.35px;
    text-transform:uppercase;
    font-family:var(--mono);
}

.panelHd .hint{
    color:var(--muted);
    font-size:12px;
    font-family:var(--mono);
    letter-spacing:.25px;
}

.panelBd{
    padding:14px;
}

.topRow{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}

.bigPct{
    font-size:34px;
    font-weight:900;
    letter-spacing:.4px;
    line-height:1;
}

.bigPct span{
    color:var(--btc);
}

.smallMeta{
    text-align:right;
    color:var(--muted);
    font-size:12px;
    line-height:1.35;
    font-family:var(--mono);
}

.bar{
    position:relative;
    height:14px;
    border:1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    overflow:hidden;
}

.fill{
    height:100%;
    width:0%;
    background: var(--btc);
    transition: width 850ms cubic-bezier(.2,.85,.2,1);
}

.threshold{
    position:absolute;
    top:-8px;
    width:2px;
    height:30px;
    background: rgba(255,255,255,.85);
    opacity:.9;
}

.thrTag{
    position:absolute;
    top:-30px;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size:11px;
    letter-spacing:.2px;
    color: rgba(0,0,0,.95);
    background: rgba(255,255,255,.9);
    padding:4px 8px;
    white-space:nowrap;
}

.statusRow{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:10px;
    color:var(--muted);
    font-size:12.5px;
    font-family:var(--mono);
}

.badge{
    display:inline-flex;
    align-items:center;
    gap:10px;
    border:1px solid rgba(255,255,255,.14);
    padding:6px 10px;
    color:var(--text);
    background: rgba(0,0,0,.20);
    font-family:var(--mono);
    font-size:12px;
    letter-spacing:.2px;
    text-transform:uppercase;
    white-space:nowrap;
}

.badge i{
    width:8px;
    height:8px;
    display:inline-block;
    background: rgba(255,255,255,.5);
}

.stats{
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:10px;
    margin-top:12px;
}

.kpi{
    border:1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.18);
    padding:12px;
}

.kpi .label{
    color:var(--muted);
    font-size:11px;
    font-family:var(--mono);
    letter-spacing:.25px;
    text-transform:uppercase;
    margin-bottom:6px;
}

.kpi .val{
    font-size:20px;
    font-weight:860;
    letter-spacing:.2px;
    color:var(--text);
}

.kpi .subv{
    margin-top:6px;
    color:var(--muted);
    font-size:11.5px;
    font-family:var(--mono);
    line-height:1.35;
}

.kpiWide{
    grid-column: 1 / -1;
}

.bubbleBox{
    position:relative;
    height:420px;
    width:100%;
    border:1px solid rgba(255,255,255,.10);
    overflow:hidden;

    background-color: #0b0b0f;

    background-image:
        linear-gradient(rgba(247,147,26,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247,147,26,.05) 1px, transparent 1px);

    background-size: 48px 48px;
}

.overlay{
    position:fixed;
    inset:0;
    background: rgba(0,0,0,.78);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:99;
}

.loader{
    width:min(520px, 92vw);
    border:1px solid rgba(255,255,255,.12);
    background: rgba(12,12,16,.92);
    box-shadow: var(--shadow);
    padding:16px;
}

.loadRow{
    display:flex;
    align-items:center;
    gap:12px;
}

.spinner{
    width:18px;
    height:18px;
    border:2px solid rgba(255,255,255,.18);
    border-top-color: var(--btc);
    animation: spin 1s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

.loadTxt{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.loadTxt .a{
    font-weight:820;
    letter-spacing:.2px;
}

.loadTxt .b{
    color:var(--muted);
    font-size:12.5px;
    font-family:var(--mono);
}

.err{
    margin-top:12px;
    border:1px solid rgba(251,113,133,.35);
    background: rgba(251,113,133,.10);
    padding:10px 12px;
    color: rgba(255,255,255,.92);
    font-size:12.5px;
    line-height:1.35;
    font-family:var(--mono);
    display:none;
}

footer{
    margin-top:16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-top:1px solid var(--line);
    padding-top:14px;
    color:var(--muted);
    font-size:12px;
    font-family:var(--mono);
}

.xbtn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color: var(--text);
    border:1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.22);
    padding:10px 12px;
    font-family:var(--mono);
    letter-spacing:.25px;
    text-transform:uppercase;
}

.xbtn:hover{
    border-color: rgba(247,147,26,.55);
}

.xlogo{
    width:12px;
    height:12px;
    display:inline-block;
    background: var(--text);
    clip-path: polygon(10% 0%, 25% 0%, 50% 35%, 75% 0%, 90% 0%, 60% 50%, 90% 100%, 75% 100%, 50% 65%, 25% 100%, 10% 100%, 40% 50%);
    opacity:.9;
}

#implMain .knotsCount {
  color: var(--btc);
  font-weight: 800;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:-1;

    background-image:
        linear-gradient(rgba(247,147,26,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247,147,26,.05) 1px, transparent 1px);

    background-size: 48px 48px;
    opacity:.35;
}