/* billgernert.com - shared stylesheet
   Palette + type inherited verbatim from site/index.html so the interior pages
   read as one continuation of billgernert.com, not a bolt-on. Single neon-dark
   theme is a deliberate commitment, matching the parent site's color-scheme: dark. */

:root {
  --bg: #0a0e1a;
  --bg-raised: #0e1526;
  --fg: #e0e8ff;
  --muted: #8fa8c8;
  --quiet: #5f7799;
  --cyan: #00d4ff;
  --blue: #0066ff;
  --green: #00ff96;
  --border: rgba(0, 212, 255, 0.22);
  --border-quiet: rgba(143, 168, 200, 0.18);
  --border-strong: rgba(0, 212, 255, 0.45);
  --card: rgba(0, 212, 255, 0.035);
  --card-hover: rgba(0, 212, 255, 0.07);
  --green-wash: rgba(0, 255, 150, 0.06);
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Exo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.68;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 16% 8%, rgba(0, 102, 255, 0.12) 0%, transparent 42%),
    radial-gradient(ellipse at 88% 74%, rgba(0, 255, 150, 0.07) 0%, transparent 42%);
  background-attachment: fixed;
}

.page {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 72px;
}
main { width: 100%; margin: 0 auto; }
.page-narrow { max-width: 860px; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 8px 12px;
  color: #001018;
  background: var(--cyan);
  border-radius: 6px;
  font-family: var(--mono);
}
.skip-link:focus { transform: translateY(0); }

/* ---- breadcrumb / back nav ---- */
.crumbs {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--quiet);
  margin: 22px 0 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.crumbs a { color: var(--quiet); }
.crumbs a:hover { color: var(--cyan); text-decoration: none; }
.crumbs .sep { color: rgba(95, 119, 153, 0.5); }
.crumbs .here { color: var(--fg); }

/* ---- on-page navigation: Projects palette, numbered titles and section summaries ---- */
nav[aria-label="On this page"] {
  display: block;
  margin: 0 0 4rem;
  padding: 1.3rem;
  border: 1px solid rgba(174, 187, 208, 0.22);
  border-radius: 14px;
  background: rgba(8, 14, 26, 0.76);
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}
.section-nav-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}
.section-nav-head h2 {
  margin: 0;
  color: #fff;
  font: 1rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-nav-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.section-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  counter-reset: section-nav;
}
nav[aria-label="On this page"] .section-nav-card {
  --section-accent: 0, 212, 255;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "number title arrow" ". detail detail";
  gap: 0.3rem 0.7rem;
  min-height: 112px;
  align-content: center;
  padding: 1rem;
  border: 1px solid rgba(var(--section-accent), 0.44);
  border-radius: 10px;
  background: rgba(var(--section-accent), 0.045);
  color: #eef4fb;
  font: inherit;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  transition: background 0.16s ease, border-color 0.16s ease;
  counter-increment: section-nav;
}
nav[aria-label="On this page"] .section-nav-card:hover,
nav[aria-label="On this page"] .section-nav-card:focus-visible {
  border-color: rgb(var(--section-accent));
  background: rgba(var(--section-accent), 0.09);
  color: #eef4fb;
  text-decoration: none;
}
nav[aria-label="On this page"] .section-nav-card:nth-child(4n + 2) { --section-accent: 0, 255, 150; }
nav[aria-label="On this page"] .section-nav-card:nth-child(4n + 3) { --section-accent: 255, 209, 102; }
nav[aria-label="On this page"] .section-nav-card:nth-child(4n + 4) { --section-accent: 182, 156, 255; }
.section-nav-number,
.section-nav-arrow { color: rgb(var(--section-accent)); font: 0.7rem var(--mono); }
.section-nav-number { grid-area: number; padding-top: 0.3rem; }
.section-nav-arrow { grid-area: arrow; padding-top: 0.3rem; }
.section-nav-number::before { content: counter(section-nav, decimal-leading-zero); }
.section-nav-title { grid-area: title; overflow-wrap: anywhere; min-width: 0; color: #fff; font-weight: 600; line-height: 1.35; }

.section-nav-detail { grid-area: detail; color: var(--muted); font-size: 0.8rem; line-height: 1.4; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .section-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  nav[aria-label="On this page"] { padding: 0.9rem; }
  .section-nav-head { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .section-nav-grid { grid-template-columns: 1fr; }
}

/* ---- site header: keep every interior page aligned with the homepage ---- */
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border-quiet);
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: #fff;
  font-family: var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.site-header .brand:hover { color: var(--cyan); text-decoration: none; }
.site-header .brand-mark { width: 30px; height: 30px; }

/* ---- site-wide top navigation (item 136), nested inside .site-header ---- */
.topnav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--cyan); text-decoration: none; }
.topnav a.active { color: #fff; }
.topnav .topnav-spacer { flex: 1 1 auto; }
/* Nav group labels used to be a plain, unclickable `.topnav-group` span (item 467's first build) - the
   row grew instead of collapsing, because a label with no link and the flat list beside it is a divider,
   not a group. Corrected (item 467 correction, entry 48/49): each group label is now a real `<a>` in the
   primary row (styled by the plain `.topnav a` rule above), pointing at that group's hub page. */
@media (max-width: 860px) { .topnav .topnav-spacer { display: none; } }
@media (max-width: 620px) {
  .page { width: min(100% - 28px, 1080px); }
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px 0;
  }
  .topnav { gap: 7px 14px; }
  .topnav a[rel="me"] { display: none; }
}

