/* =============================================================
   TRAIDOR — War Room of the Markets
   Visual system: medieval-RPG meets modern terminal luxury.
   Inspired by: Warcraft III UI heraldry, SNES Knights of the
   Round Table palette, igloo.inc / Awwwards-tier polish.
   ============================================================= */

:root {
  /* base */
  --bg-deep: #07090f;
  --bg-mid: #0c1018;
  --bg-raised: #14111a;

  /* surfaces */
  --panel: #181219;
  --panel-strong: #1f1820;
  --panel-edge: rgba(212, 169, 73, 0.22);
  --panel-edge-strong: rgba(244, 215, 124, 0.55);

  /* text */
  --bone: #ece4cc;
  --bone-dim: #a89880;
  --bone-faint: #6b5e48;

  /* gold + accents */
  --gold: #d4a949;
  --gold-bright: #f4d77c;
  --gold-deep: #8a6720;
  --emerald: #4cb37a;
  --emerald-deep: #1f5a37;
  --blood: #c83a3a;
  --blood-deep: #5e1414;
  --mystic: #5e8fcc;
  --mystic-deep: #1d3e6a;

  /* shadows + glows */
  --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
  --glow-gold: 0 0 28px rgba(212, 169, 73, 0.35);
  --glow-bright: 0 0 36px rgba(244, 215, 124, 0.55);

  /* type */
  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(94, 143, 204, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(200, 58, 58, 0.06), transparent 70%),
    linear-gradient(180deg, #07090f 0%, #0a0d18 50%, #07090f 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* ---------- atmosphere ---------- */

.ember-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 100% 70% at 50% 50%,
    transparent 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(212, 169, 73, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 169, 73, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 0%, transparent 100%);
}

/* ---------- top banner ---------- */

.banner {
  position: relative;
  z-index: 20;
  padding: 36px 48px 0;
}

.banner-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

/* /* ---- auth strip (injected by app.js at startup) ---- */ */
/* .auth-strip { */
/*   position: absolute; */
/*   top: -6px; */
/*   right: 0; */
/*   display: flex; */
/*   align-items: center; */
/*   gap: 10px; */
/*   font-size: 12px; */
/*   font-family: var(--font-display, 'Cinzel', serif); */
/*   letter-spacing: 0.5px; */
/*   z-index: 5; */
/* } */
/* .auth-strip .auth-user { */
/*   color: #f4d77c; */
/*   opacity: 0.85; */
/* } */
/* .auth-strip .risk-pill { */
/*   padding: 3px 10px; */
/*   border-radius: 12px; */
/*   font-weight: 700; */
/*   letter-spacing: 1px; */
/*   font-size: 10px; */
/*   text-transform: uppercase; */
/*   border: 1px solid currentColor; */
/*   background: rgba(0, 0, 0, 0.3); */
/* } */
/* .auth-strip .risk-pill[data-state="DISARMED"] { color: #8fa6c4; } */
/* .auth-strip .risk-pill[data-state="ARMED"]    { color: #4caf50; box-shadow: 0 0 14px rgba(76, 175, 80, 0.45); } */
/* .auth-strip .risk-pill[data-state="KILL_SWITCHED"] { color: #ff5252; animation: pulse-red 1.6s ease-in-out infinite; } */
/* @keyframes pulse-red { */
/*   0%, 100% { box-shadow: 0 0 0 rgba(255, 82, 82, 0); } */
/*   50% { box-shadow: 0 0 16px rgba(255, 82, 82, 0.6); } */
/* } */
/* .auth-strip .auth-btn { */
/*   background: linear-gradient(135deg, #d4a949 0%, #8a6720 100%); */
/*   color: #0a0d18; */
/*   border: 1px solid #f4d77c; */
/*   padding: 5px 12px; */
/*   border-radius: 4px; */
/*   font-family: var(--font-display, 'Cinzel', serif); */
/*   font-size: 10px; */
/*   font-weight: 700; */
/*   letter-spacing: 1px; */
/*   cursor: pointer; */
/*   text-transform: uppercase; */
/* } */
/* .auth-strip .auth-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(244, 215, 124, 0.3); } */
/* .auth-strip .auth-logout { */
/*   color: #8fa6c4; */
/*   text-decoration: none; */
/*   font-size: 11px; */
/*   border-bottom: 1px dotted #8fa6c4; */
/*   padding-bottom: 1px; */
/* } */
/* .auth-strip .auth-logout:hover { color: #f4d77c; border-bottom-color: #f4d77c; } */
/* @media (max-width: 700px) { */
/* /*   .auth-strip { */ */
/* /*     position: static; */ */
/* /*     justify-content: center; */ */
/* /*     margin-top: 8px; */ */
/* /*     flex-wrap: wrap; */ */
/* /*   } */ */
/* /* }  */
*/
/*  */
.crest {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 6px 24px rgba(212, 169, 73, 0.35));
}

.crest-svg {
  width: 100%;
  height: 100%;
}

.title-block {
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
}

.wordmark {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.18em;
  background: linear-gradient(180deg, #f4d77c 0%, #d4a949 50%, #8a6720 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 12px rgba(212, 169, 73, 0.25);
}

.subtitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--bone-dim);
  text-transform: uppercase;
}

.env-cluster {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(31, 24, 32, 0.9), rgba(20, 17, 26, 0.9));
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  text-transform: uppercase;
  box-shadow: var(--glow-gold);
}

.env-badge[data-env="live"] {
  border-color: rgba(200, 58, 58, 0.55);
  color: #ffb0a4;
  box-shadow: 0 0 28px rgba(200, 58, 58, 0.35);
}

.env-badge[data-env="paper"] {
  border-color: rgba(94, 143, 204, 0.5);
  color: #b9d4f7;
  box-shadow: 0 0 28px rgba(94, 143, 204, 0.35);
}

.env-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.env-meta {
  margin: 0;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--bone-faint);
  letter-spacing: 0.04em;
}

/* ---------- ornamental rule ---------- */

.banner-rule,
.footer-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1440px;
  margin: 28px auto 0;
  color: var(--gold);
}

.rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 169, 73, 0.5) 20%,
    rgba(212, 169, 73, 0.5) 80%,
    transparent 100%
  );
}

.rule-diamond {
  width: 32px;
  height: 16px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(212, 169, 73, 0.5));
}

/* ---------- main layout ---------- */

.layout {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: 1440px;
  margin: 32px auto 0;
  padding: 0 48px;
}

/* ---------- spellbook nav ---------- */

.spellbook {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  box-shadow: var(--shadow-deep);
}

.spellbook::before,
.spellbook::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.spellbook::before { top: 6px; }
.spellbook::after { bottom: 6px; }

.spell {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--bone-dim);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-display);
}

.spell:hover {
  color: var(--bone);
  background: rgba(212, 169, 73, 0.08);
  border-color: rgba(212, 169, 73, 0.3);
}

.spell[data-active="true"] {
  color: var(--gold-bright);
  background: linear-gradient(
    90deg,
    rgba(212, 169, 73, 0.18) 0%,
    rgba(212, 169, 73, 0.04) 100%
  );
  border-color: var(--panel-edge-strong);
  box-shadow: inset 0 0 24px rgba(212, 169, 73, 0.12), 0 0 18px rgba(212, 169, 73, 0.18);
}

.spell[data-active="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 8px var(--gold-bright);
}

.spell-icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  grid-row: 1 / 3;
  grid-column: 1;
}

.spell-label {
  grid-row: 1;
  grid-column: 2;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.spell-sub {
  grid-row: 2;
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--bone-faint);
  letter-spacing: 0.04em;
}

/* ---------- content area ---------- */

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.view {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeUp 0.5s ease;
}

.view[data-active="true"] {
  display: flex;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- panels ---------- */

.panel {
  position: relative;
  padding: 32px;
  border: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  box-shadow: var(--shadow-deep);
  border-radius: 2px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 169, 73, 0.08);
  pointer-events: none;
  border-radius: 1px;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  color: var(--gold);
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(212, 169, 73, 0.4));
}

.corner.tl { top: -2px; left: -2px; }
.corner.tr { top: -2px; right: -2px; transform: scaleX(-1); }
.corner.bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.corner.br { bottom: -2px; right: -2px; transform: scale(-1, -1); }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.panel-icon {
  width: 24px;
  height: 24px;
  fill: var(--gold);
  filter: drop-shadow(0 0 6px rgba(212, 169, 73, 0.4));
}

.panel-sub {
  margin: 6px 0 0;
  color: var(--bone-dim);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 64ch;
}

/* ---------- hero panel (Throne) ---------- */

.hero-panel {
  padding: 44px;
}

.hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  color: var(--gold);
  text-transform: uppercase;
}

.display {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--bone);
  max-width: 22ch;
}

.lede {
  margin: 0;
  color: var(--bone-dim);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 60ch;
}

