/* Rescue Listings: layout for the content pages (guides, rescue directory, about, how it works, FAQ).
   Loaded after shell.css. The look comes from the shared classes in shell.css (rl-card, rl-btn,
   rl-notice, rl-chip, rl-tag, rl-table, rl-steps, rl-kicker, rl-lead), which copy the original
   home page and single-page app. This file arranges them and adds the pieces shell.css does not
   have (breadcrumb, search panel, entry list), each styled from the nearest original component. */

/* Nothing on these pages may push the page sideways on a phone. */
main { min-width: 0; }
main :where(p, li, h1, h2, h3, h4, a, span, strong, dd, dt, small) { overflow-wrap: anywhere; }
main :where(svg, img) { max-width: 100%; height: auto; }
main .rl-hero__poster { height: 100%; max-width: none; }
main .rl-hero__action svg { height: 17px; }

/* Breadcrumb: the original's .breadcrumb */

.rl-crumbs { margin-bottom: 30px; font-size: .78rem; line-height: 1.5; }
.rl-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; list-style: none; margin: 0; padding: 0; }
.rl-crumbs li { display: inline-flex; align-items: center; gap: 12px; min-width: 0; margin: 0; }
.rl-crumbs li + li { margin-top: 0; }
.rl-crumbs li + li::before { content: '/'; }
.rl-crumbs a { display: inline-flex; align-items: center; min-height: 32px; line-height: normal; }
.rl-prose .rl-crumbs ol { padding-left: 0; margin-bottom: 0; }
@media (max-width: 700px) {
  .rl-crumbs { margin-bottom: 23px; font-size: .72rem; }
}

/* Article header (the page top itself is the rl-hero band in shell.css) */

.rl-article-head { margin-bottom: 26px; }
.rl-article-head .rl-kicker { margin-bottom: 12px; }
.rl-prose .rl-article-head h1 { margin-bottom: 22px; }
.rl-article-head .rl-lead { max-width: none; margin-bottom: 12px; }
.rl-meta { font-size: .74rem; line-height: 1.6; color: var(--muted); margin-bottom: 0; }
.rl-art { display: block; width: 100%; margin: 0 0 26px; border-radius: 9px; }

