@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,400&family=Instrument+Serif:ital@0;1&family=Outfit:wght@400;600;700;900&display=swap');

html {
  --void:        #040705;
  --deep:        #070d09;
  --surface:     #0c1610;
  --raised:      #111e14;
  --green:       #00e857;
  --green-mid:   #00bb45;
  --green-soft:  rgba(0,232,87,.14);
  --green-dim:   rgba(0,232,87,.08);
  --green-line:  rgba(0,232,87,.16);
  --green-line2: rgba(0,232,87,.32);
  --green-glow:  0 0 16px rgba(0,232,87,.25);
  --text:        #c6efcf;
  --text-dim:    #78a882;
  --text-muted:  #527a5c;
  --text-ghost:  #1f3323;
  --card:        rgba(0,232,87,.04);
  --card2:       rgba(0,232,87,.07);
  --line:        rgba(0,232,87,.16);
  --line2:       rgba(0,232,87,.32);
  --shadow:      0 16px 48px rgba(0,0,0,.7);
  --mono:    'DM Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
  --display: Outfit, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --human:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --r:  6px;
  --r2: 4px;
  --max: 1120px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[data-theme="light"] {
  --void:        #f5f1e8;
  --deep:        #faf7f0;
  --surface:     #eef0e8;
  --raised:      #e8ede0;
  --green:       #0a7c32;
  --green-mid:   #0d9940;
  --green-soft:  rgba(10,124,50,.12);
  --green-dim:   rgba(10,124,50,.07);
  --green-line:  rgba(10,124,50,.18);
  --green-line2: rgba(10,124,50,.30);
  --green-glow:  0 0 16px rgba(10,124,50,.15);
  --text:        #0d1f10;
  --text-dim:    #2e5438;
  --text-muted:  #5a7a5e;
  --text-ghost:  #b8ccba;
  --card:        rgba(10,124,50,.04);
  --card2:       rgba(10,124,50,.07);
  --line:        rgba(10,124,50,.18);
  --line2:       rgba(10,124,50,.30);
  --shadow:      0 8px 32px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: #040705;
  background-color: var(--void);
  color: #c6efcf;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

html:not([data-theme="light"]) body {
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,232,87,.004) 3px, rgba(0,232,87,.004) 4px),
    radial-gradient(ellipse 120% 60% at 60% 0%, rgba(0,232,87,.06) 0%, transparent 55%);
}