.treasure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.treasure {
  position: relative;
  padding: 22px 22px 20px;
  border: 1px solid var(--panel-edge);
  background:
    linear-gradient(180deg, rgba(31, 24, 32, 0.9), rgba(20, 17, 26, 0.95)),
    radial-gradient(circle at top right, rgba(212, 169, 73, 0.08), transparent 70%);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.treasure::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(244, 215, 124, 0.4), transparent 40%, transparent 60%, rgba(244, 215, 124, 0.2)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.treasure:hover::after { opacity: 1; }
.treasure:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(212, 169, 73, 0.15); }

.treasure-label {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--bone-faint);
  text-transform: uppercase;
}

.treasure-value {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: -0.01em;
  line-height: 1;
}

.treasure-meta {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--bone-dim);
}

.treasure.skeleton {
  height: 96px;
  background: linear-gradient(90deg, var(--panel) 0%, var(--panel-strong) 50%, var(--panel) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gate-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border: 1px solid var(--panel-edge);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(20, 17, 26, 0.95), rgba(31, 24, 32, 0.85));
}

.gate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--bone-dim);
  letter-spacing: 0.04em;
}

.gate[data-status="open"] {
  border-color: rgba(76, 179, 122, 0.4);
  color: #b8e8c9;
  background: rgba(31, 90, 55, 0.18);
}

.gate[data-status="closed"] {
  border-color: rgba(200, 58, 58, 0.4);
  color: #ffb0a4;
  background: rgba(94, 20, 20, 0.18);
}

.gate[data-status="caution"] {
  border-color: rgba(212, 169, 73, 0.4);
  color: var(--gold-bright);
  background: rgba(138, 103, 32, 0.18);
}

/* ---------- codex / pre block ---------- */

.codex {
  margin: 14px 0 0;
  padding: 18px 22px;
  background: rgba(7, 9, 15, 0.7);
  border: 1px solid rgba(212, 169, 73, 0.18);
  border-left: 2px solid var(--gold);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--bone);
  line-height: 1.5;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.codex::-webkit-scrollbar { width: 8px; height: 8px; }
.codex::-webkit-scrollbar-track { background: rgba(7, 9, 15, 0.5); }
.codex::-webkit-scrollbar-thumb { background: rgba(212, 169, 73, 0.3); border-radius: 4px; }
.codex::-webkit-scrollbar-thumb:hover { background: rgba(212, 169, 73, 0.5); }

/* ---------- rune button ---------- */

.rune-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(212, 169, 73, 0.18) 0%, rgba(138, 103, 32, 0.18) 100%);
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(212, 169, 73, 0.18), inset 0 0 12px rgba(212, 169, 73, 0.08);
  overflow: hidden;
}

.rune-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(244, 215, 124, 0.25), transparent);
  transition: left 0.6s ease;
}

.rune-button:hover {
  background: linear-gradient(180deg, rgba(212, 169, 73, 0.32) 0%, rgba(138, 103, 32, 0.32) 100%);
  color: var(--bone);
  box-shadow: 0 0 32px rgba(244, 215, 124, 0.35), inset 0 0 16px rgba(244, 215, 124, 0.18);
}

.rune-button:hover::before { left: 100%; }

.rune-button.small { padding: 10px 18px; font-size: 0.72rem; }
.rune-button.big { padding: 18px 32px; font-size: 0.95rem; }

.rune-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- inputs ---------- */

.rune-input,
.symbol-form input,
.forge-field input {
  background: rgba(7, 9, 15, 0.7);
  border: 1px solid var(--panel-edge);
  border-radius: 2px;
  padding: 12px 16px;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  outline: none;
}

.rune-input:focus,
.symbol-form input:focus,
.forge-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(212, 169, 73, 0.3);
}

.rune-input { min-width: 240px; }

/* ---------- War Room ---------- */

.symbol-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.symbol-form input {
  width: 110px;
  text-transform: uppercase;
}

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.warrior {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(31, 24, 32, 0.9), rgba(20, 17, 26, 0.95));
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  transition: all 0.3s ease;
}

.warrior::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
}

.warrior[data-side="long"]::before { background: var(--emerald); }
.warrior[data-side="short"]::before { background: var(--blood); }

.warrior:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  border-color: var(--panel-edge-strong);
}

.warrior-symbol {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
}

.warrior-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--bone-dim);
  margin-top: 4px;
}

.warrior-pl {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: right;
}

.warrior-pl[data-sign="up"] { color: var(--emerald); }
.warrior-pl[data-sign="down"] { color: var(--blood); }
.warrior-pl[data-sign="flat"] { color: var(--bone-dim); }

.warrior-pl-pct {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  margin-top: 2px;
  opacity: 0.8;
}

.empty-roster {
  padding: 32px;
  text-align: center;
  color: var(--bone-dim);
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.86rem;
  border: 1px dashed var(--panel-edge);
  border-radius: 2px;
}

/* ---------- order list ---------- */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--panel-edge);
  background: rgba(20, 17, 26, 0.6);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--bone);
  transition: all 0.2s ease;
}

.order-row:hover {
  border-color: var(--panel-edge-strong);
  background: rgba(31, 24, 32, 0.8);
}

.order-side {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.order-side[data-side="buy"] {
  background: rgba(31, 90, 55, 0.4);
  color: #b8e8c9;
  border: 1px solid rgba(76, 179, 122, 0.5);
}

.order-side[data-side="sell"] {
  background: rgba(94, 20, 20, 0.4);
  color: #ffb0a4;
  border: 1px solid rgba(200, 58, 58, 0.5);
}

.order-symbol {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.order-meta {
  color: var(--bone-dim);
  font-size: 0.78rem;
}

/* ---------- Heralds (news feed) ---------- */

.herald-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.herald {
  position: relative;
  padding: 22px 24px;
  border: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(31, 24, 32, 0.85), rgba(20, 17, 26, 0.95));
  border-radius: 2px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  transition: all 0.25s ease;
}

.herald:hover {
  border-color: var(--panel-edge-strong);
  transform: translateX(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.herald-glyph {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-edge);
  border-radius: 2px;
  background: rgba(7, 9, 15, 0.6);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.herald-glyph[data-sentiment="pos"] { color: var(--emerald); border-color: rgba(76, 179, 122, 0.5); }
.herald-glyph[data-sentiment="neg"] { color: var(--blood); border-color: rgba(200, 58, 58, 0.5); }

.herald-body { min-width: 0; }

.herald-headline {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--bone);
  line-height: 1.4;
}

.herald-headline a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.herald-headline a:hover { border-color: var(--gold); }

.herald-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--bone-dim);
}

.herald-meta span { display: inline-flex; align-items: center; gap: 6px; }

.cred-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: rgba(212, 169, 73, 0.15);
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
}

.cred-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  box-shadow: 0 0 6px rgba(244, 215, 124, 0.5);
}

/* ---------- Forge ---------- */

.forge-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 8px 0 28px;
  flex-wrap: wrap;
}

.forge-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.forge-field span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}

.forge-field input {
  width: 180px;
  font-size: 1.1rem;
  text-transform: uppercase;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

.forge-result { display: flex; flex-direction: column; gap: 18px; }

.verdict {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border: 1px solid var(--panel-edge-strong);
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(31, 24, 32, 0.95), rgba(20, 17, 26, 0.98));
  position: relative;
  overflow: hidden;
}

.verdict::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(244, 215, 124, 0.1), transparent 60%);
  pointer-events: none;
}

.verdict[data-action="buy"] { border-color: rgba(76, 179, 122, 0.7); }
.verdict[data-action="sell"] { border-color: rgba(200, 58, 58, 0.7); }
.verdict[data-action="hold"] { border-color: rgba(212, 169, 73, 0.7); }

.verdict-glyph {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verdict[data-action="buy"] .verdict-glyph { color: var(--emerald); box-shadow: 0 0 32px rgba(76, 179, 122, 0.4); }
.verdict[data-action="sell"] .verdict-glyph { color: var(--blood); box-shadow: 0 0 32px rgba(200, 58, 58, 0.4); }
.verdict[data-action="hold"] .verdict-glyph { color: var(--gold); box-shadow: 0 0 32px rgba(212, 169, 73, 0.4); }

.verdict-body { position: relative; z-index: 1; }

.verdict-action {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.verdict-symbol {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--bone-dim);
}

.verdict-rationale {
  margin: 0;
  color: var(--bone);
  font-size: 0.92rem;
  line-height: 1.5;
}

.verdict-confidence {
  position: relative;
  z-index: 1;
  text-align: right;
}

.confidence-ring {
  width: 88px;
  height: 88px;
  position: relative;
}

.confidence-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.confidence-ring circle {
  fill: none;
  stroke-width: 6;
}

.confidence-track { stroke: rgba(212, 169, 73, 0.15); }

.confidence-progress {
  stroke: var(--gold-bright);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(244, 215, 124, 0.6));
  transition: stroke-dashoffset 0.6s ease;
}

