:root {
  --ink: #173f56;
  --ink-deep: #103447;
  --teal: #2e7782;
  --teal-soft: #dcecef;
  --cream: #f7f1e8;
  --paper: #fffdf9;
  --sand: #e7dbc9;
  --gold: #c98a2e;
  --gold-soft: #f8ead2;
  --danger: #b33b32;
  --danger-soft: #f8e5e1;
  --success: #416f55;
  --success-soft: #e2efe6;
  --muted: #63717a;
  --border: #d8cec0;
  --shadow: 0 10px 28px rgba(20, 54, 70, .08);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: #263239;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  font-size: 17px;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 46px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: white;
  color: var(--ink);
  padding: .8rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 820px); margin-inline: auto; }

.emergency-strip {
  background: var(--danger);
  color: white;
  font-weight: 750;
  font-size: .95rem;
}
.emergency-strip .container {
  display: flex;
  gap: .8rem 1.25rem;
  justify-content: center;
  align-items: center;
  padding: .52rem 0;
  flex-wrap: wrap;
  text-align: center;
}
.emergency-strip a { color: white; font-weight: 900; }

.site-header {
  background: rgba(255,253,249,.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 82px;
}
.brand {
  display: flex;
  gap: .7rem;
  align-items: center;
  text-decoration: none;
  color: var(--ink-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  line-height: 1.05;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  flex: 0 0 auto;
}
.brand small {
  display: block;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
  margin-top: .2rem;
  font-size: .72rem;
}
.site-nav { display: flex; gap: .25rem; align-items: center; }
.site-nav a {
  text-decoration: none;
  padding: .65rem .74rem;
  border-radius: 10px;
  font-weight: 720;
  color: var(--ink-deep);
  font-size: .93rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--teal-soft); }
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: 12px;
  padding: .55rem .8rem;
  color: var(--ink);
  font-weight: 800;
}

main { min-height: 60vh; }
.page-hero, .home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 8%, rgba(201,138,46,.15), transparent 30%),
    radial-gradient(circle at 10% 95%, rgba(46,119,130,.14), transparent 34%),
    var(--paper);
  border-bottom: 1px solid var(--border);
}
.home-hero .container { padding: clamp(3.8rem, 8vw, 7.2rem) 0; }
.page-hero .container { padding: 3.4rem 0 3rem; }
.eyebrow {
  color: var(--teal);
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 0 .7rem;
}
h1, h2, h3 {
  color: var(--ink-deep);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
  margin-top: 0;
}
h1 { font-size: clamp(2.45rem, 8vw, 5.8rem); max-width: 13ch; margin-bottom: 1.25rem; }
.page-hero h1 { font-size: clamp(2.25rem, 6vw, 4.2rem); max-width: 17ch; }
h2 { font-size: clamp(1.85rem, 4vw, 3rem); }
h3 { font-size: 1.34rem; }
.lede { font-size: clamp(1.08rem, 2vw, 1.35rem); max-width: 760px; color: #40515b; }
.hero-actions, .button-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.6rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 820;
  cursor: pointer;
}
.button:hover { color: white; background: var(--teal); border-color: var(--teal); }
.button.secondary { color: var(--ink); background: transparent; }
.button.secondary:hover { background: var(--teal-soft); color: var(--ink-deep); }
.button.ghost { color: var(--ink); border-color: var(--border); background: var(--paper); }
.button.danger { background: var(--danger); border-color: var(--danger); }
.button.small { min-height: 40px; padding: .52rem .75rem; font-size: .9rem; }

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}
.quick-fact {
  border: 1px solid var(--border);
  background: var(--cream);
  border-radius: 999px;
  padding: .38rem .72rem;
  font-weight: 750;
  color: var(--ink-deep);
  font-size: .9rem;
}
.section { padding: clamp(3.2rem, 7vw, 6rem) 0; }
.section.compact { padding: 2.6rem 0; }
.section.alt { background: var(--paper); border-block: 1px solid var(--border); }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-heading p { color: #53636c; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }

.door-card, .card, .resource-card, .listing-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.door-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-top: 6px solid var(--teal);
}
.door-card.need { border-color: var(--danger); }
.door-card.practical { border-color: var(--gold); }
.door-card.offer { border-color: var(--success); }
.door-card.resources { border-color: var(--teal); }
.door-card p { flex: 1; }
.card h3, .door-card h3, .resource-card h3, .listing-card h3 { margin-bottom: .6rem; }
.card p:last-child, .door-card p:last-child { margin-bottom: 0; }

