:root{
  --bg: #050607;
  --bg2:#07090b;
  --text:#d7dde3;
  --muted:#b8bdc2;       /* solid replacement for rgba(215,221,227,.78); ≥7:1 on --bg */

  --neon:#39ff14;        /* classic matrix green */
  --neon-link:#7cff52;   /* slightly desaturated for in-prose links to maintain 4.5:1 with surrounding bg overlays */
  --neon2:#00ffa8;       /* optional secondary accent */
  --border: rgba(57,255,20,.18);
  --shadow: 0 0 0.75rem rgba(57,255,20,.18);
  --radius: 1.25rem;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";

  /* Override Bootstrap dark-theme tokens with solid values that meet WCAG AA on --bg */
  --bs-body-color: #d7dde3;
  --bs-secondary-color: #b8bdc2;
  --bs-tertiary-color: #a4aab0;
  --bs-emphasis-color: #e6eaee;
  --bs-link-color: #7cff52;
  --bs-link-hover-color: #b7ffad;
}

html, body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body{
  background:
    radial-gradient(360px 280px at 12% 8%,   rgba(57,255,20,.05), transparent 70%),
    radial-gradient(320px 260px at 38% 22%,  rgba(0,255,168,.04), transparent 70%),
    radial-gradient(280px 220px at 62% 6%,   rgba(57,255,20,.04), transparent 70%),
    radial-gradient(340px 260px at 88% 18%,  rgba(0,255,168,.05), transparent 70%),
    radial-gradient(300px 240px at 25% 55%,  rgba(57,255,20,.03), transparent 70%),
    radial-gradient(320px 250px at 75% 70%,  rgba(0,255,168,.03), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
}

/* subtle film grain (cheap + effective; also dithers gradient banding) */
body::before{
  content:"";
  position: fixed; inset:0;
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity:.28;
}

/* optional scanline vibe */
.scanlines::after{
  content:"";
  position: fixed; inset:0;
  pointer-events:none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.03),
    rgba(255,255,255,.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity:.12;
}

a { color: var(--neon); text-decoration: none; }
a:hover { color: #b7ffad; }

.navbar{
  background: rgba(0,0,0,.35) !important;
  border-bottom: 1px solid rgba(57,255,20,.12);
  backdrop-filter: blur(10px);
}
.navbar-brand{
  font-family: var(--mono);
  letter-spacing: .06em;
  color: var(--neon) !important;
  text-shadow: 0 0 10px rgba(57,255,20,.25);
}
.nav-link{
  color: #b8bdc2 !important;     /* solid; ≥7:1 on --bg */
  font-family: var(--mono);
}
.nav-link:hover{ color: var(--neon) !important; }

.terminal-card{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.35);
  border-radius: var(--radius);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.terminal-card:hover{
  transform: translateY(-2px);
  border-color: rgba(57,255,20,.28);
  box-shadow: var(--shadow);
}

.badge-neon{
  font-family: var(--mono);
  border: 1px solid rgba(57,255,20,.25);
  color: var(--neon);
  background: rgba(57,255,20,.06);
}

.h-mono{
  font-family: var(--mono);
  letter-spacing: .02em;
}
.lede{ color: #b8bdc2; }       /* solid; ≥7:1 on --bg */

.btn-neon{
  --bs-btn-color: #031000;
  --bs-btn-bg: var(--neon);
  --bs-btn-border-color: var(--neon);
  --bs-btn-hover-bg: #b7ffad;
  --bs-btn-hover-border-color: #b7ffad;
  font-family: var(--mono);
}
.btn-outline-neon{
  --bs-btn-color: var(--neon);
  --bs-btn-border-color: rgba(57,255,20,.35);
  --bs-btn-hover-bg: rgba(57,255,20,.10);
  --bs-btn-hover-border-color: rgba(57,255,20,.55);
  font-family: var(--mono);
}

/* blog typography */
.prose h1,.prose h2,.prose h3{ font-family: var(--mono); }
.prose p, .prose li{ color: #c8ced3; line-height: 1.65; }   /* solid; ≥9:1 on --bg */

/* in-text links must be distinguishable without color alone (WCAG 1.4.1) */
.prose a:not(.btn),
.text-secondary a:not(.btn),
#al-ledger a:not(.btn){
  color: var(--neon-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.prose a:not(.btn):hover,
.text-secondary a:not(.btn):hover,
#al-ledger a:not(.btn):hover{ color: #b7ffad; text-decoration-thickness: 2px; }

/* Inline code styling */
.prose code:not([class*="language-"]) {
  background: rgba(57,255,20,.08);
  border: 1px solid rgba(57,255,20,.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: var(--mono);
  font-size: 0.9em;
  word-break: break-word;
}

/* Mobile-friendly prose text */
@media (max-width: 768px) {
  .prose {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  .prose h1, .prose h2, .prose h3 {
    font-size: 1.2rem;
  }
  
  .prose p {
    font-size: 0.95rem;
  }
}
/* Only apply prose image spacing to “real article images” */
.prose > p > img,
.prose > img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 0.5rem;
}

/* Center responsive images produced by the {% image %} shortcode */
.prose picture {
  display: block;
  margin: 1rem auto;     /* centers + adds vertical space */
  max-width: 100%;
}

.prose picture > img {
  display: block;
  margin: auto;             /* margin belongs to picture now */
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}


/* image sizing variants for prose content */
.prose-img-lg {
  width: 100% !important;
  max-width: 100%;
}

.prose-img-md {
  width: 75% !important;
  max-width: 100%;
}

.prose-img-sm {
  width: 50% !important;
  max-width: 100%;
}

/* Mermaid diagrams — both build-time SVG (.diagram) and client-side div.mermaid */
.diagram,
.prose div.mermaid {
  margin: 1.5rem auto;
  padding: 1rem;
  background: #050607;
  border: 1px solid rgba(57, 255, 20, 0.18);
  border-radius: 6px;
  text-align: center;
  overflow-x: auto;
}
.diagram svg,
.prose div.mermaid svg {
  max-width: 100%;
  height: auto;
  display: inline-block;
}
.diagram .mermaid-svg {
  width: 100%;
}
.prose div.mermaid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #cfd6d3;
}

/* --- Base <pre> styling (kept) --- */
.prose pre{
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(57,255,20,.18);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .prose pre {
    font-size: 0.70rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
  }
}

/* =========================================================
   Prism / Eleventy syntaxhighlight support (FIX)
   Eleventy plugin emits: pre.language-xxx > code.language-xxx
   with spans like: <span class="token keyword">...</span>
   ========================================================= */

/* Make fenced blocks look like your custom block + preserve indent */
.prose pre[class*="language-"]{
  background: #0d1117; /* match your code-block */
  border: 1px solid rgba(57,255,20,.18);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.4;
  color: #e6edf3;
  white-space: pre;       /* keep indentation */
  max-width: 100%;
  margin: 0.75rem 0;
}

@media (max-width: 768px) {
  .prose pre[class*="language-"] {
    font-size: 0.70rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
  }
}

.prose pre[class*="language-"] code{
  display: block;
  white-space: pre;       /* keep indentation */
  font-family: inherit;
  word-wrap: normal;
  overflow-x: auto;
}

/* Prism token colors (minimal, readable, neon-ish) */
.prose .token.comment,
.prose .token.prolog,
.prose .token.doctype,
.prose .token.cdata{
  opacity: .75;
}

.prose .token.keyword,
.prose .token.important,
.prose .token.selector,
.prose .token.atrule{
  color: var(--neon);
}

.prose .token.string,
.prose .token.char,
.prose .token.attr-value,
.prose .token.regex,
.prose .token.variable{
  color: #b7ffad;
}

.prose .token.number,
.prose .token.boolean,
.prose .token.constant,
.prose .token.symbol{
  color: #8be9fd;
}

.prose .token.function,
.prose .token.class-name{
  color: #ffd866;
}

.prose .token.operator,
.prose .token.punctuation{
  opacity: .9;
}

/* Prism nests spans inside <pre>; preserve whitespace in all of them */
.prose pre[class*="language-"] *{
  white-space: pre;
}


.code-block-label {
  display: inline-block;
  background: rgba(57,255,20,.15);
  border: 1px solid rgba(57,255,20,.25);
  color: #39ff14;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

/* Inline code in prose (not in pre blocks) */
.prose p code,
.prose li code,
.prose strong code {
  background: rgba(57,255,20,.08);
  border: 1px solid rgba(57,255,20,.18);
  padding: .1rem .35rem;
  border-radius: .5rem;
  color: #b7ffad;
}

.terminal {
  border: 1px solid rgba(57,255,20,.18);
  background: rgba(0,0,0,.45);
  border-radius: 1.25rem;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: .35rem;
  opacity: .9;
  font-family: var(--mono);
  color: rgba(215,221,227,.75);
}

.dot { width: .65rem; height: .65rem; border-radius: 999px; display: inline-block; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title { letter-spacing: .04em; }

.contact-pane-label{
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(57,255,20,.65);
}

.contact-other{
  border-left: 1px solid rgba(57,255,20,.14);
  padding-left: 1.25rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s ease, transform .55s ease;
}
.contact-other.is-hidden{
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
@media (max-width: 767.98px){
  .contact-other{
    border-left: 0;
    border-top: 1px solid rgba(57,255,20,.14);
    padding-left: 0;
    padding-top: 1rem;
    margin-top: .5rem;
  }
}

.contact-list li{ margin-bottom: .75rem; }
.contact-list li:last-child{ margin-bottom: 0; }
.contact-list a{
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--mono);
  color: #b7ffad;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}
.contact-list a:hover{
  color: var(--neon);
  border-bottom-color: rgba(57,255,20,.45);
}
.contact-icon{
  flex: 0 0 18px;
  color: var(--neon);
}

/* ===== Agents looking-glass (al-*) ===== */

.al-section-label{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  margin-top: 3.5rem;
  margin-bottom: .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(150,180,200,.14);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(170,190,210,.55);
}
.al-section-label:first-child{ margin-top: 1.5rem; }
.al-section-link{
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--neon2);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.al-section-link:hover{ border-bottom-color: rgba(0,255,168,.45); }
.al-section-label + .al-index,
.al-section-label + .al-ledger,
.al-section-label + .al-refs{ margin-top: 0; }


.al-index{
  position: relative;
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(0,255,168,.22);
  border-radius: 14px;
  background: rgba(8,14,16,.85);
  transition: border-color .15s ease;
}
.al-index:hover{ border-color: rgba(0,255,168,.40); }
.al-index-foot{ margin-top: .85rem; }
.al-index-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .9rem;
}
.al-index-title{ display: flex; align-items: center; gap: .6rem; min-width: 0; }
.al-index-title h2{
  font-family: var(--mono);
  font-size: 1rem;
  margin: 0;
  color: rgba(220,230,240,.92);
  letter-spacing: .02em;
  word-break: break-all;
}
.al-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
  border-radius: 6px;
  background: rgba(0,255,168,.10);
  color: var(--neon2);
  flex: 0 0 auto;
}
.al-icon svg{ display: block; }
.al-records{ display: grid; gap: .5rem; margin: 0; }
.al-record{
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: .75rem;
  align-items: start;
}
.al-record dt{
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(170,190,210,.55);
  padding-top: .2rem;
  margin: 0;
}
.al-rdata{
  font-family: var(--mono);
  font-size: .78rem;
  color: rgba(220,235,245,.88);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(150,180,200,.12);
  border-radius: .5rem;
  padding: .55rem .75rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 2.3rem;
}

.al-status{
  font-family: var(--mono);
  font-size: .7rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(150,180,200,.20);
  background: rgba(150,180,200,.05);
  color: rgba(200,215,225,.8);
  letter-spacing: .02em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.al-status[data-status="loading"]{
  color: rgba(200,215,225,.6);
  border-color: rgba(150,180,200,.15);
  background: rgba(150,180,200,.04);
}
.al-status[data-status="ok"]{
  color: rgba(200,215,225,.85);
  border-color: rgba(150,180,200,.35);
  background: rgba(150,180,200,.08);
}
.al-status[data-status="verified"]{
  color: var(--neon2);
  border-color: rgba(0,255,168,.45);
  background: rgba(0,255,168,.10);
}
.al-status[data-status="warn"]{
  color: #ffcc00;
  border-color: rgba(255,204,0,.45);
  background: rgba(255,204,0,.08);
}
.al-status[data-status="error"]{
  color: #ffaa3d;
  border-color: rgba(255,170,61,.45);
  background: rgba(255,170,61,.08);
}

.al-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-top: 1rem;
}
.al-grid > .al-card:nth-child(5):last-child{
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - .45rem);
}
@media (max-width: 560px){
  .al-grid{ grid-template-columns: 1fr; }
  .al-grid > .al-card:nth-child(5):last-child{ max-width: 100%; }
}
.al-card{
  position: relative;
  border: 1px solid rgba(150,180,200,.16);
  border-radius: 12px;
  background: rgba(0,0,0,.32);
  padding: .75rem .85rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  transition: border-color .15s ease;
}
.al-card:hover{ border-color: rgba(0,255,168,.30); }
.al-card-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.al-card-name{
  font-family: var(--mono);
  font-size: .98rem;
  color: var(--neon);
  margin: 0;
  letter-spacing: .02em;
}
.al-badges{ display: flex; flex-wrap: wrap; gap: .3rem; }
.al-badge{
  font-family: var(--mono);
  font-size: .66rem;
  padding: .1rem .45rem;
  border-radius: .35rem;
  border: 1px solid rgba(150,180,200,.20);
  background: rgba(150,180,200,.05);
  color: rgba(200,215,225,.8);
  letter-spacing: .02em;
}
.al-badge--proto{
  color: #ffaa3d;
  background: rgba(255,170,61,.08);
  border-color: rgba(255,170,61,.35);
}
.al-badge--realm{
  color: #b787ff;
  background: rgba(183,135,255,.08);
  border-color: rgba(183,135,255,.30);
}
.al-badge--cat{
  color: rgba(200,215,225,.78);
  background: rgba(150,180,200,.06);
  border-color: rgba(150,180,200,.22);
}
.al-badge--live{
  color: var(--neon2);
  background: rgba(0,255,168,.18);
  border-color: rgba(0,255,168,.55);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .62rem;
  padding: .12rem .55rem;
  animation: al-live-pulse 2.6s ease-in-out infinite;
}
@keyframes al-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,168,0); }
  50%      { box-shadow: 0 0 0 4px rgba(0,255,168,.10); }
}
.al-badge--planned{
  color: rgba(170,190,210,.55);
  background: rgba(150,180,200,.04);
  border-color: rgba(150,180,200,.18);
  font-style: italic;
  font-size: .62rem;
  letter-spacing: .08em;
}

.al-card--live{
  border-color: rgba(0,255,168,.32);
}
.al-card--live:hover{
  border-color: rgba(0,255,168,.55);
}
.al-card--planned{
  opacity: .82;
}
.al-card--planned .al-card-name{
  color: rgba(57,255,20,.7);
}

.al-peek--primary{
  background: rgba(0,255,168,.18);
  border-color: rgba(0,255,168,.55);
  color: var(--neon2);
  font-weight: 500;
}
.al-peek--primary:hover, .al-peek--primary:focus-visible{
  background: rgba(0,255,168,.28);
  border-color: rgba(0,255,168,.7);
  color: var(--neon2);
}
.al-card-fqdn{
  font-family: var(--mono);
  font-size: .7rem;
  color: rgba(170,190,210,.55);
  word-break: break-all;
}
.al-card-foot{
  display: flex;
  gap: .4rem;
  margin-top: auto;
  padding-top: .2rem;
}
.al-peek{
  font-family: var(--mono);
  font-size: .68rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .5rem;
  border-radius: .35rem;
  border: 1px solid rgba(0,255,168,.22);
  background: rgba(0,255,168,.06);
  color: rgba(167,255,232,.85);
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.al-peek:hover, .al-peek:focus-visible{
  color: var(--neon2);
  background: rgba(0,255,168,.14);
  border-color: rgba(0,255,168,.45);
  outline: none;
}

.al-popover{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  border: 1px solid rgba(0,255,168,.30);
  border-radius: 12px;
  background: rgba(5,8,10,.97);
  box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(0,255,168,.08) inset;
  padding: .6rem .75rem .7rem;
  max-height: 380px;
  overflow: auto;
}
.al-popover-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,255,168,.72);
  margin-bottom: .4rem;
}
.al-popover-close{
  background: transparent;
  border: 0;
  color: rgba(220,230,240,.5);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.al-popover-close:hover{ color: var(--neon2); }
.al-popover-body{
  font-family: var(--mono);
  font-size: .7rem;
  color: rgba(220,235,245,.92);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.al-ledger{
  position: relative;
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid rgba(0,255,168,.22);
  border-radius: 14px;
  background: rgba(8,14,16,.85);
}
.al-ledger-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.al-ledger-title{ display: flex; align-items: center; gap: .6rem; min-width: 0; }
.al-ledger-title h2{
  font-family: var(--mono);
  font-size: 1rem;
  margin: 0;
  color: var(--neon2);
  letter-spacing: .02em;
}
.al-ledger-icon{
  display: block;
  width: 1.6rem;
  height: 1.6rem;
  padding: .3rem;
  color: var(--neon2);
  background: rgba(0,255,168,.10);
  border-radius: 6px;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.al-ledger-link{
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--neon2);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.al-ledger-link:hover{ border-bottom-color: rgba(0,255,168,.45); }
.al-ledger-entries{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  position: relative;
}
.al-ledger-entries::before{
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(0,255,168,.6), rgba(0,255,168,.10));
}
.al-ledger-entry{
  position: relative;
  padding-left: 28px;
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: .9rem;
  align-items: start;
}
.al-ledger-entry::before{
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--neon2);
  box-shadow: 0 0 0 3px rgba(0,255,168,.15), 0 0 12px rgba(0,255,168,.35);
}
.al-ledger-meta{ display: flex; flex-direction: column; gap: .25rem; }
.al-ledger-label{
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--neon2);
  letter-spacing: .02em;
}
.al-ledger-meta code{
  font-size: .7rem;
  color: rgba(255,255,255,.6);
  background: transparent;
  padding: 0;
}
.al-ledger-body{
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--neon2);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(0,255,168,.14);
  border-radius: .5rem;
  padding: .55rem .75rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
}
.al-ledger-err{ color: #ffcc00; }

.al-refs{
  margin-top: 1.75rem;
  padding: 1rem 1.25rem 1.1rem;
  border: 1px solid rgba(150,180,200,.16);
  border-radius: 14px;
  background: rgba(8,14,16,.85);
}
.al-refs-cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}
@media (max-width: 640px){ .al-refs-cols{ grid-template-columns: 1fr; gap: 1.25rem; } }
.al-refs-colhead{
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(170,190,210,.55);
  margin: 0 0 .65rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(150,180,200,.12);
}
.al-refs-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.al-refs-list a{
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: rgba(220,235,245,.85);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 1px dashed transparent;
}
.al-refs-list a:hover{
  color: var(--neon2);
  border-bottom-color: rgba(0,255,168,.40);
}
.al-refs-kind{
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,255,168,.65);
  background: rgba(0,255,168,.06);
  border: 1px solid rgba(0,255,168,.20);
  border-radius: .3rem;
  padding: .05rem .4rem;
  flex: 0 0 auto;
}
@media (max-width: 640px){
  .al-ledger-entry{ grid-template-columns: 1fr; }
}

