/* PrisonerRights — public frontend theme (self-contained, no build step). */
:root{
  --navy:#1e4e8c; --navy-dark:#163a68; --ink:#0f172a;
  --body:#3f4a5a; --muted:#64748b; --faint:#94a3b8;
  --line:#e6e9ef; --line-soft:#eef1f5; --surface:#f7f9fc; --white:#fff;
  --accent:#b07d2b; --radius:14px; --maxw:1120px;
  --shadow:0 1px 2px rgba(15,23,42,.04);
  --shadow-hover:0 10px 30px -12px rgba(15,23,42,.18);
  --font:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);color:var(--body);background:var(--white);
  line-height:1.65;font-size:16px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3{color:var(--ink);margin:0;line-height:1.2;letter-spacing:-.02em;font-weight:700}
p{margin:0}
.container{max-width:var(--maxw);margin:0 auto;padding:0 24px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:#fff;color:var(--navy);padding:10px 16px;border-radius:8px}
.skip-link:focus{left:12px;top:12px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:.95rem;
  padding:11px 20px;border-radius:10px;border:1px solid transparent;cursor:pointer;transition:.18s ease;white-space:nowrap}
.btn-primary{background:var(--navy);color:#fff;box-shadow:var(--shadow)}
.btn-primary:hover{background:var(--navy-dark);transform:translateY(-1px)}
.btn-outline{background:#fff;color:var(--navy);border-color:#cdd6e4}
.btn-outline:hover{border-color:var(--navy);background:var(--surface)}
.btn-sm{padding:9px 16px;font-size:.875rem;border-radius:9px}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.88);
  backdrop-filter:saturate(180%) blur(10px);border-bottom:1px solid var(--line)}
.site-header__inner{display:flex;align-items:center;justify-content:space-between;gap:24px;height:68px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--ink);letter-spacing:-.02em}
.brand__mark{width:38px;height:38px;border-radius:9px;background:var(--navy);color:#fff;display:flex;align-items:center;
  justify-content:center;font-size:.82rem;font-weight:700;letter-spacing:.02em}
.brand__name{font-size:1.06rem}
.brand img{height:36px;max-width:170px;object-fit:contain}
.nav{display:flex;align-items:center;gap:4px}
.nav a{padding:9px 14px;border-radius:9px;font-size:.94rem;font-weight:500;color:var(--muted);transition:.15s}
.nav a:hover{color:var(--ink);background:var(--surface)}
.nav a.is-active{color:var(--navy);font-weight:600}
.nav-toggle{display:none}
@media(max-width:820px){
  .nav--desktop{display:none}
  .nav-toggle{display:block;position:relative}
  .nav-toggle>summary{list-style:none;cursor:pointer;padding:8px;border-radius:9px;color:var(--ink)}
  .nav-toggle>summary::-webkit-details-marker{display:none}
  .nav-menu{position:absolute;right:0;top:46px;width:230px;background:#fff;border:1px solid var(--line);
    border-radius:12px;box-shadow:var(--shadow-hover);padding:8px}
  .nav-menu a{display:block;padding:10px 12px;border-radius:8px;color:var(--body);font-weight:500}
  .nav-menu a:hover{background:var(--surface)}
}

