/* Styles for the map page: a token block (the Blackloom theme) and the font stack at the top, then the page's rules, then the
   rules that give it its own look at the end. */
:root {
  --font: "Recursive", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  /* Blackloom */
  --bg: #f3f8ff; --raise: #e5edf9; --line: #d2deef; --ink: #1e1e1e; --dim: #566170; --hot: #4f46e5; --red: #c81e4a;
  --page-top: #ffffff; --page-bottom: #e4efff; --scrim: rgba(228, 239, 255, .86); --shadow: rgba(30, 60, 120, .22); --on-ink: #ffffff; --on-hot: #ffffff; --hot-hover: #4338ca; --glass: rgba(255, 255, 255, .84); --glass-hi: rgba(255, 255, 255, .92);
  color-scheme: light;
}
/* The Circle's dark version. */
:root[data-theme="dark"] {
  --bg: #13120e; --raise: #1f1d17; --line: #322f25; --ink: #efe6d0; --dim: #8f8874; --hot: #ff8a4c; --red: #ff5f7a;
  --page-top: #17150f; --page-bottom: #0e0d0a; --scrim: rgba(19, 18, 14, .86); --shadow: rgba(0, 0, 0, .5); --on-ink: #13120e; --on-hot: #13120e; --hot-hover: #ff8660; --glass: rgba(24, 22, 17, .86); --glass-hi: rgba(24, 22, 17, .94);
  color-scheme: dark;
}
:root[data-theme="dark"] .logo { filter: brightness(0) invert(.93); }
:root[data-theme="dark"] .lite { color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .sitetop { box-shadow: 0 6px 20px rgba(255, 106, 61, .25); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(180deg, var(--page-top), var(--page-bottom)) fixed; color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; font-variation-settings: "MONO" 0; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--hot); color: var(--on-ink); }

.root { position: fixed; inset: 0; overflow: hidden; }
.labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-select: none;
  font-family: var(--font); font-variation-settings: "MONO" .5; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
/* A dark outline keeps every label readable where it crosses a line, without boxes behind the text. */
.labels text { paint-order: stroke; stroke: var(--bg); stroke-width: 3.5px; stroke-linejoin: round; }
.canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }


.top { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px 36px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { font-size: 1.5rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 400; pointer-events: none; display: flex; align-items: center; gap: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: .75rem; min-height: 1.5em; font-variation-settings: "MONO" .5; }
.crumbs button { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs b { color: var(--hot); font-weight: 400; }
.crumbs i { color: var(--dim); font-style: normal; }
.keys { display: flex; gap: 8px; justify-content: flex-end; }
.key { background: var(--raise); border-radius: 6px; padding: 0 12px; height: 30px; font-size: .75rem; }
.key:hover { background: var(--line); }
.key kbd { font: inherit; color: var(--dim); margin-left: 4px; font-variation-settings: "MONO" .5; }
.key kbd::before { content: "["; } .key kbd::after { content: "]"; }

.hero, .empty { position: absolute; left: 36px; bottom: 32px; max-width: 19rem; font-size: .8125rem; transition: opacity .4s; text-wrap: pretty; }
.hero::before { content: ""; position: absolute; inset: -60px -90px -40px -36px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 30% 60%, var(--bg) 35%, transparent 72%); }
.hero h1, .empty h1 { font-size: 1em; line-height: 1.3; font-weight: 400; margin: 0 0 .7em; }
.hero p, .empty p { font-size: 1em; line-height: 1.3; font-weight: 400; margin: 0 0 .7em; color: var(--dim); }
.hero p.act { color: var(--ink); }
.hero p.links { margin: 0; }
.empty code { font-variation-settings: "MONO" .5; font-size: .9em; color: var(--hot); }
.link { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.link:hover { color: var(--hot); }
.gone { opacity: 0; pointer-events: none; }

.stats { position: absolute; right: 36px; bottom: 30px; margin: 0; display: grid; grid-template-columns: repeat(var(--n, 4), auto); gap: 2px 26px;
  transition: opacity .4s; font-variation-settings: "MONO" .5; }
.stat { display: flex; flex-direction: column-reverse; text-align: left; }
.stat b { font-size: 1.0625rem; font-weight: 400; }
.stat span { font-size: .6875rem; color: var(--dim); }
button.stat span { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); }
button.stat:hover b, button.stat:hover span { color: var(--hot); }
.stats p { grid-column: 1 / -1; margin: 6px 0 0; font-size: .6875rem; color: var(--dim); text-align: right; max-width: 30rem; justify-self: end; }

.panel { position: absolute; top: 84px; right: 0; bottom: 0; width: 430px; padding: 6px 36px 40px 28px; overflow-y: auto;
  border-left: 1px solid var(--line); background: var(--bg); transform: translateX(100%);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1); display: flex; flex-direction: column; }
