/* SPDX-License-Identifier: BSD-2-Clause */
/* Copyright (c) 2026 REVYTECH, Inc. */
/* Aeolus public site — CloudBSD / REVYTECH chrome with dark + light themes. */

:root {
  --cloudbsd-blue: #00529B;
  --cloudbsd-red: #D32F2F;
  --brand-cyan: #22d3ee;
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-ui: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --topbar-h: 5rem;

  /* Light theme (default before .dark) */
  --void: #f8fafc;
  --void-deep: #ffffff;
  --surface: #ffffff;
  --elevated: #f1f5f9;
  --border: #cbd5e1;
  --text: #0f172a;
  --text-strong: #020617;
  --muted: #475569;
  --foam: #334155;
  --line: rgba(0, 82, 155, 0.28);
  --term: #0f172a;
  --term-text: #e2e8f0;
  --glass-bg: rgba(248, 250, 252, 0.92);
  --glass-border: rgba(15, 23, 42, 0.12);
  --glass-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  --nav-link: rgba(15, 23, 42, 0.78);
  --nav-link-hover: #0f172a;
  --hero-grad-a: rgba(0, 82, 155, 0.12);
  --hero-grad-b: rgba(34, 211, 238, 0.08);
  --wordmark-bsd: #0891b2;
  --btn-ghost-hover-border: var(--cloudbsd-blue);
  --lane-name: var(--cloudbsd-blue);
  --fact-border: var(--cloudbsd-blue);
  --toggle-border: rgba(15, 23, 42, 0.16);
  --toggle-bg: rgba(15, 23, 42, 0.04);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --menu-active: rgba(0, 82, 155, 0.12);
  --dot-muted: #64748b;
  --theme-color: #f8fafc;
}

html.dark {
  --void: #0f172a;
  --void-deep: #020617;
  --surface: #1e293b;
  --elevated: #334155;
  --border: #475569;
  --text: #f8fafc;
  --text-strong: #ffffff;
  --muted: #94a3b8;
  --foam: #e2e8f0;
  --line: rgba(34, 211, 238, 0.22);
  --term: #0b1220;
  --term-text: #e2e8f0;
  --glass-bg: rgba(15, 23, 42, 0.92);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 16px 32px rgba(2, 6, 23, 0.35);
  --nav-link: rgba(255, 255, 255, 0.82);
  --nav-link-hover: #ffffff;
  --hero-grad-a: rgba(0, 82, 155, 0.45);
  --hero-grad-b: rgba(34, 211, 238, 0.12);
  --wordmark-bsd: #22d3ee;
  --btn-ghost-hover-border: var(--brand-cyan);
  --lane-name: var(--brand-cyan);
  --fact-border: var(--cloudbsd-blue);
  --toggle-border: rgba(255, 255, 255, 0.16);
  --toggle-bg: rgba(255, 255, 255, 0.05);
  --menu-bg: rgba(15, 23, 42, 0.98);
  --menu-active: rgba(34, 211, 238, 0.18);
  --dot-muted: #64748b;
  --theme-color: #0f172a;
}

* { box-sizing: border-box; }

html {
  /* Clear fixed floating topbar on in-page #anchors */
  scroll-padding-top: calc(var(--topbar-h) + 1.5rem);
}

body {
  margin: 0;
  color: var(--foam);
  background:
    radial-gradient(900px 480px at 12% -10%, var(--hero-grad-a) 0%, transparent 55%),
    radial-gradient(700px 420px at 88% 8%, var(--hero-grad-b) 0%, transparent 50%),
    linear-gradient(180deg, var(--void) 0%, var(--void-deep) 100%);
  background-attachment: fixed;
  font-family: var(--font-ui);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--lane-name); }
a:hover { color: var(--cloudbsd-blue); }
html.dark a:hover { color: var(--brand-cyan); }

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--brand-cyan);
  color: #000;
  font-weight: 600;
  padding: 0.65rem 1rem;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}
