@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #16232E;
  --surface: #1E2E3B;
  --surface-2: #24384A;
  --border: #2E4356;
  --text: #F1EDE4;
  --text-muted: #9FADB8;
  --text-dim: #6E7B87;
  --gold: #C9A45C;
  --teal: #7FB6A3;
  --brick: #C1584A;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; }

p, span, div, td, th { overflow-wrap: break-word; word-break: break-word; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.wordmark {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.wordmark .dot { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  row-gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) {
  .nav-links { gap: 12px 16px; font-size: 0.82rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform .15s ease;
}
.btn:hover { transform: scale(1.03); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 96px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 24px;
}
.hero h1 { font-size: 3rem; margin-bottom: 24px; }
@media (max-width: 640px) { .hero h1 { font-size: 2.2rem; } }
.hero p.sub { color: var(--text-muted); font-size: 1.1rem; max-width: 440px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.ledger-preview .eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); margin-bottom: 16px;
}
.ledger-preview .row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 8px 0; }
.ledger-preview .row span:first-child { color: var(--text-muted); }
.ledger-preview .foot { font-size: 0.75rem; color: var(--text-dim); margin-top: 12px; }

/* Section generic */
section { padding: 64px 0; }
.section-title { font-size: 2rem; margin-bottom: 8px; }
.section-sub { color: var(--text-muted); margin-bottom: 32px; }

/* Ledger table */
.ledger-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .ledger-row { grid-template-columns: 1fr; gap: 8px; }
}
.ledger-row .claim { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--brick); text-decoration-thickness: 2px; }
.ledger-row .real { display: flex; gap: 10px; align-items: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 0.92rem; }
.dot-flag { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.dot-ok { background: var(--teal); }
.dot-warn { background: var(--brick); }

/* Tracks grid */
.tracks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) { .tracks-grid { grid-template-columns: 1fr; } }
.track-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.track-card .tagline { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.track-card .weeks { color: var(--teal); font-size: 0.78rem; }
.track-card .rate { color: var(--text-dim); font-size: 0.75rem; margin-top: 8px; }

/* CTA */
.cta { text-align: center; padding: 96px 0; }
.cta p { color: var(--text-muted); max-width: 440px; margin: 16px auto 32px; }

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* Dashboard */
.dash-main { display: grid; grid-template-columns: 2fr 3fr; gap: 32px; padding: 32px 0 96px; align-items: flex-start; }
@media (max-width: 860px) { .dash-main { grid-template-columns: 1fr; } }
.field-label { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; }
.field-input, .field-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.field-input:focus, .field-select:focus, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.disclaimer { display: flex; gap: 8px; font-size: 0.75rem; color: var(--text-dim); margin-top: 16px; }

.result-placeholder {
  min-height: 280px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 32px; color: var(--text-dim);
}
.week-card { margin-bottom: 16px; }
.week-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  background: var(--bg);
  color: var(--teal);
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 12px;
}
.week-card h3 { display: inline; font-size: 1.05rem; }
.week-modules { list-style: none; padding: 0; margin: 14px 0; }
.week-modules li { display: flex; gap: 10px; font-size: 0.9rem; color: #D6DEE4; margin-bottom: 6px; }
.week-modules li::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); margin-top: 8px; flex-shrink: 0;
}
.week-note {
  display: flex; gap: 8px; font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 4px;
}
.error-box { background: #241A19; border: 1px solid var(--brick); border-radius: var(--radius); padding: 20px; color: #E39C93; }

.spin { animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
