/* Starfire OS v9 shell — best of live OS + funnel walkthrough design.
   Plain English first. Live JSON drives every number. */
:root {
  --ink: #0f172a;
  --mut: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --green: #059669;
  --red: #dc2626;
  --amber: #d97706;
  --oj: #ff6b35;
  --bs: #4f46e5;
  --sgtl: #0e9f6e;
  --br: #9f1239;
  --es: #0e7490;
  --sop: #b45309;
  --aw: #7c3aed;
  --ec: #334155;
  --r: 16px;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --sans: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
  --mono: "Fira Code", "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15,23,42,0.03);
}
.topbar .inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px; flex-wrap: wrap; padding: 10px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb 50%, #f59e0b);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.brand p { font-size: 12px; color: var(--mut); margin-top: 2px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; font-family: var(--mono);
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
  border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.nav a {
  font-size: 13.5px; font-weight: 600; color: var(--mut); text-decoration: none;
  padding: 6px 4px;
}
.nav a:hover, .nav a.on { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 12px; font-size: 12px; color: var(--mut);
}
.pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}
.pill strong { color: var(--ink); font-family: var(--mono); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2, .sec {
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mut); margin-bottom: 12px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }

/* Money */
.money { padding: 36px 0 8px; }
.money .label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mut);
}
.money .big {
  font-size: clamp(42px, 8vw, 64px); font-weight: 800; line-height: 1.05;
  margin: 8px 0 4px; font-family: var(--mono); letter-spacing: -0.03em;
}
.money .sub { font-size: 15px; color: var(--mut); }
.money .sub b { color: var(--ink); }
.money .meta { font-size: 13px; color: var(--mut); margin-top: 8px; }
.progress-track {
  margin-top: 16px; height: 12px; background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; padding: 2px;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #f59e0b);
  min-width: 2%; transition: width .5s ease;
}
.progress-row {
  display: flex; justify-content: space-between; font-size: 12px;
  font-family: var(--mono); color: var(--mut); margin-top: 8px;
}
.progress-row b { color: var(--brand); }

/* Grid */
.grid-2 {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin: 20px 0 28px;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.blocker .title { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.blocker .why { font-size: 15px; color: var(--mut); margin-bottom: 14px; }
.btn {
  display: inline-block; background: var(--ink); color: #fff !important;
  font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 10px;
  text-decoration: none !important; border: none; cursor: pointer;
}
.btn:hover { background: #1e293b; }
.btn-soft {
  background: #eff6ff; color: var(--brand-dark) !important;
  border: 1px solid #bfdbfe;
}
.btn-soft:hover { background: #dbeafe; }
.src {
  display: block; margin-top: 10px; font-size: 13px; color: var(--brand);
  word-break: break-all;
}

.activity li {
  list-style: none; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.45;
}
.activity li:last-child { border-bottom: none; }
.activity time { display: block; color: var(--mut); font-size: 12px; margin-bottom: 2px; }

/* Loops + ventures */
.loops { display: flex; flex-wrap: wrap; gap: 10px; }
.loop {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #cbd5e1; }
.dot.ok { background: var(--green); }
.dot.bad { background: var(--red); }
.dot.idle { background: #94a3b8; }

.ventures {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 12px;
}
.vent {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  text-decoration: none !important; color: var(--ink);
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.vent:hover { border-color: #94a3b8; transform: translateY(-1px); }
.vdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Funnel */
.funnel-toggle {
  display: inline-flex; background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap;
}
.funnel-toggle button {
  border: none; background: transparent; font: inherit; font-size: 12.5px;
  font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  color: var(--mut);
}
.funnel-toggle button.on {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
}
.steps {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step-tab {
  text-align: left; border: 1px solid var(--line); background: #f8fafc;
  border-radius: 12px; padding: 10px; cursor: pointer; font: inherit;
}
.step-tab .n {
  display: block; font-size: 10px; font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); margin-bottom: 4px;
}
.step-tab .t { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.step-tab.on {
  border-color: var(--brand); background: #eff6ff;
}
.step-tab.on .n { color: var(--brand); }
.step-body {
  border: 1px solid var(--line); border-radius: 14px; background: #f8fafc;
  padding: 18px; margin-top: 8px;
}
.step-body h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.step-body p { font-size: 14.5px; color: var(--mut); margin-bottom: 12px; }
.counts {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.count-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 12.5px;
}
.count-chip b { font-family: var(--mono); color: var(--ink); }

/* Notes edit */
.notes {
  width: 100%; min-height: 88px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 14px; resize: vertical;
  background: #fff; color: var(--ink);
}
.notes:focus { outline: 2px solid rgba(37,99,235,0.25); border-color: var(--brand); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.hint { font-size: 12.5px; color: var(--mut); }

/* Footer */
footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 22px 0 40px; font-size: 13px; color: var(--mut); text-align: center;
}
.err { color: var(--red); font-size: 14px; }
.alert {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px;
  padding: 14px 16px; margin: 20px 0;
}
.alert h3 { font-size: 14px; font-weight: 800; color: #92400e; }
.alert p { font-size: 13px; color: #a16207; }
.section-gap { margin: 28px 0; }