.terminal-screen {
  min-height: 180px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: var(--mono);
  color: #39ff14;
  text-shadow: 0 0 10px rgba(57,255,20,.18);
}

/* ===== /bookings/ tabbed terminal ===== */
.bookings-tabs{
  display: flex;
  gap: .25rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid rgba(57,255,20,.12);
}
.bookings-tab{
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  padding: .4rem .85rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: rgba(183,255,173,.55);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.bookings-tab:hover{
  color: rgba(183,255,173,.85);
  background: rgba(57,255,20,.04);
}
.bookings-tab.is-active{
  color: var(--neon);
  border-bottom-color: var(--neon);
  background: rgba(57,255,20,.06);
}
.bookings-tab:focus-visible{
  outline: 1px solid rgba(57,255,20,.4);
  outline-offset: 2px;
}

.bookings-endpoints{
  border: 1px solid rgba(150,180,200,.16);
  border-radius: 12px;
  background: rgba(8,14,16,.85);
  padding: 1rem 1.25rem 1.1rem;
}
.bookings-endpoints-head{
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(170,190,210,.55);
  margin: 0 0 .65rem;
}
.bookings-endpoints-list{
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--neon);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(57,255,20,.14);
  border-radius: .5rem;
  padding: .8rem 1rem;
  margin: 0 0 .85rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.bookings-endpoints-meta{
  font-family: var(--mono);
  font-size: .75rem;
  color: rgba(200,215,225,.7);
  margin: 0;
  line-height: 1.7;
  word-break: break-all;
}
.bookings-endpoints-meta a{
  color: rgba(167,255,232,.85);
  border-bottom: 1px dashed transparent;
}
.bookings-endpoints-meta a:hover{
  color: var(--neon2);
  border-bottom-color: rgba(0,255,168,.45);
}

/* Section label with inline protocol-surface pills */
.morpheus-label{ flex-wrap: wrap; row-gap: .5rem; }
.morpheus-label-head{
  display: flex;
  align-items: baseline;
  gap: .65rem;
  flex-wrap: wrap;
  min-width: 0;
}
.morpheus-surfaces{
  display: inline-flex;
  gap: .3rem;
  flex-wrap: wrap;
}
.morpheus-surface-wrap{
  position: relative;
  display: inline-block;
}
.morpheus-surface{
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .12rem .5rem;
  border-radius: .35rem;
  border: 1px solid rgba(57,255,20,.40);
  background: rgba(57,255,20,.08);
  color: var(--neon);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.morpheus-surface:hover, .morpheus-surface:focus-visible{
  background: rgba(57,255,20,.16);
  border-color: rgba(57,255,20,.6);
  outline: none;
}
.morpheus-pop{
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  margin-top: 4px;
  min-width: 22rem;
  max-width: 38rem;
  border: 1px solid rgba(0,255,168,.32);
  border-radius: 8px;
  background: rgba(5,8,10,.97);
  box-shadow: 0 14px 36px rgba(0,0,0,.55), 0 0 0 1px rgba(0,255,168,.06) inset;
  padding: .55rem .65rem .65rem;
}
.morpheus-pop-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,255,168,.72);
  margin-bottom: .4rem;
  padding: 0 .15rem;
}
.morpheus-pop-btn{
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: .3rem;
  border: 1px solid rgba(0,255,168,.40);
  background: rgba(0,255,168,.08);
  color: var(--neon2);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.morpheus-pop-btn:hover, .morpheus-pop-btn:focus-visible{
  background: rgba(0,255,168,.18);
  border-color: rgba(0,255,168,.60);
  outline: none;
}
.morpheus-pop-btn.is-copied{
  background: rgba(0,255,168,.25);
  border-color: rgba(0,255,168,.75);
  color: #d6fff0;
}
.morpheus-pop-body{
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.45;
  color: rgba(220,235,245,.92);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(0,255,168,.12);
  border-radius: 6px;
  padding: .55rem .7rem;
  margin: 0;
  white-space: pre;
  overflow: auto;
  max-height: 18rem;
  text-transform: none;
  letter-spacing: 0;
}

.morpheus-intro{
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-left: 3px solid rgba(57,255,20,.35);
  background: rgba(8,14,16,.55);
  border-radius: 0 6px 6px 0;
  font-size: .92rem;
  color: rgba(220,235,245,.85);
  line-height: 1.55;
}
.morpheus-intro strong{ color: var(--neon); font-weight: 600; }
.morpheus-intro code{
  font-family: var(--mono);
  font-size: .82rem;
  color: rgba(167,255,232,.95);
  background: rgba(0,255,168,.08);
  border: 1px solid rgba(0,255,168,.18);
  padding: .05em .35em;
  border-radius: 3px;
}

.cursor {
  display: inline-block;
  width: 1ch;
  height: 1.15em;
  vertical-align: -0.2em;
  background: rgba(57,255,20,.32);
  margin-left: 0;
  animation: blink 1s steps(1, end) infinite;
  border-radius: 0;
}

@keyframes blink { 50% { opacity: 0; } }

/* Fix “linked headings” looking like default blue links */
.prose h1 a, .prose h2 a, .prose h3 a, .prose h4 a{
  color: inherit !important;
  text-decoration: none !important;
}
.prose h1 a:hover, .prose h2 a:hover, .prose h3 a:hover, .prose h4 a:hover{
  color: var(--neon) !important;
}


.hero-img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display:block;
}


