/* NiTools (teamvanilla.dev/nitools/): one stylesheet for the pages and the analyzer.
   The header, tokens and buttons follow the TeamVanilla sites (Websites/STYLE.md): spring green in
   light mode, dark evergreen in dark, system fonts, no gradients beyond the header's, no glow.
   Order: tokens, base, header, pages, analyzer shell, components, views. */

:root {
  --green: #1ed67c;
  --green-hover: #26e086;
  --green-deep: #17b566;
  --green-light: #2aeb8c;
  --on-green: #06281a;
  --on-green-soft: #1d5c3c;
  --nav-link: rgba(6, 40, 26, .78);
  --gh-edge: rgba(6, 40, 26, .35);
  --gh-hover: rgba(6, 40, 26, .1);
  --bg: #dcf9e9;
  --bg-2: #c9f2dc;
  --bg-3: #c2efd6;
  --panel: #eafcf2;
  --ink: #06281a;
  --text: #17402e;
  --muted: #3f6c57;
  --rule: #a5dfc2;
  --link: #0a7a45;
  --shade-top: rgba(6, 40, 26, .22);
  --shade-drop: rgba(6, 40, 26, .2);
  --shade-btn: rgba(6, 40, 26, .16);
  --high: #b3261e;
  --high-bg: #f9dcd9;
  --medium: #8a5200;
  --medium-bg: #f7e6c8;
  --low: #2a5f86;
  --low-bg: #d6e8f5;
  --ok: #0a7a45;
  --hex-dim: #7d9e8d;
  --map-zero: #c3dccd;
  --map-text: #2a5f86;
  --map-code: #0a7a45;
  --map-rand: #b3261e;
  --side-bg: #d2f6e3;
  --side-hover: rgba(6, 40, 26, .065);
  --side-active: rgba(10, 122, 69, .14);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #0e5a3a; --green-hover: #136b46; --green-deep: #093f28; --green-light: #14764c;
    --on-green: #e6f6ec; --on-green-soft: #9ec9b1; --nav-link: rgba(230, 246, 236, .82);
    --gh-edge: rgba(230, 246, 236, .35); --gh-hover: rgba(230, 246, 236, .12);
    --bg: #0a2419; --bg-2: #0f3324; --bg-3: #071b13; --panel: #0c2b1e;
    --ink: #e6f6ec; --text: #bcdccb; --muted: #7fa892; --rule: #1b4433; --link: #46e08f;
    --shade-top: rgba(0, 0, 0, .45); --shade-drop: rgba(0, 0, 0, .42); --shade-btn: rgba(0, 0, 0, .32);
    --high: #ff8a80; --high-bg: #3a1614; --medium: #f0b44c; --medium-bg: #33260d; --low: #8cc4ec; --low-bg: #10283a;
    --ok: #46e08f; --hex-dim: #4f7563;
    --map-zero: #04120c; --map-text: #8cc4ec; --map-code: #46e08f; --map-rand: #ff8a80;
    --side-bg: #07190f; --side-hover: rgba(230, 246, 236, .055); --side-active: rgba(70, 224, 143, .12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green: #0e5a3a; --green-hover: #136b46; --green-deep: #093f28; --green-light: #14764c;
  --on-green: #e6f6ec; --on-green-soft: #9ec9b1; --nav-link: rgba(230, 246, 236, .82);
  --gh-edge: rgba(230, 246, 236, .35); --gh-hover: rgba(230, 246, 236, .12);
  --bg: #0a2419; --bg-2: #0f3324; --bg-3: #071b13; --panel: #0c2b1e;
  --ink: #e6f6ec; --text: #bcdccb; --muted: #7fa892; --rule: #1b4433; --link: #46e08f;
  --shade-top: rgba(0, 0, 0, .45); --shade-drop: rgba(0, 0, 0, .42); --shade-btn: rgba(0, 0, 0, .32);
  --high: #ff8a80; --high-bg: #3a1614; --medium: #f0b44c; --medium-bg: #33260d; --low: #8cc4ec; --low-bg: #10283a;
  --ok: #46e08f; --hex-dim: #4f7563;
  --map-zero: #04120c; --map-text: #8cc4ec; --map-code: #46e08f; --map-rand: #ff8a80;
  --side-bg: #07190f; --side-hover: rgba(230, 246, 236, .055); --side-active: rgba(70, 224, 143, .12);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
html, body { cursor: url("../img/cursor.png") 1 1, default; }
a[href], button, summary, label, select, [role="button"] { cursor: url("../img/cursor.png") 1 1, default; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--sans); }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1rem; }
strong { color: var(--ink); }
code, pre, kbd, .mono { font-family: var(--mono); }
code { font-size: .86em; background: var(--bg-3); color: var(--ink); padding: .08em .32em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { font-size: .8em; padding: .05em .4em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); color: var(--ink); white-space: nowrap; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 60; background: var(--bg); color: var(--ink); padding: .4rem .7rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header: the TeamVanilla nav strip ────────────────────────────────── */

.top {
  position: relative;
  z-index: 20;
  color: var(--on-green);
  background:
    radial-gradient(900px 300px at 30% 0%, rgba(255, 255, 255, .16), transparent 70%),
    url("../img/hex.svg") 0 0 / 36px 62.35px,
    linear-gradient(160deg, var(--green-light) 0%, var(--green) 45%, var(--green-deep) 100%);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; background: linear-gradient(var(--shade-top), transparent); pointer-events: none; }
.navstrip { background: rgba(8, 40, 22, .2); border-bottom: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 1px 0 rgba(8, 40, 22, .18); }
.bar { max-width: 80rem; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: .6rem 1.15rem; }
.app-mode .bar { max-width: none; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--on-green); font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 58px; height: 34px; }
.brand span { font-weight: 400; color: var(--on-green-soft); }
.bar nav { flex: 1; min-width: 0; display: flex; align-items: center; gap: .2rem 1rem; font-size: .95rem; }
.bar nav a { color: var(--nav-link); text-decoration: none; white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--on-green); text-decoration: underline; }
.links { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.links svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.gh { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border: 1px solid var(--gh-edge); border-radius: 999px; color: var(--on-green); background: none; font: 600 .9rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; }
.gh:hover { background: var(--gh-hover); border-color: var(--on-green); }
.gh img.avatar { width: 22px; height: 22px; border-radius: 50%; margin: -.1rem 0 -.1rem -.35rem; }
.theme-toggle { padding: .3rem .55rem; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
.account { position: relative; }
.account-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40; min-width: 14rem; padding: .4rem; background: var(--bg-2); color: var(--text); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 28px var(--shade-drop); font-size: .9rem; }
.account-menu p { margin: .3rem .6rem .5rem; color: var(--muted); font-size: .82rem; }
.account-menu a, .account-menu button { display: block; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; }
.account-menu a:hover, .account-menu button:hover { background: var(--bg-3); color: var(--ink); }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; justify-content: space-between; }
  .bar nav { order: 3; flex-basis: 100%; }
  .gh .label { display: none; }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 1.1rem; border: 1px solid transparent; border-radius: 999px; font: 700 .95rem/1.2 var(--sans); text-align: center; text-decoration: none; box-shadow: 0 2px 6px var(--shade-btn); white-space: nowrap; }
.btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-green:hover { background: var(--green-hover); }
.btn-dark { background: var(--bg-2); color: var(--text); border-color: var(--rule); font-weight: 600; }
.btn-dark:hover { color: var(--ink); border-color: var(--muted); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-hover); }
.btn-sm { padding: .28rem .75rem; font-size: .84rem; box-shadow: none; }
.btn[disabled] { opacity: .5; }
.link-btn { padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; text-underline-offset: .18em; }
.icon-btn { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Pages (Guide, About, 404) ────────────────────────────────────────── */

.hero { max-width: 64rem; margin: 0 auto; padding: 2.6rem 1.25rem 0; text-align: center; }
.hero h1 { margin: 0; font-size: 2.3rem; font-weight: 600; letter-spacing: -.01em; }
.hero .sub { margin: .8rem auto 0; max-width: 44rem; font-size: 1.08rem; color: var(--muted); }
.page { max-width: 64rem; margin: 0 auto; padding: 2.4rem 1.25rem 1rem; }
.page main { max-width: 46rem; min-width: 0; }
.page.solo main { margin: 0 auto; }
.page.split { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; align-items: start; }
.page aside { position: sticky; top: 1.5rem; min-width: 0; }
.aside-box { background: var(--bg-2); border-radius: 14px; padding: 1.1rem; font-size: .92rem; }
.aside-box a { display: block; padding: .15rem 0; }
.page h2 { font-size: 1.35rem; font-weight: 600; margin: 2.6rem 0 .8rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
.page main > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.page h3 { font-size: 1.08rem; font-weight: 600; margin: 1.8rem 0 .4rem; }
.page ul, .page ol { padding-left: 1.25rem; margin: 0 0 1.1rem; }
.page li { margin: .3rem 0; }
.note { color: var(--muted); font-size: .94rem; }
.site-foot { max-width: 64rem; margin: 3rem auto 0; padding: 1.2rem 1.25rem 2.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
.site-foot p { margin: .3rem 0; }
.site-foot a { color: var(--text); }
@media (max-width: 860px) { .page.split { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } .page aside { position: static; } }
@media (max-width: 640px) { .hero h1 { font-size: 1.75rem; } }

/* ── Tables and facts (pages and views) ───────────────────────────────── */

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: .45rem .8rem .45rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--rule); white-space: nowrap; }
th:last-child, td:last-child { padding-right: 0; }
td.mono, .mono td, td .mono { font-family: var(--mono); font-size: .84rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { overflow-wrap: anywhere; word-break: break-word; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.2rem; margin: 0 0 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: .55rem; } }

/* ── Analyzer: landing ────────────────────────────────────────────────── */

.landing { max-width: 64rem; margin: 0 auto; padding: 2.6rem 1.25rem 1rem; }
.landing-head { text-align: center; }
.landing-head h1 { margin: 0; font-size: 2.35rem; font-weight: 600; letter-spacing: -.01em; }
.landing-head .sub { margin: .8rem auto 0; max-width: 46rem; font-size: 1.08rem; color: var(--muted); }
.drop { position: relative; display: grid; place-items: center; gap: .5rem; margin: 2rem auto 0; max-width: 46rem; min-height: 13rem; padding: 2rem 1.5rem; border: 2px dashed var(--muted); border-radius: 18px; background: var(--panel); text-align: center; transition: border-color .15s, background .15s; }
.drop.over, body.dragging .drop { border-color: var(--link); background: var(--bg-2); }
.drop h2 { margin: 0; font-size: 1.3rem; font-weight: 600; }
.drop p { margin: 0; color: var(--muted); }
.drop .buttons { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.quota { max-width: 46rem; margin: .9rem auto 0; font-size: .9rem; color: var(--muted); text-align: center; }
.quota strong { font-variant-numeric: tabular-nums; }
/* Below the drop area: the formats as rows (icon, name with its extensions, what you get), then
   two panels side by side, then the signed-in history. */
.lp-reads { margin: 3.4rem 0 0; }
.lp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin: 0 0 1rem; }
.lp-head h2, .lp-panel h2 { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.lp-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.lp-formats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.lp-format { display: grid; grid-template-columns: 2.5rem 15.5rem minmax(0, 1fr); gap: .4rem 1.2rem; align-items: start; padding: 1.05rem .9rem; border-bottom: 1px solid var(--rule); }
.lp-format.lp-main { margin: .8rem 0; padding: 1.2rem .9rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); }
.lp-ic { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 10px; background: var(--bg-2); color: var(--link); }
.lp-main .lp-ic { background: var(--bg-3); }
.lp-name h3 { margin: .15rem 0 0; font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lp-exts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.lp-exts code { padding: .05rem .5rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .74rem; line-height: 1.6; }
.lp-what { margin: .15rem 0 0; font-size: .95rem; }
dl.lp-what { display: grid; grid-template-columns: 5.8rem minmax(0, 1fr); gap: .45rem 1rem; }
dl.lp-what dt { color: var(--link); font-size: .8rem; font-weight: 600; padding-top: .12rem; }
dl.lp-what dd { margin: 0; }
.lp-foot { margin: 1.2rem 0 0; color: var(--muted); font-size: .95rem; }
.lp-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.6rem 0 0; }
.lp-panel { padding: 1.3rem 1.4rem 1.1rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); min-width: 0; }
.lp-panel h2 { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.lp-panel h2 svg { flex: none; color: var(--link); }
.lp-panel p { font-size: .94rem; }
.lp-panel p:last-child { margin-bottom: 0; }
.lp-panel .lp-lead { margin: 0 0 .4rem; font-size: 1.12rem; font-weight: 600; color: var(--ink); }
.history.lp-panel { margin: 1rem 0 0; }
.history .tbl { font-size: .9rem; }
@media (max-width: 860px) {
  .lp-format { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .lp-what { grid-column: 2; }
  .lp-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .lp-format { padding: .9rem .2rem; }
  .lp-format.lp-main { padding: 1rem .7rem; }
  dl.lp-what { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  dl.lp-what dt { padding-top: .45rem; }
}
@media (max-width: 640px) { .landing-head h1 { font-size: 1.75rem; } }

/* ── Analyzer: workspace ──────────────────────────────────────────────── */

body.app-mode .site-foot, body.app-mode .landing { display: none; }
.workspace { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - var(--header-h, 58px)); }
.filebar { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding: .55rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--rule); }
.files { display: flex; gap: .35rem; flex-wrap: wrap; min-width: 0; }
.file-tab { display: inline-flex; align-items: center; gap: .45rem; max-width: 18rem; padding: .25rem .35rem .25rem .7rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); color: var(--text); font: 600 .84rem/1.3 var(--sans); }
.file-tab[aria-current="true"] { background: var(--green); color: var(--on-green); border-color: transparent; }
.file-tab .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tab .x { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; opacity: .7; }
.file-tab .x:hover { opacity: 1; background: var(--gh-hover); }
.filebar .actions { display: flex; gap: .4rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
/* The sidebar: the open file, a target for another, then the views in foldable groups */
.side { overflow-y: auto; padding: .8rem .7rem 2.5rem; border-right: 1px solid var(--rule); background: var(--side-bg); scrollbar-width: thin; }
.side .ic { flex: none; width: 16px; height: 16px; }
.side-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .6rem; align-items: center; padding: .7rem .75rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
.side-file > .ic { color: var(--link); width: 20px; height: 20px; }
.side-file-text { min-width: 0; }
.side-file-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.side-file-text span { display: block; font-size: .78rem; color: var(--muted); }
.side-score { grid-column: 1 / -1; display: flex; align-items: center; gap: .55rem; margin-top: .45rem; padding: .3rem .55rem; border-radius: 8px; background: var(--side-hover); color: var(--muted); font-size: .8rem; text-decoration: none; }
.side-score b { font-size: 1.05rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ok); }
.side-score.medium b { color: var(--medium); }
.side-score.high b { color: var(--high); }
a.side-score:hover { color: var(--ink); background: var(--side-active); }
.side-drop { display: flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; margin: .55rem 0 .7rem; padding: .5rem .6rem; border: 1.5px dashed var(--rule); border-radius: 10px; background: none; color: var(--muted); font: .82rem/1.3 var(--sans); }
.side-drop:hover, body.dragging .side-drop { border-color: var(--link); color: var(--link); background: var(--side-hover); }
.side-find { display: block; width: 100%; max-width: none; min-width: 0; margin: 0 0 .4rem; }
.side-group { margin-top: .55rem; }
.side-head { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .3rem .35rem .3rem .6rem; border: 0; background: none; color: var(--muted); font: 600 .78rem/1.2 var(--sans); letter-spacing: .01em; }
.side-head .rule { flex: 1; height: 1px; background: var(--rule); }
.side-head .ic { width: 14px; height: 14px; transition: transform .15s; }
.side-head:hover { color: var(--ink); }
.side-group.shut .side-head .ic { transform: rotate(-90deg); }
.side-group.shut .side-items { display: none; }
.side-items { display: grid; gap: 1px; margin-top: .15rem; }
.side-items a { position: relative; display: flex; align-items: center; gap: .65rem; padding: .4rem .55rem .4rem .7rem; border-radius: 8px; color: var(--text); font-size: .9rem; line-height: 1.25; text-decoration: none; }
.side-items a .ic { color: var(--muted); }
.side-items a .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-items a:hover { background: var(--side-hover); color: var(--ink); }
.side-items a:hover .ic { color: var(--ink); }
.side-items a[aria-current="page"] { background: var(--side-active); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--link); }
.side-items a[aria-current="page"] .ic { color: var(--link); }
.side-items a.nil { color: var(--muted); }
.side-items a.nil .ic { opacity: .6; }
.badge { flex: none; display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.3rem; padding: 0 .45rem; border-radius: 999px; background: var(--side-hover); color: var(--muted); font: 600 .72rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.side-items a[aria-current="page"] .badge.plain { background: var(--panel); color: var(--ink); }
.badge.high { background: var(--high-bg); color: var(--high); }
.badge.medium { background: var(--medium-bg); color: var(--medium); }
.badge.low { background: var(--low-bg); color: var(--low); }
.badge.dot { min-width: 0; width: .55rem; height: .55rem; padding: 0; margin-right: .35rem; }
.badge.dot.high { background: var(--high); }
.badge.dot.medium { background: var(--medium); }
.badge.dot.low { background: var(--low); }
.side-none { margin: .8rem .6rem; font-size: .85rem; color: var(--muted); }
.palette li .ic { flex: none; align-self: center; color: var(--muted); }
.palette li[aria-selected="true"] .ic { color: var(--link); }
.main { overflow-y: auto; min-width: 0; padding: 1.2rem 1.6rem 3rem; }
.view-head { display: flex; align-items: baseline; gap: .5rem 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.view-head h2 { margin: 0; font-size: 1.35rem; font-weight: 600; }
.view-head .sub { color: var(--muted); font-size: .92rem; }
.view-head .head-actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--rule); max-height: 40vh; }
  .main { padding: 1rem; }
}

