/* Community Board (/community/): tabs, cards, lost-pet map, forms. */
.nb-hero { padding-bottom: 0.4rem; }
.nb-lede { max-width: 46rem; margin: 0.4rem 0 1.1rem; font-size: 1.05rem; line-height: 1.55; color: var(--muted); }
.nb-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem;
  margin: 0; padding: 0.35rem; background: var(--paper); border: 1px solid var(--card-border); border-radius: 999px;
}
.nb-tab {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.4rem 0.6rem;
  border-radius: 999px; text-align: center; text-decoration: none; color: var(--navy);
  font: 700 0.95rem/1.2 var(--font-ui); white-space: nowrap;
}
.nb-tab:hover { background: var(--cream); color: var(--navy); }
.nb-tab[aria-selected="true"] { background: var(--navy); color: #FFFCF7; }
.nb-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nb-panels { padding-top: 1.4rem; }
.nb-panel { margin: 0 0 2.4rem; }
.nb-panel[hidden] { display: none; }
html:not(.nb-js) .nb-panel { scroll-margin-top: calc(var(--header-h) + 1rem); }
.nb-panel__title { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 1.95rem); color: var(--navy); }
.nb-count:empty { display: none; }
.nb-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8rem; height: 1.8rem; padding: 0 0.45rem; border-radius: 999px; background: var(--gold); color: var(--navy); font: 700 0.85rem/1 var(--font-ui); }
.nb-empty { margin: 0 0 1.2rem; padding: 1.1rem 1.2rem; border: 1.5px dashed var(--card-border); border-radius: var(--radius); background: var(--paper); color: var(--muted); font-size: 1rem; line-height: 1.5; }
.nb-empty[hidden] { display: none; }

