/* Metronome Insights — shared with the Paper design. */
:root {
  --bg: #100f0f; --s1: #1a1919; --s2: #211f1f; --s3: #292828;
  --hair: #292828; --hair2: #403d3d;
  --t1: #fff; --t2: #bcbaba; --t3: #908e8e;
  --pos: #85c4ad; --posdim: rgba(133,196,173,.1);
  --neg: #cc927d; --negdim: rgba(204,146,125,.1);
  --warn: #cc927d; --accent: #afaaa7;
  --sans: Inter, system-ui, sans-serif; --mono: var(--sans);
  --cpad: 24px;
  --panel-open-dur: 400ms;
  --panel-close-dur: 350ms;
  --panel-translate-y: 100px;
  --panel-blur: 2px;
  --panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--t2); outline-offset: 3px;
}
.term { display: grid; grid-template-columns: 240px minmax(0,1fr); padding: 0; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 24px 12px; border-right: 1px solid var(--hair); overflow-y: auto; }
.brand { padding: 4px 12px 0; }
.brand .mark svg { width: 138px; height: 19px; }
.brand path { fill: var(--t1); }
.mobile-actions { display: none; }
.section-trigger, .sheet-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--hair); border-radius: 12px; background: var(--s1); color: var(--t1); cursor: pointer; }
.section-trigger span, .sheet-close span { display: flex; }
.section-trigger:hover, .sheet-close:hover { border-color: var(--hair2); background: var(--s2); }
.section-trigger:focus-visible, .sheet-close:focus-visible { outline: 2px solid var(--pos); outline-offset: 3px; }
.sheet-open { overflow: hidden; overscroll-behavior: none; }
.section-sheet { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--t1); overflow: hidden; }
.section-sheet[open] { display: flex; justify-content: flex-end; }
.section-sheet::backdrop { background: rgba(0,0,0,.65); }
.sheet-panel { display: flex; flex-direction: column; width: min(340px,calc(100% - 48px)); height: 100%; padding: max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) 16px; border-left: 1px solid var(--hair2); border-radius: 24px 0 0 24px; background: var(--s1); box-shadow: -12px 0 48px rgba(0,0,0,.25); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 16px; padding: 4px 8px 18px; }
.sheet-eyebrow { margin-bottom: 4px; color: var(--t3); font-size: 10px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; }
.sheet-header h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: -.02em; }
.sheet-close { border-color: var(--hair2); background: transparent; }
#section-options { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.section-icon { display: flex; flex-shrink: 0; color: var(--t3); }
.section-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; flex-shrink: 0; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--t2); font-size: 15px; line-height: 24px; text-align: left; cursor: pointer; }
.section-option-label { flex: 1; }
.section-option::after { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: transparent; }
.section-option:hover { background: var(--s2); color: var(--t1); }
.section-option[aria-current="page"] { background: var(--posdim); color: var(--t1); }
.section-option[aria-current="page"] .section-icon { color: var(--pos); }
.section-option[aria-current="page"]::after { background: var(--pos); }
.section-option:focus-visible { outline: 2px solid var(--pos); outline-offset: -2px; }

