/* =========================================================================
   Site chrome — header, docket strip, footer.

   Loaded AFTER each page's own stylesheet. The ported artifacts carry broad
   element rules (notably `a { color: ... }`) that would otherwise win on
   source order and swallow the header links. Keeping chrome last, and scoping
   every rule under .sitebar / .statusbar / .sitefoot, means the two never
   collide whichever page they are on.
   ========================================================================= */

/* ---- site chrome ------------------------------------------------------- */

/* fallback header height; the header script measures and overwrites it */
:root { --chrome-h: 112px; }

.sitebar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(9, 8, 7, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

/* Row 1: counter, about links, Donate. */
.sitebar__top {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  padding: 0 20px;
}

/* The wordmark slot carries the detention counter instead of the site name.
   The name is in the <title>, the footer and the URL; this number is the one
   thing a visitor should read first. */
.sitebar__mark {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.1;
}
.sitebar__mark:hover .held-count { color: #f07a68; }

.held-count {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--accent-crisis);
  /* fixed-width digits so the seconds ticking never shifts the layout */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.held-count b {
  font-weight: 600;
  font-size: 17px;
}
.held-label {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sitebar__about {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 18px;
  margin-left: auto;
  min-width: 0;
}
.sitebar__about a {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
}
.sitebar__about a:hover,
.sitebar__about a[aria-current="page"] { color: var(--accent-political); }

.sitebar__menu { display: none; }

.sitebar__give {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--bg-sunken);
  background: var(--accent-political);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}
.sitebar__give:hover { background: #ecc75a; }

/* Row 2: the main menu, spanning the page, one column per destination, each
   with a one-line description of what the page shows. */
.sitebar__nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  padding: 0 12px;
}
.sitebar__nav > a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 9px;
  text-decoration: none;
  border-left: 1px solid rgba(240,232,215,.06);
  min-width: 0;
}
.sitebar__nav > a:first-child { border-left: 0; }
.sitebar__nav > a .t {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sitebar__nav > a .d {
  font-size: 11.5px;
  line-height: 1.3;
  color: rgba(240, 232, 215, .52);
}
.sitebar__nav > a:hover { background: rgba(240,232,215,.04); }
.sitebar__nav > a:hover .t { color: var(--accent-political); }
.sitebar__nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-political); }
.sitebar__nav > a[aria-current="page"] .t { color: var(--accent-political); }
.sitebar__more { display: none; }

/* Narrower desktops: the about links move to the footer and phone menu only,
   and the descriptions may wrap to two lines. */
@media (max-width: 1180px) {
  .sitebar__about { display: none; }
  .sitebar__give { margin-left: auto; }
  .sitebar__nav { padding: 0 6px; }
  .sitebar__nav > a { padding: 7px 8px 8px; }
  .sitebar__nav > a .t { font-size: 13px; }
  .sitebar__nav > a .d { font-size: 11px; }
}

/* status strip — docket caption, carried on every page */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  padding: 7px 20px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.statusbar b {
  font-weight: 500;
  color: var(--ink-dim);
}
.statusbar .held { color: var(--accent-crisis); }
.statusbar .next {
  color: var(--accent-crisis);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.statusbar .next b { color: var(--accent-crisis); }
.statusbar .next[hidden] { display: none; }
@media (max-width: 860px) { .statusbar .next { margin-left: 0; } }

/* ---- secondary nav + footer -------------------------------------------- */

.sitefoot {
  margin-top: 80px;
  padding: 34px 20px 54px;
  background: var(--bg-sunken);
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-dim);
}
.sitefoot__inner { max-width: 880px; margin: 0 auto; }

.sitefoot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.sitefoot__nav a { color: var(--ink-dim); text-decoration: none; }
.sitefoot__nav a:hover { color: var(--accent-political); }

.sitefoot__caption {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 4px;
}
.sitefoot__docket {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin: 0 0 22px;
}

.notice {
  padding: 12px 0 0;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-dim);
}
.notice b { color: var(--ink); font-weight: 600; }
.notice--innocence { border-top: 2px solid var(--accent-crisis); }

.sitefoot a.give { color: var(--accent-political); }

/* ---- mobile ------------------------------------------------------------ */

