/* ============================================================
   apiegg — blind mode & privacy tiers (blind.html)
   Loads AFTER styles.css and reuses its tokens.
   Hero egg + tier rings, middleman-view tier simulation,
   tier cards, canary audit, never-do list.
   ============================================================ */

/* ---------- Hero overrides ---------- */
.blind-hero .hero-title { max-width: none; }

/* ---------- Hero visual: egg + tier rings ---------- */
.bd-wrap {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1;
  margin: 0 auto;
}
.bd-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(245, 239, 230, 0.12);
  animation: bdSpin 90s linear infinite;
}
.bd-ring.r0 { inset: 2%; }
.bd-ring.r1 { inset: 13%; animation-direction: reverse; animation-duration: 70s; border-color: rgba(167, 139, 250, 0.12); }
.bd-ring.r2 { inset: 24%; animation-duration: 55s; border-color: rgba(255, 194, 75, 0.12); }
.bd-yolk {
  position: absolute;
  top: 50%; left: 50%;
  width: 66%; height: 66%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), rgba(255, 194, 75, 0.08) 55%, transparent 72%);
  filter: blur(22px);
  animation: yolkBreathe 6s ease-in-out infinite;
  pointer-events: none;
}
.bd-egg {
  position: absolute;
  top: 50%; left: 50%;
  width: 108px; height: 117px;
  transform: translate(-50%, -50%);
  animation: floaty 5s ease-in-out infinite;
}
.bd-egg svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 36px rgba(167, 139, 250, 0.28)); }
.bd-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(20, 16, 28, 0.88);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  padding: 0.4rem 0.85rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
}
.bd-chip strong { color: var(--violet); font-weight: 600; }
.bd-chip.c1 { top: 1%; right: 4%; animation-delay: 0s; }
.bd-chip.c2 { bottom: 12%; right: -2%; animation-delay: 1.4s; }
.bd-chip.c3 { bottom: 1%; left: 6%; animation-delay: 2.6s; }
.bd-chip.c4 { top: 12%; left: -2%; animation-delay: 3.6s; }
.bd-tag {
  position: absolute;
  bottom: -2%;
  right: 6%;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(20, 16, 28, 0.88);
  border: 1px solid rgba(167, 139, 250, 0.45);
  padding: 0.45rem 0.9rem;
  border-radius: 0.7rem;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bd-tag strong { color: var(--violet); font-weight: 500; }
@media (max-width: 640px) {
  .bd-wrap { max-width: 310px; }
  .bd-egg { width: 88px; height: 95px; }
  .bd-chip { font-size: 0.62rem; padding: 0.34rem 0.7rem; }
  .bd-chip.c2 { right: 0; } .bd-chip.c4 { left: 0; }
}
@keyframes bdSpin { to { transform: rotate(360deg); } }

/* ---------- Sim shell (mirrors guardian.css) ---------- */
.sim {
  padding: 1.6rem 1.5rem 1.5rem;
  border-radius: 1.4rem;
  max-width: 980px;
  margin: 0 auto;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.05), rgba(255, 194, 75, 0.03));
}
@media (max-width: 640px) { .sim { padding: 1.2rem 0.9rem 1.1rem; } }
.sim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}
.sim-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.sim-caption {
  min-height: 2.6em;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid rgba(245, 239, 230, 0.07);
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1rem;
}
.sim-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
}
.sim-btns button {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(245, 239, 230, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.sim-btns button:hover { color: var(--text); border-color: rgba(167, 139, 250, 0.5); }
.sim-btns button.is-active {
  color: #1F1300;
  background: linear-gradient(135deg, #C4B5FD, #A78BFA);
  border-color: transparent;
  box-shadow: 0 8px 22px -8px rgba(124, 92, 252, 0.6);
}

/* ---------- Middleman-view stage ---------- */
.mm-stage {
  display: grid;
  grid-template-columns: 1fr 26px 1.5fr 26px 1fr;
  gap: 0.6rem;
  align-items: stretch;
}
@media (max-width: 760px) {
  .mm-stage { grid-template-columns: 1fr; gap: 0.8rem; }
}
.mm-arrow {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 1.05rem;
}
@media (max-width: 760px) {
  .mm-arrow { transform: rotate(90deg); padding: 0.1rem 0; }
}
.mm-node {
  border-radius: 1.1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.mm-node-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.mm-node-title .n-emoji { font-size: 1.05rem; }
.mm-node-sub { font-size: 0.66rem; color: var(--text-faint); line-height: 1.4; }

/* what the agent holds (always plain) */
.mm-fields { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.mm-f {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  background: rgba(245, 239, 230, 0.04);
  border: 1px solid rgba(245, 239, 230, 0.08);
  border-radius: 0.5rem;
  padding: 0.34rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.7s ease, filter 0.7s ease;
}
.agent-side .mm-f { color: var(--cream); }

/* router panel (the star) */
.mm-router {
  position: relative;
  border-radius: 1.2rem;
  background: linear-gradient(160deg, rgba(255, 194, 75, 0.05), rgba(124, 92, 252, 0.07));
  border: 1px solid rgba(167, 139, 250, 0.25);
  padding: 1rem 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  overflow: hidden;
}
.mm-router-title {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--violet);
}
#mm-view { position: relative; min-height: 148px; }
#mm-view .mm-fields { gap: 0.42rem; }

/* T0: fields fade to ghost */
#tiersim[data-tier="0"] .mm-f { color: var(--cream); }
#tiersim.t0-aged[data-tier="0"] .mm-f { opacity: 0.14; filter: blur(1.5px); }
.mm-ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
#tiersim.t0-aged[data-tier="0"] .mm-ghost { opacity: 0.9; }

/* T1: blur bars */
.mm-f.mm-bar {
  height: 1.55em;
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid rgba(245, 239, 230, 0.07);
  position: relative;
}
.mm-f.mm-bar span {
  position: absolute;
  inset: 0.28rem 0.4rem;
  border-radius: 0.3rem;
  background: repeating-linear-gradient(90deg, rgba(245, 239, 230, 0.22) 0 7px, transparent 7px 11px);
}
.mm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.mm-meta-chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  border: 1px solid rgba(245, 239, 230, 0.1);
  background: rgba(245, 239, 230, 0.03);
  border-radius: 2rem;
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}
.mm-meta-chip.ok { color: var(--green); border-color: rgba(52, 211, 153, 0.3); }

/* T2: token chips */
.mm-f.mm-token {
  color: var(--violet);
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.07);
}

/* router footer chips */
.mm-disk {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-faint);
  border-top: 1px dashed rgba(245, 239, 230, 0.1);
  padding-top: 0.55rem;
}

/* T3 lock overlay */
.mm-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(11, 9, 16, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s, visibility 0.45s;
  z-index: 2;
  text-align: center;
  padding: 0.6rem;
}
.mm-lock.show { opacity: 1; visibility: visible; }
.mm-lock .lock-icon { font-size: 1.8rem; filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.5)); }
.mm-lock .lock-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--violet);
  line-height: 1.5;
}