/* ===== Post/Project HERO (predictable crop) ===== */
.hero-box{
  border: 1px solid rgba(57,255,20,.18);
  background: rgba(0,0,0,.35);
  border-radius: 18px;
  overflow: hidden;
}

/* choose your shapes here */
.hero-box--wide{
  aspect-ratio: 21 / 9;     /* wide cinematic */
  max-height: 420px;        /* keeps it from getting silly huge */
}

.hero-box--portrait{
  aspect-ratio: 4 / 5;      /* tall-ish */
  max-height: 640px;
}

/* show the whole image (no crop) — for wide terminal screenshots, diagrams,
   or anything where the edges matter. Letterboxes against the box background. */
.hero-box--contain{
  aspect-ratio: 21 / 9;
  max-height: 420px;
}

/* the important part: force fill + crop */
.hero-box picture,
.hero-box img{
  width: 100%;
  height: 100%;
  display: block;
}

.hero-box img{
  object-fit: cover;
  object-position: center;
}

.hero-box--contain img{
  object-fit: contain;
}

/* Card thumbnails on list pages */
.thumb{
  width: 240px;                 /* desktop target */
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(57,255,20,.25);
  background: rgba(0,0,0,.25);
  display: grid;                /* makes centering/fill easy */
  place-items: stretch;
}

