/* ==========================================================================
   ai.laevis.net — Futuristic 80s Sinewave / Vector Oscilloscope Design
   Clean, high-contrast, responsive & accessible
   ========================================================================== */

:root {
  --bg-deep: #060814;
  --bg-surface: rgba(11, 16, 36, 0.86);
  --bg-card: rgba(14, 20, 44, 0.88);
  --bg-code: #070b18;

  --cyan: #00f0ff;
  --magenta: #ff2a85;
  --violet: #a855f7;
  --amber: #ffb84d;
  --green: #10b981;

  --text-main: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #8b9bb4;

  --border: rgba(0, 240, 255, 0.18);
  --border-soft: rgba(148, 163, 184, 0.16);
  --glow-cyan: 0 0 24px rgba(0, 240, 255, 0.28);
  --glow-magenta: 0 0 24px rgba(255, 42, 133, 0.25);

  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.16);
  padding: 0.12em 0.42em;
  border-radius: 5px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.84rem;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #030712;
  font-weight: 700;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ── 80s Retro-Futuristic Vector Horizon Backdrop ── */
.horizon-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(168, 85, 247, 0.16), transparent 52%),
    radial-gradient(circle at 82% 12%, rgba(0, 240, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #050713 0%, #090c1f 55%, #0e0a22 100%);
}

.horizon-sun {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.18) 0%, rgba(255, 42, 133, 0.16) 55%, rgba(168, 85, 247, 0.04) 100%);
  mask-image: repeating-linear-gradient(
    to bottom,
    #000 0 14px,
    transparent 14px 20px
  );
  -webkit-mask-image: repeating-linear-gradient(
    to bottom,
    #000 0 14px,
    transparent 14px 20px
  );
  filter: blur(0.5px);
  opacity: 0.55;
}

.horizon-grid {
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -10%;
  height: 56vh;
  background-image:
    linear-gradient(to right, rgba(0, 240, 255, 0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 42, 133, 0.15) 1px, transparent 1px);
  background-size: 64px 44px;
  transform: perspective(540px) rotateX(64deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 36%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 36%, #000 100%);
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.45;
}

/* ── Header & Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 20, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-shell {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.1em;
}

.brand-dot {
  color: var(--cyan);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links li {
  list-style: none;
}

.nav-links a:not(.btn) {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links .btn {
  white-space: nowrap;
}

.nav-links a:not(.btn):hover {
  color: var(--cyan);
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: var(--border-soft);
}

.nav-parent {
  font-family: var(--font-mono);
  font-size: 0.83rem !important;
  color: var(--text-muted) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 0.85rem 1.35rem;
  font-size: 0.98rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  color: #040814;
  background: linear-gradient(to right, var(--cyan) 0%, #7dd3fc 52%, #f472b6 100%);
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(0, 240, 255, 0.46);
}

.btn-ghost {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.72);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  white-space: nowrap;
  background: rgba(4, 8, 20, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
}

/* ── Hero & Sinewave Canvas ── */
.hero {
  position: relative;
  padding: 4.5rem 0 4.2rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

#sinewave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-grid > *,
.split-layout > *,
.install-grid > * {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(6, 12, 32, 0.85);
  border: 1px solid var(--border);
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.3rem, 4.7vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 1.15rem;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.65);
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan) 0%, #c084fc 52%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.06rem;
  color: var(--text-body);
  max-width: 58ch;
  margin-bottom: 1.6rem;
  text-shadow: 0 2px 16px rgba(5, 7, 19, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.motion-toggle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.24rem 0.7rem;
  cursor: pointer;
}

/* ── Oscilloscope Preview Card ── */
.oscilloscope-card {
  background: rgba(8, 12, 28, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), var(--glow-cyan);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.scope-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-soft);
}

.scope-dots {
  display: flex;
  gap: 6px;
}

.scope-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.scope-dots span:nth-child(1) { background: var(--magenta); }
.scope-dots span:nth-child(2) { background: var(--amber); }
.scope-dots span:nth-child(3) { background: var(--cyan); }

.scope-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.scope-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 0.12rem 0.48rem;
  border-radius: 4px;
}

.scope-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 13, 29, 0.95);
}

.scope-tab {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.scope-tab:hover {
  color: var(--text-main);
}

.scope-tab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgba(0, 240, 255, 0.06);
}

.scope-body {
  padding: 1.05rem 1.15rem 1.2rem;
}

.scope-kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.65rem;
  font-size: 0.86rem;
  margin-bottom: 0.55rem;
}

.scope-kv .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--magenta);
  padding-top: 0.16rem;
}

.scope-kv .v {
  color: var(--text-body);
}

.scope-code {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  overflow-x: auto;
  line-height: 1.5;
}

/* ── Sections ── */
.section {
  padding: 4.4rem 0;
}

.section-alt {
  background: rgba(7, 10, 24, 0.74);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  margin-bottom: 2.2rem;
  max-width: 720px;
}

