:root {
  color-scheme: light;
  --ink: #171a18;
  --ink-soft: #343a36;
  --muted: #5e6861;
  --paper: #fbfbf7;
  --surface: #ffffff;
  --surface-strong: #f2f6ee;
  --line: #d9dfd6;
  --line-strong: #b8c4b9;
  --green: #0b6b58;
  --green-dark: #084a3e;
  --mint: #dff4e7;
  --lime: #b8dd63;
  --coral: #d65c3f;
  --amber: #c98a1d;
  --violet: #6659c7;
  --shadow: 0 18px 55px rgba(23, 26, 24, 0.1);
  --radius: 8px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

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

ul {
  margin: 0;
  padding: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.page-shell {
  width: min(calc(100% - 32px), var(--shell));
  margin: 0 auto;
}

.section-band {
  border-bottom: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px max(16px, calc((100vw - var(--shell)) / 2));
  background: rgba(251, 251, 247, 0.9);
  border-bottom: 1px solid rgba(217, 223, 214, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  font-weight: 760;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 3px;
  width: 33px;
  height: 33px;
  align-items: end;
  justify-content: center;
  padding: 7px 5px;
  background: var(--ink);
  border-radius: 7px;
}

.brand-mark span {
  display: block;
  width: 8px;
  border-radius: 3px;
}

.brand-mark span:nth-child(1) {
  height: 11px;
  background: var(--lime);
}

.brand-mark span:nth-child(2) {
  height: 18px;
  background: var(--mint);
}

.brand-mark span:nth-child(3) {
  height: 14px;
  background: var(--coral);
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.site-nav .nav-cta {
  color: #fff;
  background: var(--green);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #fff;
  background: var(--green-dark);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  background: var(--ink);
  border-radius: 2px;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(11, 107, 88, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(11, 107, 88, 0.06) 1px, transparent 1px), var(--paper);
  background-size: 42px 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  min-height: 78svh;
  padding: clamp(64px, 8vw, 98px) 0 clamp(44px, 7vw, 76px);
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.85rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-subhead,
.section-heading p,
.section-copy > p {
  max-width: 700px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 760;
  white-space: normal;
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--green-dark);
  outline: none;
}

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

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--surface-strong);
  outline: none;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 660px;
  margin: 4px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.hero-metrics div {
  min-width: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.hero-metrics dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.4vw, 1.08rem);
  font-weight: 820;
}

.hero-visual {
  min-width: 0;
}

.grant-console {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
}

.console-topbar span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
  font-weight: 700;
}

.console-topbar strong {
  padding: 4px 9px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 999px;
  font-size: 0.76rem;
}

.grant-visual-main {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 28px);
}

.grant-summary {
  display: grid;
  gap: 18px;
}

.panel-label {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.grant-summary h2 {
  max-width: 100%;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

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

.status-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.status-grid span,
.grant-fields dt,
.hero-metrics dt {
  display: block;
}

.status-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 740;
}

.status-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.flow-rail {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
  text-transform: uppercase;
}

.flow-rail span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--mint);
  border: 1px solid #bfe6cc;
  border-radius: 999px;
}

.flow-rail i {
  height: 2px;
  background: var(--line-strong);
}

.audit-feed {
  display: grid;
  border-top: 1px solid var(--line);
}

.audit-feed div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.audit-feed div:last-child {
  border-bottom: 0;
}