/* Hero */
.hero{position:relative;background:linear-gradient(180deg,var(--surface),#fff 78%);border-bottom:1px solid var(--line-soft)}
.hero__inner{max-width:780px;margin:0 auto;text-align:center;padding:84px 24px 76px}
.eyebrow{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:var(--accent);margin-bottom:18px}
.hero h1{font-size:clamp(2.1rem,4.6vw,3.4rem);font-weight:800}
.hero__sub{margin-top:20px;font-size:clamp(1.05rem,2vw,1.22rem);color:var(--muted);line-height:1.6}
.hero__actions{margin-top:34px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* Sections */
.section{padding:72px 0}
.section + .section{padding-top:8px}
.section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:34px}
.section__head .eyebrow{margin-bottom:10px}
.section__title{font-size:clamp(1.5rem,3vw,2rem)}
.section__sub{margin-top:8px;color:var(--muted);max-width:560px}
.section__link{color:var(--navy);font-weight:600;font-size:.92rem;white-space:nowrap}
.section__link:hover{text-decoration:underline}
.section--alt{background:var(--surface);border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}

/* Card grid + cards */
.grid{display:grid;gap:22px;grid-template-columns:repeat(3,1fr)}
.grid--2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.grid,.grid--2{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.grid,.grid--2{grid-template-columns:1fr}}
.card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  padding:24px;box-shadow:var(--shadow);transition:.2s ease}
.card:hover{border-color:#d3dbe8;box-shadow:var(--shadow-hover);transform:translateY(-2px)}
.chip{display:inline-flex;align-items:center;align-self:flex-start;gap:6px;background:#eef2f8;color:#42546e;
  font-size:.72rem;font-weight:600;letter-spacing:.01em;padding:4px 10px;border-radius:999px;margin-bottom:12px}
.chip-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.card__title{font-size:1.06rem;font-weight:700;color:var(--ink)}
.card__title a:hover{color:var(--navy)}
.card__desc{margin-top:10px;color:var(--muted);font-size:.94rem;flex:1;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card__action{margin-top:18px}
.link-arrow{display:inline-flex;align-items:center;gap:6px;color:var(--navy);font-weight:600;font-size:.92rem}
.link-arrow:hover{gap:9px}
.unavailable{display:inline-flex;align-items:center;color:var(--faint);font-weight:600;font-size:.9rem}

/* Story card with media */
.card--media{padding:0;overflow:hidden}
.card__media{aspect-ratio:16/9;background:linear-gradient(135deg,#e8edf5,#dde4ef);display:flex;align-items:center;justify-content:center}
.card__media img{width:100%;height:100%;object-fit:cover}
.card__media svg{width:42px;height:42px;color:#b3c0d4}
.card--media .card__body{padding:22px 24px 24px}

/* Empty state */
.empty{border:1px dashed var(--line);background:var(--surface);border-radius:var(--radius);
  padding:48px 24px;text-align:center;color:var(--muted)}

/* Page header (listing/detail) */
.page-head{padding:56px 0 12px}
.page-head h1{font-size:clamp(1.9rem,3.6vw,2.6rem)}
.page-head p{margin-top:10px;color:var(--muted);max-width:620px}
.back-link{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:.9rem;font-weight:500}
.back-link:hover{color:var(--navy)}

/* Article (detail) */
.article{max-width:740px;margin:0 auto;padding:40px 24px 72px}
.article h1{font-size:clamp(1.9rem,4vw,2.6rem);margin-top:14px}
.article__meta{color:var(--faint);margin-top:6px}
.article__lead{font-size:1.18rem;color:var(--body);margin-top:22px;line-height:1.7}
.prose{margin-top:18px;color:var(--body);line-height:1.75}
.prose p{margin:0 0 16px}
.prose img{border-radius:12px;margin:18px 0}
.article__hero-img{width:100%;border-radius:16px;margin-top:26px;aspect-ratio:16/9;object-fit:cover}

/* Footer */
.site-footer{background:var(--navy-dark);color:#cdd8ea;margin-top:8px}
/* Only vertical padding here: horizontal padding comes from .container so the footer aligns
   with the rest of the page. Using the 3-value shorthand (... 0 ...) zeroed the left/right
   padding because this rule wins over .container, pushing content to the viewport edge. */
.site-footer__grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px;padding-top:56px;padding-bottom:40px}
@media(max-width:760px){.site-footer__grid{grid-template-columns:1fr;gap:28px}}
.site-footer h4{color:#fff;font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700;margin-bottom:16px}
.site-footer__brand .brand__name{color:#fff;font-size:1.1rem}
.site-footer__about{margin-top:14px;max-width:340px;color:#aebbd4;font-size:.94rem}
.site-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.site-footer a{color:#cdd8ea;font-size:.94rem}
.site-footer a:hover{color:#fff}
.site-footer__bottom{border-top:1px solid rgba(255,255,255,.12);padding:20px 0;font-size:.85rem;color:#9fb0cd}
.footer-brand-mark{width:34px;height:34px;border-radius:8px;background:rgba(255,255,255,.14);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:.78rem}
/* Social links (footer) - override the column footer ul into a horizontal icon row */
.site-footer__social{flex-direction:row !important;flex-wrap:wrap;gap:10px !important;margin-top:20px}
.social-link{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;
  background:rgba(255,255,255,.08);color:#cdd8ea;transition:background .15s,color .15s}
.social-link:hover{background:rgba(255,255,255,.16);color:#fff}
.social-link:focus-visible{outline:2px solid #fff;outline-offset:2px}
.social-link svg{display:block}

/* ---- Mobile hardening: no horizontal scroll/clipping; clean stacked layout ---- */
/* overflow-x:clip (not hidden) stops sideways scroll without making the body a scroll
   container, so the sticky header keeps working. The responsive rules below fix the actual
   sizing, so nothing relies on clipping to look correct. */
html,body{overflow-x:clip;max-width:100%}
h1,h2,h3,h4,p,a,li,.brand__name{overflow-wrap:break-word}
.container,.site-header__inner,.site-footer__grid,.hero__inner,.grid,.grid--2,.card,.section__head{min-width:0;max-width:100%}
.section__head{flex-wrap:wrap}

@media(max-width:600px){
  .container{padding:0 18px}
  .section{padding:52px 0}
  .hero__inner{padding:60px 18px 52px}
  .hero__actions{flex-direction:column;align-items:stretch}
  .hero__actions .btn{width:100%}
}
@media(max-width:480px){
  .container{padding:0 16px}
  .site-header__inner{height:58px;gap:10px}
  .brand__name{font-size:.98rem}
  .section{padding:44px 0}
  .hero__inner{padding:52px 16px 46px}
  /* Footer: one column, tidy spacing; horizontal padding stays from .container (16px). */
  .site-footer__grid{gap:24px;padding-top:40px;padding-bottom:28px}
  .site-footer__about{max-width:100%}
  .site-footer__social{margin-top:16px}
  .site-footer__bottom{padding:16px 0}
}

/* ---- Legal notices + legal pages + footer legal links ---- */
.legal-notices-wrap{margin:32px auto 8px}
.legal-notice{border:1px solid var(--line);border-left-width:4px;border-radius:10px;background:var(--surface);
  padding:16px 18px;margin:18px 0;color:var(--body)}
.legal-notice__title{font-weight:700;color:var(--ink);margin:0 0 6px;font-size:.98rem}
.legal-notice__body{font-size:.92rem;line-height:1.6}
.legal-notice__body p{margin:0 0 8px}
.legal-notice__body p:last-child{margin-bottom:0}
.legal-notice--muted{border-left-color:#cbd5e1}
.legal-notice--info{border-left-color:var(--navy);background:#f1f6fc}
.legal-notice--alert{border-left-color:#b45309;background:#fdf6ec}
.legal-page .prose{margin-top:18px;max-width:720px}
.legal-content table{width:100%;border-collapse:collapse;margin:14px 0;display:block;overflow-x:auto}
.legal-content th,.legal-content td{border:1px solid var(--line);padding:8px 10px;text-align:left;font-size:.92rem}
.legal-review-note{margin-top:28px;padding-top:16px;border-top:1px solid var(--line);color:var(--faint);font-size:.85rem;max-width:720px}
.legal-preview-banner{background:#fdf6ec;border:1px solid #f0d9b5;color:#92510a;border-radius:10px;padding:10px 14px;
  font-weight:600;font-size:.9rem;margin-bottom:18px}
.site-footer__bottom-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.site-footer__legal{display:flex;flex-wrap:wrap;gap:16px}
.site-footer__legal a{color:#cdd8ea;font-size:.85rem}
.site-footer__legal a:hover{color:#fff;text-decoration:underline}
.site-footer__notice{margin-top:12px;color:#9fb0cd;font-size:.82rem;line-height:1.5}
