:root {
  --ink: #1c2530;
  --muted: #5b6673;
  --bg: #f5f6f8;
  --card: #fff;
  --line: #dde1e6;
  --brand: #1f3a4d;
  --accent: #a8650a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { background: var(--brand); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.logo { color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.logo span { color: #f0b34a; }
.site-header nav a { color: #dbe4ea; text-decoration: none; padding: 12px 0 12px 16px; }

main { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); line-height: 1.2; margin: 8px 0 8px; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 32px 0 12px; }
h3 { font-size: 1rem; margin: 20px 0 4px; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 16px; }
.meta { color: var(--muted); margin: 0 0 8px; }

.hero { padding: 16px 0 8px; }
.search input {
  width: 100%; max-width: 560px; font: inherit; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.search input:focus { outline: none; border-color: var(--brand); }
.results { list-style: none; margin: 6px 0 0; padding: 0; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results li { border-top: 1px solid var(--line); padding: 12px 16px; }
.results li:first-child { border-top: 0; }
.results a { display: block; margin: -12px -16px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.results a:hover { background: var(--bg); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card {
  display: block; height: 100%; padding: 14px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink);
}
.card:hover { border-color: var(--brand); }
.card strong { display: block; color: var(--brand); }
.card span { color: var(--muted); font-size: .9rem; }

.crumbs { font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.topic-nav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .92rem; }
.topic-nav a[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Jail section menu: collapsed button on phones, sidebar on wide screens. */
.jail-layout { margin-top: 12px; }
.jail-main { min-width: 0; }
.jail-nav { margin-bottom: 16px; }
.jail-nav-toggle {
  display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 16px;
  font: inherit; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.jail-nav.js .jail-nav-body { display: none; }
.jail-nav.js.open .jail-nav-body { display: block; }
.jail-nav-body { padding: 4px 16px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.jail-nav-title { margin: 14px 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jail-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 12px; }
.jail-nav li { break-inside: avoid; }
.jail-nav li a { display: block; padding: 9px 10px; margin: 0 -10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.jail-nav li a:hover { background: var(--bg); }
.jail-nav li a[aria-current] { background: var(--brand); color: #fff; font-weight: 600; }
.jail-nav-share { display: block; text-align: center; margin-top: 16px; }
@media (min-width: 860px) {
  .jail-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
  .jail-nav { position: sticky; top: 16px; margin-bottom: 0; max-height: calc(100vh - 32px); overflow-y: auto; }
  .jail-nav-toggle { display: none; }
  .jail-nav.js .jail-nav-body { display: block; margin-top: 0; }
  .jail-nav ul { columns: 1; }
  .jail-nav li a { padding: 6px 10px; }
}

.question { max-width: 72ch; }
.answer {
  margin: 0 0 10px; padding: 14px 16px; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px;
}
.answer p { margin: 0 0 6px; overflow-wrap: anywhere; }
.answer footer { color: var(--muted); font-size: .88rem; }
details summary {
  cursor: pointer; padding: 12px 16px; margin-bottom: 10px; border: 1px dashed var(--line);
  border-radius: 8px; color: var(--accent); font-weight: 600;
}
.prose { max-width: 72ch; overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 20px 0 32px; }
.site-footer p { margin: 0 0 6px; }

.usmap { display: block; width: 100%; height: auto; max-width: 860px; margin: 0 auto 16px; }
.usmap path { fill: #fff; stroke: var(--brand); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.usmap a path { cursor: pointer; transition: fill .12s; }
.usmap a:hover path, .usmap a:focus path { fill: #f0b34a; }
.usmap a:focus { outline: none; }
.usmap path.empty { fill: #e9ecef; stroke: #9aa4ae; }
.state-list { list-style: none; margin: 0; padding: 0; columns: 150px; column-gap: 16px; }
.state-list li { padding: 5px 0; break-inside: avoid; }
.state-list a { text-decoration: none; }
.state-list span { color: var(--muted); font-size: .85rem; }

.map { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0 16px; }
.button { display: inline-block; padding: 12px 18px; background: var(--brand); color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; }

.notes { color: var(--muted); padding-left: 20px; max-width: 72ch; }
.errors { max-width: 72ch; padding: 12px 16px; margin: 16px 0; background: #fdecec; border: 1px solid #e3a5a5; border-radius: 8px; color: #7a1c1c; }
.errors p { margin: 4px 0; }
.share { max-width: 72ch; }
.share label { display: block; font-weight: 600; margin: 18px 0 6px; }
.share label span, .share summary span { font-weight: 400; color: var(--muted); font-size: .9rem; }
.share input[type=text], .share input[type=email], .share input[type=password], .share textarea {
  width: 100%; font: inherit; padding: 12px; border: 1px solid #b9c0c8; border-radius: 8px; background: #fff;
}
.share textarea { resize: vertical; }
.share input:focus, .share textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.share details { margin-top: 14px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.share details summary { margin: 0 -14px; border: 0; color: var(--brand); }
.share details[open] { padding-bottom: 14px; }
.share details summary { margin-bottom: 0; }
.share .cf-turnstile { margin: 20px 0 12px; min-height: 65px; }
.share .hp { position: absolute; left: -9999px; }
.share .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
button.button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.button.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.button.danger { background: #a32222; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.cta { margin: 28px 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; max-width: 72ch; }
.cta p { margin: 0 0 12px; }

.notice { max-width: 72ch; padding: 12px 16px; margin: 16px 0; background: #e9f5ec; border: 1px solid #a9d3b3; border-radius: 8px; color: #1d4d2b; }
.notice p { margin: 0; }
.thread { max-width: 72ch; margin: 0 0 18px; padding: 14px 16px 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.comment p { margin: 0 0 6px; overflow-wrap: anywhere; }
.comment footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.comment footer .linkish { color: var(--muted); font-size: .8rem; }
.comment.reply { margin-left: 14px; padding-left: 14px; border-left: 3px solid var(--line); }
.thread-reply { margin: 0 0 6px; font-size: .92rem; }
.pager { display: flex; justify-content: space-between; align-items: center; max-width: 72ch; margin: 20px 0; color: var(--muted); }