/* ── Components ───────────────────────────────────────────────────────── */

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 1rem; min-width: 0; }
.card > h3 { margin: 0 0 .7rem; font-size: 1rem; font-weight: 600; display: flex; align-items: baseline; gap: .5rem; }
.card > h3 .more { margin-left: auto; font-size: .85rem; font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 1rem; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 1rem; align-items: start; }
@media (max-width: 1100px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }
.sev { display: inline-flex; align-items: center; gap: .35rem; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.sev::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.sev.high { color: var(--high); background: var(--high-bg); }
.sev.medium { color: var(--medium); background: var(--medium-bg); }
.sev.low { color: var(--low); background: var(--low-bg); }
.sev.info, .sev.none { color: var(--muted); background: var(--bg-3); }
.sev.ok { color: var(--ok); background: var(--bg-3); }
.tag { display: inline-block; padding: 0 .45rem; border: 1px solid var(--rule); border-radius: 6px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.empty { padding: 2rem 1rem; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: .3rem; font-size: 1.05rem; }
.callout { padding: .7rem .9rem; border-radius: 10px; background: var(--bg-2); border-left: 3px solid var(--link); margin: 0 0 1rem; font-size: .93rem; }
.callout.high { border-left-color: var(--high); background: var(--high-bg); }
.callout.medium { border-left-color: var(--medium); background: var(--medium-bg); }
.callout p:last-child { margin-bottom: 0; }

/* Search, filters, pager: the toolbar above a table */
.toolbar { display: flex; align-items: center; gap: .5rem .7rem; flex-wrap: wrap; margin: 0 0 .7rem; }
input[type="search"], input[type="text"], select, textarea {
  padding: .38rem .65rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--ink); font: .9rem/1.3 var(--sans);
}
input[type="search"] { min-width: 14rem; flex: 1 1 14rem; max-width: 26rem; }
input.mono, textarea.mono { font-family: var(--mono); font-size: .85rem; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { padding: .32rem .65rem; border: 0; border-right: 1px solid var(--rule); background: var(--panel); color: var(--text); font: .84rem/1.3 var(--sans); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--bg-3); color: var(--ink); font-weight: 600; }
.seg button .n { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: .25rem; }
.pager { display: flex; align-items: center; gap: .4rem; margin: .7rem 0 0; font-size: .86rem; color: var(--muted); flex-wrap: wrap; }
.pager .spacer { flex: 1; }
.tbl th button { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.tbl th button::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: .35rem; vertical-align: middle; border: 4px solid transparent; }
.tbl th[aria-sort="ascending"] button::after { border-bottom-color: currentColor; margin-top: -4px; }
.tbl th[aria-sort="descending"] button::after { border-top-color: currentColor; margin-top: 4px; }
.tbl tbody tr:hover td { background: var(--bg-2); }
.tbl tr.row-link { cursor: url("../img/cursor.png") 1 1, default; }
.tbl td .sub { display: block; color: var(--muted); font-size: .82rem; }
.tbl .copy, .copy { padding: 0 .25rem; border: 0; background: none; color: var(--muted); font-size: .8rem; vertical-align: baseline; }
.copy:hover { color: var(--link); }
.off-link { font-family: var(--mono); font-size: .84rem; }

/* Bars and meters: widths come from data-w, applied by the script (the CSP forbids style="") */
.bar-track { position: relative; height: .5rem; min-width: 4rem; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--link); }
.bar-fill.high { background: var(--high); }
.bar-fill.medium { background: var(--medium); }
.bar-fill.low { background: var(--low); }