/* Prose headings: the home page's light heading (weight 500), with room above */
.rl-prose h2 { margin: 52px 0 18px; font-size: clamp(1.9rem, 2.6vw, 2.35rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.12; }
.rl-prose h3 { margin: 30px 0 10px; font-size: 1.3rem; font-weight: 500; letter-spacing: -.025em; line-height: 1.25; }
.rl-prose > .rl-crumbs + h2,
.rl-prose > .rl-crumbs + .rl-eyebrow + h2 { margin-top: 8px; }
.rl-prose .rl-eyebrow { margin: 52px 0 12px; }
.rl-prose .rl-eyebrow + h2 { margin-top: 0; }
@media (max-width: 700px) {
  .rl-prose h2 { margin-top: 40px; font-size: 1.9rem; }
  .rl-prose .rl-eyebrow { margin-top: 40px; }
}

/* Shared pieces placed inside prose: spacing only */

/* Key points: the home page's warm support band (.home-support) as a block */
.rl-keypoints { margin: 0 0 30px; padding: 32px; background: #f5f1e8; border: 0; border-radius: 9px; }
.rl-prose .rl-keypoints h2 { margin: 0 0 18px; font-size: 2rem; }
.rl-prose .rl-keypoints ul { list-style: none; padding-left: 0; border-top: 1px solid #d6dbce; }
.rl-prose .rl-keypoints li { position: relative; margin: 0; padding: 12px 0 12px 22px; border-bottom: 1px solid #d6dbce; line-height: 1.65; }
.rl-prose .rl-keypoints li::before { content: ''; position: absolute; left: 2px; top: 1.32em; width: 9px; height: 1px; background: #b8694d; }
.rl-prose .rl-keypoints ul { margin-bottom: 0; }
@media (max-width: 700px) {
  .rl-keypoints { padding: 25px; }
  .rl-prose .rl-keypoints h2 { font-size: 1.9rem; }
}

.rl-prose .rl-notice { margin: 0 0 24px; }
.rl-prose .rl-notice p:last-child { margin-bottom: 0; }

.rl-prose .rl-table-wrap { max-width: 100%; margin-bottom: 18px; }
.rl-table--compact { min-width: 460px; }
.rl-table--compact td { overflow-wrap: break-word; word-break: normal; }

/* Sources: numbered hairline rows in the home page's planning-row style (clay numbers) */
.rl-sources { list-style: none; counter-reset: rl-src; font-size: .84rem; line-height: 1.65; color: var(--muted); border-top: 1px solid #dce4dd; }
.rl-prose .rl-sources { padding-left: 0; }
.rl-sources li { counter-increment: rl-src; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; margin: 0; padding: 12px 0; border-bottom: 1px solid #dce4dd; }
.rl-sources li::before { content: counter(rl-src, decimal-leading-zero); padding-top: 2px; font-size: .7rem; letter-spacing: .1em; color: #a76b50; }
.rl-sources li + li { margin-top: 0; }

/* Closing call to action: the home page's dark feature band (.home-discovery) as a card */
.rl-cta { margin-top: 48px; padding: 36px 34px; background: #173f38; border: 0; border-radius: 9px; color: #fffdf6; }
.rl-cta h2 { color: #fffdf6; }
.rl-prose .rl-cta h2 { margin: 0 0 12px; font-size: 2rem; }
.rl-prose .rl-cta p { margin-bottom: 22px; font-size: .95rem; color: #e2e9df; }
.rl-cta :where(a, button):focus-visible { outline-color: #efbb99; }
@media (max-width: 700px) { .rl-cta { padding: 28px 22px; } }

/* Links inside rl-prose are underlined text. Buttons keep their own shared colors. */
.rl-prose .rl-btn,
.rl-prose .rl-btn:hover { color: #fff; font-weight: 500; }
.rl-prose .rl-btn--secondary,
.rl-prose .rl-btn--secondary:hover { color: var(--ink); }
.rl-prose .rl-cta .rl-btn,
.rl-prose .rl-cta .rl-btn:hover { color: #173f38; }
.rl-prose .rl-cta .rl-btn--secondary,
.rl-prose .rl-cta .rl-btn--secondary:hover { color: #fffdf6; }

/* Step lists: bold words inside a step's text stay inline. */
.rl-prose .rl-steps { padding-left: 0; }
.rl-steps span strong { display: inline; font-size: inherit; color: var(--ink); }

/* Card grids: the original's three, two, one column card grid (.profile-grid) */

.rl-card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 31px; list-style: none; margin: 0; padding: 0; }
.rl-prose .rl-card-grid { padding-left: 0; }
.rl-card-grid > li { min-width: 0; margin: 0; }
.rl-card-grid > li + li { margin-top: 0; }
@media (min-width: 701px) { .rl-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1001px) { .rl-card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Link cards: the home page's guide cards (.home-reading-card): a sage rule on top, a light
   title, the summary, and the small line at the foot with an arrow */
.rl-link-card { display: flex; flex-direction: column; align-items: start; height: 100%; min-width: 0; padding: 24px 0; background: none; border: 0; border-top: 2px solid #7e9a86; border-bottom: 1px solid #dce4dd; border-radius: 0; color: #173f38; text-decoration: none; }
.rl-link-card strong { max-width: 22ch; margin-bottom: 15px; font-size: 1.5rem; font-weight: 500; letter-spacing: -.025em; line-height: 1.22; color: #173f38; }
.rl-link-card span { max-width: 38ch; margin-bottom: 22px; font-size: .9rem; line-height: 1.75; color: #51685d; font-weight: 400; }
.rl-link-card em { display: flex; align-items: center; gap: 13px; min-height: 30px; margin-top: auto; font-style: normal; font-size: .81rem; font-weight: 500; line-height: 1.5; color: #173f38; }
.rl-link-card em::after { content: '\2192'; font-size: 1rem; }
.rl-link-card:hover strong { text-decoration: underline; text-underline-offset: 5px; }
.rl-prose a.rl-link-card { font-weight: 400; }
@media (max-width: 700px) {
  .rl-link-card { padding: 21px 0; }
  .rl-link-card strong { font-size: 1.45rem; }
}

/* Sections on the wide pages */

.rl-section { margin-top: 84px; }
.rl-section > h2 { margin-bottom: 20px; font-size: clamp(1.9rem, 2.8vw, 2.6rem); }
.rl-section > .rl-eyebrow + h2 { margin-top: 0; }
@media (max-width: 700px) { .rl-section { margin-top: 56px; } }
.rl-section > p { max-width: 800px; }
.rl-section > p + p { margin-top: 12px; }
.rl-section > p + ul,
.rl-section > p + ol { margin-top: 10px; }
.rl-section > ul + p,
.rl-section > ol + p { margin-top: 14px; }
.rl-section > .rl-card-grid,
.rl-section > .rl-btn-row { margin-top: 18px; }
.rl-section > h2 + .rl-muted { margin-top: -10px; font-size: .89rem; }
.rl-section > .rl-band:first-child { margin-top: 0; }
.rl-plain-list { padding-left: 1.3em; max-width: 800px; }
.rl-plain-list li + li { margin-top: 6px; }

/* Rescue directory: search, in the original's filter panel (.filters, .directory-search-row) */

.rl-search {
  position: relative;
  min-width: 0;
  padding: 20px 24px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rl-search__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.rl-search__box { position: relative; min-width: 0; }
.rl-search__box .rl-input { width: 100%; max-width: 100%; }
.rl-search__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  width: 100%;
  max-width: 100%;
  max-height: min(60vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #bdcdca;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.rl-search__opt { display: block; min-width: 0; max-width: 100%; padding: 9px 12px; border-radius: 7px; cursor: pointer; overflow-wrap: anywhere; word-break: break-word; }
.rl-search__opt strong { display: block; font-size: .93rem; font-weight: 700; line-height: 1.3; }
.rl-search__opt span { display: block; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.rl-search__opt:hover,
.rl-search__opt[aria-selected='true'] { background: var(--mint); }
.rl-search__hint { min-height: 1.2em; }
@media (max-width: 760px) {
  .rl-search__row { gap: 12px; }
}
@media (max-width: 700px) {
  .rl-search { padding: 16px; }
}

.rl-search-results { margin-top: 18px; min-width: 0; max-width: 100%; }
.rl-search-results h2 { font-size: 1.8rem; margin-bottom: 12px; }
.rl-search-results h2:focus { outline: none; }
.rl-search-results ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rl-search-results li { min-width: 0; }
.rl-search-results .rl-card { display: block; min-width: 0; max-width: 100%; padding: 13px 16px; border-radius: 9px; text-decoration: none; overflow-wrap: anywhere; word-break: break-word; }
.rl-search-results .rl-card:hover { border-color: #9db4a5; background: #fbfcfa; }
.rl-search-results .rl-card strong { display: block; font-size: .93rem; font-weight: 700; line-height: 1.3; }
.rl-search-results .rl-card span { display: block; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.rl-search-results p { max-width: 60ch; }
@media (min-width: 760px) { .rl-search-results ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* State grid: hairline link rows in columns, like the home page's planning rows */

.rl-state-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; list-style: none; margin: 0; padding: 0; }
.rl-state-grid li { min-width: 0; }
.rl-state-grid .rl-card { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 64px; min-width: 0; padding: 12px 26px 12px 0; background: none; border: 0; border-bottom: 1px solid #dce4dd; border-radius: 0; color: #173f38; text-decoration: none; line-height: 1.3; }
.rl-state-grid .rl-card::after { content: '\2192'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: .95rem; color: #173f38; }
.rl-state-grid .rl-card:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.rl-state-grid strong { font-size: .98rem; font-weight: 500; letter-spacing: -.01em; }
.rl-state-grid span { margin-top: 3px; font-size: .74rem; line-height: 1.5; color: #64786d; }
@media (min-width: 560px) { .rl-state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .rl-state-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .rl-state-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Rescue directory: state page */

.rl-state-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; }
.rl-state-actions + .rl-notice { margin-top: 22px; }
.rl-state-actions a:not(.rl-btn) { display: inline-flex; align-items: center; min-height: 44px; }
.rl-state-context { margin: 0 0 24px; max-width: 800px; }

/* Letter links: the original's page-number links (.directory-pagination) */
.rl-letters { margin: 0 0 6px; gap: 8px; }
.rl-letters .rl-chip {
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 13px;
  background: #fff;
  border: 1px solid #c8d5d1;
  border-radius: 7px;
  color: var(--forest);
  font-size: .82rem;
  line-height: 1.5;
  text-decoration: none;
}
.rl-letters .rl-chip:hover { background: var(--mint); border-color: var(--forest); }
.rl-letter-head { margin: 30px 0 12px; font-size: 1.3rem; scroll-margin-top: 90px; }
@media (max-width: 700px) {
  .rl-letters { gap: 6px; }
  .rl-letters .rl-chip { padding: 9px 10px; font-size: .76rem; }
}

/* Organization entries: the original's public record card (two columns, then one) */
.rl-orgs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; list-style: none; margin: 0; padding: 0; color: #203d35; }
@media (min-width: 761px) { .rl-orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Organization entries: the original's public profile card (hairline card, light name, the
   source block under a hairline, the links as small outlined buttons) */
.rl-org { display: flex; flex-direction: column; min-width: 0; max-width: 100%; height: 100%; padding: 24px 24px 18px; background: #fff; border: 1px solid #dce4dd; border-radius: 8px; scroll-margin-top: 96px; overflow-wrap: anywhere; word-break: break-word; }
.rl-org:target { border-color: var(--focus); box-shadow: 0 0 0 3px #a9531955; }
.rl-org h3,
.rl-org h4 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.rl-org__where { font-size: .85rem; line-height: 1.6; }
.rl-org__kind { margin-top: 2px; font-size: .78rem; line-height: 1.65; color: #526a60; }
.rl-org__about { margin-top: 9px; font-size: .85rem; line-height: 1.6; }
.rl-org__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-width: 0; }
.rl-org__links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; padding: 8px 14px; border: 1px solid #dce3e5; border-radius: 5px; color: var(--forest); font-size: .78rem; font-weight: 500; text-decoration: none; }
.rl-org__links a:hover { background: #f5f8f8; border-color: #c8d5d1; }
.rl-org__source { margin-top: auto; padding-top: 14px; border-top: 1px solid #e4eae5; font-size: .76rem; line-height: 1.65; color: #526a60; }
.rl-org > :has(+ .rl-org__source) { margin-bottom: 16px; }
.rl-org__claim { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; margin-top: 4px; font-size: .78rem; }
.rl-org__claim a { display: inline-flex; align-items: center; min-height: 44px; color: var(--forest); text-underline-offset: 3px; }
.rl-org__claim a.rl-org__pets { font-weight: 600; }
@media (max-width: 760px) {
  .rl-org { padding: 17px; }
}
@media (max-width: 420px) {
  .rl-org h3,
  .rl-org h4 { font-size: 1.2rem; }
}

/* Source lists: hairline rows (.home-support-topics rhythm) */
.rl-source-list { list-style: none; padding-left: 0; max-width: 860px; font-size: .9rem; line-height: 1.7; border-top: 1px solid #dce4dd; }
.rl-source-list li { margin: 0; padding: 13px 0; border-bottom: 1px solid #dce4dd; }
.rl-source-list li + li { margin-top: 0; }
.rl-section > .rl-source-list { margin-top: 14px; }
.rl-section > .rl-source-list + p { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  .rl-link-card { transition: none; }
}
