:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --panel: #17171b;
  --line: rgba(255, 255, 255, .09);
  --text: #ececee;
  --muted: #a1a1aa;
  --accent: #ff5a1f;
  --accent-hot: #e8590a;
  --accent-red: #ca1a00;
  --glow: #ffb02e;
  --radius: 14px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .6em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 48px); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #160600; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 34px; height: auto; filter: drop-shadow(0 0 6px rgba(255, 90, 31, .35)); }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; text-transform: uppercase; }
.brand-name span { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-toggle { display: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 999px;
  background: var(--accent); color: #160600 !important;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  border: 1px solid var(--accent);
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255, 90, 31, .28); }
.btn-ghost { background: transparent; color: var(--text) !important; border-color: rgba(236, 236, 238, .3); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-small { padding: 8px 18px; font-size: .9rem; }
.btn-large { padding: 18px 32px; font-size: 1.1rem; font-family: var(--font-mono); font-weight: 500; word-break: break-all; }

/* Grid background */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 90, 31, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 90, 31, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 110px; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 500px at 75% 30%, rgba(255, 90, 31, .08), transparent 70%), var(--bg); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(255, 90, 31, .3); padding: 6px 14px; border-radius: 999px; background: rgba(255, 90, 31, .05); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--glow); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5rem); font-weight: 700; margin: 24px 0 24px; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: #d4d4d8; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.radar-wrap { position: relative; max-width: 480px; width: 100%; justify-self: center; }
.radar { opacity: .85; }
.hero-logo { position: absolute; left: 50%; top: 50%; width: 52%; height: auto; transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 28px rgba(255, 90, 31, .45)) drop-shadow(0 0 70px rgba(202, 26, 0, .3)); }
.radar-stage { position: relative; }
.radar .sweep { transform-origin: 200px 200px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
.radar .contact { animation: ping 6s infinite; }
.radar .c2 { animation-delay: -2.2s; }
.radar .c3 { animation-delay: -4s; }
@keyframes ping { 0%, 100% { opacity: .35; } 10% { opacity: 1; } 60% { opacity: .55; } }
.radar .lock { animation: blink 1.2s infinite; }
.radar-readout { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; color: var(--muted); }
.radar-readout b { color: var(--glow); font-weight: 500; }

/* Sections */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-tag { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.section-tag.center { text-align: center; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-intro { color: #d4d4d8; font-size: 1.12rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.prose p { color: #d4d4d8; }
.prose-lead { font-size: 1.2rem; color: #d4d4d8; }

.threat-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.threat-list li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 500; font-size: .95rem; }
.ti svg { width: 20px; height: 20px; fill: none; stroke: var(--glow); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { position: relative; padding: 32px 28px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 23, 27, .95), rgba(17, 17, 20, .95)); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s, transform .2s; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.card:hover { border-color: rgba(255, 90, 31, .4); transform: translateY(-3px); }
.card p { color: var(--muted); margin: 0; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 90, 31, .08); border: 1px solid rgba(255, 90, 31, .25); margin-bottom: 22px; }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
.stat { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat-value { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { display: block; margin-top: 8px; color: var(--muted); font-size: .92rem; }

/* Mission */
.mission { position: relative; overflow: hidden; padding: 130px 0; text-align: center; background: radial-gradient(700px 360px at 50% 50%, rgba(255, 90, 31, .1), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.mission .grid-bg { mask-image: radial-gradient(ellipse at 50% 50%, #000 15%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 15%, transparent 70%); }
.mission blockquote { position: relative; margin: 0; }
.mission blockquote p { font-family: var(--font-head); font-size: clamp(2rem, 5.2vw, 4rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
.mission blockquote span { color: var(--accent); white-space: nowrap; }

/* Name */
.name-section { padding-top: 0; }
.name-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; background: var(--bg-2); }
.etym { display: flex; align-items: center; flex-wrap: wrap; gap: 24px 32px; }
.etym-part { display: flex; flex-direction: column; }
.word { font-family: var(--font-head); font-size: 2rem; font-weight: 700; font-style: italic; }
.result .word { font-style: normal; color: var(--accent); }
.lang { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meaning { color: #d4d4d8; font-size: .95rem; }
.meaning::before { content: "“"; } .meaning::after { content: "”"; }
.plus { font-family: var(--font-mono); font-size: 1.6rem; color: var(--glow); }

/* Contact */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.contact-inner h2 { margin-bottom: .35em; }
.contact-inner .section-intro { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: 28px; height: auto; }
.brand-name.small { font-size: .95rem; color: var(--text); }
.foot-strap { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }

/* Reveal */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero { padding: 64px 0 80px; }
  .hero-inner, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .radar-wrap { max-width: 340px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .name-section { padding-top: 0; }
}
@media (max-width: 640px) {
  .hero-logo { width: 56%; }
  body { font-size: 16px; }
  .container { width: calc(100% - 40px); }
  .site-nav { gap: 10px; margin-left: 12px; }
  .site-nav .btn-small { white-space: nowrap; padding: 7px 12px; font-size: .82rem; min-height: 44px; }
  .header-inner .brand-name { font-size: .95rem; }
  .brand-mark { width: 28px; }
  .brand-name span { display: none; }
  .site-footer .brand-name span { display: inline; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 20px 16px; }
  .stat-value { font-size: 1.7rem; }
  .name-card { padding: 28px 24px; }
  .etym { gap: 14px 20px; }
  .word { font-size: 1.6rem; }
  .mission { padding: 96px 0; }
  .btn-large { width: 100%; font-size: 1rem; padding: 16px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Motion layer (only active when html.anim is set)
   ========================================================= */
.preloader, .cursor, .hud-index { display: none; }

/* Preloader */
.anim .preloader {
  display: block; position: fixed; inset: 0; z-index: 1000;
  background: #08080a; color: var(--text); overflow: hidden;
}
.pl-grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 90, 31, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 90, 31, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 10%, transparent 65%); }
.pl-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 24px 4px rgba(255, 90, 31, .35); opacity: 0; }
.pl-center { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); }
.pl-logo { width: clamp(110px, 14vw, 170px); height: auto; opacity: 0; filter: drop-shadow(0 0 30px rgba(255, 90, 31, .5)); }
.pl-log { position: absolute; top: clamp(20px, 4vw, 40px); left: clamp(20px, 4vw, 48px); display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--muted); }
.pl-line { min-height: 1.2em; }
.pl-bottom { position: absolute; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); bottom: clamp(28px, 5vw, 56px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.pl-word { overflow: hidden; line-height: .9; padding-bottom: .04em; }
.pl-word span { display: block; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: -.03em;
  font-size: clamp(3rem, 13vw, 11rem); transform: translateY(110%); }
.pl-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .85rem; color: var(--accent); letter-spacing: .1em; padding-bottom: .6em; }
.pl-tick { width: 18px; height: 10px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-4px); }
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .06); }
.pl-bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px rgba(255, 90, 31, .6); }
.anim body.is-loading { overflow: hidden; }

/* Hide hero bits until the intro hands over (anim only) */
.anim [data-hero-in], .anim .hero-logo, .anim .radar { visibility: hidden; }
.anim.ready [data-hero-in], .anim.ready .hero-logo, .anim.ready .radar { visibility: visible; }

/* Masked line reveals */
.line-mask { display: block; overflow: hidden; clip-path: inset(-0.05em -0.2em -0.25em -0.2em); padding-bottom: .02em; }
.line-inner { display: block; will-change: transform; }

/* Hairline rules that draw in */
.rule { position: absolute; top: 0; left: max(24px, calc((100% - 1160px) / 2)); right: max(24px, calc((100% - 1160px) / 2));
  height: 1px; background: linear-gradient(90deg, var(--accent), rgba(255, 90, 31, .15) 40%, rgba(255, 255, 255, .08)); transform-origin: left; }

/* Roll-over text */
[data-roll] .roll { display: inline-block; position: relative; overflow: hidden; vertical-align: top; line-height: 1.25; }
[data-roll] .roll > span { display: block; transition: transform .55s cubic-bezier(.7, 0, .2, 1); }
[data-roll] .roll > span + span { position: absolute; left: 0; top: 100%; }
[data-roll]:hover .roll > span, [data-roll]:focus-visible .roll > span { transform: translateY(-100%); }
.site-nav a[data-roll] .roll > span + span { color: var(--accent); }

/* Marquee */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: #0d0d10; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 36px; padding-right: 36px;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.6rem); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; color: #d4d4d8; }
.marquee-track span:nth-of-type(2n) { color: transparent; -webkit-text-stroke: 1px rgba(255, 90, 31, .85); }
.marquee-track i { width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 12px rgba(255, 90, 31, .6); flex: none; }
.no-anim-marquee .marquee-track, html:not(.anim) .marquee-track { animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Cards: orange scan line */
.card .scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 18px 3px rgba(255, 90, 31, .45); opacity: 0; pointer-events: none; }

/* Mission word fill */
.mission [data-words] .w { color: rgba(236, 236, 238, .14); transition: none; }
.mission [data-words] span.accent-w.w { color: rgba(255, 90, 31, .18); }
.mission [data-words] > span { white-space: normal; }
.mission .nowrap { white-space: nowrap; }

/* HUD cursor */
@media (hover: hover) and (pointer: fine) {
  .anim.has-cursor, .anim.has-cursor a, .anim.has-cursor button { cursor: none; }
  .anim .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; mix-blend-mode: normal; }
  .cursor-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
  .cursor-ring { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .cb { position: absolute; width: 8px; height: 8px; border-color: rgba(255, 90, 31, .9); border-style: solid; border-width: 0; transition: all .35s cubic-bezier(.7, 0, .2, 1); }
  .cb.tl { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
  .cb.tr { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
  .cb.bl { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
  .cb.br { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
  .cursor.is-hidden { opacity: 0; }
  .cursor { transition: opacity .25s; }

  .anim .hud-index { display: flex; position: fixed; left: 24px; bottom: 22px; z-index: 40; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: 0; }
  .hud-tick { width: 14px; height: 9px; border-left: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: translateY(-3px); }
  .hud-num { color: var(--accent); }
  .hud-progress { width: 64px; height: 1px; background: rgba(255, 255, 255, .12); }
  .hud-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
}
@media (max-width: 1100px) { .anim .hud-index { display: none; } }

/* Hero logo 3D */
.radar-stage { perspective: 900px; }
.hero-logo { will-change: transform; }
.anim .radar .sweep, .anim .radar .contact, .anim .radar .lock { animation: none; }
.anim .mission { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0; }
.anim .mission > .container { width: min(1160px, 100% - 48px); }

/* =========================================================
   Intelligence section (map console + tool directory)
   ========================================================= */
.intel { background: radial-gradient(900px 420px at 80% 0%, rgba(255, 90, 31, .06), transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.intel .section-intro a { color: var(--accent); text-underline-offset: 3px; }
.intel-console { position: relative; border: 1px solid rgba(255, 90, 31, .22); border-radius: var(--radius); background: linear-gradient(180deg, #111114, #0c0c0f); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 30px 80px -40px rgba(255, 90, 31, .25); }
.ic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .015); }
.ic-title { display: inline-flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.ic-title i { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 10px rgba(255, 90, 31, .7); }
.ic-read b { color: var(--glow); font-weight: 500; margin-left: 6px; }
.ic-read b.is-live { color: #4ade80; }
.ic-read b.is-off { color: #f87171; }
.ic-read b.is-wait { color: var(--muted); }
.ic-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.ic-map { position: relative; min-height: 360px; background: #08080a; border-right: 1px solid var(--line); }
.ic-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.ic-corner { position: absolute; width: 14px; height: 14px; border: 0 solid var(--accent); pointer-events: none; opacity: .9; }
.ic-corner.tl { left: 10px; top: 10px; border-left-width: 1.5px; border-top-width: 1.5px; }
.ic-corner.tr { right: 10px; top: 10px; border-right-width: 1.5px; border-top-width: 1.5px; }
.ic-corner.bl { left: 10px; bottom: 10px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.ic-corner.br { right: 10px; bottom: 10px; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.ic-noscript { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; }
.ic-tip { position: absolute; z-index: 3; pointer-events: none; max-width: 240px; padding: 8px 10px; border: 1px solid rgba(255, 90, 31, .5); border-radius: 6px;
  background: rgba(10, 10, 12, .94); font-family: var(--font-mono); font-size: .72rem; line-height: 1.45; color: var(--text); }
.ic-tip b { color: var(--glow); font-weight: 500; }
.ic-tip span { display: block; color: var(--muted); }
.ic-side { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ic-label { margin: 4px 0 0; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.ic-label span { color: var(--accent); }
.ic-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; padding: 7px 9px; text-align: left; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  color: var(--muted); font: 500 .78rem/1.2 var(--font-body); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 2px; flex: none; }
.chip[aria-pressed="true"] { color: var(--text); border-color: rgba(255, 90, 31, .55); background: rgba(255, 90, 31, .08); }
.chip[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(255, 90, 31, .7); }
.chip:hover { border-color: rgba(255, 90, 31, .7); }
.chip em { font-style: normal; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; padding: 2px 5px; border-radius: 3px; }
.k-live { color: #4ade80; background: rgba(74, 222, 128, .1); }
.k-comp { color: #93c5fd; background: rgba(147, 197, 253, .1); }
.k-ref { color: var(--glow); background: rgba(255, 176, 46, .1); }
.k-ill { color: #c4b5fd; background: rgba(196, 181, 253, .1); }
.ic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: .74rem; }
.ic-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, .07); }
.ic-list li.ic-empty { display: block; color: var(--muted); border: 0; }
.ic-list .mag { color: var(--glow); }
.ic-list a { color: #d4d4d8; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-list a:hover { color: var(--accent); }
.ic-list small { display: block; color: var(--muted); font-size: .66rem; }
.ic-src { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.55; color: var(--muted); }
.ic-src b { color: #d4d4d8; font-weight: 600; }
.ic-src a { color: #d4d4d8; text-underline-offset: 2px; }

.tools-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin: 72px 0 28px; }
.tools-head h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); max-width: 30em; margin: 0; }
.tools-head .section-tag { margin-bottom: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool { position: relative; display: flex; flex-direction: column; padding: 24px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color .2s, transform .2s; }
.tool::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: linear-gradient(90deg, var(--accent), transparent 70%); }
.tool:hover { border-color: rgba(255, 90, 31, .4); transform: translateY(-3px); }
.tool h3 { margin: 0 0 .35em; }
.tool > p { color: var(--muted); font-size: .94rem; margin: 0 0 12px; }
.tool .tool-code { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; color: var(--accent); margin-bottom: 10px; }
.tool .tool-layers { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; color: #8b8b95; margin-top: auto; padding-top: 4px; }
.tool-main { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 90, 31, .5);
  color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 600; margin-bottom: 14px; transition: background .2s, color .2s; }
.tool-main:hover { background: var(--accent); color: #160600; }
.tool-links { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; }
.tool-links a { color: #d4d4d8; text-decoration: none; border-bottom: 1px solid rgba(255, 90, 31, .35); }
.tool-links a::after { content: " \2197"; color: var(--accent); font-size: .8em; }
.tool-links a:hover { color: var(--accent); }
.intel-disclaimer { margin: 28px 0 0; padding: 14px 18px; border-left: 2px solid var(--accent); background: rgba(255, 255, 255, .02); color: var(--muted); font-size: .88rem; }

@media (max-width: 1000px) {
  .ic-body { grid-template-columns: 1fr; }
  .ic-map { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 2 / 1; min-height: 160px; }
  .ic-chips { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ic-bar { gap: 6px 16px; padding: 10px 14px; font-size: .64rem; }
  .ic-title { width: 100%; }
  .ic-chips { grid-template-columns: 1fr 1fr; }
  .ic-src { font-size: .76rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .tools-head { margin-top: 56px; }
  .tools-head .btn { width: 100%; }
}
.tool-grid.tool-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1279px) { .tool-grid.tool-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tool-grid.tool-grid-4 { grid-template-columns: 1fr; } }
section[id], .tools-head[id] { scroll-margin-top: 68px; }

/* Interactive 3D hero cube (logo3d.js). The 2D image stays as the fallback. */
.hero-cube { position: absolute; left: 50%; top: 50%; width: 88%; aspect-ratio: 1; margin: 0; translate: -50% -50%; z-index: 2;
  opacity: 0; scale: .7; transition: opacity 1.2s cubic-bezier(.16, 1, .3, 1), scale 1.6s cubic-bezier(.16, 1, .3, 1); }
.hero-cube::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .30), rgba(202, 26, 0, .12) 55%, rgba(202, 26, 0, 0) 100%); filter: blur(10px); }
.hero-cube canvas { display: block; width: 100%; height: 100%; touch-action: pan-y pinch-zoom; -webkit-tap-highlight-color: transparent; outline: none; }
.hero-cube canvas:focus-visible { outline: 1px dashed rgba(255, 90, 31, .6); outline-offset: -6px; border-radius: 8px; }
.cube-on .hero-cube.is-in { opacity: 1; scale: 1; }
.anim:not(.ready) .cube-on .hero-cube { opacity: 0; scale: .7; }
.cube-on .hero-logo { visibility: hidden !important; }
.cube-hint { position: absolute; left: 50%; bottom: 1%; translate: -50% 0; z-index: 3; pointer-events: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .22em; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; opacity: 0; transition: opacity .8s ease .2s; }
.cube-hint::before, .cube-hint::after { content: ""; width: 14px; height: 1px; background: var(--accent); opacity: .7; }
.cube-on .cube-hint { opacity: .85; }
.anim:not(.ready) .cube-hint { opacity: 0; }
.cube-on .cube-hint.is-gone { opacity: 0; transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) {
  .cube-hover .cursor .cb { width: 12px; height: 12px; }
  .cube-hover .cursor-ring { width: 46px !important; height: 46px !important; margin: -23px 0 0 -23px !important; }
  .cube-drag .cursor .cb { width: 5px; height: 5px; }
  .cube-drag .cursor-ring { width: 22px !important; height: 22px !important; margin: -11px 0 0 -11px !important; }
  .cube-drag .cursor-dot { transform: scale(.4); }
}
@media (prefers-reduced-motion: reduce) { .hero-cube, .cube-hint { transition: none; } }

/* =========================================================
   v7: mobile menu, breakdown toggles, card alignment, badges
   ========================================================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Mobile menu (below 640px) */
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; order: 3; min-width: 44px; min-height: 44px; padding: 0 12px;
    border: 1px solid rgba(236, 236, 238, .3); border-radius: 999px; background: transparent; color: var(--text); font: 600 .82rem/1 var(--font-body); cursor: pointer; }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { border-color: var(--accent); }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-toggle-bars { position: relative; display: block; width: 18px; height: 12px; }
  .nav-toggle-bars i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
  .nav-toggle-bars i:nth-child(1) { top: 0; }
  .nav-toggle-bars i:nth-child(2) { top: 5px; }
  .nav-toggle-bars i:nth-child(3) { top: 10px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { top: 5px; transform: rotate(45deg); background: var(--accent); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); background: var(--accent); }
  .nav-cta { order: 2; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a { display: flex; align-items: center; min-height: 48px; font-size: 1rem; color: var(--text); }
  .nav-links a::before { content: ""; width: 6px; height: 6px; margin-right: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(255, 90, 31, .7); }
  .site-header.menu-open { transform: none !important; }
}

/* Platform and breakdown cards: buttons line up across each row */
.tool .tool-layers { white-space: normal; }
.tool .tool-layers > span:not(.sep) { white-space: nowrap; }
.tool .tool-layers .sep { color: #5b5b63; }
/* flex fallback: the spec line (and the CTA block after it) sits at the bottom */
.tool .tool-layers { margin-top: auto; }
@supports (grid-template-rows: subgrid) {
  .tool-grid > .tool { display: grid; grid-template-rows: subgrid; grid-row: span 7; row-gap: 0; align-content: start; }
  .tool-grid > .tool > * { min-width: 0; }
  .tool-grid > .tool > .tool-layers { align-self: end; margin-top: 0; }
  .tool-grid > .tool > .tool-main { justify-self: start; align-self: start; }
  .tool-grid > .tool > .tool-links { align-self: start; }
  .tool-grid > .tool > .bd-link { align-self: end; }
}
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tool-top .tool-code { margin: 0; }
.tool .tool-flag { margin: 0; padding: 2px 8px; border: 1px solid rgba(255, 176, 46, .45); border-radius: 999px; background: rgba(255, 176, 46, .08);
  font-family: var(--font-mono); font-size: .6rem; line-height: 1.35; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); white-space: nowrap; }

/* "See breakdown" link on each platform card */
.bd-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 10px; color: var(--accent); font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none; justify-self: start; }
.bd-link:hover { color: var(--glow); }
.bd-link span { transition: transform .2s ease; }
.bd-link:hover span { transform: translateY(2px); }

/* Breakdown toggles */
.tools-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bd-toggle { gap: 10px; cursor: pointer; font-family: var(--font-body); min-height: 44px; }
.bd-chev { width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-2px) rotate(45deg); transition: transform .25s ease; }
.bd-toggle[aria-expanded="true"] .bd-chev { transform: translateY(2px) rotate(-135deg); }
.bd-toggle[aria-expanded="true"] { border-color: rgba(255, 90, 31, .6); }
.bd-panel { padding-top: 4px; }
.bd-panel.is-opening { animation: bd-in .5s cubic-bezier(.16, 1, .3, 1); }
@keyframes bd-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bd-panel[hidden] + .tools-head { margin-top: 44px; }
@media (max-width: 640px) {
  .tools-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .tools-actions .btn { width: 100%; }
}

/* Login-gated Arkham links */
.login-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; padding: 1px 6px 1px 5px; border: 1px solid rgba(255, 176, 46, .45); border-radius: 4px;
  background: rgba(255, 176, 46, .08); color: var(--glow); font-family: var(--font-mono); font-size: .62rem; font-weight: 500; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; vertical-align: 1px; }
.login-badge .lock { flex: none; }
.login-badge-inline { margin: 0 2px; font-size: .55em; vertical-align: .25em; }
.tool-links a.has-login { border-bottom: 0; }
.tool-links a.has-login .lbl { border-bottom: 1px solid rgba(255, 90, 31, .35); }
.tool-links a.has-login::after { content: none; }
.tool-links a.has-login .lbl::after { content: " \2197"; color: var(--accent); font-size: .8em; }
.tool-links a.has-login:hover .lbl { color: var(--accent); }
.tool-main .login-badge { margin-left: 4px; }

@media (prefers-reduced-motion: reduce) {
  .bd-panel.is-opening { animation: none; }
}
