/* =========================================================
   Smart Vacuum Cleaner Agent – Woxsen University B.Tech
   Design system: dark mode + neon accents
   ========================================================= */
:root {
  --bg: #05070f;
  --bg-2: #090d1a;
  --bg-3: #0d1324;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #e9edf7;
  --muted: #9ba7c2;
  --faint: #6b7794;

  --cyan: #19f2e0;
  --magenta: #ff2e93;
  --lime: #c6ff3d;
  --violet: #8b6cff;
  --amber: #ffb02e;
  --red: #ff3b4e;

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;

  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { /* ambient colour wash */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(25, 242, 224, 0.08), transparent 60%),
    radial-gradient(800px 500px at 100% 30%, rgba(139, 108, 255, 0.08), transparent 60%),
    radial-gradient(700px 500px at 0% 80%, rgba(255, 46, 147, 0.06), transparent 60%);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: 0.88em; background: rgba(25, 242, 224, 0.08); color: var(--cyan); padding: 0.12em 0.4em; border-radius: 6px; }
em { color: #fff; font-style: italic; }
strong { color: #fff; font-weight: 600; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(25, 242, 224, 0.3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--cyan); color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top 0.2s; }
.skip-link:focus { top: 12px; text-decoration: none; }

/* scroll progress (scroll-driven animation, JS fallback sets --p) */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta)); box-shadow: 0 0 14px var(--cyan); }
@supports (animation-timeline: scroll()) {
  .scroll-progress { transform: scaleX(0); animation: progress linear both; animation-timeline: scroll(root block); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ---------- layout ---------- */
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(900px, 100% - 2.5rem); }
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.022) 12%, rgba(255, 255, 255, 0.022) 88%, transparent); }
.section-head { max-width: 780px; margin-bottom: 3rem; }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.7rem; }
.eyebrow span { display: inline-grid; place-items: center; padding: 0.15rem 0.55rem; border: 1px solid rgba(25, 242, 224, 0.4); border-radius: 999px; background: rgba(25, 242, 224, 0.08); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.lead { font-size: 1.15rem; color: var(--muted); }
.lead strong { color: #fff; }
.c-mag { color: var(--magenta) !important; } .c-cyan { color: var(--cyan) !important; }
.small { font-size: 0.9rem; color: var(--muted); }
h3 { font-size: 1.35rem; }

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 2.4vw, 2rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.callout { margin-top: 2rem; padding: 1.1rem 1.4rem; border-left: 3px solid var(--cyan); background: rgba(25, 242, 224, 0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn { --b: var(--cyan); display: inline-flex; align-items: center; gap: 0.6rem; font: 600 1rem var(--font-body); padding: 0.95rem 1.6rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer; color: #fff; text-decoration: none !important; transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s; }
.btn-primary { background: linear-gradient(120deg, var(--cyan), #3b8bff 55%, var(--violet)); color: #031018; box-shadow: 0 8px 30px -8px rgba(25, 242, 224, 0.7); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px -8px rgba(25, 242, 224, 0.9); }
.btn-primary svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.btn-ghost { background: var(--surface); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(25, 242, 224, 0.08); transform: translateY(-2px); }
.btn-small { padding: 0.55rem 1.05rem; font-size: 0.88rem; }
.btn:active { transform: translateY(0) scale(0.97); }

.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer; transition: all 0.25s; }
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(25, 242, 224, 0.35); }

.tag { font-family: var(--font-mono); font-size: 0.8em; padding: 0.1em 0.55em; border-radius: 6px; white-space: nowrap; }
.tag-clean { background: rgba(25, 242, 224, 0.12); color: var(--cyan); }
.tag-dirt { background: rgba(255, 59, 78, 0.15); color: #ff7a88; }
.tag-obst { background: rgba(155, 167, 194, 0.15); color: #c3cce0; }

/* =========================================================
   NAV
   ========================================================= */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h); transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(5, 7, 15, 0.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--border); }
.nav { height: 100%; width: min(1280px, 100% - 2rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: #fff; text-decoration: none !important; min-width: 0; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(25, 242, 224, 0.55)); transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-family: var(--font-head); font-size: 0.98rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text em { font-family: var(--font-mono); font-style: normal; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); opacity: 0.9; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--muted); font-size: 0.92rem; font-weight: 500; text-decoration: none; transition: color 0.2s, background 0.2s; position: relative; }
.nav-links a:hover { color: #fff; background: var(--surface-2); }
.nav-links a.active { color: var(--cyan); background: rgba(25, 242, 224, 0.1); }
.nav-links .nav-cta { border: 1px solid rgba(255, 46, 147, 0.5); color: #ff8cc2; }
.nav-links .nav-cta:hover, .nav-links .nav-cta.active { background: rgba(255, 46, 147, 0.14); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; padding: 1rem; background: rgba(5, 7, 15, 0.96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); transform: translateY(-120%); opacity: 0; visibility: hidden; transition: transform 0.4s var(--ease), opacity 0.3s, visibility 0.4s; }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 0.9rem 1rem; }
}
@media (max-width: 480px) { .brand-text strong { font-size: 0.82rem; } }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--nav-h) + 3rem) 0 5rem; overflow: hidden; isolation: isolate; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-vignette { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 70% 60% at 50% 45%, rgba(5, 7, 15, 0.82), rgba(5, 7, 15, 0.35) 55%, transparent 80%),
  linear-gradient(180deg, transparent 70%, var(--bg)); }
.hero-inner { width: min(980px, 100% - 2.5rem); text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 1.1rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); border: 1px solid rgba(25, 242, 224, 0.35); background: rgba(25, 242, 224, 0.07); border-radius: 999px; backdrop-filter: blur(8px); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(25, 242, 224, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(25, 242, 224, 0); } 100% { box-shadow: 0 0 0 0 rgba(25, 242, 224, 0); } }
.hero-title { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.04; margin: 1.6rem 0 1.2rem; font-weight: 700; letter-spacing: -0.025em; }
.grad-text { display: block; background: linear-gradient(110deg, var(--cyan) 0%, #5aa2ff 40%, var(--violet) 70%, var(--magenta) 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.45rem); color: #c3cde4; max-width: 720px; margin: 0 auto 2.2rem; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.hero-stats { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-width: 800px; backdrop-filter: blur(10px); }
.hero-stats li { background: rgba(8, 12, 24, 0.7); padding: 1.1rem 0.6rem; display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stats strong { font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--cyan); text-shadow: 0 0 18px rgba(25, 242, 224, 0.5); white-space: nowrap; }
.hero-stats span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.hero-foot { margin-top: 1rem; font-size: 0.78rem; color: var(--faint); }
.hero-hud { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: 6rem; padding: 0.7rem 1rem; border-radius: 12px; background: rgba(8, 12, 24, 0.7); border: 1px solid var(--border-2); backdrop-filter: blur(10px); font-family: var(--font-mono); font-size: 0.78rem; display: flex; flex-direction: column; gap: 0.15rem; }
.hud-label { color: var(--magenta); letter-spacing: 0.14em; font-size: 0.68rem; }
.hud-value b { color: var(--cyan); font-size: 1.1rem; }
.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; border: 2px solid var(--border-2); border-radius: 20px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--cyan); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }
@media (max-width: 720px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } .hero-hud { display: none; } }

/* =========================================================
   PROBLEM / PEAS
   ========================================================= */
.problem-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 920px) { .problem-grid { grid-template-columns: 1fr; } }
.formal { margin: 1.4rem 0 0; display: grid; gap: 0.5rem; }
.formal > div { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: 0.65rem 0.9rem; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; transition: border-color 0.25s, transform 0.25s; }
.formal > div:hover { border-color: rgba(25, 242, 224, 0.5); transform: translateX(4px); }
.formal dt { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 0.15rem; }
.formal dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .formal > div { grid-template-columns: 1fr; gap: 0.2rem; } }