.audit-feed p {
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.audit-feed strong {
  color: var(--ink);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.allow {
  background: var(--green);
}

.dot.hold {
  background: var(--amber);
}

.dot.deny {
  background: var(--coral);
}

.problem,
.trust,
.packages {
  background: var(--surface);
}

.controls,
.compare,
.final-cta {
  background: var(--paper);
}

.grant-studio-section,
.sources {
  background: var(--surface-strong);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 84px);
  padding: clamp(68px, 9vw, 118px) 0;
}

.section-copy {
  display: grid;
  gap: 28px;
}

.section-heading {
  display: grid;
  gap: 16px;
  max-width: 880px;
  padding: clamp(68px, 9vw, 112px) 0 34px;
}

.section-heading.compact {
  padding-bottom: 28px;
}

.problem-list,
.feature-grid,
.scenario-grid,
.source-grid {
  display: grid;
  gap: 12px;
}

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

.problem-list article,
.feature-grid article,
.scenario-grid article {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.problem-list article {
  background: var(--surface-strong);
}

.problem-list p,
.feature-grid p,
.scenario-grid p {
  margin-top: 10px;
  color: var(--muted);
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: clamp(68px, 9vw, 112px);
}

.feature-index {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 860;
}

.grant-studio {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: clamp(68px, 9vw, 112px);
}

.grant-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
}

.grant-tabs button {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink-soft);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.grant-tabs button:hover,
.grant-tabs button:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.grant-tabs button.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.grant-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 26px;
  min-width: 0;
  padding: clamp(22px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(23, 26, 24, 0.07);
}

.grant-card h3 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.grant-card p:not(.panel-label) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.04rem;
}

.grant-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.grant-fields div {
  min-width: 0;
  padding: 15px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.grant-fields dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.grant-fields dd {
  margin: 5px 0 0;
  font-weight: 790;
  overflow-wrap: anywhere;
}

.scenario-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: clamp(68px, 9vw, 112px);
}

.scenario-grid article:nth-child(2n) {
  background: var(--surface-strong);
}

.check-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--mint);
}

.compare-table {
  display: grid;
  overflow: hidden;
  margin-bottom: clamp(68px, 9vw, 112px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.compare-table div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.compare-table div:last-child {
  border-bottom: 0;
}

.compare-table span {
  min-width: 0;
  padding: 17px 18px;
  overflow-wrap: anywhere;
}

.compare-table span:first-child {
  border-right: 1px solid var(--line);
}

.compare-table div:first-child {
  color: #fff;
  background: var(--ink);
  font-weight: 820;
}

.compare-table div:not(:first-child) span:first-child {
  color: var(--muted);
}

.compare-table div:not(:first-child) span:last-child {
  font-weight: 760;
}

.package-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: clamp(68px, 9vw, 112px);
}

.package-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 730;
}

.source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: clamp(68px, 9vw, 112px);
}

.source-grid a {
  min-width: 0;
  padding: 18px;
  color: var(--green-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.source-grid a:hover,
.source-grid a:focus-visible {
  border-color: var(--green);
  outline: none;
}

.final-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
  padding: clamp(68px, 8vw, 104px) 0;
}

.final-cta h2 {
  margin-top: 12px;
  max-width: 720px;
}

.site-footer {
  background: var(--ink);
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: 28px 0;
}

.site-footer .brand {
  color: #fff;
}

.site-footer .brand-mark {
  background: #fff;
}

.footer-inner p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
  text-align: right;
}

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .grant-studio,
  .grant-card,
  .final-cta-inner {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .grant-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grant-tabs button {
    text-align: center;
  }

  .feature-grid,
  .scenario-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .problem-list {
    grid-template-columns: 1fr;
  }

  .final-cta-inner {
    align-items: start;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: 64px 12px auto 12px;
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: grid;
  }

  .site-nav a {
    justify-content: center;
  }

  .hero-grid {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.1rem);
  }

  .hero-metrics,
  .status-grid,
  .grant-fields,
  .feature-grid,
  .scenario-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .flow-rail {
    grid-template-columns: 1fr;
  }

  .flow-rail i {
    width: 2px;
    height: 18px;
    margin-left: 14px;
  }

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

  .compare-table div {
    grid-template-columns: 1fr;
  }

  .compare-table span:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .footer-inner p {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .page-shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .grant-tabs {
    grid-template-columns: 1fr;
  }

  .package-strip span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
