/* Layout: one centered 1180px column; dense registry-style grids; mono for ids and repo paths. */
/* Palette and type follow the "Securing MCP with Cross App Access" deck: navy ink, off-white page,
   warm beige panels, electric-blue highlights, orange used sparingly. */
:root {
  --bg: #fbfbfa;
  --surface: #f4f1ee;
  --surface-2: #ece8e4;
  --ink: #00033e;
  --ink-2: #2e3160;
  --muted: #6b665e;
  --faint: #bcb9b6;
  --line: #e2ddd8;
  --accent: #0131ff;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebff;
  --warn: #b8460b;
  --warn-soft: #ffece2;
  --hot: #ff6217;
  --shadow: 0 1px 2px rgba(0, 3, 62, .05), 0 6px 20px rgba(0, 3, 62, .06);

  /* Fixed navy blocks (hero, code) stay navy in both themes, as on the deck's title slides. */
  --navy: #00033e;
  --navy-2: #0b1058;
  --on-navy: #fbfbfa;
  --on-navy-2: #ece8e4;
  --navy-accent: #7398ff;
  --navy-string: #ff9665;

  /* Backdrop: the deck's content slides fade an electric-blue glow in from the bottom-right corner;
     its title slides are navy meshes that run into blue, violet and an orange flare. Grain adds the print texture. */
  --page-glow:
    radial-gradient(60% 55% at 100% 100%, rgba(1, 49, 255, .2), rgba(115, 152, 255, .08) 45%, transparent 75%),
    radial-gradient(45% 40% at 0% 0%, rgba(115, 152, 255, .09), transparent 70%);
  --grain-page: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ink-sheen: linear-gradient(120deg, transparent 35%, rgba(1, 49, 255, .55));

  --font-display: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 9px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #01021f; --surface: #070b3a; --surface-2: #0e1449; --ink: #fbfbfa; --ink-2: #d9d5d0;
    --muted: #a39e96; --faint: #4f5482; --line: #1a2060; --accent: #7398ff; --accent-ink: #00033e;
    --accent-soft: #151d63; --warn: #ff9665; --warn-soft: #34171a; --navy: #070b3a; --navy-2: #121a58;
    --page-glow:
      radial-gradient(60% 55% at 100% 100%, rgba(1, 49, 255, .3), transparent 75%),
      radial-gradient(40% 40% at 0% 100%, rgba(255, 98, 23, .1), transparent 70%),
      radial-gradient(50% 45% at 100% 0%, rgba(98, 40, 210, .16), transparent 70%);
    --grain-page: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --ink-sheen: none;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #01021f; --surface: #070b3a; --surface-2: #0e1449; --ink: #fbfbfa; --ink-2: #d9d5d0;
  --muted: #a39e96; --faint: #4f5482; --line: #1a2060; --accent: #7398ff; --accent-ink: #00033e;
  --accent-soft: #151d63; --warn: #ff9665; --warn-soft: #34171a; --navy: #070b3a; --navy-2: #121a58;
  --page-glow:
    radial-gradient(60% 55% at 100% 100%, rgba(1, 49, 255, .3), transparent 75%),
    radial-gradient(40% 40% at 0% 100%, rgba(255, 98, 23, .1), transparent 70%),
    radial-gradient(50% 45% at 100% 0%, rgba(98, 40, 210, .16), transparent 70%);
  --grain-page: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --ink-sheen: none;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--grain-page), var(--page-glow);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
kbd {
  font: 500 11px/1 var(--font-mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; background: var(--surface);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-name, .footer-brand { font: 600 16px/1 var(--font-display); letter-spacing: -.01em; }
.brand-name b, .footer-brand b { font-weight: 400; color: var(--muted); margin-left: 1px; }
.nav { display: flex; gap: 4px; }
.nav a {
  font-size: 14px; color: var(--ink-2); padding: 6px 10px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--surface-2); font-weight: 500; }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .15s;
}
.search-trigger:hover { border-color: var(--faint); }
.search-trigger svg, .icon-btn svg, .palette-input svg, .hero-search svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { border-color: var(--faint); }

