@charset "UTF-8";

:root {
  --ink-0: #07040f;
  --ink-1: #0d0719;
  --ink-2: #140c26;
  --ink-3: #1d1335;
  --line: rgba(168, 139, 250, 0.16);
  --line-soft: rgba(168, 139, 250, 0.09);

  --purple: #8b5cf6;
  --purple-bright: #a855f7;
  --purple-light: #c084fc;
  --magenta: #c026d3;
  --indigo: #4f46e5;

  --text: #ece9f8;
  --muted: #a398c9;
  --dim: #7a6f9e;

  --red-team: #e8468a;
  --blue-team: #4d8df6;

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 28px 60px rgba(4, 2, 12, 0.6);
  --glow: 0 0 40px rgba(139, 92, 246, 0.35);

  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink-1);
  color: var(--text);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.4rem); }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--purple-bright); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Ambient background ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(139, 92, 246, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 75%);
}
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.orb-1 { width: 560px; height: 560px; top: -220px; left: -120px; background: #6d28d9; }
.orb-2 { width: 460px; height: 460px; top: 18%; right: -180px; background: var(--magenta); opacity: .3; }
.orb-3 { width: 520px; height: 520px; bottom: -200px; left: 25%; background: var(--indigo); opacity: .32; }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--purple-light);
  padding: .42rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, .09);
  margin-bottom: 1.3rem;
}
.eyebrow .ping {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  70%  { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.14; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(100deg, var(--purple-light), var(--magenta) 55%, #818cf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-weight: 600; font-size: .97rem;
  padding: .92rem 1.7rem; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--purple-bright), var(--indigo)); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 52px rgba(168, 85, 247, .55); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--purple); background: rgba(139, 92, 246, .12); transform: translateY(-2px); }
.btn-sm { padding: .58rem 1.15rem; font-size: .9rem; }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-more { margin-top: 2rem; }

/* Homepage: stacked sections share one gap instead of doubling top + bottom padding */
.home .hero { padding-bottom: clamp(2rem, 4vw, 3rem); }
.home .section { padding: clamp(1.75rem, 3.5vw, 3.25rem) 0; }
.home .ticker + .section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.home .section:last-of-type { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.home .section-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.home .section-more { margin-top: 1.5rem; }
.section-head h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); margin-bottom: .85rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13, 7, 25, .78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 1.6rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.16rem; letter-spacing: -.02em; }
.brand-name span { color: var(--purple-light); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 1.9rem; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; position: relative; transition: color .15s ease; white-space: nowrap; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -7px; height: 2px; width: 0; border-radius: 2px; background: var(--purple-bright); transition: width .2s ease; }
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; border-radius: 2px; background: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.2rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); margin-bottom: 1.25rem; }
.hero-lead { color: var(--muted); font-size: clamp(1.03rem, 1.5vw, 1.16rem); max-width: 36rem; margin-bottom: 2rem; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.8rem; font-size: .88rem; color: var(--dim); }
.hero-meta li { display: flex; align-items: center; gap: .5rem; }
.hero-meta b { color: var(--text); font-family: var(--display); font-size: 1.15rem; }