/* ---- shared eyebrow + headings ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.16;
  letter-spacing: -1px;
  color: #fff;
  text-wrap: balance;
  margin-bottom: 16px;
}

.lede { font-size: 1.12rem; color: #fff; font-weight: 300; text-wrap: pretty; }

p { margin: 0 0 18px; color: var(--fg); font-weight: 300; }
p b, li b { color: #fff; font-weight: 600; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--green);
  background: var(--green-wash);
  padding: 1px 5px;
  border-radius: 4px;
}
.note { color: var(--muted); font-size: 0.97rem; }

/* Code excerpts (item 136, /projects/). Deliberately NOT syntax-highlighted: the site's CSP
   allows no scripts at all, and hand-painting fake token colors would be decoration pretending
   to be a highlighter. Long lines scroll inside the block so the page body never scrolls
   sideways on a phone. */
pre.excerpt {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 16px 0 6px;
  overflow-x: auto;
  tab-size: 4;
}
pre.excerpt code {
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}
.excerpt-cap {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 18px;
}
.stages {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px 12px 34px;
  margin: 16px 0;
}
.stages li { margin: 3px 0; }
.stages li::marker { color: var(--cyan); }
.stages b { color: var(--green); font-weight: 600; }

/* ---- Projects index: numbered one-line entries (item 449) ---- */
/* A native <ol>, not a CSS counter: the number is real list semantics, so it survives with CSS off and
   is announced correctly by assistive tech, exactly like .stages above. */
.project-list {
  margin: 18px 0;
  padding-left: 26px;
}
.project-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 300;
}
.project-list li:first-child { padding-top: 0; }
.project-list li:last-child { border-bottom: none; }
.project-list li::marker { color: var(--cyan); font-family: var(--mono); }
.project-list b { color: #fff; font-weight: 600; }
.project-list a { white-space: nowrap; }
.coming-soon {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* ==========================================================================
   DIAGRAM PAGE (item 136 PR5)
   Pure HTML/CSS, no scripts: the site's CSP is default-src 'none', so a click
   handler is not an option. The "clickable regions" are real anchors into the
   explanation cards below, and :target does the highlighting a handler would
   otherwise do. That also means the regions work with JS off, keyboard-focus
   correctly, and survive being opened in a new tab.
   ========================================================================== */

.diagram { margin: 20px 0 10px; }
.tier {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 10px 12px 12px;
  margin-bottom: 8px;
}
.tier-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.tier-row { display: flex; flex-wrap: wrap; gap: 8px; }
a.dnode {
  flex: 1 1 130px;
  min-width: 116px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  text-decoration: none;
  display: block;
}
a.dnode:hover, a.dnode:focus-visible {
  border-color: var(--border-strong);
  background: var(--card-hover);
  text-decoration: none;
}
.dnode-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--cyan);
}
.dnode-role {
  display: block;
  font-size: 0.71rem;
  line-height: 1.45;
  color: var(--muted);
}
.flow {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin: 1px 0;
}
.region-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  padding: 12px 15px;
  margin: 10px 0;
  scroll-margin-top: 14px;
}
.region-card:target {
  border-left-color: var(--green);
  background: var(--green-wash);
}
.region-card h3 {
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 1px;
  color: var(--cyan);
  margin-bottom: 2px;
}
.region-card p { margin: 8px 0 0; font-size: 0.95rem; }

