/* ============================================================
   OopsMyPassword (OMP) — Design System
   Dark-first, privacy-first SaaS aesthetic.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #050811;
  --bg-soft: #070B16;
  --surface: #0B1020;
  --card: #101827;
  --card-hover: #131D31;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #F8FAFC;
  --muted: #94A3B8;
  /* Contrast tokens: --muted-2/--purple/--blue were 3.5-4.2:1 against the
     dark surfaces (WCAG AA needs 4.5:1 for normal text). These are the same
     hues, nudged to >=4.5:1 on --bg, --bg-soft, --surface and --card. */
  --muted-2: #7C8BA1;
  --purple: #956AF7;
  --blue: #7678F3;
  --cyan: #22D3EE;
  --green: #22C55E;
  --yellow: #FACC15;
  --red: #FB7185;
  --orange: #FB923C;

  /* .grad-text is real text (background-clip:text) in the 1.05rem/700 brand
     wordmark, so every stop needs 4.5:1 on the nav background. Uses the
     accessible --purple/--blue values above. */
  --brand-grad: linear-gradient(135deg, #956AF7 0%, #7678F3 55%, #22D3EE 130%);
  --brand-grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(99, 102, 241, .16));
  --meter-grad: linear-gradient(90deg, #FB7185 0%, #FB923C 28%, #FACC15 50%, #A3E635 72%, #22C55E 100%);

  --shadow-sm: 0 1px 2px rgba(2, 6, 23, .5);
  --shadow-md: 0 8px 24px -8px rgba(2, 6, 23, .6);
  --shadow-lg: 0 24px 64px -16px rgba(2, 6, 23, .65);
  --glow-purple: 0 0 0 1px rgba(139, 92, 246, .35), 0 8px 40px -8px rgba(139, 92, 246, .35);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --nav-h: 64px;
  --maxw: 1180px;

  --ease: cubic-bezier(.22, .68, .36, 1);
}

[data-theme="light"] {
  --bg: #F6F8FC;
  --bg-soft: #EEF2F9;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #F8FAFF;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0B1220;
  --muted: #475569;
  --muted-2: #606E84;
  /* The neon accents are tuned for a near-black background: on white they
     measured 1.4-2.5:1 (WCAG needs 4.5:1 for text, 3:1 for icons). These
     same-hue 600/700-grade values all clear 4.5:1 on every light surface.
     Decorative gradients below keep their original literal stops. */
  --purple: #7C3AED;
  --blue: #4F46E5;
  --cyan: #0E7490;
  --green: #167F3D;
  --yellow: #836903;
  --red: #DC0625;
  --orange: #C2410C;
  /* .grad-text is real text (background-clip:text), so the wordmark gradient
     needs accessible stops on a light background too. */
  --brand-grad: linear-gradient(135deg, #7C3AED 0%, #4F46E5 55%, #0E7490 130%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 10px 28px -10px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .18);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: rgba(139, 92, 246, .35); }
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  /* Fixed deep violet: white on var(--purple) measured 3.7-4.2:1. */
  background: #6D28D9;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container-wide { max-width: 1400px; }
/* OSINT hub listing stretches edge to edge — directories breathe on wide screens. */
.osint-fluid { width: 100%; margin-inline: auto; padding-inline: 40px; }
@media (max-width: 640px) {
  .osint-fluid { padding-inline: 20px; }
}
.container-narrow { max-width: 860px; }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand-grad); }
/* Breadcrumb links sit inside a run of small muted text, so colour alone is
   not a sufficient distinction (WCAG 1.4.1). Underline them explicitly and
   keep the offset tight so the breadcrumb still reads as one compact line. */
.crumb a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.crumb a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.h-display { font-size: clamp(2.4rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
.h-1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.03em; }
.h-2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.h-3 { font-size: 1.2rem; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-family: var(--font-mono); }
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }

/* ---------- Navbar ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { flex: none; }
.brand .brand-omp { color: var(--muted); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: .925rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(139, 92, 246, .08); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(139, 92, 246, .12); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: color .15s, border-color .15s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.nav-toggle { display: none; }
.theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }

/* Mobile nav */
.mobile-menu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0;
  z-index: 99;
  background: var(--bg);
  padding: 20px 24px 40px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6px;
  font-size: 1.05rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mobile-menu a .muted { font-size: .8rem; }
.mobile-menu .btn { margin-top: 20px; width: 100%; }
body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .16s, border-color .16s, color .16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  /* Same violet->indigo brand ramp, one shade deeper: white on the old stops
     measured 4.23:1 / 4.47:1, just under the 4.5:1 AA threshold. Button
     labels are .95rem/600, which WCAG counts as normal (not large) text. */
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: #fff;
  box-shadow: 0 6px 24px -8px rgba(124, 92, 246, .55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(124, 92, 246, .65); }
.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--card-hover); transform: translateY(-2px); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(139, 92, 246, .08); }
.btn-sm { padding: 8px 14px; font-size: .875rem; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, #fff 0%), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card-pad { padding: 28px; }
a.card-link, .card.hoverable { cursor: pointer; }
a.card-link:hover, .card.hoverable:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: var(--brand-grad-soft);
  border: 1px solid rgba(139, 92, 246, .25);
  color: var(--purple);
  margin-bottom: 18px;
}
/* h2 included: card titles are top-level sections on /tools and the homepage
   (h1 > h2), and were h3 before, which skipped a level in the outline. */
