/* GoFigure brand stylesheet */
:root {
  --bg: #0A0F12;
  --surface: #11202A;
  --surface-2: #0D1720;
  --teal: #15607A;
  --teal-light: #2189AC;
  --lime: #C2DC3C;
  --text: #F2F5F6;
  --muted: #9FB3BC;
  --border: #1E3440;
  --radius: 18px;
  --maxw: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Poppins", sans-serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .6em; }
h3 { font-size: 1.15rem; margin-bottom: .4em; }
p { color: var(--muted); }
a { color: var(--teal-light); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.center { text-align: center; }
.lead { font-size: 1.12rem; max-width: 720px; }
.center .lead { margin: 0 auto; }
.eyebrow {
  display: inline-block; font-family: "Poppins", sans-serif; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--lime); margin-bottom: 14px;
}

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 18, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
}
.nav .logo img { height: 30px; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--text); font-size: .95rem; }
.nav-links a:hover { color: var(--lime); }
.nav-links a.active { color: var(--lime); }
.hamburger {
  display: none; background: none; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 1.3rem; padding: 4px 12px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; font-family: "Poppins", sans-serif; font-weight: 600;
  padding: 13px 26px; border-radius: 12px; font-size: .97rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-lime { background: var(--lime); color: #10230B; }
.btn-lime:hover { box-shadow: 0 6px 24px rgba(194, 220, 60, .25); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--teal-light); color: var(--teal-light); }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero h1 span { color: var(--lime); }
.hero .lead { margin: 22px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-line { margin-top: 18px; font-size: .9rem; color: var(--teal-light); font-family: "Poppins", sans-serif; }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-align: center;
}
.stat strong { display: block; font-family: "Poppins", sans-serif; font-size: 1.35rem; color: var(--lime); }
.stat span { font-size: .88rem; color: var(--muted); }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px;
}
.card h3 { color: var(--text); }
.card .icon { color: var(--lime); margin-bottom: 12px; }
.card p { font-size: .95rem; }

/* Steps */
.step-num {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%;
  background: var(--teal); color: #fff; align-items: center; justify-content: center;
  font-family: "Poppins", sans-serif; font-weight: 700; margin-bottom: 14px;
}

/* Platform / dashboard mockup */
.platform { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.platform-flex { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.dash {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.kpi small { color: var(--muted); font-size: .7rem; display: block; }
.kpi b { font-family: "Poppins", sans-serif; color: var(--text); font-size: .98rem; }
.kpi b.lime { color: var(--lime); }
.dash-chart { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.chat-bubble {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-size: .86rem;
}
.chat-bubble .q { color: var(--text); margin-bottom: 8px; }
.chat-bubble .q::before { content: "You: "; color: var(--teal-light); font-weight: 600; }
.chat-bubble .a { color: var(--muted); }
.chat-bubble .a::before { content: "AI CFO: "; color: var(--lime); font-weight: 600; }
.checklist { list-style: none; margin-top: 18px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 12px; color: var(--muted); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 700;
}

/* CTA band */
.cta-band { background: var(--lime); }
.cta-band h2, .cta-band p { color: #10230B; }
.cta-band .btn { background: var(--bg); color: var(--lime); margin-top: 18px; }

/* Pricing */
.tier { display: flex; flex-direction: column; position: relative; }
.tier .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--lime); color: #10230B; font-family: "Poppins", sans-serif; font-weight: 600;
  font-size: .75rem; padding: 4px 14px; border-radius: 99px;
}
.tier.popular { border-color: var(--lime); }
.tier .price { font-family: "Poppins", sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--lime); margin: 10px 0 2px; }
.tier .price-note { font-size: .8rem; color: var(--muted); margin-bottom: 16px; }
.tier ul { list-style: none; margin: 12px 0 22px; flex: 1; }
.tier ul li { padding-left: 26px; position: relative; margin-bottom: 9px; font-size: .93rem; color: var(--muted); }
.tier ul li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-light); font-weight: 700; }
.tier .btn { align-self: flex-start; }
.pricing-note { font-size: .9rem; max-width: 760px; margin: 28px auto 0; text-align: center; }

