/* ============================================
   WEB3PWN Blog
   Mirrors the web3pwn-landing visual system.
   Brand tokens are copies of web3pwn-landing/public/styles.css :root:
   change a brand color or font there, change it here too.
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  letter-spacing: 0;
}

:root {
  --bg-white: #08080e;
  --bg-light: #0c0c14;
  --bg-dark: #08080e;
  --bg-darker: #06060a;
  --bg-card: rgba(255, 255, 255, 0.045);
  --text-dark: #e8e8f0;
  --text-body: rgba(255, 255, 255, 0.64);
  --text-muted: rgba(255, 255, 255, 0.38);
  --text-light: #e8e8f0;
  --text-light-muted: rgba(255, 255, 255, 0.56);
  --accent: #ff6b6b;
  --accent-dim: #b91c1c;
  --accent-hover: #ff8585;
  --accent-light: rgba(185, 28, 28, 0.16);
  --accent-glow: rgba(185, 28, 28, 0.22);
  --border-light: rgba(255, 255, 255, 0.075);
  --border-dark: rgba(255, 255, 255, 0.075);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Exo 2', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --container-max: 1200px;
  --nav-height: 72px;
  --section-padding: 112px;
  --radius: 8px;
  --radius-sm: 6px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --purple: #c792ea;
  --green: #c3e88d;
  --yellow: #ffcb6b;
  --orange: #f78c6c;
  --red: #ff6b6b;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  min-width: 320px;
  font-family: var(--font-body);
  background:
    linear-gradient(180deg, rgba(185, 28, 28, 0.1) 0%, rgba(8, 8, 14, 0) 260px),
    var(--bg-white);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(185, 28, 28, 0.32);
  color: var(--text-light);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  opacity: 0.05;
  background: linear-gradient(rgba(255, 255, 255, 0.06) 50%, transparent 50%);
  background-size: 100% 4px;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.container {
  width: min(100%, var(--container-max));
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1100;
  padding: 10px 16px;
  background: var(--accent-dim);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.skip-link:focus {
  top: 12px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.gradient-text {
  color: var(--accent);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--accent);
}

.section-tag::before {
  content: '//';
  color: var(--text-muted);
}

.section-tag::after {
  content: '';
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-header {
  max-width: 860px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-title {
  margin-bottom: 18px;
  font-size: 2.4rem;
  color: var(--text-dark);
}

.section-subtitle {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-body);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.85;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med), color var(--transition-med), background var(--transition-med);
}

.btn svg {
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.6rem;
}

.btn-lg {
  padding: 16px 34px;
  font-size: 0.7rem;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent-dim);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-ghost {
  color: var(--text-body);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(185, 28, 28, 0.12);
  transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(8, 8, 14, 0.62);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: height var(--transition-med), background var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.navbar.scrolled {
  height: 64px;
  background: rgba(8, 8, 14, 0.88);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
}

.nav-container {
  width: min(100%, var(--container-max));
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-right: 56px;
}

.nav-logo,
.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-light);
  font-family: var(--font-display);
  text-transform: uppercase;
}

.nav-logo-main {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.nav-logo-section {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
  text-transform: lowercase;
}

.nav-logo-section::before {
  content: '/';
  color: var(--text-muted);
}

/* WEB3PWN wordmark links to www (as on the landing site); "/blog" links to the blog home */
.nav-logo-row {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

a.nav-logo-section {
  transition: color var(--transition-fast);
}

a.nav-logo-section:hover {
  color: var(--accent-hover);
}

.nav-logo-byline {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  line-height: 1;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.nav-logo-byline:hover {
  color: var(--accent);
}

.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: var(--text-body);
  font-size: 0.83rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--transition-med);
}

.nav-link:hover,
.nav-link--login {
  color: var(--text-light);
}

.nav-link:hover::after,
.nav-link[aria-current]::after {
  width: 100%;
}