.panel.open { transform: none; }
.tag { margin: 0; font-size: .75rem; color: var(--dim); font-variation-settings: "MONO" .5; }
.panel h2 { font-size: 1.5625rem; font-weight: 400; line-height: 1.1; margin: 8px 0 8px; text-wrap: balance; }
.panel h2.small { font-size: 1.3125rem; line-height: 1.22; }
.figure { margin: 0; font-size: .8125rem; color: var(--hot); font-variation-settings: "MONO" .5; }
.panel h3 { margin: 28px 0 8px; font-size: .75rem; font-weight: 400; color: var(--dim); }
.lead { font-size: 1rem; line-height: 1.4; margin: 18px 0 0; }
.row, .report { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  padding: 11px 0; border-top: 1px solid var(--line); font-size: .9375rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.row small { color: var(--dim); font-size: .75rem; white-space: nowrap; font-variation-settings: "MONO" .5; }
.report { flex-direction: column; gap: 4px; }
.report small { color: var(--dim); font-size: .75rem; }
.row:hover span, .report:hover span { color: var(--hot); }
.sorts { display: flex; gap: 6px; margin: 22px 0 12px; }
.sorts button { font-size: .75rem; padding: 6px 10px; border-radius: 6px; background: var(--raise); color: var(--dim); }
.sorts button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }
.statuses { margin: -4px 0 12px; }
.more { margin-top: 14px; padding: 10px; background: var(--raise); border-radius: 7px; font-size: .8125rem; }
.note { color: var(--dim); font-size: .8125rem; margin: 12px 0; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.actions a { color: var(--ink); text-underline-offset: 4px; font-size: 1rem; }
.actions a:first-child { background: var(--ink); color: var(--bg); text-decoration: none; padding: 11px 14px; border-radius: 7px; text-align: center; font-weight: 500; }
.actions a:hover { color: var(--hot); } .actions a:first-child:hover { background: var(--hot); color: var(--bg); }

.find { position: absolute; inset: 0; background: var(--scrim); display: flex; justify-content: center; padding: 14vh 20px 20px; }

@media (max-width: 900px) {
  .top { padding: 14px 16px; grid-template-columns: 1fr auto; }
  .brand { font-size: 1.05rem; grid-column: 1; grid-row: 1; }
  .crumbs { grid-column: 1 / -1; grid-row: 2; margin-top: 8px; }
  .hero, .empty { left: 16px; right: 16px; bottom: 24px; }
  .empty p, .empty h1 { font-size: 1rem; }
  /* On a phone the map gets the whole page: the intro is kept for screen readers and search engines only, and one row of links stays. */
  .hero { bottom: 18px; max-width: none; }
  .hero h1, .hero p:not(.links) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero .links { justify-content: center; gap: 4px 18px; font-size: .8125rem; }
  .hero::before { display: none; }
  .stats { display: none; }
  .panel { top: auto; left: 0; width: auto; height: 52vh; padding: 14px 16px 24px; border-left: 0; border-top: 1px solid var(--line); transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) { .panel, .hero, .stats { transition: none; } }

.withLogo { display: flex; align-items: center; gap: 14px; }
.withLogo img { border-radius: 50%; background: var(--ink); object-fit: cover; flex: none; }

.primary { background: var(--ink); color: var(--bg); }
.primary:hover { background: var(--hot); }
.primary kbd { color: inherit; opacity: .55; }
.connect { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px 22px; align-self: flex-start; }
.connect h2 { font-size: 1.5625rem; font-weight: 400; line-height: 1.1; margin: 0 0 10px; }
.connect > p { margin: 0 0 20px; color: var(--dim); font-size: .9375rem; line-height: 1.4; max-width: 60ch; }
.snippet { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin-bottom: 14px; }
.snippet span { grid-column: 1 / -1; font-size: .75rem; color: var(--dim); }
.snippet code { font-family: inherit; font-variation-settings: "MONO" 1; font-size: .8125rem; background: var(--raise); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; overflow-x: auto; white-space: nowrap; }
.snippet button { background: var(--raise); border-radius: 6px; height: 36px; padding: 0 12px; font-size: .75rem; min-width: 64px; }
.snippet button:hover { background: var(--line); }
.tools { margin: 22px 0 6px; }
.tools div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .8125rem; }
.tools dt { font-variation-settings: "MONO" .5; color: var(--hot); }
.tools dd { margin: 0; color: var(--dim); }
@media (max-width: 900px) { .pager { display: none; } }
@media (max-width: 900px) { .tools div { grid-template-columns: 1fr; gap: 2px; } .primary kbd, .key kbd { display: none; } }

.pager { margin-top: 10px; }
.pager .note { margin: 0 0 8px; }
.pager div { display: flex; gap: 6px; }
.pager button { font-size: .75rem; padding: 6px 10px; border-radius: 6px; background: var(--raise); }
.pager button:hover:not(:disabled) { background: var(--line); }
.pager button:disabled { opacity: .4; cursor: default; }

.filter { width: 100%; margin: 18px 0 8px; background: var(--raise); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: .875rem; padding: 9px 11px; border-radius: 6px; }
.filter:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.withIcon { display: flex; align-items: center; gap: 10px; }
.withIcon img, .withIcon i { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); object-fit: cover; flex: none; }
.withIcon i { background: var(--raise); border: 1px solid var(--line); }
.row[aria-pressed="true"] span { color: var(--hot); }