/* Automation band */
.band { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Two-column AI vs human */
.vs-col h3 { color: var(--lime); }
.vs-col:last-child h3 { color: var(--teal-light); }

/* Timeline */
.timeline { border-left: 2px solid var(--teal); margin: 30px 0 10px 8px; padding-left: 30px; }
.tl-item { position: relative; margin-bottom: 30px; }
.tl-item::before {
  content: ""; position: absolute; left: -39px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--lime); border: 3px solid var(--bg);
}
.tl-item h3 { color: var(--text); }
.tl-item .tl-date { font-family: "Poppins", sans-serif; color: var(--lime); font-size: .85rem; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 1rem;
  padding: 18px 22px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: "+"; color: var(--lime); font-size: 1.4rem; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 22px 18px; font-size: .95rem; }

/* Forms */
form { display: grid; gap: 16px; max-width: 640px; }
label { font-size: .88rem; color: var(--text); font-weight: 500; display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-light); border-color: transparent; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success { display: none; background: var(--surface); border: 1px solid var(--lime); border-radius: var(--radius); padding: 26px; }
.form-success strong { color: var(--lime); }

/* Founder */
.founder { display: flex; gap: 28px; align-items: center; }
.founder-photo {
  width: 130px; height: 130px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  display: flex; align-items: center; justify-content: center;
  font-family: "Poppins", sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--lime);
}

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 36px; background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
footer .logo img { height: 26px; margin-bottom: 14px; }
footer p, footer a, footer li { font-size: .9rem; color: var(--muted); }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a:hover { color: var(--lime); }
.copyright { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===================================================================
   FREE TOOLS: calculators and the AI assistant
   Additive only. Nothing above this line was changed.
   =================================================================== */

/* Tool card on the index page */
.tool-card { display: flex; flex-direction: column; }
.tool-card .tool-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(194, 220, 60, .12); border: 1px solid rgba(194, 220, 60, .3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--lime);
}
.tool-card p { flex: 1; }
.tool-card .btn { align-self: flex-start; margin-top: 16px; }
.tool-card.soon { opacity: .55; }
.tool-card.soon .badge-soon {
  align-self: flex-start; margin-top: 16px; font-size: .78rem;
  font-family: "Poppins", sans-serif; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 99px; padding: 6px 14px;
}

/* Calculator layout: inputs left, results right, stacks on mobile */
.calc-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 26px; align-items: start; }
.calc-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.calc-panel h2 { font-size: 1.15rem; margin-bottom: 4px; }
.calc-panel .panel-note { font-size: .87rem; margin-bottom: 20px; }
.calc-panel form { max-width: none; gap: 15px; }

.field-hint { font-size: .78rem; color: var(--muted); margin-top: 5px; display: block; }
.input-money { position: relative; }
.input-money .cur {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .95rem; pointer-events: none;
}
.input-money input { padding-left: 32px; }
.input-suffix { position: relative; }
.input-suffix .suf {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .95rem; pointer-events: none;
}
.input-suffix input { padding-right: 34px; }

.optional-toggle {
  background: none; border: none; color: var(--teal-light); cursor: pointer;
  font-family: inherit; font-size: .88rem; padding: 0; text-align: left;
  justify-self: start;
}
.optional-toggle:hover { color: var(--lime); }
.optional-fields { display: none; gap: 15px; }
.optional-fields.show { display: grid; }

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

