/* =============================================
   HOMELAB PAGE — RACK UNIT
   All styles specific to /homelab. Tokens, reset,
   and base styles are inherited from styles.css.
   ============================================= */

/* =============================================
   SCREEN ATMOSPHERE — blueprint grid + vignette
   ============================================= */
@media screen {
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
      linear-gradient(rgba(255,181,71,0.038) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,181,71,0.038) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px;
    pointer-events: none;
    z-index: 0;
  }
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255,181,71,0.06), transparent 60%),
      radial-gradient(ellipse 60% 40% at 50% 110%, rgba(78,241,154,0.025), transparent 60%);
    pointer-events: none;
    z-index: 0;
  }
}

/* =============================================
   CORNER FIDUCIALS
   ============================================= */
@media screen and (min-width: 1024px) {
  .page::before,
  .page::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
  }
  .page::before {
    top: 40px; left: 20px;
    border-top: 1px solid var(--line-bright);
    border-left: 1px solid var(--line-bright);
  }
  .page::after {
    top: 40px; right: 20px;
    border-top: 1px solid var(--line-bright);
    border-right: 1px solid var(--line-bright);
  }
}

/* =============================================
   BOOT SEQUENCE
   ============================================= */
.boot { display: none; }
.js-booting .boot {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8vw;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.boot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,181,71,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,181,71,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.boot-inner { width: min(640px, 100%); position: relative; }
.boot-header {
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 18px;
  opacity: 0;
  animation: bootLine 0.15s ease-out 0.02s forwards;
}
.boot-cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: var(--amber);
  margin-left: 4px;
  vertical-align: middle;
  animation: bootBlink 0.6s step-end infinite;
  box-shadow: 0 0 6px var(--amber-glow);
}
.boot-line {
  display: grid;
  grid-template-columns: 56px 112px 1fr;
  gap: 12px;
  padding: 2px 0;
  opacity: 0;
  transform: translateY(3px);
  animation: bootLine 0.14s ease-out forwards;
  font-size: 12.5px;
}
.boot-line[data-boot="0"] { animation-delay: 0.15s; }
.boot-line[data-boot="1"] { animation-delay: 0.35s; }
.boot-line[data-boot="2"] { animation-delay: 0.55s; }
.boot-line[data-boot="3"] { animation-delay: 0.80s; }
.boot-line[data-boot="4"] { animation-delay: 1.05s; }
.boot-line[data-boot="5"] { animation-delay: 1.30s; }
.boot-ok { color: var(--ok); font-weight: 700; }
.boot-label { color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }
.boot-value { color: var(--text); }
.boot-footer {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0;
  animation: bootLine 0.2s ease-out 1.55s forwards;
}
@keyframes bootLine { to { opacity: 1; transform: translateY(0); } }
@keyframes bootBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.boot.done { animation: bootFade 0.38s ease-out forwards; }
@keyframes bootFade { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.js-booting body { overflow: hidden; }
.js-booting .page,
.js-booting .float-nav { opacity: 0; }
body:not(.booting) .page {
  animation: pageReveal 0.5s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes pageReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   FLOATING NAV — rack side rail
   ============================================= */
.float-nav {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 10px 10px;
  background: rgba(14,15,23,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.4s, transform 0.4s;
}
.float-nav::before {
  content: '// NAV';
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 4px 6px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 6px;
}
.float-nav.visible { opacity: 1; transform: translateX(0); }
.float-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px 4px 6px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.float-nav a:hover { color: var(--text); }
.float-nav a.active {
  color: var(--amber);
  border-left-color: var(--amber);
  background: var(--amber-low);
}
.float-nav-dot {
  width: 4px; height: 4px;
  background: currentColor;
  flex-shrink: 0;
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }
.reveal-delay-5 { transition-delay: 0.30s; }
.reveal-delay-6 { transition-delay: 0.36s; }

/* =============================================
   HERO
   ============================================= */
.hero {
  text-align: left;
  padding: 16px 0 56px;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-low);
  border: 1px solid var(--line-hot);
  padding: 7px 14px 7px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
}
.hero-eyebrow::before { content: '['; color: var(--amber-dim); margin-right: -4px; font-weight: 400; }
.hero-eyebrow::after { content: ']'; color: var(--amber-dim); margin-left: -4px; font-weight: 400; }
.status-dot {
  width: 7px; height: 7px;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: statusBlink 2s ease infinite;
}
@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 0.98;
  margin-bottom: 28px;
  text-transform: uppercase;
  color: var(--text);
}
.hero h1 .accent { color: var(--amber); font-weight: 700; }
.hero h1 .dim { color: var(--text-muted); font-weight: 300; font-style: normal; }

.hero-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 400;
  max-width: 760px;
  margin: 0;
  line-height: 1.75;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }

