:root {
  --ink: #111817;
  --muted: #5f6d68;
  --subtle: #7a8580;
  --paper: #f5f6f2;
  --surface: #ffffff;
  --soft: #f9faf7;
  --line: #dde4df;
  --evergreen: #174338;
  --evergreen-2: #215949;
  --gold: #b58c38;
  --blue: #486a78;
  --graphite: #202726;
  --danger: #8a3c35;
  --shadow-sm: 0 8px 20px rgba(20, 28, 25, 0.04);
  --shadow-md: 0 14px 30px rgba(20, 28, 25, 0.07);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.58;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

ul {
  margin: 0;
}

.site-header,
.legal-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(var(--max), calc(100% - 36px));
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--evergreen);
  font-size: 0.82rem;
  font-weight: 780;
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
}

.nav-toggle {
  display: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 640;
}

.nav-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--evergreen);
}

.nav-links a.client-portal-link,
.nav-links button.client-portal-link,
.footer a.client-portal-link {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--evergreen);
  color: #fff;
  background: var(--evergreen);
  font-size: 0.78rem;
  font-weight: 720;
}

.nav-links a.client-portal-link:hover,
.nav-links button.client-portal-link:hover,
.footer a.client-portal-link:hover {
  color: #fff;
  background: #12372e;
}

.hero {
  width: min(var(--max), calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 30px;
  align-items: stretch;
  margin: 0 auto;
  padding: 36px 0 32px;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 310px;
  padding-right: 12px;
}

.eyebrow {
  color: var(--evergreen);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  color: var(--ink);
  font-size: 2.3rem;
  font-weight: 760;
  line-height: 1.12;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  color: #43504c;
  font-size: 0.98rem;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.button,
.portal-submit,
.small-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1;
}

.button.primary,
.portal-submit {
  color: #fff;
  background: var(--evergreen);
  border-color: var(--evergreen);
}

.button.primary:hover,
.portal-submit:hover {
  background: #12372e;
  border-color: #12372e;
}

.button.secondary {
  color: var(--evergreen);
  background: var(--surface);
  border-color: var(--line);
}

.button.secondary:hover {
  border-color: rgba(23, 67, 56, 0.38);
  background: #f7faf7;
}

.hero-command {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.hero-command strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.42;
}

.hero-command ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: #4e5b57;
  font-size: 0.88rem;
}

.metrics {
  width: min(var(--max), calc(100% - 36px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics div {
  min-height: 76px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 15px 17px;
  background: var(--surface);
}

.metrics strong {
  color: var(--evergreen);
  font-size: 1.28rem;
  font-weight: 760;
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 560;
}

.section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 10px;
}

.section-heading.wide {
  max-width: 880px;
}

.section-heading h2,
.funded-header h2,
.institutional-banner h2,
.governance-section h2,
.faq-section h2,
.contact-section h2,
.mandate-band h2 {
  color: var(--ink);
  font-size: 1.34rem;
  font-weight: 760;
  line-height: 1.28;
}

.section-heading p:not(.eyebrow),
.funded-header > p,
.institutional-banner > p,
.contact-section > div > p:not(.eyebrow):not(.contact-email):not(.contact-phone):not(.contact-whatsapp),
.mandate-band > p,
.governance-copy p,
.intro-copy p {
  color: #4f5b57;
  line-height: 1.72;
}

.intro-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.intro-copy {
  display: grid;
  gap: 13px;
}

.source-ledger,
.framework-grid,
.project-detail-grid,
.process-grid,
.mandate-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.source-ledger,
.framework-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mandate-grid,
.process-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-ledger article,
.framework-card,
.project-detail-card,
.process-grid article,
.mandate-grid article,
.faq-item,
.evidence-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.source-ledger article,
.framework-card,
.project-detail-card,
.process-grid article,
.mandate-grid article,
.faq-item {
  padding: 16px;
}

.source-ledger article > span,
.mandate-grid article > span,
.project-title span,
.framework-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--evergreen);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

.source-ledger h3,
.framework-card h3,
.project-detail-card h3,
.process-grid h3,
.mandate-grid h3,
.faq-item button,
.tab-panel h3 {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 720;
  line-height: 1.35;
}

.source-ledger p,
.framework-card p,
.framework-card li,
.project-detail-card p,
.process-grid p,
.mandate-grid p,
.faq-item p,
.tab-panel p,
.tab-panel li {
  color: #52605b;
  font-size: 0.86rem;
  line-height: 1.65;
}

.source-ledger strong {
  display: block;
  margin-top: 14px;
  color: #2c3935;
  font-size: 0.84rem;
  line-height: 1.5;
}

.evidence-panel {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 20px;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid rgba(23, 67, 56, 0.18);
  border-radius: 8px;
  background: #f7faf7;
}

.evidence-panel h2 {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 760;
  line-height: 1.25;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.evidence-grid article {
  padding: 14px;
  box-shadow: none;
}

.evidence-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 720;
}

.evidence-grid span {
  color: #52605b;
  font-size: 0.86rem;
  line-height: 1.55;
}

.mandate-band,
.institutional-banner,
.funded-header,
.governance-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mandate-band {
  background: var(--graphite);
  border-color: var(--graphite);
}

.mandate-band h2,
.mandate-band p,
.mandate-band .eyebrow {
  color: #fff;
}

.mandate-band > p {
  color: rgba(255, 255, 255, 0.82);
}

.framework-card ul,
.tab-panel ul {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-left: 18px;
}

.framework-card a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--evergreen);
  font-size: 0.86rem;
  font-weight: 700;
}

