:root {
  --bg: #fbfcf8;
  --surface: #ffffff;
  --surface-soft: #f1f5ec;
  --surface-clay: #f7eee8;
  --ink: #17211d;
  --muted: #62706a;
  --line: #dce4d7;
  --line-strong: #c8d4c2;
  --moss: #315b4a;
  --moss-dark: #203f34;
  --sage: #e6eee2;
  --teal: #1f6f67;
  --clay: #c87055;
  --amber: #b88433;
  --shadow: 0 18px 46px rgba(31, 52, 43, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 248, 0.93);
  border-bottom: 1px solid rgba(220, 228, 215, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--moss);
  color: white;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--sage);
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--moss);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  background: var(--moss-dark);
  transform: translateY(-1px);
}

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

.button.secondary:hover {
  background: var(--surface-soft);
}

.button.clay {
  background: var(--clay);
}

.button.full {
  width: 100%;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

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

.section {
  padding: 84px 0;
}

.section.tight {
  padding: 56px 0;
}

.hero {
  padding: 52px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: 42px;
  align-items: center;
}

.hero-copy h1,
.page-title h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: 0;
}

.hero-copy p,
.page-title p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
  max-width: 620px;
}

.proof-item {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.proof-item strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.proof-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.floating-note {
  position: absolute;
  left: 22px;
  bottom: 22px;
  width: min(320px, calc(100% - 44px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(23, 33, 29, 0.16);
}

.floating-note strong {
  display: block;
  font-size: 14px;
}

.floating-note span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(31px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
}

.band {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clay-band {
  background: var(--surface-clay);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(31, 52, 43, 0.11);
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.project-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.meta-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.confidence {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #ecf4ef;
  color: var(--moss-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.confidence.low {
  background: #fff2dc;
  color: #765423;
}

.confidence.high,
.confidence.verified {
  background: #e2f4ed;
  color: #145342;
}

.project-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: #43524b;
  font-size: 12px;
  font-weight: 750;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.text-link {
  color: var(--moss);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nowrap {
  white-space: nowrap;
}

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

.step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--moss);
  color: white;
  font-weight: 850;
}

.step h3 {
  margin: 0 0 8px;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--moss);
  color: white;
}

.cta-panel h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.cta-panel p {
  max-width: 650px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.cta-panel .button.secondary {
  border-color: rgba(255, 255, 255, 0.5);
}

.page-hero {
  padding: 56px 0 38px;
}

.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 34px;
  align-items: end;
}

.page-summary {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.page-summary strong {
  display: block;
  margin-bottom: 8px;
}

.page-summary p {
  margin: 0;
  color: var(--muted);
}

.directory-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.filters h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label,
.check label {
  color: #33423b;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(49, 91, 74, 0.14);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: 4px 0;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--moss);
}

.directory-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.directory-meta p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-hero {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.detail-hero h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.detail-hero p {
  max-width: 760px;
  color: var(--muted);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.mini-stat {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.25;
}

.profile-section {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.profile-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.profile-section p {
  margin: 0;
  color: var(--muted);
}

.signal-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.signal-list li {
  padding: 12px 12px 12px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  position: relative;
}

.signal-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.side-panel,
.form-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.side-panel {
  position: sticky;
  top: 92px;
}

.side-panel h2,
.form-panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.side-panel p,
.form-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.success-box {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #b7d9c9;
  border-radius: 8px;
  background: #edf8f2;
  color: #1d533f;
  font-weight: 750;
}

.success-box.visible {
  display: block;
}

.intake-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.progress-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  position: sticky;
  top: 92px;
}

.progress-track {
  height: 8px;
  margin: 18px 0;
  border-radius: 999px;
  background: var(--sage);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 11%;
  background: var(--moss);
  transition: width 200ms ease;
}

.progress-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-list li {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-list li.active {
  color: var(--ink);
}

.intake-card {
  min-height: 540px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.intake-step {
  display: none;
}

.intake-step.active {
  display: block;
}

.intake-step h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.intake-step > p {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
}

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

.option {
  min-height: 74px;
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.option input {
  margin-top: 3px;
  accent-color: var(--moss);
}

.option strong {
  display: block;
}

.option span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.intake-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.match-list {
  display: grid;
  gap: 12px;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.match-row h3 {
  margin: 0 0 6px;
}

.match-row p {
  margin: 0;
  color: var(--muted);
}

.score {
  min-width: 72px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--moss);
  color: white;
  font-weight: 850;
}

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

.about-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.about-block h2 {
  margin: 0 0 10px;
}

.about-block p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 960px) {
  .nav {
    flex-wrap: wrap;
    min-height: 64px;
    padding: 10px 0;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links,
  .nav-actions {
    display: none;
    width: 100%;
  }

  .nav.open .nav-links,
  .nav.open .nav-actions {
    display: flex;
  }

  .nav.open .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open .nav-actions {
    align-items: stretch;
  }

  .hero-grid,
  .page-title,
  .directory-layout,
  .detail-layout,
  .intake-shell,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    aspect-ratio: 1.55;
  }

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

  .filters,
  .side-panel,
  .progress-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .container,
  .nav {
    width: min(100% - 24px, var(--max));
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 34px 0 52px;
  }

  .hero-copy h1,
  .page-title h1 {
    font-size: 44px;
  }

  .hero-proof,
  .project-grid,
  .steps-grid,
  .about-grid,
  .form-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .floating-note {
    position: static;
    width: auto;
    margin-top: 12px;
  }

  .section-heading,
  .directory-meta,
  .card-footer,
  .intake-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel,
  .detail-hero,
  .intake-card {
    padding: 22px;
  }
}
