/* Laurel app. Neutral graphite (or light grey), soft radii, pill controls, top bar and one rounded card; the score keeps its red-yellow-green
   capsules in both themes. */
body.app {
  --bg: #171717; --card: #222222; --card2: #1c1c1c; --raise: #292929; --pon: #303030; --inbg: #191919;
  --line: #2e2e2e; --line2: #363636; --text: #eeeeee; --mute: #ababab; --dim: #767676; --green: #65df9e;
  --strong: #ffffff; --text2: #d6d6d6; --soft: #bdbdbd; --icon: #d4d4d4; --hover: #202020; --hoverline: #474747;
  --track: rgba(255, 255, 255, 0.08); --pri: #f2f2f2; --prifg: #141414; --pribh: #dedede; --focus: #555555;
  --pop: #202020; --shadow: rgba(0, 0, 0, 0.55); --barbg: rgba(23, 23, 23, 0.92); --avbg: #1b1b1b; --ph: #8a8a8a;
  --red: #f5b3b3; --amber: #e5c181; --frame: #0e0e0e; --tabon: #262626;
  --sans: "DM Sans", system-ui, sans-serif;
  background: var(--frame); color: var(--text); font: 400 14.5px/1.55 var(--sans); font-variant-numeric: tabular-nums;
}
html[data-theme="light"] body.app {
  --bg: #f7f7f7; --card: #ffffff; --card2: #fafafa; --raise: #f0f0f0; --pon: #ebebeb; --inbg: #ffffff;
  --line: #e8e8e8; --line2: #dedede; --text: #252525; --mute: #646464; --dim: #9b9b9b; --green: #16894f;
  --strong: #111111; --text2: #3a3a3a; --soft: #5e5e5e; --icon: #3d3d3d; --hover: #f3f3f3; --hoverline: #cfcfcf;
  --track: rgba(0, 0, 0, 0.07); --pri: #252525; --prifg: #ffffff; --pribh: #000000; --focus: #b8b8b8;
  --pop: #ffffff; --shadow: rgba(0, 0, 0, 0.12); --barbg: rgba(247, 247, 247, 0.9); --avbg: #ececec; --ph: #9a9a9a;
  --red: #b42c43; --amber: #9a6b12; --frame: #e8e8e8; --tabon: #ffffff;
  color-scheme: light;
}
/* score colours as text need more weight on white */
html[data-theme="light"] .snum, html[data-theme="light"] .cvtop .tier, html[data-theme="light"] .lrow .tr, html[data-theme="light"] .astats .sc, html[data-theme="light"] .sbox .big .t b, html[data-theme="light"] #rvb { filter: brightness(0.68) saturate(1.25); }
html[data-theme="light"] .abar .brand img { filter: invert(1); }
html[data-theme="light"] .radar .rg { stroke: rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .radar .rg.out { stroke: rgba(0, 0, 0, 0.16); }
html[data-theme="light"] .radar .ra { stroke: rgba(0, 0, 0, 0.07); }
html[data-theme="light"] .radar .rs { fill: rgba(0, 0, 0, 0.07); stroke: #252525; }
html[data-theme="light"] .radar .rd { fill: #ffffff; stroke: #252525; }
html[data-theme="light"] .radar .rl { fill: #3a3a3a; }
html[data-theme="light"] .app .code .k, html[data-theme="light"] .app .code .n { color: #111111; }
html[data-theme="light"] .app .code .s { color: #555555; }
html[data-theme="light"] .app .code .c { color: #9b9b9b; }
html[data-theme="light"] .app .code pre { color: #3a3a3a; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
[data-ic] { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.hide { display: none !important; }
.ul { color: var(--strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hoverline); }
.app .btn { height: 40px; padding: 0 16px; gap: 8px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--text); font: 600 14px var(--sans); }
.app .btn:hover { background: var(--raise); border-color: var(--line2); }
.app .btn.pri { background: var(--pri); color: var(--prifg); border-color: transparent; }
.app .btn.pri:hover { background: var(--pribh); }
.app .btn.big { height: 48px; padding: 0 24px; font-size: 15px; }
.app .btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.app .btn .ic { width: 16px; height: 16px; }
.app .btn.ghost .ic { color: var(--mute); }

/* frame: the top bar and the status line sit on a darker frame; everything else lives in one rounded card */
.abar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: 18px; padding: 0 24px; background: var(--frame); }
.abar .brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--strong); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.abar .brand img { width: auto; height: 20px; }
.abar .brand span { font-family: "Michroma", sans-serif; font-weight: 400; font-size: 14px; letter-spacing: 0.02em; }
.ntabs { display: flex; gap: 2px; margin-left: 10px; }
.ntabs > * { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.ntabs > *:hover { color: var(--strong); }
.ntabs > .on { background: var(--tabon); color: var(--strong); }
.search { margin-left: auto; width: min(420px, 34vw); display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--inbg); color: var(--mute); }
.search:focus-within { border-color: var(--focus); }
.search .ic { width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 14.5px var(--sans); }
.search input::placeholder { color: var(--ph); }
.search kbd { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line2); border-radius: 5px; font: 500 12px var(--sans); color: var(--mute); }
.aright { display: flex; gap: 8px; align-items: center; }

/* status bar */
.sbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 26px; background: var(--frame); font-size: 12.5px; color: var(--mute); }
.schip { padding: 3px 10px; border-radius: 999px; background: var(--raise); color: var(--text); }
.sync { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.sync i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sync.late { color: var(--amber); }
.sbar a { display: grid; place-items: center; color: var(--text); }
.sbar a .ic { width: 15px; height: 15px; }
.sright { margin-left: auto; font: 12px var(--mono); color: var(--dim); }
.thm { display: inline-flex; padding: 2px; border: 1px solid var(--line2); border-radius: 999px; }
.thm button { display: grid; place-items: center; width: 30px; height: 24px; border: 0; border-radius: 999px; background: none; color: var(--mute); cursor: pointer; }
.thm button.on { background: var(--pon); color: var(--strong); }
.thm .ic { width: 14px; height: 14px; }
.mthm { display: none; }
.sright a { display: inline; color: var(--mute); }

.main { position: fixed; top: 60px; bottom: 40px; left: 12px; right: 12px; overflow-y: auto; padding: 24px 28px 40px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); }
.phead { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 16px; }
.phead h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.apane > .phead:first-child { margin-top: 6px; }

/* top cards */
.tops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tcard { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 196px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tcard .tl { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13.5px; font-weight: 500; }
.tcard .rng { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--raise); color: var(--mute); font-size: 11.5px; font-weight: 600; }
.spark { display: block; width: calc(100% + 40px); height: 60px; margin: 14px -20px -18px; color: var(--green); }
.ebars { display: flex; justify-content: space-between; gap: 4px; height: 44px; margin-top: 16px; }
.ebars i { flex: 1; min-width: 3px; max-width: 14px; border-radius: 99px; background: var(--track); }
.ebars i.on { background: var(--green); }
.ebars i.off { background: #ef5b5b; }
.tcard .tl .ic { width: 18px; height: 18px; color: var(--icon); }
.tcard b { display: block; margin-top: 16px; font: 600 30px/1 var(--sans); letter-spacing: -0.03em; }
.tcard b u { text-decoration: none; margin-left: 4px; font-size: 14px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
.tcard small { display: block; margin-top: 8px; color: var(--mute); font-size: 12.5px; }
.tcard.reg { border-color: transparent; background: #10141c url(/app/cover.jpg) 68% 10% / 260% auto no-repeat; cursor: pointer; }
.tcard.reg .tl { color: #e6e6e6; }
.tcard.reg .tl .ic { color: #fff; }
.tcard.reg b { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; color: #fff; }
.tcard.reg .go { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-top: 14px; padding: 0 14px; border-radius: 999px; background: #f2f2f2; color: #141414; font-weight: 600; font-size: 13.5px; transition: background 0.15s; }
.tcard.reg:hover .go { background: #fff; }
.tcard.reg .go .ic { width: 14px; height: 14px; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 999px; background: transparent; color: var(--text); font: 600 14px var(--sans); cursor: pointer; }
.pill .ic { width: 16px; height: 16px; }
.pill.on { background: var(--pon); border-color: var(--pon); }
.fbtn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pri); color: var(--prifg); font-size: 11px; display: grid; place-items: center; }
.fbtn b:empty { display: none; }
.cpills { display: flex; gap: 2px; flex-wrap: wrap; }
.cpills button { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 14px var(--sans); cursor: pointer; }
.cpills button:hover { color: var(--strong); }
.cpills button.on { background: var(--pon); color: var(--strong); }
.cpills button small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--dim); }
.rc { margin-left: auto; color: var(--mute); font-size: 13.5px; white-space: nowrap; }
.rc b { color: var(--text); font-weight: 600; }
.vtog { display: inline-flex; padding: 3px; border: 1px solid var(--line2); border-radius: 999px; }
.vtog button { display: grid; place-items: center; width: 38px; height: 32px; border: 0; border-radius: 999px; background: none; color: var(--mute); cursor: pointer; }
.vtog button.on { background: var(--pon); color: var(--strong); }
.vtog .ic { width: 17px; height: 17px; }

/* custom dropdown */
.dd { position: relative; }
.dd > button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 16px; border: 1px solid var(--line2); border-radius: 10px; background: var(--inbg); color: var(--text); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.dd > button span { color: var(--mute); }
.dd > button .ic { width: 14px; height: 14px; color: var(--mute); transition: transform 0.2s; }
.dd.open > button { border-color: var(--focus); }
.dd.open > button .ic { transform: rotate(180deg); }
.dd .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 210px; padding: 5px; border: 1px solid var(--line2); border-radius: 12px; background: var(--pop); box-shadow: 0 20px 50px var(--shadow); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.14s, transform 0.14s; }
.dd.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.dd .menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--mute); font: 500 14px var(--sans); cursor: pointer; text-align: left; }
.dd .menu button:hover { background: var(--raise); color: var(--strong); }
.dd .menu button.on { color: var(--strong); }
.dd .menu button .ic { width: 14px; height: 14px; opacity: 0; }
.dd .menu button.on .ic { opacity: 1; }
.dd.full { width: 100%; }
.dd.full > button { width: 100%; height: 44px; justify-content: space-between; }
.dd.full .menu { left: 0; right: 0; }

/* catalogue: filters + results */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; margin-top: 16px; align-items: start; }
.shell.nof { grid-template-columns: minmax(0, 1fr); }
.shell.nof .side { display: none; }
.side { position: sticky; top: 0; max-height: calc(100vh - 150px); overflow-y: auto; padding: 4px 14px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card2); scrollbar-width: thin; }
.fsec { padding: 12px 0 6px; }
.fsec h5 { margin: 4px 4px 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.fopt { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: 7px; background: none; color: var(--mute); font: 500 14px var(--sans); cursor: pointer; text-align: left; }
.fopt:hover { background: var(--hover); color: var(--strong); }
.fopt.on { background: var(--raise); color: var(--strong); font-weight: 600; }
.fopt .ct { margin-left: auto; font-size: 12.5px; color: var(--dim); }
.fopt .bx { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--focus); display: grid; place-items: center; flex: none; transition: 0.15s; }
.fopt .bx .ic { width: 12px; height: 12px; color: var(--prifg); opacity: 0; }
.fopt.on .bx { background: var(--pri); border-color: var(--pri); }
.fopt.on .bx .ic { opacity: 1; }
.fopt .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.reset { width: 100%; height: 38px; margin-top: 14px; border: 1px solid var(--line2); border-radius: 999px; background: none; color: var(--mute); font: 600 13.5px var(--sans); cursor: pointer; }
.reset:hover { color: var(--strong); background: var(--raise); }
.cat { min-width: 0; }

/* agent cards */
.cat { container-type: inline-size; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@container (min-width: 500px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 1720px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container (min-width: 2100px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; transition: border-color 0.2s, transform 0.2s; }
.card:hover { border-color: var(--hoverline); transform: translateY(-2px); }
.cv { padding: 14px 16px 16px; background: var(--card2); }
.cvtop { display: flex; align-items: center; justify-content: space-between; }
.cvtop .lbl { color: var(--mute); font-size: 13px; font-weight: 500; }
.cvtop .tier { font-size: 13px; font-weight: 600; }
.cvtop .tier span { color: var(--dim); font-weight: 500; }
.cvm { display: flex; align-items: flex-end; gap: 14px; margin-top: 18px; }
.cvm .snum { font-size: 38px; line-height: 0.8; }
.caps { display: inline-flex; gap: 4px; align-items: flex-end; }
.caps i { width: 7px; height: 24px; border-radius: 4px; background: var(--track); }
.caps.fill { display: flex; flex: 1; gap: 4px; }
.caps.fill i { flex: 1; width: auto; height: 34px; border-radius: 99px; }
.caps.lg { display: flex; width: 100%; gap: 5px; }
.caps.lg i { flex: 1; width: auto; height: 46px; border-radius: 99px; }
.caps.sm i { width: 6px; height: 20px; border-radius: 99px; }
.cb { padding: 14px 16px 0; }
.chead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chead .av { width: 44px; height: 44px; border-radius: 10px; flex: none; object-fit: cover; background: var(--avbg); }
.nm { min-width: 0; flex: 1; }
.nm b { display: flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.nm b em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.nm b .ic { width: 16px; height: 16px; color: var(--icon); }
.nm small { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card p { margin: 12px 0 0; color: var(--mute); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.ctags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; min-height: 24px; }
.ctags span { font: 600 11px var(--sans); letter-spacing: 0.02em; padding: 4px 8px; border-radius: 6px; background: var(--raise); color: var(--soft); }
.ctags span.live { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.ctok { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--card2); font-size: 13.5px; min-width: 0; }
.ctok .ic { width: 16px; height: 16px; color: var(--icon); }
.ctok b { font-weight: 600; }
.ctok .tp { margin-left: auto; font-weight: 600; }
.ctok em { margin-left: auto; font-style: normal; color: var(--mute); font-size: 12.5px; white-space: nowrap; }
.chg { font-size: 12.5px; font-weight: 600; }
.chg.up { color: var(--green); }
.chg.dn { color: #ef5b5b; }
html[data-theme="light"] .chg.dn { color: #c43545; }
.lrow .tk b { display: block; }
.lrow .tk small { display: block; font-size: 12px; color: var(--mute); }
.av.cry { display: block; overflow: visible; }
body.app .av.cry { background: none; border: 0; border-radius: 0; }
.av.cry img { display: block; width: 100%; height: 100%; }
.tokp h3 .tkn { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.tokp h3 .tkn .ic { width: 18px; height: 18px; color: var(--icon); }
.tokp h3 .tkn em { font-style: normal; font-weight: 500; color: var(--mute); }
.tkrow { display: flex; align-items: flex-end; gap: 20px; }
.tkrow > div:first-child { flex: none; }
.tkrow .tpx { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.tkrow small { display: block; margin-top: 4px; color: var(--mute); font-size: 12.5px; }
.tkrow .spark { flex: 1; width: auto; margin: 0; height: 56px; }
.tkstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tkstats span { display: block; font-size: 12.5px; color: var(--mute); }
.tkstats b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; }
.tklinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; padding: 14px 16px 16px; }
.cb + .cstats { margin-top: 6px; }
.cstats span { display: block; font-size: 12.5px; color: var(--mute); }
.cstats b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; }
.cstats b u { text-decoration: none; margin-left: 3px; font-size: 11.5px; font-weight: 500; color: var(--dim); }
.snum { font: 600 28px/1 var(--sans); letter-spacing: -0.04em; }
.more { display: flex; justify-content: center; padding: 26px 0; }
.gempty { grid-column: 1 / -1; padding: 90px 20px; text-align: center; color: var(--mute); border: 1px dashed var(--line2); border-radius: 14px; }

/* table view */
.grid.list { display: block; }
.tbl { min-width: 0; overflow-x: auto; }
.lrow { display: grid; grid-template-columns: minmax(200px, 1fr) 200px 80px 110px 64px 64px 96px 92px; gap: 12px; align-items: center; min-width: 960px; padding: 0 16px; height: 62px; border-radius: 12px; cursor: pointer; transition: background 0.12s; }
.lrow:hover { background: var(--hover); }
.lrow.th { height: 44px; cursor: default; font-size: 13px; color: var(--mute); font-weight: 500; }
.lrow.th:hover { background: none; }
.lrow > :nth-child(n + 3) { text-align: right; }
.lrow .ix { color: var(--mute); font-size: 13px; }
.lrow .lag { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lrow .lag .av { width: 36px; height: 36px; border-radius: 8px; flex: none; object-fit: cover; background: var(--avbg); }
.lrow .lag .nm b { font-size: 14.5px; }
.lrow .lag .nm small { font-size: 12.5px; }
.lrow .scc { display: flex; align-items: center; gap: 12px; }
.lrow .scc .snum { font-size: 17px; letter-spacing: -0.02em; min-width: 26px; }
.lrow b { font-weight: 600; }
.lrow .lv { color: var(--green); }
.lrow u { text-decoration: none; margin-left: 3px; font-size: 11.5px; color: var(--dim); }
.lrow .dm { color: var(--mute); }

/* agent page */
.back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--mute); font: 600 14px var(--sans); cursor: pointer; border: 0; background: none; padding: 4px 0; }
.back:hover { color: var(--strong); }
.aban { height: 230px; border-radius: 14px; background: #10141c url(/app/cover.jpg) 50% 66% / 150% auto no-repeat; }
.ahead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: end; padding: 6px 0 0; }
.ahead .av { width: 116px; height: 116px; border-radius: 20px; border: 4px solid var(--bg); background: var(--avbg); object-fit: cover; }
.ahead h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 38px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.ahead h1 .ic { width: 24px; height: 24px; color: var(--icon); }
.ahead .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--mute); font-size: 14px; }
.ahead .meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.ahead .meta a { color: var(--text); font-weight: 600; }
.ahead .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-bottom: 6px; }
.astats { display: flex; flex-wrap: wrap; gap: 14px 48px; margin-top: 24px; }
.astats span { display: block; font-size: 13px; color: var(--mute); }
.astats b { display: block; margin-top: 2px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.astats b u { text-decoration: none; margin-left: 5px; font-size: 13px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 28px 0 16px; }
.ptabs button { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 14px var(--sans); cursor: pointer; }
.ptabs button:hover { color: var(--strong); }
.ptabs button.on { background: var(--pon); color: var(--strong); }
.ptabs button small { margin-left: 6px; font-size: 12.5px; font-weight: 500; color: var(--dim); }
.alay { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 22px; min-width: 0; }
.panel + .panel, .kgrid + .panel { margin-top: 16px; }
.panel.tight { padding: 6px 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel h3 span { color: var(--mute); font-weight: 500; font-size: 13px; }
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kgrid div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); min-width: 0; }
.kgrid span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.kgrid span .ic { color: var(--icon); width: 16px; height: 16px; }
.kgrid b { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kgrid a { color: var(--text); }
.adesc { margin: 0; color: var(--text2); font-size: 15px; line-height: 1.7; }
.sbox .big { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sbox .big .snum { font-size: 76px; line-height: 0.8; }
.sbox .big .t { text-align: right; }
.sbox .big .t b { display: block; font-size: 18px; }
.sbox .big .t span { color: var(--mute); font-size: 13.5px; }
.sbox .meter { margin: 22px 0 8px; }
.sbox .scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }
.sbox .rad { display: flex; justify-content: center; margin: 14px 0 4px; }
.dpart { display: grid; grid-template-columns: 82px 1fr 46px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.dpart em { font-size: 13px; font-style: normal; color: var(--mute); text-align: right; }
.segs { display: inline-flex; gap: 3px; flex: 1; }
.segs i { flex: 1; height: 8px; border-radius: 99px; background: var(--track); }
.segs i.on { background: var(--text); }
.sticky { position: sticky; top: 0; }
.ep2 { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 2px; font-size: 14.5px; }
.ep2:last-child { border-bottom: 0; }
.ep2 i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.ep2 i.on { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent); }
.ep2 i.off { background: #ef5b5b; }
.ep2 small { display: block; margin-top: 2px; font: 12px var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep2 .st { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 6px; background: var(--raise); color: var(--mute); }
.ep2 .st.on { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.flag { padding: 12px 14px; border-radius: 10px; background: rgba(239, 91, 91, 0.1); color: var(--red); font-size: 13.5px; margin-top: 12px; }
.row2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 2px; font-size: 14px; color: var(--mute); }
.row2:last-child { border-bottom: 0; }
.row2 b { color: var(--text); font-weight: 600; }
.row2 a { color: var(--text); }
.pempty { padding: 34px 10px; text-align: center; color: var(--mute); }

/* modals */
.app .modal .box { border-radius: 16px; background: var(--pop); border-color: var(--line2); color: var(--text); }
html[data-theme="light"] .app .modal { background: rgba(0, 0, 0, 0.32); }
.app .modal .mclose, .app .modal .x { border-color: var(--line2); }
.app .wbtn { background: var(--card2); border-color: var(--line); border-radius: 10px; }
#abox { width: min(460px, 100% - 32px); padding: 26px; }
#abox h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
#abox p.hint { margin: 0 0 18px; }
.rater { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.rater input[type=range] { flex: 1; accent-color: var(--text); height: 4px; }
.rater b { font: 600 36px var(--sans); min-width: 64px; text-align: right; letter-spacing: -0.03em; }
.quick { display: flex; gap: 8px; margin: 12px 0 18px; }
.quick button { flex: 1; height: 38px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--text); font: 600 13.5px var(--sans); cursor: pointer; }
.quick button:hover { background: var(--raise); }
.inp { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--inbg); color: var(--text); font: 14.5px var(--sans); outline: none; }
.inp:focus { border-color: var(--focus); }
textarea.inp { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.mact { display: flex; gap: 10px; margin-top: 20px; }
.mact .btn { flex: 1; height: 46px; }
.tog { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); cursor: pointer; }
.tog input { display: none; }
.tog span { width: 36px; height: 21px; border-radius: 99px; background: var(--pon); position: relative; transition: 0.2s; flex: none; }
.tog span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--mute); transition: 0.2s; }
.tog input:checked + span { background: var(--pri); }
.tog input:checked + span::after { left: 18px; background: var(--prifg); }
.app .toast { background: var(--pop); color: var(--text); border-color: var(--line2); border-radius: 10px; bottom: 56px; box-shadow: 0 12px 30px var(--shadow); }

/* register, api, activity */
.regwrap { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: 24px; }
.regform { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 24px; }
.regform > p { margin: 0 0 6px; }
.regform label { display: block; margin-top: 14px; font-size: 13.5px; color: var(--mute); }
.regform label .inp { margin-top: 6px; }
.regform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.regform label.tog { display: flex; margin-top: 18px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line2); margin-top: 20px; }
.seg button { height: 34px; border: 0; background: none; padding: 0 16px; border-radius: 999px; cursor: pointer; color: var(--mute); font: 600 13.5px var(--sans); }
.seg button.on { background: var(--pon); color: var(--strong); }
#rGo { margin-top: 24px; width: 100%; }
.regprev { position: sticky; top: 0; align-self: start; border: 1px solid var(--line); border-radius: 14px; background: var(--card2); overflow: hidden; }
.regprev .codehead { font-family: var(--sans); color: var(--mute); border-bottom: 0; }
.regprev pre { margin: 0; padding: 20px; font: 12.5px/1.7 var(--mono); color: var(--text2); white-space: pre-wrap; word-break: break-all; max-height: 72vh; overflow: auto; }
.apiwrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: start; }
.apiwrap p { margin: 0; }
.apiwrap .panel > p.mute + * { margin-top: 16px; }
.apiwrap .btn.big { margin-top: 16px; }
.app .code { border-radius: 12px; background: var(--card2); border-color: var(--line); }
.app .code .codehead { border-bottom: 0; }
.keybox { margin-top: 18px; padding: 16px; border-radius: 10px; border: 1px dashed var(--focus); font: 13px var(--mono); word-break: break-all; cursor: pointer; }
.evt { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 12px 2px; font-size: 14px; }
.evt:last-child { border-bottom: 0; }
.evt .k { font-size: 12.5px; font-weight: 600; color: var(--text); padding: 4px 10px; border-radius: 6px; background: var(--raise); justify-self: start; }
.evt .t { font-size: 13px; color: var(--mute); text-align: right; }
.evt .t a { color: var(--mute); }

@media (max-width: 1320px) { .tops { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 60px; bottom: 40px; left: 12px; max-height: none; width: min(320px, 88vw); z-index: 70; border-radius: 16px; transform: translateX(-110%); transition: transform 0.25s; box-shadow: 30px 0 60px var(--shadow); padding-top: 14px; }
  .shell.nof .side { display: block; }
  .side.open { transform: none; }
  .alay { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .regwrap, .apiwrap { grid-template-columns: minmax(0, 1fr); }
  .regprev { position: static; }
  .search kbd { display: none; }
  .ntabs > * { padding: 0 11px; }
}
@media (max-width: 760px) {
  .abar { position: static; height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .aright { margin-left: auto; }
  .ntabs { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .search { order: 4; width: 100%; margin: 0; }
  .sbar { display: none; }
  .main { position: static; margin: 0 8px 12px; min-height: calc(100vh - 170px); padding: 16px 14px 40px; border-radius: 18px; }
  .side { top: 0; bottom: 0; left: 0; border-radius: 0 16px 16px 0; }
  .aright .btn.pri { height: 38px; padding: 0 12px; font-size: 13px; }
  .mthm { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line2); border-radius: 999px; background: none; color: var(--text); cursor: pointer; }
  .mthm .ic { width: 17px; height: 17px; }
  .tops { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .tcard { min-height: 120px; padding: 14px; }
  .tcard b { font-size: 24px; margin-top: 14px; }
  .tcard.reg b { font-size: 18px; }
  .cpills { order: 5; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .rc { order: 6; margin-left: 0; width: 100%; }
  .vtog { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .aban { height: 150px; }
  .ahead { display: block; padding: 0; }
  .ahead .av { width: 88px; height: 88px; border-radius: 16px; }
  .ahead h1 { font-size: 26px; }
  .ahead .acts { justify-content: flex-start; margin-top: 16px; padding: 0; }
  .ptabs { flex-wrap: nowrap; overflow-x: auto; }
  .ptabs button { flex: none; padding: 0 14px; }
  .astats { gap: 14px 28px; }
  .astats b { font-size: 20px; }
  .regform .two { grid-template-columns: minmax(0, 1fr); }
  .evt { grid-template-columns: 90px minmax(0, 1fr); }
  .evt .t { grid-column: 2; text-align: left; }
}
.vf { display: inline-flex; flex: none; }
.av.ph { padding: 22%; background: var(--avbg); object-fit: contain; }
html[data-theme="light"] .av.ph { filter: invert(1); background: #131313; }

/* scrollbars, per theme */
body.app * { scrollbar-color: var(--line2) transparent; }
body.app ::-webkit-scrollbar-thumb { background: var(--line2); background-clip: padding-box; }
body.app ::-webkit-scrollbar-thumb:hover { background: var(--focus); background-clip: padding-box; }

/* network switch */
.netsw { display: inline-flex; padding: 3px; border: 1px solid var(--line2); border-radius: 999px; }
.netsw button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 13px var(--sans); cursor: pointer; }
.netsw button.on { background: var(--tabon); color: var(--strong); }
.mnote { margin: 0 0 18px; padding: 14px 18px; border-radius: 12px; background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--text); font-size: 14px; }
.gempty b { display: block; margin-bottom: 6px; color: var(--text); font-size: 16px; }
@media (max-width: 760px) { .netsw button { padding: 0 9px; } }

/* agent page: KPI tiles, two columns of sections, a sticky score column */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.kpi { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.kpi > span { font-size: 13px; color: var(--mute); }
.kv { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.kv b { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.kv b.snum { font-size: 28px; }
.kv u { text-decoration: none; font-size: 13px; color: var(--mute); }
.kpi .caps.fill { margin-top: 14px; }
.kpi .caps.fill i { height: 24px; }
.kpi .ebars { height: 24px; margin-top: 14px; justify-content: flex-start; }
.kpi small { margin-top: auto; padding-top: 12px; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acol, .scol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.acol .panel + .panel, .scol .panel + .panel, .two2 .panel + .panel { margin-top: 0; }
.two2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips span { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 6px; background: var(--raise); color: var(--soft); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tool { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.tool .th, .tout .th { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tool .th b { font: 600 13.5px var(--mono); }
.tool p { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.args { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.args span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--raise); color: var(--soft); }
.args span em { font-style: normal; color: var(--dim); margin-left: 6px; }
.args span.rq { color: var(--text); }
.args span.none { color: var(--dim); }
.cn { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.cn > span { font-size: 13px; color: var(--mute); }
.cn code { min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--card2); font: 12px var(--mono); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn .btn { padding: 0 10px; }
.hist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.hist > div > span { display: block; font-size: 13px; color: var(--mute); }
.hist .spark { width: 100%; height: 64px; margin: 10px 0 8px; }
.hist .ebars { height: 64px; margin: 10px 0 8px; justify-content: flex-start; gap: 3px; }
.hist .ebars i { max-width: 10px; }
.hist b { font-size: 14px; font-weight: 600; }
.ebars i.part { background: var(--amber); }
.hint1 { padding: 10px 0; }
.hint1 > div { display: flex; justify-content: space-between; align-items: baseline; }
.hint1 b { font-size: 14px; }
.hint1 em { font: 12.5px var(--mono); font-style: normal; color: var(--mute); }
.hint1 p { margin: 4px 0 0; color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.pempty.sm { padding: 18px 8px; font-size: 13.5px; }
#abox.wide { width: min(720px, 100% - 32px); max-height: calc(100vh - 60px); overflow-y: auto; }
.tform { display: grid; gap: 12px; }
.tf > span { display: block; font-size: 13.5px; color: var(--text); }
.tf > span em { display: block; font-style: normal; color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.tf .inp, .tf .dd { margin-top: 6px; }
.tout { margin-top: 18px; }
.tout .th { margin-bottom: 8px; }
.tout .th span { margin-left: auto; font-size: 12.5px; color: var(--mute); }
.tout .th b.ok { color: var(--green); }
.tout .th b.bad { color: #ef5b5b; }
.tout pre { margin: 0; max-height: 380px; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); font: 12.5px/1.6 var(--mono); color: var(--text2); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .two2, .hist { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .kv b, .kv b.snum { font-size: 24px; } .cn { grid-template-columns: minmax(0, 1fr) auto; } .cn > span { grid-column: 1 / -1; } }
.two2 .mact .btn { flex: none; padding: 0 20px; }

/* buttons carry text only, no icons */
.app .btn .ic, .app .pill .ic, .tcard.reg .go .ic { display: none; }
.apiwrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.apiwrap > .panel:last-child { grid-column: 1 / -1; }
.apiwrap .panel + .panel { margin-top: 0; }
.apiwrap .quick { margin: 12px 0 0; }
.apiwrap #payCalls { margin: 12px 0 0 !important; }
@media (max-width: 1100px) { .apiwrap { grid-template-columns: minmax(0, 1fr); } }

/* $LRL tab */
.burns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.burn { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.burn b { font-size: 15px; }
.burn em { font-style: normal; color: var(--green); font-size: 13px; font-weight: 600; }
.burn p { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.burn span { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--text); }
.tkrange { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 12px; color: var(--mute); }
.tkrange b { font-size: 14px; color: var(--text); }
#tkPrice .spark, #tkBurn .spark { width: 100%; height: 110px; margin: 6px 0 0; }
@media (max-width: 1100px) { .burns { grid-template-columns: minmax(0, 1fr); } }
.acol .mact .btn { flex: none; padding: 0 20px; }
