/* Exported from https://github.com/faerber-lab/BabelDojo by tools/export_site.py. Edit the source there, not this copy.
   Not minified: the .min suffix only keeps the host site's build tools from rewriting the file. */

/* BabelDojo — site styles */

:root {
  --bg: #ffffff;
  --surface: #f6f8fc;
  --surface-2: #eef2fa;
  --ink: #0e1726;
  --ink-2: #45516b;
  --ink-3: #76829a;
  --line: #e4e8f1;
  --line-2: #d5dbe8;

  --brand: #3b5bdb;
  --brand-600: #3150c8;
  --brand-700: #2a44ae;
  --brand-50: #eef2ff;
  --brand-100: #dfe6ff;

  --attack: #e03131;
  --attack-700: #c22727;
  --attack-50: #fff1f1;
  --attack-100: #ffdede;

  --safe: #0c9f72;
  --safe-700: #087f5b;
  --safe-50: #e8faf3;
  --safe-100: #c9f2e1;

  --amber: #e8890c;
  --amber-700: #a85f00;
  --amber-50: #fff6e6;

  --violet: #7048e8;
  --violet-700: #5a34c9;
  --violet-50: #f3efff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .05), 0 1px 1px rgba(14, 23, 38, .03);
  --shadow: 0 12px 32px -14px rgba(14, 23, 38, .16), 0 2px 6px rgba(14, 23, 38, .04);
  --shadow-lg: 0 32px 64px -28px rgba(14, 23, 38, .26), 0 6px 16px rgba(14, 23, 38, .05);

  --font: "Inter", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Arabic", "Noto Sans Tamil", "Noto Sans Thai", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", "Yu Gothic", "Malgun Gothic", "Noto Sans CJK SC", sans-serif;
  --font-display: "Inter Tight", "Inter", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Arabic", "Noto Sans Tamil", "Noto Sans Thai", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", "Yu Gothic", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Arabic", monospace;

  --nav-h: 64px;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: top .15s;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

.muted { color: var(--ink-3); font-weight: 400; }

/* ───────────── Buttons, pills, links ───────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn--sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn--sm svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(59, 91, 219, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn--primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); background: var(--brand-700); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface); }

.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-600);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.link:hover { text-decoration-color: currentColor; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13.5px;
  font-weight: 600;
}
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(59, 91, 219, .5);
  animation: ping 2.2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(59, 91, 219, .45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(59, 91, 219, 0); }
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tag--mono { font-family: var(--font-mono); font-weight: 500; font-size: 12px; }
.tag.is-on { background: var(--safe-50); color: var(--safe-700); }

/* ───────────── Navigation ───────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(14, 23, 38, .3); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand__name span { color: var(--brand); }

.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--surface); color: var(--ink); }
.nav__links a.is-current { color: var(--brand-700); background: var(--brand-50); }

.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav__toggle span { width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ───────────── Hero ───────────── */

.hero { padding: 56px 0 40px; position: relative; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "copy qr" "copy art";
  gap: 16px 40px;
  align-items: start;
}
.hero__copy { grid-area: copy; align-self: center; }

.hero h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.028em;
  font-weight: 700;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  background: linear-gradient(transparent 68%, var(--brand-100) 68%, var(--brand-100) 94%, transparent 94%);
}
.hero__lead {
  margin-top: 20px;
  max-width: 54ch;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  line-height: 1.62;
}