html[data-theme="light"] body {
  background-image: radial-gradient(ellipse 100% 50% at 70% 0%, rgba(10,124,50,.05) 0%, transparent 60%);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
p   { line-height: 1.7; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 20px 80px;
  position: relative;
  z-index: 2;
}

/* HEADER */
.top {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 22px;
  background-color: #070d09;
  background-color: var(--deep);
  border-bottom: 1px solid rgba(0,232,87,.16);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: padding .25s;
}
.brand { display: flex; align-items: center; gap: 12px; }
.sig {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2);
  background-color: var(--green-dim);
  color: var(--green);
  font-family: 'Noto Sans Devanagari', 'Segoe UI', system-ui, sans-serif;
  font-weight: 900; font-size: 17px; flex-shrink: 0;
}
.brandText { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.name    { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text); }
.tagline { font-family: var(--mono); font-size: 12px; color: var(--text-dim); letter-spacing: .3px; }
.hdrRight { display: flex; align-items: center; gap: 10px; }
.whyLink       { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.whyLink:hover { color: var(--green); }
.whyLink.subtle { opacity: .8; }
.iconBtn {
  border: 1px solid var(--line);
  background-color: var(--green-dim);
  color: var(--text);
  border-radius: 8px; padding: 0; cursor: pointer; font-size: 14px;
  height: 34px; width: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s, border-color .2s;
}
.iconBtn:hover { background-color: var(--green-soft); border-color: var(--line2); }
.top.collapsed { padding: 6px 14px; }
.top.collapsed .brandText { display: none; }
.top.collapsed .sig { width: 28px; height: 28px; font-size: 14px; }
.top.collapsed .iconBtn { height: 30px; width: 30px; }
.top.collapsed .whyLink.subtle { display: none; }

/* Mode label */
.modeLabel {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  user-select: none; white-space: nowrap;
}
.modeLabel .opt { opacity: .5; }
.modeLabel .opt.on { opacity: 1; color: var(--text); }
.modeLabel .sep { opacity: .4; }
@media (max-width: 600px) { .modeLabel .t { display: none; } }

/* DRAWER */
.drawerBackdrop {
  position: fixed; inset: 0;
  background-color: rgba(0,0,0,.55);
  z-index: 300;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(360px, 88vw);
  background-color: var(--deep);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 40px rgba(0,0,0,.6);
  transform: translateX(105%);
  transition: transform .22s ease;
  z-index: 400;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }
.drawerTop { display: flex; align-items: center; justify-content: space-between; }
.drawerTitle { font-family: var(--display); font-weight: 700; color: var(--text); font-size: 15px; }
.drawerNav { display: flex; flex-direction: column; gap: 4px; }
.drawerNav a {
  padding: 12px 16px; border-radius: 6px;
  font-family: var(--display); font-size: 15px; color: var(--text);
  border: 1px solid transparent;
  transition: border-color .2s, background-color .2s, color .2s;
}
.drawerNav a:hover { border-color: var(--line); background-color: var(--card); color: var(--text); }

/* HERO */
.hero { margin-top: 14px; }
.heroFrame {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line2);
  background-color: #000;
  box-shadow:
    0 0 0 1px rgba(0,232,87,.06),
    0 8px 32px rgba(0,0,0,.7),
    0 2px 8px rgba(0,232,87,.08);
  position: relative;
}
.heroFrame img {
  width: 100%; height: auto; max-height: 500px; object-fit: cover; display: block;
  opacity: 1;
  filter: brightness(1.0) saturate(1.05) contrast(1.06);
  transition: filter 1.4s ease;
}
.heroFrame:hover img {
  filter: brightness(1.05) saturate(1.1) contrast(1.06);
}
html[data-theme="light"] .heroFrame img { filter: brightness(.88) saturate(.65) contrast(1.04); }
/* Matrix green tint overlay on hero image */
.heroFrame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent                  0%,
    rgba(4,7,5,.15)              40%,
    rgba(4,7,5,.75)              72%,
    rgba(4,7,5,.95)             100%
  );
  pointer-events: none;
  z-index: 1;
}
html[data-theme="light"] .heroFrame::after {
  background: linear-gradient(135deg, rgba(10,124,50,.12) 0%, rgba(0,30,10,.35) 50%, transparent 100%);
}
.heroOverlay { display: none; }
.heroCenter {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 28px 32px;
  text-align: center;
}
.siteLockup {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  color: var(--text-dim); text-transform: uppercase; margin-bottom: 10px;
}
.siteLockup.small { margin-bottom: 6px; }
.lockupAlt {
  font-family: 'Noto Sans Devanagari', 'Segoe UI', system-ui, sans-serif;
  font-weight: 900; color: var(--green);
}
.kicker {
  display: inline-flex; gap: 8px; align-items: center;
  font-family: var(--display); font-size: 13px; color: var(--text);
  padding: 6px 18px; border-radius: 999px;
  border: 1px solid rgba(0,232,87,.25);
  background: rgba(0,232,87,.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 18px; letter-spacing: .2px;
  box-shadow: 0 0 0 1px rgba(0,232,87,.08), inset 0 1px 0 rgba(255,255,255,.04);
}
.h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(30px, 5.5vw, 62px);
  letter-spacing: -.5px; line-height: 1.05; color: var(--text);
  text-shadow: 0 2px 24px rgba(0,0,0,.8), 0 0 60px rgba(0,232,87,.12);
}
.h1 em, .h1 i {
  font-family: var(--human); font-style: italic;
  font-weight: 400; color: var(--green-mid);
  text-shadow: 0 0 32px rgba(0,232,87,.25);
}
.sub {
  margin-top: 14px; color: var(--text);
  font-family: var(--human); font-style: italic;
  font-size: clamp(16px, 2.2vw, 19px); line-height: 1.75;
  max-width: 700px; margin-left: auto; margin-right: auto;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}
