/* -------------------------------------------------------------
   TideLedger — Navy Atlas Cartography Aesthetic
   Colors: Navy (#0a101d, #111a2e), Cyan (#26d0ce), Rust (#e25b45), Coral (#ff7b6b), Lime (#ccff00)
------------------------------------------------------------- */
@font-face {
  font-family: 'Geist';
  src: url('https://musechain.io/fonts/geist/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #080c14;
  --bg-panel: #0d1524;
  --bg-card: #131e33;
  --bg-card-hover: #192742;
  --border-subtle: #1f304f;
  --border-bright: #314b7a;
  
  --text-main: #e8ecf4;
  --text-muted: #8fa0be;
  --text-dim: #5c6c87;

  --rust: #e25b45;
  --rust-glow: rgba(226, 91, 69, 0.25);
  --cyan: #26d0ce;
  --cyan-glow: rgba(38, 208, 206, 0.25);
  --lime: #ccff00;
  --gold: #f4b251;
  --coral: #ff7b6b;

  --font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--lime);
  text-decoration: underline;
}

/* NAVIGATION */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compass-glyph {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  text-decoration: none;
}

.author-tag {
  background: rgba(204, 255, 0, 0.12);
  color: var(--lime) !important;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(204, 255, 0, 0.3);
}

/* HERO SECTION */
.hero-split {
  padding: 1.5rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-art-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 20, 0.95) 15%, rgba(8, 12, 20, 0.55) 60%, rgba(8, 12, 20, 0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
}

.badge-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.badge-rust { background: rgba(226, 91, 69, 0.25); color: #ff8e7d; border: 1px solid rgba(226, 91, 69, 0.5); }
.badge-cyan { background: rgba(38, 208, 206, 0.2); color: #78f3f1; border: 1px solid rgba(38, 208, 206, 0.4); }
.badge-neutral { background: rgba(255,255,255,0.1); color: #ddd; border: 1px solid rgba(255,255,255,0.2); }

.hero-overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 0.75rem;
  max-width: 900px;
}

.hero-overlay .lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 820px;
  margin-bottom: 1.4rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--lime);
  color: #080c14;
}
.btn-primary:hover {
  background: #dcff33;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(204, 255, 0, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

/* PANELS & LAYOUT */
.panel {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 2.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.section-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

h2 {
  font-size: 1.7rem;
  font-weight: 850;
  margin-bottom: 0.6rem;
  color: #fff;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 800px;
  margin-bottom: 1.8rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.rust-border { border-top: 3px solid var(--rust); }
.cyan-border { border-top: 3px solid var(--cyan); }

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}
.tag-rust { background: var(--rust-glow); color: #ff9180; }
.tag-cyan { background: var(--cyan-glow); color: #7cf6f4; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
  color: #fff;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.ledger-bullets {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ledger-bullets strong {
  color: #fff;
}

/* EVIDENCE CARDS SECTION (DRAG & DROP) */
.dockets-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}

.docket-dropzone {
  background: rgba(13, 21, 36, 0.7);
  border: 1px dashed var(--border-bright);
  border-radius: 8px;
  padding: 1rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.docket-dropzone.dragover {
  background: rgba(38, 208, 206, 0.08);
  border-color: var(--cyan);
}
#marsDocket.dragover {
  background: rgba(226, 91, 69, 0.08);
  border-color: var(--rust);
}

.docket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
}

.cyan-text { color: var(--cyan); }
.rust-text { color: var(--rust); }
.lime-text { color: var(--lime); }
.gold-text { color: var(--gold); }

.count-pill {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  color: var(--text-muted);
}

.drop-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drop-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin: auto 0;
  font-style: italic;
}

.cards-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.evidence-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.85rem;
  cursor: grab;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.evidence-card:active {
  cursor: grabbing;
}
.evidence-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.card-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  margin-bottom: 0.4rem;
}

.card-bias {
  font-weight: 700;
  text-transform: uppercase;
}
.bias-ocean { color: var(--cyan); }
.bias-mars { color: var(--rust); }

.card-cite {
  color: var(--text-dim);
}

.evidence-card h4 {
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.evidence-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* BUILD-A-BUDGET SIMULATOR */
.simulator-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
}

.allocation-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: block;
}

.metric-val {
  font-size: 1.7rem;
  font-weight: 850;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.split-bar-wrap {
  width: 100%;
  height: 28px;
  background: #080c14;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-bright);
  margin-bottom: 1.5rem;
}

.split-bar-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.15s ease-out;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.ocean-fill { background: linear-gradient(90deg, #134e5e, var(--cyan)); }
.mars-fill { background: linear-gradient(90deg, var(--rust), #9e2a1b); }

.slider-master {
  margin-bottom: 2rem;
}

.slider-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  background: #0b1220;
  border-radius: 4px;
  outline: none;
  border: 1px solid var(--border-bright);
  -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: pointer;
  border: 2px solid #080c14;
  box-shadow: 0 0 8px rgba(204, 255, 0, 0.4);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.sub-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.assumptions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.assumption-box {
  background: rgba(8, 12, 20, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem;
}

.assumption-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.val-pill {
  font-size: 0.7rem;
  color: var(--lime);
  background: rgba(204, 255, 0, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.param-caption {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.45rem;
}

.presets-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.presets-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--cyan);
}

/* RESULTS GRID */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.result-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.highlight-tile {
  border-color: var(--lime);
  background: linear-gradient(180deg, rgba(204, 255, 0, 0.04) 0%, var(--bg-card) 100%);
}

.tile-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.tile-score {
  font-size: 2.1rem;
  font-weight: 850;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #080c14;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  border: 1px solid var(--border-subtle);
}

.progress-bar {
  height: 100%;
  transition: width 0.25s ease-out;
}
.ocean-bg { background: var(--cyan); }
.mars-bg { background: var(--rust); }
.gold-bg { background: var(--gold); }
.lime-bg { background: var(--lime); }

.tile-uncertainty {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: monospace;
  margin-bottom: 0.5rem;
}

.tile-status {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lime);
  margin-bottom: 0.4rem;
}

.tile-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
}

.synthesis-box {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 1.75rem;
}

.synthesis-box h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.synthesis-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.argument-export {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.copy-alert {
  font-size: 0.8rem;
  color: var(--lime);
  font-weight: 600;
}

/* SOURCES */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.source-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  background: var(--bg-card);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-num {
  font-family: monospace;
  font-weight: 700;
  color: var(--cyan);
  font-size: 0.95rem;
}

/* FOOTER */
.footer {
  background: #05080e;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .top-nav {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .hero-overlay {
    padding: 1.25rem;
  }
  .hero-overlay h1 {
    font-size: 1.6rem;
  }
  .grid-2col, .dockets-layout, .assumptions-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 1.25rem;
  }
}