:root {
  --bg: #f4efe6;
  --bg-card: #fffdf8;
  --ink: #1f1a14;
  --muted: #5c5348;
  --line: #d9d0c1;
  --accent: #1f4d3a;
  --accent-soft: #e4efe9;
  --warn: #7a3b10;
  --warn-bg: #f8ebd9;
  --escalate: #6b1f2a;
  --escalate-bg: #f7e8ea;
  --shadow: 0 10px 30px rgba(31, 26, 20, 0.08);
  --radius: 16px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 77, 58, 0.06), transparent 40%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 40%, #efe7da 100%);
  min-height: 100vh;
  line-height: 1.55;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(6px);
}
.brand {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.dialog-label {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}
.ask-panel h2,
.browse h2 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.35rem;
}
.category-headings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
}
.category-heading {
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.category-heading:hover,
.category-heading.active {
  background: var(--accent-soft);
  border-color: #9bb8aa;
  color: var(--accent);
}
.results .referral-title {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}
.site-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.subtitle {
  margin: 0.6rem 0 1rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
}
.banner-disclaimer {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--warn-bg);
  color: var(--warn);
  border-left: 4px solid #c47a35;
  border-radius: 8px;
  font-size: 0.92rem;
}

main { padding: 1.75rem 0 3rem; }

.ask-panel, .browse, .results .card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ask-panel { padding: 1.25rem 1.35rem 1.1rem; }
.ask-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.ask-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea:focus, button:focus-visible {
  outline: 3px solid rgba(31, 77, 58, 0.35);
  outline-offset: 2px;
}

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.7rem 1.15rem;
}
.btn.primary {
  background: var(--accent);
  color: #f7fff9;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn.ghost:hover { background: #f3eee5; }

/* session bar styles moved below */


.browse {
  margin-top: 1.25rem;
  padding: 1.15rem 1.35rem 1.25rem;
}
.browse h2 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.35rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover, .chip.active {
  background: var(--accent-soft);
  border-color: #9bb8aa;
  color: var(--accent);
}
.browse-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}
.browse-item {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.browse-item:hover { background: #f7f3eb; }
.browse-item .cat {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.results { margin-top: 1.25rem; display: grid; gap: 1rem; }
.card { padding: 1.25rem 1.35rem 1.35rem; }
.card h2, .card h3 {
  font-family: var(--serif);
  margin: 0 0 0.65rem;
  line-height: 1.2;
}
.card h2 { font-size: 1.45rem; }
.card h3 { font-size: 1.15rem; margin-top: 0.25rem; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.pill {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.alt { background: #efe8dc; color: var(--muted); }
.answer-text p { margin: 0 0 0.7rem; }
.what-to-do {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border-radius: 12px;
}
.what-to-do strong { display: block; margin-bottom: 0.25rem; }
.size-note {
  margin: 0.85rem 0;
  padding: 0.75rem 0.9rem;
  background: #f3eee5;
  border-radius: 12px;
  font-size: 0.95rem;
}
.sources { margin: 1rem 0 0; padding: 0; list-style: none; }
.sources li { margin: 0.35rem 0; }
.sources a { color: var(--accent); font-weight: 600; word-break: break-word; }
.disclaimer-box {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}
.alts { display: grid; gap: 0.55rem; }
.alt-btn {
  text-align: left;
  border: 1px dashed var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  cursor: pointer;
}
.alt-btn:hover { background: #f7f3eb; border-style: solid; }
.alt-btn .cat {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.escalate-card {
  background: var(--escalate-bg);
  border-color: #e0bcc2;
}
.escalate-card h2 { color: var(--escalate); }
.escalate-card .pill { background: #f0d4d8; color: var(--escalate); }

.empty-state {
  padding: 1.2rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 26, 20, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(440px, 100%);
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.modal-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
}
.hc-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 1rem 0;
}
.hc-buttons button {
  font: inherit;
  font-weight: 700;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.hc-buttons button:hover {
  background: var(--accent-soft);
  border-color: #9bb8aa;
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255, 253, 248, 0.65);
}
.site-footer p { margin: 0.35rem 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 720px) {
  .ask-row { grid-template-columns: 1fr; }
  .btn.primary { width: 100%; }
  .site-header { padding-top: 1.6rem; }
}

@media (max-width: 390px) {
  .wrap { width: calc(100% - 1.25rem); }
  .card, .ask-panel, .browse { padding-left: 1rem; padding-right: 1rem; }
}

/* Session bar: state, city, headcount */
.session-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.95rem;
}
.session-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}
.session-label { color: var(--muted); font-size: 0.85rem; }
.session-value,
.headcount-display {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn.compact {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}
.browse-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-label {
  display: block;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}
.modal-card.wide { width: min(520px, 100%); }
.modal-card input[type="search"],
.modal-card input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.state-list {
  margin: 0.75rem 0 1rem;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.state-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0ebe2;
  background: transparent;
  padding: 0.7rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.state-option:last-child { border-bottom: 0; }
.state-option:hover,
.state-option:focus {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}
.state-option .abbr {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.35rem;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.not-covered-card {
  border-color: #d4c4a8;
  background: #fffaf0;
}
.saved-question {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
}

/* Quiet referral card under the answer — beat .results .card specificity */
.results .card.referral-card {
  margin-top: 0;
  background: #faf6ef;
  border: 1px dashed var(--line);
  box-shadow: none;
}
.results .card.referral-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.results .referral-copy {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.results .referral-link-wrap { margin: 0; }
.results .referral-link {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.results .referral-link:hover { filter: brightness(0.92); }

/* STATE_PICKER_V1 (2026-10-09c): state picker up front, before the ask box */
.state-panel {
  background: var(--accent-soft);
  border: 1px solid #b9d3c6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.35rem 1rem;
  margin-bottom: 1.25rem;
}
.state-panel-label {
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}
.state-panel-lead { margin: 0; color: var(--ink); font-size: 0.97rem; }
.session-bar.state-first {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #b9d3c6;
}
.session-bar.state-first .session-item:first-child .session-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}
.session-bar.state-first .session-item:first-child .session-value { font-size: 1.05rem; }
.session-bar.state-first .session-value { background: var(--bg-card); }
.ask-status {
  margin: -0.35rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.ask-status.not-covered,
.browse-note.not-covered,
.browse-msg.not-covered {
  color: var(--warn);
  background: var(--warn-bg);
  border-left: 3px solid #d4a373;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
.browse-msg { margin: 0 0 0.6rem; color: var(--muted); }
