/* veterantreatmentcourt.com — calm, high-contrast, mobile-first, static. No frameworks. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1b1f22;
  --ink-soft: #45505a;
  --border: #d8d4cb;
  --accent: #2f6f6b;
  --accent-ink: #ffffff;
  --crisis-bg: #7a2e22;
  --crisis-ink: #fff5f0;
  --disclaimer-bg: #eae6da;
  --disclaimer-ink: #3a362c;
  --radius: 10px;
  --max: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181a;
    --surface: #1c2124;
    --ink: #eef1f2;
    --ink-soft: #aab3b8;
    --border: #33393d;
    --accent: #5fb3ac;
    --accent-ink: #0a1413;
    --crisis-bg: #4a1c15;
    --crisis-ink: #ffe9e0;
    --disclaimer-bg: #24211a;
    --disclaimer-ink: #d9d3c2;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1.5px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.1rem; margin: 0 0 .2em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

/* banners */
.crisis-banner {
  background: var(--crisis-bg);
  color: var(--crisis-ink);
}
.crisis-banner p {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 20px;
  font-size: .95rem;
}
.crisis-banner a { color: var(--crisis-ink); text-decoration: underline; font-weight: 600; }

.disclaimer-banner {
  background: var(--disclaimer-bg);
  color: var(--disclaimer-ink);
  border-bottom: 1px solid var(--border);
}
.disclaimer-banner p {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 20px;
  font-size: .85rem;
}

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.site-header nav a { margin-left: 18px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover { color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); margin-top: 3em; padding: 24px 0 40px; color: var(--ink-soft); }
.byline { font-weight: 600; color: var(--ink); }
.fine-print { font-size: .85rem; }
.fine-print a { color: var(--ink-soft); }

main.wrap { padding-top: 28px; padding-bottom: 40px; }

/* home */
.hero { padding: 12px 0 20px; }
.search-form { margin: 20px 0; position: relative; }
.search-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.search-form input[type="search"] {
  width: 100%; font-size: 1.05rem; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.search-results {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-top: 4px; max-height: 320px; overflow-y: auto; display: none;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a:focus { background: var(--bg); }
.search-results .result-type { color: var(--ink-soft); font-size: .8rem; }
.hero-stats { color: var(--ink-soft); font-size: .9rem; }

.how-it-works-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 24px 0; }

/* photo slots (placeholder illustrations until CB picks a real photo source) */
.photo-slot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.photo-slot svg { display: block; width: 100%; height: auto; }
.photo-slot figcaption { padding: 10px 14px; font-size: .85rem; color: var(--ink-soft); background: var(--surface); }
.hero-photo { margin: 20px 0; }
.honor-section, .impact-section { margin: 32px 0; }
.impact-section .resource-list li p:first-child { font-size: 1.05rem; }
.honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.honor-grid .photo-slot { margin-bottom: 8px; }
.intro-with-photo { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) {
  .intro-with-photo { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

.state-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.state-grid li a {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--surface);
}
.state-grid li a:hover { border-color: var(--accent); }
.state-grid .count { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }

/* state / county pages */
.crumb { font-size: .9rem; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }
.state-resource-card, .national-links, .county-list, .programs, .local-resources,
.tips-section, .share-tip, .explainer-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 16px;
}
.state-resource-missing { border-style: dashed; }
.source-note { font-size: .82rem; color: var(--ink-soft); }
.program-card { padding: 14px 0; border-bottom: 1px solid var(--border); }
.program-card:last-child { border-bottom: none; }
.program-meta { color: var(--ink-soft); margin: 0 0 .3em; }

.resource-list { list-style: none; padding: 0; }
.resource-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.resource-list .publisher { color: var(--ink-soft); font-size: .85rem; }

/* forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
textarea, input[type="text"] {
  width: 100%; font: inherit; padding: 10px 12px;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.checkbox-field label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.checkbox-field input { margin-top: 4px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button[type="submit"], .btn {
  background: var(--accent); color: var(--accent-ink); border: none;
  font: inherit; font-weight: 600; padding: 12px 20px; border-radius: var(--radius);
  cursor: pointer;
}
button[type="submit"]:active { transform: translateY(1px); }
#tip-form-status { font-size: .9rem; color: var(--ink-soft); }
#tip-form-status.ok { color: var(--accent); font-weight: 600; }
#tip-form-status.err { color: var(--crisis-bg); font-weight: 600; }

.tip-card { border-bottom: 1px solid var(--border); padding: 10px 0; }
.tip-card .tip-actions { margin-top: 4px; }
.tip-card .report-btn { background: none; border: none; color: var(--ink-soft); font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 0; }
.tips-loading, .tips-empty { color: var(--ink-soft); font-size: .9rem; }
.tip-status-held { color: var(--crisis-bg); font-weight: 600; }

/* crisis full-screen overlay */
.crisis-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgb(0 0 0 / .6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.crisis-overlay[hidden] { display: none; }
.crisis-overlay-card {
  background: var(--surface); color: var(--ink); border-radius: var(--radius);
  max-width: 420px; width: 100%; padding: 28px 24px; text-align: center;
  box-shadow: 0 20px 60px rgb(0 0 0 / .4);
}
.crisis-overlay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.btn-secondary {
  background: none; border: 2px solid var(--border); color: var(--ink);
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: var(--radius); cursor: pointer;
}

/* admin */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 20px; }
.queue-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.queue-item .meta { color: var(--ink-soft); font-size: .85rem; margin-bottom: 8px; }
.queue-item .actions button { margin-right: 8px; }
.queue-item .actions .reject { background: var(--crisis-bg); }

@media (max-width: 600px) {
  .header-row { padding: 12px 16px; }
  main.wrap { padding-top: 20px; }
}
