:root {
  --lime: #A4E539;
  --lime-soft: #eaf6cf;
  --ink: #11131B;
  --ink-2: #1a1d27;
  --ink-3: #232733;
  --paper: #ffffff;
  --bg: #f5f6f8;
  --line: #e6e8ee;
  --muted: #6b7180;
  --muted-2: #9aa0ad;
  --green: #2f9e44;
  --amber: #e6a23c;
  --red: #e04f4f;
  --blue: #3b82f6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(17,19,27,.05), 0 1px 3px rgba(17,19,27,.06);
  --shadow-md: 0 8px 30px rgba(17,19,27,.08);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid #262a37;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .06em; }
.brand .dot { width: 10px; height: 10px; background: var(--lime); border-radius: 2px; box-shadow: 0 0 12px rgba(164,229,57,.7); }
.brand .word { font-size: 15px; }
.topbar .ref { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.topbar .ref b { color: #fff; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 54px 0 44px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(164,229,57,.16), transparent 65%); pointer-events: none;
}
.hero .eyebrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .status-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  background: rgba(164,229,57,.14); color: var(--lime); border: 1px solid rgba(164,229,57,.28);
}
.hero .status-chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.hero .version { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.hero h1 { font-size: 40px; line-height: 1.1; margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; max-width: 760px; }
.hero .lede { font-size: 16px; color: #c4c8d2; max-width: 680px; margin: 0; }
.hero .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--lime); text-transform: uppercase; margin-bottom: 10px; }

.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 30px; }
.fact { background: rgba(255,255,255,.04); border: 1px solid #262a37; border-radius: 12px; padding: 14px 16px; }
.fact .k { font-size: 11px; color: var(--muted-2); letter-spacing: .05em; text-transform: uppercase; }
.fact .v { font-size: 15px; font-weight: 700; margin-top: 4px; color: #fff; }
.fact .v.lime { color: var(--lime); }

/* ---------- Stage stepper ---------- */
.stepper { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-sm); }
.stepper-inner { display: flex; }
.step { flex: 1; display: flex; align-items: center; gap: 12px; padding: 18px 8px; position: relative; color: var(--muted); }
.step .num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 13px; background: #eceef2; color: var(--muted);
}
.step.active { color: var(--ink); }
.step.active .num { background: var(--ink); color: var(--lime); }
.step.done .num { background: var(--lime); color: var(--ink); }
.step .t { font-size: 14px; font-weight: 600; }
.step .s { font-size: 11px; color: var(--muted-2); }
.step:not(:last-child)::after {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 26px; background: var(--line);
}

