:root {
  --bg: #07131f;
  --bg-raise: #0c1c2e;
  --panel: #10263c;
  --panel-2: #15324c;
  --line: #234864;
  --text: #e8f0f6;
  --muted: #b7c9d6;
  --faint: #8aa4b8;
  --lime: #d6f25c;
  --lime-ink: #142006;
  --paper: #f7f4ec;
  --paper-ink: #1c2430;
  --paper-faint: #5d6b7a;
  --warn: #f0c36a;
  --warn-bg: #3a2e14;
  --bad: #ffb0a4;
  --bad-bg: #3d221e;
  --good: #9be7bf;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --rail: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  font-weight: 380;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(214, 242, 92, 0.08), transparent 55%),
    var(--bg);
  letter-spacing: 0.01em;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, .figure, .wordmark strong { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
a { color: inherit; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--lime);
  display: grid;
  place-items: center;
}
.wordmark strong { font-size: 1.15rem; }
.wordmark span { color: var(--muted); font-weight: 460; }

.topbar, .rail-foot, .eyebrow, .meta, .fine { color: var(--muted); }
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.fine { font-size: 0.92rem; line-height: 1.5; }
.banner {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--panel);
}
.banner.error { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.banner.notice { background: #1b3320; color: var(--good); border-color: transparent; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

.btn, button.btn {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 560;
}
.btn.ghost, button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn:disabled, button:disabled { opacity: 0.55; cursor: progress; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.welcome { min-height: 100vh; display: flex; flex-direction: column; }
.welcome header, .welcome footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 28px;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.example-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--lime);
  color: var(--lime-ink);
  border-color: transparent;
  font-weight: 560;
}
.header-pills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rail > .example-badge { margin-top: -8px; }
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  align-items: center;
  padding: 12px 28px 48px;
  max-width: 1120px;
}
.hero h1 { font-size: clamp(2.7rem, 5vw, 4.5rem); line-height: 0.98; margin: 0 0 16px; }
.lede { font-size: 1.15rem; line-height: 1.5; color: var(--muted); max-width: 38rem; }
.hero .row { margin-top: 26px; }