/* Validation */
.calc-errors {
  display: none; background: rgba(255, 122, 122, .08);
  border: 1px solid rgba(255, 122, 122, .4); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 18px;
}
.calc-errors.show { display: block; }
.calc-errors ul { list-style: none; }
.calc-errors li { color: #FFB3B3; font-size: .9rem; margin-bottom: 4px; }
.calc-errors li:last-child { margin-bottom: 0; }

/* Results */
.result-empty { text-align: center; padding: 30px 10px; }
.result-empty .big { font-size: 2rem; margin-bottom: 8px; }
.results { display: none; }
.results.show { display: block; }

.headline-figure {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 14px; padding: 22px; text-align: center; margin-bottom: 18px;
}
.headline-figure small {
  display: block; text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; color: rgba(255, 255, 255, .8); font-family: "Poppins", sans-serif;
}
.headline-figure strong {
  display: block; font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: clamp(1.9rem, 5.5vw, 2.6rem); color: #fff; line-height: 1.15; margin-top: 6px;
}
.headline-figure .sub { color: rgba(255, 255, 255, .85); font-size: .9rem; margin-top: 6px; }

.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.result-cell {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.result-cell small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 3px; }
.result-cell b { font-family: "Poppins", sans-serif; font-size: 1.08rem; color: var(--text); }
.result-cell b.lime { color: var(--lime); }
.result-cell.wide { grid-column: 1 / -1; }

.result-note {
  margin-top: 16px; font-size: .87rem; padding: 14px 16px;
  background: var(--surface-2); border-left: 3px solid var(--lime); border-radius: 0 10px 10px 0;
}

/* Margin vs markup explainer */
.mm-explainer { margin-top: 18px; }
.mm-explainer .card { padding: 18px 20px; }
.mm-explainer h4 { color: var(--lime); font-size: .95rem; margin-bottom: 6px; }
.mm-explainer p { font-size: .88rem; }

/* Break-even bar */
.be-bar { margin-top: 18px; }
.be-bar-track {
  height: 34px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; display: flex; margin-top: 8px;
}
.be-seg { height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-family: "Poppins", sans-serif; white-space: nowrap; overflow: hidden; }
.be-seg.fixed { background: var(--teal); color: #fff; }
.be-seg.variable { background: rgba(33, 137, 172, .35); color: var(--text); }
.be-seg.profit { background: var(--lime); color: #10230B; }
.be-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.be-legend span { display: flex; align-items: center; gap: 6px; }
.be-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* AI assistant */
.ai-box {
  margin-top: 22px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 11px; padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}
.ai-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  display: flex; align-items: center; justify-content: center;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: .8rem; color: var(--lime);
}
.ai-head b { font-family: "Poppins", sans-serif; font-size: .97rem; display: block; }
.ai-head small { color: var(--muted); font-size: .78rem; }
.ai-body { padding: 18px 20px; }
.ai-thread { display: grid; gap: 14px; margin-bottom: 16px; }
.ai-thread:empty { margin-bottom: 0; }
.ai-msg { font-size: .92rem; line-height: 1.6; }
.ai-msg.you {
  justify-self: end; max-width: 88%; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: 11px 15px; color: var(--text);
}
.ai-msg.bot { max-width: 94%; color: var(--muted); }
.ai-msg.bot::before {
  content: "Buff CFO"; display: block; font-family: "Poppins", sans-serif;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 5px;
}
.ai-msg.bot p { margin-bottom: 9px; font-size: .92rem; }
.ai-msg.bot p:last-child { margin-bottom: 0; }
.ai-msg.bot strong { color: var(--text); }
.ai-msg.error { color: #FFB3B3; }
.ai-typing { display: flex; gap: 5px; align-items: center; }
.ai-typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--lime);
  display: inline-block; animation: aiblink 1.2s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: .18s; }
.ai-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes aiblink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.ai-prompts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ai-chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  color: var(--muted); font-family: inherit; font-size: .82rem;
  padding: 7px 14px; cursor: pointer; transition: border-color .15s, color .15s;
}
.ai-chip:hover { border-color: var(--lime); color: var(--lime); }
.ai-form { display: flex; gap: 10px; max-width: none; }
.ai-form input { flex: 1; }
.ai-form .btn { flex-shrink: 0; padding: 12px 20px; }
.ai-form .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ai-disclaimer { font-size: .76rem; color: var(--muted); margin-top: 11px; }
.ai-locked { font-size: .89rem; }