.card h2, .card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.card p { color: var(--muted); font-size: .94rem; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .8rem; font-weight: 600;
  color: var(--muted);
}
.chip svg { color: var(--green); }
.chip-accent { color: var(--purple); border-color: rgba(139, 92, 246, .3); background: rgba(139, 92, 246, .08); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge-live { background: rgba(34, 197, 94, .12); color: var(--green); border: 1px solid rgba(34, 197, 94, .3); }
.badge-soon { background: rgba(250, 204, 21, .1); color: var(--yellow); border: 1px solid rgba(250, 204, 21, .25); }
.badge-demo { background: rgba(99, 102, 241, .12); color: #A5B4FC; border: 1px solid rgba(99, 102, 241, .35); }
[data-theme="light"] .badge-demo { color: #4F46E5; }

/* Pills for strength */
.strength-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-weight: 700; font-size: .85rem;
  border: 1px solid;
  transition: all .3s var(--ease);
}
.strength-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.st-0 { color: var(--red);    border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.08); }
.st-1 { color: var(--orange); border-color: rgba(251,146,60,.4);  background: rgba(251,146,60,.08); }
.st-2 { color: var(--yellow); border-color: rgba(250,204,21,.4);  background: rgba(250,204,21,.08); }
.st-3 { color: #A3E635;       border-color: rgba(163,230,53,.4);  background: rgba(163,230,53,.08); }
.st-4 { color: var(--green);  border-color: rgba(34,197,94,.4);   background: rgba(34,197,94,.08); }
.st-none { color: var(--muted); border-color: var(--border); background: var(--surface); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto;
  height: 720px;
  background:
    radial-gradient(720px 340px at 22% 0%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(680px 320px at 82% 8%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(560px 300px at 55% 18%, rgba(99, 102, 241, .14), transparent 60%);
  pointer-events: none;
}
[data-theme="light"] .hero::before { opacity: .55; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Checker component ---------- */
.checker-shell { position: relative; }
.checker-card { padding: 26px; position: relative; overflow: hidden; }
.checker-card::before {
  content: "";
  position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .7), rgba(34, 211, 238, .5), transparent);
}
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: .88rem; font-weight: 600; margin-bottom: 10px; }
.field-label .counter { color: var(--muted-2); font-weight: 500; font-family: var(--font-mono); font-size: .8rem; }
.pw-input-wrap {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.pw-input-wrap:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
.pw-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 15px 16px;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  color: var(--text);
}
.pw-input:focus { outline: none; }
.pw-input::placeholder { color: var(--muted-2); font-family: var(--font-sans); letter-spacing: 0; }
.pw-tools { display: flex; gap: 4px; padding-right: 8px; }
.pw-tool {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.pw-tool:hover { background: rgba(139, 92, 246, .12); color: var(--text); }

.privacy-note {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: .8rem; color: var(--muted);
}
.privacy-note svg { color: var(--green); flex: none; }

.score-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0 14px; }
.score-number { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.score-number .of { font-size: 1rem; font-weight: 600; color: var(--muted-2); letter-spacing: 0; }

/* segmented meter */
.meter {
  display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px;
  height: 10px;
  margin-bottom: 6px;
}
.meter .seg {
  border-radius: 3px;
  background: rgba(148, 163, 184, .14);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
.meter .seg.on { background: var(--meter-color, var(--green)); }
.meter .seg.on:last-of-type { box-shadow: 0 0 12px var(--meter-color, var(--green)); }
.meter-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted-2); margin-bottom: 4px; }

/* stats grid */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 700; }
.stat .v { font-size: 1.02rem; font-weight: 700; margin-top: 2px; word-break: break-word; }
.stat .v.mono { font-size: .95rem; }

/* analysis lists */
.analysis-panel { margin-top: 22px; display: grid; gap: 18px; }
.check-list, .reco-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.check-list li, .reco-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .92rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.check-list svg, .reco-list svg { flex: none; margin-top: 2px; }
.li-pass svg { color: var(--green); }
.li-warn svg { color: var(--yellow); }
.li-fail svg { color: var(--red); }
.li-info svg { color: var(--cyan); }
.li-pass .li-text strong { color: var(--text); }
.disclaimer {
  margin-top: 18px;
  padding: 12px 14px;
  font-size: .8rem; color: var(--muted);
  background: rgba(99, 102, 241, .06);
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: 10px;
  display: flex; gap: 10px; align-items: flex-start;
}
.disclaimer svg { flex: none; color: var(--blue); margin-top: 1px; }

.subhead-sm { font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }

/* ---------- Generator ---------- */
.gen-output {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 8px 8px 8px 16px;
  margin-bottom: 20px;
}
.gen-output code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1.08rem;
  letter-spacing: .02em;
  word-break: break-all;
  padding: 8px 0;
  min-height: 1.5em;
}
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.opt-row:last-child { border-bottom: none; }
.opt-row .opt-name { font-weight: 600; font-size: .95rem; }
.opt-row .opt-desc { font-size: .8rem; color: var(--muted); }

/* switch */
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0;
  background: rgba(148, 163, 184, .25);
  border-radius: 999px;
  transition: background .18s var(--ease);
  pointer-events: none;
}
.switch .track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease);
}
.switch input:checked + .track { background: linear-gradient(135deg, var(--purple), var(--blue)); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--purple); outline-offset: 2px; }