.thumb picture{
  width: 100%;
  height: 100%;
  display: block;
}

.thumb img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;            /* predictable crop */
  display: block;
}

/* small variant if you want */
.thumb.sm{
  width: 240px;
}

/* mobile: let it stack full width */
@media (max-width: 767px){
  .thumb, .thumb.sm{
    width: 100%;
  }
}

.card-thumb{
  width: 220px;
  max-width: 35%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(57,255,20,.25);
  flex: 0 0 auto;
}

.card-thumb picture,
.card-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.text-neon { color: #39ff14; }
.text-warn { color: #ffcc00; }
.text-muted { color: rgba(255,255,255,.65); }

/* ===== Mobile hero/thumb containment (homepage “latest” + list cards) ===== */
@media (max-width: 767px){
  .thumb, .thumb.sm{
    width: min(240px, 92vw);   /* predictable size */
    margin-left: auto;         /* center it */
    margin-right: auto;
  }
}

/* Homepage: “latest drop” hero area — constrain size + center */
.terminal-card .thumb,
.terminal-card .thumb.sm,
.terminal-card .card-thumb {
  width: 100% !important;
  max-width: 520px;        /* keeps it from getting comically huge */
  margin: 0 auto;          /* center it */
}

/* Make the hero crop predictable in height on mobile */
.terminal-card .thumb,
.terminal-card .thumb.sm,
.terminal-card .card-thumb {
  aspect-ratio: 16 / 9;
}

.terminal-card .thumb img,
.terminal-card .card-thumb img,
.terminal-card .thumb picture,
.terminal-card .card-thumb picture {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;       /* predictable crop */
  display: block;
}

.code-wrap{ position: relative; }

.code-wrap .code-copy{
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  background: rgba(57,255,20,.15);
  border: 1px solid rgba(57,255,20,.25);
  color: #39ff14;
  padding: .35rem;
  border-radius: .5rem;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.code-wrap .code-copy:hover{
  background: rgba(57,255,20,.22);
  border-color: rgba(57,255,20,.40);
  color: var(--neon);
}

.code-copy .icon-check{ display: none; }
.code-copy.is-copied .icon-copy{ display: none; }
.code-copy.is-copied .icon-check{ display: inline-block; color: var(--neon2); }
.code-copy.is-copied{
  background: rgba(0,255,168,.12);
  border-color: rgba(0,255,168,.35);
}

/* make room for label + button */
.code-wrap pre[class*="language-"]{
  margin-top: .5rem;
  padding-top: 2.5rem;
}

.code-wrap .code-block-label{
  margin: 0;
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
}

/* ===== Code Group ===== */

.code-group{
  border: 1px solid rgba(57,255,20,.18);
  border-radius: var(--radius);
  background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  overflow: hidden;
  margin: 1.25rem 0;              /* more breathing room */
}

/* top bar for label + copy */
.code-group-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;          /* tighter but clean */
  background: rgba(0,0,0,.28);
  border-bottom: 1px solid rgba(57,255,20,.10);
}

/* label: smaller + slightly softer */
.code-group-head .code-block-label{
  margin: 0;
  font-size: .78rem;
  padding: .28rem .65rem;
  border-radius: .6rem;
  background: rgba(57,255,20,.10);
  border-color: rgba(57,255,20,.22);
}

/* Copy button: neon, not “default html button” */
.code-group .code-copy{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(57,255,20,.28);
  background: rgba(57,255,20,.15);
  color: #39ff14;
  padding: .35rem;
  border-radius: .6rem;
  cursor: pointer;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.code-group .code-copy:hover{
  background: rgba(57,255,20,.16);
  border-color: rgba(57,255,20,.45);
  box-shadow: 0 0 .65rem rgba(57,255,20,.12);
  transform: translateY(-1px);
}

.code-group .code-copy:active{
  transform: translateY(0px);
  box-shadow: none;
}

.code-group .code-copy.is-copied{
  background: rgba(0,255,168,.12);
  border-color: rgba(0,255,168,.35);
  color: var(--neon2);
}

/* Inside group: make it feel like ONE block */
.code-group .code-wrap{
  position: relative;
  margin: 0;
}

/* Tag badges on posts */
.post-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(57, 255, 20, 0.35);
  color: rgba(57, 255, 20, 0.9);
  background: rgba(57, 255, 20, 0.05);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}

.tag-badge:hover {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.6);
  color: var(--neon);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

@media (max-width: 768px) {
  .tag-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
  }
}
/* separators between the sections */
.code-group .code-wrap + .code-wrap{
  border-top: 1px solid rgba(57,255,20,.10);
}

/* remove “card padding” vibes per-section; group owns the frame */
.code-group .code-wrap pre[class*="language-"]{
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: .95rem .95rem 1.05rem; /* consistent interior spacing */
}

/* slightly reduce top whitespace on first section */
.code-group .code-wrap:first-of-type pre[class*="language-"]{
  padding-top: .85rem;
}

/* Never let framed/media images inherit prose margins */
.hero-box img,
.thumb img,
.card-thumb img{
  margin: 0 !important;
}


.prose table{
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: table;
  table-layout: auto;
  max-width: 100%;
}

.prose th, .prose td{
  border: 1px solid rgba(57,255,20,.18);
  padding: .5rem .75rem;
  vertical-align: top;
}

/* Mobile: allow horizontal scroll on narrow viewports by wrapping the table
   in its own scroll context. Desktop keeps normal table layout so columns
   stay aligned between header and body. */
@media (max-width: 640px) {
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose thead, .prose tbody {
    display: table;
    width: 100%;
  }
}

.prose th{
  background: rgba(0,0,0,.35);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.prose td {
  font-size: 0.85rem;
}

/* ======================================================================
   Print styles — invert the matrix-dark theme to ink-friendly light
   so users printing a post to PDF get legible output. The on-screen
   experience is unaffected; this only activates for print/PDF export.
   ====================================================================== */
@media print {
  /* Base: flip dark substrate to white, light text to dark */
  html, body, body.scanlines {
    background: #fff !important;
    color: #1a1a1a !important;
  }
  /* Kill the CRT scanline overlay + radial vignettes */
  body.scanlines::before,
  body.scanlines::after,
  body::before,
  body::after { display: none !important; background: none !important; }

  /* Headings — keep neon-green identity but darken enough to print legibly */
  h1, h2, h3, h4, h5, h6,
  .h-mono, .text-neon {
    color: #0a4d0a !important;
  }
  .text-warn { color: #8a4a00 !important; }

  /* Links — visible underline + dark green */
  a, a:visited {
    color: #0a4d0a !important;
    text-decoration: underline;
  }
  /* Expand external link URLs after the link text */
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 85%;
    color: #555;
    word-break: break-all;
  }
  /* …but don't echo the URL for inline links inside heading anchors or images */
  .prose h1 a::after, .prose h2 a::after, .prose h3 a::after,
  .prose h4 a::after, .prose h5 a::after, .prose h6 a::after,
  .prose img + a::after { content: "" !important; }

  /* Code blocks, terminal cards: light bg, dark text, no scrollbars */
  pre, code,
  .code-wrap, .code-group,
  pre[class*="language-"],
  .terminal-card, .terminal, .terminal-screen {
    background: #f5f5f5 !important;
    color: #111 !important;
    border-color: #ccc !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  pre code,
  pre code [class*="token"] {
    color: #111 !important;
    background: none !important;
  }
  /* Prism token colors — readable on light bg */
  .token.comment, .token.prolog, .token.doctype, .token.cdata { color: #6a737d !important; font-style: italic; }
  .token.string, .token.attr-value { color: #a31515 !important; }
  .token.keyword, .token.boolean, .token.null, .token.atrule { color: #0033b3 !important; }
  .token.function, .token.class-name { color: #6f42c1 !important; }
  .token.number, .token.tag, .token.constant { color: #005cc5 !important; }
  .token.punctuation, .token.operator { color: #1a1a1a !important; }

  /* Hide interactive chrome that has no meaning on paper */
  header, footer, nav,
  .code-copy, .code-copy-group,
  .code-block-label,
  button {
    display: none !important;
  }

  /* Mermaid diagrams (build-time SVG + client-side fallback) — invert
     the dark theme to print-readable. Hue-rotate keeps neon-green
     elements in the green family rather than flipping to magenta. */
  .diagram,
  .prose div.mermaid {
    background: #fff !important;
    border: 1px solid #ccc !important;
    padding: 0.5rem !important;
    page-break-inside: avoid;
  }
  .diagram svg,
  .prose div.mermaid svg {
    filter: invert(1) hue-rotate(180deg);
  }

  /* Hero image — same trick, since heroes are matrix-dark too */
  .hero-img {
    filter: invert(1) hue-rotate(180deg);
    max-width: 100% !important;
    height: auto !important;
  }
  .hero-box {
    background: #fff !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  /* Badges, tags, pills — keep visible but dark */
  .badge-neon, .tag-badge, .post-tags, .post-tags * {
    color: #0a4d0a !important;
    background: #fff !important;
    border-color: #0a4d0a !important;
  }

  /* Tables: borders + dark text */
  .prose table, .prose th, .prose td {
    color: #111 !important;
    border-color: #999 !important;
    background: #fff !important;
  }
  .prose th { background: #f0f0f0 !important; }

  /* Blockquotes + callouts */
  .prose blockquote, mark {
    background: #fff8c5 !important;
    color: #111 !important;
    border-left: 3px solid #999 !important;
  }

  /* Page breaks — keep code, tables, figures intact when possible */
  pre, .terminal-card, figure, table { page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; }

  /* Use the full page width since we hide nav */
  .container, .prose {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


/* ---------------------------------------------------------------------------
 * Reduced motion (WCAG 2.3.3 Animation from Interactions)
 * Disables decorative noise overlay, scanlines, card hover lifts, and any
 * other transition/transform animation for users who set prefers-reduced-motion.
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  /* Kill the noise grain overlay (mix-blend-mode + fractal can trigger nausea) */
  body::before { display: none !important; }

  /* Kill scanlines */
  .scanlines::after { display: none !important; }

  /* Card hover lift → no movement, only a static border accent */
  .terminal-card,
  .terminal-card:hover {
    transition: none !important;
    transform: none !important;
  }

  /* Global animation/transition zero-out (any element using either) */
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