.hero-divider {
  width: 100%;
  height: 1px;
  margin-top: 56px;
  background: linear-gradient(90deg, var(--amber-dim), var(--line) 30%, transparent);
  position: relative;
}
.hero-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
}

/* =============================================
   ACT DIVIDER
   ============================================= */
.act {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 80px 0 48px;
  padding: 14px 18px 14px 22px;
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  position: relative;
}
.act::before,
.act::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
}
.act::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--amber);
  border-left: 1px solid var(--amber);
}
.act::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--amber);
  border-right: 1px solid var(--amber);
}
.act-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--amber);
  background: var(--amber-low);
  padding: 5px 10px;
  border: 1px solid var(--line-hot);
  text-transform: uppercase;
}
.act-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}
.act-title .sep { color: var(--text-muted); margin: 0 10px; font-weight: 300; }
.act-title .label { color: var(--text-dim); font-weight: 400; letter-spacing: 2px; }
.act-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ok);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.act-status::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

/* =============================================
   STATS BAR — LED telemetry panel
   ============================================= */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-bottom: 80px;
  border: 1px solid var(--line);
  background: var(--surface-0);
  position: relative;
}
.stats-bar::before {
  content: '// TELEMETRY';
  position: absolute;
  top: -9px;
  left: 14px;
  background: var(--bg);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
}
.stats-bar::after {
  content: '● LIVE';
  position: absolute;
  top: -9px;
  right: 14px;
  background: var(--bg);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ok);
}
.stat {
  padding: 26px 16px 20px;
  text-align: left;
  position: relative;
  border-right: 1px solid var(--line);
  transition: background 0.2s;
  cursor: default;
  overflow: hidden;
}
.stat:last-child { border-right: none; }
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.stat:hover { background: var(--surface-1); }
.stat:hover::before { opacity: 1; }
.stat:hover .stat-number { color: var(--amber-hi); }

.stat-number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  letter-spacing: -1.5px;
  transition: color 0.2s;
  font-feature-settings: 'tnum';
}
.stat-number.gold,
.stat-number.green,
.stat-number.amber,
.stat-number.purple,
.stat-number.cyan { color: var(--amber); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-label::before {
  content: '▸';
  color: var(--text-faint);
  font-size: 10px;
}

/* =============================================
   SECTION — rack label strip
   ============================================= */
.section {
  margin-bottom: 60px;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 11px 18px 11px 22px;
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  position: relative;
}
.section-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -1px;
  width: 6px;
  height: 14px;
  background: var(--amber);
  transform: translateY(-50%);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1.5px;
  background: var(--amber-low);
  padding: 4px 9px;
  border: 1px solid var(--line-hot);
  min-width: auto;
}
.section-num::before { content: '§ '; color: var(--amber-dim); }
.section-icon { display: none; }

.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
}
.section-rule {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-bright) 0, var(--line-bright) 4px, transparent 4px, transparent 8px);
}

/* =============================================
   CARDS — hard panels
   ============================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.card {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--line-bright);
  border-left: 1px solid var(--line-bright);
  transition: border-color 0.2s;
  pointer-events: none;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--amber-low) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { border-color: var(--line-bright); background: var(--surface-1); }
.card:hover::before { border-color: var(--amber); }
.card:hover::after { opacity: 1; }

.card-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.dot {
  width: 7px; height: 7px;
  flex-shrink: 0;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber-glow);
}
.dot.blue, .dot.green, .dot.amber, .dot.purple, .dot.cyan, .dot.red, .dot.gold {
  background: var(--amber);
}

.card p, .card li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  font-family: var(--font-body);
}
.card ul { list-style: none; padding: 0; }
.card li { padding: 3px 0 3px 18px; position: relative; }
.card li::before {
  content: '›';
  position: absolute;
  left: 2px;
  color: var(--amber-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.card strong { color: var(--text); font-weight: 600; }
.card em { color: var(--amber); font-style: normal; }
.card-full { grid-column: 1 / -1; }

/* left-accent variant — all amber */
.card-accent { border-left: 2px solid var(--amber); }
.card-accent.gold-accent,
.card-accent.purple-accent,
.card-accent.blue-accent,
.card-accent.green-accent,
.card-accent.cyan-accent,
.card-accent.red-accent { border-left-color: var(--amber); }