.attackline {
  margin-top: 26px;
  max-width: 520px;
  padding: 14px 16px 16px;
  border: 1px solid var(--attack-100);
  border-left: 4px solid var(--attack);
  border-radius: 14px;
  background: var(--attack-50);
}
.attackline__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attackline__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--attack-700);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}
.attackline__label i { width: 7px; height: 7px; border-radius: 50%; background: var(--attack); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.attackline__lang {
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--attack-100);
  color: var(--attack-700);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.attackline__text {
  margin-top: 8px;
  min-height: 2.9em;
  display: flex;
  align-items: center;
  font-size: clamp(1.12rem, 2.1vw, 1.38rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.005em;
  transition: opacity .32s, transform .32s;
}
.attackline__text[dir="rtl"] { justify-content: flex-start; }
.attackline__text.is-out { opacity: 0; transform: translateY(6px); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__visual { grid-area: art; position: relative; }
.hero-art { width: 100%; height: auto; overflow: visible; }

.hero-art .ring { fill: none; stroke: var(--brand); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 3.6s ease-out infinite; }
.hero-art .ring--2 { animation-delay: 1.8s; }
@keyframes ring {
  0% { opacity: .45; transform: scale(.8); }
  100% { opacity: 0; transform: scale(1.75); }
}

.hl { stroke: var(--line-2); stroke-width: 1.6; stroke-dasharray: 3 7; animation: flow 1.6s linear infinite; }
.hl--bad { stroke: var(--attack); stroke-width: 1.8; opacity: .75; }
.hl--out { stroke: var(--ink-3); }
@keyframes flow { to { stroke-dashoffset: -20; } }

.hdot { fill: var(--brand); opacity: .75; }
.hdot--bad { fill: var(--attack); opacity: 1; }
.hdot--out { animation: outdot 8s infinite; }
@keyframes outdot {
  0%, 46% { fill: var(--safe); }
  54%, 96% { fill: var(--attack); }
  100% { fill: var(--safe); }
}

.doc-t { font: 600 13px var(--font); fill: var(--ink); }
.doc-s { font: 500 11.5px var(--font); fill: var(--ink-2); }
.doc-s--bad { fill: var(--attack-700); font-weight: 600; }
.poison { fill: var(--attack-50); stroke: var(--attack); stroke-width: 1; stroke-dasharray: 3 3; animation: poison 2s ease-in-out infinite; }
@keyframes poison { 50% { fill: var(--attack-100); } }

.float { animation: float 6s ease-in-out infinite; }
.f2 { animation-delay: -1.2s; animation-duration: 7s; }
.f3 { animation-delay: -2.4s; animation-duration: 6.5s; }
.f4 { animation-delay: -3.1s; animation-duration: 7.4s; }
.f5 { animation-delay: -.6s; animation-duration: 5.6s; }
.f6 { animation-delay: -2s; animation-duration: 6.8s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.agent__stroke { stroke: var(--brand); animation: agentStroke 8s infinite; }
.agent__fill { fill: var(--brand); animation: agentFill 8s infinite; }
@keyframes agentStroke { 0%, 46% { stroke: var(--brand); } 54%, 96% { stroke: var(--attack); } 100% { stroke: var(--brand); } }
@keyframes agentFill { 0%, 46% { fill: var(--brand); } 54%, 96% { fill: var(--attack); } 100% { fill: var(--brand); } }
.agent__eyes { transform-box: fill-box; transform-origin: center; animation: eyes 4.2s infinite; }
@keyframes eyes { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.agent-label { font: 600 13px var(--font); fill: var(--ink-2); }

.out { animation: outSafe 8s infinite; }
.out--bad { animation-name: outBad; }
@keyframes outSafe { 0%, 46% { opacity: 1; } 54%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes outBad { 0%, 46% { opacity: 0; } 54%, 96% { opacity: 1; } 100% { opacity: 0; } }
.out-k { font: 600 9.5px var(--font-mono); letter-spacing: .08em; }
.out-k--safe { fill: var(--safe-700); }
.out-k--bad { fill: var(--attack-700); }
.out-v { font: 500 13px var(--font-mono); fill: var(--ink); }

.qrcard {
  grid-area: qr;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(130% 170% at 0% 0%, var(--brand-50), #fff 62%);
  box-shadow: var(--shadow);
}
.qrcard__img {
  flex: none;
  width: 132px;
  height: 132px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.qrcard__body { min-width: 0; }
.qrcard__title { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; letter-spacing: -.012em; line-height: 1.25; }
.qrcard__url { margin-top: 6px; color: var(--ink-2); font: 500 13px var(--font-mono); overflow-wrap: anywhere; }
.qrcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.facts > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.facts dd { margin-top: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }

/* ───────────── Sections ───────────── */

.section { padding: 96px 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }

.section__head { max-width: 760px; margin-bottom: 44px; }
.eyebrow {
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.section h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.022em;
  font-weight: 700;
  text-wrap: balance;
}
.lead { margin-top: 14px; color: var(--ink-2); font-size: 1.08rem; line-height: 1.62; }
.lead strong { color: var(--ink); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card__head h3 { font-size: 15px; font-weight: 600; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ───────────── Problem ───────────── */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.stepcard {
  position: relative;
  padding: 16px 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, border-color .2s;
}
.stepcard:nth-child(2) { transition-delay: .08s; }
.stepcard:nth-child(3) { transition-delay: .16s; }
.stepcard:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.stepart { width: 100%; height: auto; border-radius: 14px; }
.stepcard__n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 18px 8px 0;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 14px;
}
.stepcard--bad .stepcard__n { background: var(--attack-50); color: var(--attack-700); }
.stepcard h3 { margin: 10px 8px 0; font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.stepcard p { margin: 8px 8px 0; color: var(--ink-2); font-size: 15px; }

.art-t { font: 600 12.5px var(--font); fill: var(--ink); }
.art-s { font: 600 12px var(--font); fill: var(--ink-2); }
.art-m { font: 500 12.5px var(--font-mono); fill: var(--attack-700); }
.dash { animation: flow 1.2s linear infinite; }
.dash--rev { animation-direction: reverse; }
.stepart .poison { animation: poison 1.8s ease-in-out infinite; }

.callouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.callout--brand { border-color: var(--brand-100); background: linear-gradient(180deg, var(--brand-50), #fff 78%); }
.callout__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.callout__tag--bad { background: var(--attack-50); color: var(--attack-700); }
.callout h3 { margin-top: 14px; font-family: var(--font-display); font-size: 1.32rem; letter-spacing: -.015em; }
.callout p { margin: 8px 0 16px; color: var(--ink-2); font-size: 15.5px; }
.callout .link { margin-top: auto; }

/* ───────────── Demo ───────────── */

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.disclaimer svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ink-3); }

.demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.demo__controls { padding: 24px; }
.ctl-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px 36px; }
.ctl-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; }
.ctl__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14.5px;
  font-weight: 600;
}
.ctl__n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 12.5px;
  font-weight: 700;
}
.ctl__n--bad { background: var(--attack-50); color: var(--attack-700); }

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button svg { width: 16px; height: 16px; }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(14, 23, 38, .14); }
#defenseSeg button[data-def="filter"].is-on { color: var(--safe-700); }

.chipgroups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.chipgroup__label { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.chip:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.chip.is-on { border-color: var(--attack); background: var(--attack-50); color: var(--attack-700); font-weight: 600; }
.chip small { color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.chip.is-on small { color: var(--attack-700); opacity: .8; }

.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.tdot--high { background: var(--brand); }
.tdot--mid { background: var(--violet); }
.tdot--low { background: var(--amber); }
.tdot--variant { background: var(--ink); }

#payload {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 12px 14px;
  border: 1px solid var(--attack-100);
  border-radius: 12px;
  background: var(--attack-50);
  color: var(--ink);
  font: 500 15px/1.6 var(--font);
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
#payload:focus { outline: none; border-color: var(--attack); box-shadow: 0 0 0 3px rgba(224, 49, 49, .14); }

.preview { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); }
.preview__title { font-weight: 600; color: var(--ink); margin-right: 2px; }
.rulechip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-3);
  font: 500 11.5px var(--font-mono);
}
.rulechip::before { content: "○"; font-size: 10px; }
.rulechip.is-hit { border-color: var(--safe-100); background: var(--safe-50); color: var(--safe-700); }
.rulechip.is-hit::before { content: "●"; }
.preview__verdict { flex-basis: 100%; margin-top: 2px; font-weight: 600; }
.preview__verdict--flag { color: var(--safe-700); }
.preview__verdict--miss { color: var(--attack-700); }
.preview__verdict--none { color: var(--ink-3); }

.ctl__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pairing { color: var(--ink-3); font-size: 13.5px; }
.pairing b { color: var(--ink-2); font-weight: 600; }

.demo__stage { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; align-items: stretch; }

.scene-card { display: flex; flex-direction: column; }
.scene { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; max-height: 420px; padding: 10px 14px 0; overflow: visible; }

.wire { stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 8; transition: stroke .2s; }
.wire--bad { stroke: var(--attack-100); }
.wire.is-live { stroke: var(--brand); animation: flow .7s linear infinite; }
.wire.is-live.is-bad { stroke: var(--attack); }
.wire.is-live.is-ok { stroke: var(--safe); }

.node__box { fill: #fff; stroke: var(--line-2); stroke-width: 1.6; transition: stroke .25s, fill .25s; }
.node__label { font: 600 13px var(--font); fill: var(--ink-2); }
.node__glyph { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.node__line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; transition: stroke .25s; }
.node__ico { fill: var(--brand); transition: fill .25s; }

.node--user .node__box { fill: var(--brand-50); stroke: var(--brand); }
.node--agent .node__box { stroke: var(--brand); stroke-width: 2; }
.node--attacker .node__box { fill: var(--attack-50); stroke: var(--attack); stroke-dasharray: 4 4; }
.node--attacker .node__ico { fill: var(--attack); }
.node--attacker .node__label { fill: var(--attack-700); }

.node.is-active .node__box { stroke: var(--brand); stroke-width: 2.6; }
.node--attacker.is-active .node__box { stroke: var(--attack); stroke-dasharray: none; }
.node--agent.is-bad .node__box { stroke: var(--attack); fill: var(--attack-50); }
.node--agent.is-bad .node__ico { fill: var(--attack); }
.node--agent.is-bad .node__line { stroke: var(--attack); }
.node--agent.is-ok .node__box { stroke: var(--safe); fill: var(--safe-50); }
.node--agent.is-ok .node__ico { fill: var(--safe); }
.node--agent.is-ok .node__line { stroke: var(--safe); }
.node--tool.is-bad .node__box { stroke: var(--attack); stroke-width: 2.4; }
.node--tool.is-ok .node__box { stroke: var(--safe); stroke-width: 2.4; }

.badge circle { fill: var(--attack); }
.badge text { font: 700 11px var(--font); fill: #fff; }
.badge { opacity: 0; transition: opacity .3s; }
.badge.is-on { opacity: 1; }

.shield { opacity: 0; transition: opacity .3s; }
.shield.is-on { opacity: 1; }
.shield__ico { fill: var(--safe-50); stroke: var(--safe); stroke-width: 1.6; stroke-linejoin: round; }
.shield.is-scan circle { stroke: var(--safe); stroke-width: 2; animation: shieldPulse .9s ease-in-out infinite; }
.shield.is-fail circle { stroke: var(--attack); }
.shield.is-fail .shield__ico { fill: var(--attack-50); stroke: var(--attack); }
@keyframes shieldPulse { 50% { stroke-opacity: .25; } }

.packet { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.packet--bad { fill: var(--attack); }
.packet--ok { fill: var(--safe); }

.scene-status {
  margin: 4px 20px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background .2s, color .2s;
}
.scene-status.is-bad { background: var(--attack-50); color: var(--attack-700); }
.scene-status.is-ok { background: var(--safe-50); color: var(--safe-700); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px 20px 20px; margin-top: auto; }
.tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .25s, background .25s; }
.tile__k { display: block; color: var(--ink-3); font-size: 12px; font-weight: 500; line-height: 1.3; }
.tile__v { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile.is-bad { border-color: var(--attack); background: var(--attack-50); }
.tile.is-bad .tile__v { color: var(--attack-700); }
.tile.is-ok { border-color: var(--safe); background: var(--safe-50); }
.tile.is-ok .tile__v { color: var(--safe-700); }
.tile.is-bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.045); } }

.trace-card { display: flex; flex-direction: column; height: 680px; }
.trace-card .outcome { flex: none; }
.trace {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.trace__empty {
  margin: auto;
  max-width: 250px;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}
.trace__empty svg { width: 44px; height: 44px; opacity: .6; }

.step { display: grid; gap: 5px; animation: stepIn .36s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } }
.step__tag {
  justify-self: start;
  color: var(--ink-3);
  font: 600 10.5px var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.step__body {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.5;
  min-width: 0;
}

.step--user { justify-items: end; }
.step--user .step__tag { justify-self: end; color: var(--brand-600); }
.step--user .step__body { max-width: 88%; border-color: var(--brand); background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }

.step--agent .step__tag { color: var(--brand-600); }
.step--agent .step__body { max-width: 88%; background: var(--surface); border-bottom-left-radius: 5px; }

.step--call .step__body,
.step--ret .step__body {
  font: 500 12.5px/1.55 var(--font-mono);
  background: #0e1726;
  border-color: #0e1726;
  color: #dbe3f4;
  overflow-wrap: anywhere;
}
.step--call .fn { color: #9db4ff; }
.step--call .str { color: #9be3c3; }
.step--call .num { color: #ffd08a; }
.step--call.is-bad .step__tag { color: var(--attack-700); }
.step--call.is-bad .step__body { background: #3a1014; border-color: var(--attack); box-shadow: 0 0 0 3px rgba(224, 49, 49, .14); }
.step--call.is-bad .fn { color: #ffb0b0; }
.step--ret .step__body { background: var(--surface); border-color: var(--line); color: var(--ink-2); }

.step--attacker .step__tag { color: var(--attack-700); }
.step--attacker .step__body { border-style: dashed; border-color: var(--attack); background: var(--attack-50); color: var(--ink); font-size: 14px; }

.step--note .step__body { border-style: dashed; background: transparent; color: var(--ink-3); font-size: 13.5px; }

.step--result .step__body { padding: 8px; background: var(--surface); }
.mail { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail + .mail { margin-top: 6px; }
.mail__from { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-weight: 600; font-size: 13.5px; }
.mail__from span { color: var(--ink-3); font: 400 11.5px var(--font-mono); overflow-wrap: anywhere; }
.mail__subj { font-size: 13.5px; color: var(--ink); }
.mail__body { margin-top: 3px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.mail--bad { border-color: var(--attack-100); }
.mail--bad.is-struck { opacity: .55; }
.mail--bad.is-struck .mail__body,
.mail--bad.is-struck .mail__subj { text-decoration: line-through; text-decoration-color: var(--attack); }

.views { display: inline-flex; gap: 2px; margin: 8px 0 6px; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.views button { padding: 4px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.views button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(14, 23, 38, .14); }

.hidden-ink {
  display: block;
  margin-top: 6px;
  padding: 7px 9px;
  border-radius: 8px;
  font-weight: 500;
  transition: color .45s, background .45s, border-color .45s;
  border: 1px dashed var(--attack);
  background: var(--attack-50);
  color: var(--attack-700);
  overflow-wrap: anywhere;
}
.mail[data-view="human"] .hidden-ink { color: transparent; background: #fff; border-color: var(--line-2); user-select: none; position: relative; }
.mail[data-view="human"] .hidden-ink::after {
  content: "white text on a white background: Priya sees nothing here";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--ink-3);
  font: 500 11.5px/1.3 var(--font);
  text-align: center;
  direction: ltr;
}

.scan__title { font-weight: 600; font-size: 14px; }
.rules { display: grid; gap: 5px; margin-top: 8px; }
.rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface);
  font: 500 12px var(--font-mono);
  color: var(--ink-2);
  animation: stepIn .3s both;
}
.rule b { font-weight: 600; font-size: 11px; white-space: nowrap; }
.rule.is-hit { background: var(--safe-50); color: var(--safe-700); }
.rule.is-miss b { color: var(--ink-3); }
.verdict { margin-top: 9px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 600; animation: stepIn .3s both; }
.verdict--flag { background: var(--safe-50); color: var(--safe-700); }
.verdict--miss { background: var(--attack-50); color: var(--attack-700); }
.step--defense .step__tag { color: var(--safe-700); }

.outcome { margin: 4px 16px 16px; padding: 16px 18px; border: 1px solid; border-radius: 16px; animation: stepIn .4s both; }
.outcome--bad { border-color: var(--attack); background: var(--attack-50); }
.outcome--ok { border-color: var(--safe); background: var(--safe-50); }
.outcome--neutral { border-color: var(--line-2); background: var(--surface); }
.outcome__title { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; }
.outcome--bad .outcome__title { color: var(--attack-700); }
.outcome--ok .outcome__title { color: var(--safe-700); }
.outcome__title svg { width: 22px; height: 22px; flex: none; }
.outcome p { margin-top: 5px; color: var(--ink); font-size: 14.5px; }
.outcome__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ochip { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ochip--bad { border-color: var(--attack); color: var(--attack-700); }
.ochip--ok { border-color: var(--safe); color: var(--safe-700); }
.outcome__next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(14, 23, 38, .1); font-size: 14px; color: var(--ink-2); }
.outcome__next .btn { background: #fff; }

.demo__after { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }

.explored__note { padding: 14px 20px 0; color: var(--ink-3); font-size: 13.5px; }
.xscroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 12px 20px 8px; }
.xtable {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: 124px 34px 34px;
  grid-template-columns: 112px;
  grid-auto-columns: minmax(30px, 1fr);
  gap: 5px 4px;
  min-width: 900px;
}
.xtable__h {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-right: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}
.xtable__h:first-child { align-items: flex-end; padding-bottom: 6px; color: var(--ink-3); font-size: 12px; }
.xtable__lang {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  justify-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding-top: 6px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.xcell {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px dashed var(--line-2);
  border-radius: 9px;
  background: #fff;
  color: var(--line-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.xcell:hover { border-color: var(--ink-3); color: var(--ink-3); transform: translateY(-1px); }
.xcell.is-bad { border: 1px solid var(--attack); background: var(--attack-50); color: var(--attack-700); }
.xcell.is-ok { border: 1px solid var(--safe); background: var(--safe-50); color: var(--safe-700); }
.xcell.is-pop { animation: bump .4s; }
.xcell.is-current { box-shadow: 0 0 0 3px var(--brand-100); }

.explored__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 20px 18px; color: var(--ink-3); font-size: 12.5px; }
.explored__legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.dot--bad { background: var(--attack); }
.dot--ok { background: var(--safe); }
.dot--none { border: 1px dashed var(--ink-3); }

.takeaway { padding: 8px 4px; }
.takeaway h3 { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.015em; line-height: 1.2; }
.takeaway ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin-top: 18px; }
.takeaway li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15.5px; }
.takeaway li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 2px; border-radius: 2px; background: var(--brand); }
.takeaway li strong { color: var(--ink); }
.takeaway__end { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: 15px; }

/* ───────────── Languages ───────────── */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.filter:hover { border-color: var(--ink-3); color: var(--ink); }
.filter.is-on { border-color: var(--ink); background: var(--ink); color: #fff; }

.langgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; }
.langcard {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s, opacity .25s;
  animation: stepIn .4s both;
}
.langcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.langcard.is-hidden { display: none; }
.langcard__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.tier { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.tier--high { background: var(--brand-50); color: var(--brand-700); }
.tier--mid { background: var(--violet-50); color: var(--violet-700); }
.tier--low { background: var(--amber-50); color: var(--amber-700); }
.tier--variant { background: var(--surface-2); color: var(--ink); }
.langcard__script { color: var(--ink-3); font-size: 12px; }
.langcard__native { margin-top: 14px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.langcard__name { color: var(--ink-3); font-size: 13.5px; }
.langcard__phrase {
  margin: 16px 0 16px;
  padding: 11px 13px;
  border-left: 3px solid var(--attack);
  border-radius: 4px 10px 10px 4px;
  background: var(--attack-50);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}
.langcard__phrase[dir="rtl"] { border-left: 0; border-right: 3px solid var(--attack); border-radius: 10px 4px 4px 10px; }
.langcard__try {
  margin-top: auto;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-600);
  font-size: 14px;
  font-weight: 600;
}
.langcard__try:hover { text-decoration: underline; text-underline-offset: 3px; }

.footnote { margin-top: 22px; max-width: 760px; color: var(--ink-3); font-size: 14px; }

/* ───────────── Defenses ───────────── */

.defgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.defcard {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, border-color .2s;
}
.defcard:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.defcard:nth-child(3n + 2) { transition-delay: .07s; }
.defcard:nth-child(3n) { transition-delay: .14s; }
.defcard__top { display: flex; align-items: center; justify-content: space-between; }
.deficon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--brand-50); color: var(--brand); }
.deficon svg { width: 22px; height: 22px; }
.kind { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.kind--system { background: var(--brand-50); color: var(--brand-700); }
.kind--prompt { background: var(--violet-50); color: var(--violet-700); }
.kind--detect { background: var(--safe-50); color: var(--safe-700); }
.defcard h3 { margin-top: 18px; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.015em; }
.defcard > p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.defcard__q { margin: 16px 0 16px !important; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--ink) !important; font-size: 14.5px !important; font-weight: 500; }
.defcard__q span { display: block; margin-bottom: 3px; color: var(--brand-600); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.defcard .link { margin-top: auto; align-self: flex-start; }

/* ───────────── Method ───────────── */

.pipeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pipeline::before {
  content: "";
  position: absolute;
  left: 22px;
  right: calc(25% - 36px);
  top: 21px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0 50%, transparent 50% 100%) 0 0 / 12px 2px repeat-x;
  opacity: .4;
  animation: march 1s linear infinite;
}
@keyframes march { to { background-position: 12px 0; } }
.pstep { position: relative; transition-delay: calc(var(--i, 0) * .09s); }
.pstep:nth-child(2) { --i: 1; }
.pstep:nth-child(3) { --i: 2; }
.pstep:nth-child(4) { --i: 3; }
.pstep__n {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--brand);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-700);
  font: 700 13.5px var(--font-mono);
}
.pstep h3 { margin-top: 16px; font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.pstep p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

.method-split { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; margin-top: 56px; }
.subhead { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.25; }
.metrics, .mismatch { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.metric { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; }
.metric__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); color: var(--brand); }
.metric__ico--bad { background: var(--attack-50); color: var(--attack); }
.metric__ico--ok { background: var(--safe-50); color: var(--safe); }
.metric__ico svg { width: 21px; height: 21px; }
.metric h4 { font-size: 1rem; font-weight: 600; }
.metric p { margin-top: 2px; color: var(--ink-2); font-size: 14.5px; }

.mismatch__lead { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; }
.mgrid { display: grid; grid-template-columns: 84px repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.mgrid__corner { display: grid; align-content: center; gap: 2px; color: var(--ink-3); font-size: 11px; line-height: 1.25; }
.mgrid__corner b { font-weight: 600; }
.mgrid__h { display: grid; place-items: center; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-align: center; }
.mgrid__h--row { justify-items: start; text-align: left; }
.mcell {
  height: 56px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.mcell:hover { transform: translateY(-2px); }
.mcell--covered { background: var(--brand); color: #fff; font-size: 12.5px; }
.mcell--same { background: var(--violet-50); color: var(--violet-700); border-color: #dcd2ff; }
.mcell--mismatch { background: var(--amber-50); color: var(--amber-700); border-color: #ffe2ad; }
.mcell.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.mnote { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; min-height: 92px; }
.mnote strong { display: block; margin-bottom: 2px; color: var(--ink); }

/* ───────────── Deliverables ───────────── */

.deliver { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 24px; align-items: start; }
.dlist { display: grid; gap: 12px; }
.ditem {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.ditem__n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.ditem h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }
.ditem p { margin-top: 3px; color: var(--ink-2); font-size: 15px; }

.glance { position: sticky; top: calc(var(--nav-h) + 20px); padding: 26px; border-radius: var(--radius-lg); background: var(--ink); color: #fff; }
.glance h3 { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.015em; }
.glance dl { display: grid; gap: 16px; margin-top: 18px; }
.glance dt { color: #9aa7c2; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.glance dd { margin-top: 3px; color: #f1f4fb; font-size: 15px; line-height: 1.5; }
.glance .link { color: #b9c8ff; font-size: 15px; }

/* ───────────── Architecture ───────────── */

.arch { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; align-items: stretch; }

.arch__flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.arch__flow::before {
  content: "";
  position: absolute;
  left: 47px;
  top: 60px;
  bottom: 44px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0 50%, transparent 50% 100%) 0 0 / 2px 10px repeat-y;
  opacity: .5;
  animation: marchY 1s linear infinite;
}
.arch__legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--ink-3); font-size: 12.5px; }

.anode,
.alayer { position: relative; z-index: 1; }
.anode {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 13px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.anode__ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.anode__ico svg { width: 17px; height: 17px; }
.anode small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.anode--untrusted { border-color: var(--attack); background: var(--attack-50); }
.anode--untrusted .anode__ico { background: #fff; color: var(--attack); }
.anode--untrusted small { color: var(--attack-700); }

.alayer {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.alayer:hover { border-color: var(--ink-3); transform: translateX(3px); }
.alayer.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.alayer__n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, color .15s;
}
.alayer.is-on .alayer__n { background: var(--brand); color: #fff; }
.alayer__t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.alayer__t small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.alayer__e { display: grid; justify-items: end; gap: 4px; color: var(--ink-3); font-size: 11px; font-weight: 600; }

.expo { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.expo i { width: 6px; border-radius: 2px; background: var(--line-2); }
.expo i:nth-child(1) { height: 8px; }
.expo i:nth-child(2) { height: 13px; }
.expo i:nth-child(3) { height: 18px; }
.expo--1 i:nth-child(1),
.expo--2 i:nth-child(-n + 2) { background: var(--amber); }
.expo--3 i { background: var(--attack); }
.tone-0 { color: var(--safe-700); }
.tone-1, .tone-2 { color: var(--amber-700); }
.tone-3 { color: var(--attack-700); }

.arch__detail { padding: 26px 28px; }
.adetail { animation: stepIn .35s cubic-bezier(.2, .7, .2, 1) both; }
.adetail__head { display: flex; align-items: center; gap: 14px; }
.adetail__n { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff; font: 700 1.25rem var(--font-display); }
.adetail__head h3 { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.018em; line-height: 1.2; }
.adetail__head p { color: var(--ink-3); font-size: 14px; }
.adetail__how { margin-top: 16px; color: var(--ink-2); font-size: 15.5px; }
.adetail h4 { margin: 20px 0 9px; color: var(--brand-600); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.uselist { display: grid; gap: 7px; }
.uselist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
}
.uselist li.is-tested { border-color: var(--brand-100); background: linear-gradient(90deg, var(--brand-50), #fff 70%); }
.uselist li span { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.adetail__expo { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--amber-50); }
.adetail__expo--0 { background: var(--safe-50); }
.adetail__expo--3 { background: var(--attack-50); }
.adetail__expo div { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.adetail__expo p { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; }
.adetail__cost { margin-top: 14px; color: var(--ink-2); font-size: 14.5px; }
.adetail__cost b { color: var(--ink); font-weight: 600; }

.codecard { margin-top: 20px; border-radius: var(--radius-lg); background: #0e1726; color: #dbe3f4; box-shadow: var(--shadow); overflow: hidden; }
.codecard__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px 22px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.codecard__head h3 { color: #fff; font-size: 15px; font-weight: 600; }
.codecard .tag { background: rgba(255, 255, 255, .1); color: #c6d0e6; }
.code { margin: 0; padding: 14px 0; overflow-x: auto; font: 500 13px/1.8 var(--font-mono); tab-size: 4; }
.cl { display: flex; min-width: max-content; min-height: 1.8em; border-left: 3px solid transparent; white-space: pre; opacity: .5; transition: opacity .2s, background .2s, border-color .2s; }
.cl[data-layer="0"] { opacity: .78; }
.cl:not([data-layer="0"]) { cursor: pointer; }
.cl:not([data-layer="0"]):hover { opacity: .9; }
.cl.is-on { opacity: 1; border-left-color: #8fa4ff; background: rgba(89, 118, 240, .24); }
.cl__g { flex: none; width: 40px; padding-right: 12px; color: #6f7ea3; text-align: right; user-select: none; }
.cl.is-on .cl__g { color: #c3ceff; }
.cl__c { padding-right: 22px; }
.cl .kw { color: #c9a6ff; }
.cl .cm { color: #8492b4; }
.cl.is-on .cm { color: #b9c5e6; }
.codecard__note { padding: 14px 22px 18px; border-top: 1px solid rgba(255, 255, 255, .09); color: #9aa7c2; font-size: 13.5px; line-height: 1.6; }

.lessons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.lesson { padding: 24px 26px; border: 1px solid; border-radius: var(--radius-lg); }
.lesson--warn { border-color: #ffe2ad; background: var(--amber-50); }
.lesson--ok { border-color: var(--safe-100); background: var(--safe-50); }
.lesson__tags { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.lesson--warn .lesson__tags { color: var(--amber-700); }
.lesson--ok .lesson__tags { color: var(--safe-700); }
.lesson__tags span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #fff; font-size: 12.5px; }
.lesson h3 { margin-top: 12px; font-family: var(--font-display); font-size: 1.28rem; letter-spacing: -.015em; line-height: 1.25; }
.lesson p:last-child { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.lessons__end { grid-column: 1 / -1; padding: 16px 20px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); font-size: 15px; font-weight: 600; }

/* ───────────── Footer ───────────── */

.footer { padding: 44px 0 56px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); gap: 40px; }
.footer__note { margin-top: 14px; max-width: 64ch; color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }
.footer__links { display: grid; gap: 10px; align-content: start; justify-items: start; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.footer__links a:hover { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }

/* ───────────── Responsive ───────────── */

@media (max-width: 1040px) {
  .nav__links a { padding: 8px 9px; font-size: 14px; }
  .defgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .defcard:nth-child(n) { transition-delay: 0s; }
  .ctl-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 2px;
    padding: 10px 16px 16px;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(14, 23, 38, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 12px; font-size: 16px; }
  .nav__actions { margin-left: auto; }
}

@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .section { padding: 72px 0; }

  .hero { padding-top: 20px; }
  .hero__grid { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "qr" "copy" "art"; gap: 24px; }
  .qrcard__img { width: 108px; height: 108px; }
  .hero__visual { max-width: 520px; margin-inline: auto; width: 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .steps { grid-template-columns: 1fr; }
  .stepcard { display: grid; grid-template-columns: 180px minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 14px; }
  .stepart { grid-row: 1 / span 3; }
  .stepcard__n { margin-top: 4px; }
  .callouts { grid-template-columns: 1fr; }

  .demo__stage, .demo__after, .method-split, .deliver { grid-template-columns: minmax(0, 1fr); }
  .trace-card { height: 620px; }
  .scene { flex: none; max-height: none; }
  .pipeline { grid-template-columns: 1fr; gap: 26px; }
  .pipeline::before { display: none; }
  .pstep { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; }
  .pstep:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 50px; bottom: -20px; width: 2px; opacity: .4; background: linear-gradient(180deg, var(--brand) 0 50%, transparent 50% 100%) 0 0 / 2px 12px repeat-y; animation: marchY 1s linear infinite; }
  .pstep__n { grid-row: 1 / span 2; }
  .pstep h3 { margin-top: 2px; }
  .glance { position: static; }
  .takeaway ul { grid-template-columns: 1fr; }
  .arch, .lessons { grid-template-columns: minmax(0, 1fr); }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}
@keyframes marchY { to { background-position: 0 12px; } }

@media (max-width: 620px) {
  .container { padding-inline: 16px; }
  .section { padding: 60px 0; }
  .section__head { margin-bottom: 32px; }
  .nav__actions .btn { display: none; }

  .hero__cta .btn { flex: 1 1 100%; }
  .qrcard { gap: 14px; padding: 12px 14px 12px 12px; border-radius: 18px; }
  .qrcard__img { width: 92px; height: 92px; padding: 4px; border-radius: 11px; }
  .qrcard__title { font-size: 1rem; }
  .qrcard__url { display: none; }
  .qrcard__actions { margin-top: 10px; }
  .chipgroup .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .chipgroup .chips::-webkit-scrollbar { display: none; }
  .facts > div { padding: 16px; }
  .facts dt { font-size: 1.6rem; }
  .facts dd { font-size: 13px; }

  .stepcard { grid-template-columns: 1fr; padding: 14px 14px 20px; }
  .stepart { grid-row: auto; }
  .stepcard__n { margin-top: 16px; }
  .callout { padding: 22px 20px; }

  .demo__controls { padding: 18px 16px; }
  .seg { display: flex; }
  .seg button { flex: 1 1 auto; justify-content: center; padding: 9px 10px; }
  .ctl__actions .btn--primary { flex: 1 1 auto; }
  .card__head { padding: 14px 16px; }
  .scene { padding: 8px 6px 0; }
  .scene-status { margin-inline: 14px; }
  .tiles { padding: 12px 14px 16px; gap: 8px; }
  .tile { padding: 10px; }
  .tile__k { font-size: 11px; }
  .tile__v { font-size: 1.02rem; }
  .trace-card { height: min(600px, 82vh); }
  .trace { padding: 14px 12px 16px; }
  .outcome { margin: 0 12px 12px; padding: 14px; }
  .xscroll { padding-inline: 14px; }
  .explored__note, .explored__legend { padding-inline: 14px; }

  .langgrid { display: flex; gap: 12px; overflow-x: auto; margin-inline: -16px; padding: 4px 16px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .langgrid::-webkit-scrollbar { display: none; }
  .langcard { flex: 0 0 78%; scroll-snap-align: center; }
  .arch__flow { padding: 14px 14px 16px; }
  .arch__flow::before { left: 41px; }
  .arch__detail { padding: 22px 18px; }
  .alayer__e span:last-child { display: none; }
  .code { font-size: 12px; }
  .lesson { padding: 20px; }
  .defgrid { grid-template-columns: 1fr; }
  .metrics, .mismatch { padding: 22px 18px; }
  .mgrid { grid-template-columns: 62px repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mcell { height: 50px; }
  .ditem { padding: 16px; gap: 12px; }
}

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

@media print {
  .nav, .hero__cta, .demo__controls, .qrcard__actions { display: none; }
  .reveal { opacity: 1; transform: none; }
  .section { padding: 32px 0; }
}
