/* Around My Birmingham — shared styles
   Palette: forest green, warm gold, off-white. Headings in Fraunces (self-hosted). */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest: #14382b;
  --forest-deep: #0e2a20;
  --gold: #c39a3b;
  --gold-soft: #ecdfbd;
  --paper: #f7f5ee;
  --card: #ffffff;
  --ink: #1b211e;
  --muted: #4a554f;
  --line: #8f8a78;
  --hair: #d6d2c4;
  --warn-bg: #fff4d6;
  --warn-ink: #4a3600;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", "Segoe UI", sans-serif;
  --measure: 38rem;
  --wrap: 68rem;
  --gap: clamp(1rem, 3vw, 2rem);
  --block: clamp(2.75rem, 7vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 6.2vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }

p, ul, ol, dl { margin: 0 0 1em; }
p, li, dd { max-width: var(--measure); }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: 0.35em; }

a { color: var(--forest); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: #ffffff; }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem;
  background: var(--card); color: var(--forest);
  padding: 0.6rem 0.9rem; z-index: 10; font-weight: 600;
}
.skip:focus { top: 0.75rem; }

/* Preview notice */
.notice {
  background: var(--warn-bg); color: var(--warn-ink);
  border-bottom: 1px solid #b8962f;
  font-size: 0.95rem; padding: 0.55rem 0;
}
.notice p { margin: 0; max-width: none; }

/* Header */
.site-header { background: var(--forest); color: #fff; }
.site-header > .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 0.9rem;
}
.brand {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: #fff; text-decoration: none; letter-spacing: -0.01em;
}
.brand span { color: var(--gold-soft); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  color: #fff; text-decoration: none; display: inline-block;
  padding: 0.55rem 0; min-height: 44px; line-height: 1.9;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--gold-soft); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* Hero */