/* =============================================
   PRINCIPLES — welded grid
   ============================================= */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface-0);
  counter-reset: p;
}
.principle {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  counter-increment: p;
  transition: background 0.2s;
}
.principle:nth-child(3n) { border-right: none; }
.principle:nth-last-child(-n+3) { border-bottom: none; }
.principle:hover { background: var(--surface-1); }
.principle::before {
  content: counter(p, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}
.principle-icon { display: none; }
.principle-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text);
  padding-right: 28px;
}
.principle-name::before {
  content: '›';
  color: var(--amber);
  margin-right: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.principle-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
  font-family: var(--font-body);
}

/* =============================================
   TOPOLOGY DIAGRAM
   ============================================= */
.topo-container {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 52px 32px 36px;
  position: relative;
  overflow: hidden;
}
.topo-container::before {
  content: '// NET-TOPO · 00.01';
  position: absolute;
  top: 14px;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.topo-container::after {
  content: 'REV · 2026.04';
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.topo-tier {
  display: flex;
  justify-content: center;
  position: relative;
}
.topo-tier.children {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.topo-node {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  position: relative;
  min-width: 170px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.topo-node::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--amber);
  border-left: 1px solid var(--amber);
  opacity: 0.55;
  transition: opacity 0.2s;
}
.topo-node:hover {
  border-color: var(--amber);
  background: var(--surface-2);
  box-shadow: 0 0 24px var(--amber-low);
  z-index: 2;
}
.topo-node:hover::before { opacity: 1; }
.topo-node.isp,
.topo-node.router,
.topo-node.core,
.topo-node.security,
.topo-node.dist,
.topo-node.leaf {
  background: var(--surface-1);
  border-color: var(--line);
}
.topo-node.ha {
  border-color: var(--line-hot);
  background: linear-gradient(135deg, var(--amber-low), transparent 65%);
}
.topo-node.ha:hover {
  border-color: var(--amber);
  box-shadow: 0 0 28px var(--amber-glow);
}
.topo-node.leaf { min-width: 140px; padding: 10px 14px; }
.topo-node-icon { display: none; }
.topo-node-name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 3px;
  color: var(--text);
}
.topo-node-ip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ok);
  font-weight: 500;
}
.topo-node-detail {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.topo-node-detail strong { color: var(--amber) !important; font-weight: 700; }
.topo-node-badge {
  position: absolute;
  top: -8px; right: -1px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--amber);
  border: 1px solid var(--line-hot);
}
.badge-mgmt,
.badge-cam,
.badge-iot,
.badge-dual {
  background: var(--bg);
  color: var(--amber);
  border-color: var(--line-hot);
}

.topo-connector {
  display: flex; justify-content: center;
  padding: 0; position: relative; height: 28px;
}
.topo-connector .vline {
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
}
.topo-connector.accent .vline {
  background: linear-gradient(to bottom, var(--amber-dim), var(--amber-low));
}
.topo-branch { position: relative; height: 28px; margin: 0 auto; }
.topo-branch-line { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 14px; width: 1px; background: var(--amber-dim); }
.topo-branch-horiz { position: absolute; top: 14px; height: 1px; background: var(--amber-low); }
.topo-branch-drops { position: absolute; top: 14px; display: flex; justify-content: space-around; width: 100%; }
.topo-branch-drop { width: 1px; height: 14px; background: var(--amber-low); }
.topo-speed {
  position: absolute; right: calc(50% - 60px); top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
  background: var(--bg); padding: 1px 6px; border: 1px solid var(--line);
}
.topo-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.topo-group { display: flex; flex-direction: column; align-items: center; }
.topo-group-label {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 10px; margin-top: 4px;
}

/* =============================================
   VLAN BADGES
   ============================================= */
.vlan-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  padding: 3px 9px;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1.2px;
  background: var(--amber-low);
  color: var(--amber);
  border: 1px solid var(--line-hot);
}
.vlan-mgmt,
.vlan-main,
.vlan-cam,
.vlan-iot {
  background: var(--amber-low);
  color: var(--amber);
  border-color: var(--line-hot);
}

/* =============================================
   WORKFLOW — welded pipeline
   ============================================= */