.intent { margin-top: 10px; color: var(--text-dim); font-family: var(--display); font-size: 13px; }
.heroCtas { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Typewriter */
.typewriter {
  font-family: var(--mono); font-size: 15px; color: var(--green-mid);
  min-height: 28px; margin: 20px auto 10px;
  letter-spacing: .02em;
}
.typewriter::after {
  content: '|';
  font-weight: 300;
  margin-left: 2px;
  animation: blink 1.1s ease-in-out infinite;
  color: var(--green);
  opacity: 1;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  45%       { opacity: 1; }
  55%       { opacity: 0; }
  95%       { opacity: 0; }
}

/* Stats bar */
.heroStats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background-color: var(--line);
  gap: 1px;
}
.statItem { background-color: var(--deep); padding: 14px 10px; text-align: center; }
.statNum  { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--green); display: block; line-height: 1; }
.statLabel{ font-family: var(--mono); font-size: 12px; color: var(--text-dim); display: block; margin-top: 5px; letter-spacing: .3px; text-transform: uppercase; }
/* heroStats mobile — handled in main 600px block below */

/* Hero band */
.heroBand {
  margin-top: 16px; border-radius: 10px;
  border: 1px solid var(--line2);
  background: linear-gradient(135deg, rgba(0,232,87,.05) 0%, var(--green-dim) 100%);
  padding: 18px 22px;
}
.heroBand h2 { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.heroBand p  { font-family: var(--human); font-style: italic; color: var(--text); font-size: 16px; line-height: 1.7; margin: 0; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r);
  border: 1px solid rgba(0,232,87,.4); background-color: var(--green-soft);
  color: var(--text); font-family: var(--mono); font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0,232,87,.1), 0 2px 10px rgba(0,232,87,.12);
  transition: background-color .2s, border-color .2s, box-shadow .25s, transform .12s;
}
.btn:hover {
  background-color: rgba(0,232,87,.22); border-color: var(--green);
  box-shadow: 0 0 28px rgba(0,232,87,.45), 0 0 0 1px rgba(0,232,87,.35);
  transform: translateY(-2px);
}
/* Primary action btn — filled green */
.btn.primary, a.btn[href*="field-notes"]:first-of-type {
  background-color: rgba(0,232,87,.18);
  border-color: var(--green);
  font-weight: 600;
}
html[data-theme="light"] .btn:hover { background-color: rgba(10,124,50,.15); }
.btn.secondary { border-color: var(--line); background-color: var(--green-dim); }
.btn.secondary:hover { border-color: var(--line2); background-color: var(--green-soft); }
.btn.small { padding: 7px 14px; font-size: 12px; }

/* SECTIONS */
.section { margin-top: 40px; }
.sectionHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sectionHead h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--text); }
.sectionHead p  { margin: 6px 0 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 15px; line-height: 1.6; }
.section-label { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--green-mid); text-transform: uppercase; margin-bottom: 6px; }

