:root {
  --primary: #1F3A5F;
  --secondary: #C7943A;
  --background: #FBF8F2;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --muted: #5F6B7A;
  --success: #2F7A4E;
  --warning: #B57614;
  --danger: #A03333;
  --container-max: 1200px;
  --gutter: 32px;
  --section-pad-y: 96px;
  --card-pad: 32px;
  --radius: 6px;
  --font-heading: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

@media (max-width: 768px) {
  :root {
    --section-pad-y: 64px;
    --gutter: 16px;
    --card-pad: 20px;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--background);
  font-feature-settings: 'cv02', 'cv11', 'ss01';
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--secondary); text-decoration-thickness: 2px; }
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--primary); margin: 0 0 0.5em; }
h1 { font-size: 48px; line-height: 1.16; font-weight: 700; }
h2 { font-size: 32px; line-height: 1.25; font-weight: 600; }
h3 { font-size: 24px; line-height: 1.33; font-weight: 600; }
h4 { font-size: 18px; line-height: 1.44; font-weight: 600; }

@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
}

p { margin: 0 0 1em; }
ul { padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container.narrow { max-width: 820px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
  border: 0;
}

/* ----- Header ----- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 20px;
  text-decoration: none;
}
.site-brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; width: 36px; height: 36px; color: var(--primary); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; align-items: baseline; gap: 4px; }
.brand-one { color: var(--secondary); font-weight: 700; font-size: 22px; }
.brand-name { letter-spacing: -0.01em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav-link.active { color: var(--primary); text-decoration: underline; text-decoration-color: var(--secondary); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.nav-cta {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
}
.nav-cta.primary {
  background: var(--secondary);
  color: var(--primary);
}
.nav-cta.primary:hover { background: #b6852f; text-decoration: none; }
.nav-cta.secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.nav-cta.secondary:hover { background: var(--primary); color: var(--surface); text-decoration: none; }

.mobile-nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 8px; }
  body.nav-open .site-nav { display: flex; }
  .mobile-nav-toggle { display: block; }
  .nav-link, .nav-cta { width: 100%; text-align: left; }
}

.demo-banner-strip {
  background: var(--primary);
  color: var(--surface);
  text-align: center;
  font-size: 13px;
  padding: 6px 16px;
  letter-spacing: 0.02em;
}

/* ----- Sections ----- */
.section {
  padding: var(--section-pad-y) 0;
  border-bottom: 1px solid rgba(199, 148, 58, 0.18);
}

.section + .section { }
.section-content { background: var(--background); }
.section-feature-grid { background: var(--surface); }
.section-cta-band {
  background: var(--primary);
  color: var(--surface);
  border-bottom: none;
}
.section-cta-band .section-heading { color: var(--surface); }
.section-cta-band .prose { color: var(--surface); }
.section-cta-band a.btn { background: var(--secondary); color: var(--primary); }

.section-heading { margin-bottom: 16px; }

.prose { max-width: 720px; }
.prose ul.prose-list { margin: 0 0 1em; padding-left: 1.2em; }

/* ----- Hero ----- */
.section-hero { background: linear-gradient(to bottom, var(--surface), var(--background)); padding: 80px 0; }
/* Centered hero: the text is centered on the page and the abacus motif is a subtle
   top-right accent rather than a co-equal column that offsets the copy. */
.hero-grid {
  position: relative;
  text-align: center;
}
.hero-content { max-width: 760px; margin: 0 auto; }
.hero-heading { font-size: 52px; line-height: 1.1; margin-bottom: 16px; }
.hero-body { font-size: 19px; line-height: 1.55; color: var(--text); }
.hero-art { position: absolute; top: 0; right: 0; display: flex; justify-content: flex-end; pointer-events: none; }
.hero-motif { width: 120px; max-width: 100%; opacity: 0.5; }
.hero-motif svg { width: 100%; height: auto; color: var(--secondary); }

@media (max-width: 900px) {
  .hero-heading { font-size: 36px; }
  /* Hide the corner accent on narrow screens so it can't overlap the centered text. */
  .hero-art { display: none; }
}

/* ----- Feature grid ----- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.feature-card {
  background: var(--surface);
  padding: var(--card-pad);
  border-radius: var(--radius);
  border-left: 4px solid var(--secondary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.feature-card p { margin: 8px 0 0; font-size: 16px; }
.feature-bead {
  display: inline-block;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--secondary);
  margin-bottom: 12px;
}

/* ----- Persona tiles ----- */
.persona-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.persona-tile {
  background: var(--surface);
  padding: var(--card-pad);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  text-decoration: none !important;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.persona-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 58, 95, 0.08);
  border-color: var(--secondary);
}
.persona-tile h3 { margin: 4px 0; }
.persona-tile p { margin: 0; font-size: 16px; flex: 1; }
.persona-tile .tile-link { color: var(--primary); font-weight: 600; margin-top: 8px; }
.tile-bead {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--secondary);
}