/* The verdict */
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.4rem; align-items: center; }
.score { display: grid; place-items: center; width: 6.2rem; height: 6.2rem; border-radius: 50%; border: 6px solid var(--rule); text-align: center; }
.score b { display: block; font-size: 1.9rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.score span { display: block; font-size: .72rem; color: var(--muted); }
.score.high { border-color: var(--high); }
.score.medium { border-color: var(--medium); }
.score.low { border-color: var(--ok); }
.verdict h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
.verdict p { margin: 0; color: var(--muted); font-size: .92rem; }
.findings { list-style: none; margin: 0; padding: 0; }
.findings li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .7rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.findings li:last-child { border-bottom: 0; }
.findings .t { display: block; color: var(--ink); font-weight: 600; font-size: .93rem; }
.findings .d { display: block; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.findings .w { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hashes dd { font-family: var(--mono); font-size: .84rem; }

/* Hex view */
.hex { font: .84rem/1.55 var(--mono); overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .8rem; }
.hex-row { display: grid; grid-template-columns: 7.5rem auto minmax(8rem, auto); gap: 1.4rem; white-space: pre; }
.hex-off { color: var(--muted); }
.hex-bytes span, .hex-ascii span { border-radius: 2px; }
.hex-bytes .z { color: var(--hex-dim); }
.hex-bytes .hl, .hex-ascii .hl { background: var(--medium-bg); color: var(--ink); }
.hex-bytes .cur, .hex-ascii .cur { outline: 2px solid var(--link); }
.hex-ascii { color: var(--text); }
.hex-sec { color: var(--muted); font-size: .76rem; padding: .1rem 0; border-top: 1px dashed var(--rule); }

/* Disassembly */
.asm td { font-family: var(--mono); font-size: .84rem; padding-top: .18rem; padding-bottom: .18rem; }
.asm .mn { color: var(--ink); font-weight: 600; }
.asm .flow { color: var(--link); }
.asm .bytes { color: var(--muted); }

/* Charts */
.chart { display: block; width: 100%; height: auto; }
.chart .axis { stroke: var(--rule); }
.chart .grid { stroke: var(--rule); stroke-dasharray: 2 3; }
.chart .line { fill: none; stroke: var(--link); stroke-width: 1.4; }
.chart .area { fill: var(--link); opacity: .15; }
.chart .band { fill: var(--muted); opacity: .08; }
.chart text { fill: var(--muted); font: 11px var(--sans); }
.chart .sec-mark { stroke: var(--muted); stroke-dasharray: 3 3; }
canvas.map { display: block; image-rendering: pixelated; border: 1px solid var(--rule); border-radius: 8px; max-width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--muted); margin: .5rem 0 0; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .3rem; vertical-align: -.1rem; }

/* Tree (classes) */
.tree ul { list-style: none; margin: 0; padding-left: 1.1rem; border-left: 1px dashed var(--rule); }
.tree > ul { padding-left: 0; border-left: 0; }
.tree li { margin: .15rem 0; font-family: var(--mono); font-size: .86rem; }
.tree .n { color: var(--muted); font-family: var(--sans); font-size: .8rem; }

/* Progress while a file is analysed */
.progress-panel { max-width: 40rem; margin: 3rem auto; }
.progress-panel h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.progress-panel .bar-track { height: .6rem; margin: 1rem 0 .6rem; }
.steps-log { list-style: none; margin: .8rem 0 0; padding: 0; font-size: .88rem; max-height: 20rem; overflow-y: auto; }
.steps-log li { display: flex; gap: .6rem; padding: .15rem 0; color: var(--muted); }
.steps-log li.done { color: var(--text); }
.steps-log li .ms { margin-left: auto; font-family: var(--mono); font-size: .78rem; color: var(--muted); }

/* Toasts */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 70; display: grid; gap: .5rem; max-width: 24rem; }
.toast { padding: .6rem .9rem; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .9rem; box-shadow: 0 8px 24px var(--shade-drop); }
.toast.high { background: var(--high); color: #fff; }

/* Command palette */
.overlay { position: fixed; inset: 0; z-index: 80; display: grid; align-items: start; justify-items: center; padding: 12vh 1rem 1rem; background: rgba(4, 20, 12, .45); }
.palette { width: min(36rem, 100%); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px var(--shade-drop); overflow: hidden; }
.palette input { width: 100%; max-width: none; padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: var(--panel); font-size: 1rem; }
.palette ul { list-style: none; margin: 0; padding: .35rem; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; gap: .7rem; align-items: baseline; padding: .45rem .7rem; border-radius: 8px; font-size: .92rem; }
.palette li[aria-selected="true"] { background: var(--bg-3); color: var(--ink); }
.palette li .g { margin-left: auto; font-size: .78rem; color: var(--muted); }
.palette .hint { padding: .45rem .9rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--rule); }
.dialog { width: min(34rem, 100%); padding: 1.2rem 1.3rem; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 20px 50px var(--shade-drop); }
.dialog h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.dialog table { font-size: .9rem; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 0 1rem; }
.settings-form label { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; gap: .5rem 1rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.settings-form label:last-of-type { border-bottom: 0; }

/* ── Views: shared pieces ─────────────────────────────────────────────── */

.sub { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
.small { font-size: .86rem; color: var(--muted); }
.card h4 { margin: 1rem 0 .4rem; font-size: .92rem; font-weight: 600; }
.card details { margin: .3rem 0; }
summary { color: var(--link); font-size: .92rem; }
summary .n { color: var(--muted); font-size: .8rem; }
pre.code { margin: .5rem 0 0; padding: .7rem .9rem; max-height: 28rem; overflow: auto; background: var(--bg-3); border-radius: 8px; font: .82rem/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .25rem 0; border-bottom: 1px solid var(--rule); font-size: .9rem; overflow-wrap: anywhere; }
ul.plain li:last-child { border-bottom: 0; }
ul.notes { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
ul.notes li { margin: .25rem 0; }
.tbl tr.dim td { color: var(--muted); }
.tbl td.actions { white-space: nowrap; }
.tbl td.actions .btn + .btn { margin-left: .2rem; }
mark { background: var(--medium-bg); color: var(--ink); border-radius: 2px; }
.ctx { white-space: pre; font-size: .8rem; color: var(--muted); }
.ent { display: inline-flex; align-items: center; gap: .45rem; min-width: 8rem; }
.ent .bar-track { flex: 1; }
.ent .n { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.quota.spent, .quota.offline { color: var(--medium); }
.quota .link-btn { font-size: inherit; }
.tv-art { display: block; margin: 0 auto 1rem; width: 180px; height: auto; }
.hero .tv-art { width: 129px; }
.avatar { border-radius: 50%; vertical-align: middle; }
input.short { width: 8rem; }
.goto { display: inline-flex; gap: .35rem; align-items: center; }
.goto input { min-width: 12rem; }
.note-input { width: 100%; min-width: 10rem; }

/* The file tabs: the name and the close button are separate buttons */
.file-tab .name { padding: 0; border: 0; background: none; color: inherit; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.file-tab[aria-current="true"] .x:hover { background: rgba(6, 40, 26, .15); }

/* Drop a file anywhere: the whole window shows it will open */
body.dragging::after { content: "Drop to open the file"; position: fixed; inset: .75rem; z-index: 90; display: grid; place-items: center; border: 3px dashed var(--link); border-radius: 18px; background: rgba(4, 20, 12, .55); color: #fff; font: 600 1.4rem var(--sans); pointer-events: none; }

/* Header struct tables: nested fields indent */
.tbl.struct td.d1 { padding-left: 1.2rem; }
.tbl.struct td.d2 { padding-left: 2.4rem; }
.tbl.struct td.d3 { padding-left: 3.6rem; }
.tbl.struct tr.group td { color: var(--ink); font-weight: 600; background: var(--bg-2); }

/* The file strip on the overview and the sections view */
.chart.strip .reg { fill: var(--muted); opacity: .45; }
.chart.strip .reg-x { fill: var(--link); opacity: .75; }
.chart.strip .reg-o { fill: var(--medium); opacity: .75; }
.chart.strip .line { stroke-width: 1.2; }
.legend .k { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .3rem; vertical-align: -.1rem; background: var(--muted); opacity: .6; }
.legend .k-x { background: var(--link); opacity: .9; }
.legend .k-o { background: var(--medium); opacity: .9; }
.legend .k-line { height: 2px; vertical-align: .2rem; background: var(--link); opacity: 1; }
.legend .k-zero { background: var(--map-zero); opacity: 1; }
.legend .k-text { background: var(--map-text); opacity: 1; }
.legend .k-code { background: var(--map-code); opacity: 1; }
.legend .k-rand { background: var(--map-rand); opacity: 1; }
.chart.cmp { margin-top: .8rem; background: var(--bg-3); border-radius: 6px; }
.chart.cmp .diff { fill: var(--high); }

/* Resources: icons */
.icons { display: flex; flex-wrap: wrap; gap: .8rem; }
.icons figure { margin: 0; text-align: center; }
.icons img { display: block; max-width: 96px; max-height: 96px; margin: 0 auto .2rem; image-rendering: auto; }
.icons figcaption { font: .75rem var(--mono); color: var(--muted); }

/* ── Disassembly ──────────────────────────────────────────────────────── */

.codeview { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.fnpane { position: sticky; top: 0; display: flex; flex-direction: column; gap: .5rem; max-height: calc(100vh - var(--header-h, 58px) - 9rem); }
.fnpane input[type="search"] { max-width: none; min-width: 0; flex: none; }
.fnlist { overflow-y: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); padding: .3rem; }
.fnlist a { display: flex; gap: .5rem; align-items: baseline; padding: .18rem .45rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .82rem; }
.fnlist a:hover { background: var(--bg-2); color: var(--ink); }
.fnlist a[aria-current] { background: var(--bg-3); color: var(--ink); font-weight: 600; }
.fnlist .fn { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.fnlist .va { font: .72rem var(--mono); color: var(--muted); }
.fnlist p { margin: .4rem; font-size: .82rem; }
.fn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin: 0 0 .6rem; }
.fn-head h3 { margin: 0; font: 600 1.05rem var(--mono); overflow-wrap: anywhere; }
.fn-head .more { margin-left: auto; font-size: .88rem; }
.listing { min-width: 0; }
table.asm { width: auto; }
.asm td { border-bottom: 0; padding: .1rem .9rem .1rem 0; white-space: nowrap; }
.asm td.addr .off-link { color: var(--muted); text-decoration: none; }
.asm td.addr .off-link:hover { color: var(--link); text-decoration: underline; }
.asm td.bytes { color: var(--muted); font-size: .78rem; }
.asm td.mn { color: var(--ink); font-weight: 600; }
.asm td.ops { color: var(--text); }
.asm td.cm { color: var(--muted); white-space: normal; max-width: 34rem; overflow-wrap: anywhere; }
.asm tr.f-call td.mn, .asm tr.f-jmp td.mn, .asm tr.f-jcc td.mn { color: var(--link); }
.asm tr.f-ret td { border-bottom: 1px solid var(--rule); }
.asm tr.f-ret td.mn { color: var(--medium); }
.asm tr.f-bad td { color: var(--high); }
.asm tr.lbl td { padding-top: .6rem; color: var(--ink); font-weight: 600; }
.asm .c-str { color: var(--ok); }
.asm .c-imp { color: var(--medium); }
@media (max-width: 1100px) { .codeview { grid-template-columns: minmax(0, 1fr); } .fnpane { position: static; max-height: 16rem; } }
.fn-mode { margin-left: auto; }
.fn-rel { display: grid; gap: .25rem; margin: 0 0 .8rem; padding: .55rem .75rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); font-size: .86rem; overflow-wrap: anywhere; }
.fn-rel strong { display: inline-block; min-width: 6.5rem; color: var(--muted); font-weight: 600; }
.fn-rel .off-link { font-size: .82rem; }
.fn-rel .c-imp { font: .82rem var(--mono); color: var(--medium); }

/* The control flow graph */
.cfg-wrap { overflow: auto; max-height: calc(100vh - var(--header-h, 58px) - 16rem); border: 1px solid var(--rule); border-radius: 10px; background: var(--bg-3); }
svg.cfg { display: block; font: 11.5px var(--mono); }
svg.cfg .blk rect { fill: var(--panel); stroke: var(--rule); }
svg.cfg .bl { fill: var(--link); font-weight: 600; }
svg.cfg .bi { fill: var(--text); }
svg.cfg .bi .mn { fill: var(--ink); font-weight: 600; }
svg.cfg .bi.f-call .mn, svg.cfg .bi.f-jmp .mn, svg.cfg .bi.f-jcc .mn { fill: var(--link); }
svg.cfg .bi.f-ret .mn { fill: var(--medium); }
svg.cfg .bm { fill: var(--muted); }
svg.cfg .edge { fill: none; stroke-width: 1.6; }
svg.cfg .edge.loop { stroke-dasharray: 5 3; }
svg.cfg .e-yes { stroke: var(--ok); fill: var(--ok); }
svg.cfg .e-no { stroke: var(--high); fill: var(--high); }
svg.cfg .e-jump, svg.cfg .e-next { stroke: var(--muted); fill: var(--muted); }
svg.cfg path.edge { fill: none; }
.legend .k-yes { background: var(--ok); opacity: 1; }
.legend .k-no { background: var(--high); opacity: 1; }
.legend .k-jump { background: var(--muted); opacity: 1; }
svg.cfg a .bl { text-decoration: underline; text-decoration-color: transparent; }
svg.cfg a:hover .bl, svg.cfg a:focus-visible .bl { text-decoration-color: currentColor; }

/* Views that show one function: their links to each other, and the row a graph block opened */
.fnlist { position: relative; }
.fn-mode { margin-left: auto; display: flex; flex-wrap: wrap; gap: .35rem; }
.btn svg.ic { width: 15px; height: 15px; fill: none; }
.asm tr.here td { background: var(--side-active); }

/* The call graph */
svg.cg { display: block; font: 11.5px var(--mono); width: 100%; max-width: 980px; height: auto; }
svg.cg .cg-node rect { fill: var(--panel); stroke: var(--rule); }
svg.cg .cg-node text { fill: var(--text); }
svg.cg .cg-node text.n { fill: var(--muted); }
svg.cg .cg-node.here rect { stroke: var(--link); stroke-width: 1.6; }
svg.cg .cg-node.here text { fill: var(--ink); font-weight: 600; }
svg.cg .cg-node.imp rect { stroke-dasharray: 4 3; }
svg.cg .cg-node.imp text { fill: var(--medium); }
svg.cg .cg-node.loose text { fill: var(--muted); }
svg.cg a:hover rect, svg.cg a:focus-visible rect { stroke: var(--link); }
svg.cg .cg-edge { fill: none; stroke: var(--muted); stroke-width: 1.2; opacity: .7; }
svg.cg .cg-edge.imp { stroke-dasharray: 4 3; }
svg.cg .cg-more { fill: var(--muted); font-family: var(--sans); font-size: 12px; }

/* Class hierarchy and layouts */
ol.chain { margin: 0; padding-left: 1.2rem; font-family: var(--mono); font-size: .86rem; }
ol.chain li { margin: .1rem 0; }
.tree a[aria-current] { font-weight: 700; color: var(--ink); }

/* Packing, YARA, demangler, notes */
.verdict-line { margin: 0 0 1rem; font-size: 1.05rem; }
.verdict-line .sev { font-size: .95rem; padding: .2rem .8rem; }
.yara-opts { display: grid; gap: .55rem; }
.yara-opts label { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.yara-opts input[type="text"] { flex: 1; min-width: 0; }
.yara-opts input[type="checkbox"], .yara-strings input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--link); }
.yara-strings { max-height: 28rem; overflow-y: auto; }
textarea.yara-out { width: 100%; min-height: 24rem; font-size: .82rem; line-height: 1.45; }
.card textarea { width: 100%; }
ul.dm-out { margin: .6rem 0 0; }
ul.dm-out li { overflow-wrap: anywhere; }
.file-btn { cursor: url("../img/cursor.png") 1 1, pointer; }
.file-btn input { display: none; }
.notes-tbl input[type="text"] { width: 100%; min-width: 8rem; }
p.buttons { display: flex; flex-wrap: wrap; gap: .45rem; }

/* The Hilbert map and byte pairs, with what the pointer is over beside them */
.map-wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: flex-start; }
.map-wrap .map { flex: 0 1 512px; }
.map-side { flex: 1 1 16rem; min-width: 0; }
.map-side .legend { flex-direction: column; margin: 0 0 .8rem; }

/* ── Hex ──────────────────────────────────────────────────────────────── */

.hexwrap { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1rem; align-items: start; }
.hexwrap .hex { min-height: 20rem; }
.hex:focus-visible { outline: 2px solid var(--link); }
.hex-row { grid-template-columns: 5.2rem auto auto minmax(0, 1fr); gap: 1.1rem; }
.hex-bytes span, .hex-ascii span { cursor: url("../img/cursor.png") 1 1, default; }
.hex-reg { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; }
.hex-slider { flex: 1 1 12rem; min-width: 10rem; accent-color: var(--link); }
.inspector { position: sticky; top: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: .9rem 1rem; font-size: .86rem; }
.inspector h3 { margin: 0 0 .6rem; font-size: .95rem; }
.inspector dl.facts { grid-template-columns: max-content minmax(0, 1fr); gap: .2rem .8rem; }
.inspector dd { font-family: var(--mono); font-size: .8rem; }
@media (max-width: 1400px) {
  .hexwrap { grid-template-columns: minmax(0, 1fr); }
  .inspector { position: static; }
  .inspector dl.facts { grid-template-columns: repeat(auto-fill, 6.5rem minmax(10rem, 1fr)); }
}

/* Byte maps */
.map { width: 100%; max-width: 512px; height: auto; aspect-ratio: 1; cursor: url("../img/cursor.png") 1 1, crosshair; }

/* ── Admin ────────────────────────────────────────────────────────────── */

.page.admin { max-width: 80rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.2rem; border-bottom: 1px solid var(--rule); }
.tabs button { padding: .5rem .9rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 600 .95rem var(--sans); }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--link); }
.settings-form { max-width: 40rem; }
.settings-form label { grid-template-columns: minmax(0, 1fr) 8rem; }
.settings-form input[type="checkbox"] { justify-self: start; width: 1.2rem; height: 1.2rem; accent-color: var(--link); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.lp-empty { margin: .4rem 0 0; padding: .9rem 1rem; border: 1px dashed var(--rule); border-radius: 10px; color: var(--muted); font-size: .93rem; text-align: center; }