.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 4px;
  border: 1px solid var(--line);
  background: var(--surface-0);
}
.workflow-step {
  text-align: left;
  padding: 24px 20px 22px;
  position: relative;
  border-right: 1px solid var(--line);
  transition: background 0.2s;
}
.workflow-step:last-child { border-right: none; }
.workflow-step:hover { background: var(--surface-1); z-index: 1; }
.workflow-step:not(:last-child)::after {
  content: '▸';
  position: absolute;
  right: -7px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-faint);
  background: var(--bg);
  width: 14px;
  text-align: center;
  z-index: 2;
  transition: color 0.2s;
}
.workflow-step:hover::after { color: var(--amber); }
.step-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 12px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.step-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.55;
}
.step-actor {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 14px;
  font-weight: 700;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.step-actor::before { content: '▸ '; color: var(--text-faint); }
.step-actor.human { color: var(--amber); }
.step-actor.ai { color: var(--text); }
.step-actor.opus { color: var(--amber-hi); }
.step-actor.sonnet { color: var(--text); }

/* =============================================
   FILE INDEX — ls output
   ============================================= */
.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface-0);
}
.file-entry {
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.file-entry:nth-child(3n) { border-right: none; }
.file-entry:nth-last-child(-n+3) { border-bottom: none; }
.file-entry:hover { background: var(--surface-1); }
.file-icon {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-low);
  border: 1px solid var(--line-hot);
  padding: 3px 7px;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.file-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  font-family: var(--font-body);
}
.file-desc strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.8px;
}

/* =============================================
   TIMELINE (unused in current content, retained)
   ============================================= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber), var(--amber-dim), transparent);
  opacity: 0.6;
}
.timeline-entry { position: relative; padding: 6px 0 16px 18px; }
.timeline-entry::before {
  content: '';
  position: absolute; left: -22px; top: 13px;
  width: 9px; height: 9px;
  background: var(--bg); border: 1px solid var(--amber);
}
.timeline-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); font-weight: 500; }
.timeline-text { font-size: 13px; color: var(--text-dim); }
.timeline-text strong { color: var(--text); }

/* =============================================
   AUTOMATION CARDS — welded grid
   ============================================= */
.auto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface-0);
}
.auto-card {
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  transition: background 0.2s;
}
.auto-card:last-child { border-right: none; }
.auto-card:hover { background: var(--surface-1); }
.auto-type {
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--amber);
  display: inline-block;
  padding: 2px 7px;
  background: var(--amber-low);
  border: 1px solid var(--line-hot);
}
.auto-type.automation,
.auto-type.script { color: var(--amber); }
.auto-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.25;
}
.auto-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================
   TERMINAL — actual terminal feel
   ============================================= */
.terminal-block {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255,181,71,0.04),
    0 24px 60px rgba(0,0,0,0.5);
}
.terminal-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255,181,71,0.014) 2px,
    rgba(255,181,71,0.014) 4px
  );
  pointer-events: none;
  z-index: 1;
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.35);
}
.term-dot-r { background: var(--alert); }
.term-dot-y { background: var(--warn); }
.term-dot-g { background: var(--ok); }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  letter-spacing: 0.5px;
}
.terminal-title::before { content: '~ '; color: var(--text-faint); }
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
  position: relative;
  z-index: 2;
}
.qa-item {
  padding: 16px 20px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s;
}
.qa-item:last-child { border-bottom: none; }
.qa-item:hover { background: rgba(255,181,71,0.04); }
.qa-q {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
  font-style: normal;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.qa-q::before {
  content: '$';
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-style: normal;
}
.qa-a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.7;
  padding-left: 20px;
}
.qa-a::before { content: '› '; color: var(--text-faint); }
.qa-a code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-low);
  border: 1px solid var(--line-hot);
  padding: 1px 5px;
  border-radius: 2px;
}
.cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--ok);
  margin-left: 3px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--ok);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* =============================================
   KILLER FEATURE CALLOUT
   ============================================= */
.killer-feature {
  background: var(--surface-0);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  padding: 46px 48px;
  position: relative;
  overflow: hidden;
}
.killer-feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 20% 0%, var(--amber-low), transparent 60%),
    radial-gradient(400px circle at 100% 100%, var(--amber-low), transparent 60%);
  pointer-events: none;
}
.killer-feature > * { position: relative; }
.kf-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--amber);
  margin-bottom: 18px;
  display: inline-block;
  padding: 5px 11px;
  background: var(--amber-low);
  border: 1px solid var(--line-hot);
}
.kf-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
  color: var(--text);
}
.kf-body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
}
.kf-body strong { color: var(--text); }