.lens { display: inline-flex; background: var(--raise); border-radius: 7px; padding: 2px; gap: 2px; font-variation-settings: "MONO" 0; }
.crumbs .lens button { text-decoration: none; padding: 0 11px; height: 26px; border-radius: 5px; font-size: .75rem; color: var(--dim); }
.crumbs .lens button:hover { color: var(--ink); }
.crumbs .lens button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.jump { margin-top: 14px; width: 100%; padding: 10px 12px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: .8125rem; text-align: center; }
.jump:hover { background: var(--hot); }
.inline { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
.inline:hover { color: var(--hot); }

.hero .links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hero .links a { color: var(--dim); text-underline-offset: 2px; text-decoration-thickness: 1px; white-space: nowrap; }
.hero .links a:hover { color: var(--hot); }

.acct { display: inline-flex; align-items: center; text-decoration: none; }
.acct img { border-radius: 50%; display: block; }

/* Subdomains in the panel, on the attack-surface level of Programs. */
.hosts { list-style: none; margin: 4px 0 0; padding: 0; }
.hosts li { padding: 6px 0; border-top: 1px solid var(--line); font-size: .8125rem; line-height: 1.35; font-variation-settings: "MONO" 1; overflow-wrap: anywhere; }
a.jump { display: block; text-decoration: none; }
.quiet { background: var(--raise); color: var(--ink); }
.quiet:hover { background: var(--line); color: var(--ink); }
.hot { font-style: normal; color: var(--red); font-size: .75rem; }
.stat b.red { color: var(--red); }

.backdrop { position: absolute; inset: 0; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 11vh 20px 20px; }
.box { width: min(700px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px var(--shadow); }
.bar { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--dim); }
.bar input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 1.125rem; padding: 18px 0; outline: none; }
.bar input::placeholder { color: var(--dim); }
.esc { font-size: .6875rem; color: var(--dim); background: var(--raise); border-radius: 5px; padding: 4px 8px; font-variation-settings: "MONO" .5; }
.esc:hover { color: var(--ink); }
.list { overflow-y: auto; padding: 6px 8px 8px; min-height: 120px; }
.list h3 { margin: 12px 8px 4px; font-size: .75rem; font-weight: 400; color: var(--dim); }
.item { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: .9375rem; line-height: 1.3; }
.item span { display: flex; align-items: baseline; gap: 10px; }
.item i { font-style: normal; font-size: .6875rem; color: var(--hot); border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; flex: none; font-variation-settings: "MONO" .5; }
.item small { color: var(--dim); font-size: .75rem; }
.on { background: var(--raise); }
.hint { padding: 14px 8px 8px; }
.hint p { margin: 0 0 14px; color: var(--dim); font-size: .9375rem; max-width: 56ch; }
.hint div { display: flex; flex-wrap: wrap; gap: 6px; }
.hint button { font-size: .8125rem; background: var(--raise); border-radius: 999px; padding: 6px 12px; }
.hint button:hover { background: var(--line); }
.none { margin: 14px 8px; color: var(--dim); font-size: .9375rem; }
.foot { display: flex; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .6875rem; color: var(--dim); }
.foot kbd { font: inherit; background: var(--raise); border-radius: 4px; padding: 1px 5px; margin-right: 3px; }
@media (max-width: 700px) { .backdrop { padding: 12px; } .foot span:last-child { display: none; } }