.wrap-wide {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Floating glass topbar —— */
.topbar {
  position: fixed !important;
  inset: 0 0 auto;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 50;
  width: 100%;
  min-height: var(--topbar-h);
  padding: 0.9rem 0 0;
  margin: 0;
  pointer-events: none;
}
.topbar .topbar-inner {
  pointer-events: auto;
}
.topbar-inner {
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  box-shadow: none;
}
.topbar-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  pointer-events: none;
}
.topbar-inner > * {
  position: relative;
  z-index: 1;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-strong);
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-weight: 700;
  overflow: visible;
}
.topbar-brand img {
  width: clamp(52px, 4.5vw, 64px);
  height: clamp(52px, 4.5vw, 64px);
  border-radius: 0 !important;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  overflow: visible;
}
.topbar-brand .by {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--text-strong); /* Cloud half of CloudBSD — not muted grey */
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}
.wordmark-inline .bsd,
.wordmark-inline .lus,
.bsd,
.lus { color: var(--wordmark-bsd); }

.theme-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--toggle-border);
  border-radius: 0.78rem;
  background: var(--toggle-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.theme-toggle:hover,
.lang-toggle:hover {
  border-color: var(--cloudbsd-blue);
  background: var(--menu-active);
}
.theme-toggle-label {
  font-weight: 600;
  white-space: nowrap;
}
.lang-picker { position: relative; margin-left: 0; }
.lang-toggle-icon,
.lang-toggle-caret,
.theme-toggle-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-toggle-caret { transition: transform 0.18s ease; }
.lang-toggle[aria-expanded="true"] .lang-toggle-caret { transform: rotate(180deg); }
.lang-toggle-current {
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 17rem;
  max-height: min(62vh, 25rem);
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--glass-border);
  border-radius: 0.8rem;
  background: var(--menu-bg);
  box-shadow: var(--glass-shadow);
  z-index: 50;
}
.lang-menu button {
  width: 100%;
  min-height: 2.2rem;
  text-align: start;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--toggle-bg); }
.lang-menu button.is-active {
  background: var(--menu-active);
  color: var(--lane-name);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--toggle-border);
  border-radius: 0.65rem;
  background: var(--toggle-bg);
  color: var(--text);
  padding: 0;
  cursor: pointer;
}
.nav-toggle-icon {
  width: 1.2rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.22rem;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  color: var(--nav-link);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--nav-link-hover); }
.nav-links a[aria-current="page"] {
  color: var(--nav-link-hover);
  border-bottom: 2px solid var(--lane-name);
}
.nav-links .nav-theme-item,
.nav-links .nav-lang-item { margin-left: 0.15rem; }
.topbar-inner nav { margin-left: auto; }

/* —— Page content —— */
.page {
  padding: calc(var(--topbar-h) + 3.55rem) 0 0;
}
/* Full-bleed hero viewport fill — matches desktop.cloudbsd.org geometry */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92svh;
  display: grid;
  align-content: end;
  padding: calc(var(--topbar-h) + 1.6rem) 0 2.35rem;
  /* Painting + scrim: keep hero type light even in light theme */
  color: #e2e8f0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 28%;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg,
      rgba(2, 6, 23, 0.94) 0%,
      rgba(15, 23, 42, 0.82) 38%,
      rgba(15, 23, 42, 0.45) 62%,
      rgba(2, 6, 23, 0.55) 100%),
    linear-gradient(180deg,
      rgba(2, 6, 23, 0.35) 0%,
      rgba(2, 6, 23, 0.15) 40%,
      rgba(2, 6, 23, 0.78) 100%);
}
.hero > .wrap {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.15rem, 6vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: #fff;
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(2, 6, 23, 0.45);
}
.hero .lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.9);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}
.hero-credit {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(148, 163, 184, 0.85);
  max-width: 36rem;
}
.hero-credit cite {
  font-style: italic;
}
.hero .btn-ghost {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.35);
}
.hero .btn-ghost:hover {
  border-color: #22d3ee;
  color: #fff;
}
.hero .status-pill {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}
@media (max-width: 700px) {
  .hero-bg img { object-position: 70% 22%; }
}