/* =============================================
   CALLOUT / CTA
   ============================================= */
.callout {
  background: var(--surface-0);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 52px 48px 48px;
  text-align: left;
  margin-top: 72px;
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent 50%);
}
.callout::after {
  content: '// EOF';
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.callout h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--text);
  position: relative;
}
.callout p {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 820px;
  margin: 0;
  line-height: 1.8;
  position: relative;
}
.callout p strong { color: var(--text); }
.tag-cloud { margin-top: 28px; position: relative; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--surface-1);
  border: 1px solid var(--line);
  padding: 4px 10px;
  margin: 4px 4px 4px 0;
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-low);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  text-align: center;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
}
.footer::before {
  content: '█';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 14px;
  color: var(--amber);
  font-size: 10px;
  text-shadow: 0 0 8px var(--amber-glow);
}
.footer span { color: var(--text-muted); }
.footer em { color: var(--amber); font-style: normal; }

/* =============================================
   SPECIAL GRIDS
   ============================================= */
.unlocks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sauce-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.brain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > * {
  animation: fadeSlideUp 0.55s cubic-bezier(0.4,0,0.2,1) both;
}
.hero .hero-eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.22s; }
.hero .hero-subtitle { animation-delay: 0.34s; }
.hero .hero-divider { animation-delay: 0.46s; }

/* count-up container */
[data-count] { display: inline; }

/* =============================================
   PRINT / PDF EXPORT
   ============================================= */
@page {
  size: letter portrait;
  margin: 0.6in 0.65in;
}