/* range slider */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple) var(--fill, 50%), rgba(148, 163, 184, .22) var(--fill, 50%));
  outline-offset: 4px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  border: 5px solid var(--purple);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .15s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.08); }
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 5px solid var(--purple);
  box-shadow: var(--shadow-md); cursor: pointer;
}
.slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.slider-head output {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

select.input, .input {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .95rem;
  color: var(--text);
}
select.input:focus, .input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: .9rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 300;
  display: flex; align-items: center; gap: 8px;
}
.toast svg { color: var(--green); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tools grid ---------- */
.tool-card { position: relative; display: flex; flex-direction: column; padding: 26px; height: 100%; }
.tool-card .tool-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.tool-card .card-icon { margin-bottom: 0; }
.tool-card p { flex: 1; margin-bottom: 18px; }
.tool-card .tool-cta { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .9rem; color: var(--purple); }
.tool-card:hover .tool-cta { gap: 11px; }
.tool-card .tool-cta { transition: gap .2s var(--ease); }
.tool-card.soon { opacity: .75; }
.tool-card.soon:hover { transform: none; }

/* ---------- Feature rows / marketing ---------- */
.feature-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative; padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .8rem; font-weight: 700;
  color: var(--purple);
  display: block; margin-bottom: 14px;
}
.hr-fade { height: 1px; border: none; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); margin: 0; }

/* mini generator on home */
.mini-gen { padding: 24px; }

/* ---------- Guides / article ---------- */
.guide-card { display: flex; flex-direction: column; height: 100%; padding: 24px; }
.guide-card .meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--muted-2); margin-bottom: 12px; font-weight: 600; }
.guide-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.guide-card p { font-size: .9rem; }
.guide-card .read-more { margin-top: 16px; font-size: .88rem; font-weight: 600; color: var(--purple); display: inline-flex; align-items: center; gap: 6px; }

.article-layout {
  /* Reading column first, contents rail second: the text then starts flush with
     the hero heading above it, and the rail fills what used to be dead space on
     the right. The pair is centred as one block so the page does not lean left. */
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  gap: 56px;
  justify-content: center;
  align-items: start;
}
/* Explicit placement rather than source order: the JS article view wraps the
   rail in an empty .article-toc-slot, and auto-placement would have handed that
   slot the wide column and crushed the prose into the 240px one. */
.article-layout > .prose { grid-column: 1; grid-row: 1; max-width: none; }
.article-layout > .toc,
.article-layout > .article-toc-slot { grid-column: 2; grid-row: 1; }
/* 720 + 56 + 240 = 1016 of grid, plus the 24px inline padding on each side
   (border-box), so the hero h1 above it lines up with the first line of body
   copy instead of sitting 136px to its left. */
.container-article { max-width: 1064px; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; }
.toc .subhead-sm { margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 6px 12px;
  font-size: .86rem; color: var(--muted);
  border-left: 2px solid var(--border);
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--purple); border-left-color: var(--purple); font-weight: 600; }

.prose { max-width: 720px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 1.55rem; margin-top: 42px; letter-spacing: -0.02em; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h3 { font-size: 1.15rem; margin-top: 28px; }
.prose p, .prose li { color: #CBD5E1; }
[data-theme="light"] .prose p, [data-theme="light"] .prose li { color: #334155; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--text); }
.prose a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(139, 92, 246, .4); }
.prose a:hover { text-decoration-color: var(--purple); }
.prose code {
  font-family: var(--font-mono); font-size: .86em;
  background: rgba(139, 92, 246, .1);
  border: 1px solid rgba(139, 92, 246, .2);
  padding: 2px 6px; border-radius: 6px;
}
.prose pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
}
.prose pre code { background: none; border: none; padding: 0; font-size: .85rem; line-height: 1.7; white-space: pre; }
/* Article bodies are authored in Markdown (see assets/js/markdown.js), so the
   prose block has to style everything that renderer can emit — headings,
   tables, quotes, rules and images included. */
.prose h1 { font-size: 1.85rem; margin-top: 34px; letter-spacing: -0.02em; }
.prose h4 { font-size: 1.02rem; margin-top: 24px; }
.prose h5, .prose h6 { font-size: .95rem; margin-top: 20px; color: var(--muted); }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }
.prose blockquote {
  border-left: 3px solid var(--purple);
  background: var(--bg-soft);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
}
.prose blockquote p { color: inherit; }
.prose del { color: var(--muted); }
.prose kbd, .prose samp {
  font-family: var(--font-mono); font-size: .84em;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; background: var(--bg-soft);
}
/* display:block + overflow-x:auto keeps a wide Markdown table from forcing
   horizontal page scroll on small screens (the sanitizer strips class, so the
   table cannot be wrapped in .table-scroll). */
.prose table {
  display: block; width: 100%; max-width: 100%;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-collapse: collapse; font-size: .92rem;
}
.prose thead { background: var(--bg-soft); }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: none; }
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: .93rem;
}
.callout svg { flex: none; margin-top: 2px; }
.callout p { margin: 0; }
.callout-tip { background: rgba(34, 197, 94, .07); border-color: rgba(34, 197, 94, .25); }
.callout-tip svg { color: var(--green); }
.callout-warn { background: rgba(250, 204, 21, .07); border-color: rgba(250, 204, 21, .25); }
.callout-warn svg { color: var(--yellow); }
.callout-info { background: rgba(99, 102, 241, .07); border-color: rgba(99, 102, 241, .28); }
.callout-info svg { color: var(--blue); }