.nav-links .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 6px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-light);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* ---------- Fixed background ---------- */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-white);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, black 0%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 78%);
}

.hero-glow--cyan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.1) 0%, transparent 32%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.025) 100%);
}

.hero-glow--purple {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    linear-gradient(var(--accent), var(--accent)) right 72px top 92px / 360px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 72px top 92px / 1px 58px no-repeat,
    linear-gradient(var(--border-light), var(--border-light)) left 72px bottom 92px / 284px 1px no-repeat,
    linear-gradient(var(--border-light), var(--border-light)) left 72px bottom 92px / 1px 64px no-repeat;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes textGlitch {
  0%, 95%, 100% { opacity: 1; transform: none; }
  96% { opacity: 0.85; transform: translate(-2px, 1px); }
  97% { opacity: 1; transform: translate(1px, -1px); }
  98% { opacity: 0.9; transform: translate(-1px, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* Shared corner brackets (hover-lit on cards, always-on on frames) */
.bracketed {
  position: relative;
}

.bracketed::before,
.bracketed::after {
  content: '';
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.bracketed::before {
  top: 6px;
  left: 6px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.bracketed::after {
  right: 6px;
  bottom: 6px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.bracketed:hover::before,
.bracketed:hover::after,
.bracketed--lit::before,
.bracketed--lit::after {
  opacity: 0.7;
}

.glass {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.025) 100%), var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ============================================
   BLOG INDEX
   ============================================ */
.blog-hero {
  position: relative;
  padding: calc(var(--nav-height) + 96px) 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-badge a {
  color: var(--accent);
  transition: color var(--transition-fast);
}

.hero-badge a:hover {
  color: var(--accent-hover);
}

.hero-badge::before,
.hero-badge::after {
  content: '';
  width: 34px;
  height: 1px;
}

.hero-badge::before {
  background: linear-gradient(90deg, transparent, var(--accent));
}

.hero-badge::after {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.blog-hero__title {
  max-width: 980px;
  margin: 0 auto 24px;
  text-wrap: balance;
  font-size: clamp(2.1rem, 0.95rem + 4.6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.04;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.blog-hero__title .gradient-text {
  display: inline-block;
  animation: textGlitch 8s ease-in-out infinite;
}

.blog-hero__subtitle {
  max-width: 720px;
  margin: 0 auto 34px;
  text-wrap: balance;
  color: var(--text-body);
  font-size: 1.06rem;
  font-weight: 300;
  line-height: 1.82;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.blog-hero__subtitle a {
  color: var(--accent);
}

.terminal-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.terminal-line__prompt {
  color: var(--green);
}

.terminal-line__path {
  color: var(--purple);
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 920px;
  margin: 44px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-body);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 107, 0.42);
  color: #fff;
}

.chip[aria-pressed="true"] {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(185, 28, 28, 0.2);
  color: #fff;
}

.chip__count {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.chip[aria-pressed="true"] .chip__count {
  color: var(--accent-hover);
}

.posts {
  padding: 24px 0 var(--section-padding);
}

.posts__label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.posts__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-light), transparent);
}

.posts__label strong {
  color: var(--accent);
  font-weight: 400;
}

.post-list {
  display: grid;
  gap: 24px;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.post-card:hover {
  border-color: rgba(255, 107, 107, 0.36);
  box-shadow: 0 18px 54px var(--accent-glow), 0 24px 80px rgba(0, 0, 0, 0.32);
  transform: translateY(-4px);
}

.post-card--featured {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.14), rgba(255, 255, 255, 0.03)),
    var(--bg-card);
}

.post-card__media {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-light);
  background: #0a0a12;
}

.post-card__media {
  display: flex;
  align-items: center;
}

.post-card__media svg {
  width: 100%;
  height: auto;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-card__media svg {
  transform: scale(1.03);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 44px 40px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.post-meta__sep {
  width: 4px;
  height: 4px;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.tag--new {
  border-color: transparent;
  background: var(--accent-dim);
  color: #fff;
}

.post-card__body .tag-row {
  margin-bottom: 20px;
}

.post-card__title {
  margin-bottom: 16px;
  color: var(--text-dark);
  font-size: clamp(1.25rem, 0.9rem + 1vw, 1.7rem);
  font-weight: 800;
  line-height: 1.18;
  text-wrap: balance;
}

.post-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
}

.post-card__excerpt {
  margin-bottom: 24px;
  color: var(--text-body);
  font-size: 0.96rem;
  font-weight: 300;
  line-height: 1.8;
}

.post-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.post-card__cta svg {
  transition: transform var(--transition-fast);
}

.post-card:hover .post-card__cta svg {
  transform: translateX(4px);
}

.posts-empty {
  padding: 56px 24px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  text-transform: uppercase;
}

.posts-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.incoming {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.incoming__card {
  padding: 26px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.incoming__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.incoming__status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: blink 1.6s ease-in-out infinite;
}

.incoming__title {
  margin-bottom: 8px;
  color: rgba(232, 232, 240, 0.72);
  font-size: 0.8rem;
  font-weight: 600;
}

.incoming__desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- Signal band (RSS / Discord) ---------- */
.signal {
  position: relative;
  overflow: hidden;
  padding: 104px 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-dark);
}

.signal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.signal::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.12) 0%, transparent 30%),
    linear-gradient(var(--accent), var(--accent)) right 8% top 18% / 220px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 8% top 18% / 1px 60px no-repeat,
    linear-gradient(var(--border-dark), var(--border-dark)) left 8% bottom 14% / 280px 1px no-repeat,
    linear-gradient(var(--border-dark), var(--border-dark)) left 8% bottom 14% / 1px 70px no-repeat;
  pointer-events: none;
}

.signal .container {
  position: relative;
  z-index: 1;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.signal-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.signal-card:hover {
  border-color: rgba(255, 107, 107, 0.36);
  box-shadow: 0 18px 54px var(--accent-glow);
  transform: translateY(-4px);
}

.signal-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid rgba(185, 28, 28, 0.15);
  background: var(--accent-light);
}

.signal-card__title {
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.signal-card__desc {
  flex: 1;
  margin-bottom: 20px;
  color: var(--text-body);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
}

.signal-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.signal-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ============================================
   POST PAGE
   ============================================ */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1001;
  height: 2px;
  pointer-events: none;
}

.progress__bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  box-shadow: 0 0 12px var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.post-hero {
  padding: calc(var(--nav-height) + 72px) 0 48px;
  text-align: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.breadcrumb a {
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb li {
  display: inline-flex;
  gap: 8px;
  list-style: none;
}

.breadcrumb li + li::before {
  content: '/';
  color: rgba(255, 255, 255, 0.2);
}

.breadcrumb [aria-current] {
  color: var(--accent);
}

.post-hero .tag-row {
  justify-content: center;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.post-hero__title {
  max-width: 1040px;
  margin: 0 auto 26px;
  text-wrap: balance;
  font-size: clamp(2rem, 0.9rem + 4.2vw, 4.1rem);
  font-weight: 900;
  line-height: 1.05;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.post-hero__title .gradient-text {
  display: inline-block;
  animation: textGlitch 8s ease-in-out infinite;
}

.post-hero__dek {
  max-width: 760px;
  margin: 0 auto 30px;
  text-wrap: balance;
  color: var(--text-body);
  font-size: 1.14rem;
  font-weight: 300;
  line-height: 1.8;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.post-hero .post-meta {
  justify-content: center;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.cover-frame {
  max-width: 1080px;
  margin: 56px auto 0;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: #08080e;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.52), 0 28px 96px rgba(185, 28, 28, 0.14);
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.cover-frame__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--red { background: #ff5f57; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #28c840; }

.cover-frame__url {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  padding: 6px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-frame__spacer {
  width: 42px;
  flex-shrink: 0;
}

/* ---------- Article layout ---------- */
.post-body {
  padding: 72px 0 40px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 740px) 250px;
  justify-content: center;
  gap: 72px;
}

.post-aside {
  position: relative;
}

.toc {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  padding: 22px 0 22px 22px;
  border-left: 1px solid var(--border-light);
}

.toc summary {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc summary::before {
  content: '// ';
  color: var(--accent);
}

.toc ol {
  display: grid;
  gap: 2px;
  list-style: none;
}

.toc a {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  transition: color var(--transition-fast);
}

.toc a::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.toc a span {
  color: rgba(255, 255, 255, 0.24);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.9;
  transition: color var(--transition-fast);
}

.toc a:hover {
  color: var(--text-dark);
}

.toc a.active {
  color: var(--text-dark);
}

.toc a.active::before {
  opacity: 1;
}

.toc a.active span {
  color: var(--accent);
}

.toc__actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.toc__actions .btn {
  width: 100%;
}

/* ---------- Prose ---------- */
.prose {
  min-width: 0;
  color: var(--text-body);
  font-size: 1.07rem;
  font-weight: 300;
  line-height: 1.88;
}

.prose > * + * {
  margin-top: 1.3em;
}

.prose section + section {
  margin-top: 88px;
}

.prose section > * + * {
  margin-top: 1.3em;
}

.prose h2 {
  margin-bottom: 0.2em;
  color: var(--text-dark);
  font-size: clamp(1.35rem, 1rem + 1.1vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
  scroll-margin-top: calc(var(--nav-height) + 28px);
}

.h-index {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
}

.h-index::before {
  content: '//';
  color: var(--text-muted);
}

.h-index::after {
  content: '';
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.prose h3 {
  margin-top: 2em;
  color: var(--text-dark);
  font-size: 0.98rem;
  font-weight: 700;
}

.prose strong {
  color: var(--text-dark);
  font-weight: 600;
}

.prose em {
  color: rgba(255, 255, 255, 0.78);
}

.prose a:not(.btn):not(.start-card) {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size var(--transition-med), color var(--transition-fast);
}

.prose a:not(.btn):not(.start-card):hover {
  color: var(--accent-hover);
  background-size: 100% 1px;
}

.prose code:not(pre code) {
  padding: 0.12em 0.42em;
  border: 1px solid rgba(255, 107, 107, 0.16);
  border-radius: 4px;
  background: rgba(185, 28, 28, 0.12);
  color: #ffb3b3;
  font-family: var(--font-mono);
  font-size: 0.86em;
  white-space: nowrap;
}

.prose ul.list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.prose ul.list li {
  position: relative;
  padding-left: 26px;
}

.prose ul.list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.2rem;
  line-height: 1.8;
}

.lead::first-letter {
  float: left;
  margin: 0.06em 0.14em 0 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 3.4em;
  font-weight: 900;
  line-height: 0.82;
}

/* Pull quote */
.pullquote {
  position: relative;
  margin: 2.2em 0 !important;
  padding: 34px 36px 32px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.16), rgba(185, 28, 28, 0) 85%);
}

.pullquote::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -2px;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.pullquote p {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.85rem + 0.9vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  text-wrap: balance;
}

.pullquote p .gradient-text {
  color: var(--accent);
}

.pullquote cite {
  display: block;
  margin-top: 16px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: normal;
  text-transform: uppercase;
}

/* Callouts */
.callout {
  position: relative;
  padding: 26px 28px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.callout__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.callout__label::before {
  content: '';
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

.callout p {
  font-size: 0.98rem;
}

.callout ul.list {
  font-size: 0.98rem;
}

.callout--tldr {
  border-color: rgba(255, 107, 107, 0.28);
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.16), rgba(255, 255, 255, 0.03)),
    var(--bg-card);
}

.callout--warn {
  border-color: rgba(255, 203, 107, 0.24);
  background: linear-gradient(135deg, rgba(255, 203, 107, 0.08), rgba(255, 255, 255, 0.02));
}

.callout--warn .callout__label {
  color: var(--yellow);
}

.callout--note .callout__label {
  color: var(--purple);
}

/* ---------- Code ---------- */
.code {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #07070c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.code__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.035);
}

.code__file {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.code__lang {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.code__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.code__copy:hover {
  color: var(--text-dark);
  border-color: var(--border-light);
}

.code__copy.copied {
  color: var(--green);
}

.code pre {
  margin: 0;
  padding: 18px 0;
  overflow-x: auto;
  color: #d6d6e2;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.75;
  tab-size: 4;
  counter-reset: line;
}

.code pre code {
  display: block;
  min-width: max-content;
}

.ln {
  display: block;
  position: relative;
  padding: 0 24px 0 60px;
  border-left: 2px solid transparent;
  counter-increment: line;
}

.ln::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 40px;
  color: rgba(255, 255, 255, 0.18);
  text-align: right;
  user-select: none;
}

.ln--bad {
  border-left-color: var(--accent);
  background: rgba(255, 107, 107, 0.09);
}

.ln--bad::before {
  content: '−';
  color: var(--accent);
}

.ln--good {
  border-left-color: var(--green);
  background: rgba(195, 232, 141, 0.07);
}

.ln--good::before {
  content: '+';
  color: var(--green);
}

.tok-kw { color: var(--purple); }
.tok-type { color: #ff9e9e; }
.tok-fn { color: var(--yellow); }
.tok-str { color: var(--green); }
.tok-num { color: var(--orange); }
.tok-attr { color: var(--orange); }
.tok-com { color: rgba(255, 255, 255, 0.4); font-style: italic; }

.code__tabs {
  display: flex;
  gap: 4px;
  align-self: stretch;
}

.code__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.code__tab::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.code__tab:hover {
  color: var(--text-dark);
}

.code__tab[aria-selected="true"] {
  color: var(--text-dark);
}

.code__tab[aria-selected="true"]::after {
  opacity: 1;
}

.code__tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.code__tab-dot--ok {
  background: var(--green);
}

.code__caption,
.figure-caption {
  margin-top: 12px !important;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Pipeline diagram ---------- */
.figure {
  margin: 2.2em 0 !important;
}

.pipeline {
  padding: 32px 28px 28px;
}

.pipeline__track {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: stretch;
}

.pipeline__node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.pipeline__node--l1 {
  border-color: rgba(255, 107, 107, 0.34);
  background: linear-gradient(160deg, rgba(185, 28, 28, 0.2), rgba(255, 255, 255, 0.02));
}

.pipeline__where {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.pipeline__node--l1 .pipeline__where {
  color: var(--accent);
}

.pipeline__name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pipeline__name svg {
  flex-shrink: 0;
  color: var(--accent);
}

.pipeline__desc {
  color: var(--text-body);
  font-size: 0.86rem;
  line-height: 1.6;
}

.pipeline__out {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.pipeline__link {
  position: relative;
  align-self: center;
  height: 1px;
  margin: 0 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), var(--accent));
}

.pipeline__link::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 6px solid var(--accent);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

.pipeline__packet {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 3px #fff;
  transform: rotate(45deg);
  animation: packet 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.pipeline__link + .pipeline__node + .pipeline__link .pipeline__packet {
  animation-delay: 1.2s;
}

@keyframes packet {
  0% { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 7px); opacity: 0; }
}

.finality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--border-light);
}

.finality__step {
  position: relative;
  padding-top: 18px;
}

.finality__step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 203, 107, 0.5), rgba(255, 203, 107, 0.15));
}

.finality__step--l1::before {
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.4);
}

.finality__status {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.finality__step--l1 .finality__status {
  color: var(--accent);
}

.finality__step p {
  color: var(--text-body);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ---------- Comparison table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.compare {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.6;
}

.compare th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.compare th.is-starknet {
  color: var(--accent);
}

.compare td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.compare tr:last-child td {
  border-bottom: 0;
}

.compare tbody tr {
  transition: background var(--transition-fast);
}

.compare tbody tr:hover {
  background: rgba(185, 28, 28, 0.07);
}

.compare td:first-child {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.compare td:nth-child(2) {
  color: var(--text-muted);
}

.compare td:nth-child(3) {
  color: var(--text-dark);
}

.compare td:nth-child(4) {
  color: var(--text-body);
  font-size: 0.86rem;
}

/* ---------- felt252 playground ---------- */
.felt {
  padding: 0;
  overflow: hidden;
}

.felt__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

.felt__title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.felt__live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2s ease-in-out infinite;
}

.felt__prime {
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.felt__body {
  padding: 22px;
}

.felt__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.felt__preset {
  padding: 7px 12px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.felt__preset:hover,
.felt__preset.active {
  color: #fff;
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(185, 28, 28, 0.18);
}

.felt__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}

.felt__field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.felt__field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  outline: none;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.felt__field input:focus {
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}

.felt__ops {
  display: flex;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.felt__op {
  width: 44px;
  height: 46px;
  border: 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-body);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.felt__op + .felt__op {
  border-left: 1px solid var(--border-light);
}

.felt__op:hover {
  color: #fff;
}

.felt__op[aria-pressed="true"] {
  background: var(--accent-dim);
  color: #fff;
}

.felt__hint {
  margin-top: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.felt__hint code {
  color: var(--text-body) !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.felt__result {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition-med), box-shadow var(--transition-med), background var(--transition-med);
}

.felt__result[data-state="wrapped"] {
  border-color: rgba(255, 107, 107, 0.45);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.18), rgba(0, 0, 0, 0.3));
  box-shadow: 0 0 40px rgba(185, 28, 28, 0.18) inset;
}

.felt__result[data-state="ok"] {
  border-color: rgba(195, 232, 141, 0.32);
}

.felt__result-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.felt__expr {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.felt__badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.felt__result[data-state="wrapped"] .felt__badge {
  background: var(--accent-dim);
  color: #fff;
}

.felt__result[data-state="ok"] .felt__badge {
  background: rgba(195, 232, 141, 0.14);
  color: var(--green);
}

.felt__result[data-state="error"] .felt__badge {
  background: rgba(255, 203, 107, 0.14);
  color: var(--yellow);
}

.felt__value {
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 0.7rem + 0.5vw, 1.02rem);
  line-height: 1.55;
  word-break: break-all;
}

.felt__result[data-state="wrapped"] .felt__value {
  color: #ffc2c2;
  text-shadow: 0 0 18px rgba(255, 107, 107, 0.35);
}

.felt__note {
  margin-top: 12px;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.65;
}

.felt__note strong {
  color: var(--accent);
}

/* ---------- Skill tree ---------- */
.tree {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 34px;
}

.tree::before {
  content: '';
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 9px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), rgba(255, 107, 107, 0.15));
}

.tier {
  position: relative;
  padding: 24px 24px 22px;
}

.tier::before {
  content: '';
  position: absolute;
  top: 28px;
  left: -30px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent);
  background: var(--bg-white);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}

.tier:first-child::before {
  background: var(--accent);
}

.tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 6px;
}

.tier__num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.tier__name {
  color: var(--text-dark);
  font-size: 0.92rem !important;
  margin: 0 !important;
}

.tier__desc {
  margin: 0 0 16px !important;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.65;
}

.tier__nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 0 !important;
  list-style: none;
}

.node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.node:hover {
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(185, 28, 28, 0.1);
  transform: translateY(-2px);
}

.node__idx {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(185, 28, 28, 0.25);
  background: var(--accent-light);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
}

.node__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.node__title {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.node__meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.node--public {
  border-color: rgba(195, 232, 141, 0.28);
}

.node--public .node__meta {
  color: var(--green);
}

/* ---------- Theory stages ---------- */
.stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  counter-reset: stage;
}

.stage {
  position: relative;
  padding: 16px 18px 16px 58px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  counter-increment: stage;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.stage:hover {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(185, 28, 28, 0.07);
}

.stage::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.9;
}

.stage__title {
  display: block;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.stage__tagline {
  display: block;
  margin-top: 4px;
  color: var(--text-body);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ---------- Lab flow ---------- */
.lab {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lab__step {
  padding: 22px 20px;
}

.lab__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  box-shadow: 0 0 0 5px var(--accent-light), 0 0 24px var(--accent-glow);
}

.lab__title {
  margin: 0 0 8px !important;
  font-size: 0.78rem !important;
}

.lab__desc {
  margin: 0 !important;
  font-size: 0.88rem;
  line-height: 1.65;
}

.lab-output {
  margin-top: 12px !important;
  padding: 18px 22px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #07070c;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
}

.lab-output__line {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
}

.lab-output__line b {
  font-weight: 400;
}

.lab-output__line--ok {
  color: var(--green);
}

.lab-output__summary {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  color: var(--accent);
}

.lab-output__summary span {
  color: var(--text-muted);
}

/* ---------- Start cards ---------- */
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.start-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.start-card:hover {
  border-color: rgba(255, 107, 107, 0.36);
  box-shadow: 0 18px 54px var(--accent-glow);
  transform: translateY(-4px);
}

.start-card--primary {
  border-color: rgba(255, 107, 107, 0.3);
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.2), rgba(255, 255, 255, 0.03)),
    var(--bg-card);
}

.start-card__kicker {
  margin-bottom: 12px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.start-card__title {
  margin: 0 0 8px !important;
  color: var(--text-dark);
  font-size: 0.8rem !important;
  line-height: 1.35;
}

.start-card__desc {
  flex: 1;
  margin: 0 0 18px !important;
  color: var(--text-body);
  font-size: 0.88rem;
  line-height: 1.6;
}

.start-card__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
}

.start-card__go svg {
  transition: transform var(--transition-fast);
}

.start-card:hover .start-card__go svg {
  transform: translateX(4px);
}

/* ---------- Post footer ---------- */
.post-end {
  display: grid;
  gap: 24px;
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid var(--border-light);
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.share__label {
  margin-right: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.share__btn:hover {
  color: #fff;
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(185, 28, 28, 0.16);
}

.share__btn.copied {
  color: var(--green);
}

.author {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.author__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 107, 107, 0.3);
  background: var(--accent-light);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 900;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.author__mark span {
  color: var(--accent);
}

.author__name {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.author__bio {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.6;
}

.author__bio a {
  color: var(--accent);
}

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  padding: 120px 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-dark);
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.cta-glow {
  position: absolute;
  inset: -42px;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 180px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 72px no-repeat,
    linear-gradient(var(--border-light), var(--border-light)) right bottom / 220px 1px no-repeat,
    linear-gradient(var(--border-light), var(--border-light)) right bottom / 1px 88px no-repeat,
    linear-gradient(135deg, rgba(185, 28, 28, 0.12), transparent 48%);
  pointer-events: none;
}

.cta-title {
  position: relative;
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 1rem + 2.4vw, 2.55rem);
}

.cta-subtitle {
  position: relative;
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--text-light-muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
}

.cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ---------- 404 ---------- */
.lost {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 40px) 0 80px;
  text-align: center;
}

.lost__code {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 10rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 60px rgba(255, 107, 107, 0.35);
  animation: textGlitch 4s ease-in-out infinite;
}

.lost__title {
  margin-bottom: 16px;
  font-size: clamp(1.2rem, 0.9rem + 1vw, 1.8rem);
}

.lost__desc {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--text-body);
  font-weight: 300;
}

/* ---------- Footer ---------- */
.footer {
  padding: 64px 0 32px;
  color: var(--text-light);
  border-top: 1px solid var(--border-dark);
  background: var(--bg-darker);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 64px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-dark);
}

.footer-brand {
  max-width: 340px;
}

.footer-brand-lockup {
  margin-right: 0;
}

.footer-tagline {
  margin-top: 16px;
  color: var(--text-light-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
}

.footer-tagline a {
  color: var(--accent);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}

.footer-links__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links__title {
  margin-bottom: 10px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
}

.footer-link {
  color: var(--text-light-muted);
  font-size: 0.86rem;
  font-weight: 300;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
}

.footer-copyright {
  color: var(--text-light-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links {
    gap: 18px;
  }

  .post-layout {
    grid-template-columns: minmax(0, 740px);
    gap: 0;
  }

  .post-aside {
    order: -1;
    margin-bottom: 40px;
  }

  .toc {
    position: static;
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
  }

  .toc summary {
    margin-bottom: 0;
  }

  .toc[open] summary {
    margin-bottom: 12px;
  }

  .toc a::before {
    display: none;
  }

  .toc__actions {
    display: none;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card__media {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --nav-height: 64px;
    --section-padding: 84px;
  }

  .container,
  .nav-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* No backdrop-filter on the bar at this size: it would become the containing
     block for the fixed .nav-links overlay and collapse the open mobile menu. */
  .navbar,
  .navbar.scrolled {
    background: rgba(8, 8, 14, 0.96);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand-lockup {
    margin-right: 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 32px 24px;
    background: rgba(8, 8, 14, 0.98);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    font-family: var(--font-display);
    font-size: 0.82rem;
    text-transform: uppercase;
  }

  .nav-links .btn {
    margin-left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .post-card__body {
    padding: 30px 26px;
  }

  .incoming,
  .signal-grid,
  .start-grid,
  .lab {
    grid-template-columns: 1fr;
  }

  .pipeline__track {
    grid-template-columns: 1fr;
    grid-template-rows: auto 40px auto 40px auto;
  }

  .pipeline__link {
    justify-self: center;
    width: 1px;
    height: auto;
    align-self: stretch;
    margin: 6px 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), var(--accent));
  }

  .pipeline__link::after {
    right: -4px;
    top: auto;
    bottom: -1px;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 6px solid var(--accent);
    border-bottom: 0;
  }

  .pipeline__packet {
    left: -3px;
    animation-name: packet-v;
  }

  @keyframes packet-v {
    0% { top: 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 7px); opacity: 0; }
  }

  .finality {
    grid-template-columns: 1fr;
  }

  .stages {
    grid-template-columns: 1fr;
  }

  .felt__inputs {
    grid-template-columns: 1fr;
  }

  .felt__ops {
    justify-self: start;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  :root {
    --section-padding: 68px;
  }

  .container,
  .nav-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-logo-main {
    font-size: 0.76rem;
  }

  .nav-logo-byline {
    font-size: 0.5rem;
  }

  .prose {
    font-size: 1rem;
  }

  .lead {
    font-size: 1.08rem;
  }

  .pullquote {
    padding: 26px 22px;
  }

  .callout {
    padding: 22px 20px;
  }

  .pipeline {
    padding: 22px 18px;
  }

  .tree {
    padding-left: 26px;
  }

  .tree::before {
    left: 5px;
  }

  .tier {
    padding: 20px 18px;
  }

  .tier::before {
    left: -26px;
  }

  .ln {
    padding: 0 18px 0 46px;
  }

  .ln::before {
    width: 30px;
  }

  .code pre {
    font-size: 0.8rem;
  }

  .code__bar {
    padding-left: 6px;
  }

  .code__lang {
    display: none;
  }

  .code__tabs {
    flex: 1;
    min-width: 0;
    gap: 0;
  }

  .code__tab {
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .code__copy {
    margin-left: auto;
  }

  .cover-frame__spacer {
    display: none;
  }

  .btn-lg {
    padding: 15px 22px;
    font-size: 0.62rem;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