/* ---- extras: the record-page links, the first-run intro and similar ---- */
.mark { color: var(--ink); }
.statlink { text-decoration: underline; text-underline-offset: 2px; }
.severity { text-transform: capitalize; }
.err { color: var(--red); }

/* ---- the Blackloom theme (the look of blackloom.ai): ours, on top of the base rules ----
   Space Grotesk text, Funnel Display headings (each used when installed, else the system sans), white fading to pale blue,
   near-black text, one bright blue for what is active or primary, and soft rounded controls with a hairline outline. */
:root {
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: "Funnel Display", "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ring: 0 0 0 1px var(--line), 0 1px 3px rgba(30, 60, 120, .07);
}
:root body { font-variation-settings: normal; }
:root .crumbs, :root .tag, :root .figure, :root .stats,
:root .row small, :root .key kbd, :root .esc { font-variation-settings: normal; }
.brand, .panel h2, .hero h1, .connect h2 { font-family: var(--display); }
:root .brand { font-size: 1.3rem; font-weight: 600; letter-spacing: .14em; }
.brand { pointer-events: auto; cursor: pointer; color: var(--ink); text-decoration: none; }
.brand:focus-visible { outline: 2px solid var(--hot); outline-offset: 4px; border-radius: 6px; }
.brand .logo { display: block; height: 28px; width: auto; transition: height .38s cubic-bezier(.2, .8, .2, 1); }
.top.drilled .brand .logo { height: 22px; } /* large on the main page, smaller on the pages under it */
/* on a wide screen the logo sits in the middle of the overview and moves to the top left once anything is opened */
@media (min-width: 901px) {
  .top.drilled { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 28px; }
  .top.drilled .brand { order: -1; }
  .top.drilled .brand .lite { font-size: .56rem; }
}
.brand .lite { font-size: .62rem; font-weight: 600; letter-spacing: .14em; line-height: 1; color: var(--hot); border: 1px solid var(--hot); border-radius: 999px; padding: 4px 8px 3px; }
:root .panel h2, :root .connect h2 { font-weight: 500; letter-spacing: -.015em; }
:root .hero h1 { font-weight: 500; font-size: 1.05em; }
:root .stat b { font-weight: 500; }
:root .key, :root .lens, :root .sorts button, :root .pager button,
:root .more, :root .esc, :root .snippet button { border-radius: 10px; box-shadow: var(--ring); }
:root .lens { padding: 3px; }
:root .crumbs .lens button { border-radius: 8px; }
:root .filter, :root .box, :root .connect { border-radius: 12px; }
:root .filter { box-shadow: var(--ring); border-color: transparent; }
:root .filter:focus { outline: 2px solid var(--hot); outline-offset: 1px; }
/* blue is what is active, and what to press */
:root .crumbs .lens button[aria-pressed="true"], :root .sorts button[aria-pressed="true"] { background: var(--hot); color: var(--on-hot); box-shadow: none; }
:root .actions a:first-child, :root .jump, :root .primary { background: var(--hot); color: var(--on-hot); border-radius: 10px; }
:root .actions a:first-child:hover, :root .jump:hover, :root .primary:hover { background: var(--hot-hover); color: var(--on-hot); }
:root .quiet { background: var(--raise); color: var(--ink); }
:root .crumbs b, :root .figure { color: var(--hot); }
:root .panel { box-shadow: -10px 0 36px rgba(30, 60, 120, .08); border-left-color: var(--line); }
:root .item i { border-radius: 6px; }
:root .on { background: rgba(79, 70, 229, .09); }
@media (max-width: 900px) { :root .panel { box-shadow: 0 -10px 36px rgba(30, 60, 120, .12); } }