.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.term {
  background: var(--term);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.5rem;
  padding: 0.95rem 1.1rem;
  margin: 0 0 1.75rem;
  overflow-x: auto;
}
.term .bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  color: #94a3b8;
  font-size: 0.75rem;
}
.term .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}
.term .dot.r { background: #f87171; }
.term .dot.y { background: #fbbf24; }
.term .dot.g { background: #4ade80; }
.term pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--term-text);
  white-space: pre;
  direction: ltr;
  unicode-bidi: isolate;
}
.term .m { color: #64748b; }
.term .b { color: #7dd3fc; }
.term .k { color: #22d3ee; }
.term .s { color: #fcd34d; }
.term--ensemble { margin: 1rem 0 1.25rem; }
.term--ensemble pre { max-height: 22rem; overflow: auto; }

.ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.loop-strip {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem 0.35rem;
  max-width: 40rem;
}
.loop-strip > li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.45);
  min-width: 7.5rem;
  flex: 1 1 7.5rem;
}
.loop-strip .loop-n {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #22d3ee;
  letter-spacing: 0.06em;
}
.loop-strip strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}
.loop-strip > li > span:last-child {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.78);
}
.loop-strip .loop-arrow {
  display: none;
  align-self: center;
  border: 0;
  background: transparent;
  padding: 0 0.15rem;
  color: #22d3ee;
  font-size: 1.1rem;
  min-width: 0;
  flex: 0;
}
@media (min-width: 720px) {
  .loop-strip .loop-arrow { display: flex; }
}

.seeing {
  margin: -0.35rem 0 1.15rem !important;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid #22d3ee;
  background: rgba(0, 82, 155, 0.12);
  border-radius: 0 0.45rem 0.45rem 0;
  color: var(--foam) !important;
  max-width: 46rem !important;
  font-size: 0.95rem;
  line-height: 1.5;
}
html:not(.dark) .seeing {
  background: rgba(0, 82, 155, 0.08);
}

.tour-steps {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  counter-reset: tour;
}
.tour-steps li {
  counter-increment: tour;
  position: relative;
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--card, rgba(30, 41, 59, 0.35));
  color: var(--foam);
  line-height: 1.45;
  font-size: 0.95rem;
}
.tour-steps li::before {
  content: counter(tour, decimal-leading-zero);
  position: absolute;
  left: 0.75rem;
  top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #22d3ee;
  letter-spacing: 0.04em;
}
.tour-steps strong { color: var(--text-strong); }

.glossary-chips {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.glossary-chips li {
  flex: 1 1 12rem;
  max-width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.28);
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
}
.glossary-chips strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}
html:not(.dark) .glossary-chips li {
  background: rgba(0, 82, 155, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border-radius: 0.35rem;
  min-height: 2.75rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary {
  background: var(--cloudbsd-blue);
  color: #fff !important;
  border: 1px solid var(--cloudbsd-blue);
}
.btn-primary:hover {
  background: #0066c2;
  border-color: #0066c2;
  color: #fff !important;
}
.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--btn-ghost-hover-border);
  color: var(--text-strong) !important;
}

section.block {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
section.block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0 0 0.85rem;
}
section.block > p {
  margin: 0 0 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 38rem;
}

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.facts li {
  padding-left: 1.1rem;
  border-left: 2px solid var(--fact-border);
  color: var(--foam);
  line-height: 1.45;
  font-size: 0.98rem;
}
.facts strong { color: var(--text-strong); font-weight: 600; }

.lanes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; }
.lanes li a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}
.lanes li:last-child a { border-bottom: 0; }
.lanes .name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--lane-name);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.25rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.lanes .why { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

.docs-body { padding-bottom: 3rem; }
.docs-body h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.docs-body h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 2.25rem 0 0.55rem;
  color: var(--lane-name);
  font-weight: 600;
}
.docs-body p,
.docs-body li {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--muted);
}
.docs-body strong { color: var(--text-strong); font-weight: 600; }
.docs-body code {
  color: var(--text-strong);
  font-size: 0.95em;
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}
.docs-body ul { padding-left: 1.15rem; }
.docs-body .back { margin-top: 2.75rem; }
.docs-body .back a {
  color: var(--muted);
  text-decoration: none;
}
.docs-body .back a:hover { color: var(--text-strong); }