.confidence-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--gold-bright);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.plan-cell {
  padding: 14px 18px;
  border: 1px solid var(--panel-edge);
  background: rgba(7, 9, 15, 0.5);
  border-radius: 2px;
}

.plan-cell-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--bone-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.plan-cell-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bone);
}

/* ---------- Sigils ---------- */

.sigil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.sigil-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(31, 24, 32, 0.9), rgba(20, 17, 26, 0.95));
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.sigil-card[data-state="lit"] {
  border-color: rgba(76, 179, 122, 0.5);
  box-shadow: 0 0 20px rgba(76, 179, 122, 0.15);
}

.sigil-card[data-state="dark"] { opacity: 0.65; }

.sigil-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sigil-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  text-transform: uppercase;
}

.sigil-state {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sigil-card[data-state="lit"] .sigil-state {
  background: rgba(31, 90, 55, 0.4);
  color: #b8e8c9;
  border: 1px solid rgba(76, 179, 122, 0.5);
}

.sigil-card[data-state="dark"] .sigil-state {
  background: rgba(94, 20, 20, 0.3);
  color: #ffb0a4;
  border: 1px solid rgba(200, 58, 58, 0.4);
}

.sigil-keys {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.sigil-key {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--bone-dim);
}

.sigil-key strong {
  color: var(--bone);
  font-weight: 500;
  word-break: break-all;
}

.sigil-key[data-set="true"] strong { color: var(--emerald); }
.sigil-key[data-set="false"] strong { color: var(--bone-faint); }

/* ---------- command grid ---------- */

.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.command-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(31, 24, 32, 0.85), rgba(20, 17, 26, 0.95));
  border-radius: 2px;
  transition: all 0.25s ease;
}

.command-card:hover {
  border-color: var(--panel-edge-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 18px rgba(212, 169, 73, 0.12);
}

.command-name {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  background: rgba(212, 169, 73, 0.12);
  border: 1px solid rgba(212, 169, 73, 0.3);
  border-radius: 2px;
  text-transform: uppercase;
}

.command-card h4 {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--bone);
}