/* GRID */
.grid  { display: grid; gap: 12px; margin-top: 14px; }
.grid3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* CARDS */
.card {
  border-radius: var(--r2); border: 1px solid var(--line);
  background-color: var(--card); padding: 18px;
  transition: border-color .2s, background-color .2s; position: relative;
}
.card:hover { border-color: var(--line2); background-color: var(--card2); }
.card h3 { margin: 0 0 8px; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--text); }
.card p  { margin: 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 14px; line-height: 1.6; font-weight: 400; }
.cardLink { display: block; cursor: pointer; }
.card .meta { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* TAGS */
.tag {
  display: inline-flex; padding: 4px 10px; border-radius: 3px;
  border: 1px solid var(--line); background-color: var(--green-dim);
  color: var(--text-dim); font-family: var(--mono); font-size: 12px;
}
a.tag:hover { border-color: var(--line2); color: var(--green); }

/* PANEL */
.panel {
  border-radius: var(--r); border: 1px solid var(--line2);
  background-color: var(--raised); padding: 22px 24px;
}
.panel h2 { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 12px; letter-spacing: -.2px; }
.panel h3 { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.panel p  { color: var(--text); font-family: var(--display); font-style: normal; font-size: 15px; line-height: 1.7; font-weight: 400; }

/* HR */
.hr { height: 1px; background-color: var(--line); border: 0; margin: 28px 0; }

/* STEPS */
.steps { display: grid; gap: 10px; margin-top: 14px; }
.step {
  border-radius: var(--r2); border: 1px solid var(--line2);
  background-color: var(--raised); padding: 18px 20px;
  transition: border-color .2s, background-color .2s;
}
.step:hover { border-color: var(--line2); background-color: var(--card2); }
.step b { font-family: var(--display); font-weight: 700; color: var(--green); font-size: 15px; letter-spacing: -.1px; }
.step p { margin: 8px 0 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 15px; line-height: 1.65; font-weight: 400; }
.stepLink { display: block; }

/* LISTS */
.list { padding-left: 18px; }
.list li { margin: 6px 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 15px; line-height: 1.65; font-weight: 400; }
.list a  { color: var(--green-mid); }
.list a:hover { text-decoration: underline; }
.listLabel { color: var(--text-dim); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-top: 14px; list-style: none; margin-left: -18px; }

/* FEED / DISPATCH */
.feed {
  display: grid; gap: 1px; background-color: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px;
}
.dispatchItem {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 16px 18px; background-color: var(--deep); text-decoration: none;
  transition: background-color .2s;
}
.dispatchItem:hover { background-color: var(--surface); }
.dispatchItem h3 { margin: 0 0 5px; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.dispatchItem p  { margin: 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 14px; line-height: 1.6; font-weight: 400; }
.dispatchMeta { min-width: 160px; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }
@media (max-width: 700px) { .dispatchItem { flex-direction: column; gap: 8px; } .dispatchMeta { text-align: left; min-width: unset; } }

/* SEARCH */
.searchRow { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.input {
  flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 6px;
  border: 1px solid var(--line); background-color: var(--surface);
  color: var(--text); font-family: var(--mono); font-size: 13px;
  outline: none; transition: border-color .2s;
}
html[data-theme="light"] .input { background-color: rgba(255,255,255,.6); }
.input:focus { border-color: var(--line2); }
.input::placeholder { color: var(--text-ghost); }

/* ARTICLE */
.article { max-width: 800px; }
h1 { font-family: var(--display); font-weight: 900; font-size: clamp(24px,4.5vw,44px); color: var(--text); letter-spacing: -.5px; line-height: 1.1; margin-bottom: 12px; }
.byline { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.byline b { color: var(--text-dim); }
.content { margin-top: 24px; }
.content h2 { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--text); margin: 36px 0 12px; border-left: 3px solid var(--green); padding-left: 14px; }
.content h3 { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--text); margin: 28px 0 10px; }
.content p  { color: var(--text-dim); font-family: var(--human); font-size: 17px; line-height: 1.85; margin-bottom: 20px; max-width: 68ch; }
.content ul, .content ol { padding-left: 22px; margin-bottom: 18px; }
.content li { color: var(--text-dim); font-family: var(--human); font-size: 16px; margin: 8px 0; line-height: 1.75; }
.content a  { color: var(--green-mid); border-bottom: 1px solid var(--line); }
.content a:hover { border-color: var(--green); color: var(--green); }
.content strong { color: var(--text); font-family: var(--display); font-weight: 600; }
.content hr  { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.content img { border-radius: 8px; border: 1px solid var(--line); margin: 24px 0; }
.content pre { background-color: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px; overflow-x: auto; margin: 18px 0; color: var(--green); font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.content code { background-color: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; color: var(--green-mid); font-family: var(--mono); font-size: 12px; }
.content pre code { background: none; border: none; padding: 0; color: inherit; }
.feedbackNote { font-family: var(--display); font-size: 14px; color: var(--text-dim); margin-top: 28px; }
.feedbackNote a { color: var(--green-mid); }
.feedbackActions { margin-top: 12px; }
.postNav { display: flex; align-items: center; justify-content: space-between; margin: 20px 0; }
.postNav.top { margin-bottom: 24px; }
.postNav.bottom { margin-top: 28px; }
.postNavRight { display: flex; gap: 10px; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--green-mid); }
.crumbSep { margin: 0 6px; opacity: .5; }

/* PROSE */
.prose { font-family: var(--display); font-size: 15px; line-height: 1.75; color: var(--text); }
.prose h2 { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); margin: 24px 0 10px; }
.prose h3 { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); margin: 18px 0 8px; }
.prose p  { margin-bottom: 14px; font-style: normal; }
.prose ul, .prose ol { padding-left: 20px; margin-bottom: 14px; }
.prose li { margin: 6px 0; font-style: normal; color: var(--text); }
.prose code { font-family: var(--mono); font-size: 12px; background-color: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; color: var(--green-mid); }
.prose pre  { font-family: var(--mono); font-size: 13px; background-color: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; overflow-x: auto; color: var(--green); margin: 16px 0; line-height: 1.6; }
.prose pre code { background: none; border: none; padding: 0; color: inherit; }
.prose a { color: var(--green-mid); border-bottom: 1px solid var(--line); }
.prose a:hover { color: var(--green); border-color: var(--green); }
.prose strong { color: var(--text); font-family: var(--display); }
.muted     { color: var(--text-dim); }
.smallNote  { color: var(--text); font-family: var(--display); font-size: 14px; margin-top: 10px; font-style: normal; line-height: 1.6; font-weight: 400; }
.mutedInline { color: var(--text-dim); font-family: var(--display); font-size: 13px; }

/* CODE */
code, pre, kbd, samp { font-family: var(--mono); }
pre  { background-color: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; overflow-x: auto; font-size: 13px; color: var(--green); line-height: 1.6; margin: 14px 0; }
code { background-color: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; font-size: 12px; color: var(--green-mid); }
pre code { background: none; border: none; padding: 0; color: inherit; }

/* TERMINAL BLOCK */
.terminal {
  background-color: rgba(0,0,0,.55); border: 1px solid var(--line);
  border-radius: 6px; padding: 18px 20px; font-family: var(--mono);
  font-size: 12px; line-height: 1.9; color: var(--text-dim);
}
html[data-theme="light"] .terminal { background-color: rgba(0,0,0,.07); }
.term-prompt { color: var(--green); }
.term-out    { color: var(--text-muted); padding-left: 16px; }
.term-ok     { color: var(--green); }
.term-warn   { color: #ffb300; }
.term-line   { display: flex; gap: 8px; }

/* CATALOG (Python Encounters) */
.catalogBlock { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.catalogHead  { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.catalogList  { margin: 10px 0 0; padding-left: 18px; }
.catalogList li { margin: 8px 0; color: var(--text); font-family: var(--display); font-size: 15px; font-style: normal; }
.catalogList a  { font-family: var(--display); font-weight: 600; color: var(--text); }
.catalogList a:hover { color: var(--green-mid); }
.splitTabs { display: none; gap: 8px; margin: 12px 0 14px; flex-wrap: wrap; }
.tabBtn {
  appearance: none; border: 1px solid var(--line);
  background-color: var(--card); color: var(--text-dim);
  padding: 9px 14px; border-radius: 6px;
  font-family: var(--display); font-size: 13px; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.tabBtn.active { color: var(--green); border-color: var(--line2); background-color: var(--green-soft); }
.splitGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.bucket { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background-color: var(--card); }
.bucketHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bucketCtas { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cards { display: grid; gap: 10px; }
.cardActions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.emptyState { padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background-color: var(--card); color: var(--text-dim); font-family: var(--display); font-size: 14px; }
@media (max-width: 900px) {
  .splitGrid { grid-template-columns: 1fr; }
  .splitTabs { display: flex; }
  .bucket { display: none; }
  .bucket.active { display: block; }

  /* Tablet hero: image shows but text anchors below */
  .heroFrame img { max-height: 380px; }
  .heroCenter { padding: 24px 24px 28px; }
  .h1 { font-size: clamp(24px, 4.5vw, 48px); }
  .modeLabel .t { display: none; }
}

/* MODAL */
.modal {
  border: 1px solid var(--line2); border-radius: 10px;
  background-color: var(--deep); color: var(--text);
  padding: 0; max-width: 520px; width: calc(100% - 40px);
  /* Centre on screen — override UA default top-left positioning */
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
/* Fallback for browsers that don't support dialog positioning */
dialog.modal[open] {
  display: block;
}
.modal::backdrop { background-color: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.modalInner  { padding: 20px 24px; }
.modalHead   { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modalHead h2 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; }
.modalBody p  { margin: 0; color: var(--text); font-family: var(--display); font-style: normal; font-size: 16px; line-height: 1.75; }

/* FLOAT NAV */
.floatNav { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 150; }
.floatNavBtn {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line2); background-color: var(--deep);
  color: var(--green); display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-family: var(--mono); font-size: 14px;
  backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,.5);
  transition: background-color .2s;
}
.floatNavBtn:hover { background-color: var(--surface); }
@media (min-width: 900px) { .floatNav { display: none; } }

/* FOOTER */
.footer {
  border-top: 1px solid var(--line); padding: 28px 20px; margin-top: 60px;
  font-family: var(--display); font-size: 13px; color: var(--text-dim);
  position: relative; z-index: 2;
}
.footer > div:first-child { margin-bottom: 12px; }
.footLinks { display: flex; gap: 6px; flex-wrap: wrap; }
.footLinks a { color: var(--text-dim); padding: 4px 8px; border: 1px solid transparent; border-radius: 4px; transition: color .2s, border-color .2s; }
.footLinks a:hover { color: var(--green-mid); border-color: var(--line); }

/* PORTRAIT */
.portraitWrap { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line2); background-color: var(--green-dim); }
.portraitWrap img { width: 100%; height: 100%; object-fit: cover; }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ACCESSIBILITY */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* RESPONSIVE */
@media (max-width: 900px) { .article { max-width: 100%; } }
@media (max-width: 600px) {
  /* ── Layout ── */
  .wrap  { padding: 12px 12px 60px; }
  .top   { padding: 10px 12px; }

  /* ── Typography ── */
  h1  { font-size: 26px; }
  .h1 { font-size: 24px; line-height: 1.1; }
  .sub { font-size: 15px; }

  /* ── Header: hide mode label on mobile, keep buttons ── */
  .modeLabel { display: none !important; }

  /* ── Hero: static layout (no absolute positioning on mobile) ── */
  .heroFrame {
    border-radius: 10px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
  }
  .heroFrame img {
    max-height: 220px;
    min-height: 160px;
    object-fit: cover;
    object-position: center 30%;
    flex-shrink: 0;
  }
  .heroCenter {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    padding: 16px 16px 20px;
    background: linear-gradient(to bottom, rgba(4,7,5,.7) 0%, rgba(4,7,5,.97) 100%);
    flex: 1;
  }
  .heroFrame::after { display: none; }

  /* ── Hero text ── */
  .siteLockup { font-size: 10px; margin-bottom: 8px; }
  .kicker { font-size: 11px; padding: 4px 12px; margin-bottom: 12px; }
  .typewriter { font-size: 13px; margin: 12px auto 8px; }
  .intent { font-size: 12px; }

  /* ── CTAs: stack full width ── */
  .heroCtas {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
  }
  .btn { padding: 12px 16px; font-size: 13px; justify-content: center; }

  /* ── Stats: 2x2 grid, fix ∞ symbol size ── */
  .heroStats { grid-template-columns: 1fr 1fr; }
  .statNum   { font-size: 22px; }
  .statLabel { font-size: 10px; }
  .statItem  { padding: 14px 8px; }

  /* ── Hero band ── */
  .heroBand { padding: 14px 16px; margin-top: 12px; }
  .heroBand p { font-size: 14px; }

  /* ── Section spacing: more breathing room ── */
  .section { padding-top: 32px; padding-bottom: 32px; }
  .sectionHead { margin-bottom: 20px; }

  /* ── Cards: full width, comfortable padding ── */
  .card { padding: 16px; }

  /* ── splitGrid terminal block: contain overflow ── */
  .splitGrid { grid-template-columns: 1fr; gap: 16px; }
  .terminal  { overflow-x: auto; max-width: 100%; font-size: 12px; }
  .terminal pre { white-space: pre; overflow-x: auto; }
  pre { overflow-x: auto; font-size: 12px; }

  /* ── "See details" button: inline with heading ── */
  .sectionHead { display: block; }
  .sectionHead .seeAll {
    display: inline-block;
    margin-top: 8px;
  }

  /* ── Post nav ── */
  .postNav { flex-direction: column; gap: 10px; }
  .postNavRight { flex-direction: column; gap: 8px; width: 100%; }
  .postNavRight .btn { width: 100%; justify-content: center; }

  /* ── Dispatch items ── */
  .dispatchItem { flex-direction: column; gap: 6px; }
  .dispatchMeta { text-align: left; min-width: unset; }

  /* ── Related reading grid: 1 col ── */
  .relatedGrid { grid-template-columns: 1fr; }

  /* ── Modal: full width on mobile ── */
  .modal { width: calc(100% - 24px); max-width: 100%; }
}

/* ── 480px: very small screens ── */
@media (max-width: 480px) {
  .heroFrame img { max-height: 160px; }
  .h1 { font-size: 22px; }
  .heroStats { grid-template-columns: 1fr 1fr; gap: 1px; }
  .statNum { font-size: 20px; }
}

/* Reading progress bar */
.readProgress {
  position: fixed; top: 0; left: 0; z-index: 999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--green-mid), var(--green));
  transition: width .1s linear;
  pointer-events: none;
}

/* Simplified postNav */
.postNav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.postNav.top { margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.postNav.bottom { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.postNavRight { display: flex; gap: 10px; }

/* Breadcrumbs — already defined, just reinforce */
.crumbs { 
  font-family: var(--mono); font-size: 12px; color: var(--text-dim); 
  margin-bottom: 20px; 
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.crumbs a { color: var(--text-dim); padding: 3px 0; }
.crumbs a:hover { color: var(--green-mid); }
.crumbSep { margin: 0 8px; opacity: .4; }

/* Related reading block */
.relatedReading {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.relatedReading h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px; 
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px;
}
.relatedGrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.relatedCard {
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px;
  background-color: var(--card);
  transition: border-color .2s, background-color .2s;
}
.relatedCard:hover { border-color: var(--line2); background-color: var(--card2); }
.relatedCard span { font-family: var(--mono); font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 6px; }
.relatedCard strong { font-family: var(--display); font-size: 14px; color: var(--text); display: block; line-height: 1.35; }
@media (max-width: 600px) { .relatedGrid { grid-template-columns: 1fr; } }


/* ── FAIL output block — red signal ────────────────────────────────── */
.output-block.output-fail            { border: 1px solid rgba(220,50,50,0.35); border-radius: 6px; }
.output-toolbar-fail                 { background: rgba(180,30,30,0.18) !important; color: #e05555 !important; border-bottom: 1px solid rgba(220,50,50,0.30); }
.pre-fail                            { color: var(--text-dim) !important; }
.pre-fail .o-red                     { color: #e05555 !important; font-weight: 600; }
.o-red                               { color: #e05555 !important; }
.o-green                             { color: var(--green) !important; }