.objectives h3 { margin-bottom: 1rem; }
.obj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.obj { display: flex; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.obj::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.obj:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 12px 34px -14px var(--c); }
.obj-num { font-family: var(--font-mono); font-weight: 700; color: var(--c); font-size: 1.05rem; padding-top: 0.1rem; }
.obj strong { display: block; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 0.15rem; }
.obj p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

.env-pills { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.env-pills li { padding: 0.4rem 0.95rem; border-radius: 999px; font-family: var(--font-mono); font-size: 0.8rem; border: 1px dashed var(--border-2); color: var(--muted); transition: all 0.25s; }
.env-pills li:hover { color: var(--cyan); border-color: var(--cyan); border-style: solid; background: rgba(25, 242, 224, 0.07); }

.peas-head { margin: 4rem 0 1.6rem; max-width: 720px; }
.peas-head .hint { color: var(--cyan); font-family: var(--font-mono); font-size: 0.82rem; }
.peas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; perspective: 1400px; }
@media (max-width: 1020px) { .peas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .peas-grid { grid-template-columns: 1fr; } }
.peas-card { height: 330px; cursor: pointer; outline-offset: 6px; }
.peas-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s var(--ease); }
.peas-card:hover .peas-inner, .peas-card:focus-visible .peas-inner, .peas-card.is-flipped .peas-inner { transform: rotateY(180deg); }
.peas-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--border-2); overflow: hidden; }
.peas-front { background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%), linear-gradient(160deg, #0f1629, #090d1a); display: flex; flex-direction: column; justify-content: flex-end; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.peas-letter { position: absolute; top: 0.4rem; right: 1.2rem; font-family: var(--font-head); font-weight: 700; font-size: 8.5rem; line-height: 1; color: var(--c); opacity: 0.16; transition: opacity 0.4s; }
.peas-card:hover .peas-letter { opacity: 0.3; }
.peas-front h4 { font-size: 1.6rem; color: var(--c); margin-bottom: 0.2rem; text-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); }
.peas-front p { margin: 0 0 1rem; color: var(--muted); }
.flip-cue { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); }
.peas-back { transform: rotateY(180deg); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, #0b1020), #080c18); border-color: var(--c); box-shadow: 0 0 36px -10px var(--c); }
.peas-back h4 { color: var(--c); font-size: 1.15rem; margin-bottom: 0.7rem; }
.peas-back ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.38rem; font-size: 0.9rem; line-height: 1.45; color: #cfd8ee; }
.peas-back li::marker { color: var(--c); }
.peas-back b { color: var(--c); }
.peas-card.reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

/* =========================================================
   LITERATURE TIMELINE
   ========================================================= */
.timeline { position: relative; margin-bottom: 4rem; }
.timeline-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.timeline-hint { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.tl-buttons { display: flex; gap: 0.5rem; }
.tl-rail { height: 4px; background: var(--border); border-radius: 4px; margin: 0 0 2.4rem; overflow: hidden; }
.tl-rail-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta)); box-shadow: 0 0 14px var(--cyan); transition: width 0.2s linear; }
.tl-track { list-style: none; margin: 0; padding: 0.5rem 0.2rem 2rem; display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; cursor: grab; }
.tl-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.tl-track::-webkit-scrollbar { height: 6px; }
.tl-track::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }
.tl-item { flex: 0 0 min(340px, 82vw); scroll-snap-align: start; position: relative; padding-top: 3.2rem; opacity: 0.45; transform: translateY(10px) scale(0.97); transition: opacity 0.5s, transform 0.5s var(--ease); }
.tl-item.passed { opacity: 1; transform: none; }
.tl-year { position: absolute; top: 0; left: 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--c); text-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.tl-dot { position: absolute; top: 2.2rem; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 10%, transparent)); }
.tl-dot::before { content: ""; position: absolute; left: 0; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--bg), 0 0 18px var(--c); }
.tl-item article { margin-top: 1.1rem; padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); height: calc(100% - 1.1rem); transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s; }
.tl-item:hover article { border-color: var(--c); transform: translateY(-6px); box-shadow: 0 18px 40px -18px var(--c); }
.tl-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.2rem 0.6rem; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin-bottom: 0.8rem; }
.tl-item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.tl-item p { font-size: 0.93rem; color: var(--muted); margin: 0; line-height: 1.6; }
.tl-item code { font-size: 0.82em; }