/* ---- diagram page: topology section (item 450) ----
   The operator's approved SVG layout, re-skinned onto this page's own shared palette (var(--bg),
   var(--cyan), etc.) instead of the standalone draft's own :root variables, so there is one theme for
   the whole site rather than a per-section one. Classes are prefixed topo- so nothing here can collide
   with an unrelated rule elsewhere in this file. */
.topology-diagram { display: block; width: 100%; height: auto; margin-top: 14px; }
.topology-diagram a { text-decoration: none; }
.topo-node rect {
  fill: var(--card);
  stroke: var(--border-strong);
  stroke-width: 1;
  rx: 6;
}
.topo-node:hover rect { stroke: var(--cyan); cursor: pointer; }
.topo-chev-path { stroke: var(--border-strong); }
.topo-t { font-family: var(--mono); font-size: 13px; fill: var(--cyan); }
.topo-s { font-family: var(--sans); font-size: 11.5px; fill: var(--muted); }
.topo-zone { fill: none; stroke: var(--border); stroke-dasharray: 4 4; rx: 10; }
.topo-zone-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  fill: var(--muted);
}
.topo-wire { stroke: var(--border-strong); stroke-width: 1; fill: none; }
.topo-wire-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; fill: var(--muted); }

/* ==========================================================================
   INDEX PAGE
   ========================================================================== */

.index-hero { margin-bottom: 8px; }
.index-hero .lede { max-width: 62ch; }

.count-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.count-strip b { color: var(--cyan); font-weight: 400; }

.category { margin-top: 52px; }
.category > h2 {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  border-left: 3px solid var(--cyan);
  padding-left: 10px;
  margin-bottom: 18px;
}
.category[data-accent="green"] > h2 { color: var(--green); border-left-color: var(--green); }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 16px 18px 18px;
  position: relative;
  overflow: hidden;
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.15s;
}
.skill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  /* Literal colors (not var(--cyan)/var(--blue)) in these gradients on purpose: the vnu
     (html5validator) CSS checker does not resolve custom properties, so var() color stops read
     as "too few values for linear-gradient". Same fix already applied to site/index.html's inline
     gradient; renders identically - the values are exactly what :root holds
     (--cyan #00d4ff, --blue #0066ff, --green #00ff96). */
  background: linear-gradient(90deg, #00d4ff, #0066ff);
}
.category[data-accent="green"] .skill-card::before {
  background: linear-gradient(90deg, #00ff96, #00cc66);
}
.skill-card:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  background: var(--card-hover);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.14);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) { .skill-card:hover { transform: none; } }

.skill-card .name {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 1px;
  color: #fff;
}
.skill-card .desc {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--fg);
  line-height: 1.5;
}
.skill-card .arrow {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.skill-card:hover .arrow { color: var(--cyan); }
.category[data-accent="green"] .skill-card:hover .arrow { color: var(--green); }

/* status dot: solid = has a real writeup, hollow = coming */
.skill-card .name::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  vertical-align: middle;
  border: 1px solid var(--muted);
  background: transparent;
}
.skill-card[data-status="live"] .name::before {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 255, 150, 0.5);
}

/* ==========================================================================
   SKILL PAGE
   ========================================================================== */

.skill-head { margin-bottom: 12px; padding-top: 30px; }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.badge[data-accent="green"] { color: var(--green); border-color: rgba(0, 255, 150, 0.45); }

.descriptor {
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  font-weight: 300;
  color: var(--fg);
  text-wrap: pretty;
  max-width: 64ch;
  margin-bottom: 22px;
}

.skill-body { margin-top: 8px; }

