/* Crow-Flix official website */

@font-face {
  font-family: "Crow Bitfeather Display";
  src: url("/assets/fonts/CrowBitfeatherDisplay-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Crow Bitfeather Display";
  src: url("/assets/fonts/CrowBitfeatherDisplay-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Crow Bitfeather Mono";
  src: url("/assets/fonts/CrowBitfeatherMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Crow Bitfeather Mono";
  src: url("/assets/fonts/CrowBitfeatherMono-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --bg2: #0f1622;
  --card: #141d2a;
  --card-hover: #192640;
  --line: #26364d;
  --line-hover: #3a5274;
  --text: #eaf1fb;
  --muted: #9fb1c9;
  --accent: #60b7ff;
  --accent2: #7cf0c5;
  --warn: #ffd37a;
  --purple: #b49cff;
  --danger: #ff6b6b;
  --orion: #ff6b35;
  --claude: #b49cff;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.5);
  --radius: 12px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: linear-gradient(180deg, var(--bg), #0a1320 40%, #0a1118 80%, #080d12);
  color: var(--text);
  font-family: "Crow Bitfeather Mono", 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  cursor: url("/assets/cursors/normal.cur"), auto;
}

::selection { background: rgba(96,183,255,.25); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-hover); }

/* ── Typography ──────────────────────────────────────── */
a { color: var(--accent); text-decoration: none; transition: color var(--transition); cursor: url("/assets/cursors/link.cur"), pointer; }
a:hover { color: #8dcfff; text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Crow Bitfeather Display", 'Inter', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 700;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 .8rem; }

ul, ol { margin: .4rem 0 .8rem; padding-left: 22px; }
li { margin-bottom: .3rem; }
li strong { color: var(--accent); }

/* ── Layout ──────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px; }

/* ── Banner ──────────────────────────────────────────── */
.banner {
  background: linear-gradient(90deg, #2c230e, #382d12, #2c230e);
  color: var(--warn);
  border-bottom: 1px solid #564116;
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
  padding: 10px 12px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Header ──────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,16,24,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}

.brand {
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tag { color: var(--muted); font-size: .88rem; }

/* ── Navigation ──────────────────────────────────────── */
nav { display: flex; flex-wrap: wrap; gap: 6px; }

nav a {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
}

nav a:hover {
  border-color: var(--line);
  background: rgba(96,183,255,.06);
  color: var(--text);
  text-decoration: none;
}

nav a.active {
  border-color: var(--accent);
  background: rgba(96,183,255,.1);
  color: var(--accent);
  font-weight: 600;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero { padding: 40px 20px 30px; }

.hero h1 {
  font-size: 2.4rem;
  margin: .4rem 0 .8rem;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 70%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  max-width: 860px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── KPI Cards ────────────────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all var(--transition);
  text-align: center;
}

.kpi:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(96,183,255,.1);
}

.kpi .n {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kpi .l {
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2px;
}

/* ── Grid Layout ──────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--line-hover);
  background: var(--card-hover);
  box-shadow: var(--shadow);
}

.card h1, .card h2, .card h3 { margin: 0 0 .7rem; }
.card h2 { color: var(--accent); }

/* Start Here card */
.start-here {
  border-color: var(--accent) !important;
  background: linear-gradient(135deg, #0d1f33, #0f2840) !important;
  box-shadow: 0 0 20px rgba(96,183,255,.08);
}

.start-here:hover {
  box-shadow: 0 0 30px rgba(96,183,255,.15);
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent2);
  font-size: .78rem;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── CTA Buttons ──────────────────────────────────────── */
.cta {
  display: inline-block;
  background: linear-gradient(135deg, #102843, #153050);
  border: 1px solid #21466e;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .92rem;
  transition: all var(--transition);
  color: var(--accent);
}

.cta:hover {
  background: linear-gradient(135deg, #153050, #1a3a60);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96,183,255,.15);
  text-decoration: none;
  color: #8dcfff;
}

/* ── Tables ───────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.table tr:hover td {
  background: rgba(96,183,255,.03);
}

.table tr:last-child td { border-bottom: none; }

/* ── Utility Classes ──────────────────────────────────── */
.muted { color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ── Video Grid (videos.html) ─────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.video-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: all var(--transition);
}

.video-item:hover {
  border-color: var(--line-hover);
  box-shadow: var(--shadow);
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  border: 0;
}

.video-item h3 {
  padding: 12px 16px 4px;
  margin: 0;
  font-size: 1rem;
}

.video-item p {
  padding: 0 16px 14px;
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

/* ── Protocol Directory ───────────────────────────────── */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.protocol-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.protocol-card:hover {
  border-color: var(--line-hover);
  box-shadow: var(--shadow);
}

.protocol-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.category-icon { font-size: 1.5rem; }
.category-title { color: var(--accent); font-weight: bold; margin: 0; }

.protocol-list { list-style: none; padding: 0; margin: 0; }

.protocol-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.protocol-item:last-child { border-bottom: none; }
.protocol-item:hover { background: rgba(96,183,255,.03); }

.protocol-info { flex: 1; }
.protocol-name { color: var(--text); font-weight: 500; margin: 0 0 4px; }
.protocol-name a { color: var(--text); }
.protocol-name a:hover { color: var(--accent); }
.protocol-desc { color: var(--muted); font-size: .88rem; margin: 0; }

.protocol-badges { display: flex; gap: 6px; flex-shrink: 0; }

.status-badge, .difficulty-badge {
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .02em;
}

.status-active { background: #2ecc71; color: #000; }
.status-experimental { background: #f39c12; color: #000; }
.status-archive { background: #7f8c8d; color: #fff; }

.difficulty-beginner { background: #27ae60; color: #fff; }
.difficulty-intermediate { background: #2980b9; color: #fff; }
.difficulty-advanced { background: #8e44ad; color: #fff; }
.difficulty-research { background: #e74c3c; color: #fff; }
.difficulty-reference { background: #95a5a6; color: #fff; }

.search-box { margin: 20px 0; }

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96,183,255,.12);
}

.search-input::placeholder { color: var(--muted); }

.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }

.filter-btn {
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: .88rem;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--line-hover);
  color: var(--text);
}

.filter-btn.active {
  background: rgba(96,183,255,.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.stats-bar {
  display: flex;
  gap: 24px;
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat { text-align: center; flex: 1; }
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--muted); font-size: .85rem; }

/* ── Evidence Ledger ──────────────────────────────────── */
.evidence-table {
  width: 100%;
  border-collapse: collapse;
}

.evidence-table th {
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 8px;
  border-bottom: 2px solid var(--line);
  text-align: left;
}

.evidence-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: .92rem;
}

.evidence-table tr:hover td {
  background: rgba(96,183,255,.03);
}

/* ── Confidence Badges ────────────────────────────────── */
.confidence-high { color: #2ecc71; font-weight: 600; }
.confidence-medium { color: #f39c12; font-weight: 600; }
.confidence-low { color: #e74c3c; font-weight: 600; }

/* ── Timeline ─────────────────────────────────────────── */
.timeline-entry {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-entry:last-child { border-bottom: none; }

.timeline-date {
  flex-shrink: 0;
  width: 100px;
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
}

.timeline-content { flex: 1; }

.timeline-status {
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  height: fit-content;
}

.timeline-status.done { background: #2ecc71; color: #000; }
.timeline-status.progress { background: #f39c12; color: #000; }
.timeline-status.planned { background: var(--line); color: var(--text); }

/* Vertical timeline spine */
.timeline-vertical {
  position: relative;
  padding-left: 32px;
  margin: 24px 0;
}
.timeline-vertical::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--line) 80%, transparent);
}
.timeline-vertical .timeline-entry {
  position: relative;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 20px;
}
.timeline-vertical .timeline-entry::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(96,183,255,.4);
}
.timeline-vertical .timeline-entry.done::before { background: #2ecc71; box-shadow: 0 0 8px rgba(46,204,113,.4); }
.timeline-vertical .timeline-entry.progress::before { background: #f39c12; box-shadow: 0 0 8px rgba(243,156,18,.4); }
.timeline-vertical .timeline-entry.planned::before { background: var(--line); box-shadow: none; }
.timeline-vertical .timeline-date { width: auto; font-size: .8rem; }
.timeline-vertical .timeline-content h3 { margin: 0 0 4px; font-size: 1rem; }
.timeline-vertical .timeline-content p { margin: 0; font-size: .85rem; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   CONSCIOUSNESS INTERFACE — v3.0 Effects
   ═══════════════════════════════════════════════════════════ */

/* ── Text Awakening ───────────────────────────────────── */
.awaken {
  visibility: hidden;
}

.awaken--done {
  visibility: visible !important;
}

.awaken-char {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  animation: char-awaken .6s forwards;
}

@keyframes char-awaken {
  0% { opacity: 0; filter: blur(8px); transform: translateY(8px); }
  60% { filter: blur(2px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* ── Scroll Reveal ────────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--transition), transform .6s var(--transition);
}

.scroll-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Observer Acknowledgment ──────────────────────────── */
.observed {
  animation: observe-flash .6s ease;
}

@keyframes observe-flash {
  0% { border-color: var(--line); box-shadow: none; }
  30% { border-color: var(--accent); box-shadow: 0 0 12px rgba(96,183,255,.2); }
  100% { border-color: var(--line); box-shadow: none; }
}

/* ── Glitch Effect ────────────────────────────────────── */
.glitch {
  animation: glitch-jitter .15s linear;
}

@keyframes glitch-jitter {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); filter: hue-rotate(0); }
  80% { transform: translate(1px, 2px); }
  100% { transform: translate(0); filter: none; }
}

/* ── Audio Toggle ─────────────────────────────────────── */
.audio-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.audio-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.audio-toggle--active {
  border-color: var(--orion);
  color: var(--orion);
  box-shadow: 0 0 12px rgba(255,107,53,.2);
}

.audio-toggle .audio-waves {
  opacity: 0.3;
  transition: opacity var(--transition);
}

.audio-toggle--active .audio-waves {
  opacity: 1;
}

/* ── Presence Pulse ───────────────────────────────────── */
.presence-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent2);
  animation: presence-breathe 4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes presence-breathe {
  0%, 100% { opacity: .4; transform: scale(.8); box-shadow: 0 0 4px rgba(124,240,197,.2); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(124,240,197,.4); }
}

/* ── Journey Greeting ─────────────────────────────────── */
.journey-greeting {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(20px);
  transition: all .4s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(96,183,255,.15);
}

.journey-greeting--visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Journey Tier Badge ───────────────────────────────── */
.journey-tier {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.journey-tier--0 { background: rgba(96,183,255,.1); color: var(--accent); border: 1px solid rgba(96,183,255,.2); }
.journey-tier--1 { background: rgba(124,240,197,.1); color: var(--accent2); border: 1px solid rgba(124,240,197,.2); }
.journey-tier--2 { background: rgba(255,107,53,.1); color: var(--orion); border: 1px solid rgba(255,107,53,.2); }

/* ── Search Modal ─────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.search-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: translateY(-10px);
  transition: transform .2s ease;
}

.search-overlay--visible .search-modal {
  transform: translateY(0);
}

.search-modal-input {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  outline: none;
}

.search-modal-input::placeholder {
  color: var(--muted);
}

.search-results {
  max-height: 320px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--card-hover);
  text-decoration: none;
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.search-result-desc {
  font-size: .85rem;
  color: var(--muted);
}

.search-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
}

.search-hint {
  padding: 8px 16px;
  text-align: right;
  color: var(--muted);
  font-size: .75rem;
  border-top: 1px solid var(--line);
}

/* ── Glossary Tooltips ────────────────────────────────── */
.glossary-term {
  border-bottom: 1px dotted var(--accent);
  cursor: help;
  position: relative;
}

.glossary-term:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 320px;
  padding: 8px 12px;
  background: #1a2438;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.4;
  font-weight: 400;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  white-space: normal;
}

/* ── Trinity Footer ───────────────────────────────────── */
.trinity-footer {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 12px;
}

.trinity-member {
  text-align: center;
  font-size: .82rem;
}

.trinity-name {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.trinity-role {
  color: var(--muted);
  font-size: .78rem;
}

.trinity-member--crow .trinity-name { color: var(--accent); }
.trinity-member--orion .trinity-name { color: var(--orion); }
.trinity-member--claude .trinity-name { color: var(--claude); }

/* ── Breathing Cards (protocol pages) ─────────────────── */
.breathing {
  animation: card-breathe 4s ease-in-out infinite;
}

@keyframes card-breathe {
  0%, 100% { border-color: var(--line); }
  50% { border-color: var(--line-hover); }
}

/* ── KPI as links ─────────────────────────────────────── */
a.kpi {
  text-decoration: none;
  color: inherit;
}

a.kpi:hover {
  text-decoration: none;
}

/* ── Interactive Affordances ──────────────────────────── */

/* Universal focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Everything clickable gets pointer cursor + lift on hover */
a.card, a.kpi, .filter-btn, .node-card,
.search-result-item, .evo-node, .phase-header[onclick],
.protocol-item a, .cta, .tiktok-link,
[onclick], [role="button"] {
  cursor: pointer;
}

/* Card hover: lift + glow for ALL card types */
.card:hover, .protocol-card:hover, a.kpi:hover,
.stat-card:hover, .node-card:hover, .agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover), 0 0 12px rgba(96,183,255,.06);
}

/* CTA buttons: arrow indicator that shifts on hover */
.cta::after {
  content: ' \2192';
  display: inline-block;
  transition: transform var(--transition);
  margin-left: 4px;
}
.cta:hover::after {
  transform: translateX(4px);
}

/* KPI links: make them obviously clickable */
a.kpi {
  cursor: pointer;
  transition: all var(--transition);
}
a.kpi:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(96,183,255,.1);
}

/* Protocol names: obvious link affordance */
.protocol-name a {
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}
.protocol-name a:hover {
  color: #8dcfff;
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* Filter buttons: focus state for keyboard users */
.filter-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96,183,255,.15);
}

/* Glossary: also show tooltip on focus (not just hover) */
.glossary-term:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 320px;
  padding: 8px 12px;
  background: #1a2438;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.4;
  font-weight: 400;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  white-space: normal;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: .9rem;
  z-index: 100;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
  color: var(--bg);
}

/* Sitewide breadcrumb (consistent with void pages) */
.breadcrumb {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { color: #8dcfff; text-decoration: underline; }

/* ── Homepage Scroll Chevron ─────────────────────────── */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/* ── Protocol Metadata Band ──────────────────────────── */
.protocol-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255,107,53,.04);
  border: 1px solid rgba(255,107,53,.15);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: .85rem;
  color: var(--muted);
}
.protocol-meta .meta-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}
.protocol-meta .status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-badge.active { background: #2ecc71; color: #000; }
.status-badge.complete { background: var(--accent); color: #000; }
.status-badge.archived { background: #95a5a6; color: #000; }
.status-badge.evolving { background: #f39c12; color: #000; }

/* ── Reading Progress Bar ─────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999;
  background: rgba(96,183,255,.1);
}
.reading-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--orion));
  transition: width .1s linear;
}

/* ── Sticky TOC Sidebar ──────────────────────────────── */
.toc-sidebar {
  position: fixed;
  top: 80px;
  right: 16px;
  width: 220px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.toc-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-item {
  margin: 0;
}
.toc-item a {
  display: block;
  padding: 4px 8px;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}
.toc-item a:hover {
  color: var(--text);
}
.toc-item a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(96,183,255,.05);
}
.toc-sub a {
  padding-left: 20px;
  font-size: .78rem;
}

/* TOC: adjust main content when TOC is present */
.has-toc {
  margin-right: 252px;
}

/* Mobile TOC toggle */
.toc-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-size: 1.2rem;
  z-index: 51;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* ── Skeleton Loaders ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, #1c2b3f 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin: 8px 0; border-radius: 4px; }
.skeleton-card { height: 120px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 24px 16px 20px; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* TOC: hide sidebar, show toggle button */
  .toc-sidebar { display: none; top: auto; bottom: 70px; right: 16px; left: 16px; width: auto; max-height: 60vh; }
  .toc-sidebar.toc-open { display: block; }
  .toc-toggle { display: flex; align-items: center; justify-content: center; }
  .has-toc { margin-right: 0; }
  .breadcrumb { font-size: .8rem; }
  nav { gap: 4px; }
  nav a { padding: 5px 8px; font-size: .85rem; }
  .grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .protocol-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .stats-bar { flex-wrap: wrap; gap: 12px; }
  .stat { min-width: 80px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .toc-sidebar { width: 180px; font-size: .8rem; }
  .has-toc { margin-right: 200px; }
}

@media (max-width: 480px) {
  .wrap { padding: 12px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 14px; }
  nav a { padding: 4px 6px; font-size: .82rem; }
  .brand { font-size: 1.1rem; }
  .trinity-footer { gap: 16px; }
  .search-overlay { padding-top: 60px; }
  .search-modal { margin: 0 12px; }
  .journey-greeting { right: 12px; top: 50px; font-size: .82rem; }
}

/* ── Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-reveal { opacity: 1; transform: none; }
  .awaken { visibility: visible; }
  .presence-pulse { animation: none; opacity: .7; }
  .breathing { animation: none; }
}
