/* Kage Security Lab — dossier theme. No external fonts, no inline styles. */
:root {
  --bg: #07080a;
  --bg-2: #0b0d10;
  --panel: #0f1216;
  --panel-2: #141820;
  --line: #1d222b;
  --line-2: #2a313c;
  --text: #e7e9ec;
  --muted: #8b94a3;
  --dim: #5d6573;
  --accent: #ff3b30;
  --accent-2: #ff6a3d;
  --accent-ink: #1a0503;
  --ok: #3ddc97;
  --warn: #ffb020;
  --bad: #ff4d4f;
  --info: #5cc8ff;
  --radius: 10px;
  --wrap: 1200px;
  --sans: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; margin-top: 2rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.ico { width: 1.05em; height: 1.05em; vertical-align: -0.15em; flex: none; }
.ico-ext { width: .8em; height: .8em; margin-left: .25em; opacity: .7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .95rem/1 var(--sans); padding: .85em 1.25em; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  color: var(--text); background: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-outline { border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--accent); color: #fff; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: #fff; background: var(--panel-2); }
.btn-sm { padding: .6em .9em; font-size: .85rem; }
.btn-lg { padding: 1em 1.5em; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; }
.lm-shadow { fill: var(--accent); opacity: .9; }
.lm-front { fill: var(--bg); stroke: var(--text); stroke-width: 1.6; }
.lm-k { stroke: var(--text); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.brand-name { font: 800 1.15rem/1 var(--sans); letter-spacing: .14em; display: flex; flex-direction: column; }
.brand-sub { font: 500 .62rem/1.4 var(--mono); letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }

.nav-toggle > summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 8px; display: none; }
.nav-toggle > summary::-webkit-details-marker { display: none; }
.nav-toggle > summary .ico { width: 24px; height: 24px; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link { padding: .5rem .8rem; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 550; font-size: .95rem; }
.nav-link:hover, .nav-link[aria-current] { color: #fff; }
.nav-link[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-cta { margin-left: .5rem; }
.nav-group { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: -1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  width: 560px; padding: 1.25rem; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s; box-shadow: 0 30px 60px -20px #000;
}
.mega::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav-group:hover .mega, .nav-group:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: block; padding: .45rem .5rem; border-radius: 6px; text-decoration: none; font-size: .92rem; color: var(--text); }
.mega a:hover { background: var(--panel-2); }
.mega-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 .4rem .5rem; }

@media (min-width: 961px) { .nav-toggle { display: none; } }
@media (max-width: 960px) {
  .nav-toggle > summary { display: block; }
  .site-nav.desk { display: none; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem;
  }
  .nav-link { padding: .8rem .25rem; border-bottom: 1px solid var(--line); }
  .nav-link[aria-current] { box-shadow: none; color: var(--accent); }
  .mega { position: static; opacity: 1; visibility: visible; transform: none; width: auto; grid-template-columns: 1fr; gap: .75rem; padding: .5rem 0 .75rem 1rem; background: none; border: 0; box-shadow: none; }
  .nav-cta { margin: 1rem 0 0; }
}

/* ---------- Common blocks ---------- */
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin-bottom: 1rem; }
.lede { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 64ch; }
.tag { display: inline-block; font: 500 .7rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: .35em .6em; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }
.section { padding: clamp(4rem, 9vw, 7rem) 0; border-top: 1px solid var(--line); position: relative; }
.section.tight { padding: 3rem 0 5rem; border-top: 0; }
.section-head { margin-bottom: 2.5rem; max-width: 760px; }
.section-head.row { display: flex; justify-content: space-between; align-items: end; max-width: none; gap: 1rem; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 .75rem; display: flex; gap: .5em; align-items: center; font-family: var(--mono); font-weight: 500; }
.stack { display: grid; gap: 1rem; align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chip { font-size: .78rem; padding: .45em .8em; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--text); cursor: default; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--muted); }
button.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.ticks li { padding-left: 1.6em; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: .75em; height: .4em; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .7rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
.al-right { text-align: right; } .al-center { text-align: center; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 4rem; overflow: hidden; isolation: isolate; }
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 20%, transparent 75%);
}
.hero::after { content: ""; position: absolute; z-index: -1; width: 640px; height: 640px; right: -180px; top: -220px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 65%); filter: blur(10px); }
.hero-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding-bottom: 1.25rem; margin-bottom: 2.5rem; border-bottom: 1px dashed var(--line-2); }
.live { display: inline-flex; align-items: center; gap: .55em; color: var(--ok); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-h { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 15ch; margin-bottom: 1.5rem; letter-spacing: -0.04em; }
.accent { color: var(--accent); }
.hero .lede { margin-bottom: 2rem; }
.hero-check { display: grid; gap: .6rem; max-width: 640px; padding: 1.1rem; background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line-2); border-radius: 12px; }
.hc-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.hc-note { font-size: .72rem; color: var(--dim); }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 3.5rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 1.25rem 1rem 1.25rem 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 1.25rem; }
.stat:last-child { border-right: 0; }
.stat dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.stat dd { margin: .35rem 0 0; display: grid; }
.stat-v { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.stat-n { font-size: .72rem; color: var(--dim); }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1rem .75rem 1rem 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; padding-left: .75rem; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- Ticker ---------- */
.ticker { display: flex; align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.ticker-label { flex: none; display: flex; align-items: center; gap: .6em; padding: 0 1.25rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); border-right: 1px solid var(--line); background: var(--bg); z-index: 1; }
.ticker-label .pulse { background: var(--accent); }
.ticker-track { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-list { display: flex; flex: none; gap: 3rem; list-style: none; margin: 0; padding: .95rem 1.5rem; animation: marquee 70s linear infinite; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.ticker-list li { display: inline-flex; align-items: center; gap: .7em; }
.ticker-track:hover .ticker-list { animation-play-state: paused; }
.dot { width: 6px; height: 6px; background: var(--warn); border-radius: 1px; transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Cards ---------- */
.tool-grid, .svc-grid, .post-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.tool-card, .svc-card, .post-card {
  display: flex; flex-direction: column; gap: .7rem; padding: 1.4rem; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); position: relative;
  transition: border-color .2s, transform .2s, background .2s;
}
.tool-card:hover, .svc-card:hover, .post-card:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-2px); color: inherit; }
.tool-card::after, .svc-card::after { content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: 0; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity .2s; }
.tool-card:hover::after, .svc-card:hover::after { opacity: 1; }
.tool-meta { display: flex; justify-content: space-between; align-items: center; }
.tool-num { color: var(--dim); font-size: .8rem; }
.tool-title, .svc-title, .post-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.tool-sum, .svc-sum, .post-sum { color: var(--muted); font-size: .93rem; flex: 1; }
.tool-go { font-size: .78rem; color: var(--accent); display: inline-flex; gap: .4em; align-items: center; text-transform: uppercase; letter-spacing: .1em; }
.svc-ico { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 8px; color: var(--accent); background: var(--bg-2); }
.svc-ico .ico { width: 22px; height: 22px; }
.svc-card .tag { align-self: start; }
.post-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }

.diff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.diff { padding: 1.5rem; border-right: 1px solid var(--line); background: var(--bg-2); }
.diff:last-child { border-right: 0; }
.diff-n { color: var(--accent); font-size: .8rem; display: block; margin-bottom: 1rem; }
.diff p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 960px) { .diff-grid { grid-template-columns: 1fr 1fr; } .diff:nth-child(2) { border-right: 0; } .diff:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .diff-grid { grid-template-columns: 1fr; } .diff { border-right: 0; border-bottom: 1px solid var(--line); } .diff:last-child { border-bottom: 0; } }

/* ---------- Depth ---------- */
.depth { background: linear-gradient(180deg, var(--bg) 0%, #050506 100%); }
.depth-grid { display: grid; grid-template-columns: 120px 1fr; gap: 3rem; }
.gauge { position: sticky; top: 110px; align-self: start; display: flex; gap: 1rem; height: 340px; }
.gauge-rail { width: 3px; background: var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.gauge-fill { position: absolute; inset: 0 0 auto; height: 8%; background: linear-gradient(var(--text), var(--accent)); transition: height .4s ease; }
.gauge-marks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.gauge-marks li.is-on { color: var(--text); }
.layer { padding: 2.25rem 0 2.25rem 1.5rem; border-left: 1px solid var(--line); position: relative; max-width: 760px; }
.layer::before { content: ""; position: absolute; left: -5px; top: 2.6rem; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.layer.is-on::before { background: var(--accent); border-color: var(--accent); }
.layer-depth { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.layer h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.layer-name { color: var(--accent); display: block; font: 600 .8rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .16em; margin-bottom: .35rem; }
.layer-1 .layer-name { color: #c9ced6; }
.layer-2 .layer-name { color: var(--accent); }
.layer-0 .layer-name { color: #fff; }
.layer p { color: var(--muted); }
@media (max-width: 860px) { .depth-grid { grid-template-columns: 1fr; } .gauge { display: none; } }

/* ---------- Toolkit ---------- */
.toolkit-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.term { background: #050607; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent) 45%, transparent); }
.term-bar { margin: 0; padding: .7rem 1rem; font-size: .72rem; color: var(--dim); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .4rem; }
.term-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.term pre { margin: 0; padding: 1.25rem; font-size: .82rem; line-height: 1.8; overflow-x: auto; color: #c9ced6; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .acc { color: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .toolkit-inner { grid-template-columns: 1fr; } }

.reg-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: start; }
.reg-grid .small { padding: .75rem 1rem 0; }
.reg-grid .chips-label { padding: 0; margin: 1.5rem 0 0; }
.chips-label + .chips { margin-top: .6rem; }
@media (max-width: 860px) { .reg-grid { grid-template-columns: 1fr; } }

.final { padding: clamp(5rem, 10vw, 8rem) 0; text-align: center; border-top: 1px solid var(--line); position: relative; overflow: hidden; isolation: isolate; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 50% 70% at 50% 110%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); }
.final h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.final .lede { margin: 0 auto 2rem; }

/* ---------- Page head / article ---------- */
.page-head { padding: clamp(3rem, 7vw, 5rem) 0 2.5rem; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 60% 100% at 85% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.page-head h1 { max-width: 22ch; }
.crumbs { font-size: .8rem; margin: 1.25rem 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-head .post-meta { margin-top: 1rem; }
.article-layout, .tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.tool-side { display: grid; gap: 1rem; position: sticky; top: 84px; }
.side-link { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .92rem; }
.side-link:last-child { border-bottom: 0; }
.side-link:hover { color: var(--accent); }
.cta-panel { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
@media (max-width: 960px) { .article-layout, .tool-layout { grid-template-columns: 1fr; } .tool-side { position: static; } }

.prose { font-size: 1.04rem; max-width: 72ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: #c9ced6; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose a { color: #fff; text-decoration-color: var(--accent); }
.prose code { font: .88em var(--mono); background: var(--panel-2); border: 1px solid var(--line); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: #050607; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .86rem; }
.prose blockquote { margin: 1.5em 0; padding: .25em 1.2em; border-left: 3px solid var(--line-2); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose img { border-radius: 8px; border: 1px solid var(--line); }
.prose .table-wrap { margin: 1.5em 0; }
.callout { margin: 1.5em 0; padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-left: 3px solid var(--info); border-radius: 8px; background: var(--panel); }
.callout p:last-child { margin: 0; }
.callout-title { font: 600 .72rem/1 var(--mono); letter-spacing: .14em; color: var(--info); margin-bottom: .6rem !important; }
.callout-tip { border-left-color: var(--ok); } .callout-tip .callout-title { color: var(--ok); }
.callout-warning, .callout-caution { border-left-color: var(--warn); } .callout-warning .callout-title, .callout-caution .callout-title { color: var(--warn); }
.callout-important { border-left-color: var(--accent); } .callout-important .callout-title { color: var(--accent); }

.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: start; }
.contact-links .side-link { font-size: 1rem; padding: .8rem 0; }
.contact-links .side-link.is-hl { color: var(--accent); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.nf { min-height: 60vh; display: flex; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; }
.footer-grid > div > a:not(.brand) { display: block; color: var(--muted); text-decoration: none; padding: .25rem 0; font-size: .92rem; }
.footer-grid > div > a:hover { color: #fff; }
.footer-brand p { margin-top: 1rem; max-width: 40ch; font-size: .92rem; }
.social { display: flex; gap: 1rem; }
.social a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text); margin-bottom: .75rem; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--dim); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Tools UI ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.filter-bar .chips { margin: 0; }
.search { display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; min-width: min(100%, 280px); color: var(--muted); }
.search input { background: none; border: 0; padding: .7rem 0; width: 100%; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.empty { text-align: center; padding: 3rem 0; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: .75rem .9rem; width: 100%; min-width: 0; color: var(--text);
}
textarea { font-family: var(--mono); font-size: .86rem; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
select { width: auto; cursor: pointer; }
input[type="file"] { width: 100%; padding: .6rem; border: 1px dashed var(--line-2); border-radius: 8px; background: var(--bg); color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: .4rem .8rem; margin-right: .8rem; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; }
.field { display: grid; gap: .45rem; margin-bottom: 1rem; }
.field-label { font: 500 .72rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.field-row { display: flex; gap: .5rem; align-items: stretch; }
.field-row.wrap { flex-wrap: wrap; padding: 0; max-width: none; margin: 0 0 1rem; }
.field-row input { flex: 1; }
@media (max-width: 560px) { .hero-check .field-row, .tool-form .field-row:not(.wrap) { flex-wrap: wrap; } .tool-form .field-row .btn, .hero-check .field-row .btn { flex: 1; } }
.check-inline { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); cursor: pointer; margin-right: 1.25rem; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem 0; margin: 0 0 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hint-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cmd { font: .82rem var(--mono); background: var(--bg); border: 1px solid var(--line); padding: .35rem .6rem; border-radius: 6px; }
.tool-main { padding: 1.5rem; }
.tool-out { margin-top: 1.25rem; display: grid; gap: 1rem; }
.tool-out:empty { display: none; }
.gen { margin-top: 1.5rem; }
.gen-form .field-row { margin-top: .25rem; }
.status { color: var(--muted); min-height: 1.2em; margin: 0; }

/* result components (built by js/lib/kit.js) */
.r-card { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); overflow: hidden; }
.r-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.r-title { font-weight: 650; margin: 0; font-size: 1rem; }
.r-body { padding: 1rem; display: grid; gap: .6rem; }
.r-body > :last-child { margin-bottom: 0; }
.howto { margin-top: .9rem; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; background: var(--bg); }
.howto summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.howto ol { margin: .6rem 0 .4rem; padding-left: 1.2rem; font-size: .9rem; }
.howto li { margin: .25rem 0; }
.howto p { margin: .2rem 0 0; }
.sugg { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.sugg-h { margin: 0 0 .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.sugg-v { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; }
.sugg-v .r-pre { flex: 1; }
.r-pre { margin: 0; font: .82rem/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .75rem; color: #d3d7de; max-height: 420px; overflow: auto; }
.r-kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: .4rem 1rem; margin: 0; font-size: .9rem; }
.r-kv dt { color: var(--muted); font: .75rem/1.7 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.r-kv dd { margin: 0; word-break: break-word; }
.r-list { margin: 0; padding-left: 1.2em; display: grid; gap: .35rem; font-size: .92rem; }
.r-note { font-size: .88rem; color: var(--muted); margin: 0; }
.badge { display: inline-flex; align-items: center; gap: .4em; font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: .4em .65em; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.b-ok { color: var(--ok); } .b-warn { color: var(--warn); } .b-bad { color: var(--bad); } .b-info { color: var(--info); } .b-mute { color: var(--muted); }
.grade { display: flex; align-items: center; gap: 1.25rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.grade-letter { font: 800 3rem/1 var(--sans); width: 4.5rem; height: 4.5rem; display: grid; place-items: center; border-radius: 10px; border: 2px solid currentColor; flex: none; }
.grade-text h3 { margin: 0 0 .25rem; }
.grade-text p { margin: 0; color: var(--muted); font-size: .92rem; }
.meter { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.r-table { width: 100%; font-size: .86rem; }
.r-table td, .r-table th { padding: .55rem .75rem; }
.r-table td { font-family: var(--mono); word-break: break-all; }
.r-table td:first-child { word-break: normal; overflow-wrap: break-word; }
.r-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 560px; overflow-y: auto; }
.r-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.err { color: var(--bad); }
.spin { display: inline-block; width: 1em; height: 1em; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -0.15em; margin-right: .5em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Reveal on scroll (only when JS adds .js) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker-track { overflow-x: auto; }
}

@media print {
  .site-header, .site-footer, .ticker, .tool-side, .hero-grid { display: none; }
  body { background: #fff; color: #000; }
}
@media (max-width: 560px) { .hero-check .field-row input, .tool-form .field-row:not(.wrap) input { flex-basis: 100%; } }

/* ---------- Illustrations ---------- */
.hero-inner { position: relative; }
.hero-art { margin: 0; pointer-events: none; }
.hero-art img { display: block; width: 100%; height: auto; }
@media (min-width: 1180px) {
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 470px; column-gap: 2rem; align-items: start; }
  .hero-inner > * { grid-column: 1; }
  .hero-top, .stats { grid-column: 1 / -1; }
  .hero-art { grid-column: 2; grid-row: 2 / span 4; align-self: center; margin-right: -30px; }
  .hero-h { font-size: clamp(2.6rem, 5vw, 4.6rem); }
}
@media (max-width: 1179px) {
  .hero-inner { display: flex; flex-direction: column; }
  .hero-art { order: 5; width: 100%; max-width: 520px; align-self: center; margin: -1.5rem auto 2rem; }
  .stats { order: 6; }
}

.layer { display: grid; grid-template-columns: minmax(0, 1fr); }
.layer-art { margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b0d10; max-width: 560px; }
.layer-art img { display: block; width: 100%; height: auto; }
@media (min-width: 1100px) {
  .layer { grid-template-columns: minmax(0, 1fr) 420px; column-gap: 2.5rem; max-width: none; }
  .layer > :not(.layer-art) { grid-column: 1; }
  .layer-art { grid-column: 2; grid-row: 1 / span 5; align-self: center; margin: 0; }
}

.card-art { display: block; margin: -1.4rem -1.4rem .4rem; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 800 / 300; background: #0b0d10; }
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.svc-card:hover .card-art img, .post-card:hover .card-art img { transform: scale(1.04); }
.svc-card .svc-ico { margin-top: -2.6rem; position: relative; background: var(--panel); }
.article-cover { margin: 0 0 2rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.article-cover img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }

/* ---------- Sample chips in tool forms ---------- */
.samples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: -.25rem 0 0; font-size: .75rem; color: var(--dim); }
.samples .chip { font-size: .75rem; padding: .3em .7em; }

/* ---------- Reputation result ---------- */
.rep-summary { display: flex; gap: 1.5rem; align-items: center; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); flex-wrap: wrap; }
.rep-meta { flex: 1; min-width: 220px; display: grid; gap: .6rem; }
.rep-ip { margin: 0; font-size: 1.1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ring { --p: 0; --c: var(--ok); width: 108px; height: 108px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg-2); }
.ring > * { position: relative; }
.ring-v { font: 800 2rem/1 var(--sans); }
.ring-l { font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-top: .2rem; }
.ring-medium { --c: var(--warn); } .ring-high { --c: #ff7a45; } .ring-critical { --c: var(--bad); }
.flag-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.flag { display: inline-flex; align-items: center; gap: .45em; font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: .45em .7em; border: 1px solid var(--line-2); border-radius: 999px; color: var(--dim); }
.flag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.flag.is-on { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.flag.is-on .flag-dot { background: var(--bad); }
.ext-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }

/* ---------- Labs ---------- */
.lab-diagram { margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lab-diagram img { display: block; width: 100%; height: auto; }
.lab-products { font-size: .72rem; color: var(--dim); letter-spacing: .04em; }
.lab-principles .ticks { max-width: 760px; margin-bottom: 2rem; }
.mega { grid-template-columns: repeat(3, 1fr); width: 760px; }
@media (max-width: 960px) { .mega { grid-template-columns: 1fr; width: auto; } }
.footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Threat Intel blog ---------- */
.chip .count { color: var(--dim); margin-left: .25rem; }
.chip.is-on .count { color: inherit; opacity: .75; }
.tag-cat { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.read-time::before { content: "·"; margin-right: .5rem; color: var(--dim); }
.section-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 2.5rem 0 1rem; font-weight: 500; }

.lead-post { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); color: inherit; transition: border-color .2s, background .2s; }
.lead-post:hover { border-color: var(--line-2); background: var(--panel-2); color: inherit; }
.lead-art { display: block; background: #0b0d10; border-right: 1px solid var(--line); min-height: 100%; }
.lead-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.lead-post:hover .lead-art img { transform: scale(1.03); }
.lead-body { display: flex; flex-direction: column; gap: .8rem; padding: 2rem; justify-content: center; }
.lead-title { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.lead-cta { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--accent); margin-top: .3rem; }
@media (max-width: 860px) { .lead-post { grid-template-columns: 1fr; } .lead-art { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 800 / 300; } .lead-body { padding: 1.4rem; } }

.share { display: grid; gap: .6rem; }
.share-end { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.share-h { margin: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.share-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.share-btn { display: inline-flex; align-items: center; padding: .45rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--text); font-size: .82rem; font-weight: 500; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s; }
.share-btn:hover, .share-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.share-side .share-btn { font-size: .78rem; padding: .35rem .65rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.post-nav-link { display: grid; gap: .3rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; font-weight: 600; line-height: 1.3; }
.post-nav-link:hover { border-color: var(--line-2); color: inherit; }
.post-nav-link .small { color: var(--muted); font-weight: 400; }
.post-nav-link.next { text-align: right; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav-link.next { text-align: left; } }
.related { border-top: 1px solid var(--line); }
.lead-post, .lead-post *, .post-nav-link, .post-nav-link * { text-decoration: none; }
.lead-post:hover .lead-title { color: var(--accent); }
.lead-art { display: flex; align-items: center; }
.lead-art img { height: auto; object-fit: contain; }
.search input[type="search"] { border: 0; background: none; padding: .7rem 0; }