.t-panel-slide {
  transform: translateY(var(--panel-translate-y));
  opacity: 0;
  filter: blur(var(--panel-blur));
  pointer-events: none;
  transition:
    transform var(--panel-close-dur) var(--panel-ease),
    opacity   var(--panel-close-dur) var(--panel-ease),
    filter    var(--panel-close-dur) var(--panel-ease);
  will-change: transform, opacity, filter;
}
.t-panel-slide[data-open="true"] {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transition:
    transform var(--panel-open-dur) var(--panel-ease),
    opacity   var(--panel-open-dur) var(--panel-ease),
    filter    var(--panel-open-dur) var(--panel-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-panel-slide { transition: none !important; }
}
.sheet-panel.t-panel-slide { transform: translateX(100%); }
.sheet-panel.t-panel-slide[data-open="true"] { transform: translateX(0); }
.navlabel { padding: 34px 12px 12px; font-size: 11px; color: var(--t3); text-transform: uppercase; }
.tabs { position: static; display: flex; flex-direction: column; gap: 4px; border: 0; background: transparent; overflow: visible; margin-bottom: 24px; }
.tab { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; text-align: left; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--t3); }
.tab svg { width: 18px; height: 18px; flex-shrink: 0; }
.tab:hover { background: var(--s1); }
.tab.on { background: var(--s2); color: var(--t1); }
.mkt { display: flex; flex-direction: column; gap: 12px; padding: 24px 12px; border-top: 1px solid var(--hair); }
.mkt .m { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 28px; }
.mkt .token-logo { display: block; width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; border-radius: 50%; }
.mkt .m .k { flex: 1; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--t2); }
.mkt .m .v { flex-shrink: 0; font-size: 14px; text-align: right; }
.mkt .m:nth-child(3), .mkt .m:nth-child(5) { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--hair); }
.mkt .price-note { margin-left: 4px; color: var(--t3); font-size: 10px; }
.workspace { min-width: 0; padding: 0 32px; display: flex; flex-direction: column; min-height: 100vh; }
#app { flex: 1 0 auto; display: flex; flex-direction: column; }
/* align row tables flush with their column heading (no sideways drift) */
.peghead, .pegrow, .leqhead, .leqrow, .bbhead, .bbrow, .arhead, .capgrp, .caprow { padding-left: 0; padding-right: 0; }
/* breathing room between the Collateral summary cards and the two columns below */
#sec-collateral .main { margin-top: 36px; }
/* Collateral rows: wider amount column so the "$value + raw amount" never wraps, more row height */
#sec-collateral .r { grid-template-columns: 12px minmax(0,1fr) 130px 42px; min-height: 54px; }
#sec-collateral .r .amt .pair2 { white-space: nowrap; }
.top { position: sticky; top: 0; z-index: 40; height: 76px; gap: 24px; flex-direction: row; align-items: center; background: var(--bg); }
.search { display: flex; align-items: center; gap: 10px; width: 390px; height: 38px; padding: 0 14px; border: 1px solid var(--hair); border-radius: 999px; color: var(--t3); }
.search span, .search svg { display: block; flex-shrink: 0; }
.search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--t1); font-size: 14px; }
.search input::placeholder { color: var(--t3); }
.sys { gap: 18px; flex-shrink: 0; }
.sysgrp .lbl { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.sysgrp .val { font-size: 12px; color: var(--t1); }
.rfrs { padding: 7px 16px; border: 0; border-radius: 999px; color: var(--bg); background: var(--t1); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.rfrs:hover { background: #e4e1e1; }
.sec { padding-bottom: 0; }
.shead, .sec:first-child .shead { min-height: 32px; margin: 24px 0 20px; padding: 0; border: 0; background: none; }
.shead .st { font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.02em; text-transform: none; }
.shead .sr { padding-right: 0; }
.band { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; border: 0; }
.cell, .cell:first-child, .cell:last-child { min-height: 260px; padding: 24px; border: 1px solid var(--hair); border-radius: 12px; background: var(--s1); }
.cell .head { margin-bottom: 24px; }
.cell .head .nm { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.big { font-size: 36px; line-height: 44px; font-weight: 500; }
.big.pos, .pct.ok { color: var(--t1); }
.pct { font-size: 32px; line-height: 40px; font-weight: 500; }
.pctcap { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.statechip { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.sub { font-size: 12px; margin-top: 10px; }
.kv { gap: 20px; }
.kv .st { gap: 6px; }
.kv .st .k { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.kv .st .v { font-size: 14px; }
.gauge { border-radius: 999px; margin-top: 18px; }
.gauge .fill.pos { background: var(--pos); }
.gauge .fill.neg { background: var(--neg); }
.gscale { font-size: 10px; letter-spacing: 0; }
.ovstats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 28px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.ovt { min-height: 116px; padding: 20px; background: var(--s1); border: 1px solid var(--hair); border-radius: 12px; }
.ovk { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ovv { font-size: 22px; font-weight: 500; }
.ovs { font-size: 12px; }
.col > .title .nm { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: 0; }
.blockhead .l .h { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.blockhead .tot { font-size: 14px; }
.r, .kid { grid-template-columns: 12px minmax(0,1fr) 94px 38px; gap: 10px; }
.r { border-radius: 6px; }
.r .nm, .r .amt { font-size: 14px; }
.r.total .nm, .leqrow.tot .lnm, .caprow.tot .ck { font-weight: 500; text-transform: none; letter-spacing: 0; }
.r .car { display: inline-flex; align-items: center; width: 16px; height: 16px; border: 0; transform: none; margin-left: 4px; }
.r.open .car { transform: rotate(90deg); }
.i { border: 0; flex-shrink: 0; }
.i svg { display: block; }
.stack { border-radius: 999px; }
.burns-band { gap: 24px; padding: 24px; border: 1px solid var(--hair); border-radius: 12px; background: var(--s1); }
.burns-band .bh { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.burns-band .bstat .n { font-size: 28px; font-weight: 500; }
.burns-band .bstat .u { font-weight: 400; letter-spacing: 0; text-transform: none; }
#sec-burns .ovstats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.capbox { max-width: none; }
.capgrp, .leqhead, .peghead, .bbhead, .arhead, .ar .al, .ar .side, .szsel .szlbl { letter-spacing: 0; font-weight: 400; text-transform: none; font-size: 12px; }
.szsel button, .szsel .szin { border-radius: 6px; font-size: 12px; }
.bbwrap { min-height: 0; }
.foot { margin-top: auto; padding: 40px 0 24px; font-size: 12px; letter-spacing: 0; text-transform: none; }
.foot .f .k { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
#search-empty { padding: 24px 0; color: var(--t2); }
#toTop { background: var(--s2); color: var(--t1); border-color: var(--hair); }
.chart-card { margin-top: 28px; padding: 24px; border: 1px solid var(--hair); border-radius: 12px; background: var(--s1); }
#sec-buybacks .chart-card { margin-top: 0; margin-bottom: 28px; }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chart-header h3 { margin: 0 0 8px; color: var(--t2); font-size: 14px; line-height: 20px; font-weight: 500; }
.chart-value { font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart-description { margin-top: 6px; color: var(--t3); font-size: 12px; line-height: 18px; }
.chart-controls { display: flex; flex-shrink: 0; padding: 3px; gap: 3px; border: 1px solid var(--hair); border-radius: 8px; }
.chart-controls button { padding: 5px 10px; border: 0; border-radius: 5px; color: var(--t3); background: transparent; font-size: 12px; line-height: 18px; cursor: pointer; }
.chart-controls button[aria-pressed="true"] { color: var(--t1); background: var(--s2); }
.chart-controls button:hover:not(:disabled) { color: var(--t1); }
.chart-controls button:disabled { cursor: default; opacity: .5; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 24px; margin: 22px 0 12px; }
.chart-series { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 18px; color: var(--t2); }
.chart-series strong { color: var(--t1); font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-series-qty { color: var(--t3); font-variant-numeric: tabular-nums; }
.chart-swatch { width: 18px; height: 0; border-top: 2px solid; }
.chart-swatch.dashed { border-top-style: dashed; }
.chart-plot { width: 100%; height: 280px; }
.chart-plot .recharts-wrapper:focus-visible { outline: 2px solid var(--t2); outline-offset: 3px; border-radius: 4px; }
.chart-empty { min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 32px; text-align: center; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.chart-empty strong { font-size: 16px; line-height: 24px; font-weight: 500; }
.chart-empty span { max-width: 380px; font-size: 13px; line-height: 20px; color: var(--t3); }
.chart-note { padding-top: 16px; color: var(--t3); font-size: 12px; line-height: 18px; }
.chart-tooltip { min-width: 200px; padding: 14px 16px; border: 1px solid var(--hair2); border-radius: 8px; background: var(--s2); color: var(--t1); font-size: 12px; line-height: 18px; }
.chart-tooltip-date { margin-bottom: 10px; color: var(--t2); }
.chart-tooltip-row { display: flex; justify-content: space-between; gap: 28px; margin-top: 6px; }
.chart-tooltip-row strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-tooltip-foot { margin-top: 10px; color: var(--t3); max-width: 260px; }
@media (max-width: 1400px) {
  .main3 { grid-template-columns: 1fr; }
  .main3 > .col { padding: 0 0 32px; }
  .main3 > .col + .col { border-left: 0; border-top: 1px solid var(--hair); padding-top: 28px; }
}
@media (max-width: 1180px) {
  .band { grid-template-columns: 1fr; }
  .cell, .cell:first-child, .cell:last-child { min-height: 240px; padding: 24px; }
  .ovstats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .main { grid-template-columns: 1fr; }
  .main > .col { padding: 0 0 32px; }
  .main > .col + .col { border-left: 0; border-top: 1px solid var(--hair); padding-top: 28px; }
  .search { width: 300px; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .term { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: auto; padding: calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left)); border-right: 0; border-bottom: 1px solid var(--hair); background: var(--bg); overflow: visible; }
  .brand { flex-shrink: 0; padding: 0; }
  .brand .mark svg { width: 128px; height: auto; }
  .navlabel, .mkt, .tabs { display: none; }
  .mobile-actions { display: flex; align-items: center; gap: 8px; }
  .workspace { padding: 0 max(16px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px,env(safe-area-inset-left)); }
  .top { position: relative; height: auto; min-height: 0; flex-wrap: wrap; gap: 8px; padding: 16px 0 0; }
  .search { display: none; }
  .sys { width: 100%; justify-content: space-between; }
  .sysgrp { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
  .sysgrp .val { font-size: 11px; }
  .mobile-actions .rfrs { flex-shrink: 0; min-height: 44px; padding: 0 12px; font-size: 13px; }
  .shead, .sec:first-child .shead { margin: 18px 0 16px; gap: 12px; }
  .shead .st { font-size: 22px; line-height: 28px; }
  .shead .sr { width: 100%; flex-wrap: wrap; gap: 8px; }
  .sstale { display: inline-block; margin-left: 8px; }
  .band { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .cell, .cell:first-child, .cell:last-child { min-height: 0; padding: 18px 16px; }
  .band > .cell:first-child { grid-column: 1 / -1; }
  .cell .head { margin-bottom: 14px; flex-wrap: wrap; }
  .cell .head .nm { font-size: 13px; }
  .big { font-size: 32px; line-height: 40px; }
  .sub { font-size: 12px; line-height: 18px; }
  .band > .cell:first-child .kv { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding-top: 18px; }
  .kv .st .k { font-size: 10px; }
  .kv .st .v { font-size: 13px; }
  .band > .cell:not(:first-child) .kv { flex-direction: column; gap: 10px; padding-top: 14px; }
  .band > .cell:not(:first-child) .kv .st { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; }
  .pctline { flex-wrap: wrap; gap: 2px 6px; }
  .pct { font-size: 26px; line-height: 34px; }
  .gauge { margin-top: 12px; }
  .gscale { font-size: 9px; }
  .gscale b { font-weight: 400; }
  .ovstats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 20px; }
  .ovt { min-height: 0; padding: 14px; }
  .ovk { font-size: 11px; }
  .ovv { font-size: 18px; line-height: 24px; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .ovs { font-size: 11px; line-height: 17px; }
  .r, .kid { grid-template-columns: 8px minmax(0,1fr) auto; column-gap: 8px; row-gap: 2px; min-height: 48px; padding: 10px 0; }
  .r .dot, .kid > span:first-child { grid-column: 1; grid-row: 1 / span 2; }
  .r .nm, .kid .knm { grid-column: 2; grid-row: 1 / span 2; white-space: normal; overflow-wrap: anywhere; }
  .r .amt, .kid .kamt { grid-column: 3; grid-row: 1; }
  .r .pc, .kid .kpc { grid-column: 3; grid-row: 2; font-size: 11px; }
  .r.total .nm { grid-column: 1 / 3; grid-row: 1; }
  .r.total .amt { grid-column: 3; grid-row: 1; }
  .r.pad { display: none; }
  .kid { padding-left: 16px; }
  .kids.open { max-height: none; }
  .kid .kqty { white-space: normal; }
  .block { margin-top: 24px; }
  .leqhead, .bbhead { display: none; }
  .leqrow, .bbrow { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px 16px; padding: 16px 0; min-width: 0; border-bottom: 1px solid var(--hair); }
  .leqrow > span, .bbrow > span { min-width: 0; }
  .leqrow span + span, .bbrow span + span { text-align: left; }
  .leqrow .lnm { grid-column: 1 / -1; white-space: normal; font-size: 15px; }
  .leqrow .lnm a { display: flex; align-items: center; min-height: 44px; }
  .leqrow .num, .bbrow .num, .bbrow .bs { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; white-space: normal; }
  .leqrow.tot { border-top: 0; }
  .leqrow.tot > span:empty { display: none; }
  .leqrow [data-label]::before, .bbrow [data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--t3); font-size: 11px; line-height: 16px; font-weight: 400; }
  .bbrow .bd a { display: inline-flex; align-items: center; min-height: 44px; }
  .bbrow > .bs:nth-child(2) { text-align: right; align-self: center; font-weight: 500; color: var(--t1); }
  .bbfoot { flex-wrap: wrap; gap: 12px; padding: 16px 0; }
  .bbnav button { min-width: 44px; min-height: 44px; }
  .caprow { padding: 12px 0; }
  .caprow .ck { flex: 1; min-width: 0; }
  .caprow .cq { display: block; margin: 4px 0 0; }
  .caprow .num { flex-shrink: 0; font-size: 14px; }
  .szsel { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; gap: 6px; }
  .szsel .szlbl { display: none; }
  .szsel button { min-height: 44px; padding: 0 8px; font-size: 14px; }
  .szsel .szin { grid-column: 1 / -1; width: 100%; min-height: 44px; padding: 0 12px; font-size: 16px; }
  .ar { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .ar .art { grid-column: 1 / -1; gap: 8px 16px; }
  .chart-card { margin-top: 20px; padding: 20px 16px; }
  .chart-header { flex-direction: column; gap: 14px; }
  .chart-value { font-size: 28px; line-height: 36px; }
  .chart-controls { width: 100%; }
  .chart-controls button { flex: 1; min-height: 44px; font-size: 13px; }
  .chart-controls:has(button:disabled):not(:has(button:not(:disabled))) { display: none; }
  .chart-legend { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
  .chart-series { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 2px 8px; }
  .chart-series strong { grid-column: 2; font-size: 14px; }
  .chart-series-qty { grid-column: 2; }
  .chart-empty { min-height: 156px; padding: 20px 10px; }
  .chart-plot { height: 232px; }
  .chart-tooltip { min-width: 0; max-width: 240px; padding: 12px; }
  .chart-tooltip-row { gap: 16px; }
  .burns-band { padding: 20px 16px; gap: 16px; }
  #sec-burns .ovstats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .foot { margin-top: 28px; }
  #toTop { width: 44px; height: 44px; bottom: calc(16px + env(safe-area-inset-bottom)); right: max(16px,env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
