/* quorum shared design system, matches the institutional redesign 1:1 */
:root {
  /* void + surfaces */
  --bg-0: #050608;
  --bg-1: #0B0D12;
  --bg-2: #12151C;
  --line: #1E222D;
  --line-strong: #2D3241;

  /* text */
  --text: #F5F4F1;
  --text-2: #A0A4B1;
  --text-3: #5E6274;

  /* accents (rare use) */
  --electric: #6C7BFF;
  --violet: #B39BFF;
  --mint: #7FFFD4;
  --amber: #F2C94C;
  --vermillion: #FF6B57;

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--electric); color: var(--bg-0); }
a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--electric); }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input {
  outline: none;
  font-family: inherit;
  color: var(--text);
}
input::placeholder { color: var(--text-3); }

/* Cosmos background (animated orbits + starfield) */
@keyframes qOrbA {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(160px, 90px, 0); }
  100% { transform: translate3d(-60px, 170px, 0); }
}
@keyframes qOrbB {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-140px, 120px, 0); }
  100% { transform: translate3d(70px, -50px, 0); }
}
@keyframes qOrbC {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(100px, -110px, 0); }
  100% { transform: translate3d(-150px, 40px, 0); }
}
.cosmos {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: var(--bg-0);
}
.cosmos .orb {
  position: absolute;
  border-radius: 50%;
}
.cosmos .orb-a {
  left: -14%; top: -460px;
  width: 1180px; height: 1180px;
  background: radial-gradient(closest-side, rgba(108,123,255,.15), rgba(108,123,255,.045) 55%, rgba(108,123,255,0));
  animation: qOrbA 46s ease-in-out infinite alternate;
}
.cosmos .orb-b {
  right: -18%; top: 80px;
  width: 1000px; height: 1000px;
  background: radial-gradient(closest-side, rgba(179,155,255,.09), rgba(179,155,255,.03) 55%, rgba(179,155,255,0));
  animation: qOrbB 58s ease-in-out infinite alternate;
}
.cosmos .orb-c {
  left: 30%; top: 520px;
  width: 820px; height: 820px;
  background: radial-gradient(closest-side, rgba(127,255,212,.045), rgba(127,255,212,0));
  animation: qOrbC 67s ease-in-out infinite alternate;
}
.cosmos .stars {
  position: absolute; inset: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(245,244,241,.55) 0.6px, transparent 1px),
    radial-gradient(rgba(245,244,241,.35) 0.5px, transparent 1px);
  background-size: 173px 173px, 251px 251px;
  background-position: 13px 41px, 97px 7px;
}
.cosmos .fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,6,8,0) 55%, var(--bg-0) 100%);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 20px 40px;
  background: rgba(5,6,8,.6);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--text);
}
.nav-brand:hover { color: var(--text); }
.nav-brand-mark { width: 26px; height: 26px; }
.nav-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-left: 16px;
  border-left: 1px solid var(--line);
  line-height: 1.4;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 13.5px;
  color: var(--text-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.on {
  color: var(--text);
  border-bottom-color: var(--text);
}
.nav-status {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.nav-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text); }
.nav-connect {
  display: flex; align-items: center;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .2s;
}
.nav-connect:hover { border-color: var(--electric); }
.nav-connect.off {
  color: var(--text-2);
  border-color: var(--line);
}

/* Wordmark v2 — EB Garamond italic, wide tracking. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1em;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.16em;
}
.wordmark .dot {
  letter-spacing: 0;
  margin-left: 0.02em;
}

/* App shell */
#app { position: relative; z-index: 1; min-height: 100vh; }
main { position: relative; z-index: 1; }

/* Utilities */
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.dim { color: var(--text-2); }
.faint { color: var(--text-3); }
.electric { color: var(--electric); }
.violet { color: var(--violet); }
.mint { color: var(--mint); }
.vermillion { color: var(--vermillion); }
.tabular { font-variant-numeric: tabular-nums; }
.upper { text-transform: uppercase; letter-spacing: .1em; }

/* Toast */
#toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 14px 22px;
  border-radius: 10px;
  background: rgba(11,13,18,.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  max-width: 90vw;
  line-height: 1.5;
}
#toast.on { opacity: 1; }
#toast.ok { border-color: var(--mint); color: var(--mint); }
#toast.err { border-color: var(--vermillion); color: var(--vermillion); }
#toast.pending { border-color: var(--electric); color: var(--electric); }
#toast a { color: inherit; text-decoration: underline; }

/* Panels + form primitives (reused across pages) */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11,13,18,.7);
  padding: 28px;
}
.panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-h .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.btn-primary {
  height: 60px;
  padding: 0 36px;
  border-radius: 8px;
  border: 0;
  background: var(--electric);
  color: var(--bg-0);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(108,123,255,.4), 0 14px 40px -14px rgba(108,123,255,.7);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(108,123,255,.7), 0 18px 50px -12px rgba(108,123,255,.8);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  background: var(--line-strong);
  color: var(--text-3);
  cursor: not-allowed;
  box-shadow: none;
}
.btn-outline {
  height: 46px;
  padding: 0 24px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--electric); color: var(--electric); }
.btn-ghost {
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }

/* Status chips */
.chip-status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: .1em;
}
.chip-status.committed { border: 1px solid var(--line-strong); color: var(--text-2); }
.chip-status.committed::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--text-2); }
.chip-status.revealed { border: 1px solid rgba(108,123,255,.5); color: var(--electric); }
.chip-status.cleared { background: var(--text); color: var(--bg-0); }
.chip-status.forfeited { border: 1px dashed var(--line-strong); color: var(--text-3); text-decoration: line-through; }

/* Marquee */
@keyframes qMarq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  height: 32px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: qMarq 70s linear infinite;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--text-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.marquee-track > span { padding-right: 48px; }
.marquee-sep { color: var(--text-3); }

/* Spin animation for vault rings */
@keyframes qSpin { to { transform: rotate(360deg); } }
@keyframes qPulse {
  0% { box-shadow: 0 0 0 0 rgba(108,123,255,.55); }
  100% { box-shadow: 0 0 0 12px rgba(108,123,255,0); }
}
@keyframes qRowIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; gap: 16px; }
  .nav-tag { display: none; }
  .nav-links { gap: 16px; }
}