.callout {
  border-left: 5px solid var(--gold);
  background: var(--gold-soft);
  padding: 1rem 1.1rem;
  border-radius: 0 14px 14px 0;
  margin: 1.25rem 0;
}
.callout.danger { border-color: var(--danger); background: var(--danger-soft); }
.callout.success { border-color: var(--success); background: var(--success-soft); }
.callout h2, .callout h3 { margin-bottom: .35rem; }
.notice {
  background: var(--ink-deep);
  color: white;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
}
.notice a, .notice h2, .notice h3 { color: white; }

.badges { display: flex; flex-wrap: wrap; gap: .38rem; margin: .7rem 0; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .58rem;
  background: var(--teal-soft);
  color: var(--ink-deep);
  font-weight: 800;
  font-size: .78rem;
}
.badge.need { background: var(--danger-soft); color: #7f251f; }
.badge.practical { background: var(--gold-soft); color: #784e14; }
.badge.offer { background: var(--success-soft); color: #29553c; }
.badge.official { background: #dce7f5; color: #20496f; }
.badge.community { background: #ece7df; color: #534d45; }

.filters {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .8rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 1.4rem;
}
.field { display: grid; gap: .35rem; }
.field label, fieldset legend { font-weight: 800; color: var(--ink-deep); }
input, select, textarea {
  width: 100%;
  border: 1px solid #b8aea0;
  border-radius: 10px;
  background: white;
  padding: .72rem .78rem;
  color: #263239;
}
textarea { min-height: 140px; resize: vertical; }
.help-text { color: var(--muted); font-size: .88rem; margin: 0; }
fieldset { border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.check-row { display: flex; align-items: flex-start; gap: .55rem; margin: .7rem 0; }
.check-row input { width: auto; margin-top: .3rem; }
.form-section { margin: 0 0 1.4rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.25rem; }

.resource-list, .board-list { display: grid; gap: 1rem; }
.resource-card, .listing-card { box-shadow: none; }
.resource-meta, .listing-meta {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .45rem 1rem;
  margin: .9rem 0;
  font-size: .92rem;
}
.meta-item strong { display: block; color: var(--ink-deep); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.card-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: 1rem; }
.result-count { color: var(--muted); font-weight: 700; margin: .75rem 0 1rem; }
.empty-state { text-align: center; padding: 2.5rem 1.2rem; border: 1px dashed #b8aea0; border-radius: 16px; background: var(--paper); }

.category-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.category-link {
  display: block;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  background: var(--paper);
  font-weight: 760;
}
.category-link:hover { background: var(--teal-soft); }

.guide-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.guide-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 900;
}

.step-list { counter-reset: steps; display: grid; gap: 1rem; }
.step {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: .8rem;
  align-items: start;
}
.step::before {
  content: counter(steps);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--ink-deep);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.tabs { display: flex; gap: .45rem; flex-wrap: wrap; margin: 1rem 0; }
.tabs button, .tabs a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55rem .85rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.tabs button[aria-selected="true"], .tabs a[aria-current="page"] { background: var(--ink); color: white; border-color: var(--ink); }

.status-message { margin: 1rem 0; padding: 1rem; border-radius: 12px; background: var(--teal-soft); color: var(--ink-deep); }
.status-message.error { background: var(--danger-soft); color: #7b2621; }
.status-message.success { background: var(--success-soft); color: #28523a; }
.hidden { display: none !important; }

.site-footer {
  background: var(--ink-deep);
  color: #ecf3f5;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}
.site-footer a { color: white; }
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-nav { display: grid; gap: .35rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-credit { margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.18); padding-top: 1.1rem; color: #c9d4d9; font-size: .9rem; }
.footer-credit a { font-weight: 900; text-decoration: none; }
.footer-credit a:hover { text-decoration: none; color: white; }

.prose { max-width: 820px; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.8rem; }
.prose li { margin-bottom: .38rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { border: 1px solid var(--border); padding: .7rem; text-align: left; vertical-align: top; }
th { background: var(--ink); color: white; }

@media (max-width: 980px) {
  .grid.four, .grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .container, .narrow { width: min(calc(100% - 1.2rem), var(--max)); }
  .header-inner { min-height: 70px; }
  .brand { font-size: .95rem; }
  .brand small { display: none; }
  .grid.two, .grid.three, .grid.four, .footer-grid, .filters, .resource-meta, .listing-meta, .category-links { grid-template-columns: 1fr; }
  .home-hero .container { padding: 3.2rem 0; }
  h1 { font-size: clamp(2.35rem, 16vw, 4.2rem); }
  .hero-actions .button, .button-row .button { width: 100%; }
  .guide-card { grid-template-columns: 1fr; }
  .resource-card, .listing-card, .door-card, .card { padding: 1rem; border-radius: 15px; }
  .filters { padding: .8rem; }
  .emergency-strip .container { gap: .25rem .7rem; }
}


/* v0.2.1: honest early-stage feedback notice */
.site-growth-notice {
  background: var(--gold-soft);
  border-bottom: 1px solid #dfc894;
}
.site-growth-notice .container { padding: 1rem 0; }
.site-growth-notice-inner {
  display: grid;
  gap: .45rem;
  justify-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.2rem;
  text-align: center;
  background: rgba(255,253,249,.72);
  border: 1px solid #dfc894;
  border-radius: 16px;
}
.site-growth-notice .eyebrow { margin-bottom: 0; color: #795018; }
.site-growth-notice h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 0; }
.site-growth-notice p { max-width: 800px; margin: 0; }
.site-growth-notice a { font-weight: 850; }

@media print {
  .emergency-strip, .site-header, .site-footer, .button, .filters, .tabs { display: none !important; }
  body { background: white; color: black; }
  .section { padding: 1rem 0; }
  .card, .resource-card, .listing-card { box-shadow: none; break-inside: avoid; }
}

/* v0.2: clearer pathways, recovery taxonomy, guided posting, and hope-forward hero */
.site-nav .button.nav-cta,
.site-nav .button.nav-cta:visited {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
  flex: 0 0 auto;
  padding-inline: 1rem;
}
.site-nav .button.nav-cta:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero-copy { min-width: 0; }
.hope-panel {
  background: rgba(255,253,249,.9);
  border: 1px solid var(--border);
  border-top: 6px solid var(--teal);
  border-radius: 24px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.hope-panel h2 { font-size: clamp(2rem, 4vw, 3.25rem); margin-bottom: .8rem; }
.hope-links { display: grid; gap: .55rem; margin: 1.35rem 0; }
.hope-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: .62rem 0;
  text-decoration: none;
  font-weight: 800;
}
.hope-links a::after { content: '→'; }
.hope-signoff { color: var(--teal); font-weight: 850; margin-bottom: 0; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}
.topic-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 118px;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 5px solid var(--teal);
  border-radius: 14px;
  color: var(--ink-deep);
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(20,54,70,.05);
}
.topic-card span { font-weight: 850; }
.topic-card small { color: var(--muted); line-height: 1.4; }
.topic-card:hover { background: var(--teal-soft); border-color: var(--teal); color: var(--ink-deep); }
.topic-card.compact { min-height: 94px; }
.home-topics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.badge.topic { background: var(--gold-soft); color: #704815; }
a.badge.topic { text-decoration: none; }

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.25rem;
}
.topic-chips a {
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: 999px;
  padding: .48rem .75rem;
  text-decoration: none;
  font-weight: 760;
  font-size: .9rem;
}
.topic-chips a:hover { background: var(--teal-soft); }

.resource-filters,
.board-filters { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.filter-search { grid-column: span 2; }

.post-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: start;
}
.guided-form .form-section { display: grid; gap: .9rem; }
.compact-fields { gap: .8rem; }
.post-aside { display: grid; gap: 1rem; }
.sticky-preview { position: sticky; top: 108px; }
.sticky-preview h3 { font-size: 1.45rem; }
.check-existing { margin-top: 0; }

.support-panel {
  margin-top: 2.5rem;
  padding: 1.4rem;
  background: var(--teal-soft);
  border: 1px solid #b9d7dc;
  border-radius: 18px;
}
.support-panel h2 { margin-bottom: .5rem; }
.footer-support {
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
}
.footer-support a { font-weight: 850; }

@media (max-width: 1180px) {
  .site-nav { gap: .05rem; }
  .site-nav a { padding-inline: .55rem; font-size: .88rem; }
  .brand { max-width: 310px; }
}

@media (max-width: 980px) {
  .home-hero-grid { grid-template-columns: 1fr; }
  .hope-panel { max-width: 720px; }
  .home-topics, .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-filters, .board-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-search { grid-column: span 2; }
  .post-layout { grid-template-columns: 1fr; }
  .sticky-preview { position: static; }
  .site-nav .button.nav-cta { width: 100%; }
}

@media (max-width: 700px) {
  .home-hero-grid { gap: 1.5rem; }
  .hope-panel { border-radius: 18px; padding: 1.2rem; }
  .home-topics, .topic-grid, .resource-filters, .board-filters { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .topic-card { min-height: 0; }
  .topic-chips { overflow: visible; }
}


/* v0.2.2: trust suite and public-data clarity */
.policy-meta {
  display: inline-block;
  margin-top: .8rem;
  color: var(--muted);
  font-weight: 750;
  font-size: .95rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.trust-card {
  display: block;
  padding: 1.25rem;
  color: var(--ink-deep);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 5px solid var(--teal);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.trust-card:hover,
.trust-card:focus-visible {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--ink-deep);
}
.trust-card h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.trust-card p { margin: 0; color: var(--muted); }
.prose > h2:first-child { margin-top: 0; }
.prose a { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .trust-grid { grid-template-columns: 1fr; }
}