/* Terminal card */
.terminal {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(29, 19, 53, .96), rgba(10, 6, 20, .96));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, .025); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.tb-r { background: #ff5f57; } .tb-y { background: #febc2e; } .tb-g { background: #28c840; }
.terminal-bar small { margin-left: auto; font-family: var(--mono); font-size: .74rem; color: var(--dim); letter-spacing: .06em; }
.terminal-body { padding: 1.4rem 1.3rem; font-family: var(--mono); font-size: .86rem; line-height: 2; }
.terminal-body .ln { display: flex; gap: .7rem; }
.terminal-body .pr { color: var(--purple-light); }
.terminal-body .cm { color: var(--dim); }
.terminal-body .ok { color: #4ade80; }
.terminal-body .warn { color: #fbbf24; }
.terminal-body .crit { color: #fb7185; }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--purple-light); vertical-align: -2px; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---------- Ticker ---------- */
.ticker {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(139, 92, 246, .055);
  overflow: hidden;
  padding: .85rem 0;
}
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: slide 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track li { display: flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.ticker-track li b { color: var(--purple-light); font-weight: 500; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Cards grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }

.card {
  position: relative;
  padding: 1.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--line); background: linear-gradient(165deg, rgba(139, 92, 246, .11), rgba(255, 255, 255, .02)); }
.card-ic {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 13px; font-size: 1.3rem; margin-bottom: 1.1rem;
  background: rgba(139, 92, 246, .14); border: 1px solid var(--line);
}
.card h3 { font-size: 1.14rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; }

/* ---------- Blog cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  transition: transform .22s ease, border-color .22s ease;
}
.post:hover { transform: translateY(-6px); border-color: var(--purple); }
.post-cover { height: 7px; background: linear-gradient(90deg, var(--magenta), var(--purple-bright), var(--indigo)); }
.post-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .26rem .6rem; border-radius: 6px;
  color: var(--purple-light); background: rgba(139, 92, 246, .13); border: 1px solid var(--line);
}
.tag-red { color: #f9a8d4; background: rgba(232, 70, 138, .14); border-color: rgba(232, 70, 138, .3); }
.tag-blue { color: #93c5fd; background: rgba(77, 141, 246, .14); border-color: rgba(77, 141, 246, .3); }
.post h3 { font-size: 1.18rem; margin-bottom: .6rem; }
.post p { color: var(--muted); font-size: .94rem; flex: 1; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; font-size: .82rem; color: var(--dim); font-family: var(--mono); }
.read-more { color: var(--purple-light); font-family: var(--body); font-weight: 600; font-size: .9rem; }
.post:hover .read-more { text-decoration: underline; }

/* ---------- Purple team split ---------- */
.split {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6rem; align-items: stretch;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(232, 70, 138, .08), rgba(139, 92, 246, .1) 50%, rgba(77, 141, 246, .08));
}
.split-col h3 { font-size: 1.12rem; margin-bottom: .7rem; display: flex; align-items: center; gap: .6rem; }
.split-col h3 i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.split-col.red h3 i { background: var(--red-team); box-shadow: 0 0 12px var(--red-team); }
.split-col.blue h3 i { background: var(--blue-team); box-shadow: 0 0 12px var(--blue-team); }
.split-col ul { display: grid; gap: .55rem; }
.split-col li { color: var(--muted); font-size: .94rem; padding-left: 1.3rem; position: relative; }
.split-col li::before { content: "\25B8 "; position: absolute; left: 0; color: var(--purple-light); }
.split-mid { display: grid; place-items: center; }
.split-mid span {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--magenta), var(--indigo)); color: #fff; box-shadow: var(--glow);
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.step { padding: 1.7rem; border-radius: var(--radius); border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .025); }
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--purple-light); letter-spacing: .12em; margin-bottom: .9rem; display: block; }
.step h3 { font-size: 1.05rem; margin-bottom: .45rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* ---------- Newsletter ---------- */
.subscribe {
  padding: clamp(2.4rem, 5vw, 4rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(168, 85, 247, .22), transparent 62%),
    linear-gradient(160deg, var(--ink-3), var(--ink-0));
  text-align: center;
  box-shadow: var(--shadow);
}
.subscribe h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: .8rem; }
.subscribe p { color: var(--muted); max-width: 34rem; margin: 0 auto 2rem; }
.sub-form { display: flex; gap: .7rem; max-width: 480px; margin: 0 auto; }
.sub-form input {
  flex: 1; font-family: var(--body); font-size: .97rem; color: var(--text);
  padding: .9rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(7, 4, 15, .7);
}
.sub-form input::placeholder { color: var(--dim); }
.sub-form input:focus { outline: none; border-color: var(--purple-bright); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.sub-note { margin-top: 1rem; font-size: .83rem; color: var(--dim); }
.form-msg { margin-top: 1rem; font-size: .92rem; color: var(--purple-light); min-height: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: rgba(7, 4, 15, .6); padding: 3.2rem 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.4rem; padding-bottom: 2.4rem; border-bottom: 1px solid var(--line-soft); }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: .9rem; max-width: 26rem; }
.footer-col h4 { font-size: .82rem; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: var(--muted); font-size: .93rem; }
.footer-col a:hover { color: var(--purple-light); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-top: 1.6rem; font-size: .84rem; color: var(--dim); }

/* ---------- Article page ---------- */
.article { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.article-inner { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.1rem; font-family: var(--mono); font-size: .83rem; color: var(--dim); margin-bottom: 2.2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line-soft); }
.article-body h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.6rem 0 .9rem; }
.article-body h3 { font-size: 1.14rem; margin: 1.9rem 0 .6rem; }
.article-body p { color: var(--muted); margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { display: grid; gap: .6rem; margin: 0 0 1.4rem; }
.article-body li { color: var(--muted); padding-left: 1.5rem; position: relative; }
.article-body ul li::before { content: "\25B8 "; position: absolute; left: 0; color: var(--purple-light); }
.article-body ol { counter-reset: n; }
.article-body ol li { counter-increment: n; }
.article-body ol li::before { content: counter(n) "."; position: absolute; left: 0; color: var(--purple-light); font-family: var(--mono); font-size: .85rem; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--purple-light); text-decoration: underline; text-underline-offset: 3px; }
.callout {
  padding: 1.3rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--line); border-left: 3px solid var(--purple-bright);
  background: rgba(139, 92, 246, .08); margin: 1.8rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--purple-light); }