.agent-lab h3 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.lab-sub { color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0 1rem; }
.tabs button { font: 600 0.95rem var(--font-body); padding: 0.7rem 1.3rem; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); cursor: pointer; transition: all 0.3s var(--ease); }
.tabs button:hover { color: #fff; border-color: var(--c); }
.tabs button[aria-selected="true"] { color: #05070f; background: var(--c); border-color: var(--c); box-shadow: 0 0 26px -4px var(--c); }
.agent-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .agent-panel { grid-template-columns: 1fr; } }
.agent-info h4 { font-size: 1.5rem; color: var(--ac, var(--cyan)); }
.agent-info p { color: #c7d0e6; }
.mini-code { margin: 1rem 0; padding: 1rem 1.1rem; background: #060913; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.65; overflow-x: auto; color: #c9d3ea; white-space: pre; }
.agent-verdict { padding: 0.8rem 1rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.04); border: 1px dashed var(--border-2); font-size: 0.95rem; margin: 0; }
.agent-meters { display: grid; gap: 1.1rem; align-content: start; }
.meter span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.meter-bar { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--ac, var(--cyan)) 40%, transparent), var(--ac, var(--cyan))); box-shadow: 0 0 14px var(--ac, var(--cyan)); transition: width 1s var(--ease); }
.meter-note { font-size: 0.75rem; color: var(--faint); margin: 0; }

