/* Site pages (/about, /privacy, /terms, /partners, /network, /city/*, /briefing). Colours come only
   from the brand tokens in /brand.css (linked first by apps/site/layout.ts); the navy header and the
   Foundation footer are styled by apps/site/chrome.ts (CHROME_CSS, inlined in each page). */
:root {
  color-scheme: light;
  --gutter: 16px;
  --fg: var(--ph-navy);
  --bg: var(--ph-cream);
  --accent: var(--ph-teal);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ph-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}

h1,
h2 {
  line-height: 1.2;
  color: var(--ph-navy);
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

main a:focus-visible {
  outline: 3px solid var(--ph-navy);
  outline-offset: 2px;
  border-radius: 3px;
}

.draft-banner {
  max-width: 720px;
  margin: var(--gutter) auto 0;
  background: var(--ph-pale-blue-gray);
  color: var(--ph-navy);
  border-left: 5px solid var(--ph-teal);
  padding: 8px var(--gutter);
}

.crisis-numbers ul,
.org-list,
.legend {
  list-style: none;
  padding: 0;
}

.crisis-numbers li,
.org-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ph-line);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: var(--gutter);
}

.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend .dot-approx {
  border: 1px dashed var(--ph-navy);
}

.network-map {
  width: 100%;
  max-width: 600px;
  border: 1px solid var(--ph-line);
  background: var(--ph-white);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}


.pending-note,
.pending-activation {
  color: var(--ph-navy-muted);
  font-size: 14px;
}

.postal-address {
  font-family: monospace;
}

.nominate-form-section form {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
  max-width: 480px;
}

.nominate-form-section label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nominate-form-section .consent-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.nominate-form-section input,
.nominate-form-section select {
  font-size: 16px;
  padding: 10px;
  min-height: 44px;
  color: var(--ph-navy);
  background: var(--ph-white);
  border: 1px solid var(--ph-navy-muted);
  border-radius: 8px;
}

.nominate-form-section input:focus-visible,
.nominate-form-section select:focus-visible,
.nominate-form-section button:focus-visible {
  outline: 3px solid var(--ph-navy);
  outline-offset: 2px;
}

.nominate-form-section button {
  font: inherit;
  font-weight: 700;
  align-self: flex-start;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--ph-gold);
  background: var(--ph-gold);
  color: var(--ph-navy);
  cursor: pointer;
}

/* Honeypot: a real visitor never sees this field (and never needs to — nothing announces
   it to assistive tech either, aria-hidden on the wrapper). A bot that fills every field in
   the raw HTML trips it; a human filling out the visible form never does. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nominate-thanks {
  color: var(--ph-teal);
  font-weight: 700;
}

.nominate-error {
  color: var(--ph-navy);
  font-weight: 700;
  border-left: 5px solid var(--ph-gold);
  padding-left: 8px;
}

/* ---------------------------------------------------------------------------------------------
   /network, /es/network — services directory (operator 2026-11-25 redesign). Mobile-first; one
   accordion (<details>) per type of service; listings are cards, 2–3 columns on wide screens. */
.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;
}

main.network-page {
  max-width: 72rem;
}

.network-page h1 {
  margin: 8px 0 8px;
}

.network-intro {
  font-size: 1.125rem;
  margin: 0 0 16px;
  max-width: 44rem;
}

.network-page .crisis {
  background: var(--ph-white);
  border: 1px solid var(--ph-line);
  border-left: 5px solid var(--ph-gold);
  border-radius: 12px;
  padding: 12px var(--gutter);
  margin: 0 0 20px;
}

.network-page .crisis h2 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.network-page .crisis ul {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: grid;
  gap: 2px 2rem;
}

.network-page .crisis a {
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.network-page .crisis .dim {
  margin: 0;
  color: var(--ph-navy-muted);
}

.dir-controls {
  display: grid;
  gap: 12px;
  align-items: start;
  margin: 0 0 8px;
}

.dir-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-field label {
  font-weight: 700;
}

.dir-hint {
  color: var(--ph-navy-muted);
  font-size: 0.95rem;
}

.dir-controls input,
.dir-controls select {
  font: inherit;
  font-size: 17px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ph-navy);
  background: var(--ph-white);
  border: 2px solid var(--ph-navy-muted);
  border-radius: 10px;
}

.dir-clear {
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--ph-navy-muted);
  background: var(--ph-white);
  color: var(--ph-navy);
  cursor: pointer;
  justify-self: start;
}

.dir-clear[hidden] {
  display: none;
}

.dir-controls input:focus-visible,
.dir-controls select:focus-visible,
.dir-clear:focus-visible,
.svc-group > summary:focus-visible,
.map-panel > summary:focus-visible,
.svc-more > summary:focus-visible {
  outline: 3px solid var(--ph-navy);
  outline-offset: 2px;
}

.dir-status {
  font-weight: 600;
  margin: 8px 0 12px;
}

.no-matches {
  background: var(--ph-white);
  border: 1px solid var(--ph-line);
  border-left: 5px solid var(--ph-teal);
  border-radius: 10px;
  padding: 12px var(--gutter);
  font-weight: 600;
}

.svc-groups {
  display: grid;
  gap: 10px;
}

.svc-group,
.map-panel {
  background: var(--ph-white);
  border: 1px solid var(--ph-line);
  border-radius: 12px;
}

.svc-group > summary,
.map-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px var(--gutter);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ph-navy);
  border-radius: 12px;
  list-style: none;
}

.svc-group > summary::-webkit-details-marker,
.map-panel > summary::-webkit-details-marker {
  display: none;
}

