/* ─────────────────────────────────────────────────────────────
   Monolith Quant : shared site styles
   Loaded on every page AFTER the page's own <style>, so anything
   here overrides page-level defaults. Change the accent once here.
   ───────────────────────────────────────────────────────────── */

:root {
  --accent: #4f7cff;
  --accent-hover: #7a9cff;
  --accent-dim: rgba(79,124,255,0.14);
  --accent-border: rgba(79,124,255,0.45);
  --bg: #0b0b0c;
  --panel: #111113;
  --panel-2: #16161a;
  --text: #f2f2f3;
  --text-2: rgba(255,255,255,0.62);
  --text-3: rgba(255,255,255,0.45);
  --line: rgba(255,255,255,0.09);
  --border: 0.5px solid var(--line);
}

body { background: var(--bg); }

/* ── READABILITY: lift every secondary text tone site-wide ── */
:root {
  --w50: rgba(255,255,255,0.78);
  --w40: rgba(255,255,255,0.68);
  --w35: rgba(255,255,255,0.60);
  --w20: rgba(255,255,255,0.50);
}
.hero-sub, .page-sub, .section-body, .body-text, .footer-cta p { color: rgba(255,255,255,0.82) !important; }
.hero-label, .section-label, .sub-label, .page-label { color: rgba(255,255,255,0.7) !important; }
.box-body, .step-body, .delivery-body, .freq-body, .wf-body, .audit-body, .included-body, .pillar-desc,
.principle-desc, .reason-body, .market-name, .platform .desc, .cred-lbl, .perf-lbl, .stat-lbl, .stat-sub,
.live-placeholder-sub, .doc-section p, td { color: rgba(255,255,255,0.72) !important; }
.tag, .box-num, .step-num, .wf-num, .market-exchange, .signal-entry, .signal-conf, .signal-date, .sample-sub, .sample-note,
.field-label, .perf-disclaimer, .form-note, .note, .access-hint, .stack-role, .disclaimer p, .live-start-note { color: rgba(255,255,255,0.58) !important; }
.hero-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.88) 100%) !important; }


/* Links & buttons pick up the accent on hover */
a { transition: color 0.15s, border-color 0.15s, background 0.15s; }
.perf-link:hover, .perf-audit-link:hover,
.body-text a:hover, .footer-links a:hover, .footer-disclaimer a:hover,
.contact-email:hover { color: var(--accent-hover) !important; border-color: var(--accent-border) !important; }