/* Save / share row */
.tool-footer-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* Assumptions list under a calculator */
.assumptions li { font-size: .89rem; }

/* Payslip breakdown */
.payslip { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.payslip-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 16px; font-size: .92rem; border-bottom: 1px solid var(--border);
}
.payslip-row:last-child { border-bottom: none; }
.payslip-row span { color: var(--muted); }
.payslip-row b { font-family: "Poppins", sans-serif; font-weight: 500; color: var(--text); }
.payslip-row.gross { background: var(--surface-2); }
.payslip-row.deduct b { color: #FFB3B3; }
.payslip-row.net { background: rgba(194, 220, 60, .1); border-top: 1px solid rgba(194, 220, 60, .3); }
.payslip-row.net span, .payslip-row.net b { color: var(--lime); font-weight: 600; }
.payslip-row small { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }

/* Tax band table */
.band-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .88rem; }
.band-table th {
  text-align: left; padding: 9px 12px; font-family: "Poppins", sans-serif;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600;
}
.band-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--muted); }
.band-table tr:last-child td { border-bottom: none; }
.band-table td.rate { font-family: "Poppins", sans-serif; color: var(--text); }
.band-table tr.used td { background: rgba(33, 137, 172, .1); }
.band-table tr.used td.rate { color: var(--lime); }
.band-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Rules version stamp */
.rules-stamp {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px;
  padding: 12px 15px; border-radius: 12px; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--border);
}
.rules-stamp.unverified { border-color: rgba(186, 117, 23, .45); background: rgba(186, 117, 23, .08); }
.rules-stamp p { font-size: .82rem; margin: 0; }
.rules-stamp b { color: var(--text); font-family: "Poppins", sans-serif; font-weight: 500; }
.rules-stamp .stamp-icon { flex-shrink: 0; color: var(--muted); }
.rules-stamp.unverified .stamp-icon { color: #EF9F27; }

/* Prefill notice when a value carries over from another calculator */
.prefill {
  display: none; align-items: flex-start; gap: 10px;
  background: rgba(194, 220, 60, .08); border: 1px solid rgba(194, 220, 60, .3);
  border-radius: 12px; padding: 12px 15px; margin-bottom: 16px; font-size: .87rem;
}
.prefill.show { display: flex; }
.prefill b { color: var(--lime); font-family: "Poppins", sans-serif; font-weight: 600; }
.prefill p { font-size: .87rem; margin: 0; }
.prefill .prefill-icon { color: var(--lime); flex-shrink: 0; }

/* Ratio dial for LTV to CAC */
.ratio-scale { margin-top: 18px; }
.ratio-track {
  height: 10px; border-radius: 99px; overflow: hidden; display: flex; margin: 10px 0 8px;
  border: 1px solid var(--border);
}
.ratio-track i { display: block; height: 100%; }
.ratio-marker { position: relative; height: 0; }
.ratio-marker span {
  position: absolute; top: -30px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-family: "Poppins", sans-serif;
  font-weight: 600; font-size: .72rem; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.ratio-marker span::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid var(--text);
}
.ratio-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }

/* Tools hub category headings */
.tool-group { margin-top: 40px; }
.tool-group:first-of-type { margin-top: 0; }
.tool-group h3 {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 16px; font-family: "Poppins", sans-serif;
}

/* Runway depletion chart */
.rw-chart { margin-top: 18px; }
.rw-chart-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .8rem; color: var(--muted); margin-bottom: 8px;
}
.rw-chart svg { display: block; width: 100%; height: auto; }
.rw-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 6px; }