/* REVYTECH footer chrome (match revytechinc.com — always dark navy) */
footer.revy-foot {
  position: relative;
  margin-top: 3rem;
  padding: 5.5rem 0 2.75rem;
  background: #001a33;
  color: #fff;
  overflow: hidden;
  font-family: var(--font-ui);
}
footer.revy-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 72rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.35), transparent);
}
footer.revy-foot .revy-wm {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 1.25rem;
}
footer.revy-foot .revy-wm .tech {
  color: #00d4ff; /* REVYTECH accent — not CloudBSD cyan */
  font-style: normal;
}
footer.revy-foot .revy-desc {
  margin: 0;
  max-width: 28rem;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.65;
}
footer.revy-foot .revy-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem 2rem;
  margin-bottom: 3.5rem;
}
footer.revy-foot .revy-col-h {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00d4ff;
  margin: 0 0 1.5rem;
}
footer.revy-foot .revy-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
footer.revy-foot .revy-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.98rem;
  transition: color 0.15s ease;
}
footer.revy-foot .revy-links a:hover { color: #00d4ff; }
footer.revy-foot .revy-questions {
  margin: 0 0 0.85rem;
  color: #94a3b8;
  font-size: 0.98rem;
  line-height: 1.5;
}
footer.revy-foot .revy-mail {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
footer.revy-foot .revy-mail:hover { color: #00d4ff; }
footer.revy-foot .revy-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #64748b;
  font-size: 0.85rem;
}
footer.revy-foot .revy-bottom a {
  color: #64748b;
  text-decoration: none;
}
footer.revy-foot .revy-bottom a:hover { color: #fff; }
footer.revy-foot .revy-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
}
@media (max-width: 800px) {
  footer.revy-foot { padding: 3.5rem 0 2.25rem; }
  footer.revy-foot .revy-grid { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem; }
}

/* —— Live status + diagrams —— */
.hero-status {
  margin: 0 0 1.25rem;
  max-width: 40rem;
}
.hero-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--toggle-bg);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--dot-muted);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18);
}
.is-ok .status-dot,
.status-pill--ok .status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}
.is-down .status-dot,
.status-pill--down .status-dot {
  background: var(--cloudbsd-red);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.22);
}
.is-pending .status-dot,
.status-pill--pending .status-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.mini-nodes {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.mini-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 1.85rem;
  padding: 0 0.4rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}
.mini-node.is-ok {
  border-color: rgba(34, 197, 94, 0.55);
  color: #16a34a;
}
html.dark .mini-node.is-ok { color: #4ade80; }
.mini-node.is-down {
  border-color: rgba(211, 47, 47, 0.55);
  color: var(--cloudbsd-red);
}
.mini-pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brand-cyan);
  opacity: 0.55;
  animation: mesh-hop 1.8s linear infinite;
}
@keyframes mesh-hop {
  0% { opacity: 0.15; transform: scale(0.7); }
  40% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.15; transform: scale(0.7); }
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}
.section-head h2 { margin-bottom: 0; }
.section-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.status-age { margin-inline-start: 0.35rem; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}
.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.1rem 1.15rem 1.15rem;
}
.status-card--wide { grid-column: 1 / -1; }
.status-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.85rem;
}
.status-caption,
.diagram-caption {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 42rem;
}
.diagram-caption code {
  font-family: var(--font-mono);
  color: var(--text-strong);
  font-size: 0.9em;
}

.node-list,
.endpoint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.node-item,
.endpoint-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  background: var(--elevated);
}
.node-id {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-strong);
  min-width: 2rem;
}
.node-state {
  margin-inline-start: auto;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.endpoint-list a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
}
.stat-dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.stat-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.stat-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-dl dt {
  color: var(--muted);
  font-size: 0.9rem;
}
.stat-dl dd {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.92rem;
}