/* Article resource cards, notices & action buttons */
.prose .book,
.prose section.book,
.prose section[id^="book"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
  background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.prose .book:hover,
.prose section.book:hover,
.prose section[id^="book"]:hover {
  border-color: var(--border-strong);
}
.prose .notice,
.prose div.notice,
.prose #notice {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--purple);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}
.prose .download,
.prose a.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  margin-top: 10px;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 4px 16px -4px rgba(124, 92, 246, .4);
}
.prose .download:hover,
.prose a.download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(124, 92, 246, .55);
  text-decoration: none !important;
}
.prose .small,
.prose p.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.article-hero { padding: 64px 0 8px; }
.article-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted-2); font-size: .85rem; font-weight: 600; margin-top: 16px; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq-item summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  font-weight: 600; font-size: 1rem;
  cursor: pointer;
  transition: color .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--purple); }
.faq-item summary .chev { flex: none; color: var(--muted); transition: transform .25s var(--ease); }
.faq-item[open] summary .chev { transform: rotate(180deg); color: var(--purple); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: .94rem; }
.faq-item .faq-body a { color: var(--purple); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; }
.form-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: .98rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .16);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(250, 204, 21, .07);
  border: 1px solid rgba(250, 204, 21, .28);
  color: var(--muted);
  padding: 14px 16px; border-radius: 12px; font-size: .88rem;
}
.form-note svg { color: var(--yellow); flex: none; margin-top: 1px; }
.form-success {
  display: none;
  gap: 10px; align-items: flex-start;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .3);
  padding: 16px 18px; border-radius: 12px; font-size: .92rem;
}
.form-success.show { display: flex; }
.form-success svg { color: var(--green); flex: none; margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 36px; padding: 64px 0 44px; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin-top: 14px; max-width: 300px; }
/* Footer column titles are labels, not document headings — an <h4> here sat
   directly after the page's <h2> content and broke the heading outline on
   every page. Styled as a div so the outline stays h1 > h2 > h3. */
.footer-col-title { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: .92rem; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-connect { margin-top: 16px; }
.footer-connect-links { display: grid; gap: 10px; }
.footer-connect a { color: var(--muted); font-size: .92rem; transition: color .15s; }
.footer-connect a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted-2); font-size: .84rem;
}
.footer-bottom .flex a:hover { color: var(--text); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(139, 92, 246, .22), transparent 65%),
    radial-gradient(500px 220px at 85% 100%, rgba(34, 211, 238, .12), transparent 65%),
    var(--surface);
  padding: clamp(36px, 6vw, 72px);
  text-align: center;
}

/* ---------- Page hero (inner pages) ---------- */
/* overflow:hidden is required: the ::before glow bleeds past the box with
   inset:-30% -20%, which made every one of the 19 inner pages wider than the
   viewport (scrollWidth > clientWidth). .hero and .cta-band already clip. */
.page-hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute; inset: -30% -20% auto; height: 480px;
  background: radial-gradient(560px 260px at 30% 0%, rgba(139, 92, 246, .16), transparent 60%),
              radial-gradient(480px 240px at 75% 10%, rgba(34, 211, 238, .08), transparent 60%);
  pointer-events: none;
}
.page-hero > .container { position: relative; }
.page-hero .lead { max-width: 640px; margin-top: 16px; }