@media print {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    animation-delay: 0s !important;
  }

  /* Hide interactive chrome + boot */
  .float-nav,
  .boot { display: none !important; }
  html.js-booting body { overflow: visible !important; }
  html.js-booting .page,
  html.js-booting .float-nav { opacity: 1 !important; }

  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
  }

  html, body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: #0a0b10 !important;
  }
  body::before, body::after { display: none !important; }

  .page {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .page::before, .page::after { display: none !important; }

  .hero {
    padding: 0 0 32px !important;
    margin-bottom: 0 !important;
  }
  .hero h1 {
    font-size: 36px !important;
    margin-bottom: 14px !important;
  }
  .hero-subtitle { font-size: 13.5px !important; }
  .hero-eyebrow { margin-bottom: 18px !important; }

  .stats-bar {
    grid-template-columns: repeat(6, 1fr) !important;
    margin-bottom: 36px !important;
  }
  .stat { padding: 14px 10px 12px !important; }
  .stat-number { font-size: 26px !important; }

  .section { margin-bottom: 32px !important; }
  .act { margin: 28px 0 22px !important; padding: 10px 14px !important; }
  .act-title { font-size: 12px !important; letter-spacing: 2px !important; }

  /* --- Force dark backgrounds on all colored elements --- */
  .card,
  .stat,
  .principle,
  .auto-card,
  .file-entry,
  .topo-node,
  .topo-container,
  .killer-feature,
  .callout,
  .terminal-block,
  .terminal-titlebar,
  .workflow-step,
  .qa-item,
  .vlan-badge,
  .topo-node-badge,
  .file-icon,
  .section-icon,
  .hero-eyebrow {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* --- Avoid mid-element page breaks --- */
  .card,
  .principle,
  .auto-card,
  .file-entry,
  .workflow-step,
  .qa-item,
  .topo-node {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .topo-container,
  .killer-feature,
  .callout,
  .terminal-block,
  .section-header {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* --- Keep section headers with their content --- */
  .section-header {
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  /* --- Terminal cursor: hide in print --- */
  .cursor { display: none !important; }

  /* --- Callout tighter --- */
  .callout { padding: 32px 36px !important; margin-top: 36px !important; }
  .callout h3 { font-size: 20px !important; }
  .callout p { font-size: 13px !important; }
}

/* =============================================
   MOBILE
   ============================================= */
@media (max-width: 1023px) {
  .page::before, .page::after { display: none; }
}

@media (max-width: 768px) {
  .float-nav { display: none !important; }

  .page { padding: 44px 20px 72px; }

  .hero { padding: 8px 0 44px; }
  .hero h1 { font-size: clamp(34px, 10vw, 62px); letter-spacing: -0.5px; }
  .hero-subtitle { font-size: 14.5px; }
  .hero-eyebrow { font-size: 9.5px; margin-bottom: 22px; letter-spacing: 2px; }

  .act {
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    padding: 14px 16px 14px 18px;
    margin: 56px 0 36px;
  }
  .act-num { grid-column: 1 / -1; justify-self: start; }
  .act-title { font-size: 13px; letter-spacing: 2px; }
  .act-title .sep { display: none; }
  .act-title .label { display: block; margin-bottom: 2px; font-size: 10px; }
  .act-status { font-size: 9px; }

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 56px;
  }
  .stat { padding: 20px 12px 16px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(3) { border-right: none; }
  .stat:nth-child(n+4) { border-bottom: none; }
  .stat-number { font-size: 30px; }
  .stats-bar::before, .stats-bar::after { font-size: 8.5px; }

  .section-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 11px 14px 11px 18px;
  }
  .section-title { font-size: 14px; letter-spacing: 1px; }
  .section-rule { display: none; }

  .principles { grid-template-columns: repeat(2, 1fr); }
  .principle { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .principle:nth-child(3n) { border-right: 1px solid var(--line); }
  .principle:nth-child(2n) { border-right: none; }
  .principle:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .principle:nth-last-child(-n+2) { border-bottom: none; }

  .cards { grid-template-columns: 1fr; }
  .card { padding: 20px 22px; }
  .card-title { font-size: 12px; }

  .auto-grid { grid-template-columns: repeat(2, 1fr); }
  .auto-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .auto-card:nth-child(2n) { border-right: none; }
  .auto-card:nth-last-child(-n+2) { border-bottom: none; }

  .file-grid { grid-template-columns: repeat(2, 1fr); }
  .file-entry { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .file-entry:nth-child(3n) { border-right: 1px solid var(--line); }
  .file-entry:nth-child(2n) { border-right: none; }
  .file-entry:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .file-entry:nth-last-child(-n+2) { border-bottom: none; }

  .unlocks-grid,
  .sauce-grid,
  .brain-grid { grid-template-columns: 1fr; }

  .workflow { grid-template-columns: 1fr; }
  .workflow-step {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 20px 18px;
  }
  .workflow-step:last-child { border-bottom: none; }
  .workflow-step:not(:last-child)::after {
    content: '▾';
    right: 50%;
    top: auto;
    bottom: -8px;
    transform: translateX(50%);
  }

  .killer-feature {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 34px 24px;
  }
  .kf-headline { font-size: clamp(22px, 7vw, 30px); }

  .topo-branch-grid { grid-template-columns: 1fr !important; }
  .topo-container { padding: 48px 20px 30px; }
  .topo-node { min-width: 100%; }
  .topo-container::before,
  .topo-container::after { font-size: 8.5px; }

  .callout { padding: 40px 26px 34px; margin-top: 52px; }
  .callout h3 { font-size: clamp(20px, 6.5vw, 28px); }
  .callout p { font-size: 13.5px; }

  .terminal-block { font-size: 11px; }
  .qa-item { padding: 13px 16px; }
  .qa-q { font-size: 11.5px; }
  .qa-a { font-size: 11px; padding-left: 18px; }
}

@media (max-width: 480px) {
  .page { padding: 36px 16px 60px; }
  .hero h1 { font-size: clamp(30px, 11vw, 48px); }

  .principles { grid-template-columns: 1fr; }
  .principle { border-right: none !important; }
  .principle:not(:last-child) { border-bottom: 1px solid var(--line) !important; }
  .principle:last-child { border-bottom: none !important; }

  .auto-grid { grid-template-columns: 1fr; }
  .auto-card { border-right: none !important; }
  .auto-card:not(:last-child) { border-bottom: 1px solid var(--line) !important; }
  .auto-card:last-child { border-bottom: none !important; }

  .file-grid { grid-template-columns: 1fr; }
  .file-entry { border-right: none !important; }
  .file-entry:not(:last-child) { border-bottom: 1px solid var(--line) !important; }
  .file-entry:last-child { border-bottom: none !important; }

  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
}

/* =============================================
   REDUCED MOTION — homelab-specific overrides
   (global rule lives in styles.css)
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  html.js-booting .boot { display: none !important; }
  html.js-booting body { overflow: auto !important; }
  html.js-booting .page,
  html.js-booting .float-nav { opacity: 1 !important; }
}