/* models node */
#mm-models-view {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0.5rem 0.6rem;
  border-radius: 0.7rem;
  background: rgba(245, 239, 230, 0.03);
  border: 1px dashed rgba(245, 239, 230, 0.12);
  flex: 1;
}

/* response strip */
.mm-response {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(52, 211, 153, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  text-align: center;
}

/* ---------- Tier cards ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  padding: 1.9rem 1.7rem 1.6rem;
  border-radius: 1.3rem;
  border-top: 2px solid var(--tc, var(--glass-border));
  transition: border-color 0.35s, box-shadow 0.35s;
}
.tier-card:hover {
  border-color: var(--tc, var(--glass-border));
  border-top-color: var(--tc, var(--violet));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 -4px 44px -12px var(--tc, transparent);
}
.tier-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.tier-head h3 {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
}
.tier-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tc, var(--violet));
  border: 1px solid var(--tc, var(--violet));
  padding: 0.22rem 0.6rem;
  border-radius: 2rem;
  opacity: 0.9;
}
.tier-see {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.7rem;
  background: rgba(245, 239, 230, 0.035);
  border: 1px solid rgba(245, 239, 230, 0.08);
}
.tier-see .ts-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  flex: none;
}
.tier-see .ts-value {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cream);
}
.tier-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.68; }
.tier-card p strong { color: var(--text); font-weight: 600; }

/* ---------- Canary audit ---------- */
.canary-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.2rem 2rem;
  border-radius: 1.4rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 194, 75, 0.05), rgba(124, 92, 252, 0.06));
}
@media (max-width: 640px) { .canary-card { padding: 1.8rem 1.3rem; } }
.canary-target {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  font-size: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 194, 75, 0.09);
  border: 1px dashed rgba(255, 194, 75, 0.45);
  margin-bottom: 1rem;
  box-shadow: 0 0 26px rgba(255, 194, 75, 0.12);
}
.canary-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}
.canary-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 58ch;
  margin: 0 auto 0.8rem;
  line-height: 1.75;
}
.canary-card p strong { color: var(--text); font-weight: 600; }
.canary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.canary-chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  background: rgba(245, 239, 230, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  padding: 0.34rem 0.75rem;
}
.canary-chip b { color: var(--green); font-weight: 600; }

/* ---------- Never-do list ---------- */
.never-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.9rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.035);
}
.never-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.never-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.never-list li {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}
.never-list li .x { color: var(--rose); font-weight: 700; flex: none; }
.never-list li strong { color: var(--text); font-weight: 600; }
.never-note {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(245, 239, 230, 0.12);
  font-size: 0.85rem;
  color: var(--text-faint);
}
.never-note a { color: var(--yolk); }

/* ---------- Cross-links ---------- */
.cross-links {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

/* ---------- Reduced motion (page-specific) ---------- */
@media (prefers-reduced-motion: reduce) {
  .bd-ring, .bd-egg, .bd-yolk, .bd-chip, .bd-tag { animation: none !important; }
  .mm-f, .mm-ghost, .mm-lock { transition: none !important; }
}