.svc-group > summary::after,
.map-panel > summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ph-navy);
  color: var(--ph-white);
  font-size: 1.3rem;
  line-height: 1;
}

.svc-group[open] > summary::after,
.map-panel[open] > summary::after {
  content: "\2212";
}

.svc-group-title {
  flex: 1;
}

.svc-count {
  flex: none;
  min-width: 2.2em;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ph-pale-blue-gray);
  color: var(--ph-navy);
  font-size: 1rem;
  text-align: center;
}

.svc-group[open] > summary {
  border-bottom: 1px solid var(--ph-line);
  border-radius: 12px 12px 0 0;
}

.svc-group-body {
  padding: 4px var(--gutter) var(--gutter);
}

.svc-blurb {
  margin: 8px 0 12px;
  color: var(--ph-navy-muted);
}

.svc-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.svc-card {
  background: var(--ph-cream);
  border: 1px solid var(--ph-line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.svc-name {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.svc-name a {
  color: var(--ph-teal);
}

/* db/0016 multi-type: the kinds of help a place offers, one chip each. */
.svc-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.svc-chip {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ph-line);
  background: var(--ph-pale-blue-gray);
  color: var(--ph-navy);
  font-size: 0.9rem;
  line-height: 1.5;
}

.svc-chip-verified {
  border-color: var(--ph-teal);
}

.svc-chip-verified::before {
  content: "\2713\00a0";
  color: var(--ph-teal);
  font-weight: 700;
}

.svc-row {
  display: grid;
  gap: 0;
  overflow-wrap: anywhere;
}

.svc-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ph-navy-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.svc-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.svc-line {
  display: block;
}

.svc-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.svc-tel {
  font-size: 1.1rem;
}

.svc-more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ph-teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.confirm-notice,
.confirmed-note {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--ph-navy);
  background: var(--ph-white);
  border-left: 4px solid var(--ph-gold);
}

.confirmed-note {
  border-left-color: var(--ph-teal);
}

.map-panel {
  margin-top: 20px;
}

.map-panel > :not(summary) {
  margin-left: var(--gutter);
  margin-right: var(--gutter);
}

.map-note {
  color: var(--ph-navy-muted);
}

.network-map .map-bg {
  fill: var(--ph-white);
}

.map-dot.dot-verified,
.legend .dot-verified {
  fill: var(--ph-teal);
  background: var(--ph-teal);
}

.map-dot.dot-awaiting,
.legend .dot-awaiting {
  fill: var(--ph-gold);
  background: var(--ph-gold);
}

.map-dot.dot-unverified,
.legend .dot-unverified {
  fill: var(--ph-navy-muted);
  background: var(--ph-navy-muted);
}

.map-dot-approx {
  stroke: var(--ph-navy);
  stroke-width: 1;
}

@media (max-width: 639px) {
  .network-page h1 {
    font-size: 1.7rem;
  }
  .network-intro {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }
  .network-page .crisis {
    padding: 10px 12px;
    margin-bottom: 16px;
  }
  .network-page .crisis li {
    line-height: 1.35;
    margin: 2px 0;
  }
  .network-page .crisis .dim {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

@media (min-width: 640px) {
  .dir-controls {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  }
  .dir-clear {
    margin-top: calc(1.6em + 4px);
  }
  .network-page .crisis ul {
    grid-template-columns: 1fr 1fr;
  }
  .svc-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (min-width: 1024px) {
  .svc-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* /contribute — "For social workers & providers" (apps/site/pages/contribute.ts). Same field look as
   the partners form; fieldsets group the choices. */
.contribute-form-section form {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.contribute-form-section fieldset {
  border: 1px solid var(--ph-navy-muted);
  border-radius: 10px;
  padding: 12px var(--gutter) var(--gutter);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ph-white);
  min-width: 0;
}

.contribute-form-section legend {
  font-weight: 700;
  padding: 0 6px;
}

.contribute-form-section label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contribute-form-section .choice-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
}

.contribute-form-section .choice-row input {
  min-height: 0;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  padding: 0;
  flex: none;
  accent-color: var(--ph-teal);
}

.contribute-form-section .target-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contribute-form-section .target-detail {
  margin-left: 32px;
}

.contribute-form-section [hidden] {
  display: none;
}

.contribute-form-section input,
.contribute-form-section select,
.contribute-form-section textarea {
  font: inherit;
  font-size: 16px;
  padding: 10px;
  min-height: 44px;
  color: var(--ph-navy);
  background: var(--ph-white);
  border: 1px solid var(--ph-navy-muted);
  border-radius: 8px;
  max-width: 100%;
}

.contribute-form-section input:focus-visible,
.contribute-form-section select:focus-visible,
.contribute-form-section textarea:focus-visible,
.contribute-form-section button:focus-visible {
  outline: 3px solid var(--ph-navy);
  outline-offset: 2px;
}

.contribute-form-section button {
  font: inherit;
  font-weight: 700;
  align-self: flex-start;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 0;
  background: var(--ph-gold);
  color: var(--ph-navy);
  cursor: pointer;
}

.field-hint,
.field-optional {
  color: var(--ph-navy-muted);
  font-size: 14px;
  font-weight: 400;
}

.private-warning,
.contribute-example {
  background: var(--ph-white);
  border-left: 5px solid var(--ph-gold);
  padding: 10px var(--gutter);
  color: var(--ph-navy);
}

.private-warning {
  font-weight: 700;
}

.contribute-thanks {
  color: var(--ph-navy);
  border-left: 5px solid var(--ph-teal);
  padding-left: 12px;
}

.contribute-error {
  color: var(--ph-navy);
  font-weight: 700;
  border-left: 5px solid var(--ph-gold);
  padding-left: 8px;
}
