/* Security Lookup Hub: "Red Team Brutalist" theme (Docs/design_handoff_security_lookup_hub).
   Dark only. No radii, no shadows. Fonts are self-hosted (fonts/, SIL OFL). */

@font-face { font-family: "Anton"; src: url("../fonts/anton-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/spacemono-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/spacemono-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrainsmono-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --bg-deep: #050505;
  --panel: #111;
  --overlay: rgba(10, 10, 10, 0.88);
  --text: #f2f2f2;
  --body: #f2f2f2;
  --muted: #f2f2f2;
  --muted-2: #a0a0a0;
  --muted-3: #a0a0a0;
  --muted-4: #5c5c5c;
  --line: #2a2a2a;
  --input-line: #555;
  --accent: #ff3344;
  --on-accent: #0a0a0a;
  --critical: #ff3344;
  --high: #ff8a3d;
  --medium: #ffd23d;
  --low: #9fd36b;
  --ok: #9fd36b;
  --warn: #ffd23d;
  --bad: #ff3344;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --term: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--mono);
}

a { color: var(--accent); }
a:hover { color: var(--text); }
code, .mono { font-family: var(--mono); font-size: 0.95em; overflow-wrap: anywhere; }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -999px; z-index: 10; }
.skip:focus { left: 16px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 6px 10px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Keyframes ---------- */

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fillsweep { 0%, 100% { clip-path: inset(0 100% 0 0); } 45%, 55% { clip-path: inset(0 0 0 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fall { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes ping { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Binary rain (decorative background) ---------- */

.rain { position: fixed; inset: 0; overflow: hidden; opacity: 0.35; pointer-events: none; z-index: 0; }
.rain span {
  position: absolute;
  top: 0;
  height: 200%;
  font-size: 14px;
  line-height: 16px;
  white-space: pre;
  font-family: var(--term);
  color: transparent;
  /* Each column's glyphs are lit by a gradient: a bright head with a fading trail. */
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, rgba(255, 51, 68, 0.15) 160px, #ff3344 300px, #ffd6db 320px,
    transparent 321px, transparent 480px);
  -webkit-background-clip: text;
  background-clip: text;
  animation: fall linear infinite;
}

/* ---------- Terminal bar ---------- */

.term {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 28px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--accent);
  font: 13px/1.4 var(--term);
  white-space: nowrap;
  overflow: hidden;
}
.term-prompt { color: var(--accent); font-weight: 700; }
.term-line { display: inline-flex; align-items: center; color: var(--text); }
.term-cursor { display: inline-block; width: 8px; height: 15px; margin-left: 1px; background: var(--accent); animation: blink 1s step-end infinite; }
.term-out { color: var(--muted-2); opacity: 0; transition: opacity 0.3s; overflow: hidden; text-overflow: ellipsis; }
.term-out.shown { opacity: 1; }
.term-pid { margin-left: auto; color: var(--muted-4); font-size: 11px; }

/* ---------- Header and nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(10, 10, 10, 0.94);
  border-bottom: 1px solid var(--line);
}
.site-header .inner { display: flex; flex-wrap: wrap; align-items: stretch; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  border-right: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
}
.brand:hover { color: var(--text); }
.brand-dot { width: 10px; height: 10px; flex: none; background: var(--accent); animation: blink 1s step-end infinite; }
.site-nav { display: flex; flex-wrap: wrap; }
.site-nav a {
  display: flex;
  align-items: center;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  color: var(--body);
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--accent); color: var(--on-accent); }
.site-nav a[aria-current="page"] { background: var(--text); color: var(--on-accent); }
.nav-toggle { display: none; }

/* ---------- Hex ticker ---------- */

.ticker { position: relative; z-index: 2; overflow: hidden; white-space: nowrap; background: var(--panel); border-bottom: 1px solid var(--line); }
/* js/chrome.js sizes the strip to the screen and sets the duration, so phones get a
   short layer (very wide animated layers flicker on mobile browsers). */
.ticker-track { display: inline-block; padding: 8px 0; color: var(--accent); font-size: 12px; animation: ticker 22s linear infinite; will-change: transform; backface-visibility: hidden; }

/* ---------- Page layout ---------- */

main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  animation: rise 0.4s ease both;
}
main > * { margin-top: 0; margin-bottom: 0; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 15px; font-weight: 700; }

/* ---------- Hero ---------- */

.hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 30px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-title {
  display: grid;
  margin: 0;
  font: 400 clamp(50px, 11vw, 170px)/0.88 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
/* Padding (cancelled by the negative margin) makes each span's box taller than the
   tight line-height, so the clip-path below doesn't cut off the tops and bottoms of
   round letters (S, O, C), which overshoot the line box. */
.hero-title span { grid-area: 1 / 1; padding: 0.12em 0; margin: -0.12em 0; }
.hero-outline { color: transparent; -webkit-text-stroke: 2px var(--text); }
/* Same stroke as the outline, in red, so the fill covers the white edge completely. */
/* A red stroke 1px wider than the outline's, so the fill covers the white edge completely
   (at the same width, the outline's anti-aliased edge showed through as a light fringe). */
.hero-fill { color: var(--accent); -webkit-text-stroke: 3px var(--accent); animation: fillsweep 4s ease-in-out infinite; }
.lede { margin: 0; max-width: 680px; color: var(--body); font-size: 15px; line-height: 1.6; }
.lede code { color: var(--text); }

.radar-block { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.radar {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(255, 51, 68, 0.5);
  overflow: hidden;
  background: radial-gradient(circle, transparent 32%, rgba(255, 51, 68, 0.2) 33%, transparent 34%, transparent 65%, rgba(255, 51, 68, 0.2) 66%, transparent 67%);
}
.radar::before, .radar::after { content: ""; position: absolute; background: rgba(255, 51, 68, 0.3); }
.radar::before { top: 50%; left: 0; right: 0; height: 1px; }
.radar::after { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar-sweep { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(255, 51, 68, 0.55), transparent 25%); animation: spin 3s linear infinite; }
.radar-blip { position: absolute; left: 110px; top: 52px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.radar-ring { position: absolute; left: 106px; top: 48px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--text); animation: ping 1.6s ease-out infinite; }
.radar-dot { position: absolute; left: 48px; top: 112px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.radar-caption { margin: 0; text-align: center; color: var(--muted-3); font-size: 11px; letter-spacing: 2px; line-height: 1.5; }

/* ---------- Footer ---------- */

footer.site-footer {
  position: relative;
  z-index: 1;
  width: calc(100% - 80px);
  max-width: 1120px;
  margin: 0 auto 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-3);
  font-size: 12px;
}
footer.site-footer::before { content: "//"; color: var(--accent); margin-right: 10px; }
footer.site-footer:empty { display: none; }

/* ---------- Panels, cards and grids ---------- */

.panel { background: var(--overlay); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel > * { margin-top: 0; margin-bottom: 0; }
/* A sub-tool inside a panel (e.g. subnet practice under the calculator). */
.panel-sub { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; min-width: 0; }
.panel-sub > * { margin-top: 0; margin-bottom: 0; }

/* Brutalist grid: container draws top/left lines, cells draw right/bottom, so lines never double. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--overlay);
}
.card-grid > .panel { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; }
.card-grid.wide { grid-template-columns: 1fr; }
/* Section numbers come from page order (a CSS counter), so they can't drift: the
   markup has empty <span class="num"> placeholders. */
main { counter-reset: section; }
.num { font: 400 44px/1 var(--display); color: var(--accent); }
.num::before { counter-increment: section; content: counter(section, decimal-leading-zero); }
.panel h2 { font-size: 18px; }

.hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty { color: var(--muted-2); }

/* ---------- Forms ---------- */

input, select, textarea, button { font: inherit; color: inherit; }
label { display: block; margin-bottom: 6px; color: var(--body); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
input[type="text"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--input-line);
  border-radius: 0;
  padding: 12px;
  font-size: 13px;
  color: var(--text);
  caret-color: var(--accent);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted-3); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select option { background: var(--bg); color: var(--text); }
textarea { min-height: 110px; resize: vertical; font-family: var(--mono); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input, .row > select { flex: 1 1 220px; width: auto; }

button, a.button {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
button:hover, a.button:hover { background: var(--text); border-color: var(--text); color: var(--on-accent); }
button.secondary, a.button.secondary { background: transparent; color: var(--text); border-color: var(--input-line); }
button.secondary:hover, a.button.secondary:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
button.small, a.button.small { padding: 5px 10px; font-size: 11px; }

/* Lookup's type buttons: one choice, wrapping onto more rows on phones (never a
   sideways-scrolling strip). The selected one is filled red. */
.type-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.type-picker button { padding: 8px 12px; font-size: 12px; }
.type-picker button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.type-about { margin-top: 10px; }
.type-checks { margin-top: 2px; }
.myip-row { margin: 0; }
button:disabled { opacity: 0.6; cursor: progress; }
#adrill-options button { text-transform: none; text-align: left; font-family: var(--term); } /* acronyms keep their case (DoS, IaaS) */
#adrill-options button:disabled { cursor: default; }

/* Big search bar: input + button inside a 2px white frame. */
.bigbar { display: flex; flex-wrap: wrap; align-items: stretch; border: 2px solid var(--text); background: var(--bg); }
.bigbar > input[type="text"], .bigbar > input[type="search"] {
  flex: 1 1 220px;
  width: auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 20px 22px;
  font-size: 18px;
}
.bigbar > button[type="submit"] { padding: 20px 34px; border: 0; font-size: 18px; }
.bigbar-side { display: flex; align-items: center; padding: 0 22px; border-left: 2px solid var(--text); color: var(--muted); font-size: 13px; text-transform: uppercase; }
.bigbar > select { flex: 0 0 auto; width: auto; min-width: 180px; border: 0; border-left: 2px solid var(--text); padding: 20px 40px 20px 22px; font-size: 14px; text-transform: uppercase; background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; }

/* Segmented control (CVE severity). */
.segments { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.segments label { display: flex; align-items: center; margin: 0; padding: 20px 14px; border-right: 1px solid var(--line); color: var(--body); font-size: 12px; font-weight: 400; letter-spacing: 0; cursor: pointer; white-space: nowrap; }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segments label:has(input:checked) { background: var(--text); color: var(--on-accent); }
.segments label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Pills / chips. */
.chips, .pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  background: transparent;
  color: var(--body);
  border: 1px solid var(--input-line);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 400;
}
.chip:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--on-accent); border-color: var(--text); }
.chip-count { margin-left: 8px; opacity: 0.7; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted-3); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.live-dot::before { content: ""; width: 8px; height: 8px; background: var(--accent); animation: blink 1s step-end infinite; }

/* Drop zones. */
.drop { display: block; margin: 0; padding: 26px 14px; border: 1px dashed var(--input-line); text-align: center; color: var(--muted-2); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; cursor: pointer; }
.drop::before { content: "\2913  "; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--accent); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.small-drop { padding: 12px 14px; flex: 1 1 220px; margin: 0 auto 0 0; }

/* ---------- Status colours ---------- */

.badge { display: inline-block; padding: 2px 8px; border: 1px solid var(--input-line); color: var(--body); font-size: 11px; text-transform: uppercase; }
.badge.star { border-color: var(--accent); color: var(--accent); }
.badge.muted { color: var(--muted-2); }
.flag { display: inline-block; padding: 1px 7px; border: 1px solid currentColor; font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.flag.ok { color: var(--ok); }
.flag.warn { color: var(--warn); }
.flag.bad { color: var(--bad); }
.flag.muted { color: var(--muted-2); }
.notice { margin: 0; padding: 12px 14px; border: 1px solid currentColor; border-left-width: 4px; background: rgba(10, 10, 10, 0.6); }
.notice.ok { color: var(--ok); }
.notice.warn { color: var(--warn); }
.notice.bad { color: var(--bad); }
.verdict { margin: 0; padding: 10px 12px; border-left: 4px solid currentColor; background: rgba(255, 255, 255, 0.03); font-size: 14px; }
.verdict.ok { color: var(--ok); }
.verdict.warn { color: var(--warn); }
.verdict.bad { color: var(--bad); }
.verdict.muted { color: var(--muted); }
.verdict ul { margin-top: 4px; color: var(--body); }
.stale { color: var(--warn); }

/* ---------- Lookup results ---------- */

.result:empty { display: none; }
.result > * + * { margin-top: 14px; }
.result > h3 { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.detected { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.dkim-row { padding: 14px 0 0; }
.dkim-row input { max-width: 320px; }

.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.links a { display: block; height: 100%; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background 0.15s; }
.links a:hover { background: rgba(255, 51, 68, 0.08); color: var(--text); }
.links .what { display: block; color: var(--muted-2); font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--overlay); }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 { font-size: 15px; text-transform: uppercase; }
.card footer { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-top: 6px; color: var(--muted-2); font-size: 12px; }
.card p { margin: 0; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts.hashes dd { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content 1fr auto; gap: 6px 12px; align-items: center; margin: 0; }
.kv dt { color: var(--muted-2); font-size: 12px; font-weight: 700; }
.kv dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.more summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.mono-list { margin: 6px 0 0; padding-left: 18px; max-height: 240px; overflow: auto; overflow-wrap: anywhere; font-size: 12px; }
.plain-list { margin: 0; padding-left: 18px; font-size: 13px; }
.plain-list li { margin-bottom: 2px; overflow-wrap: anywhere; }
.small { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.candidates { margin: 0; padding-left: 20px; }
.candidates .note { color: var(--muted); font-size: 12px; }
.priority { margin: 0; }
.explain { padding: 18px; border: 1px dashed var(--input-line); display: flex; flex-direction: column; gap: 10px; }
.explain-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--body); }

/* ---------- CVEs ---------- */

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); background: var(--overlay); }
.rows > li { border-bottom: 1px solid var(--line); transition: background 0.15s; }
.rows > li:hover { background: rgba(255, 51, 68, 0.06); }
.cve-row { display: grid; grid-template-columns: 90px 180px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 0; }
.cve-score { font: 400 34px/1 var(--display); }
.sev-critical { color: var(--critical); }
.sev-high { color: var(--high); }
.sev-medium { color: var(--medium); }
.sev-low { color: var(--low); }
.sev-none { color: var(--muted-3); }
.cve-id { display: flex; flex-direction: column; gap: 2px; }
.cve-id strong { font-size: 14px; }
.cve-id span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.cve-desc { margin: 0; color: var(--body); font-size: 13px; overflow-wrap: anywhere; }
.cve-go { padding-right: 14px; font-weight: 700; font-size: 12px; text-decoration: none; white-space: nowrap; }
.cve-links { margin-top: 4px; font-size: 12px; }

/* ---------- News ---------- */

.news-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px 0; }
.news-tag { justify-self: start; padding: 3px 8px; border: 1px solid currentColor; font-size: 11px; text-transform: uppercase; }
.news-tag.kev { color: var(--accent); }
.news-tag.advisories { color: var(--high); }
.news-tag.news { color: var(--low); }
.news-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--accent); }
.news-source { color: var(--muted-2); font-size: 12px; }
.news-age { padding-right: 14px; color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.news-body > * + * { margin-top: 6px; }
.news-summary { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.kev-line { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0; color: var(--body); font-size: 13px; }

/* ---------- Threat actors ---------- */

.actor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--overlay); }
.actor { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; transition: background 0.15s; }
.actor:hover { background: rgba(255, 51, 68, 0.07); }
.actor[open] { grid-column: 1 / -1; background: rgba(255, 51, 68, 0.04); }
.actor summary { display: flex; flex-direction: column; gap: 8px; padding: 22px; cursor: pointer; list-style: none; }
.actor summary::-webkit-details-marker { display: none; }
.actor-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted-2); }
.actor-meta .country { color: var(--accent); text-align: right; }
.actor-name { font: 400 38px/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.aliases { color: var(--muted); font-size: 12px; }
.actor-cta { color: var(--accent); font-size: 12px; font-weight: 700; }
.actor[open] .actor-cta::after { content: " \2191"; }
.actor-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.actor-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.evidence { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, 0.03); }
.inline-list { margin: 0; line-height: 1.8; }
.techniques { margin: 0; padding-left: 18px; columns: 2 300px; column-gap: 24px; font-size: 12px; }
.techniques li { break-inside: avoid; margin-bottom: 2px; }
.ref-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Reference ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.filters input[type="search"] { flex: 1 1 260px; width: auto; min-width: 0; }
.filters label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; letter-spacing: 0; text-transform: none; }
.tabs { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tab { padding: 12px 18px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--body); font-size: 12px; font-weight: 400; }
.tab:hover { background: transparent; color: var(--accent); }
.tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.ref-row { display: grid; grid-template-columns: 140px 220px minmax(0, 1fr); gap: 18px; align-items: baseline; padding: 14px 0; }
.ref-key { color: var(--accent); font-weight: 700; font-size: 11px; text-transform: uppercase; }
.ref-key.as-typed { text-transform: none; }
.ref-name { font-weight: 700; overflow-wrap: anywhere; }
.ref-name a { color: var(--text); }
.ref-name a:hover { color: var(--accent); }
.ref-desc { color: var(--muted); font-size: 13px; }
.ref-group-title { padding: 14px 0 8px; color: var(--muted-3); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.wts-card .wts-hub { margin: 0; }
.wts-card ul { color: var(--body); }

/* ---------- Analyze ---------- */

.jumps { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.jumps a { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(10, 10, 10, 0.9); color: var(--body); font-size: 12px; text-decoration: none; }
.jumps a span { color: var(--accent); margin-right: 6px; }
.jumps a:hover { background: var(--accent); color: var(--on-accent); }
.jumps a:hover span { color: var(--on-accent); }
/* A tool card takes the full row once it shows results, so tables aren't squeezed. */
.card-grid > .panel:has(.result:not(:empty)) { grid-column: 1 / -1; }
.card-grid > .panel { scroll-margin-top: 80px; }
textarea.tall { min-height: 160px; }
.mono-input { font-family: var(--mono); }
.tool-actions { align-items: center; }
label.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0 auto 0 0; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ioc-group > summary { cursor: pointer; font-weight: 700; text-transform: uppercase; font-size: 13px; }
.ioc-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; table-layout: fixed; }
.ioc-table th { text-align: left; font-weight: 700; color: var(--muted-2); padding: 6px; border-bottom: 1px solid var(--line); text-transform: uppercase; font-size: 11px; }
.ioc-table th:nth-child(2) { width: 4.5em; }
.ioc-table th:nth-child(3) { width: 9em; }
.ioc-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.ioc-table td.actions { white-space: nowrap; }
.ioc-table .flag { white-space: normal; display: inline-block; margin: 2px 0 0 6px; }
.small-link { margin: 0 8px 0 4px; font-size: 12px; }
.hops { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 13px; }
.hops li { overflow-wrap: anywhere; }
pre.json, pre.strings { margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--bg-deep); color: var(--body); font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }

/* ---------- Tools glossary ---------- */

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--overlay); }
.tool-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-letter { grid-row: span 2; font: 400 40px/1 var(--display); color: var(--accent); text-transform: uppercase; }
.tool-name { margin: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.tool-desc { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ---------- Phone layout (one breakpoint, 720px) ---------- */

@media (max-width: 720px) {
  .term { padding: 10px 16px; }
  .term-out, .term-pid { display: none; }

  .brand { padding: 18px 16px; }
  .js-nav .nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-height: 56px;
    padding: 0 18px;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
  }
  .js-nav .nav-toggle[hidden] { display: none; }
  .js-nav .nav-toggle[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
  .nav-toggle .when-open { display: none; }
  .nav-toggle[aria-expanded="true"] .when-open { display: inline; }
  .nav-toggle[aria-expanded="true"] .when-closed { display: none; }
  .js-nav .site-nav { display: none; flex-basis: 100%; flex-direction: column; border-top: 1px solid var(--line); }
  .js-nav .site-nav.open { display: flex; }
  .js-nav .site-nav a { padding: 18px 16px; border-right: 0; border-bottom: 1px solid var(--line); }

  main { padding: 24px 18px 40px; }
  footer.site-footer { width: calc(100% - 36px); margin-bottom: 32px; }
  /* Title and half-size radar share the first row; the intro runs full width below. */
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 10px; }
  .hero-text { display: contents; }
  .hero-title { grid-column: 1; grid-row: 1; }
  .radar-block { grid-column: 2; grid-row: 1; zoom: 0.5; }
  .lede { grid-column: 1 / -1; }

  .bigbar > button[type="submit"] { flex: 1 1 100%; }
  .bigbar .segments { flex: 1 1 100%; order: 2; border-top: 2px solid var(--text); }
  .bigbar > select { flex: 1 1 100%; border-left: 0; border-top: 2px solid var(--text); }
  .bigbar-side { padding: 14px 22px; }

  .cve-row { grid-template-columns: 64px minmax(0, 1fr); gap: 8px 14px; padding: 16px 0; }
  .cve-desc, .cve-go { grid-column: 1 / -1; }
  .cve-desc { padding-right: 14px; }

  .news-row { grid-template-columns: 1fr auto; gap: 8px; }
  .news-body { grid-column: 1 / -1; order: 3; padding-right: 14px; }

  .ref-row { grid-template-columns: 70px minmax(0, 1fr); gap: 6px 14px; }
  .ref-desc { grid-column: 1 / -1; }

  .ioc-table th:nth-child(3) { width: 6.5em; }
  .ioc-table td.actions { white-space: normal; }
}

/* ---------- Reduced motion: decorations stand still, text shows in full ---------- */

@media (prefers-reduced-motion: reduce) {
  .rain, .radar-sweep, .radar-ring { display: none; }
  .ticker-track, .hero-fill, .brand-dot, .term-cursor, .live-dot::before { animation: none; }
  .hero-fill { clip-path: inset(0 100% 0 0); }
  main { animation: none; }
  .term-out { opacity: 1; transition: none; }
}

/* ---------- Page-specific additions ---------- */

.search-block > * + * { margin-top: 14px; }
#search-input { scroll-margin-top: 90px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
fieldset.segments { margin: 0; padding: 0; border: 0; min-width: 0; }
.tool-grid { list-style: none; margin: 0; padding: 0; }
.actor-cta { text-transform: uppercase; }
.wts-card { gap: 10px; }
.cve-go { text-transform: uppercase; }

/* ---------- Boxed blocks (Lookup) and Ask ---------- */

/* The Lookup section and Ask's intro share a boxed layout and title style. */
.block { scroll-margin-top: 90px; margin: 34px 0; padding: 22px; border: 2px solid var(--text); background: var(--overlay); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.block > * { margin-top: 0; margin-bottom: 0; }
.search-block.block > * + * { margin-top: 0; }
.block-title { font: 400 34px/1 var(--display); letter-spacing: 1px; color: var(--text); text-transform: uppercase; }
.block-title::before { content: "> "; color: var(--accent); }
/* Study: one accordion panel per exam, with a card per question. */
.exam { margin: 0 0 12px; border: 2px solid var(--text); background: var(--overlay); scroll-margin-top: 90px; }
.exam > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 22px; cursor: pointer; list-style: none; }
.exam > summary::-webkit-details-marker { display: none; }
.exam-name { font: 400 28px/1 var(--display); letter-spacing: 1px; text-transform: uppercase; }
.exam-name::before { content: "+ "; color: var(--accent); }
.exam[open] .exam-name::before { content: "\2212  "; }
.exam-count { color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.exam > summary:hover .exam-name, .exam > summary:focus-visible .exam-name { color: var(--accent); }
.exam-body { display: grid; gap: 14px; padding: 0 22px 22px; }
.exam-body > * { margin: 0; }
.qa-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.qa-card { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); min-width: 0; }
.qa-card > * { margin: 0; }
.qa-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.qa-range { color: var(--muted-2); font-size: 13px; min-width: 0; }
.qa-q { font-weight: 700; line-height: 1.5; }
.qa-options { display: grid; gap: 8px; }
.qa-options button { text-align: left; text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.4; white-space: normal; }
.qa-options button:disabled { opacity: 1; cursor: default; }
.qa-result:empty { display: none; }
.qa-answer { display: grid; gap: 8px; }
.qa-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.qa-steps code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
@media (max-width: 640px) {
  .exam > summary { padding: 14px 16px; }
  .exam-name { font-size: 22px; }
  .exam-body { padding: 0 16px 16px; }
}

/* My exposure: why it matters, then checks and links. */
.exposure-why { max-width: 760px; color: var(--body); line-height: 1.6; }
#exposure-permission { margin-top: 24px; }
.ask-form { display: flex; flex-direction: column; border: 1px solid var(--input-line); background: var(--bg); }
.ask-form:focus-within { border-color: var(--accent); }
/* Grows with its text (js/ask.js sets the height) up to about 6 lines, then scrolls. */
.ask-form textarea { border: 0; min-height: 46px; max-height: calc(6 * 1.6em + 22px); resize: none; overflow-y: auto; font-size: 14px; }
.ask-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.ask-count { margin-right: auto; color: var(--muted); font-size: 12px; }
.ask-count.over { color: var(--bad); font-weight: 700; }
.ask-offer { display: flex; flex-direction: column; gap: 10px; }
.ask-offer p { margin: 0; }
.ask-thread { display: flex; flex-direction: column; gap: 14px; }
.ask-thread:empty { display: none; }
.ask-msg { min-width: 0; padding: 14px 16px; border-left: 4px solid var(--input-line); background: rgba(255, 255, 255, 0.03); }
.ask-msg.ask-a { border-left-color: var(--accent); display: flex; flex-direction: column; gap: 12px; }
.ask-msg > p { margin: 0; }
.ask-who { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.ask-q-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.ask-text { color: var(--body); line-height: 1.65; overflow-wrap: anywhere; }
.ask-text > * { margin: 0; }
.ask-text > * + * { margin-top: 10px; }
.ask-text ul, .ask-text ol { padding-left: 22px; }
.ask-text li + li { margin-top: 4px; }
.ask-text strong { color: var(--text); }
.ask-text code { font-family: var(--term); font-size: 0.92em; padding: 0 4px; border: 1px solid var(--line); color: var(--text); }
.ask-section { display: flex; flex-direction: column; gap: 6px; }
.ask-section h4 { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.ask-section a.chip, .chat-empty a.chip { text-decoration: none; }
.ask-section button.chip { text-transform: none; font-family: var(--term); } /* indicator values keep their case */
.ask-sources { margin: 0; padding-left: 22px; font-size: 13px; }
.ask-sources li { overflow-wrap: anywhere; margin-bottom: 2px; }
.ask-trace ol { margin-top: 6px; font-size: 12px; }
.ask-thinking { margin: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; }
.ask-dots::after { content: "..."; display: inline-block; width: 3ch; overflow: hidden; vertical-align: bottom; animation: ask-dots 1.2s steps(4, end) infinite; }
@keyframes ask-dots { from { width: 0; } to { width: 4ch; } }

/* Ask is the home page: a chat that fills the screen, thread on top, composer pinned
   to the bottom (sticky, so it sits above the on-screen keyboard and the home
   indicator). 100dvh follows the phone's toolbars; 100vh is the fallback. */
body[data-page="ask"] { min-height: 100vh; min-height: 100dvh; }
.chat-main { padding-bottom: 0; }
.chat { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.chat-empty { padding: 22px; border: 2px solid var(--text); background: var(--overlay); display: flex; flex-direction: column; gap: 12px; }
.chat-empty > * { margin: 0; }
.chat-route { color: var(--body); }
.chat-top { display: flex; justify-content: flex-end; }
.ask-thread > * { scroll-margin-top: 80px; }
.chat-dock {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#ask-notice:empty { display: none; }
/* While something runs, Send is Stop: a square (the word is for screen readers). */
#ask-send { min-width: 76px; }
#ask-send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#ask-send.stop { background: var(--text); border-color: var(--text); }
.stop-icon { display: inline-block; width: 11px; height: 11px; background: var(--on-accent); }
.done-icon { display: inline-block; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='square'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E"); }
/* Recording: the mic shows a pulsing red dot and the timer; the paperclip steps aside. */
.ask-form[data-busy="record"] { border-color: var(--accent); }
.ask-form[data-busy="record"] #ask-image { display: none; }
.ask-form textarea[readonly]::placeholder { color: var(--accent); opacity: 1; }
#ask-mic.recording { border-color: var(--accent); color: var(--accent); background: transparent; }
#ask-mic.recording .mic-icon { -webkit-mask: none; mask: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.25; } }
.ask-elapsed { font-variant-numeric: tabular-nums; }
.ask-still { text-transform: none; letter-spacing: 0; }
.ask-stopped { display: flex; flex-direction: column; gap: 8px; }
.ask-stopped p { margin: 0; }
/* Composer icon buttons (mic, image): CSS-drawn icons from inline SVG masks. */
.icon-button { display: inline-flex; align-items: center; gap: 6px; min-width: 40px; min-height: 36px; justify-content: center; padding: 6px 10px; }
.mic-icon, .clip-icon { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.mic-icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='square'%3E%3Crect x='9' y='3' width='6' height='11'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3M8 21h8'/%3E%3C/svg%3E"); }
.mic-time:empty { display: none; }
.mic-time { font-variant-numeric: tabular-nums; font-size: 12px; }
.clip-icon { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M20 11.5l-8.2 8.2a5 5 0 0 1-7.1-7.1l8.5-8.5a3.3 3.3 0 0 1 4.7 4.7l-8.5 8.5a1.7 1.7 0 0 1-2.4-2.4l7.8-7.8'/%3E%3C/svg%3E"); }
/* The attached image, above the box, with an X; and in the thread, on the question. */
.ask-attach { display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px 0; }
.ask-thumb { display: block; max-width: 140px; max-height: 110px; border: 1px solid var(--line); object-fit: contain; background: var(--panel); }
.ask-q .ask-thumb { margin: 6px 0; max-width: min(240px, 100%); max-height: 200px; }
.ask-attach-x { font-size: 16px; line-height: 1; padding: 4px 9px; }
.ask-form.dropping { border-color: var(--accent); border-style: dashed; }
.ask-transcribing { margin: 0; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; }

@media (max-width: 720px) {
  .chat-empty { padding: 16px; }
  .block-title { font-size: 28px; }
  .block { padding: 16px; }
  .chat-main { padding-top: 16px; }
  .ask-bar { gap: 6px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-dots::after { animation: none; width: 3ch; }
  #ask-mic.recording .mic-icon { animation: none; }
}

/* ---------- Long values wrap instead of widening the page ---------- */

/* Look up chips can carry a long URL or a 64-character hash; buttons don't break
   unbroken strings on their own. */
.chip { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.chips > * { min-width: 0; }
.ask-msg, .ask-section, .ask-sources, .ask-trace, .ask-simpler { min-width: 0; overflow-wrap: anywhere; }
.ask-text code { overflow-wrap: anywhere; word-break: break-word; }
.explain-text { min-width: 0; }

/* ---------- Plain-language extras ---------- */

.ask-simpler:empty { display: none; }
.ask-simpler { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--input-line); }
.ask-simpler h4 { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.explain-out:empty { display: none; }
/* Analyze: a fixed "What does this mean?" note, shown once a tool has a result. */
.meaning { margin-top: 12px; font-size: 13px; color: var(--body); }
.meaning summary { cursor: pointer; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.meaning p { margin: 8px 0 0; line-height: 1.6; }
.result:empty + .meaning { display: none; }

/* ---------- Phones: no zoom on focus ---------- */

/* iOS zooms into any form field whose text is under 16px, and the zoomed page then
   scrolls sideways. Pinch-zoom stays enabled (no maximum-scale). */
@media (max-width: 720px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea,
  .ask-form textarea, .row > input, .dkim-row input { font-size: 16px; }
}