/* ----- Status labels ----- */
.status-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  margin: 0 8px 16px 0;
  vertical-align: middle;
}
.status-label.draft {
  background: rgba(181, 118, 20, 0.12);
  color: var(--warning);
  border: 1px solid rgba(181, 118, 20, 0.35);
}
.status-label.demo {
  background: rgba(31, 58, 95, 0.08);
  color: var(--primary);
  border: 1px dashed var(--primary);
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  font-family: var(--font-body);
  transition: background 120ms ease, transform 60ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--surface); }
.btn-primary:hover { background: #15294a; }
.btn-secondary { background: var(--secondary); color: var(--primary); }
.btn-secondary:hover { background: #b6852f; }

/* ----- Forms ----- */
.stub-form {
  background: var(--surface);
  padding: var(--card-pad);
  border-radius: var(--radius);
  margin-top: 24px;
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}
.stub-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  gap: 6px;
  flex: 1;
  color: var(--muted);
}
.stub-form input, .stub-form select, .stub-form textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
}
.stub-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stub-form label.full { flex: 1; }
@media (max-width: 600px) { .stub-form .form-row { grid-template-columns: 1fr; } }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-group label { flex-direction: row; align-items: center; font-weight: 500; color: var(--text); }
/* Inside the calculator cards, .calc-card label sets flex-direction:column (radio above
   the text). Override it here with higher specificity so each radio sits on the SAME line
   as its label, left-aligned. */
.calc-card .radio-group label { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
.form-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.form-response {
  margin-top: 24px;
  background: rgba(47, 122, 78, 0.08);
  border: 1px solid rgba(47, 122, 78, 0.35);
  padding: 20px;
  border-radius: var(--radius);
  color: var(--text);
}
.form-response.error {
  background: rgba(160, 51, 51, 0.08);
  border-color: rgba(160, 51, 51, 0.35);
}
.form-response.generic-response { display: block; }
.form-response h4 { margin-top: 0; color: var(--success); }
.form-response ul { margin: 8px 0 0; }

.newsletter-form {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.newsletter-form input { flex: 1; min-width: 240px; }
.newsletter-form .form-note { flex-basis: 100%; }

/* ----- Calculator ----- */
.calculator-shell {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--card-pad);
  margin-top: 24px;
  border: 1px solid rgba(0,0,0,0.06);
  max-width: 760px;
}
.calc-step-indicator {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.calc-step-indicator .step {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
}
.calc-step-indicator .step.active { background: var(--secondary); color: var(--primary); }

.calc-card { display: flex; flex-direction: column; gap: 16px; }
.calc-path { display: flex; flex-direction: column; gap: 16px; }
.calculator-shell[data-path="line22"] .calc-path-full { display: none; }
.calculator-shell[data-path="full"] .calc-path-line22 { display: none; }
.calc-card h3 { margin: 0; color: var(--primary); }
.calc-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .calc-card .form-row { grid-template-columns: 1fr; } }
.calc-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.calc-card input, .calc-card select {
  font-size: 16px; padding: 10px 12px; border: 1px solid rgba(0,0,0,0.18); border-radius: var(--radius); background: var(--surface); color: var(--text);
}

.result-banner {
  background: rgba(181, 118, 20, 0.12);
  color: var(--warning);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  border-left: 4px solid var(--warning);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.result-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 16px;
}
.result-table tr.result-row td {
  border-top: 2px solid var(--primary);
  border-bottom: 0;
  padding-top: 16px;
  font-size: 18px;
}
.amount-green { color: var(--success); }
.amount-amber { color: var(--warning); }
.amount-red { color: var(--danger); }

.capacity-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  margin: 8px 0;
}
.capacity-badge.green { background: rgba(47, 122, 78, 0.14); color: var(--success); }
.capacity-badge.amber { background: rgba(181, 118, 20, 0.14); color: var(--warning); }
.capacity-badge.red { background: rgba(160, 51, 51, 0.14); color: var(--danger); }

.refund-boost-heading { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.08); }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ----- Donor form ----- */
.donor-form { }
.donor-step h3 { margin: 0; color: var(--primary); }
.cap-note { font-style: italic; }

/* ----- Footer ----- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 24px;
  margin-top: 0;
}
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: var(--secondary); text-decoration: underline; text-decoration-color: var(--secondary); }
.site-footer strong { color: var(--surface); display: block; margin-bottom: 12px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.site-footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 800px) { .site-footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .site-footer-inner { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 15px; }
.footer-col p { font-size: 14px; margin: 0; line-height: 1.5; }
.footer-meta { color: rgba(255,255,255,0.6); font-size: 13px !important; }
.site-footer-legal {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* ----- Print ----- */
@media print {
  .demo-banner-strip, .site-nav, .mobile-nav-toggle, .nav-cta, .stub-form button, .result-actions { display: none !important; }
  .site-header, .site-footer { background: var(--surface); color: var(--text); border-bottom: 1px solid #ddd; }
}