section.block { margin-top: 52px; }
section.block > h2 {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: none;
  color: #fff;
  border-left: 0;
  padding-left: 0;
  margin-bottom: 18px;
}

section.block ul { margin: 14px 0; padding-left: 20px; }
section.block li { margin: 8px 0; font-weight: 300; }
section.block li::marker { color: var(--cyan); }

.at-a-glance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--border);
  background: var(--border);
}
.at-a-glance div { padding: 16px 18px; background: var(--panel); }
.at-a-glance dt {
  margin-bottom: 7px;
  color: var(--cyan);
  font: 0.72rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.at-a-glance dd { margin: 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 700px) {
  .at-a-glance { grid-template-columns: 1fr; }
}

/* Public-safe Grafana evidence embedded on project and platform pages. */
.live-status {
  font-family: "Share Tech Mono", monospace;
  color: var(--muted);
}
.live-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 10px;
  background: #0a0e1a;
}
.live-frame-tall {
  min-height: 1500px;
}
.live-wide {
  width: min(1320px, calc(100vw - 32px));
  margin-left: 50%;
  transform: translateX(-50%);
}
.live-fallback[hidden],
.live-frame[hidden] {
  display: none;
}

figure.shot img,
figure.engineering-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

section.block ul.legend-swatches {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: var(--muted);
}
section.block ul.legend-swatches li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0;
}
section.block ul.legend-swatches li::marker { content: ""; }
.legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.1rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(10, 14, 26, 0.6) inset;
}
.legend-swatch[data-swatch="cyan"] {
  background: rgba(0, 212, 255, 0.18);
  border-color: rgba(0, 212, 255, 0.55);
}
.legend-swatch[data-swatch="green"] {
  background: rgba(0, 255, 150, 0.18);
  border-color: rgba(0, 255, 150, 0.55);
}
.legend-swatch[data-swatch="amber"] {
  background: rgba(255, 184, 77, 0.18);
  border-color: rgba(255, 184, 77, 0.6);
}
.legend-swatch[data-swatch="blue"] {
  background: rgba(0, 102, 255, 0.18);
  border-color: rgba(0, 102, 255, 0.55);
}
.legend-swatch[data-swatch="designed"] {
  background: rgba(74, 96, 128, 0.28);
  border-color: rgba(74, 96, 128, 0.9);
}
.legend-swatch[data-swatch="building"] {
  background: rgba(0, 212, 255, 0.18);
  border-color: rgba(0, 212, 255, 0.55);
}
.legend-swatch[data-swatch="done"] {
  background: rgba(0, 255, 150, 0.18);
  border-color: rgba(0, 255, 150, 0.55);
}
.legend-note {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: var(--muted);
}
.roadmap-milestones .state-designed,
.roadmap-milestones .state-building,
.roadmap-milestones .state-done {
  font-weight: 600;
}
.roadmap-milestones .state-designed { color: var(--muted); }
.roadmap-milestones .state-building { color: var(--cyan); }
.roadmap-milestones .state-done { color: var(--green); }

/* "Writeup coming" placeholder for unwritten sections */
.coming {
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 22px 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.coming::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

/* diagram / screenshot frame placeholder */
.frame {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, rgba(0,212,255,0.02) 0 12px, transparent 12px 24px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 28px;
}
.frame .glyph {
  width: 40px; height: 40px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  position: relative;
}
.frame .glyph::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
}
.frame .cap {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.frame .sub { font-size: 0.85rem; color: var(--muted); font-weight: 300; max-width: 46ch; }

/* Real architecture flows. Connectors occupy their own cells so they can never run through text. */
.frame.skill-diagram {
  min-height: 0;
  border-style: solid;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  background:
    radial-gradient(circle at 15% 20%, rgba(0,212,255,0.08), transparent 34%),
    linear-gradient(135deg, rgba(6,18,34,0.98), rgba(4,13,26,0.98));
  align-items: stretch;
  gap: 20px;
  padding: 28px;
}
.skill-flow {
  list-style: none;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
}
.skill-node {
  flex: 1 1 0;
  min-width: 0;
  min-height: 116px;
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--cyan);
  border-radius: 9px;
  background: rgba(5,17,32,0.92);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 15px;
  text-align: left;
}
.skill-node-number {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--cyan);
}
.skill-node strong {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.25;
  letter-spacing: 0.7px;
  color: var(--text);
}
.skill-node-detail {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}
.skill-arrow {
  flex: 0 0 18px;
  align-self: center;
  font-family: var(--mono);
  font-size: 1.25rem;
  color: var(--green);
}
.skill-diagram-note {
  max-width: 72ch;
  margin: 0 auto;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .frame.skill-diagram { padding: 20px; }
  .skill-flow { flex-direction: column; }
  .skill-node { min-height: 0; }
  .skill-arrow {
    flex-basis: auto;
    line-height: 1;
    transform: rotate(90deg);
  }
}