.btn-primary, .nav-cta, .form-submit {
  background: var(--accent) !important;
  color: #fff !important;
  border: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover, .nav-cta:hover, .form-submit:hover {
  background: var(--accent-hover) !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.btn-ghost { border: 1px solid rgba(255,255,255,0.2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--accent) !important; color: var(--accent-hover) !important; }

/* Cards / tiles get an accent edge on hover */
.box-item:hover, .stack-item:hover, .signal-card:not(.blurred):hover,
.market-item:hover, .delivery-item:hover, .freq-item:hover, .step-item:hover,
.wf-item:hover, .audit-item:hover, .included-item:hover, .pillar:hover,
.principle:hover, .contact-reason:hover, .metric-item:hover, .cred-item:hover {
  background: var(--panel-2) !important;
  border-color: var(--accent-border) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
.plan:hover { border-color: var(--accent-border); }
.tag:hover { border-color: var(--accent-border); color: var(--accent-hover); }
.form-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-dim); outline: none; }
.dir.long, .dir-badge.long { color: #34d399; background: rgba(52,211,153,0.12); }
.dir.short, .dir-badge.short { color: #fb7185; background: rgba(251,113,133,0.12); }
.status-badge.live .status-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.legend-dot[style*="#fff"] { background: var(--accent) !important; }

/* ── NAV ─────────────────────────────────────────────────── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 2.5rem;
  border-bottom: var(--border);
  background: rgba(11,11,12,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.site-nav .nav-left { display: flex; align-items: center; gap: 2.25rem; }
.site-nav .nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}
.site-nav .nav-logo .mark {
  width: 9px; height: 24px; display: block; fill: var(--text); transition: fill 0.15s;
}
.site-nav .nav-logo:hover .mark { fill: var(--accent); }
.site-nav .nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.site-nav .nav-links a {
  font-size: 14px; color: var(--text-2); letter-spacing: 0.01em;
  position: relative; padding: 4px 0;
}
.site-nav .nav-links a:hover { color: var(--accent-hover); }
.site-nav .nav-links a.active { color: var(--text); }
.site-nav .nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--accent); border-radius: 1px;
}
.site-nav .nav-right { display: flex; align-items: center; gap: 1.5rem; }
.site-nav .nav-signup {
  font-size: 14px; font-weight: 500; color: var(--text);
}
.site-nav .nav-signup:hover { color: var(--accent-hover); }
.site-nav .nav-login {
  font-size: 13px; color: var(--text);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 100px; padding: 0.45rem 1.1rem;
}
.site-nav .nav-login:hover { border-color: var(--accent); color: var(--accent-hover); }
.site-nav .nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 6px;
}
.site-nav .nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 1px; }

.nav-mobile {
  display: none; flex-direction: column;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: rgba(11,11,12,0.98); border-bottom: var(--border);
  padding: 1.25rem 2.5rem 1.75rem; gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 16px; color: var(--text-2); padding: 0.8rem 0; border-bottom: var(--border); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--accent-hover); }
.nav-mobile a.strong { color: var(--text); font-weight: 500; }

/* Dropdown (Resources) */
.site-nav .has-menu { position: relative; }
/* invisible bridge between the link and the menu; only exists while the menu is open */
.site-nav .has-menu::before { content: ""; position: absolute; left: -24px; right: -24px; top: 100%; height: 20px; display: none; }
.site-nav .has-menu:hover::before, .site-nav .has-menu.open::before, .site-nav .has-menu:focus-within::before { display: block; }
.site-nav .has-menu > a::after { content: " ▾"; font-size: 10px; opacity: 0.6; }
.site-nav .menu {
  position: absolute; top: 100%; left: -12px; margin-top: 6px;
  min-width: 240px; padding: 8px;
  background: var(--panel); border: var(--border); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  display: none; flex-direction: column;
}
.site-nav .has-menu:hover .menu, .site-nav .has-menu.open .menu, .site-nav .has-menu:focus-within .menu { display: flex; }
.site-nav .menu a {
  display: block; padding: 10px 12px; border-radius: 6px; font-size: 13.5px; color: var(--text-2);
}
.site-nav .menu a:hover { background: var(--accent-dim); color: var(--accent-hover); }
.site-nav .menu a small { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.site-nav .menu a.active::after { display: none; }

/* ── MODALS (Sign up / Log in) ─────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 440px;
  background: var(--panel); border: var(--border); border-radius: 14px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.modal-close {
  background: none; border: none; color: var(--text-3); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal .m-input {
  width: 100%; background: var(--panel-2); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 14px; padding: 0.85rem 1rem; margin-bottom: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal .m-input::placeholder { color: var(--text-3); }
.modal .m-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.modal .m-check { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin: 0.4rem 0 0.85rem; cursor: pointer; }
.modal .m-check input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.modal .m-check a { color: var(--text); border-bottom: 0.5px solid rgba(255,255,255,0.35); }
.modal .m-check a:hover { color: var(--accent-hover); border-color: var(--accent-border); }
.modal .m-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; gap: 1rem; flex-wrap: wrap; }
.modal .m-submit {
  background: var(--accent); color: #fff; border: none; border-radius: 100px;
  font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  padding: 0.75rem 1.6rem; cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.modal .m-submit:hover { background: var(--accent-hover); box-shadow: 0 0 0 4px var(--accent-dim); }
.modal .m-submit:disabled { background: rgba(255,255,255,0.12); color: var(--text-3); cursor: not-allowed; box-shadow: none; }
.modal .m-alt { font-size: 13px; color: var(--text-3); }
.modal .m-alt a { color: var(--accent-hover); }
.modal .m-alt a:hover { color: var(--text); }
.modal .m-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 8px;
  padding: 0.75rem 0.9rem; margin-bottom: 1.25rem;
  font-size: 12.5px; color: var(--text); line-height: 1.55;
}
.modal .m-notice .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.modal .m-notice a { color: var(--accent-hover); }

/* ── FOOTER ──────────────────────────────────────────────── */
footer.site-footer {
  border-top: var(--border);
  padding: 3rem 2.5rem 2rem;
  background: #080809;
}
.site-footer .footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
}
.site-footer .footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
  margin-bottom: 0.75rem;
}
.site-footer .footer-brand .footer-logo .mark { width: 8px; height: 21px; display: block; fill: var(--text); }
.site-footer .footer-brand p { font-size: 13px; color: var(--text-3); line-height: 1.65; max-width: 300px; }
.site-footer .footer-col h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 0.9rem; font-weight: 500;
}
.site-footer .footer-col a { display: block; font-size: 13.5px; color: var(--text-2); padding: 0.28rem 0; }
.site-footer .footer-col a:hover { color: var(--accent-hover); }
.site-footer .footer-col a .soon {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); border: var(--border); border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle;
}
.site-footer .footer-bottom {
  max-width: 1100px; margin: 2.25rem auto 0; padding-top: 1.5rem; border-top: var(--border);
}
.site-footer .footer-disclaimer {
  font-size: 12.5px; line-height: 1.7; color: var(--text-2); margin-bottom: 1.25rem;
}
.site-footer .footer-disclaimer a { color: var(--text); border-bottom: 0.5px solid rgba(255,255,255,0.35); }
.site-footer .footer-meta {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
}
.site-footer .footer-copy { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; }
.site-footer .footer-legal { display: flex; gap: 1.25rem; list-style: none; }
.site-footer .footer-legal a { font-size: 12px; color: var(--text-3); }
.site-footer .footer-legal a:hover { color: var(--accent-hover); }

/* Hide any legacy nav/footer markup left in a page */
body > nav:not(.site-nav), body > footer:not(.site-footer), body > .nav-mobile:not(#site-nav-mobile) { display: none !important; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav .nav-links, .site-nav .nav-right .nav-signup { display: none; }
  .site-nav .nav-hamburger { display: flex; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  nav.site-nav { padding: 0 1.25rem; }
  .nav-mobile { padding: 1rem 1.25rem 1.5rem; }
  footer.site-footer { padding: 2.25rem 1.25rem 1.5rem; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-nav .nav-right .nav-login { display: none; }
}

.modal .m-error { font-family: var(--mono); font-size: 12px; color: #e06c6c; min-height: 1em; margin-top: 0.25rem; }
.modal .m-error:empty { display: none; }

/* Log out (signed-in only) — faint red text left of Account, full red on hover */
.site-nav .nav-logout { font-size: 13.5px; color: rgba(251,113,133,0.55); transition: color .15s; }
.site-nav .nav-logout:hover { color: #fb7185; }
/* Account inherits the Sign up style (white, accent on hover) — no override */
.nav-mobile a.nav-logout { color: #fb7185; }
@media (max-width: 600px) { .site-nav .nav-right .nav-logout { display: none; } }