.hero { background: var(--forest); color: #fff; padding-block: var(--block); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 56rem) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 { color: #fff; }
.hero .service-name {
  font-family: var(--serif); font-size: 1.15rem; color: var(--gold-soft);
  margin-bottom: 0.9rem;
}
.hero .lede { font-size: 1.2rem; color: #eef2ee; max-width: 34rem; }
.hero .reassure { color: #dfe7e1; font-size: 0.98rem; margin: 0.9rem 0 0; }

.btn {
  display: inline-block; font: inherit; font-weight: 650;
  padding: 0.85rem 1.35rem; min-height: 48px;
  border-radius: 6px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.3;
}
.btn-gold { background: var(--gold-soft); color: var(--forest-deep); border-color: var(--gold-soft); }
.btn-gold:hover { background: #fff; border-color: #fff; }
.btn-forest { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn-forest:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.btn-line { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-line:hover { background: var(--forest); color: #fff; }

/* The matching slip: the one illustrative element */
.slip { margin: 0; }
.slip-card {
  background: var(--paper); color: var(--ink);
  border-radius: 10px; padding: 1.15rem 1.25rem;
  border-left: 6px solid var(--gold);
}
.slip-card + .slip-card { margin-top: 0.9rem; margin-left: clamp(1rem, 6vw, 2.5rem); border-left-color: var(--forest-deep); }
.slip-card p { margin: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; }
.slip-card p.slip-label { font-size: 1rem; font-family: var(--sans); font-weight: 650; margin: 0 0 0.3rem; color: var(--muted); }
.slip figcaption { color: #dfe7e1; font-size: 0.95rem; margin-bottom: 0.8rem; }
.slip-card :focus-visible { outline-color: var(--forest); }

/* Sections */
.section { padding-block: var(--block); }
.section-tint { background: #efece1; }
.section-dark { background: var(--forest-deep); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #e6ece7; }
.section > .wrap > .intro { font-size: 1.12rem; color: var(--muted); }

.categories { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .categories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .categories { grid-template-columns: repeat(4, 1fr); } }
.category {
  position: relative; margin: 0; max-width: none; background: var(--card);
  border: 1px solid var(--line); border-top: 4px solid var(--forest);
  border-radius: 8px; padding: 1.25rem;
}
.category:hover, .category:focus-within { border-top-color: var(--gold); }
.category h3 { margin-bottom: 0.4rem; }
.category h3 a { color: var(--forest); }
.category h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.category h3 a:focus-visible { outline: none; }
.category h3 a:focus-visible::after { outline: 3px solid var(--forest); outline-offset: 3px; }
.category p { margin: 0; font-size: 1rem; color: var(--muted); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; margin: 0; padding-top: 1rem; border-top: 3px solid var(--gold); max-width: none; }
.steps li::before {
  content: counter(step); font-family: var(--serif); font-size: 2.4rem;
  line-height: 1; color: var(--forest); display: block; margin-bottom: 0.5rem;
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--muted); }

.two-col { display: grid; gap: var(--gap) clamp(2rem, 6vw, 5rem); }
@media (min-width: 52rem) { .two-col { grid-template-columns: 1fr 1fr; } }

.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 0.9rem 0; border-top: 1px solid var(--line); max-width: 46rem; }
.plain-list li:last-child { border-bottom: 1px solid var(--line); }
.plain-list strong { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 560; }

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 6px solid var(--gold); border-radius: 8px;
  padding: 1.25rem 1.4rem;
}
.callout > :last-child { margin-bottom: 0; }

.small { font-size: 0.95rem; color: var(--muted); }

details {
  border-top: 1px solid var(--line); max-width: 46rem;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; padding: 1rem 0; min-height: 48px;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 560;
}
details > div { padding: 0 0 1rem; }
details > div > :last-child { margin-bottom: 0; }

.adviser-band .wrap { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 52rem) { .adviser-band .wrap { grid-template-columns: 1.4fr auto; } }
.adviser-band p { margin-bottom: 0; }

/* Plain content pages */
.page-head { background: var(--forest); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.3em; }
.page-head p { color: #e6ece7; font-size: 1.15rem; margin: 0; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.prose h2:first-child { margin-top: 0; }
.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0.05em 0.3em; border-radius: 3px; font-weight: 600; }

table { border-collapse: collapse; width: 100%; max-width: 46rem; margin: 0 0 1.25rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }

/* Footer */
.site-footer { background: var(--forest-deep); color: #dfe7e1; padding-block: 3rem 1.5rem; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 2rem; }
@media (min-width: 40rem) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 60rem) { .site-footer .wrap { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.site-footer .brand { font-size: 1.2rem; margin-bottom: 0.6rem; }
.site-footer h2 { font-family: var(--sans); font-size: 1rem; font-weight: 650; letter-spacing: 0; color: var(--gold-soft); margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-block; padding: 0.35rem 0; }
.site-footer p { margin-bottom: 0.6em; max-width: 30rem; }
.site-footer .footer-legal { display: block; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #2c4a3e; }
.site-footer .footer-legal p { max-width: none; margin: 0; font-size: 0.92rem; color: #c3cfc7; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .notice, .skip { display: none; }
  body { background: #fff; }
}

.mt { margin-top: 2rem; }

.section-tight { padding-block: 1.5rem; }
.back { display: inline-block; padding-block: 0.5rem; }
caption { text-align: left; font-weight: 650; padding-bottom: 0.5rem; }
th[scope="row"] { font-weight: 400; }
@media (max-width: 40rem) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; }
  table.stack tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  table.stack th, table.stack td { border: 0; padding: 0.2rem 0; }
  table.stack th[scope="row"] { font-weight: 650; }
  table.stack td::before { content: attr(data-label) ": "; font-weight: 650; }
}

/* Front page: split hero, lead band, support finder */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--forest-deep); }
.btn-small { padding: 0.5rem 0.9rem; min-height: 44px; font-size: 1rem; }
.hero-split { position: relative; overflow: hidden; }
.hero-panel { position: relative; }
@media (min-width: 56rem) {
  .hero-split::after {
    content: ""; position: absolute; inset: 0 0 0 58%;
    background: var(--forest-deep);
    border-left: 6px solid var(--gold);
    transform: skewX(-12deg); transform-origin: bottom left;
  }
  .hero-split .wrap { position: relative; z-index: 1; }
  .hero-panel { padding-left: 3rem; }
}
.section-lead { padding-bottom: 0; }
.section-lead h2 { border-left: 6px solid var(--gold); padding-left: 1rem; max-width: 30rem; }
.section-lead .lead-sub { font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; max-width: 40rem; padding-left: calc(1rem + 6px); margin: 0; }
.section-listing { padding-top: 2.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.search { max-width: 34rem; margin-bottom: 1.75rem; }
.search label { display: block; font-weight: 650; margin-bottom: 0.35rem; }
.search input {
  width: 100%; font: inherit; padding: 0.7rem 0.85rem; min-height: 48px;
  border: 2px solid var(--forest); border-radius: 6px; background: var(--card); color: var(--ink);
}
.listing { display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 52rem) { .listing { grid-template-columns: 15rem 1fr; align-items: start; } }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.2rem; }
.filters h3 { margin-bottom: 0.6rem; }
.filters fieldset { border: 0; border-top: 1px solid var(--hair); padding: 0.8rem 0 0.6rem; margin: 0; }
.filters legend { font-weight: 650; padding: 0; float: left; width: 100%; margin-bottom: 0.3rem; }
.filters label { display: flex; align-items: center; gap: 0.6rem; clear: both; min-height: 36px; cursor: pointer; }
.filters input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--forest); flex: none; }
.filters .btn { margin-top: 0.6rem; }

.count { font-weight: 650; margin-bottom: 0.9rem; }
.count:empty { display: none; }
.topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.topic {
  position: relative; margin: 0; max-width: none; background: var(--card);
  border: 1px solid var(--line); border-left: 6px solid var(--forest);
  border-radius: 8px; padding: 1.1rem 1.3rem 1.2rem;
}
.topic[hidden] { display: none; }
.topic:hover, .topic:focus-within { border-left-color: var(--gold); }
.topic-free { border-left-color: var(--gold); background: #fffdf6; }
.topic p { margin: 0 0 0.4rem; max-width: 44rem; }
.topic h3 { font-size: 1.35rem; margin: 0.35rem 0 0.2rem; }
.topic h3 a { color: var(--forest); }
.topic h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.topic h3 a:focus-visible { outline: none; }
.topic h3 a:focus-visible::after { outline: 3px solid var(--forest); outline-offset: 3px; }
.tag {
  display: inline-block; font-size: 0.9rem; font-weight: 650;
  background: #e3ebe5; color: var(--forest-deep); border-radius: 4px; padding: 0.1rem 0.5rem;
}
.tag-free { background: var(--gold-soft); color: #3d2f08; }
.topic .for { color: var(--muted); font-size: 0.98rem; }
.topic .funding { font-size: 0.95rem; font-weight: 650; color: var(--forest-deep); margin: 0.6rem 0 0; }
.none { font-weight: 650; }

/* Free public services sit first, three across on wide screens, so they lead without burying the rest. */
@media (min-width: 64rem) {
  .topics { grid-template-columns: repeat(3, 1fr); }
  .topics > .topic { grid-column: 1 / -1; }
  .topics > .topic-free { grid-column: auto; }
}

/* Forms */
.form-wrap { max-width: 44rem; }
.form h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 1.25rem; }
.form h2:focus-visible, .sent h2:focus-visible { outline: 3px solid var(--forest); outline-offset: 4px; }
.field { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.field > label:not(.choice), .field > legend { display: block; font-weight: 650; font-size: 1.1rem; padding: 0; margin-bottom: 0.3rem; }
.field.has-error { border-left: 5px solid #a3261b; padding-left: 1rem; }
.optional { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); margin: 0 0 0.5rem; }
.error { color: #a3261b; font-weight: 650; margin: 0 0 0.5rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
  display: block; width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 2px solid var(--ink); border-radius: 4px; padding: 0.6rem 0.7rem; min-height: 48px;
}
.form input.short { max-width: 8rem; text-transform: uppercase; }
.form input.medium { max-width: 16rem; }
.form [aria-invalid="true"] { border-color: #a3261b; }
.choice { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.45rem 0; min-height: 44px; cursor: pointer; }
.choice input { width: 1.5rem; height: 1.5rem; flex: none; margin: 0.1rem 0 0; accent-color: var(--forest); }
.consent { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1rem; }
.step-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.form button:disabled { opacity: 0.6; cursor: progress; }
.status { font-weight: 650; min-height: 1.6em; }
.error-summary { border: 4px solid #a3261b; border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 2rem; background: var(--card); }
.error-summary h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.error-summary ul { margin: 0; }
.error-summary a { color: #a3261b; font-weight: 650; }
.error-summary:focus { outline: 3px solid var(--forest); outline-offset: 3px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.test-note { border-left-color: #b8962f; background: var(--warn-bg); margin-bottom: 2rem; }
.sent { border-left-color: var(--forest); }
.sent:focus { outline: 3px solid var(--forest); outline-offset: 3px; }
.never { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }

.use-notice { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--forest); border-radius: 6px; padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.use-notice p:last-child { margin-bottom: 0; }

/* Front page */
.hero-home .wrap { align-items: center; }
.hero-home .reassure { margin-top: 1.1rem; }
.chooser { background: var(--paper); color: var(--ink); border-radius: 12px; padding: 1.4rem 1.5rem 0.9rem; border-top: 6px solid var(--gold); }
.chooser h2 { font-size: 1.3rem; margin-bottom: 0.4rem; color: var(--forest-deep); }
.chooser ul { list-style: none; margin: 0; padding: 0; }
.chooser li { margin: 0; border-top: 1px solid var(--hair); max-width: none; }
.chooser li:first-child { border-top: 0; }
.chooser a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; min-height: 48px; color: var(--forest); font-weight: 650; text-decoration: none;
}
.chooser a::after {
  content: ""; width: 0.55rem; height: 0.55rem; flex: none;
  border-right: 2px solid var(--forest); border-top: 2px solid var(--forest); transform: rotate(45deg);
}
.chooser a:hover { text-decoration: underline; }
.chooser :focus-visible { outline-color: var(--forest); }

.icon { width: 2rem; height: 2rem; flex: none; fill: none; stroke: var(--forest); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.strip { background: var(--card); border-bottom: 1px solid var(--hair); padding-block: 1.4rem; }
.strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem 2rem; }
@media (min-width: 52rem) { .strip ul { grid-template-columns: repeat(3, 1fr); } }
.strip li { display: flex; gap: 0.9rem; align-items: flex-start; margin: 0; max-width: none; }
.strip strong { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 560; }
.strip span { color: var(--muted); font-size: 0.98rem; }

.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head h2 { margin-bottom: 0.35em; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-foot { margin: 2rem 0 0; }

.tiles, .audiences, .cards-3, .cards-2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.tiles > li, .audiences > li, .cards-3 > li, .cards-2 > li { margin: 0; max-width: none; }
@media (min-width: 38rem) { .tiles { grid-template-columns: repeat(2, 1fr); } .cards-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 52rem) { .audiences, .cards-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.tile, .card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.4rem 1.35rem 1.5rem;
}
.tile { border-top: 4px solid var(--forest); }
.tile:hover, .tile:focus-within { border-top-color: var(--gold); }
.tile .icon { margin-bottom: 0.9rem; }
.tile h3, .card h3 { margin-bottom: 0.4rem; }
.tile h3 a, .card h3 a { color: var(--forest); }
.tile h3 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.tile h3 a:focus-visible, .card h3 a:focus-visible { outline: none; }
.tile h3 a:focus-visible::after, .card h3 a:focus-visible::after { outline: 3px solid var(--forest); outline-offset: 3px; }
.tile p, .card p { margin: 0; color: var(--muted); font-size: 1rem; }
.card .tag { margin-bottom: 0.7rem; color: #3d2f08; }
.card-free { border-left: 6px solid var(--gold); background: #fffdf6; }
.card .date { font-weight: 650; color: var(--forest-deep); margin-bottom: 0.35rem; }
.card > a { display: inline-block; margin-top: 0.9rem; font-weight: 650; }

.audiences > li { border-top: 3px solid var(--gold); padding-top: 1.1rem; }
.audiences h3 { margin-bottom: 0.4rem; }
.audiences p { color: var(--muted); margin-bottom: 0.7rem; }
.audiences a { font-weight: 650; display: inline-block; padding-block: 0.3rem; }

.section-listing-page { padding-top: var(--block); }