@media (max-width: 860px) {
  /* Seven destinations with descriptions do not fit across a phone, and a
     sideways-scrolling row hides most of them. So the bar is one row (counter,
     Menu, Donate) and Menu opens the full list, descriptions included. */
  :root { --chrome-h: 53px; }
  /* backdrop-filter makes the header the containing block for position:fixed
     children, which would trap the menu sheet inside the 53px bar. */
  .sitebar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgb(11, 10, 9);
  }
  .sitebar__top { gap: 10px; padding: 0 12px; min-height: 52px; }
  .held-count { font-size: 13.5px; }
  .held-count b { font-size: 15px; }
  .held-label { font-size: 8.5px; letter-spacing: .1em; }
  .sitebar__menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 7px 12px;
    font: 500 13px/1 var(--font-sans);
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 3px;
    cursor: pointer;
  }
  .sitebar__burger,
  .sitebar__burger::before,
  .sitebar__burger::after {
    display: block;
    width: 14px;
    height: 1.5px;
    background: currentColor;
    position: relative;
    transition: transform .15s, opacity .15s;
  }
  .sitebar__burger::before,
  .sitebar__burger::after { content: ""; position: absolute; left: 0; }
  .sitebar__burger::before { top: -4.5px; }
  .sitebar__burger::after { top: 4.5px; }
  .is-open .sitebar__burger { background: transparent; }
  .is-open .sitebar__burger::before { transform: translateY(4.5px) rotate(45deg); }
  .is-open .sitebar__burger::after { transform: translateY(-4.5px) rotate(-45deg); }
  .sitebar__give { margin-left: 0; padding: 7px 12px; font-size: 12.5px; }

  .sitebar__nav {
    display: none;
    position: fixed;
    left: 0; right: 0;
    top: var(--chrome-h, 53px);
    bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--rule);
  }
  .is-open .sitebar__nav { display: block; }
  .sitebar__nav > a {
    padding: 13px 18px;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
  .sitebar__nav > a .t { font-size: 16px; white-space: normal; }
  .sitebar__nav > a .d { font-size: 13px; }
  .sitebar__nav > a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent-political);
  }
  .sitebar__more {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    padding: 18px 18px 0;
  }
  .sitebar__more a { font-size: 14px; color: var(--ink-dim); text-decoration: none; }
  .sitebar__more a[aria-current="page"] { color: var(--accent-political); }
  html.nav-open, html.nav-open body { overflow: hidden; }

  .statusbar { padding: 6px 12px; font-size: 10px; gap: 4px 12px; }
  .sitefoot { padding: 28px 16px 44px; }
}

@media (max-width: 360px) {
  .sitebar__menu { padding: 7px 9px; }
  .sitebar__give { padding: 7px 9px; }
}

@media (max-width: 420px) {
  .sitebar__mark span.long { display: none; }
}

/* ---- Support calls to action (home hero, /how-to-help/). Shared so the
   hoodie button looks the same wherever it appears. ---- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.btn-hoodie {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 12px 12px 12px 20px;
  background: var(--accent-political); color: #0E0C0A !important;
  text-decoration: none !important; border: 0; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 30px -14px rgba(222,182,58,.75);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-hoodie:hover { background: #ecc75a; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 16px 34px -14px rgba(222,182,58,.9); }
.btn-hoodie:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-hoodie .bh-l { display: flex; flex-direction: column; gap: 4px; }
.btn-hoodie .bh-t { font-family: var(--font-sans); font-weight: 700; font-size: 16.5px; line-height: 1.1; letter-spacing: .005em; }
.btn-hoodie .bh-s { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; opacity: .7; line-height: 1.2; }
.btn-hoodie .bh-a { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #0E0C0A; color: var(--accent-political); transition: transform .15s; }
.btn-hoodie:hover .bh-a { transform: translateX(3px); }
.btn-ghost {
  display: inline-flex; align-items: center; padding: 0 20px; min-height: 58px;
  border: 1px solid rgba(240,232,215,.3); border-radius: 3px;
  background: rgba(14,12,10,.4); color: var(--ink) !important; text-decoration: none !important;
  font-family: var(--font-sans); font-weight: 600; font-size: 14.5px;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent-political); color: var(--accent-political) !important; }
.hoodie-over .btn-hoodie { display: none; }
@media (prefers-reduced-motion: reduce) { .btn-hoodie, .btn-hoodie .bh-a { transition: none; } }
@media (max-width: 480px) {
  .cta-row > a { flex: 1 1 100%; justify-content: space-between; }
  .btn-ghost { justify-content: center; min-height: 50px; }
}