.letter {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.letter-bar { display: flex; justify-content: space-between; gap: 12px; color: var(--paper-faint); font-size: 0.85rem; }
.stamp {
  border: 1.5px solid #c4554a;
  color: #c4554a;
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  transform: rotate(-2deg);
}
.letter h3 { margin: 14px 0 8px; font-size: 1.25rem; }
.letter pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.45;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.rail {
  background: var(--bg-raise);
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.rail nav { display: flex; flex-direction: column; gap: 6px; }
.rail a, .rail button.link {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
}
.rail a[aria-current="page"], .steps button[aria-current="step"] {
  background: var(--panel);
  color: var(--text);
}
.rail-foot { margin-top: auto; font-size: 0.82rem; line-height: 1.45; }
.main { padding: 28px 32px 64px; max-width: 1080px; }
.main h1 { font-size: clamp(2rem, 3vw, 2.8rem); margin: 0 0 8px; }

.steps { display: flex; flex-direction: column; gap: 4px; }
.steps button {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 8px;
  color: var(--faint);
  min-height: 44px;
}
.steps button strong { display: block; color: var(--text); font-weight: 560; font-family: var(--sans); letter-spacing: 0; }
.steps .n {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--serif);
}
.steps button[aria-current="step"] .n { background: var(--lime); color: var(--lime-ink); border-color: transparent; }
.steps button:disabled { opacity: 0.45; cursor: not-allowed; }

.card, .draft, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: block; font-size: 0.92rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  min-height: 44px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.field { margin-bottom: 14px; }
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice button {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 120px;
}
.choice button[aria-pressed="true"], .choice button.selected { border-color: var(--lime); }
.choice h3 { margin: 0 0 6px; font-size: 1.35rem; }
.choice p { margin: 0; color: var(--muted); }

.records { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.records th { text-align: left; color: var(--faint); font-weight: 460; padding: 8px 6px; }
.records td { border-top: 1px solid var(--line); padding: 10px 6px; vertical-align: top; }
.records code { word-break: break-all; font-size: 0.82rem; }
.status { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.recommend {
  display: inline-block;
  background: var(--lime);
  color: var(--lime-ink);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.overdue-label { color: var(--warn); }
.status.verified { color: var(--good); }
.status.missing, .status.pending { color: var(--warn); }

.desk-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr); gap: 16px; align-items: start; }
.revenue {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  background: linear-gradient(180deg, #17344f, #10263c);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.figure { font-size: clamp(2.4rem, 4vw, 3.6rem); margin: 0; color: var(--lime); line-height: 1; }
.draft h3 { margin: 0; font-size: 1.6rem; }
.draft .meta { margin: 4px 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.quote-list { display: flex; flex-direction: column; gap: 8px; }
.quote-list article, .quiet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.quote-list article:first-child, .quiet-row:first-child { border-top: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: auto; margin-top: 4px; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 16, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 5;
}
.overlay .card { max-width: 460px; width: min(460px, 100%); background: var(--bg-raise); }
.scopes { margin: 12px 0; padding-left: 18px; color: var(--muted); }

.dash-hero, .dash-split, .intel { display: grid; gap: 16px; min-width: 0; }
.intel > div, .dash-split > section, .dash-hero > article { min-width: 0; }
.dash-hero, .dash-split { grid-template-columns: 1fr 1fr; }
.intel { grid-template-columns: 1fr 1fr 1.2fr; margin-top: 8px; }
.dash-note p, .roi p { margin: 0 0 8px; line-height: 1.45; }
.roi {
  background: #1b3320;
  border-radius: 18px;
  padding: 16px 18px;
  margin: 16px 0;
}
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg); margin: 14px 0; }
.stack-seg { display: block; height: 100%; }
.seg-0-7 { background: var(--lime); }
.seg-8-14 { background: #9ed44a; }
.seg-15-30 { background: var(--warn); }
.seg-old { background: #c46a4a; }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.funnel div { background: var(--bg); border-radius: 12px; padding: 10px; }
.funnel strong { display: block; font-family: var(--serif); font-size: 1.6rem; }
.funnel span { color: var(--muted); font-size: 0.85rem; }
.meter { margin: 8px 0 12px; }
.meter-label, .meter-label span { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.meter-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.meter-track span { display: block; height: 100%; background: var(--lime); }
.chart-scroll { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
.hour-chart, .week-chart { display: flex; align-items: end; gap: 6px; min-width: 0; }
.hour-col, .week-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 4px; }
.hour-col span, .week-bar { display: block; width: 100%; background: var(--lime); border-radius: 6px 6px 2px 2px; }
.hour-col em, .week-col em, .week-val { font-style: normal; color: var(--faint); font-size: 0.68rem; text-align: center; }
.week-val { min-height: 1em; color: var(--muted); }
.dash h2 { margin-top: 0; }
.dash .panel, .dash .card, .dash, .main, .shell { min-width: 0; }
.dash .panel, .dash .card { margin-bottom: 16px; }
.dash a { color: var(--lime); }

@media (max-width: 860px) {
  .hero, .shell, .desk-grid, .choice, .dash-hero, .dash-split, .intel, .funnel { grid-template-columns: 1fr; }
  .shell { display: block; overflow-x: hidden; }
  .panel, .card, .intel, .dash-split { overflow: hidden; max-width: 100%; }
  .hour-col, .week-col { flex: 0 0 42px; }
  .week-chart, .hour-chart { width: max-content; min-width: 100%; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 20px 16px 48px; }
  .welcome header, .welcome footer { padding: 16px; }
  .hero { padding: 8px 16px 32px; gap: 24px; }
  .revenue { flex-direction: column; align-items: start; }
}