/* Process flows on the automation page */
.flow { display: grid; gap: 0; margin-top: 20px; }
.flow-step {
  display: grid; grid-template-columns: 34px 1fr; gap: 16px;
  padding-bottom: 22px; position: relative;
}
.flow-step:not(:last-child)::before {
  content: ""; position: absolute; left: 16px; top: 34px; bottom: 0;
  width: 2px; background: var(--border);
}
.flow-dot {
  width: 34px; height: 34px; border-radius: 50%; z-index: 1;
  background: var(--surface-2); border: 2px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: .85rem; color: var(--lime);
}
.flow-step.human .flow-dot { border-color: var(--lime); background: var(--lime); color: #10230B; }
.flow-step h4 { font-family: "Poppins", sans-serif; font-size: .98rem; margin-bottom: 3px; }
.flow-step p { font-size: .89rem; }
.flow-tag {
  display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  font-family: "Poppins", sans-serif; padding: 2px 9px; border-radius: 99px; margin-left: 8px;
  vertical-align: middle;
}
.flow-tag.ai { background: rgba(33, 137, 172, .2); color: var(--teal-light); border: 1px solid rgba(33, 137, 172, .4); }
.flow-tag.you { background: rgba(194, 220, 60, .14); color: var(--lime); border: 1px solid rgba(194, 220, 60, .35); }

.status-line {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem;
  font-family: "Poppins", sans-serif; padding: 5px 13px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  margin-bottom: 14px;
}
.status-line i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-line.live i { background: var(--lime); }
.status-line.building i { background: var(--teal-light); }

@media (max-width: 900px) {
  .calc-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .result-grid { grid-template-columns: 1fr; }
  .ai-form { flex-direction: column; }
  .ai-form .btn { width: 100%; }
}

/* Responsive */
@media (max-width: 900px) {
  .stats, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2, .platform-flex, .footer-grid { grid-template-columns: 1fr; }
  .founder { flex-direction: column; text-align: center; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 20px 24px; gap: 16px; align-items: flex-start;
  }
  .nav-links.show { display: flex; }
  .hamburger { display: block; }
}
@media (max-width: 560px) {
  .stats, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}

/* Mode switch at the top of a calculator */
.mode-switch {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.mode-switch button {
  flex: 1; background: none; border: none; cursor: pointer;
  font-family: "Poppins", sans-serif; font-size: .87rem; font-weight: 500;
  color: var(--muted); padding: 10px 12px; border-radius: 9px;
  transition: background .15s, color .15s; line-height: 1.3;
}
.mode-switch button small { display: block; font-family: "Inter", sans-serif; font-size: .74rem; font-weight: 400; margin-top: 2px; }
.mode-switch button:hover { color: var(--text); }
.mode-switch button.on { background: var(--teal); color: #fff; }
.mode-switch button.on small { color: rgba(255,255,255,.8); }

/* Itemised cost helper */
.itemiser { display: none; margin-top: 12px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.itemiser.show { display: block; }
.itemiser-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; margin-bottom: 9px; }
.itemiser-row label { margin: 0; font-size: .85rem; font-weight: 400; color: var(--muted); }
.itemiser-row input { padding: 8px 11px; font-size: .88rem; }
.itemiser-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--border); margin-top: 12px; padding-top: 11px;
  font-family: "Poppins", sans-serif; font-size: .92rem;
}
.itemiser-total b { color: var(--lime); }
.itemiser-note { font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* Margin of safety bar */
.safety-bar { margin-top: 18px; }
.safety-track {
  height: 30px; border-radius: 10px; overflow: hidden; display: flex;
  border: 1px solid var(--border); margin-top: 8px; background: var(--surface-2);
}
.safety-seg { height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: .74rem; font-family: "Poppins", sans-serif; white-space: nowrap; overflow: hidden; }
.safety-seg.cover { background: var(--teal); color: #fff; }
.safety-seg.spare { background: var(--lime); color: #10230B; }
.safety-seg.gap { background: #A32D2D; color: #fff; }

@media (max-width: 560px) {
  .mode-switch { flex-direction: column; }
  .itemiser-row { grid-template-columns: 1fr; gap: 4px; }
}