/* ---------- Section scaffolding ---------- */
main { padding: 40px 0 80px; }
section.block { margin-bottom: 34px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.sec-head .idx { font-family: var(--mono); font-size: 13px; color: var(--lime); background: var(--ink); padding: 3px 9px; border-radius: 6px; font-weight: 700; }
.sec-head h2 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.sec-head .sub { color: var(--muted); font-size: 13px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Overview chips ---------- */
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ov { padding: 20px; }
.ov .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--lime-soft); margin-bottom: 14px; }
.ov .ic svg { width: 20px; height: 20px; stroke: var(--ink); }
.ov h3 { margin: 0 0 6px; font-size: 15px; }
.ov p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Scope matrix ---------- */
.scope-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.scope-table th, .scope-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scope-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); background: #fafbfc; }
.scope-table tr:last-child td { border-bottom: none; }
.scope-table td.mod { font-weight: 700; }
.scope-table td.accept { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.tag.inc { background: #e8f7ec; color: var(--green); }
.tag.opt { background: #fff4e0; color: var(--amber); }
.tag.exc { background: #fdeaea; color: var(--red); }
.resp { font-family: var(--mono); font-size: 11px; }
.resp.AGENTCY { color: var(--blue); }
.resp.CLIENT { color: var(--amber); }
.resp.BOTH { color: var(--green); }

.scope-scroll { overflow-x: auto; }

/* ---------- Add-ons ---------- */
.addon { display: flex; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.addon:last-child { border-bottom: none; }
.addon .toggle { flex-shrink: 0; }
.addon .info { flex: 1; }
.addon .info h4 { margin: 0 0 4px; font-size: 15px; }
.addon .info p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.addon .bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.addon .bullets li { font-size: 11.5px; color: var(--muted); background: #f2f3f6; padding: 3px 9px; border-radius: 6px; }
.addon .price-box { text-align: right; flex-shrink: 0; min-width: 130px; }
.addon .price { font-size: 16px; font-weight: 700; }
.addon .billing { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.addon .qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.addon .qty button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 15px; line-height: 1; }
.addon .qty .n { font-family: var(--mono); font-weight: 600; min-width: 18px; text-align: center; }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; background: #d8dbe2; border-radius: 999px; transition: .18s; display: inline-block; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--lime); }
.switch.on::after { left: 23px; }

/* ---------- Pricing ---------- */
.pricing-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.line-items { padding: 8px 20px; }
.line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.line:last-child { border-bottom: none; }
.line .l { color: var(--ink); }
.line .l small { display: block; color: var(--muted-2); font-size: 12px; }
.line .amt { font-family: var(--mono); font-weight: 600; }
.summary-card { padding: 24px; position: sticky; top: 90px; background: var(--ink); color: #fff; border-radius: var(--radius); }
.summary-card .sc-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; }
.summary-row.muted { color: #aab0bd; }
.summary-row.total { border-top: 1px solid #2a2e3b; margin-top: 8px; padding-top: 16px; }
.summary-row.total .amt { font-size: 24px; color: var(--lime); font-weight: 800; }
.summary-row.deposit { border-top: 1px dashed #2a2e3b; margin-top: 6px; padding-top: 14px; }
.summary-row .lbl { color: #c4c8d2; }
.recurring-note { font-size: 12px; color: #8b91a0; margin-top: 12px; line-height: 1.5; }

/* ---------- Timeline / milestones ---------- */
.milestones { display: flex; flex-direction: column; gap: 0; padding: 8px 0; }
.ms { display: flex; gap: 16px; padding: 16px 20px; position: relative; }
.ms::before { content: ""; position: absolute; left: 34px; top: 48px; bottom: -4px; width: 2px; background: var(--line); }
.ms:last-child::before { display: none; }
.ms .dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: #e2e5eb; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); margin-top: 2px; position: relative; z-index: 1; }
.ms.done .dot { background: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.ms.cur .dot { background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ms .body { flex: 1; }
.ms .body .m-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ms .body h4 { margin: 0; font-size: 15px; }
.ms .body .due { font-family: var(--mono); font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.ms .body p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ms .st { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Terms ---------- */
.terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.term { padding: 20px; }
.term h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 9px; }
.term h4 .n { font-family: var(--mono); font-size: 11px; color: var(--ink); background: var(--lime); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; }
.term p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ---------- Agreement ---------- */
.agreement { padding: 28px; }
.agreement h3 { margin: 0 0 12px; font-size: 18px; }
.consent-box { background: #f7f9fc; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; font-size: 13px; color: var(--muted); margin: 18px 0; }
.consent-box b { color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field input, .field textarea { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(164,229,57,.18); }
.field.full { grid-column: 1 / -1; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 16px 0; }
.checkbox input { margin-top: 3px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 10px; font-weight: 600; font-size: 14px; padding: 13px 22px; transition: .15s; }
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: #b7f253; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #c6cad4; background: #fafbfc; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 15px 26px; font-size: 15px; }

.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Invoice / tracking ---------- */
.invoices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inv { padding: 20px; }
.inv .inv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.inv .inv-no { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.inv .inv-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.inv .inv-amt { font-size: 26px; font-weight: 800; }
.inv .inv-amt small { font-size: 13px; color: var(--muted); font-weight: 500; }
.inv .inv-status { margin-top: 12px; }

.progress-track { padding: 24px; }
.progress-bar { height: 10px; background: #eceef2; border-radius: 999px; overflow: hidden; margin: 8px 0 16px; }
.progress-fill { height: 100%; background: var(--lime); border-radius: 999px; transition: width .4s; }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* ---------- Lock / banner ---------- */
.banner { border-radius: var(--radius); padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start; font-size: 14px; }
.banner.success { background: #eaf7ee; border: 1px solid #bfe6c8; color: #17602a; }
.banner.info { background: #eef4ff; border: 1px solid #cddcf8; color: #1d4ed8; }
.banner.warn { background: #fff7e8; border: 1px solid #f3dfb0; color: #8a5a10; }

/* ---------- States ---------- */
.loading { text-align: center; padding: 80px 0; color: var(--muted); }
.loading .spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--lime); border-radius: 50%; margin: 0 auto 16px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { text-align: center; padding: 80px 24px; }
.error .code { font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.error h2 { margin: 12px 0 6px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-md); z-index: 100; display: flex; gap: 10px; align-items: center; animation: rise .25s ease; }
.toast.success { border-left: 4px solid var(--lime); }
.toast.error { border-left: 4px solid var(--red); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.hidden { display: none !important; }

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; }
footer .f-inner { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted-2); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .pricing-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .terms { grid-template-columns: 1fr; }
  .invoices { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .stepper-inner { overflow-x: auto; }
  .step { min-width: 150px; }
}
