:root {
  --ink: #16211d;
  --muted: #5b6862;
  --paper: #fbfbf7;
  --panel: #ffffff;
  --line: #d9e0dc;
  --blue: #1e5f77;
  --blue-dark: #123f51;
  --green: #42735d;
  --yellow: #f0c65a;
  --coral: #d86f57;
  --shadow: 0 18px 50px rgba(22, 33, 29, 0.12);
}

* {
  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;
}

a {
  color: inherit;
}

button,
textarea,
input {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
  isolation: isolate;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  z-index: -3;
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(12, 31, 34, 0.88) 0%, rgba(12, 31, 34, 0.68) 45%, rgba(12, 31, 34, 0.2) 100%),
    linear-gradient(0deg, rgba(12, 31, 34, 0.45), rgba(12, 31, 34, 0.08));
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 52px);
  color: white;
}

.topbar a {
  text-decoration: none;
  font-weight: 750;
  font-size: 0.94rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--yellow);
  color: #1b2620;
  font-weight: 900;
  text-shadow: none;
}

.hero__content {
  width: min(760px, calc(100% - 36px));
  margin: 0 0 clamp(44px, 8vh, 82px) clamp(18px, 6vw, 78px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--yellow);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  word-break: normal;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: normal;
}

.brand-word {
  display: inline-block;
  margin-right: 0.12em;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.brand-word:last-child {
  margin-right: 0;
}

.hero__copy {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero__actions,
.search-actions,
.resource-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button,
.quick-problems button,
.category-tabs button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 15px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 850;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover,
.quick-problems button:hover,
.category-tabs button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--yellow);
  color: #18231d;
}

.button--light {
  background: rgba(255, 255, 255, 0.92);
  color: #16211d;
}

.button--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

main {
  display: grid;
  gap: 58px;
  padding: 42px clamp(16px, 4vw, 54px) 54px;
}

.finder,
.urgent,
.resources,
.system-flow,
.sources {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.05;
}

.search-panel,
.results-shell,
.urgent-grid,
.resource-list,
.flow article,
.sources {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 8px;
}

.search-panel label {
  font-size: 1rem;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8faf8;
  color: var(--ink);
}

textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 198, 90, 0.8);
  outline-offset: 3px;
}

.quick-problems,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.quick-problems button,
.category-tabs button {
  background: #eef5f1;
  color: var(--ink);
  border-color: #d5e5dd;
}

.category-tabs button[aria-pressed="true"] {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.results-shell {
  margin-top: 18px;
  border-radius: 8px;
  padding: clamp(16px, 3vw, 24px);
}

.results-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.results-topline h3,
.results-topline p {
  margin: 0;
}

.results-topline p {
  color: var(--muted);
}

.results-grid,
.urgent-grid,
.resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.urgent-grid,
.resource-list {
  box-shadow: none;
  background: transparent;
  border: 0;
}

.resource-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.resource-card__head,
.resource-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.resource-card__category,
.resource-card__priority,
.resource-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.resource-card__category {
  background: #e9f3f6;
  color: var(--blue-dark);
}

.resource-card__priority {
  background: #fff2c8;
  color: #6d4a00;
}

.resource-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.18;
}

.resource-card__best {
  margin: 0;
  font-weight: 850;
}

.resource-card__details {
  margin: 0;
  color: var(--muted);
}

.resource-card__meta span {
  background: #f1f3f0;
  color: #34413b;
}

.resource-card__actions {
  align-self: end;
}

.resource-card__actions .button {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.92rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.flow article {
  border-radius: 8px;
  padding: 20px;
}

.flow span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.flow h3 {
  margin: 16px 0 6px;
}

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

.sources {
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--muted);
}

.sources p {
  margin: 0;
}

.sources a {
  color: var(--blue-dark);
  font-weight: 850;
}

@media (max-width: 760px) {
  .hero {
    min-height: 86vh;
  }

  .topbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .brand {
    flex-basis: 100%;
  }

  .hero__content {
    width: min(100% - 28px, 720px);
    margin-left: 14px;
    margin-bottom: 34px;
  }

  h1 {
    font-size: clamp(2.2rem, 9vw, 3.65rem);
    line-height: 0.96;
  }

  .results-topline {
    display: grid;
  }

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

@media (max-width: 430px) {
  .topbar a:not(.brand) {
    font-size: 0.86rem;
  }

  .button,
  .quick-problems button,
  .category-tabs button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 9.4vw, 2.75rem);
  }
}