/* Inline capability diagrams. The SVG carries its own palette and embedded legend so a copied or
   exported diagram keeps the same meaning outside the surrounding page. On narrow screens the
   diagram scrolls inside its own region rather than shrinking labels below a readable size. */
.capability-diagram { margin: 18px 0 0; }
.capability-diagram-scroll {
  overflow-x: auto;
  border-radius: 10px;
  scrollbar-color: var(--border-strong) var(--bg-raised);
}
.capability-flow {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}
.capability-diagram figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2px;
  line-height: 1.55;
}

/* Public-safe captures of the real HTML email renderers. */
.email-preview {
  margin: 20px 0 4px;
}
.email-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #080d19;
}
.email-preview-frame {
  display: block;
  width: 100%;
  height: 680px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #0a0e1a;
}
.email-preview figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
}

/* impact stat callouts */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 16px 18px;
}
.stat .num {
  font-family: var(--mono);
  font-size: 1.7rem;
  color: var(--cyan);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* callout / gotcha box */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: var(--green-wash);
  padding: 14px 18px;
  margin: 16px 0;
  font-weight: 300;
}
.callout .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 4px;
}

/* code & further reading links */
.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.links a:hover {
  text-decoration: none;
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.25);
}
.links a[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
  border-style: dashed;
}

/* ---- footer ---- */
footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-quiet);
  color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); text-decoration: none; }

.footer-line {
  margin: 0;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* Site-wide legal disclaimer. The text is real markup (a <p class="disclaimer"> inside every
   page's <footer>) so it is selectable, in the DOM, and reliably read by assistive tech; this rule
   only styles it. The wording is byte-identical on every page and enforced by
   scripts/check-site-disclaimer.py (CI gate), so it cannot drift. */
.disclaimer {
  margin: 16px 0 0;
  max-width: 62ch;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.6;
  color: var(--muted);
}

/* ---- footer site map (item 467 correction) ----
   The primary nav row dropped from 12+ links to 3 group hubs, so this carries the complete flat list
   estate-wide - it is what makes cutting the row safe. Same mono/uppercase footer voice, one row per
   group rather than per link, so it reads as a map rather than a second nav. */
.sitemap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 0 0 18px;
}
.sitemap-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.6;
}
.sitemap-label {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-right: 0;
}
.sitemap a {
  margin-right: 0;
  font-size: 0.92rem;
}
/* Nav v3 (inbox entry 65): Claude Code sits UNDER AI rather than beside it. The site map renders a
   group on one line for width, so the subordination has to be visible; order alone does not carry it. */
.sitemap a.sitemap-sub { opacity: 0.85; }
.sitemap a.sitemap-sub::before {
  content: "\21B3";
  margin-right: 3px;
  color: var(--muted);
}
/* The same relationship on a group hub page, where there is room to indent properly. */
.nav-sub {
  margin: 4px 0 0 0;
  padding-left: 20px;
  list-style: none;
}
.nav-sub > li { font-size: 0.95em; }