.head-row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--text-body);
}

/* ── Mode Cards ── */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.55rem;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.mode-card[data-accent="cyan"]:hover { border-color: rgba(0, 240, 255, 0.45); box-shadow: var(--glow-cyan); }
.mode-card[data-accent="violet"]:hover { border-color: rgba(168, 85, 247, 0.48); box-shadow: 0 0 24px rgba(168, 85, 247, 0.25); }
.mode-card[data-accent="magenta"]:hover { border-color: rgba(255, 42, 133, 0.48); box-shadow: var(--glow-magenta); }

.card-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 0.55rem;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.card-summary {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.check-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.89rem;
  color: var(--text-muted);
}

.check-list li {
  position: relative;
  padding-left: 1.2rem;
}

.check-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}

/* ── Principles ── */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.principle-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.p-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--magenta);
  margin-bottom: 0.4rem;
}

.principle-tile h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.principle-tile p {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* ── Filter & Roles ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-body);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn.active,
.filter-btn:hover {
  color: #040814;
  background: var(--cyan);
  border-color: var(--cyan);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-card.is-hidden {
  display: none;
}

.role-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.role-top h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-main);
}

.perm-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-weight: 600;
}

.perm-ro {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.28);
}

.perm-test {
  color: var(--amber);
  background: rgba(255, 184, 77, 0.1);
  border: 1px solid rgba(255, 184, 77, 0.3);
}

.perm-rw {
  color: #f472b6;
  background: rgba(255, 42, 133, 0.12);
  border: 1px solid rgba(255, 42, 133, 0.28);
}

.role-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  flex: 1;
}

.role-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.role-tools code {
  font-size: 0.74rem;
}

/* ── Patterns Box ── */
.patterns-box {
  background: linear-gradient(135deg, rgba(11, 16, 36, 0.95), rgba(20, 12, 42, 0.92));
  border: 1px solid rgba(168, 85, 247, 0.32);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.patterns-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}

.patterns-head span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.patterns-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.pattern-item {
  background: rgba(6, 9, 22, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pattern-item strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--cyan);
}

.pattern-item span {
  font-size: 0.82rem;
  color: var(--text-body);
}

/* ── Skills + Changelog ── */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.skills-stack {
  display: grid;
  gap: 0.9rem;
}

.skill-row {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
}

.skill-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.skill-name code {
  font-size: 0.95rem;
  font-weight: 600;
}

.badge-new {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #040814;
  background: var(--amber);
  padding: 0.12rem 0.46rem;
  border-radius: 4px;
}

.skill-row p {
  font-size: 0.92rem;
  color: var(--text-body);
}

.changelog-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 42, 133, 0.3);
  border-radius: var(--radius);
  padding: 1.45rem;
}

.changelog-panel h3 {
  font-size: 1.2rem;
  color: var(--magenta);
  margin-bottom: 0.95rem;
}

.changelog-list {
  list-style: none;
  display: grid;
  gap: 0.72rem;
  font-size: 0.9rem;
  color: var(--text-body);
}

.changelog-list li {
  position: relative;
  padding-left: 1.15rem;
}

.changelog-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.08em;
  font-size: 0.72rem;
  color: var(--cyan);
}

/* ── Download & Install Section ── */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 1.5rem;
  align-items: start;
}

.download-box,
.install-steps-box {
  min-width: 0;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.dl-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.dl-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}

.dl-top h3 {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  word-break: break-word;
}

.dl-size {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sha-row {
  margin: 1rem 0;
  padding: 0.6rem 0.75rem;
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
}

.sha-label {
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}

.sha-val {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
}

.copy-mini,
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.26);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.copy-mini:hover,
.copy-btn:hover {
  background: rgba(0, 240, 255, 0.2);
}

.tree-pre {
  max-width: 100%;
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

.code-block {
  max-width: 100%;
  background: var(--bg-code);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.os-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.os-tab {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(7, 11, 24, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

.os-tab.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.os-panel {
  display: none;
}

.os-panel.active {
  display: block;
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-block pre {
  max-width: 100%;
  padding: 0.95rem 1rem;
  overflow-x: auto;
  line-height: 1.55;
}

.install-note {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.manual-steps {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-body);
}

.prompt-examples {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-soft);
}

.prompt-examples h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--amber);
}

.prompt-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-body);
  background: rgba(7, 11, 24, 0.85);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 18, 0.92);
  padding: 1.75rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(6, 9, 22, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.4rem 1.35rem;
    gap: 0.85rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-sep {
    display: none;
  }

  .hero-grid,
  .modes-grid,
  .principles-grid,
  .roles-grid,
  .split-layout,
  .install-grid {
    grid-template-columns: 1fr;
  }

  .patterns-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .patterns-grid {
    grid-template-columns: 1fr;
  }

  .scope-kv {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }
}