/* ---------- Sections ---------- */
main { outline: none; min-height: 60vh; }
.section { padding-block: 56px; }
.section + .section { padding-top: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow {
  font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.section-sub { color: var(--muted); margin-top: 8px; max-width: 62ch; }
.link-more { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.link-more:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding-block: 28px 24px; text-align: center; }
.hero-panel {
  position: relative; isolation: isolate; overflow: hidden; padding: 64px 24px 56px; border-radius: 22px;
  color: var(--on-navy); border: 1px solid var(--navy-2); background-color: #00033e;
  background-image:
    radial-gradient(40% 55% at 0% 108%, #ff6217, rgba(200, 60, 110, .55) 40%, transparent 75%),
    radial-gradient(55% 80% at 106% 18%, #0131ff, rgba(1, 49, 255, .45) 45%, transparent 80%),
    radial-gradient(45% 55% at 88% 108%, rgba(110, 30, 220, .85), transparent 75%),
    linear-gradient(165deg, #00022e 0%, #00033e 50%, #0510a0 100%);
}
/* Soft light rays fanning out of the blue side, blurred like the deck's backdrops. */
.hero-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 200deg at 108% 30%,
    rgba(115, 152, 255, 0) 0deg 4deg, rgba(150, 175, 255, .28) 6deg, rgba(115, 152, 255, 0) 8deg 13deg);
  filter: blur(10px);
  -webkit-mask-image: radial-gradient(60% 85% at 100% 30%, #000 15%, transparent 70%);
  mask-image: radial-gradient(60% 85% at 100% 30%, #000 15%, transparent 70%);
}
.hero-panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--grain-light);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-navy-2);
  border: 1px solid rgba(251, 251, 250, .18); background: rgba(251, 251, 250, .06); padding: 5px 12px 5px 5px; border-radius: 999px;
  margin-bottom: 26px;
}
.hero-pill:hover { border-color: rgba(251, 251, 250, .4); }
.hero-pill .tag {
  font: 500 11px/1 var(--font-mono); background: var(--hot); color: #fff;
  padding: 5px 8px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px); font-weight: 500; letter-spacing: -.035em; line-height: 1.02;
  max-width: 15ch; margin: 0 auto;
}
.hero h1 .dim { color: var(--navy-accent); }
.hero-sub { color: var(--on-navy-2); opacity: .82; font-size: 17px; max-width: 58ch; margin: 22px auto 0; }
.hero-search {
  position: relative; max-width: 620px; margin: 32px auto 0;
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: #fbfbfa; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  cursor: text; color: #6b665e; font-size: 15.5px; width: 100%; text-align: left;
}
.hero-search span { flex: 1; }
.hero-search:hover { border-color: var(--navy-accent); }
.hero-search kbd { background: #ece8e4; border-color: #e2ddd8; color: #6b665e; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.hero-chips .chip { background: rgba(251, 251, 250, .06); border-color: rgba(251, 251, 250, .18); color: var(--on-navy); }
.hero-chips .chip:hover { border-color: var(--navy-accent); }
.hero-chips .chip .n { color: var(--navy-accent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface); padding: 5px 11px; border-radius: 999px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--faint); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink-sheen), var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* ---------- Logos ---------- */
.logo {
  --size: 40px; position: relative; flex-shrink: 0; width: var(--size); height: var(--size);
  border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 600 calc(var(--size) * .4)/1 var(--font-display); letter-spacing: -.03em; color: var(--ink-2);
}
.logo img {
  position: absolute; inset: 18%; width: 64%; height: 64%; object-fit: contain; background: transparent;
}
.logo.has-img { background: #fff; }
.logo.has-img .mg { visibility: hidden; }
.logo.lg { --size: 64px; border-radius: 16px; }
.logo.sm { --size: 34px; border-radius: 9px; }

/* ---------- Category rows (home) ---------- */
.cat-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cat-card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--faint); transform: translateY(-1px); }
.cat-card-head { display: flex; align-items: center; gap: 12px; }
.cat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(140deg, var(--accent-soft), color-mix(in srgb, var(--accent) 22%, var(--accent-soft))); color: var(--accent);
}
.cat-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cat-card h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.cat-card .count { font: 400 12px/1 var(--font-mono); color: var(--muted); margin-top: 4px; }
.cat-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.logo-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.logo-row .more {
  --size: 34px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font: 500 11.5px/1 var(--font-mono); color: var(--muted); border: 1px dashed var(--line);
}