/* ---------- Reveal animations ---------- */
/* Content must remain visible when JavaScript or its observer is delayed/disabled. */
.reveal { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Health page ---------- */
.grade-ring-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.grade-ring { position: relative; width: 132px; height: 132px; flex: none; }
.grade-ring svg { transform: rotate(-90deg); }
.grade-ring .ring-bg { stroke: rgba(148, 163, 184, .15); }
.grade-ring .ring-val { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.grade-ring .ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.grade-ring .ring-label .g { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.grade-ring .ring-label .t { font-size: .68rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

/* crack time table */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.table-scroll .crack-table { min-width: 560px; }
.table-scroll .crack-table th, .table-scroll .crack-table td { white-space: nowrap; }
.crack-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.crack-table th, .crack-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.crack-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.crack-table tr:last-child td { border-bottom: none; }
.crack-table td.mono { font-family: var(--font-mono); font-size: .86rem; }

/* breach */
.breach-result { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-soft); margin-top: 20px; display: none; }
.breach-result.show { display: block; }
.hash-view { font-family: var(--font-mono); font-size: .82rem; word-break: break-all; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.hash-view .prefix { color: var(--cyan); font-weight: 700; }

/* checklist */
.checklist-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.checklist-item:hover { border-color: var(--border-strong); }
.checklist-item input { position: absolute; opacity: 0; }
.checklist-item .box {
  flex: none; width: 24px; height: 24px; margin-top: 2px;
  border-radius: 8px; border: 2px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all .18s var(--ease);
}
.checklist-item input:checked ~ .box { background: linear-gradient(135deg, var(--purple), var(--blue)); border-color: transparent; color: #fff; }
.checklist-item input:focus-visible ~ .box { outline: 2px solid var(--purple); outline-offset: 2px; }
.checklist-item .ci-text strong { display: block; font-size: .96rem; }
.checklist-item .ci-text span { font-size: .85rem; color: var(--muted); }
.checklist-item input:checked ~ .ci-text strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted-2); }
.progress-line { height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.progress-line > span { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); width: 0%; transition: width .5s var(--ease); }

/* misc */
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }
.icon-22 { width: 22px; height: 22px; }
.divider-dot { color: var(--muted-2); }
.kbd {
  font-family: var(--font-mono); font-size: .8em;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px; background: var(--surface);
}
.notice-band {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .3);
  padding: 16px 20px; border-radius: var(--radius);
  font-size: .92rem;
}
.notice-band svg { color: var(--blue); flex: none; margin-top: 2px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.list-plain { list-style: none; padding: 0; display: grid; gap: 10px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.list-plain li svg { flex: none; margin-top: 3px; color: var(--green); }
.list-plain li strong { color: var(--text); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 56px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* The rail only becomes a stacked, scrollable box once the two columns stop
   fitting (960px leaves the prose ~616px), so a 1024px laptop keeps the sidebar
   instead of scrolling past a 42vh table of contents before the first sentence. */
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .article-layout > .prose { grid-column: 1; grid-row: 2; }
  .article-layout > .toc,
  .article-layout > .article-toc-slot { grid-column: 1; grid-row: 1; }
  .toc {
    position: static; max-height: 42vh; overflow-y: auto;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; background: var(--surface);
  }
}
@media (max-width: 860px) {
  .grid-3, .feature-split, .steps { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .nav-actions .btn-get-started { display: none; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 32px; }
  .card-pad { padding: 22px; }
  .checker-card { padding: 20px; }
  .score-number { font-size: 2.1rem; }
  .score-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gen-output { flex-wrap: wrap; }
  .gen-output code { width: 100%; flex: none; font-size: .95rem; padding-bottom: 4px; }
}
@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  .hero-trust .chip { font-size: .74rem; }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.icon-menu { display: block; }
.icon-close { display: none; }
.check-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- Wide checker dashboard (home + /checker) ---------- */
.checker-top { display: block; }
.checker-mid { display: grid; gap: 0; }
.checker-score { min-width: 0; }
.checker-stats { min-width: 0; }
@media (min-width: 1000px) {
  .checker-mid { grid-template-columns: 340px 1fr; gap: 0 32px; align-items: center; }
  .checker-stats { align-self: center; }
  .checker-stats .stat-grid { margin-top: 0; }
}
@media (min-width: 1120px) {
  .checker-card--wide .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 860px) {
  .checker-card--wide .analysis-panel { grid-template-columns: 1fr 1fr; }
}

/* Home hero, single centered column (checker lives in its own band below) */
.hero-copy { max-width: 820px; margin-inline: auto; text-align: center; }
.hero-copy .hero-cta, .hero-copy .hero-trust { justify-content: center; }
.hero-copy .lead { max-width: 620px; margin-inline: auto; }
/* IP & Leak Check session tones */
[data-tone="ok"] { border-color: rgba(52, 211, 153, .45) !important; }
[data-tone="warn"] { border-color: rgba(251, 146, 60, .55) !important; }
@media (max-width: 640px) {
  .checker-mid .score-row { margin-top: 18px; }
}
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
@media (max-width: 640px) { .result-grid { grid-template-columns: 1fr; } }
.tab-row { display: inline-flex; gap: 6px; padding: 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 24px; }
.tab-row button { padding: 8px 16px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); transition: all .15s var(--ease); }
.tab-row button[aria-selected="true"] { background: var(--brand-grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(139,92,246,.3); }

/* ============================================================
   Articles hub — feed, category chips, skeleton, error/empty
   ============================================================ */
.icon-28 { width: 28px; height: 28px; }

/* Category filter bar */
.cat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .8rem; font-weight: 600; color: var(--muted);
  cursor: pointer; text-decoration: none;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.cat-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cat-chip.is-active {
  color: var(--purple);
  border-color: rgba(139, 92, 246, .35);
  background: rgba(139, 92, 246, .1);
}
.cat-count {
  font-size: .68rem; font-weight: 700; color: var(--muted-2);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 7px; line-height: 1;
}

/* Feed rows */
.feed-list { display: grid; gap: 12px; }
.feed-row {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 18px 20px;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.feed-row:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.feed-row-main { min-width: 0; }
.feed-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: .78rem; color: var(--muted-2); font-weight: 600;
  margin-bottom: 8px;
}
.feed-title { font-size: 1.05rem; font-weight: 650; line-height: 1.45; margin: 0; }
.feed-title a { color: var(--text); text-decoration: none; }
.feed-title a:hover { color: var(--purple); }
.feed-excerpt {
  margin: 8px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Skeleton loading state (shimmer). Rows match .feed-row geometry so
   the swap from skeleton → content does not jump. */
.skel {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--surface) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: omp-skel 1.3s ease-in-out infinite;
}
.skel + .skel { margin-top: 10px; }
.skel-title { height: 18px; width: 55%; }
.skel-title.skel-w70 { width: 70%; }
.skel-meta { width: 32%; }
.skel-line { width: 95%; }
.skel-w70.skel-line { width: 75%; }
@keyframes omp-skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Error state (fetch failed) — visually distinct from the neutral
   empty state below. */
.notice-band.notice-error {
  background: rgba(239, 68, 68, .08);
  border-color: rgba(239, 68, 68, .32);
  margin-bottom: 22px;
}
.notice-band.notice-error svg { color: var(--red, #ef4444); }
.notice-band.notice-error p { margin: 4px 0 0; color: var(--muted); }
.notice-band.notice-error strong { color: var(--text); }
.notice-band.notice-error [data-retry] { font-weight: 700; }

/* Genuine empty state (feed answered, nothing published here) */
.feed-empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; color: var(--muted);
  display: grid; justify-items: center; gap: 6px;
}
.feed-empty svg { color: var(--muted-2); margin-bottom: 6px; }
.feed-empty .h-3 { margin: 0; color: var(--text); }

/* ============================================================
   Products — grid, cards, type badges, toolbar, price
   ============================================================ */
.product-toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
#product-search {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; padding: 10px 14px; outline: none;
}
#product-search:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--brand-grad-soft); }
#product-search::placeholder { color: var(--muted-2); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); overflow: hidden; text-decoration: none; color: var(--text);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-cover {
  aspect-ratio: 3 / 4; width: 100%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* contain, not cover: product artwork is book/course cover art and must not
   be cropped. (This used to be an inline <style> block in products.html,
   which tools/build.py silently dropped on the next regeneration.) */
.product-cover img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.product-cover-fallback {
  font-size: .95rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--purple); opacity: .8;
}
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.product-title { font-size: 1.02rem; font-weight: 650; line-height: 1.4; margin: 0; }
.product-excerpt {
  margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 6px;
}
.price { font-weight: 800; font-size: .95rem; color: var(--text); }
.price:empty { display: none; }
.price-lg { font-size: 1.25rem; }
.product-buy {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 20px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft);
}

/* Product type badges */
.ptype {
  display: inline-flex; align-items: center;
  font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid transparent; line-height: 1;
}
.ptype.t-book     { color: #FDE68A; background: rgba(234,179,8,.12);  border-color: rgba(234,179,8,.3); }
.ptype.t-course   { color: #67E8F9; background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.3); }
.ptype.t-tool     { color: #A5B4FC; background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.32); }
.ptype.t-template { color: #A7F3D0; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); }
.ptype.t-resource { color: #C4B5FD; background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.3); }
.ptype.t-other    { color: var(--muted); background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.28); }
.ptype.t-featured { color: #FCD34D; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); }
[data-theme="light"] .ptype.t-book     { color: #A16207; }
[data-theme="light"] .ptype.t-course   { color: #0E7490; }
[data-theme="light"] .ptype.t-tool     { color: #4F46E5; }
[data-theme="light"] .ptype.t-template { color: #047857; }
[data-theme="light"] .ptype.t-resource { color: #6D28D9; }
[data-theme="light"] .ptype.t-featured { color: #B45309; }

/* print: guides readable */
@media print {
  .site-nav, .site-footer, .toc, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}



/* Keep the complete navigation inside the viewport, including injected search. */
@media (max-width: 1600px) {
  .site-nav .btn-get-started { display: none; }
}
@media (max-width: 1200px) {
  .site-nav .nav-links { display: none; }
  .site-nav .nav-toggle { display: inline-flex; }
}
@media (max-width: 380px) {
  .site-nav .brand { font-size: .9rem; gap: 6px; }
  .site-nav .nav-inner { gap: 8px; }
  .site-nav .nav-actions { gap: 6px; }
  .site-nav #omp-search-trigger { display: none; } /* Search remains in the mobile menu. */
  .hero-cta .btn { white-space: normal; min-width: 0; text-align: center; padding-inline: 14px; }
}
.hero-grid > * { min-width: 0; }

.nav-links a { white-space: nowrap; }

/* Keep consent actions hidden until a valid email link is opened. */
[data-email-action][hidden] { display: none; }

/* Grid children must be allowed to shrink below long words/tables, not widen
   the entire mobile viewport. Keep wide tables/code locally scrollable. */
.grid > *, .two-col > *, .article-layout > * { min-width: 0; }
.gen-output code, .callout p, .checklist-item .ci-text { min-width: 0; overflow-wrap: anywhere; }
.prose { overflow-wrap: anywhere; }
main p a:not(.btn) { text-decoration: underline; text-underline-offset: .18em; }
.sitemap-grid a { overflow-wrap: anywhere; }
.table-scroll:focus-visible, .prose table:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
@media (max-width: 540px) {
  .gen-actions, .slider-head { flex-wrap: wrap; gap: 10px; }
  .opt-row > div { min-width: 0; overflow-wrap: anywhere; }
}

/* ============================================================
   OSINT Hub — sidebar layout, filter groups, badges, detail
   ============================================================ */
.osint-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px; align-items: start; margin-top: 6px;
}
.osint-sidebar {
  position: sticky; top: 76px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 18px;
  display: flex; flex-direction: column; gap: 16px;
}
.osint-filter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.osint-search input, .osint-fgroup select {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; padding: 10px 12px; outline: none;
}
.osint-search input:focus, .osint-fgroup select:focus {
  border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--brand-grad-soft);
}
.osint-search input::placeholder { color: var(--muted-2); }
.osint-fgroup { display: flex; flex-direction: column; gap: 8px; }
.osint-fname { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.osint-fname label { color: inherit; font: inherit; }
.osint-check {
  display: flex; align-items: center; gap: 9px;
  font-size: .9rem; color: var(--text); cursor: pointer;
  padding: 5px 8px; border-radius: var(--radius-sm);
}
.osint-check:hover { background: var(--bg-soft); }
.osint-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--purple); flex: none; }
.osint-results { min-width: 0; }
.osint-results .product-grid { margin-top: 12px; }

/* Pricing + access badges (product .ptype base reused) */
.ptype.t-free     { color: #A7F3D0; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); }
.ptype.t-freemium { color: #FDE68A; background: rgba(234,179,8,.12);  border-color: rgba(234,179,8,.3); }
.ptype.t-paid     { color: #FCA5A5; background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3); }
.ptype.t-access   { color: #A5B4FC; background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.32); }
[data-theme="light"] .ptype.t-free     { color: #047857; }
[data-theme="light"] .ptype.t-freemium { color: #A16207; }
[data-theme="light"] .ptype.t-paid     { color: #B91C1C; }
[data-theme="light"] .ptype.t-access   { color: #4F46E5; }

/* Detail page: content + sticky facts rail (uses the full card width). */
.osint-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; margin-top: 26px; }
.osint-detail-grid .prose { max-width: none; }
.osint-facts { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.osint-facts h2 { margin: 0 0 4px; font-size: .95rem; }
.osint-fact { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; padding: 8px 0; border-top: 1px solid var(--border); }
.osint-fact dt { color: var(--muted); flex: none; }
.osint-fact dd { margin: 0; text-align: right; font-weight: 600; }
.osint-facts .btn { width: 100%; justify-content: center; margin-top: 4px; }
@media (max-width: 960px) {
  .osint-detail-grid { grid-template-columns: 1fr; }
  .osint-facts { position: static; }
}
.osint-detail-head { display: flex; gap: 18px; align-items: flex-start; margin-top: 8px; }
.osint-install { position: relative; }
.osint-install .osint-copy { position: absolute; top: 8px; right: 8px; z-index: 1; }

/* OSINT hub hero spans the full width — directories read better wide. */
.osint-hero .lead { max-width: 960px; }
.osint-hero .hero-meta { max-width: none; }

/* Hero live-stats line (filled by the hub app once the catalog loads). */
.hero-meta {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--muted-2);
}

/* Per-category tile hues for the OSINT hub cards. */
.osint-cats > .osint-cat:nth-child(6n+1) .osint-tile { color: #A78BFA; border-color: rgba(167,139,250,.35); background: rgba(167,139,250,.08); }
.osint-cats > .osint-cat:nth-child(6n+2) .osint-tile { color: #67E8F9; border-color: rgba(103,232,249,.3); background: rgba(103,232,249,.07); }
.osint-cats > .osint-cat:nth-child(6n+3) .osint-tile { color: #FCD34D; border-color: rgba(252,211,77,.3); background: rgba(252,211,77,.07); }
.osint-cats > .osint-cat:nth-child(6n+4) .osint-tile { color: #6EE7B7; border-color: rgba(110,231,183,.3); background: rgba(110,231,183,.07); }
.osint-cats > .osint-cat:nth-child(6n+5) .osint-tile { color: #F9A8D4; border-color: rgba(249,168,212,.3); background: rgba(249,168,212,.07); }
.osint-cats > .osint-cat:nth-child(6n) .osint-tile { color: #93C5FD; border-color: rgba(147,197,253,.3); background: rgba(147,197,253,.07); }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n+1) .osint-tile { color: #7C3AED; }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n+2) .osint-tile { color: #0E7490; }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n+3) .osint-tile { color: #A16207; }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n+4) .osint-tile { color: #047857; }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n+5) .osint-tile { color: #BE185D; }
[data-theme="light"] .osint-cats > .osint-cat:nth-child(6n) .osint-tile { color: #1D4ED8; }
.osint-row { display: flex; gap: 16px; align-items: flex-start; }
.osint-tile {
  width: 52px; height: 52px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: var(--purple);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.osint-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.osint-tile-lg { width: 72px; height: 72px; font-size: 1.7rem; border-radius: 16px; }
img.osint-tile { padding: 6px; }

/* Category cards: site .card surface, compact hub navigation */
.osint-cats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin: 4px 0 6px;
}
.osint-cat {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 18px; cursor: pointer; font: inherit; color: var(--text); width: 100%;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.osint-cat:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.osint-cat-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.osint-cat-title { display: flex; align-items: center; gap: 8px; }
.osint-cat-title strong { font-size: 1rem; line-height: 1.35; }
.osint-cat-title .cat-count { flex: none; }
.osint-cat-main small { color: var(--muted); font-size: .83rem; line-height: 1.5; }
.osint-cat .tool-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: .88rem; color: var(--purple);
}
.osint-cat:hover .tool-cta { gap: 11px; }
.osint-cat .tool-cta { transition: gap .2s var(--ease); }

/* Active-category header: back button + title + description */
.osint-activecat { margin: 4px 0 2px; }
.osint-activecat .h-2 { margin: 10px 0 0; display: flex; align-items: center; gap: 10px; }
.osint-activecat p { margin: 6px 0 0; max-width: 70ch; }

@media (max-width: 900px) {
  .osint-layout { grid-template-columns: 1fr; }
  .osint-sidebar { position: static; }
  .osint-detail-head { flex-direction: column; }
}



/* Custom category illustrations for the Pentest Hub's live 13-category grid */
.osint-tile-illustrated { display:inline-flex; align-items:center; justify-content:center; }
.osint-cat-art { width:30px; height:30px; display:block; }
.osint-cat-initial { font-size:1.25rem; font-weight:800; line-height:1; }
.osint-cat:hover .osint-tile-illustrated { transform:translateY(-1px); }
.osint-tile-illustrated { transition:transform .18s var(--ease); }
@media(prefers-reduced-motion:reduce) { .osint-tile-illustrated { transition:none; } }

/* ==========================================================================
   Phase 2: OSINT & Pentest Hub Comparison Drawer + Interactive CLI Builder
   ========================================================================== */
.hub-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  margin-left: auto;
  transition: all .15s var(--ease);
}
.hub-compare-btn:hover {
  color: var(--text);
  border-color: var(--purple);
}
.hub-compare-btn.is-active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.hub-compare-dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: min(880px, calc(100vw - 32px));
  background: var(--bg-elev);
  border: 1px solid var(--purple);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  padding: 12px 16px;
}
.compare-dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.compare-dock-count {
  font-size: .85rem;
  color: var(--text);
}
.compare-dock-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.compare-dock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
}
.compare-dock-rm {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.compare-dock-rm:hover {
  color: var(--danger, #f87171);
}
.compare-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-compare-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 7, 15, .76);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hub-compare-modal {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .65);
}
.hub-compare-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.compare-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.compare-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compare-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.compare-col-head h3 {
  margin: 0;
  font-size: 1.08rem;
}
.compare-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.compare-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

/* Interactive CLI Command Builder */
.cli-builder-card {
  margin: 14px 0 24px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}
.cli-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cli-builder-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cli-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cli-field label,
.cli-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cli-field input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: .88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cli-field input[type="text"]:focus {
  outline: none;
  border-color: var(--purple);
}
.cli-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cli-preset-btn {
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.cli-preset-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.cli-preset-btn.is-active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}
.cli-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cli-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.cli-output-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cli-output {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  font-family: var(--mono);
  font-size: .86rem;
  color: var(--text);
  overflow-x: auto;
  flex: 1;
}
@media (max-width: 640px) {
  .cli-output-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------------------------------------------------------------------------
   Article ornamentation: what authors can now actually use.

   Inline <svg> was already allowed through the sanitiser; it rendered as a
   0x0 box because nothing sized it. A drawing without max-width overflows a
   phone at exactly the moment it matters.
   --------------------------------------------------------------------------- */
.prose svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

/* Wide tables: scroll the table instead of the page. Applied at every width
   because a 9-column table does not fit a laptop either. */
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: normal;
}

.prose figure { margin: 24px 0; }
.prose figure img { border-radius: var(--radius, 12px); }
.prose figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted, #5b6472); }

/* <mark> and <kbd> arrived with the sanitiser parity fix; without these they
   render as unstyled text and authors assume the tag was dropped. */
.prose mark { background: rgba(255, 214, 0, 0.35); color: inherit; padding: 0 2px; border-radius: 3px; }
.prose kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  padding: 1px 6px;
  border: 1px solid var(--border, #d8dee9);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2, #f6f8fc);
}
.prose dl { margin: 20px 0; }
.prose dt { font-weight: 600; margin-top: 12px; }
.prose dd { margin: 4px 0 0 20px; }

/* ------------------------------------------------------------------
   Touch and narrow screens.

   Two things break a tool on a phone even though the markup is correct, and
   neither is visible on a desktop:

   1. iOS Safari zooms the whole page when a focused field computes below 16px,
      and does not zoom back out on blur. The page then sits magnified and
      half off-screen, which reads as "this site is broken on my phone". Every
      field a person types into is pushed to 16px here. It is applied on
      pointer: coarse as well as by width, because an iPad is 768px wide and
      still gets the same zoom.

   2. A control below 44px is below the size a finger hits reliably. The
      smallest things in this UI were the 38px icon buttons, the 22px slider
      thumb and the 32px secondary buttons - all fine with a mouse, all a
      coin-flip with a thumb.

   The slider keeps its thin visual track: the element grows to 44px and the
   gradient is painted in a 6px band down the middle, so the picture is the same
   while the thing you can grab is not.
   ------------------------------------------------------------------ */
@media (max-width: 640px), (pointer: coarse) {
  .pw-input,
  .input,
  select.input,
  .form-field input,
  .form-field textarea,
  .form-field select,
  .cli-field input[type="text"],
  .osint-search input,
  .osint-fgroup select,
  textarea {
    font-size: 16px;
  }

  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; padding-block: 10px; }
  .icon-btn { width: 44px; height: 44px; }

  input[type="range"] {
    height: 44px;
    background-size: 100% 6px;
    background-repeat: no-repeat;
    background-position: center;
  }
  input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
  input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; }

  /* Tab bars, filter chips, preset buttons and the checklist rows are all
     thumb targets too. The checklist is one tap per item and there are sixteen
     of them, so it is the row - not the 16px checkbox - that has to be hittable. */
  [data-inspector-tab],
  [data-hub-filter-cat],
  [data-url-preset] { min-height: 44px; }

  .checklist-item { min-height: 44px; padding-block: 10px; }
}

/* ============================================================
   Reading aids: back link, back-to-top, code copy, permalinks
   ------------------------------------------------------------
   The back link sits above the breadcrumb on every content page so a
   reader who arrived from a search result always has one obvious way
   out, and a second copy sits under the article for readers who reach
   the end. The other three are injected by main.js and degrade to
   nothing without JavaScript.
   ============================================================ */
.back-link-row { margin: 0 0 10px; }
.back-link-row .btn { white-space: nowrap; }

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), opacity .2s var(--ease);
}
.to-top:hover { color: var(--purple); border-color: var(--border-strong); }
.to-top svg { width: 18px; height: 18px; }
.to-top[hidden] { display: none; }
@media (max-width: 640px) { .to-top { right: 14px; bottom: 14px; } }

.code-wrap { position: relative; }
.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--muted);
  font: 600 11.5px/1 var(--font-mono);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s var(--ease), color .15s var(--ease);
}
.code-wrap:hover .code-copy,
.code-copy:focus-visible,
.code-copy.is-done { opacity: 1; }
.code-copy:hover { color: var(--text); }
.code-copy.is-done { color: var(--purple); }
/* A touch screen has no hover, so the control has to be visible and big
   enough to hit on its own. */
@media (hover: none) {
  .code-copy { opacity: 1; min-height: 44px; padding: 10px 12px; }
}

.heading-anchor {
  margin-left: 8px;
  color: var(--muted-2);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
  transition: opacity .15s var(--ease), color .15s var(--ease);
}
h2:hover > .heading-anchor,
h3:hover > .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }
.heading-anchor:hover { color: var(--purple); }

@media (prefers-reduced-motion: reduce) {
  .to-top, .code-copy, .heading-anchor { transition: none; }
}