.cluster-svg,
.flow-svg,
.ensemble-svg,
.net-svg {
  width: 100%;
  min-width: 320px;
  height: auto;
  display: block;
  margin-top: 0.85rem;
  overflow: visible;
}
.mesh-line {
  stroke: url(#meshGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.85;
}
.mesh-line--diag {
  stroke-dasharray: 4 6;
  opacity: 0.45;
}
.mesh-pulse {
  fill: var(--brand-cyan);
  animation: mesh-slide 2.4s linear infinite;
}
.mesh-pulse--d2 { animation-delay: 1.2s; }
@keyframes mesh-slide {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
.mesh-node circle {
  fill: var(--void);
  stroke: var(--cloudbsd-blue);
  stroke-width: 2.5;
}
.mesh-node.is-ok circle {
  stroke: #22c55e;
  fill: rgba(34, 197, 94, 0.12);
}
.mesh-node.is-down circle {
  stroke: var(--cloudbsd-red);
  fill: rgba(211, 47, 47, 0.12);
}
.mesh-node text {
  fill: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.diagram-panel {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-height: 820px) {
  .hero {
    min-height: auto;
    padding-bottom: 1.75rem;
  }
  .hero .term {
    max-height: 7.5rem;
    overflow: auto;
  }
  .hero .lede {
    font-size: 1.02rem;
    margin-bottom: 0.85rem;
  }
  .loop-strip {
    margin-bottom: 0.9rem;
  }
  .loop-strip > li {
    min-width: 0;
    flex: 1 1 calc(33% - 0.4rem);
    padding: 0.45rem 0.55rem;
  }
  .loop-strip > li > span:last-child {
    font-size: 0.72rem;
  }
}
.diagram-panel h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--text-strong);
}
.flow-box {
  fill: var(--elevated);
  stroke: var(--cloudbsd-blue);
  stroke-width: 2;
}
.flow-box--accent {
  stroke: var(--cloudbsd-blue);
  fill: rgba(0, 82, 155, 0.14);
}
.flow-box--cyan {
  stroke: var(--brand-cyan);
  fill: rgba(34, 211, 238, 0.1);
}
.flow-label {
  fill: var(--text-strong);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.flow-sub {
  fill: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
}
.flow-arrow {
  stroke: var(--lane-name);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.flow-arrowhead { fill: var(--lane-name); }
.ens-frame {
  fill: transparent;
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.ens-title {
  fill: var(--lane-name);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.ens-alias {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.ens-link {
  stroke-dasharray: 5 4;
  animation: dash-move 1.2s linear infinite;
}
@keyframes dash-move {
  to { stroke-dashoffset: -18; }
}
.tls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.tls-card {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.95rem 1rem;
  background: var(--elevated);
}
.tls-card--public {
  border-color: rgba(34, 211, 238, 0.35);
}
.tls-card h4 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--text-strong);
}
.tls-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.steps {
  margin: 1.1rem 0 0;
  padding-left: 1.25rem;
  color: var(--foam);
  display: grid;
  gap: 0.55rem;
}
.steps li {
  line-height: 1.45;
  padding-left: 0.15rem;
}
.steps code {
  font-family: var(--font-mono);
  color: var(--text-strong);
  font-size: 0.92em;
}
.net-path { stroke-dasharray: 6 5; animation: dash-move 1.4s linear infinite; }

@media (max-width: 700px) {
  .status-grid,
  .tls-grid {
    grid-template-columns: 1fr;
  }
  .status-card--wide { grid-column: auto; }
  .hero-status-row { gap: 0.65rem; }
  .flow-svg,
  .ensemble-svg,
  .net-svg,
  .cluster-svg {
    min-height: 0;
  }
  .stat-dl > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}


/* —— Animated distributed topology —— */
.topo-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.75rem 0 1rem; }
.topo-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.topo-lane {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--elevated);
  padding: 0.65rem 0.7rem 0.75rem;
  min-height: 6rem;
}
.topo-lane h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.inst-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.inst-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text);
  flex-wrap: wrap;
}
.inst-list .svc-role {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.inst-list li.is-ok .status-dot { background: #22d3ee; box-shadow: 0 0 8px rgba(34,211,238,.45); }
.inst-list li.is-down .status-dot { background: #D32F2F; }
.inst-list li.is-pending .status-dot { background: #64748b; }
@media (max-width: 860px) {
  .topo-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .topo-lanes { grid-template-columns: 1fr; }
}
.topo-svg { width: 100%; min-width: 720px; height: auto; display: block; }
.topo-svg--dist { min-width: 880px; }
.topo-link {
  fill: none;
  stroke: var(--cloudbsd-blue, #00529B);
  stroke-width: 2;
  stroke-opacity: 0.45;
}
.topo-link--soft { stroke-opacity: 0.3; stroke-dasharray: 4 6; }
.topo-link--req { stroke: #22d3ee; stroke-opacity: 0.7; }
.topo-col-frame {
  fill: var(--elevated, rgba(15, 23, 42, 0.45));
  stroke: var(--border, rgba(148, 163, 184, 0.35));
  stroke-width: 1.25;
}
.topo-chip rect {
  fill: rgba(15, 23, 42, 0.88);
  stroke: #64748b;
  stroke-width: 1.6;
}
.topo-chip--web rect { stroke: #22d3ee; fill: rgba(8, 47, 73, 0.9); }
.topo-chip--db rect { stroke: #00529B; fill: rgba(2, 32, 64, 0.92); }
.topo-chip--cache rect { stroke: #38bdf8; fill: rgba(12, 40, 64, 0.9); }
.topo-chip--worker rect { stroke: #94a3b8; fill: rgba(30, 41, 59, 0.92); }
.topo-chip.is-down rect { stroke: #D32F2F; }
.topo-chip text {
  fill: #f8fafc;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11.5px;
  font-weight: 600;
}
html:not(.dark) .topo-col-frame { fill: rgba(248, 250, 252, 0.85); }
html:not(.dark) .topo-chip rect { fill: rgba(248, 250, 252, 0.96); }
html:not(.dark) .topo-chip--web rect { fill: rgba(224, 242, 254, 0.95); }
html:not(.dark) .topo-chip--db rect { fill: rgba(219, 234, 254, 0.95); }
html:not(.dark) .topo-chip--cache rect { fill: rgba(224, 242, 254, 0.95); }
html:not(.dark) .topo-chip text { fill: #0f172a; }
.topo-flow {
  stroke-width: 1.35;
  stroke-opacity: 0.45;
  stroke-linecap: round;
}
.topo-flow--req { stroke: #22d3ee; stroke-opacity: 0.55; }
.topo-flow--cache { stroke: #38bdf8; stroke-opacity: 0.45; stroke-dasharray: 3 5; }
.topo-flow--repl { stroke: #00529B; stroke-opacity: 0.5; stroke-dasharray: 5 4; }
.topo-flow--mesh { stroke: #7dd3fc; stroke-opacity: 0.4; stroke-dasharray: 2 6; }
.topo-flow--work { stroke: #94a3b8; stroke-opacity: 0.5; }
.topo-arrowhead { fill: #22d3ee; }
.topo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.topo-leg::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 0.2rem;
  margin-inline-end: 0.35rem;
  vertical-align: -0.1rem;
  border: 1.5px solid currentColor;
}
.topo-leg--web { color: #22d3ee; }
.topo-leg--db { color: #00529B; }
html.dark .topo-leg--db { color: #60a5fa; }
.topo-leg--cache { color: #38bdf8; }
.topo-leg--worker { color: #94a3b8; }
.pkt { fill: #22d3ee; opacity: 0.9; }
.pkt--b { fill: #00529B; }
.pkt--c { fill: #7dd3fc; }
.pkt--req { fill: #e2e8f0; }
.node-ring {
  fill: none;
  stroke: rgba(34, 211, 238, 0.35);
  stroke-width: 1.5;
  animation: ring-pulse 2.8s ease-in-out infinite;
}
.mesh-node.is-ok .node-ring { stroke: rgba(34, 211, 238, 0.55); }
.mesh-node.is-down .node-ring { stroke: rgba(211, 47, 47, 0.55); }
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}
.mesh-node circle:not(.node-ring) {
  fill: #0f172a;
  stroke: #00529B;
  stroke-width: 2.5;
}
.mesh-node.is-ok circle:not(.node-ring) { stroke: #22d3ee; }
.mesh-node.is-down circle:not(.node-ring) { stroke: #D32F2F; }
.mesh-node text { fill: #e2e8f0; font-family: Outfit, sans-serif; font-size: 14px; font-weight: 700; }
.svc-chip rect {
  fill: rgba(30, 41, 59, 0.92);
  stroke: #00529B;
  stroke-width: 1.75;
}
.svc-chip--web rect { stroke: #22d3ee; }
.svc-chip--cache rect { stroke: #38bdf8; }
.svc-chip--db rect { stroke: #00529B; }
.svc-chip--worker rect { stroke: #94a3b8; }
.svc-chip--edge rect { stroke: #64748b; }
.svc-chip.is-ok rect { stroke-opacity: 1; }
.svc-chip.is-down rect { stroke: #D32F2F; }
html:not(.dark) .svc-chip rect { fill: rgba(248, 250, 252, 0.95); }
html:not(.dark) .svc-chip text { fill: #0f172a; }
html:not(.dark) .svc-chip .svc-sub { fill: #64748b; }
html:not(.dark) .mesh-node circle:not(.node-ring) { fill: #f8fafc; }
html:not(.dark) .mesh-node text { fill: #0f172a; }
html:not(.dark) .topo-hint { fill: #64748b; }
.svc-chip text { fill: #f8fafc; font-family: Inter, sans-serif; font-size: 13px; font-weight: 600; }
.svc-chip .svc-sub { fill: #94a3b8; font-size: 10px; font-weight: 500; }
.topo-hint { fill: #64748b; font-family: Inter, sans-serif; font-size: 11px; }
.node-list--inline {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  list-style: none; padding: 0; margin: 0.5rem 0;
}
.svc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.svc-list li {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.svc-list .svc-role {
  margin-left: auto; color: var(--muted); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.svc-list li.is-ok .status-dot { background: #22d3ee; box-shadow: 0 0 8px rgba(34,211,238,.45); }
.svc-list li.is-down .status-dot { background: #D32F2F; }
.svc-list li.is-pending .status-dot { background: #64748b; }

/* —— Mobile —— */
@media (max-width: 700px) {
  :root { --topbar-h: 6.25rem; }
  .topbar { overflow: visible; }
  .topbar-inner {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 0.65rem;
    min-height: 5.1rem;
    padding: 0.85rem 0.55rem 0.65rem 0.75rem;
    overflow: visible !important;
  }
  /* HackMiami/desktop-www: force wrap shell width + right pad for absolute hamburger */
  .topbar .wrap.topbar-inner,
  .topbar-inner {
    width: calc(100% - 0.5rem);
    max-width: none;
    justify-content: flex-start !important;
    /* Extra right pad keeps brand clear of 44px hamburger */
    padding: 1.05rem 3.1rem 0.75rem 0.7rem !important;
  }
  .topbar-brand {
    flex: 1 1 auto !important;
    min-width: 0;
    margin-right: 0.35rem;
    overflow: visible !important;
  }
  /* Keep wordmark clear of far-right hamburger */
  .topbar-brand .by { display: none; }
  .topbar-brand img {
    width: 56px;
    height: 56px;
    border-radius: 0 !important;
    object-fit: contain;
  }
  .nav-toggle {
    display: inline-flex !important;
    position: absolute !important;
    right: 0 !important;
    top: 50%;
    transform: translateY(-50%);
    flex: 0 0 auto !important;
    margin: 0 !important;
    order: 99;
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
  }
  .topbar-inner nav {
    position: absolute !important;
    left: 0;
    right: 0;
    top: calc(100% + 0.15rem);
    margin: 0 !important;
    width: auto;
    height: 0;
    flex: none !important;
    overflow: visible !important;
  }
  /* Theme/lang live inside #site-nav; hide any stray direct children */
  .topbar-inner > .lang-picker,
  .topbar-inner > .theme-toggle { display: none !important; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: calc(100% + 0.55rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--menu-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.9rem;
    padding: 0.35rem 0.9rem 0.75rem;
    box-shadow: var(--glass-shadow);
    max-height: calc(100svh - 5rem);
    overflow-y: auto;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: block;
    padding: 0.8rem 0;
    min-height: 44px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links .nav-theme-item,
  .nav-links .nav-lang-item {
    margin: 0.25rem 0 0;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border);
  }
  .theme-toggle,
  .lang-toggle { width: 100%; justify-content: flex-start; }
  .lang-menu {
    right: 0;
    left: auto;
    min-width: min(90vw, 17rem);
  }
  .page {
    padding-top: calc(var(--topbar-h) + 3.6rem);
  }
  .hero {
    min-height: 92svh;
    padding: calc(var(--topbar-h) + 1rem) 0 1.75rem;
  }
  .term pre { font-size: 0.78rem; }
  .ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .ctas .btn { width: 100%; }
  .seeing { font-size: 0.9rem; }
  .term--ensemble pre {
    max-height: 16rem;
    font-size: 0.74rem;
  }
  .glossary-chips li { flex: 1 1 100%; }
}