/* Cards: two even columns on desktop, one on phones. */
.nb-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.2rem; }
.nb-list:empty { display: none; }
.nb-pets__list .nb-list { grid-template-columns: minmax(0, 1fr); }
.nb-card { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 22px rgba(11, 61, 92, 0.06); }
.nb-card[hidden] { display: none; }
.nb-card--hl { box-shadow: 0 0 0 3px var(--gold); }
.nb-card--pet { flex-direction: row; }
.nb-card__photo { display: block; flex: none; background: var(--cream); }
.nb-card--pet .nb-card__photo { width: 38%; }
.nb-card__photo img { display: block; width: 100%; height: 100%; max-height: 260px; object-fit: cover; }
.nb-card__body { display: flex; flex-direction: column; gap: 0.45rem; padding: 1rem 1.1rem 1.05rem; min-width: 0; flex: 1 1 auto; }
.nb-card__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.nb-chip { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--cream); color: var(--navy); font: 700 0.76rem/1.3 var(--font-ui); }
.nb-chip--lost { background: #F6D9CF; color: #7A2A12; }
.nb-chip--found { background: #D7ECE4; color: #0A5A51; }
.nb-chip--reunited { background: var(--gold); color: var(--navy); }
.nb-chip--city { background: #E3ECF1; }
.nb-card__title { margin: 0; font-family: var(--font-display); font-size: 1.22rem; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
.nb-card__meta { margin: 0; font: 600 0.85rem/1.4 var(--font-ui); color: var(--muted); }
.nb-card__msg { margin: 0; font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.nb-card__from { margin: 0; font-style: italic; color: var(--muted); }
.nb-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-top: auto; padding-top: 0.3rem; }
.nb-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 1rem; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--paper); color: var(--navy); font: 700 0.9rem/1.2 var(--font-ui); text-decoration: none; cursor: pointer; }
.nb-btn:hover { background: var(--navy); color: #FFFCF7; }
.nb-btn--call { background: var(--navy); color: #FFFCF7; }
.nb-report { margin: 0 0 0 auto; }
.nb-report__btn { min-height: 44px; padding: 0 0.3rem; border: 0; background: none; color: var(--muted); font: 600 0.82rem/1 var(--font-ui); text-decoration: underline; cursor: pointer; }

/* Lost & Found: map beside the list, equal columns. */
.nb-pets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; margin-bottom: 1.2rem; }
.nb-map-wrap { position: sticky; top: calc(var(--header-h) + 1rem); min-width: 0; }
.nb-map { width: 100%; height: 440px; border-radius: var(--radius); border: 1.5px solid var(--card-border); background: var(--cream); overflow: hidden; z-index: 0; }
.nb-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 1.3rem; color: var(--navy); }
.nb-map .leaflet-control-attribution a, .nb-map-note a { color: var(--navy); }
.nb-map-note { margin: 0.5rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.nb-pin { background: none; border: 0; }
.nb-pin__dot { display: block; width: 26px; height: 26px; margin: 2px; border: 3px solid #fff; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); background: #B4531A; }
.nb-pin--found .nb-pin__dot { background: #0E7468; }
.nb-filter { display: flex; gap: 0.4rem; margin: 0 0 0.8rem; }
.nb-filter__btn { min-height: 40px; padding: 0.3rem 1rem; border: 1.5px solid var(--card-border); border-radius: 999px; background: var(--paper); color: var(--navy); font: 700 0.88rem/1 var(--font-ui); cursor: pointer; }
.nb-filter__btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFCF7; }

/* Forms: one tidy collapsible per board. */
.nb-form-wrap { border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 22px rgba(11, 61, 92, 0.05); }
.nb-form-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0.6rem 1.2rem; cursor: pointer; list-style: none; font: 700 1.05rem/1.2 var(--font-ui); color: var(--navy); }
.nb-form-toggle::-webkit-details-marker { display: none; }
.nb-form-toggle::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--gold-text, #8a6d10); }
.nb-form-wrap[open] > .nb-form-toggle::after { content: "–"; }
.nb-form { display: grid; gap: 0.85rem; padding: 0 1.2rem 1.3rem; }
.nb-form__intro { margin: 0; color: var(--muted); line-height: 1.5; }
.nb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.nb-form .field, .nb-relay .field { display: grid; gap: 0.3rem; min-width: 0; margin: 0; }
.nb-form label, .nb-relay label, .nb-seg legend { font: 600 0.92rem/1.3 var(--font-ui); color: var(--navy); }
.nb-relay label { display: grid; gap: 0.3rem; }
.nb-form input:not([type="radio"]):not([type="file"]), .nb-form select, .nb-form textarea,
.nb-relay input, .nb-relay textarea {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--card-border); border-radius: 10px; background: #fff; color: var(--ink, #1c1c1c); font: inherit; font-size: 16px;
}
.nb-form textarea, .nb-relay textarea { min-height: 6rem; resize: vertical; }
.nb-form input:focus-visible, .nb-form select:focus-visible, .nb-form textarea:focus-visible,
.nb-relay input:focus-visible, .nb-relay textarea:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.45); }
.nb-form input[type="file"] { font-size: 0.95rem; }
.nb-opt { font-weight: 500; color: var(--muted); }
.nb-hint { margin: 0; font-size: 0.82rem; color: var(--muted); }
.nb-seg { display: flex; gap: 0.6rem; margin: 0; padding: 0; border: 0; }
.nb-seg legend { margin-bottom: 0.35rem; padding: 0; }
.nb-seg label { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 1rem; border: 1.5px solid var(--card-border); border-radius: 999px; background: #fff; cursor: pointer; }
.nb-seg label:has(input:checked) { border-color: var(--navy); background: var(--cream); }
.nb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.nb-form__error { margin: 0; padding: 0.6rem 0.8rem; border-radius: 10px; background: #FBE3DC; color: #7A2A12; font-weight: 600; }
.nb-form__error[hidden], [data-nb-phone][hidden] { display: none; }
.nb-submit { justify-self: start; min-height: 48px; }
.nb-relay { display: grid; gap: 0.6rem; margin-top: 0.4rem; padding: 0.9rem; border-radius: 12px; background: var(--cream); }
.nb-relay__note, .nb-relay__done { margin: 0; font-size: 0.9rem; color: var(--muted); }
.nb-thanks { margin: 1rem 0 0; padding: 1.1rem 1.2rem; border: 2px solid var(--gold); border-radius: var(--radius); background: var(--paper); }
.nb-thanks[hidden] { display: none; }
.nb-thanks__label { margin: 0 0 0.3rem; font: 700 0.8rem/1 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-text, #8a6d10); }
.nb-thanks a { overflow-wrap: anywhere; }

/* Link to the Photo Gallery under the lede (reader photos live on /photos/). */
.nb-photos-link { margin: 0 0 0.15rem; font: 600 0.88rem/1.35 var(--font-ui); }
.nb-photos-link a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px;
}
.nb-photos-link a:hover { color: var(--navy-deep, var(--navy)); }

@media (max-width: 860px) {
  .nb-pets { grid-template-columns: minmax(0, 1fr); }
  .nb-map-wrap { position: static; }
  .nb-map { height: 320px; }
}
@media (max-width: 720px) {
  .nb-tabs { border-radius: 18px; }
  .nb-list, .nb-row { grid-template-columns: minmax(0, 1fr); }
  .nb-card--pet { flex-direction: column; }
  .nb-card--pet .nb-card__photo { width: 100%; }
}
@media (max-width: 380px) {
  .nb-tab { font-size: 0.86rem; padding: 0.4rem 0.3rem; white-space: normal; }
}
/* Link to /correspondents/ (GB-60) under the lede */
.nb-corr { margin: 0.35rem 0 0.6rem; font: 600 0.88rem/1.35 var(--font-ui); }
.nb-corr a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; min-height: 44px; color: var(--navy); }
.nb-corr strong { color: var(--navy-deep); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