@media (max-width: 480px) {
  h1 { font-size: 1.9rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .sitemap { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sitemap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Capabilities index and writeup treatment. The topic rail gives each page one restrained
   moving system cue. The content cards carry the hierarchy, with a reduced-motion fallback. */
:root {
  --cap-panel: rgba(9, 20, 35, 0.84);
  --cap-line: rgba(0, 212, 255, 0.22);
  --cap-line-hot: rgba(0, 212, 255, 0.68);
  --cap-copy: #c9d3e5;
}

.capability-rail {
  margin: 2rem 0 2.7rem;
  padding: 1rem 1.15rem 1.15rem;
  overflow: hidden;
  border: 1px solid var(--cap-line);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.055), rgba(0, 255, 150, 0.025));
}
.capability-rail-labels {
  display: grid;
  grid-template-columns: repeat(var(--rail-count), minmax(0, 1fr));
  gap: 0.65rem;
  color: #a9b8d0;
  font: 0.68rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.capability-rail-labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.capability-rail-labels span:not(:first-child):not(:last-child) { text-align: center; }
.capability-rail-labels span:last-child { text-align: right; }
.capability-track {
  position: relative;
  height: 3px;
  margin-top: 0.85rem;
  background: rgba(0, 212, 255, 0.17);
}
.capability-node {
  position: absolute;
  top: -4px;
  left: var(--node-left);
  width: 11px;
  height: 11px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: #07111f;
  transform: translateX(-50%);
}
.capability-node:first-child { transform: none; }
.capability-node:last-child { transform: translateX(-100%); }
.capability-track::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(0, 255, 150, 0.9);
  animation: capability-pass 7s ease-in-out infinite;
}
@keyframes capability-pass {
  0%, 8% { left: 0; opacity: 0; }
  12%, 88% { opacity: 1; }
  92%, 100% { left: calc(100% - 11px); opacity: 0; }
}

.capability-detail .skill-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.capability-detail .skill-body > * { grid-column: 1 / -1; }
/* Keep the long Jenkins recovery account in reading order without half-width gaps. */
.jenkins-writeup.capability-detail .skill-body { grid-template-columns: 1fr; }
/* Keep capability sections aligned with their full-width diagrams. */
.capability-detail .skill-body > .block {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 1.45rem;
  border: 1px solid var(--cap-line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 212, 255, 0.04), transparent 42%), var(--cap-panel);
  animation: capability-arrive 0.5s ease both;
}
.capability-detail .skill-body > .block:first-of-type,
.capability-detail .skill-body > .block:has(figure),
.capability-detail .skill-body > .block:has(table),
.capability-detail .skill-body > .block:has(pre),
.capability-detail .skill-body > .block:has(.frame) { grid-column: 1 / -1; }
.capability-detail .skill-body > .block h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
}
.capability-detail .skill-body > .block p,
.capability-detail .skill-body > .block li { color: var(--cap-copy); }
.capability-detail .skill-body > .block .note,
.capability-detail .skill-body > .block .callout { border-left-color: var(--green); }

.capabilities-index .index-hero { max-width: 800px; }
.capabilities-index .category {
  margin-top: 1.2rem;
  padding: 1.35rem;
  border: 1px solid var(--cap-line);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.62);
}
.capabilities-index .category h2 {
  margin-top: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}
.capabilities-index .skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.capabilities-index .skill-card {
  min-height: 185px;
  padding: 1.3rem;
  border-color: var(--cap-line);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(0, 212, 255, 0.045), transparent 45%), var(--cap-panel);
  animation: capability-arrive 0.5s ease both;
  transition: transform 180ms ease, border-color 180ms ease;
}
.capabilities-index .skill-card:hover,
.capabilities-index .skill-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--cap-line-hot);
  outline: none;
}
.capabilities-index .skill-card .name {
  color: #fff;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.15;
}
.capabilities-index .skill-card .desc {
  color: var(--cap-copy);
  font-size: 0.98rem;
  line-height: 1.5;
}
.capabilities-index .skill-card .arrow {
  margin-top: auto;
  color: var(--cyan);
}

@keyframes capability-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 780px) {
  .capability-detail .skill-body,
  .capabilities-index .skill-grid { grid-template-columns: 1fr; }
  .capability-detail .skill-body > .block { grid-column: auto; }
  .capability-rail-labels { font-size: 0.56rem; letter-spacing: 0.035em; }
}

@media (prefers-reduced-motion: reduce) {
  .capability-track::after,
  .capability-detail .skill-body > .block,
  .capabilities-index .skill-card { animation: none; }
  .capabilities-index .skill-card { transition: none; }
}