.figure { margin: 2rem 0; text-align: center; }
.figure img { max-width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); }
.figure figcaption { font-size: .86rem; color: var(--dim); margin-top: .9rem; max-width: 34rem; margin-inline: auto; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.6rem; }
.back-link:hover { color: var(--purple-light); }

/* ---------- Blog index ---------- */
.page-head { padding: clamp(2.6rem, 6vw, 4.5rem) 0 1rem; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: .9rem; }
.page-head p { color: var(--muted); max-width: 42rem; font-size: 1.05rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.filter-row button {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: .45rem 1rem; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.filter-row button:hover { color: var(--text); border-color: var(--line); }
.filter-row button[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, var(--purple-bright), var(--indigo)); border-color: transparent; }
.post.is-hidden { display: none; }
.no-results { color: var(--muted); padding: 2rem 0; }

/* ---------- Developers page ---------- */
.main-nav a.nav-dev { color: var(--purple-light); font-weight: 600; }
.main-nav a.nav-dev:hover { color: #fff; }

.dev-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.dev-hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.dev-hero-inner > *, .example-pair > * { min-width: 0; }
.dev-hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); margin-bottom: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.chips li { font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--muted); padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); }

.code-card { border-radius: var(--radius); border: 1px solid var(--line); background: rgba(7, 4, 15, .86); overflow: hidden; box-shadow: var(--shadow); }
.code-card + .code-card { margin-top: 1rem; }
.code-head { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.code-head .badge { padding: .18rem .55rem; border-radius: 6px; font-weight: 500; }
.badge-bad { color: #fda4af; background: rgba(251, 113, 133, .12); border: 1px solid rgba(251, 113, 133, .3); }
.badge-good { color: #86efac; background: rgba(74, 222, 128, .11); border: 1px solid rgba(74, 222, 128, .28); }
pre.code { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--mono); font-size: .8rem; line-height: 1.75; color: #d9d3f2; tab-size: 2; }
pre.code code { font-family: inherit; }
.tk-c { color: #6f6597; }
.tk-s { color: #86efac; }
.tk-k { color: #c4b5fd; }
.tk-n { color: #fcd34d; }
.example { margin-bottom: 3rem; }
.example h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.example > p { color: var(--muted); margin-bottom: 1.1rem; max-width: 46rem; }
.example-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.example-pair .code-card + .code-card { margin-top: 0; }

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.stage { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .03); transition: border-color .2s ease, transform .2s ease; }
.stage:hover { border-color: var(--line); transform: translateY(-4px); }
.stage-n { font-family: var(--mono); font-size: .72rem; color: var(--purple-light); letter-spacing: .14em; }
.stage h3 { font-size: 1.05rem; margin: .4rem 0 .7rem; }
.stage ul { display: grid; gap: .45rem; }
.stage li { font-size: .88rem; color: var(--muted); padding-left: 1rem; position: relative; }
.stage li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--purple-bright); }

.risk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.risk { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line-soft); background: linear-gradient(165deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); display: grid; gap: .75rem; }
.risk h3 { font-size: 1.08rem; display: flex; align-items: center; gap: .65rem; }
.risk h3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 12px var(--magenta); flex-shrink: 0; }
.risk p { color: var(--muted); font-size: .92rem; }
.risk .lbl { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--purple-light); margin-bottom: .1rem; }
.risk .fix .lbl { color: #86efac; }
.note { font-size: .88rem; color: var(--dim); margin-top: 1.4rem; max-width: 46rem; }

.acc { display: grid; gap: .8rem; }
.acc details { border-radius: var(--radius); border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .03); transition: border-color .2s ease, background .2s ease; }
.acc details[open] { border-color: rgba(168, 85, 247, .4); background: rgba(139, 92, 246, .07); }
.acc summary { position: relative; padding: 1.15rem 3.2rem 1.15rem 1.4rem; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: 1.04rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--purple-light); }
.acc details[open] summary::after { content: "\2212"; }
.acc-body { padding: 0 1.4rem 1.4rem; }
.acc-body ul { display: grid; gap: .6rem; }
.acc-body li { position: relative; padding-left: 1.4rem; color: var(--muted); font-size: .95rem; }
.acc-body li::before { content: "\25B8 "; position: absolute; left: 0; color: var(--purple-light); }
.acc-body li strong, .acc-body li code { color: var(--text); }
code.inline, .acc-body code, .card code, .step code, .article-body code { font-family: var(--mono); font-size: .86em; padding: .1em .38em; border-radius: 5px; background: rgba(139, 92, 246, .16); color: #e9d5ff; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .025); overflow: hidden; }
.dev-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; line-height: 1.55; }
.dev-table th { text-align: left; vertical-align: middle; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--purple-light); padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: rgba(139, 92, 246, .1); }
.dev-table td { padding: 1.05rem 1.25rem; border-bottom: 1px solid var(--line-soft); color: var(--muted); vertical-align: top; overflow-wrap: anywhere; }
.dev-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .022); }
.dev-table tbody tr:hover td { background: rgba(139, 92, 246, .07); }
.dev-table tr:last-child td { border-bottom: none; }
.dev-table td:first-child { color: var(--text); font-weight: 600; }
.dev-table--pipeline th:nth-child(1) { width: 15%; }
.dev-table--pipeline th:nth-child(2) { width: 30%; }
.dev-table--pipeline th:nth-child(3) { width: 30%; }
.dev-table--pipeline th:nth-child(4) { width: 25%; }
.dev-table--stride th:nth-child(1) { width: 20%; }
.dev-table--stride th:nth-child(2) { width: 16%; }
.dev-table--stride th:nth-child(3) { width: 34%; }
.dev-table--stride th:nth-child(4) { width: 30%; }
@media (max-width: 760px) {
  .table-wrap { border: none; background: none; overflow: visible; }
  .dev-table, .dev-table tbody, .dev-table tr, .dev-table td { display: block; width: 100%; }
  .dev-table thead { display: none; }
  .dev-table tr { margin-bottom: 1rem; padding: .5rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .03); }
  .dev-table td, .dev-table tbody tr:nth-child(even) td, .dev-table tbody tr:hover td { padding: .55rem 1.2rem; border: none; background: none; }
  .dev-table td:first-child { font-size: 1.05rem; padding-top: .8rem; }
  .dev-table td:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: .1rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--purple-light); }
}