.country-readiness {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf7;
}

.country-readiness h3 {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 720;
}

.country-readiness p {
  color: #52605b;
  font-size: 0.92rem;
  line-height: 1.65;
}

.program-table {
  display: grid;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.program-row {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.25fr 1.2fr;
  border-top: 1px solid var(--line);
}

.program-row:first-child {
  border-top: 0;
}

.program-row > span,
.program-row > strong {
  padding: 12px 14px;
  border-left: 1px solid var(--line);
  color: #52605b;
  font-size: 0.84rem;
  line-height: 1.5;
}

.program-row > :first-child {
  border-left: 0;
}

.program-head {
  background: #f7faf7;
}

.program-head strong {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 720;
  text-transform: uppercase;
}

.project-detail-card.highlight {
  border-color: rgba(23, 67, 56, 0.28);
  background: #f9fbf8;
}

.project-title {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.project-facts.compact {
  grid-template-columns: 1fr;
}

.project-facts div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.project-facts strong {
  display: block;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 720;
}

.project-facts span {
  display: block;
  margin-top: 4px;
  color: #53605c;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 14px;
}

.tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 700;
}

.tab.active,
.tab[aria-selected="true"] {
  color: #fff;
  background: var(--evergreen);
  border-color: var(--evergreen);
}

.tab-panels {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
  padding: 20px;
}

.tab-panel.active {
  display: block;
}

.swift-code-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.swift-code-section h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 720;
}

.swift-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.swift-code-grid span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #52605b;
  background: #f9faf7;
  font-size: 0.78rem;
  line-height: 1.4;
}

.process-grid article span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--evergreen);
  font-size: 0.78rem;
  font-weight: 720;
}

.governance-section {
  background: #f9faf7;
}

.governance-copy {
  display: grid;
  gap: 12px;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item button {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  text-align: left;
  background: var(--surface);
}

.faq-item p {
  padding: 0 18px 18px;
}

.contact-section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto 42px;
}

.contact-email,
.contact-phone,
.contact-whatsapp {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.contact-email a,
.contact-phone a,
.contact-whatsapp a {
  color: var(--evergreen);
  font-weight: 700;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label,
.portal-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.92rem;
}

.contact-form textarea,
.portal-form textarea {
  min-height: 100px;
  padding-top: 10px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
  outline: 2px solid rgba(23, 67, 56, 0.14);
  border-color: var(--evergreen);
}

.file-upload small,
.form-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer {
  width: min(var(--max), calc(100% - 36px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  max-width: 460px;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer nav,
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  font-size: 0.82rem;
  font-weight: 620;
}

.footer a:hover {
  color: var(--evergreen);
}

@media (max-width: 980px) {
  .hero,
  .intro-section,
  .mandate-band,
  .institutional-banner,
  .funded-header,
  .governance-section,
  .contact-section,
  .evidence-panel,
  .country-readiness {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    padding-right: 0;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .source-ledger,
  .framework-grid,
  .mandate-grid,
  .process-grid,
  .project-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swift-code-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .nav,
  .hero,
  .metrics,
  .section,
  .contact-section,
  .footer {
    width: min(100% - 28px, var(--max));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    padding: 30px 0 26px;
  }

  .hero h1 {
    font-size: 1.72rem;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 0.96rem;
  }

  .metrics,
  .source-ledger,
  .framework-grid,
  .mandate-grid,
  .process-grid,
  .project-detail-grid,
  .evidence-grid,
  .swift-code-grid,
  .project-facts {
    grid-template-columns: 1fr;
  }

  .program-table {
    overflow-x: auto;
  }

  .program-row {
    min-width: 780px;
  }

  .section {
    padding: 32px 0;
  }

  .mandate-band,
  .institutional-banner,
  .funded-header,
  .governance-section,
  .contact-section,
  .evidence-panel {
    padding: 20px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer nav,
  .footer-legal-links {
    justify-content: flex-start;
  }
}