.command-card p {
  margin: 0 0 10px;
  color: var(--bone-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}

.command-card pre {
  margin: 0;
  padding: 10px 12px;
  background: rgba(7, 9, 15, 0.7);
  border: 1px solid rgba(212, 169, 73, 0.12);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--gold-bright);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 4;
  padding: 32px 48px 48px;
  text-align: center;
  color: var(--bone-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer p { margin: 16px 0 0; }

/* ---------- utilities ---------- */

.muted { color: var(--bone-dim); font-style: italic; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }

  .spellbook {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding: 12px;
  }

  .spell {
    flex-shrink: 0;
    min-width: 140px;
  }

  .banner { padding: 24px 24px 0; }

  .banner-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .crest { margin: 0 auto; }

  .env-cluster { align-items: center; }
}

@media (max-width: 720px) {
  .panel { padding: 24px 20px; }
  .hero-panel { padding: 28px 22px; }
  .hero-head { flex-direction: column; }
  .display { font-size: 1.6rem; }
  .verdict { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .verdict-confidence { text-align: center; }
  .confidence-ring { margin: 0 auto; }
  .footer { padding: 24px 20px 36px; }
}

/* ===== DECREE / Autopilot ===== */
.decree-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1rem 0;
}
.decree-action {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .4rem .9rem;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  min-width: 5rem;
  text-align: center;
  flex-shrink: 0;
}
.decree-action[data-action="buy"]  { color: var(--emerald); border-color: var(--emerald); }
.decree-action[data-action="sell"] { color: var(--red, #e05252); border-color: var(--red, #e05252); }
.decree-action[data-action="hold"],
.decree-action[data-action="watch"] { color: var(--gold); border-color: var(--gold); }
.decree-regime { font-size: .85rem; color: var(--text-dim, #9a8c6e); margin: 0 0 .3rem; }
.decree-rationale { font-size: .82rem; line-height: 1.5; color: var(--text-muted, #7a6e52); margin: 0; }
.decree-autopilot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dim, rgba(212,169,73,.15));
}
/* Canvas takes full width, controls row sits below it */
.decree-autopilot .matrix-rain {
  width: 100%;
  flex: 0 0 100%;
  order: -1;
}
.autopilot-status { display: flex; align-items: center; gap: .6rem; }
.autopilot-actions { display: flex; gap: .5rem; }
.autopilot-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim, #9a8c6e); }
.autopilot-chip {
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: .2rem .55rem;
  border: 1px solid var(--border-dim, rgba(212,169,73,.3));
  color: var(--gold);
}
.autopilot-chip[data-state="running"] { color: var(--emerald); border-color: var(--emerald); }
.autopilot-chip[data-state="idle"],
.autopilot-chip[data-state="stopped"] { color: var(--text-muted, #7a6e52); }

/* ===== TRANSCRIPTS ===== */
.transcript-list { display: flex; flex-direction: column; gap: .5rem; }
.transcript-card {
  padding: .6rem .8rem;
  border-left: 2px solid var(--gold);
  background: rgba(212,169,73,.04);
}
.transcript-title { font-size: .85rem; color: var(--text-bright, #e8d8a0); margin: 0 0 .2rem; }
.transcript-meta { font-size: .72rem; color: var(--text-muted, #7a6e52); font-family: var(--font-mono); margin: 0; }

/* ===== SCAN ===== */
.scan-tabs { display: flex; gap: .3rem; }
.scan-tab {
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .1em;
  padding: .3rem .7rem;
  background: transparent;
  border: 1px solid rgba(212,169,73,.3);
  color: var(--text-dim, #9a8c6e);
  cursor: pointer;
  transition: all .15s;
}
.scan-tab[data-active="true"],
.scan-tab:hover { border-color: var(--gold); color: var(--gold); background: rgba(212,169,73,.08); }
.scan-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.scan-table th {
  text-align: left;
  padding: .4rem .6rem;
  font-family: var(--font-display);
  font-size: .65rem;
  letter-spacing: .1em;
  color: var(--text-dim, #9a8c6e);
  border-bottom: 1px solid rgba(212,169,73,.2);
}
.scan-row { cursor: pointer; transition: background .1s; }
.scan-row:hover { background: rgba(212,169,73,.07); }
.scan-table td { padding: .45rem .6rem; border-bottom: 1px solid rgba(212,169,73,.06); }
.scan-symbol { font-family: var(--font-display); font-weight: 600; color: var(--gold); }
.scan-score { font-family: var(--font-mono); color: var(--emerald); }
.scan-reasons { color: var(--text-muted, #7a6e52); font-size: .75rem; }
.pnl-pos { color: var(--emerald); }
.pnl-neg { color: var(--red, #e05252); }

/* ===== FLOCK / Leigh ===== */
.sheep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}
.sheep-card {
  padding: 1rem;
  border: 1px solid rgba(212,169,73,.2);
  background: rgba(212,169,73,.03);
  position: relative;
}
.sheep-card[data-state="active"] { border-color: var(--emerald); }
.sheep-card[data-state="retired"] { opacity: .55; }
.sheep-name {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: .25rem;
}
.sheep-strategy { font-size: .75rem; color: var(--text-dim, #9a8c6e); margin-bottom: .5rem; font-style: italic; }
.sheep-stats { display: flex; gap: .6rem; font-size: .72rem; font-family: var(--font-mono); color: var(--text-muted, #7a6e52); flex-wrap: wrap; }
.sheep-state {
  position: absolute;
  top: .5rem;
  right: .6rem;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted, #7a6e52);
}
.sheep-card[data-state="active"] .sheep-state { color: var(--emerald); }
.sheep-notes { font-size: .72rem; color: var(--text-muted, #7a6e52); margin: .4rem 0 0; font-style: italic; }
.flock-actions { display: flex; gap: .5rem; }
.sheep-header { display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; }
.sheep-icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; opacity: .7; }
.sheep-card[data-state="active"] .sheep-icon { opacity: 1; color: var(--emerald); }
.sheep-card[data-state="retired"] .sheep-icon { opacity: .35; }

/* ═══════════════════════════════════════════════════════════════
   TRAIDOR v2 — Premium Dark + Glassmorphism Override Layer
   Injected after existing styles; all :root vars redefined here
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Core palette — richer, cooler, more premium */
  --bg-deep: #020408;
  --bg-mid: #060b14;
  --bg-panel: rgba(6,11,20,0.72);
  --border: rgba(212,169,73,.16);
  --border-hover: rgba(212,169,73,.42);
  --gold: #d4a949;
  --gold-bright: #f0c84a;
  --gold-dim: rgba(212,169,73,.4);
  --emerald: #3ecf8e;
  --red: #e05252;
  --text: #e8d8a0;
  --text-dim: rgba(232,216,160,.5);
  --text-muted: rgba(232,216,160,.28);

  /* Glassmorphism */
  --glass-blur: blur(20px) saturate(160%);
  --glass-bg: rgba(6,11,20,.72);
  --glass-border: rgba(212,169,73,.15);
  --glass-shadow: 0 8px 48px rgba(0,0,0,.6),inset 0 0 0 1px rgba(212,169,73,.08);

  /* Typography */
  --font-display: 'Cinzel', Georgia, serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* ── Body / root ── */
html, body {
  background: var(--bg-deep) !important;
}

body {
  background: var(--bg-deep) !important;
}

/* ── Particle canvas (replaces ember) ── */
#particle-canvas, .ember-canvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: .7;
}

/* ── Header ── */
.header {
  background: rgba(2,4,8,.9) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* ── Nav spellbook ── */
.spellbook {
  background: rgba(3,5,10,.8) !important;
  border-right: 1px solid var(--border) !important;
  backdrop-filter: blur(12px) !important;
}

.spell {
  border-left: 2px solid transparent !important;
  transition: background .18s, border-color .18s !important;
}

.spell[data-active="true"] {
  background: rgba(212,169,73,.08) !important;
  border-left-color: var(--gold) !important;
}

.spell:hover:not([data-active="true"]) {
  background: rgba(212,169,73,.04) !important;
  border-left-color: rgba(212,169,73,.3) !important;
}

.spell-icon {
  color: var(--gold) !important;
  opacity: .6;
}
.spell[data-active="true"] .spell-icon { opacity: 1 !important; }

/* ── Panels — glassmorphism with see-through atmosphere ── */
.panel, .hero-panel {
  background: rgba(6,11,20,.62) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}

/* Corner filigree — thinner, brighter */
.corner use { color: var(--gold) !important; opacity: .45 !important; }
.corner { opacity: .8 !important; }

/* ── Title hero ── */
.site-title {
  font-family: var(--font-display) !important;
  letter-spacing: .22em !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #f0c84a 0%, #d4a949 50%, #a07830 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── Rune buttons ── */
.rune-button {
  position: relative;
  background: rgba(212,169,73,.06) !important;
  border: 1px solid rgba(212,169,73,.35) !important;
  color: var(--gold) !important;
  transition: all .2s !important;
  overflow: hidden !important;
}
.rune-button::before {
  content: '';
  position: absolute;inset:0;
  background: linear-gradient(135deg,rgba(212,169,73,.12),transparent);
  opacity:0;transition:opacity .2s;
}
.rune-button:hover::before { opacity: 1 !important; }
.rune-button:hover {
  border-color: var(--gold) !important;
  box-shadow: 0 0 16px rgba(212,169,73,.2) !important;
}
.rune-button.big {
  background: linear-gradient(135deg,rgba(212,169,73,.18),rgba(212,169,73,.06)) !important;
}

/* ── Scan tab buttons ── */
.scan-tab[data-active="true"] {
  background: rgba(212,169,73,.14) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 10px rgba(212,169,73,.15) !important;
}

/* ── Panel titles ── */
.panel-title {
  font-family: var(--font-display) !important;
  font-size: .8rem !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
}

/* ── Treasure tiles (Throne) ── */
.treasure {
  background: rgba(212,169,73,.04) !important;
  border: 1px solid rgba(212,169,73,.12) !important;
  transition: border-color .2s, background .2s !important;
}
.treasure:hover {
  background: rgba(212,169,73,.08) !important;
  border-color: rgba(212,169,73,.3) !important;
}
.treasure-value {
  background: linear-gradient(135deg, #f0c84a, #d4a949) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── Gate chips ── */
.gate[data-status="open"] {
  background: rgba(62,207,142,.1) !important;
  border-color: rgba(62,207,142,.4) !important;
  color: var(--emerald) !important;
}
.gate[data-status="closed"] {
  background: rgba(224,82,82,.08) !important;
  border-color: rgba(224,82,82,.35) !important;
  color: var(--red) !important;
}
.gate[data-status="caution"] {
  background: rgba(212,169,73,.08) !important;
  border-color: var(--border) !important;
  color: var(--gold) !important;
}

/* ── Tables ── */
.scan-table th { color: var(--gold) !important; opacity: .6; }
.scan-row:hover { background: rgba(212,169,73,.06) !important; }

/* ── Sheep cards ── */
.sheep-card {
  background: rgba(212,169,73,.03) !important;
  border: 1px solid rgba(212,169,73,.12) !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.sheep-card:hover {
  border-color: rgba(212,169,73,.3) !important;
  box-shadow: 0 0 20px rgba(212,169,73,.08) !important;
}
.sheep-card[data-state="active"] {
  border-color: rgba(62,207,142,.3) !important;
}

/* ── Autopilot chip ── */
.autopilot-chip[data-state="running"] {
  color: var(--emerald) !important;
  border-color: rgba(62,207,142,.5) !important;
  box-shadow: 0 0 8px rgba(62,207,142,.2) !important;
}

/* ── Decree action ── */
.decree-action[data-action="buy"] {
  color: var(--emerald) !important;
  border-color: rgba(62,207,142,.6) !important;
  box-shadow: 0 0 12px rgba(62,207,142,.2) !important;
}
.decree-action[data-action="sell"] {
  color: var(--red) !important;
  border-color: rgba(224,82,82,.6) !important;
  box-shadow: 0 0 12px rgba(224,82,82,.2) !important;
}

/* ── Command grid ── */
.command-card {
  background: rgba(212,169,73,.03) !important;
  border: 1px solid rgba(212,169,73,.1) !important;
  transition: border-color .15s, background .15s !important;
}
.command-card:hover {
  background: rgba(212,169,73,.07) !important;
  border-color: rgba(212,169,73,.25) !important;
}

/* ── Sigil grid ── */
.sigil-group {
  background: rgba(212,169,73,.03) !important;
  border: 1px solid rgba(212,169,73,.1) !important;
}
.sigil-key[data-set="true"] strong { color: var(--emerald) !important; }
.sigil-key[data-set="false"] strong { color: var(--red) !important; opacity: .7; }

/* ── Transcript cards ── */
.transcript-card {
  border-left: 2px solid var(--gold) !important;
  background: rgba(212,169,73,.03) !important;
}

/* ── Rune input ── */
.rune-input {
  background: rgba(212,169,73,.04) !important;
  border: 1px solid rgba(212,169,73,.2) !important;
  color: var(--text) !important;
  transition: border-color .2s !important;
}
.rune-input:focus {
  border-color: var(--gold) !important;
  outline: none !important;
}

/* ── Env badge ── */
#env-badge[data-env="live"] {
  background: rgba(224,82,82,.15) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
}
#env-badge[data-env="paper"] {
  background: rgba(212,169,73,.1) !important;
  border-color: rgba(212,169,73,.4) !important;
  color: var(--gold) !important;
}

/* ── Footer ── */
.footer { border-top: 1px solid var(--border) !important; }

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,169,73,.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,169,73,.4); }

/* ── Smooth view transitions ── */
.view { transition: opacity .2s ease !important; }
.view:not([data-active="true"]) { opacity: 0; pointer-events: none; }
.view[data-active="true"] { opacity: 1; }

/* ── WC3/SNES Polish ── */

/* Sheep card state-colored left border */
.sheep-card {
  border-left: 3px solid rgba(212,169,73,.25) !important;
}
.sheep-card[data-state="active"] {
  border-left-color: var(--emerald) !important;
  box-shadow: inset 3px 0 8px rgba(62,207,142,.1), 0 0 20px rgba(62,207,142,.06) !important;
}
.sheep-card[data-state="grazing"] {
  border-left-color: var(--gold) !important;
}
.sheep-card[data-state="judged"], .sheep-card[data-state="restless"] {
  border-left-color: var(--red) !important;
}
.sheep-card[data-state="retired"] {
  border-left-color: rgba(107,94,72,.3) !important;
}
.sheep-card[data-state="new"] {
  border-left-color: var(--gold-bright, #f0c84a) !important;
  box-shadow: inset 3px 0 8px rgba(212,169,73,.08) !important;
}

/* Stronger gold glow on hover for buttons and cards */
.rune-button:hover {
  box-shadow: 0 0 20px rgba(212,169,73,.3), 0 0 40px rgba(212,169,73,.1) !important;
}
.treasure:hover, .command-card:hover {
  box-shadow: 0 0 16px rgba(212,169,73,.12) !important;
}

/* Sigil cards — runic glow on lit state */
.sigil-card[data-state="lit"] {
  box-shadow: 0 0 24px rgba(76,179,122,.15), inset 0 0 12px rgba(76,179,122,.05) !important;
}
.sigil-card[data-state="lit"]::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(76,179,122,.2);
  pointer-events: none;
  animation: sigilPulse 3s ease-in-out infinite;
}
@keyframes sigilPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .7; border-color: rgba(76,179,122,.4); }
}

/* ═══════════════════════════════════════════════════════════════
   HERO SCENE — Scroll-driven cinematic battle
   ═══════════════════════════════════════════════════════════════ */

.hero-scene {
  position: relative;
  width: 100%;
  height: 400vh;
  z-index: 10;
}

.hero-pin-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #010208 0%, #060a18 30%, #0a1020 60%, #080c1a 100%);
}

/* Wisp canvas layer */
.wisp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Shared layer positioning */
.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-svg {
  width: 100%;
  height: 100%;
}

.hero-char-svg {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Background layer */
.hero-bg { z-index: 1; }

/* Fog layer — CSS gradient mist */
.hero-fog {
  z-index: 3;
  background:
    radial-gradient(ellipse 80% 30% at 20% 70%, rgba(138,79,207,.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 25% at 80% 65%, rgba(62,207,176,.06) 0%, transparent 70%),
    linear-gradient(0deg, rgba(10,16,32,.9) 0%, rgba(10,16,32,.3) 30%, transparent 60%);
}

/* Character layers */
.hero-character { z-index: 4; }

/* Arthur positioning — left-center, heroic stance */
#hero-arthur {
  left: 12%;
  right: auto;
  width: 22%;
  min-width: 200px;
  max-width: 340px;
  top: 10%;
  height: 88%;
}
#hero-arthur .hero-char-svg {
  width: 100%;
  height: 100%;
}

/* Dragon positioning — right side, large and imposing */
#hero-dragon {
  right: 0;
  left: auto;
  width: 55%;
  top: 5%;
  height: 90%;
  transform: translateX(100%);
}
#hero-dragon .hero-char-svg {
  width: 100%;
  height: 100%;
}

/* Morgan le Fay — background center, menacing presence */
#hero-morgan {
  left: 42%;
  right: auto;
  width: 20%;
  min-width: 180px;
  max-width: 280px;
  top: 2%;
  height: 85%;
  opacity: 0;
  transform: scale(0.9);
}
#hero-morgan .hero-char-svg {
  width: 100%;
  height: 100%;
}

/* Lancelot — between Arthur and Morgan, ghostly spirit */
#hero-lancelot {
  left: 30%;
  right: auto;
  width: 18%;
  min-width: 160px;
  max-width: 250px;
  top: 8%;
  height: 85%;
  opacity: 0;
  filter: blur(1.5px);
}
#hero-lancelot .hero-char-svg {
  width: 100%;
  height: 100%;
}

/* Hero text overlay */
.hero-text-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  letter-spacing: .25em;
  background: linear-gradient(135deg, #f4d77c 0%, #d4a949 40%, #8a6720 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  text-shadow: none;
  filter: drop-shadow(0 0 40px rgba(212,169,73,.3));
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(.9rem, 2vw, 1.4rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(232,216,160,.5);
  margin: 1rem 0 0;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 8%;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .15em;
  color: rgba(212,169,73,.35);
  animation: scrollCuePulse 2.5s ease-in-out infinite;
}

/* ── Herald controls ── */
.herald-controls {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Test the Waters buttons ── */
.waters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.waters-btn {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  text-align: left;
  padding: 1rem 1.2rem !important;
  min-height: 100px;
  gap: .5rem;
}
.waters-btn .rune-label {
  font-size: .85rem !important;
  font-weight: 700;
}
.waters-desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: .7rem;
  color: var(--bone-dim, #a89880);
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.waters-log {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--bone-dim, #a89880);
  max-height: 200px;
  overflow-y: auto;
}
.waters-log-entry {
  padding: .4rem 0;
  border-bottom: 1px solid rgba(212,169,73,.06);
}
.waters-log-entry .log-time { color: var(--gold-dim, rgba(212,169,73,.4)); margin-right: .5rem; }
.waters-log-entry .log-ok { color: var(--emerald, #3ecf8e); }
.waters-log-entry .log-err { color: var(--red, #e05252); }

/* ── Runtime details (collapsible) ── */
.runtime-details {
  border: 1px solid var(--glass-border, rgba(212,169,73,.15)) !important;
  background: var(--glass-bg, rgba(6,11,20,.72)) !important;
  backdrop-filter: blur(16px) !important;
  padding: 1rem 1.2rem !important;
  margin-top: 1rem;
}
.runtime-details[open] summary .panel-icon { color: var(--gold); }

@keyframes scrollCuePulse {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50% { opacity: .7; transform: translateY(6px); }
}

/* Dragon fire glow */
.dragon-fire { transition: opacity .3s; }

/* Morgan orb glow */
.morgan-orb-l, .morgan-orb-r {
  filter: blur(6px);
}

/* Lancelot spirit wisps float */
.spirit-wisp {
  filter: blur(2px);
}

/* ── Responsive hero ── */
@media (max-width: 768px) {
  #hero-arthur { left: 5%; width: 35%; min-width: 140px; }
  #hero-dragon { right: -5%; width: 65%; }
  #hero-morgan { left: 35%; width: 25%; min-width: 140px; }
  #hero-lancelot { left: 22%; width: 22%; min-width: 120px; }
  .hero-title { letter-spacing: .15em; font-size: 3rem; }
  .hero-subtitle { font-size: .9rem; }
  .auth-card { width: 90%; min-width: auto; }
}

/* ── Auth gate overlay ── */
.auth-gate {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 4rem 2rem;
}
.auth-gate.hidden { display: none; }

.auth-card {
  width: 380px;
  padding: 2.5rem;
  background: rgba(6, 11, 20, .85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 169, 73, .2);
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5), inset 0 0 60px rgba(212, 169, 73, .03);
}

.auth-crest {
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--gold);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-bright);
  text-align: center;
  letter-spacing: .12em;
  margin: 0 0 .4rem;
}

.auth-subtitle {
  font-family: var(--font-display);
  font-size: .75rem;
  color: var(--bone-dim);
  text-align: center;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 1.8rem;
}

.auth-field {
  margin-bottom: 1.2rem;
}

.auth-field label {
  display: block;
  font-family: var(--font-display);
  font-size: .7rem;
  color: var(--bone-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}

.auth-field input {
  width: 100%;
  padding: .65rem .8rem;
  background: rgba(10, 16, 32, .8);
  border: 1px solid rgba(212, 169, 73, .15);
  border-radius: 4px;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: rgba(212, 169, 73, .5);
  box-shadow: 0 0 12px rgba(212, 169, 73, .1);
}

.auth-error {
  color: #e05252;
  font-size: .8rem;
  min-height: 1.2em;
  margin-bottom: .8rem;
  text-align: center;
}

.auth-submit {
  width: 100%;
  margin-bottom: .8rem;
}

.auth-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--bone-dim);
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .08em;
  cursor: pointer;
  padding: .5rem;
  text-align: center;
  transition: color .2s;
}
.auth-toggle:hover { color: var(--gold); }

/* ---------- onboarding overlay ---------- */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 9, 15, .92);
  backdrop-filter: blur(12px);
}
.onboarding-card {
  max-width: 420px;
  width: 90%;
}

/* ---------- environment toggle ---------- */
.env-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  overflow: hidden;
}
.env-btn {
  flex: 1;
  padding: .55rem 1rem;
  background: transparent;
  border: none;
  color: var(--bone-dim);
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.env-btn.active {
  background: rgba(212, 169, 73, .15);
  color: var(--gold-bright);
}
.env-btn:hover:not(.active) {
  background: rgba(212, 169, 73, .06);
  color: var(--bone);
}

/* ---------- alpaca badge ---------- */
.alpaca-badge {
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: .3rem .8rem;
  border-radius: 4px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge-connected {
  background: rgba(76, 179, 122, .15);
  color: var(--emerald);
  border: 1px solid rgba(76, 179, 122, .3);
}
.badge-warning {
  background: rgba(200, 58, 58, .1);
  color: var(--blood);
  border: 1px solid rgba(200, 58, 58, .25);
}

/* ---------- settings panel ---------- */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.settings-toggle-row {
  justify-content: space-between;
}
.settings-label {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--bone);
  letter-spacing: .06em;
  min-width: 140px;
}
.settings-value {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: .85rem;
}
.settings-input-group {
  flex: 1;
  min-width: 200px;
}
.settings-input-group .rune-input {
  width: 100%;
}
.settings-hint {
  font-size: .72rem;
  color: var(--bone-dim);
  margin: .2rem 0 0;
  line-height: 1.4;
}
.settings-toggle-info {
  flex: 1;
}
.settings-toggle-info .settings-hint {
  margin-top: .15rem;
}

/* toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: 24px;
  transition: background .2s, border-color .2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--bone-dim);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
input:checked + .toggle-slider {
  background: rgba(212, 169, 73, .2);
  border-color: var(--gold-deep);
}
input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

/* warnings */
.settings-warning {
  background: rgba(200, 58, 58, .08);
  border: 1px solid rgba(200, 58, 58, .2);
  border-radius: 6px;
  padding: .65rem .9rem;
  font-size: .75rem;
  color: var(--bone-dim);
  line-height: 1.5;
  margin-top: -.5rem;
}
.settings-savings {
  display: block;
  margin-top: .3rem;
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: .7rem;
}

/* test connection button */
.settings-test-btn {
  padding: .45rem 1.2rem;
}
.settings-conn-status {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--bone-dim);
}
.status-ok { color: var(--emerald); }
.status-err { color: var(--blood); }

/* logout button */
.settings-logout-btn {
  background: rgba(200, 58, 58, .1);
  border-color: rgba(200, 58, 58, .3);
}
.settings-logout-btn:hover {
  background: rgba(200, 58, 58, .2);
}

/* storage estimate table */
.settings-storage-estimate {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-edge);
}
.settings-storage-estimate h4 {
  font-family: var(--font-display);
  font-size: .75rem;
  color: var(--bone-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .6rem;
}
.storage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
}
.storage-table td {
  padding: .3rem 0;
  color: var(--bone-dim);
}
.storage-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--bone);
}
.storage-total td {
  padding-top: .5rem;
  border-top: 1px solid var(--panel-edge);
  font-weight: 600;
  color: var(--gold) !important;
}

/* ---------- Forge multi-plan + AI notice cards (Groups D, E, G) ---------- */

.forge-multi-actions { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.forge-multi-result { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.25rem; }
.forge-thesis, .forge-risk { color: var(--bone); font-size: .85rem; line-height: 1.4; }
.forge-risk-level { color: var(--gold); font-family: var(--font-mono); font-size: .8rem; }
.forge-plays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .65rem; }
.forge-play-card {
  background: rgba(20, 16, 10, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  padding: .65rem .75rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.forge-play-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.forge-play-symbol { font-family: var(--font-mono); font-weight: 600; color: var(--gold); font-size: .95rem; }
.forge-play-action {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  padding: .12rem .4rem; border-radius: 2px;
  background: rgba(212, 169, 73, 0.15); color: var(--bone);
}
.forge-play-action[data-action="buy"], .forge-play-action[data-action="long"] { background: rgba(120, 200, 120, 0.18); color: #b9e6b9; }
.forge-play-action[data-action="sell"], .forge-play-action[data-action="short"] { background: rgba(200, 120, 120, 0.18); color: #e6b9b9; }
.forge-play-category { font-size: .65rem; color: var(--bone-dim); text-transform: uppercase; letter-spacing: .06em; margin-left: auto; }
.forge-play-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem .8rem; font-size: .75rem; font-family: var(--font-mono); color: var(--bone); }
.forge-play-numbers .lbl { display: block; color: var(--bone-dim); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.forge-play-reasoning { font-size: .75rem; color: var(--bone-dim); line-height: 1.4; padding-top: .35rem; border-top: 1px solid var(--panel-edge); }
.forge-scan-summary { font-size: .75rem; color: var(--bone-dim); display: flex; flex-direction: column; gap: .15rem; }

.ai-notice {
  background: rgba(40, 28, 12, 0.6);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: .75rem .9rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.ai-notice-title { color: var(--gold); font-weight: 600; font-size: .85rem; }
.ai-notice-msg { color: var(--bone); font-size: .8rem; line-height: 1.4; }
.ai-notice-howto { color: var(--bone-dim); font-size: .8rem; line-height: 1.4; }
.ai-notice-howto strong { color: var(--bone); }

/* ---------- Sigils rich rendering (Group E) ---------- */

.sigil-tile {
  background: rgba(20, 16, 10, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  padding: .8rem .9rem;
  display: flex; flex-direction: column; gap: .4rem;
  cursor: pointer;
  transition: border-color .15s ease;
}
.sigil-tile:hover, .sigil-tile.expanded { border-color: var(--gold); }
.sigil-tile-head { display: flex; align-items: center; gap: .5rem; }
.sigil-tile-name { font-weight: 600; color: var(--bone); font-size: .9rem; flex: 1; }
.sigil-tile-status {
  font-family: var(--font-mono); font-size: .7rem; padding: .12rem .4rem;
  border-radius: 2px; text-transform: uppercase; letter-spacing: .08em;
}
.sigil-tile-status[data-status="LIT"] { background: rgba(120, 200, 120, 0.18); color: #b9e6b9; }
.sigil-tile-status[data-status="DARK"] { background: rgba(120, 120, 120, 0.18); color: var(--bone-dim); }
.sigil-tile-desc { color: var(--bone-dim); font-size: .8rem; line-height: 1.4; }
.sigil-tile-detail { display: none; padding-top: .5rem; border-top: 1px solid var(--panel-edge); font-size: .78rem; color: var(--bone-dim); line-height: 1.4; }
.sigil-tile.expanded .sigil-tile-detail { display: flex; flex-direction: column; gap: .35rem; }
.sigil-tile-detail strong { color: var(--bone); }

/* ---------- Mode badge (Group F) ---------- */

.mode-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-left: .5rem; padding: .15rem .55rem;
  background: rgba(212, 169, 73, 0.12);
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); font-family: var(--font-mono);
  cursor: help;
}
.mode-badge[data-missing="true"]::after {
  content: "•"; color: #e6b9b9; margin-left: .25rem; font-size: 1rem; line-height: 0;
}

.env-user {
  display: flex; align-items: center; gap: .35rem;
  margin: 0 0 .35rem 0;
  font-size: .85rem; color: var(--bone);
}
.env-user:empty { display: none; }

/* ── Herald Verdict Cards ── */
.herald-verdict {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: .75rem 1rem;
  margin-bottom: .5rem;
}
.hv-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.hv-symbol {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: .04em;
}
.hv-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.verdict-buy  { background: rgba(76,179,122,.18); color: var(--emerald); border: 1px solid rgba(76,179,122,.4); }
.verdict-sell { background: rgba(224,82,82,.18);  color: var(--red, #e05252); border: 1px solid rgba(224,82,82,.4); }
.verdict-hold { background: rgba(212,169,73,.14); color: var(--gold); border: 1px solid rgba(212,169,73,.35); }
.hv-conf {
  font-size: .75rem;
  color: var(--bone-dim);
  font-family: var(--font-mono);
}
.hv-timeframe {
  font-size: .72rem;
  color: var(--bone-faint);
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  padding: .1rem .4rem;
}
.hv-risk {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-left: auto;
}
.risk-low  { color: var(--emerald); }
.risk-med  { color: var(--gold); }
.risk-high { color: var(--red, #e05252); }
.hv-thesis {
  font-size: .88rem;
  color: var(--bone);
  margin-bottom: .4rem;
  line-height: 1.35;
}
.hv-levels {
  display: flex;
  gap: 1.2rem;
  font-size: .78rem;
  color: var(--bone-dim);
  font-family: var(--font-mono);
  margin-bottom: .4rem;
}
.hv-levels b {
  color: var(--bone-faint);
  font-weight: 500;
  margin-right: .3rem;
  text-transform: uppercase;
  font-size: .68rem;
}
.hv-detail {
  margin-top: .3rem;
}
.hv-detail summary {
  font-size: .75rem;
  color: var(--gold-deep);
  cursor: pointer;
  letter-spacing: .05em;
  user-select: none;
}
.hv-detail summary:hover { color: var(--gold); }
.hv-detail[open] summary { margin-bottom: .4rem; }
.hv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  color: var(--bone-dim);
}
.hv-table td {
  padding: .25rem .4rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(212,169,73,.08);
}
.hv-lbl {
  font-weight: 600;
  color: var(--bone-faint);
  white-space: nowrap;
  width: 90px;
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .06em;
}
.hv-provider {
  font-size: .65rem;
  color: var(--bone-faint);
  text-align: right;
  margin-top: .25rem;
  font-family: var(--font-mono);
}

/* ── Summon On Forge button + hint ── */
#summon-forge-btn {
  transition: opacity .3s, filter .3s;
}
#summon-forge-btn:disabled {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}
#summon-forge-btn:not(:disabled) {
  border-color: var(--gold);
  animation: forge-glow .8s ease-in-out;
}
@keyframes forge-glow {
  0%   { box-shadow: 0 0 0 rgba(212,169,73,0); }
  50%  { box-shadow: 0 0 12px rgba(212,169,73,.45); }
  100% { box-shadow: none; }
}
.forge-hint {
  font-size: .7rem;
  color: var(--bone-faint);
  font-style: italic;
  margin-left: .25rem;
  transition: color .3s;
}

/* ── User Menu ── */
.user-menu-wrap { position: relative; }
.user-menu-toggle {
  display: flex; align-items: center; gap: .4rem;
  background: none; border: 1px solid transparent;
  color: var(--bone); font-family: var(--font-mono);
  font-size: .82rem; padding: .3rem .6rem;
  border-radius: 4px; cursor: pointer;
  transition: border-color .2s;
}
.user-menu-toggle:hover { border-color: var(--panel-edge); }
.user-avatar { font-size: 1rem; }
.user-caret { font-size: .65rem; color: var(--bone-faint); margin-left: .1rem; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--panel-strong); border: 1px solid var(--panel-edge);
  border-radius: 5px; min-width: 170px; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.user-dropdown-item {
  display: block; width: 100%; padding: .55rem .8rem;
  color: var(--bone); font-size: .8rem; text-align: left;
  background: none; border: none; cursor: pointer;
  text-decoration: none; font-family: var(--font-body, inherit);
}
.user-dropdown-item:hover { background: rgba(212,169,73,.1); color: var(--gold); }
.user-dropdown-logout { border-top: 1px solid var(--panel-edge); color: var(--bone-dim); }
.user-dropdown-logout:hover { color: var(--red, #e05252); }

/* ── Banner Status Row (left-aligned, below header) ── */
.banner-status-row {
  display: flex; align-items: center; gap: .75rem;
  max-width: 1440px; margin: .4rem auto 0;
  padding: 0 48px;
}
.banner-status-row .env-badge {
  font-size: .72rem; padding: 6px 14px;
}
/* ── Sword Button ── */
.arm-toggle.sword-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15, 12, 8, 0.7);
  border: 1px solid rgba(218, 185, 107, .15);
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer; transition: all .3s;
  min-width: 140px; height: 48px;
}
.arm-toggle.sword-btn:hover {
  border-color: var(--gold);
  background: rgba(25, 20, 12, 0.85);
  box-shadow: 0 0 12px rgba(218, 185, 107, .1);
}
.sword-scene { width: 140px; height: 40px; }
.sword-state { display: none; }
.sword-state.active { display: block; }

/* Clash spark pulse */
.clash-spark {
  animation: spark-pulse 1.5s ease-in-out infinite;
}
@keyframes spark-pulse {
  0%, 100% { opacity: 0.3; r: 2; }
  50% { opacity: 0.9; r: 4; }
}

/* Break spark flicker */
.break-spark {
  animation: break-flicker 1s ease-in-out infinite;
}
@keyframes break-flicker {
  0%, 100% { opacity: 0.3; }
  30% { opacity: 0.8; }
  60% { opacity: 0.2; }
}

/* ── Sword Animations ── */

/* Draw: scene shakes slightly then reveals */
.anim-draw {
  animation: sword-draw 0.4s ease-out;
}
@keyframes sword-draw {
  0% { transform: translateX(0); }
  15% { transform: translateX(-3px); }
  30% { transform: translateX(3px); }
  50% { transform: translateX(-2px); }
  70% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

/* Clash: quick shake + flash */
.anim-clash {
  animation: sword-clash 0.5s ease-out;
}
@keyframes sword-clash {
  0% { filter: brightness(1); transform: scale(1); }
  20% { filter: brightness(2); transform: scale(1.08); }
  40% { filter: brightness(1.3); transform: scale(0.97) rotate(-2deg); }
  60% { filter: brightness(1.1); transform: scale(1.02) rotate(1deg); }
  80% { filter: brightness(1); transform: scale(1); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Sheathe: smooth slide */
.anim-sheathe {
  animation: sword-sheathe 0.4s ease-in-out;
}
@keyframes sword-sheathe {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(3px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Break: violent shake + red flash */
.anim-break {
  animation: sword-break 0.5s ease-out;
}
@keyframes sword-break {
  0% { filter: brightness(1); transform: rotate(0); }
  15% { filter: brightness(1.5) hue-rotate(-20deg); transform: rotate(-4deg); }
  30% { filter: brightness(2) hue-rotate(-40deg); transform: rotate(3deg) scale(1.05); }
  50% { filter: brightness(1.2) hue-rotate(-10deg); transform: rotate(-1deg); }
  100% { filter: brightness(1); transform: rotate(0); }
}

/* Rally: glow-up rebuild */
.anim-rally {
  animation: sword-rally 0.4s ease-out;
}
@keyframes sword-rally {
  0% { filter: brightness(0.6); transform: scale(0.95); }
  50% { filter: brightness(1.4); transform: scale(1.05); }
  100% { filter: brightness(1); transform: scale(1); }
}

/* Hidden risk pill (data carrier only now) */
.risk-pill[hidden] { display: none; }
.risk-pill { display: none; }



/* ── Account Page ── */
.account-page {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.account-header {
  margin-bottom: 2rem;
}
.account-back {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: .82rem;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  transition: color .2s;
}
.account-back:hover { color: var(--gold); }
.account-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin: .5rem 0 0 0;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.account-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.account-panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.account-panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-bright);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
}
.account-avatar-section {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}
.account-avatar-preview {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-strong);
  border: 2px solid var(--panel-edge);
  border-radius: 50%;
  flex-shrink: 0;
}
.account-avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}
.avatar-pick {
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-pick:hover { border-color: var(--gold); transform: scale(1.1); }
.avatar-pick.active { border-color: var(--gold-bright); box-shadow: 0 0 8px rgba(212,169,73,.3); }
.account-label {
  font-size: .78rem;
  color: var(--bone-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  margin: 0 0 .2rem 0;
}
.account-hint {
  font-size: .78rem;
  color: var(--bone-faint);
  margin: 0 0 .5rem 0;
  line-height: 1.35;
}
.account-value {
  font-family: var(--font-mono);
  color: var(--bone);
  font-size: .9rem;
  margin: 0;
}
.account-field {
  margin-bottom: .8rem;
}
.account-tier-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.tier-option {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  transition: all .2s;
}
.tier-option:hover { border-color: var(--gold-deep); }
.tier-option.active {
  border-color: var(--gold);
  background: rgba(212,169,73,.08);
}
.tier-name {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--gold-bright);
  letter-spacing: .08em;
  text-transform: uppercase;
  min-width: 80px;
  flex-shrink: 0;
}
.tier-desc {
  font-size: .78rem;
  color: var(--bone-dim);
  line-height: 1.35;
}
.tier-option.active .tier-desc { color: var(--bone); }

/* ═══ DECREE V2 — structured cards ═══ */
.decree-v2 { padding: 0; background: transparent; border: none; }
.dk-header {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .6rem .8rem;
  background: rgba(30, 25, 15, .6);
  border: 1px solid rgba(218, 185, 107, .15);
  border-radius: 6px 6px 0 0;
}
.dk-regime-icon { font-size: 1.1rem; }
.dk-regime {
  font-weight: 700; font-size: .95rem; color: var(--gold);
  letter-spacing: .04em; text-transform: uppercase;
}
.dk-action {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 3px; text-transform: uppercase;
}
.decree-act-go   { background: rgba(80, 200, 120, .15); color: var(--emerald); border: 1px solid rgba(80, 200, 120, .3); }
.decree-act-wait { background: rgba(218, 185, 107, .12); color: var(--gold); border: 1px solid rgba(218, 185, 107, .25); }
.decree-act-stop { background: rgba(224, 82, 82, .12); color: var(--red, #e05252); border: 1px solid rgba(224, 82, 82, .25); }
.dk-conf {
  font-size: .75rem; color: var(--text-dim, #9a8c6e);
  margin-left: auto;
}
.dk-risk {
  font-size: .7rem; font-weight: 600; padding: 1px 6px;
  border-radius: 3px;
}
.dk-thesis {
  margin: 0; padding: .5rem .8rem;
  font-size: .85rem; font-style: italic; line-height: 1.4;
  color: var(--bone, #e8dcc8);
  background: rgba(30, 25, 15, .35);
  border-left: 1px solid rgba(218, 185, 107, .15);
  border-right: 1px solid rgba(218, 185, 107, .15);
}
.dk-levels {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding: .4rem .8rem;
  background: rgba(30, 25, 15, .25);
  border-left: 1px solid rgba(218, 185, 107, .15);
  border-right: 1px solid rgba(218, 185, 107, .15);
}
.dk-level {
  display: flex; gap: .4rem; align-items: center;
  font-size: .75rem; color: var(--text-dim, #9a8c6e);
  background: rgba(218, 185, 107, .06);
  padding: 2px 6px; border-radius: 3px;
}
.dk-sym { font-weight: 700; color: var(--gold); }
.dk-sup { color: var(--emerald); }
.dk-res { color: var(--red, #e05252); }
.dk-sectors {
  display: flex; gap: .3rem; flex-wrap: wrap;
  padding: .4rem .8rem;
  background: rgba(30, 25, 15, .25);
  border-left: 1px solid rgba(218, 185, 107, .15);
  border-right: 1px solid rgba(218, 185, 107, .15);
}
.dk-chip {
  font-size: .68rem; font-weight: 600; padding: 1px 7px;
  border-radius: 10px; text-transform: uppercase; letter-spacing: .04em;
}
.dk-hot   { background: rgba(80, 200, 120, .12); color: var(--emerald); border: 1px solid rgba(80, 200, 120, .2); }
.dk-avoid { background: rgba(224, 82, 82, .1); color: var(--red, #e05252); border: 1px solid rgba(224, 82, 82, .2); }
.dk-plays-wrap {
  border-left: 1px solid rgba(218, 185, 107, .15);
  border-right: 1px solid rgba(218, 185, 107, .15);
  border-bottom: 1px solid rgba(218, 185, 107, .15);
  border-radius: 0 0 6px 6px;
  background: rgba(30, 25, 15, .2);
}
.dk-plays-toggle {
  cursor: pointer; list-style: none;
  padding: .4rem .8rem; font-size: .78rem; font-weight: 600;
  color: var(--gold); letter-spacing: .04em;
}
.dk-plays-toggle::-webkit-details-marker { display: none; }
.dk-plays-toggle::before { content: "\25B6 "; font-size: .6rem; margin-right: .3rem; }
details[open] > .dk-plays-toggle::before { content: "\25BC "; }
.dk-plays { padding: .2rem .8rem .5rem; }
.dk-play {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(218, 185, 107, .07);
}
.dk-play:last-child { border-bottom: none; }
.dk-play-sym { font-weight: 700; font-size: .82rem; color: var(--bone); }
.dk-play-tgt { font-size: .72rem; color: var(--text-dim, #9a8c6e); }
.dk-play-why {
  width: 100%; font-size: .72rem; color: var(--text-muted, #7a6e52);
  line-height: 1.35; padding-left: .2rem;
}

/* ═══ AUTOPILOT SKY-FALL CANVAS ═══ */
.matrix-rain {
  width: 100%; height: 420px;
  border-radius: 8px;
  margin-bottom: .6rem;
  background: #050402;
  border: 1px solid rgba(218, 185, 107, .12);
  box-shadow: 0 0 30px rgba(218, 185, 107, .04), inset 0 0 60px rgba(5, 4, 2, 1);
}

/* decree fade transition */
#decree-result {
  transition: opacity 0.6s ease;
}

/* ═══ WATCHLIST MANAGER ═══ */
.watchlist-mgr {
  margin-bottom: .8rem;
  padding: .6rem .8rem;
  background: rgba(30, 25, 15, .3);
  border: 1px solid rgba(218, 185, 107, .1);
  border-radius: 6px;
}
.watchlist-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .4rem;
}
.watchlist-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gold);
}
.watchlist-add {
  display: flex; gap: .3rem; align-items: center;
}
.watchlist-input {
  width: 80px; padding: 3px 8px;
  background: rgba(10, 8, 4, .5);
  border: 1px solid rgba(218, 185, 107, .2);
  border-radius: 4px; color: var(--bone);
  font-family: var(--font-mono); font-size: .75rem;
  text-transform: uppercase;
}
.watchlist-input::placeholder { color: var(--text-muted, #7a6e52); text-transform: none; }
.watchlist-input:focus { outline: none; border-color: var(--gold); }
.watchlist-chips {
  display: flex; flex-wrap: wrap; gap: .3rem;
}
.wl-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: 2px 8px; border-radius: 10px;
  font-size: .72rem; font-weight: 600; font-family: var(--font-mono);
  background: rgba(218, 185, 107, .08);
  border: 1px solid rgba(218, 185, 107, .15);
  color: var(--bone);
}
.wl-chip-x {
  background: none; border: none; color: var(--text-muted, #7a6e52);
  font-size: .85rem; cursor: pointer; padding: 0; line-height: 1;
  transition: color .2s;
}
.wl-chip-x:hover { color: var(--red, #e05252); }

/* ═══ LOCAL-ONLY BADGE ═══ */
.local-only-badge {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .5rem .7rem; margin: .5rem 0;
  background: rgba(224, 160, 52, .08);
  border: 1px solid rgba(224, 160, 52, .2);
  border-radius: 6px;
  font-size: .72rem; line-height: 1.4;
  color: var(--text-dim, #9a8c6e);
}
.local-only-badge code {
  background: rgba(218, 185, 107, .1);
  padding: 0 4px; border-radius: 3px;
  font-size: .68rem; color: var(--gold);
}
.local-icon { font-size: .9rem; flex-shrink: 0; }

/* ═══ TRANSCRIPT BUTTONS ROW ═══ */
.transcript-btns { display: flex; gap: .4rem; }

/* ═══ WATERS GRID 2-COL ═══ */
.waters-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

/* ═══ ADVISOR BREAKDOWN ═══ */
.advisor-output { margin-top: .5rem; }
.advisor-synth {
  padding: .6rem .8rem; margin-bottom: .6rem;
  background: rgba(30, 25, 15, .4);
  border: 1px solid rgba(218, 185, 107, .12);
  border-radius: 6px;
}
.advisor-synth-warn {
  border-color: rgba(224, 160, 52, .25);
  background: rgba(224, 160, 52, .06);
}
.advisor-synth-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gold); margin-bottom: .3rem;
}
.advisor-thesis {
  font-size: .82rem; line-height: 1.45;
  color: var(--bone, #e8dcc8); margin: 0 0 .3rem;
}
.advisor-risk-notes {
  font-size: .75rem; color: var(--text-dim, #9a8c6e);
  margin: 0 0 .2rem;
}
.advisor-provider {
  font-size: .65rem; color: var(--text-muted, #7a6e52);
  margin: 0; text-align: right;
}
.advisor-recs {
  display: flex; flex-direction: column; gap: .4rem;
}
.advisor-rec {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .5rem .7rem;
  background: rgba(30, 25, 15, .25);
  border: 1px solid rgba(218, 185, 107, .08);
  border-radius: 6px;
}
.advisor-rec-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.advisor-rec-label {
  font-size: .78rem; font-weight: 700; color: var(--bone);
  margin-bottom: .15rem;
}
.advisor-rec-desc {
  font-size: .72rem; color: var(--text-dim, #9a8c6e);
  line-height: 1.35; margin: 0 0 .15rem;
}
.advisor-rec-action {
  font-size: .68rem; color: var(--gold); margin: 0;
  font-style: italic;
}

/* ═══ OPTIONS TIER SELECTOR ═══ */
.options-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
}
.options-tier {
  background: rgba(20, 16, 23, 0.7);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: .8rem;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.options-tier:hover {
  border-color: var(--gold);
}
.options-tier.active {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold-bright), inset 0 0 20px rgba(212, 169, 73, 0.06);
}
.opt-tier-head {
  font-size: .95rem;
  margin-bottom: .5rem;
  color: var(--bone);
}
.opt-tier-head strong { color: var(--bone); }
.options-tier.active .opt-tier-head strong { color: var(--gold-bright); }
.opt-tier-body { font-size: .82rem; color: var(--bone-dim); }
.opt-tier-label { margin: 0 0 .3rem 0; font-size: .78rem; color: var(--bone-dim); }
.opt-tier-list { display: flex; flex-direction: column; gap: .15rem; }
.opt-check {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem; color: var(--bone);
}
.options-tier:not(.active) .opt-check { color: var(--bone-dim); }

/* ═══ SPOILER / RISKS TOGGLE ═══ */
.spoiler-toggle {
  background: none; border: none; color: var(--gold);
  cursor: pointer; font-family: inherit; font-size: .9rem;
  padding: 0; display: flex; align-items: center; gap: .4rem;
  transition: color .2s;
}
.spoiler-toggle:hover { color: var(--gold-bright); }
.spoiler-toggle u { text-decoration-color: var(--gold); }
.spoiler-toggle.open { color: var(--gold-bright); }
.spoiler-toggle.open::first-letter { display: inline-block; }
.spoiler-content {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0;
}
.spoiler-content.open {
  max-height: 600px;
  padding: .8rem 0;
}
.risk-disclosure {
  background: rgba(176, 72, 72, 0.06);
  border-left: 3px solid var(--crimson);
  border-radius: 4px;
  padding: .8rem 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.risk-disclosure p { font-size: .85rem; margin: 0; line-height: 1.5; color: var(--bone-dim); }
.risk-disclosure p strong { color: var(--bone); font-weight: 600; }

/* ═══ REGISTER BUTTON ═══ */
.opt-register-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .55rem 1.2rem;
  background: linear-gradient(135deg, rgba(212, 169, 73, 0.15), rgba(212, 169, 73, 0.05));
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.opt-register-btn:hover {
  background: linear-gradient(135deg, rgba(212, 169, 73, 0.25), rgba(212, 169, 73, 0.1));
  border-color: var(--gold-bright);
}

/* ═══ CRYPTO FEE TABLE ═══ */
.crypto-fee-table { font-size: .8rem; }
.crypto-fee-table thead th {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--panel-edge);
}
.crypto-fee-table tbody td {
  padding: .35rem .5rem;
  color: var(--bone-dim);
  border-bottom: 1px solid rgba(212, 169, 73, 0.08);
}
.crypto-fee-table .active-tier td {
  color: var(--gold-bright);
  background: rgba(212, 169, 73, 0.06);
  font-weight: 600;
}