.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: .7rem 0 .4rem; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--purple-bright), var(--indigo)); transition: width .3s ease; }
.progress-label { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.cl-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 1.6rem; }
.cl-group { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .03); }
.cl-group h3 { font-size: 1.05rem; margin-bottom: .7rem; }
.cl-item { display: flex; gap: .75rem; align-items: flex-start; padding: .42rem 0; cursor: pointer; color: var(--muted); font-size: .93rem; }
.cl-item input { margin-top: .25rem; accent-color: var(--purple-bright); width: 17px; height: 17px; flex-shrink: 0; }
.cl-item input:checked + span { color: var(--text); text-decoration: line-through; text-decoration-color: rgba(168, 85, 247, .6); }
.cl-reset { margin-top: 1.2rem; }

a.card { display: block; }
a.card h3 { color: var(--text); }
a.card .go { display: inline-block; margin-top: .9rem; font-weight: 600; font-size: .9rem; color: var(--purple-light); }

@media (max-width: 1000px) {
  .dev-hero-inner { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .risk-grid { grid-template-columns: 1fr; }
  .example-pair { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .pipeline, .cl-groups { grid-template-columns: 1fr; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-3, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1180px) {
  .header-inner { gap: 1rem; }
  .main-nav ul { gap: 1.15rem; }
  .main-nav a { font-size: .9rem; }
}
@media (max-width: 1100px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 1.2rem clamp(1.1rem, 4vw, 2.4rem);
  }
  .site-header.open .main-nav { display: block; }
  .site-header.open .main-nav ul { flex-direction: column; gap: 1.1rem; }
  .header-inner .btn { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .split { grid-template-columns: 1fr; }
  .split-mid span { transform: rotate(90deg); }
}
@media (max-width: 620px) {
  .grid-3, .grid-2, .post-grid, .steps, .footer-top { grid-template-columns: 1fr; }
  .sub-form { flex-direction: column; }
  .hero-meta { gap: 1.1rem; }
  .home .steps { gap: .9rem; }
  .home .step { padding: 1.25rem 1.3rem; }
  .home .step-n { margin-bottom: .5rem; }
  .home .post-body { padding: 1.3rem; }
  .home .split { gap: 1.1rem; }
}