/* the view switch can also hold links to the views that are separate pages (ATT&CK) */
.crumbs .lens a { text-decoration: none; padding: 0 11px; height: 26px; border-radius: 8px; font-size: .75rem; color: var(--dim); display: inline-flex; align-items: center; }
.crumbs .lens a:hover { color: var(--ink); }
.crumbs .lens a[hidden] { display: none; }
.crumbs .lens a[aria-current="page"] { background: var(--hot); color: var(--on-hot); }

/* no text at the foot of the map: the intro and the counters are gone, and the empty intro keeps no glow behind it */
.hero:empty::before { display: none; }
.crumbs .lens a[hidden] { display: none; }

/* a phone: the view switch uses short labels, and the header's buttons and wordmark tighten so one row holds them */
.short { display: none; }
@media (max-width: 560px) {
  .long { display: none; }
  .short { display: inline; }
  .brand { font-size: .8rem !important; letter-spacing: .08em !important; gap: 8px; }
  .brand .logo { height: 22px; }
  .top.drilled .brand .logo { height: 18px; }
  .brand .lite { font-size: .55rem !important; padding: 3px 6px 2px; }
  .keys { gap: 5px; }
  .key { padding: 0 9px; }
  .crumbs .lens button, .crumbs .lens a { padding: 0 8px; }
  .top { padding-left: 12px; padding-right: 12px; }
}

/* ---- Blackloom LITE's own look: an indigo accent that goes with the logo's blue-to-violet, pill controls, a floating
   panel card and a faint dot grid under the map. (Colours are the tokens at the top and PALETTE in map-view.js.) ---- */
