/* Demo county and roster layouts. Keep one server-rendered information card. */
@media (max-width:700px) {
 body[data-state-slug][data-county-slug] main {
  display:flex;flex-direction:column;
 }
 body[data-state-slug][data-county-slug] main > * {order:20}
 body[data-state-slug][data-county-slug] main > .hero,
 body[data-state-slug][data-county-slug] .hero > .hero-inner {
  display:contents;
 }
 body[data-state-slug][data-county-slug] .hero-copy {
  order:0;width:100%;padding:20px 20px 24px;background:var(--navy);
 }
 body[data-state-slug][data-county-slug] main > .hero + .shell {order:1}
 body[data-state-slug][data-county-slug] .hero-snapshot {
  width:calc(100% - 40px);margin-inline:auto;
 }
 body.inmate-page[data-state-slug][data-county-slug] main > .roster-grid {display:contents}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > *,
 body.inmate-page[data-state-slug][data-county-slug] .roster-sidebar > *,
 body.inmate-page[data-state-slug][data-county-slug] .roster-bottom-preview {
  width:calc(100% - 40px);margin-inline:auto;margin-bottom:12px;
 }
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .archive-notice,
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .source-policy {order:2}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .roster-toolbar {order:3}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .roster-public-notice {order:4}
 body.inmate-page[data-state-slug][data-county-slug] .roster-sidebar > .tf-sidebar {order:5}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .sponsor-card {order:6}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .record-list,
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > .tf-noresult {order:7}
 body.inmate-page[data-state-slug][data-county-slug] .hero-snapshot {order:8;margin-bottom:12px}
 body.inmate-page[data-state-slug][data-county-slug] .roster-column > #roster-pagination {order:9;margin-top:0}
 body.inmate-page[data-state-slug][data-county-slug] .roster-bottom-preview {order:10}
 body.inmate-page[data-state-slug][data-county-slug] .roster-sidebar > :not(.tf-sidebar) {order:11}
 body.county-page[data-state-slug][data-county-slug] .hero-snapshot {order:2;margin-bottom:24px}
}

/* Top-ad sizing matches the current mobile 250px reservation. */
@media (max-width:700px) {
 body[data-state-slug][data-county-slug] .layout-frame-top,
 body[data-state-slug][data-county-slug] .county-top-placement {height:250px}
}
/* Compact short screens without removing any heading, text or control. */
@media (max-width:700px) and (max-height:740px) {
 body[data-state-slug][data-county-slug] .hero-copy {padding:14px 20px;gap:10px}
 body[data-state-slug][data-county-slug] .hero h1 {font-size:32px;line-height:1.05}
 body[data-state-slug][data-county-slug] .hero-description {font-size:15px;line-height:1.5}
 body.inmate-page[data-state-slug][data-county-slug] .layout-frame-top {margin-top:24px}
}

/* Mobile layout: reuse the existing single middle slot after five cards.
   SSR and AJAX keep the same eligibility; the server retains the original slot eligibility. */
@media (max-width:700px) {
 body.inmate-page[data-state-slug][data-county-slug] .record-list > .record-card:nth-child(n+6) {order:2}
 body.inmate-page[data-state-slug][data-county-slug] .record-list > .layout-frame-middle {order:1}
}

/* Demo: keep sponsorship visible; full legal copy stays in native details. */
body[data-state-slug][data-county-slug] .tf-legal-toggle > summary {
 display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;
 border-top:1px solid var(--line);list-style:none;cursor:pointer;font-size:12px;font-weight:500;color:var(--ink);
}
body[data-state-slug][data-county-slug] .tf-legal-toggle > summary::-webkit-details-marker {display:none}
body[data-state-slug][data-county-slug] .tf-legal-toggle > summary::marker {content:""}
body[data-state-slug][data-county-slug] .tf-legal-toggle > summary svg {flex:none}
body[data-state-slug][data-county-slug] .tf-legal-toggle[open] > summary svg {transform:rotate(180deg)}
body[data-state-slug][data-county-slug] .tf-legal-toggle > summary:focus-visible {outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
body[data-state-slug][data-county-slug] .tf-legal-toggle > p {padding-top:8px}

/* The sponsor label sits with the brand; full sponsor name remains accessible. */
body[data-state-slug][data-county-slug] .tf-placement > .tf-brand {
 flex-direction:column;align-items:flex-start;gap:6px;
}
body[data-state-slug][data-county-slug] .tf-brand > .tf-brand-disclosure {
 margin:0;font-size:12px;font-weight:500;line-height:1.4;color:var(--record-copy);
}

/* Desktop/tablet layout: the existing single middle reservation follows five
   records. Server and AJAX eligibility and record DOM order remain unchanged. */
@media (min-width:701px) {
 body.inmate-page[data-state-slug][data-county-slug] .record-list > .record-card:nth-child(n+6) {order:2}
 body.inmate-page[data-state-slug][data-county-slug] .record-list > .layout-frame-middle {order:1}
}
/* Short desktop screens: reclaim vertical padding/gaps, retaining the full hero
   text, heading size, breadcrumbs, actions and information card. */
@media (min-width:900px) and (max-height:800px) {
 body[data-state-slug][data-county-slug] .hero-inner {padding-block:24px}
 body[data-state-slug][data-county-slug] .hero-copy {gap:12px}
}

/* Demo: match the top rule to the green in the TruthFinder logo. */
body[data-state-slug][data-county-slug] .tf-placement {box-shadow:inset 0 3px 0 #00a576}