.table-wrap { overflow-x: auto; margin-top: 1.6rem; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { padding: 0.85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
thead th { background: rgba(255, 255, 255, 0.05); font-family: var(--font-head); font-size: 0.9rem; color: #fff; }
tbody th { color: var(--cyan); font-weight: 500; font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap; }
td { color: var(--muted); }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(25, 242, 224, 0.05); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* =========================================================
   METHODOLOGY – FLOWCHART
   ========================================================= */
.flow-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 1000px) { .flow-layout { grid-template-columns: 1fr; } }
.flow-card { padding: 1.2rem; }
.flow-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.flow-legend { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0 0 0 auto; font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono); }
.flow-legend li { display: flex; align-items: center; gap: 0.4rem; }
.lg { width: 14px; height: 14px; border: 2px solid; display: inline-block; }
.lg-proc { border-color: var(--cyan); border-radius: 4px; } .lg-dec { border-color: var(--amber); transform: rotate(45deg) scale(0.85); } .lg-term { border-color: var(--lime); border-radius: 8px; }
.flow-svg-wrap { overflow-x: auto; }
#flowSvg { width: 100%; min-width: 520px; height: auto; }

.fc-node { cursor: pointer; outline: none; }
.fc-node .shape { fill: #0b1224; stroke-width: 2; transition: fill 0.3s, stroke-width 0.3s, filter 0.3s; }
.fc-node.t-proc .shape { stroke: var(--cyan); } .fc-node.t-dec .shape { stroke: var(--amber); } .fc-node.t-term .shape { stroke: var(--lime); }
.fc-node text { fill: #e9edf7; font-family: var(--font-body); font-size: 14px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.fc-node text.sub { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; fill: var(--muted); }
.fc-node:hover .shape, .fc-node:focus-visible .shape { fill: #14203d; stroke-width: 3; }
.fc-node:focus-visible .shape { stroke: #fff; }
.fc-node.is-active .shape { fill: #12304a; stroke-width: 3.5; filter: drop-shadow(0 0 12px currentColor); }
.fc-node.t-proc.is-active { color: var(--cyan); } .fc-node.t-dec.is-active { color: var(--amber); } .fc-node.t-term.is-active { color: var(--lime); }
.fc-node.is-next .shape { stroke-dasharray: 7 5; animation: nextPulse 1.1s ease-in-out infinite, dashMove 1s linear infinite; stroke: var(--magenta); }
@keyframes nextPulse { 50% { filter: drop-shadow(0 0 10px var(--magenta)); } }
@keyframes dashMove { to { stroke-dashoffset: -24; } }

.fc-edge { fill: none; stroke: #3a4768; stroke-width: 2; transition: stroke 0.3s; }
.fc-edge.is-active { stroke: var(--magenta); stroke-width: 3; stroke-dasharray: 8 6; animation: dashMove 0.8s linear infinite; filter: drop-shadow(0 0 5px var(--magenta)); }
.fc-arrow { fill: #3a4768; } .fc-arrow-active { fill: var(--magenta); }
.fc-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.fc-label.yes { fill: var(--lime); } .fc-label.no { fill: #ff7ab8; } .fc-label.misc { fill: var(--muted); font-weight: 500; }

.flow-panel { position: sticky; top: calc(var(--nav-h) + 16px); min-height: 320px; }
@media (max-width: 1000px) { .flow-panel { position: static; } }
.panel-kicker { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: var(--magenta); margin-bottom: 0.4rem; }
.flow-panel h3 { font-size: 1.6rem; }
.flow-panel > p { color: #c7d0e6; }
.fp-rule, .fp-next { margin-top: 1.1rem; }
.fp-rule span, .fp-next span { display: block; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 0.4rem; }
.fp-rule code { display: block; padding: 0.8rem 1rem; background: #060913; border: 1px solid var(--border); border-left: 3px solid var(--cyan); border-radius: var(--radius-sm); line-height: 1.55; white-space: pre-wrap; color: #bff7f1; }
.fp-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.fp-chip { font: 600 0.88rem var(--font-body); padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid var(--magenta); background: rgba(255, 46, 147, 0.1); color: #ffd0e6; cursor: pointer; transition: all 0.25s; display: inline-flex; gap: 0.5rem; align-items: center; }
.fp-chip:hover { background: var(--magenta); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px -8px var(--magenta); }
.fp-chip b { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.05rem 0.4rem; border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.flow-panel.flash { animation: flash 0.5s; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255, 46, 147, 0.6); } 100% { box-shadow: 0 0 0 18px rgba(255, 46, 147, 0); } }

.meth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 1.6rem; }
@media (max-width: 920px) { .meth-grid { grid-template-columns: 1fr; } }
.matrix-wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin: 1.2rem 0; }
.matrix { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: 252px; padding: 8px; background: #060913; border: 1px solid var(--border); border-radius: 12px; font-family: var(--font-mono); }
.matrix span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; font-size: 0.85rem; font-weight: 700; cursor: default; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.matrix span:hover { transform: scale(1.18); z-index: 2; box-shadow: 0 0 16px currentColor; }
.matrix .m0 { background: rgba(25, 242, 224, 0.07); color: #3b8f8a; }
.matrix .m1 { background: rgba(255, 59, 78, 0.22); color: #ff7a88; }
.matrix .m2 { background: rgba(155, 167, 194, 0.22); color: #c3cce0; }
.matrix .agent::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2s infinite; }
.matrix-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.matrix-legend li { display: flex; gap: 0.6rem; align-items: center; }
.mx { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.mx-0 { background: rgba(25, 242, 224, 0.25); } .mx-1 { background: var(--red); } .mx-2 { background: #8c97b3; } .mx-a { border: 2px solid var(--cyan); border-radius: 50%; }
.rules-table td:first-child { color: var(--cyan); font-family: var(--font-mono); font-weight: 700; width: 36px; }
.act { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 6px; margin-right: 0.3rem; }
.act-suck { background: rgba(255, 59, 78, 0.18); color: #ff8b97; } .act-move { background: rgba(25, 242, 224, 0.15); color: var(--cyan); } .act-halt { background: rgba(198, 255, 61, 0.15); color: var(--lime); }

/* =========================================================
   IMPLEMENTATION
   ========================================================= */
.stack-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.7rem; padding: 0; margin: 0 0 2.4rem; }
.stack-chips li { padding: 0.5rem 1rem; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); font-size: 0.88rem; color: var(--muted); transition: all 0.25s; }
.stack-chips li b { font-family: var(--font-mono); color: var(--lime); margin-right: 0.4rem; }
.stack-chips li:hover { transform: translateY(-3px); border-color: var(--lime); box-shadow: 0 10px 24px -14px var(--lime); }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.6rem; align-items: stretch; }
@media (max-width: 1080px) { .split { grid-template-columns: 1fr; } }

.editor { display: flex; flex-direction: column; border-radius: var(--radius); background: #0a0e1b; border: 1px solid var(--border-2); box-shadow: var(--shadow), 0 0 60px -30px var(--cyan); overflow: hidden; min-height: 0; }
.editor-bar { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem; background: #0e1424; border-bottom: 1px solid var(--border); overflow-x: auto; }
.traffic { display: flex; gap: 6px; } .traffic i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; } .traffic i:nth-child(2) { background: #febc2e; } .traffic i:nth-child(3) { background: #28c840; }
.editor-tabs { display: flex; gap: 0.3rem; }
.editor-tabs button { font: 500 0.82rem var(--font-mono); padding: 0.45rem 0.9rem; background: transparent; color: var(--faint); border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.editor-tabs button:hover { color: #fff; }
.editor-tabs button[aria-selected="true"] { color: var(--cyan); background: rgba(25, 242, 224, 0.08); border-color: rgba(25, 242, 224, 0.3); }
.editor-tabs button.flash, .pipeline button.flash { animation: tabFlash 0.7s; }
@keyframes tabFlash { 0% { box-shadow: 0 0 0 0 rgba(25, 242, 224, 0.8); } 100% { box-shadow: 0 0 0 10px rgba(25, 242, 224, 0); } }
.editor-body { flex: 1; overflow: auto; max-height: 720px; min-height: 420px; padding: 1rem 0; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.editor-body pre { margin: 0; }
.editor-body code { display: block; background: none; padding: 0; font-size: 0.82rem; line-height: 1.75; color: #d5def2; counter-reset: ln; }
.code-line { display: block; padding: 0 1.2rem 0 0; white-space: pre; counter-increment: ln; min-height: 1.75em; transition: background 0.2s; }
.code-line::before { content: counter(ln); display: inline-block; width: 3.2em; padding-right: 1.2em; text-align: right; color: #4a5575; user-select: none; }
.code-line:hover { background: rgba(255, 255, 255, 0.04); }
.editor.typing .code-line { opacity: 0; animation: lineIn 0.35s forwards; animation-delay: calc(var(--i) * 28ms); }
@keyframes lineIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.tk-kw { color: #ff7ab8; } .tk-str { color: #c6ff3d; } .tk-com { color: #5c6a8e; font-style: italic; } .tk-num { color: #ffb02e; } .tk-fn { color: #19f2e0; } .tk-bi { color: #8bb4ff; } .tk-const { color: #c79bff; }
.editor-status { display: flex; gap: 1.2rem; padding: 0.4rem 1rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); background: #0e1424; border-top: 1px solid var(--border); }

.sim { padding: 1.2rem; border-radius: var(--radius); background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); border: 1px solid var(--border-2); box-shadow: var(--shadow), 0 0 60px -30px var(--magenta); display: flex; flex-direction: column; gap: 0.9rem; }
.sim-top { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; align-items: center; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #060913; border: 1px solid var(--border-2); }
.seg-btn { font: 600 0.82rem var(--font-body); padding: 0.45rem 0.95rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.25s; }
.seg-btn.is-on[data-agent="model"] { background: var(--cyan); color: #04141a; box-shadow: 0 0 18px rgba(25, 242, 224, 0.5); }
.seg-btn.is-on[data-agent="random"] { background: var(--magenta); color: #fff; box-shadow: 0 0 18px rgba(255, 46, 147, 0.5); }
.pipeline { list-style: none; display: flex; gap: 0.35rem; padding: 0; margin: 0; flex-wrap: wrap; }
.pipeline button { font: 500 0.7rem var(--font-mono); padding: 0.35rem 0.6rem; border-radius: 8px; border: 1px solid var(--border-2); background: transparent; color: var(--faint); cursor: pointer; transition: all 0.2s; }
.pipeline button:hover { color: #fff; }
.pipeline button.lit { color: #04141a; background: var(--lime); border-color: var(--lime); box-shadow: 0 0 14px rgba(198, 255, 61, 0.55); }
.sim-canvas-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-2); background: #060913; aspect-ratio: 1; width: 100%; max-width: 520px; margin-inline: auto; }
#simCanvas { width: 100%; height: 100%; }
.sim-banner { position: absolute; inset: auto 0 0 0; padding: 0.7rem 1rem; text-align: center; font-weight: 600; font-size: 0.92rem; background: linear-gradient(0deg, rgba(5, 7, 15, 0.95), rgba(5, 7, 15, 0.6)); color: var(--lime); animation: lineIn 0.5s both; }
.sim-banner.bad { color: #ff9ac6; }
.sim-stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; padding: 0; margin: 0; }
.sim-stats li { padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.sim-stats span { font-size: 0.68rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }
.sim-stats b { font-family: var(--font-head); font-size: 1.05rem; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.speed { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--muted); }
input[type="range"] { accent-color: var(--cyan); width: 110px; }
.sim-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.78rem; color: var(--muted); }
.sim-legend span { display: flex; align-items: center; gap: 0.4rem; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .sw-dirt { background: var(--red); box-shadow: 0 0 8px var(--red); } .sw-obst { background: #566087; } .sw-seen { background: rgba(25, 242, 224, 0.3); } .sw-agent { background: var(--cyan); border-radius: 50%; }
.sim-log { margin: 0; padding: 0.7rem 0.9rem; min-height: 6.4rem; background: #060913; border: 1px solid var(--border); border-radius: 10px; font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.6; color: #8ea0c9; overflow: hidden; white-space: pre; }
.sim-log b { color: var(--lime); font-weight: 500; } .sim-log i { color: var(--magenta); font-style: normal; }
@media (max-width: 520px) { .sim-stats { grid-template-columns: repeat(2, 1fr); } .speed { margin-left: 0; } }

.fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 980px) { .fn-grid { grid-template-columns: 1fr; } }
.fn-card { position: relative; border-top: 3px solid var(--c); transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.fn-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px var(--c); }
.fn-name { display: inline-block; font-size: 1.05rem; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 0.3rem 0.7rem; margin-bottom: 1rem; }
.fn-card p { color: var(--muted); font-size: 0.95rem; }
.fn-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--faint); }

/* =========================================================
   RESULTS
   ========================================================= */
.disclaimer { padding: 0.8rem 1rem; border: 1px solid rgba(255, 176, 46, 0.4); background: rgba(255, 176, 46, 0.07); border-radius: var(--radius-sm); font-size: 0.92rem; color: #ffd9a0; }
.disclaimer strong { color: var(--amber); }
.results-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.6rem; }
@media (max-width: 980px) { .results-grid { grid-template-columns: 1fr; } }
.line-card { grid-column: 1 / -1; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1.4rem; }
.chart-head h3 { margin: 0; font-size: 1.25rem; }
.key { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; font-size: 0.8rem; color: var(--muted); }
.key li { display: flex; align-items: center; gap: 0.4rem; }
.k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .k-mag { background: var(--magenta); } .k-cyan { background: var(--cyan); }
.metric { margin-bottom: 1.8rem; }
.metric-top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; font-weight: 600; font-size: 0.97rem; }
.metric-top em { font-family: var(--font-mono); font-style: normal; font-weight: 400; font-size: 0.72rem; color: var(--faint); }
.bar-row { display: grid; grid-template-columns: 56px 1fr 78px; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.bar-label { font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.bar { height: 22px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 8px; transition: width 1.6s var(--ease); position: relative; }
.bar-mag { background: linear-gradient(90deg, #8a1a52, var(--magenta)); box-shadow: 0 0 18px rgba(255, 46, 147, 0.6); }
.bar-cyan { background: linear-gradient(90deg, #0e8d86, var(--cyan)); box-shadow: 0 0 18px rgba(25, 242, 224, 0.6); }
.bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(255,255,255,0.35), transparent 60%); transform: translateX(-100%); }
.in-view .bar-fill { width: var(--w); }
.in-view .bar-fill::after { animation: sheen 2.2s 1.2s ease-out; }
@keyframes sheen { to { transform: translateX(100%); } }
.bar-row b { font-family: var(--font-head); text-align: right; font-size: 1.05rem; }

.dial-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
@media (max-width: 560px) { .dial-row { grid-template-columns: 1fr; } }
.dial { margin: 0; position: relative; text-align: center; }
.dial svg { width: 100%; max-width: 150px; margin: 0 auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 9; }
.ring { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s var(--ease); }
.ring-cyan { stroke: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); } .ring-mag { stroke: var(--magenta); filter: drop-shadow(0 0 6px var(--magenta)); }
.dial-center { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; max-width: 150px; margin: 0 auto; display: grid; place-items: center; }
.dial-center b { font-family: var(--font-head); font-size: 1.15rem; color: #fff; }
.dial figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.4; }
.dial figcaption small { color: var(--magenta); font-family: var(--font-mono); }

#coverageSvg { width: 100%; height: auto; }
.axis { stroke: #3a4768; stroke-width: 1.5; } .grid-l { stroke: rgba(255,255,255,0.06); } .ax-t { fill: var(--faint); font-family: var(--font-mono); font-size: 11px; }
.curve { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset 2.6s var(--ease); }
.in-view .curve { stroke-dashoffset: 0; }
.curve-mag { stroke: var(--magenta); filter: drop-shadow(0 0 6px var(--magenta)); } .curve-cyan { stroke: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.area { opacity: 0; transition: opacity 1.4s 1.4s; } .in-view .area { opacity: 1; }
.annot { opacity: 0; transition: opacity 0.8s 1.6s; } .in-view .annot { opacity: 1; }

.takeaways { margin-top: 1.6rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .takeaways { grid-template-columns: repeat(2, 1fr); } }
.takeaways div { background: #090d1a; padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; transition: background 0.3s; }
.takeaways div:hover { background: #0e1630; }
.takeaways b { font-family: var(--font-head); font-size: 2.2rem; background: linear-gradient(120deg, var(--cyan), var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.takeaways span { font-size: 0.88rem; color: var(--muted); line-height: 1.4; }

/* =========================================================
   CONCLUSION – GLOW CARDS
   ========================================================= */
.group-title { margin: 2.4rem 0 1.2rem; font-size: 1.1rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); display: flex; align-items: center; gap: 1rem; }
.group-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }
.glow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .glow-grid { grid-template-columns: 1fr; } }
.glow-card { --mx: 50%; --my: 0%; position: relative; padding: 1.8rem; border-radius: var(--radius); background: #0a0f1d; border: 1px solid var(--border); overflow: hidden; isolation: isolate; transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s; }
.glow-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 28%, transparent), transparent 55%); opacity: 0.55; transition: opacity 0.3s; }
.glow-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; background: radial-gradient(300px circle at var(--mx) var(--my), var(--c), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.8; }
.glow-card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px -26px var(--c); }
.glow-card:hover::before { opacity: 1; }
.glow-icon { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; margin-bottom: 1.1rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); text-shadow: 0 0 14px var(--c); }
.glow-card h4 { font-size: 1.3rem; }
.glow-card p { color: var(--muted); font-size: 0.97rem; }
.glow-card ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.4rem; font-size: 0.88rem; color: #c3cce0; }
.glow-card li { padding-left: 1.3rem; position: relative; }
.glow-card li::before { content: "▸"; position: absolute; left: 0; color: var(--c); }

/* =========================================================
   ACCORDION
   ========================================================= */
.accordion { display: grid; gap: 0.9rem; }
.accordion details { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)); transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; overflow: hidden; }
.accordion details:hover { border-color: var(--border-2); }
.accordion details[open] { border-color: rgba(25, 242, 224, 0.55); box-shadow: 0 0 40px -16px var(--cyan); background: linear-gradient(160deg, rgba(25,242,224,0.07), rgba(255,255,255,0.015)); }
.accordion summary { list-style: none; display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; cursor: pointer; font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; color: #fff; user-select: none; }
.accordion summary::-webkit-details-marker { display: none; }
.q-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); padding: 0.25rem 0.6rem; border: 1px solid rgba(25, 242, 224, 0.4); border-radius: 8px; background: rgba(25, 242, 224, 0.08); flex: none; }
.accordion summary > span:nth-child(2) { flex: 1; }
.chev { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-2); position: relative; transition: transform 0.4s var(--ease), background 0.3s, border-color 0.3s; }
.chev::before, .chev::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; background: #fff; border-radius: 2px; transform: translate(-50%, -50%); transition: transform 0.4s var(--ease); }
.chev::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .chev { transform: rotate(180deg); background: var(--cyan); border-color: var(--cyan); }
details[open] .chev::before, details[open] .chev::after { background: #04141a; }
details[open] .chev::after { transform: translate(-50%, -50%) rotate(0deg); }
.answer { padding: 0 1.4rem 1.4rem 4.2rem; color: #c5cee4; font-size: 1rem; }
.answer p { margin-bottom: 0.8em; }
.answer ul { margin: 0 0 1em; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.answer li::marker { color: var(--cyan); }
@media (max-width: 560px) { .answer { padding-left: 1.4rem; } }
@supports selector(::details-content) {
  .accordion details::details-content { block-size: 0; overflow: clip; transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
  .accordion details[open]::details-content { block-size: auto; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; background: #04060c; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; margin: 0; }
.footer-sub { margin: 0; color: var(--cyan); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.refs { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.9rem 1.2rem; font-size: 0.88rem; color: var(--muted); }
.refs summary { cursor: pointer; font-weight: 600; color: #fff; }
.refs ol { margin: 1rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.copyright { margin: 1.6rem 0 0; font-size: 0.8rem; color: var(--faint); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