.root::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(79, 70, 229, .16) 1px, transparent 1.3px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 22%, transparent 78%); mask-image: radial-gradient(ellipse at 50% 46%, #000 22%, transparent 78%); }
:root .key, :root .lens, :root .sorts button, :root .pager button, :root .more, :root .esc, :root .snippet button, :root .crumbs .lens button,
:root .crumbs .lens a, .btn, .pill { border-radius: 999px; }
:root .actions a:first-child, :root .jump, :root .primary { border-radius: 999px; }
:root .panel h3 { letter-spacing: .04em; text-transform: uppercase; font-size: .6875rem; font-weight: 500; }
@media (min-width: 901px) {
  :root .panel { top: 100px; right: 14px; bottom: 14px; width: 430px; border: 1px solid var(--line); border-radius: 22px; padding-right: 28px;
    background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 18px 50px rgba(52, 46, 140, .14), 0 2px 6px rgba(30, 60, 120, .06); transform: translateX(calc(100% + 24px)); }
  :root .panel.open { transform: none; }
}

/* The layout switch: on a phone it is a small symbol, so the header keeps to one row. */
@media (max-width: 560px) {
  .key[data-act="layout"] .lbl { display: none; }
  .key[data-act="layout"]::before { content: "\25A6"; font-size: 14px; line-height: 1; }
  .key[data-act="layout"][data-to="dial"]::before { content: "\25D4"; }
}

/* The live card: shown on the right while the cursor is on a leaf or a year of the tree. */
.panel.peek { pointer-events: none; transform: none; opacity: 0; transition: opacity .1s; z-index: 4; bottom: auto; max-height: calc(100% - 100px); background: var(--bg); }
.panel.peek.open { opacity: 1; }
.peek .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.peek .chip { font-size: .72rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.peek .chip.hot { color: #fff; background: var(--red); border-color: var(--red); }
.peek .split { height: 8px; border-radius: 6px; background: var(--raise); overflow: hidden; margin: 6px 0 12px; }
.peek .split i { display: block; height: 100%; background: var(--red); }
.peek .peekrow { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.peek .peekrow span { font-size: .82rem; line-height: 1.3; }
.peek .peekrow small { color: var(--dim); }
.peek .facts2 { margin: 6px 0 12px; border-top: 1px solid var(--line); }
.peek .facts2 div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.peek .facts2 dt { color: var(--dim); } .peek .facts2 dd { margin: 0; overflow-wrap: anywhere; }

/* The tree's search box, in the header with the other keys. */
.key.search { width: 210px; height: 30px; border: 0; outline: none; background: var(--raise); color: var(--ink); font: inherit; font-size: .75rem; padding: 0 14px; border-radius: 999px; -webkit-appearance: none; appearance: none; }
.key.search::placeholder { color: var(--dim); }
.key.search:focus { box-shadow: 0 0 0 2px var(--hot); background: var(--bg); }
@media (max-width: 900px) { .key.search { width: 110px; } }
@media (max-width: 560px) { .key.search { width: 84px; padding: 0 10px; } }

/* In the tree there is no side panel: the hover card follows the cursor, and an opened CVE is a card hung on its leaf. */
.panel.peek, .panel.leafcard { position: fixed; right: auto; bottom: auto; top: 76px; left: auto; width: 340px; max-height: calc(100vh - 90px); height: auto; transform: none; padding: 16px 20px 18px; }
.panel.peek { pointer-events: none; opacity: 0; }
.panel.peek.open { opacity: 1; }
.panel.leafcard { width: 380px; opacity: 0; pointer-events: none; right: 14px; z-index: 5; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 40px rgba(30, 40, 110, .18); overflow-y: auto; }
.panel.leafcard.open { opacity: 1; pointer-events: auto; }
.panel.leafcard .x { position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--raise); color: var(--dim); font-size: 12px; cursor: pointer; }
.panel.leafcard .x:hover { background: var(--line); color: var(--ink); }
.panel.leafcard h2 { margin-right: 28px; }

/* ---- the canopy's own controls: a trail, a toolbar and the search results ---- */
.root:not([data-layout="tree"]) .trail, .root:not([data-layout="tree"]) .tools, .root:not([data-layout="tree"]) .searchlist { display: none; }
.root[data-layout="tree"] .top.drilled .crumbs { visibility: hidden; }
.trail { position: absolute; top: 86px; left: 24px; max-width: 58%; z-index: 3; display: flex; align-items: center; gap: 4px; max-width: calc(100% - 40px); padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .86); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(30, 40, 110, .1); font-size: 12px; overflow: hidden; white-space: nowrap; backdrop-filter: blur(6px); }
.trail[hidden], .tools[hidden], .searchlist[hidden] { display: none; }
.trail button, .trail .cur { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.trail button:hover { background: var(--raise); }
.trail .cur { background: var(--hot); color: var(--on-hot); cursor: default; font-weight: 500; }
.trail i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.trail b { color: var(--dim); font-weight: 400; }
.tools { position: absolute; bottom: 18px; right: 24px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(30, 40, 110, .14); }
.tools button { height: 32px; min-width: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.tools button:hover { background: var(--raise); }
.tools button:focus-visible { outline: 2px solid var(--hot); outline-offset: 1px; }
.tools .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.searchlist { position: fixed; z-index: 6; width: 350px; max-height: min(60vh, 460px); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 16px 44px rgba(30, 40, 110, .2); }
.searchlist button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.searchlist button i { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; }
.searchlist button span { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchlist button small { grid-column: 2; grid-row: 2; color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchlist button em { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-size: 10.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.searchlist button:hover, .searchlist button[aria-selected="true"] { background: var(--raise); }
.searchlist button[aria-selected="true"] { box-shadow: inset 0 0 0 1.5px var(--hot); }
.searchlist p { margin: 8px 10px; color: var(--dim); font-size: 12px; }
@media (max-width: 900px) { .trail { top: 100px; font-size: 11px; max-width: calc(100% - 40px); } .tools { bottom: 12px; right: 12px; } .searchlist { width: calc(100vw - 16px); left: 8px !important; } }

.vlogo { margin-right: 6px; width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; border-radius: 3px; background: #fff; }
/* Where to find the detail: a bright pill at the top right, under the buttons, in the first place the eye goes. */
.sitetop { position: fixed; top: 60px; right: 24px; z-index: 8; display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px; font-size: 13px; line-height: 1; color: var(--on-hot); background: var(--hot); text-decoration: none; box-shadow: 0 6px 20px rgba(67, 56, 202, .28); white-space: nowrap; transition: background .15s, transform .15s; }
.sitetop b { font-weight: 700; letter-spacing: .01em; }
.sitetop:hover, .sitetop:focus-visible { background: var(--hot-hover); transform: translateY(-1px); }
@media (max-width: 900px) { .sitetop { right: 12px; font-size: 12px; padding: 7px 12px; } .sitetop span { display: none; } }
/* The Circle layout's credit, bottom centre, only while the circle is showing. */
.credit { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; font-size: 12px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.credit b { color: var(--ink); font-weight: 600; }
.credit:hover b, .credit:focus-visible b { color: var(--hot); text-decoration: underline; }
.root:not([data-layout="dial"]) .credit { display: none; }
.root:has(#panel.open) .credit { display: none; }
/* On a phone the Light/Dark switch is a half-moon beside the view tabs (not in the crowded row of buttons above), and the blackloom.live pill sits at the foot. */
@media (max-width: 600px) {
  .key[data-act="theme"] { position: fixed; top: 52px; right: 12px; z-index: 6; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
  .key[data-act="theme"] .lbl { font-size: 0; } .key[data-act="theme"] .lbl::before { content: "\25D0"; font-size: 17px; line-height: 1; }
  .sitetop { top: auto; right: auto; left: 50%; bottom: 38px; transform: translateX(-50%); }
  .sitetop:hover, .sitetop:focus-visible { transform: translateX(-50%) translateY(-1px); }
  .sitetop span { display: inline; }
}

/* The circle's key, bottom left: small, quiet, and only in the circle. */
.legend { position: absolute; left: 24px; bottom: 22px; z-index: 3; width: 232px; padding: 12px 14px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 11.5px; line-height: 1.35; color: var(--dim); }
.legend-h { margin: 0 0 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .8; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 18px; height: 8px; border-radius: 2px; flex: none; background: var(--ink); }
.legend .sw.red { background: var(--red); }
.legend-n { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; }
.root:has(#panel.open) .legend { display: none; }
@media (max-width: 900px) { .legend { display: none; } }
/* blackloom.live: a quiet outlined button that still catches the eye, not a loud filled pill */
.sitetop { background: transparent; color: var(--hot); border: 1px solid var(--hot); box-shadow: none; font-weight: 500; }
.sitetop:hover, .sitetop:focus-visible { background: var(--hot); color: var(--on-hot); }
:root[data-theme="dark"] .sitetop { box-shadow: none; background: rgba(255, 138, 76, .08); }
:root[data-theme="dark"] .sitetop:hover { background: var(--hot); }