/* ---------- Stack diagram ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.stack-layers { display: flex; flex-direction: column; gap: 6px; }
.layer {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s;
}
.layer:hover { border-color: var(--accent); }
.layer-q { font: 500 12px/1.3 var(--font-mono); color: var(--accent); }
.layer-name { font-weight: 600; font-size: 15px; }
.layer-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.layer-n { font: 400 12px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.stack-side {
  border-radius: var(--radius); border: 1px dashed var(--faint); padding: 18px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.stack-side .layer-q { margin-bottom: 2px; }
.stack-side h3 { font-size: 16px; font-weight: 600; }
.stack-side p { color: var(--muted); font-size: 13.5px; }

/* ---------- Tool cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.card:hover { border-color: var(--faint); box-shadow: var(--shadow); }
.card-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card-title { min-width: 0; }
.card-title h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title .by { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc {
  color: var(--ink-2); font-size: 13.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.badge {
  font: 500 11px/1 var(--font-mono); padding: 4px 7px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.cat { color: var(--ink-2); }
.badge.oss { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.acq { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.risk-ids { font: 400 11px/1 var(--font-mono); color: var(--faint); margin-left: auto; white-space: nowrap; }

/* ---------- OSS list ---------- */
.oss-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.oss-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.oss-row:hover .oss-name { color: var(--accent); }
.oss-name { font-weight: 600; font-size: 14.5px; }
.oss-repo { font: 400 12px/1.3 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oss-cat { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- OWASP matrix ---------- */
.owasp { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.risk-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.risk-btn {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
}
.risk-btn:last-child { border-bottom: 0; }
.risk-btn:hover { background: var(--surface-2); }
.risk-btn.on { background: var(--ink-sheen), var(--ink); color: var(--bg); }
.risk-btn .rid { font: 500 12px/1 var(--font-mono); color: var(--accent); }
.risk-btn.on .rid { color: var(--accent-soft); }
.risk-btn .rname { font-size: 14px; font-weight: 500; }
.risk-btn .rn { font: 400 12px/1 var(--font-mono); color: var(--muted); }
.risk-btn.on .rn { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.risk-detail { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.risk-detail h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.risk-detail .rid { font: 500 13px/1 var(--font-mono); color: var(--accent); display: block; margin-bottom: 8px; }
.risk-detail > p { color: var(--muted); margin: 8px 0 18px; max-width: 60ch; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mini {
  display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); min-width: 0;
}
.mini:hover { border-color: var(--faint); }
.mini .t { min-width: 0; }
.mini b { font-weight: 600; font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 18px/1 var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 14px; }

/* ---------- Browse page ---------- */
.page-head { padding-block: 48px 24px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 64ch; font-size: 16px; }
.crumbs { font: 400 12.5px/1 var(--font-mono); color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.browse { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding-bottom: 64px; align-items: start; }
.filters { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 22px; }
.filter-group h4 { font: 500 11.5px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.filter-opts { display: flex; flex-direction: column; gap: 1px; }
.fopt {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px; border-radius: 7px; font-size: 14px;
  color: var(--ink-2); cursor: pointer; border: 0; background: none; text-align: left; width: 100%;
}
.fopt:hover { background: var(--surface-2); }
.fopt.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.fopt .n { font: 400 12px/1.6 var(--font-mono); color: var(--muted); }
.risk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.risk-chip {
  font: 500 11.5px/1 var(--font-mono); padding: 6px 7px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.risk-chip.on { background: var(--ink-sheen), var(--ink); color: var(--bg); border-color: var(--ink); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.field {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted);
}
.field svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.field input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.select {
  height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.result-count { font: 400 12.5px/1 var(--font-mono); color: var(--muted); margin-bottom: 12px; }
.empty { padding: 48px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.filters-toggle { display: none; }

/* ---------- Tool page ---------- */
.tool-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.tool-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.tool-hero .by { color: var(--muted); margin-top: 4px; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--ink-sheen), var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.on-navy { background: var(--on-navy); color: var(--navy); border-color: var(--on-navy); }
.btn.on-navy:hover { opacity: .9; }
.btn.ghost-navy { background: rgba(251, 251, 250, .06); color: var(--on-navy); border-color: rgba(251, 251, 250, .24); }
.btn.ghost-navy:hover { border-color: rgba(251, 251, 250, .5); }

/* ---------- Home identity CTA (navy backdrop shared with .hero-panel) ---------- */
.id-panel { padding: 44px 44px 40px; }
.id-panel .eyebrow { color: var(--navy-accent); }
.id-copy > p { color: var(--on-navy-2); opacity: .85; margin-top: 12px; max-width: 62ch; }
.id-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-bottom: 32px; align-items: start; }
.tool-desc { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.block { margin-top: 32px; }
.block h2 { font-size: 13px; font: 500 11.5px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.risk-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.risk-row { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.risk-row:last-child { border-bottom: 0; }
.risk-row .rid { font: 500 12.5px/1.5 var(--font-mono); color: var(--accent); }
.risk-row b { font-weight: 600; font-size: 14.5px; }
.risk-row p { color: var(--muted); font-size: 13.5px; }
.facts { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 6px 18px; }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--muted); }
.fact dd { margin: 0; text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.fact dd a:hover { color: var(--accent); }
.note { margin-top: 12px; font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Frameworks ---------- */
.fw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fw {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
a.fw:hover { border-color: var(--faint); }
.fw-meta { display: flex; justify-content: space-between; gap: 12px; font: 400 12px/1 var(--font-mono); color: var(--muted); }
.fw h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.fw .by { font-size: 13px; color: var(--muted); }
.fw p { font-size: 14px; color: var(--ink-2); }

/* ---------- Identity guide ---------- */
.lifecycle {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden;
}
.lifecycle li { background: var(--surface); }
.lifecycle a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 14px 14px; transition: background .15s; }
.lifecycle a:hover { background: var(--surface-2); }
.lifecycle .lc-n { font: 500 11.5px/1 var(--font-mono); color: var(--accent); }
.lifecycle b { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.lifecycle .lc-q { font-size: 13px; color: var(--muted); line-height: 1.4; }
.lifecycle .lc-c { margin-top: auto; padding-top: 6px; font: 400 11.5px/1.35 var(--font-mono); color: var(--ink-2); }

.concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.concept {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 90px; transition: border-color .3s, box-shadow .3s;
}
.concept.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.concept-abbr { font: 500 12px/1 var(--font-mono); color: var(--accent); }
.concept h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.concept > p { font-size: 14px; color: var(--ink-2); }
.concept .concept-agent { color: var(--muted); padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; }
.concept-agent b { display: block; font: 500 11px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.concept-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.concept-links a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.concept-links a:hover { color: var(--accent); text-decoration-color: currentColor; }
.concept-links a.spec { color: var(--muted); }
.concept-links svg { width: 12px; height: 12px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.concept-tools { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 4px; }
.concept-tools > span { font: 500 11px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.concept-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.res-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.res { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.res b { font-weight: 600; font-size: 14.5px; }
.res p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.res:hover b { color: var(--accent); }
.res-kind { font: 500 11px/1.6 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.res-arrow svg { width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 4px; }
.res:hover .res-arrow svg { stroke: var(--accent); }
.nhi-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nhi-rows .risk-row:nth-last-child(2) { border-bottom: 0; }
.nhi-rows .risk-row:nth-child(odd) { border-right: 1px solid var(--line); }

/* ---------- Submit ---------- */
.submit { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; padding-bottom: 64px; align-items: start; }
.form { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; }
.form label .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.form input[type="text"], .form input[type="url"], .form select, .form textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: 10px 12px; outline: 0; font-size: 14px;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form textarea { min-height: 96px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { flex-direction: row; align-items: center; gap: 6px; font: 500 12px/1 var(--font-mono); padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.checks input { margin: 0; accent-color: var(--accent); }
.inline-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.inline-check input { accent-color: var(--accent); }
.output { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 12px; }
.output pre {
  margin: 0; padding: 16px; border-radius: var(--radius); background: radial-gradient(70% 60% at 100% 100%, rgba(1, 49, 255, .45), transparent 75%), var(--navy); color: var(--on-navy-2); border: 1px solid var(--navy-2);
  font: 400 12px/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto;
}
.output-msg { font-size: 13px; color: var(--accent); min-height: 1.2em; }

/* ---------- Palette ---------- */
.palette { position: fixed; inset: 0; z-index: 100; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0, 3, 62, .45); backdrop-filter: blur(2px); }
.palette-panel {
  position: relative; max-width: 620px; margin: calc(12vh + env(safe-area-inset-top, 0px)) auto 0; width: calc(100% - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); min-width: 0; }
.palette-results { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 460px); overflow: auto; }
.palette-group { font: 500 11px/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.palette-item { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.palette-item.sel { background: var(--surface-2); }
.palette-item .t { min-width: 0; flex: 1; }
.palette-item b { display: block; font-weight: 600; font-size: 14px; }
.palette-item span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item .kind { font: 400 11px/1 var(--font-mono); color: var(--faint); }
.palette-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-block: 32px; flex-wrap: wrap; }
.footer-inner p + p { margin-top: 8px; max-width: 52ch; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cat-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifecycle { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lifecycle li:last-child { grid-column: span 2; }
  .res-list { grid-template-columns: minmax(0, 1fr); }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .owasp { grid-template-columns: minmax(0, 1fr); }
  .tool-body, .submit { grid-template-columns: minmax(0, 1fr); }
  .output { position: static; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 6px 16px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin: 0 -10px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}
@media (max-width: 760px) {
  .lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifecycle li:last-child { grid-column: 1 / -1; }
  .concept-grid { grid-template-columns: minmax(0, 1fr); }
  .nhi-rows { grid-template-columns: minmax(0, 1fr); }
  .nhi-rows .risk-row:nth-child(odd) { border-right: 0; }
  .nhi-rows .risk-row:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .res { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .res-kind { grid-column: 1 / -1; }
  .browse { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; }
  .filters-toggle { display: inline-flex; }
  .filters.collapsed .filter-group { display: none; }
  .oss-list, .faq { grid-template-columns: minmax(0, 1fr); }
  .layer { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .layer-q { grid-column: 1 / -1; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 48px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; }
  .oss-cat { display: none; }
  .oss-row { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cat-board { grid-template-columns: minmax(0, 1fr); }
  .hero-sub { font-size: 15.5px; }
  .id-panel { padding: 32px 20px 24px; }
  .section { padding-block: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
