/* ============================================================
   TEN GRAND — Transmissions archive + post pages
   Reuses tokens/classes from style.css (colors, .site-frame, .nav,
   .section-eyebrow, .site-footer). Adds a wider content column since
   this page needs a real desktop layout, unlike the mobile-only
   scrollytelling sections on the homepage.
   ============================================================ */

:root {
  --archive-max-width: 1100px;
}

main {
  display: block;
}

/* ---------- Shared wide container ---------- */

.transmission-post {
  width: 100%;
  max-width: var(--archive-max-width);
  margin: 0 auto;
  padding: 40px var(--section-padding-x);
  box-sizing: border-box;
}

/* The archive's own sections stay full-width (rather than capped at
   --archive-max-width like .transmission-post above) specifically so each
   one's border-bottom divider reaches the site-frame's actual edge on
   wide viewports, instead of stopping at the 1100px reading column and
   leaving visible gaps on either side. The reading column itself is
   reintroduced one level in, via .archive-inner. */
.archive-header,
.archive-filters,
.archive-featured,
.archive-grid-section {
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
  box-sizing: border-box;
}

.archive-inner {
  max-width: var(--archive-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  box-sizing: border-box;
}

/* ---------- Archive header ---------- */

.archive-header {
  border-bottom: 1px solid var(--color-card-border);
  padding-bottom: 32px;
}

.archive-header__title {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.archive-header__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 50ch;
}

@media (min-width: 760px) {
  .archive-header__subtitle { max-width: none; }
}

/* ---------- Filters ---------- */

.archive-filters {
  border-bottom: 1px solid var(--color-card-border);
  padding-top: 32px;
  padding-bottom: 32px;
}

.archive-filters__pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.archive-filter-btn {
  flex: 1 1 auto;
  min-width: fit-content;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-card-border);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.archive-filter-btn.is-active {
  background: var(--color-text);
  color: var(--color-bg);
}

.archive-filters__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-select,
.archive-search {
  width: 100%;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-card-border);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-radius: 0;
}

.archive-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text) 50%), linear-gradient(135deg, var(--color-text) 50%, transparent 50%);
  background-position: calc(100% - 22px) center, calc(100% - 16px) center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.archive-select option {
  background: var(--color-bg);
  color: var(--color-text);
}

.archive-search::placeholder {
  color: var(--color-text-muted);
}

/* Below 16px, iOS Safari auto-zooms the viewport on focus -- same fix
   as the AMASS modal's form fields (see #amass-modal's font-size rule
   in style.css), scoped to touch/narrow viewports only. */
@media (max-width: 900px), (pointer: coarse) {
  .archive-select,
  .archive-search {
    font-size: max(16px, 1rem);
  }
}

/* ---------- Sample badge / pillar tags (shared) ---------- */

.sample-badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-text);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pillar-tag {
  border: 1px solid var(--color-card-border);
  padding: 6px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* ---------- Community wall strip ---------- */
/* A compact banner -- not a card -- between the filters and the featured
   transmission. Only a bottom divider is declared (same convention as
   every other archive section): the line above comes from
   .archive-filters's own border-bottom just before it.
   A grid, not a flex row, because the two breakpoints place the same
   four items (icon-frame, divider, text, cta) completely differently
   rather than just resizing them: on mobile the icon-frame and its
   divider are a left column spanning the label+subtitle+CTA stack
   beside them (grid-template-areas repeating "icon-frame"/
   "divider-mobile" across both rows is what makes them span); on
   desktop everything sits in a single row with a different divider
   back in play. Grid areas place items by name regardless of source
   order, so no DOM reshuffling is needed between the two.

   icon-frame and divider-mobile are deliberately independent of each
   other -- neither is sized off the other -- because tying the
   divider's height to the icon's (or vice versa) is what broke this
   section repeatedly: the divider needs to reach the section's own
   border regardless of how big the icon is, and the icon's padding
   needs to stay correct regardless of how tall the text column next
   to it renders. Each gets its own self-contained sizing instead. */
.archive-community {
  border-bottom: 1px solid var(--color-card-border);
  padding-top: 20px;
  padding-bottom: 20px;
}

.archive-community__inner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas:
    "icon-frame divider-mobile text"
    "icon-frame divider-mobile cta";
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
}

/* Flush with the page margin on the left (same edge as the search box
   and section title above), so no padding there. The 14px that would
   have gone on the left is matched on top/right/bottom instead -- a
   square frame missing only its left side. Self-contained here -- it
   doesn't depend on the divider, the row height, or the text column,
   so it can't be thrown off by any of those. align-self:center centers
   the frame within its spanned rows; if that row is taller than the
   frame, the extra space splits evenly above/below instead of pooling
   on one side. */
.archive-community__icon-frame {
  grid-area: icon-frame;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 14px 14px 0;
}

.archive-community__icon {
  display: block;
  width: 137px;
  max-width: none;
  height: 90px;
}

/* Bleeds through .archive-community's 20px top/bottom padding (same
   technique as .archive-community__divider on desktop) so it reaches
   that section's own border lines top and bottom -- independent of
   the icon-frame's height, so it can't come up short again. */
.archive-community__divider-mobile {
  display: block;
  grid-area: divider-mobile;
  align-self: stretch;
  width: 1px;
  margin-top: -20px;
  margin-bottom: -21px;
  background: var(--color-card-border);
}

.archive-community__text {
  grid-area: text;
  min-width: 0;
  text-align: right;
}

.archive-community__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.archive-community__subtitle {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.archive-community__divider {
  display: none;
}

/* Same red, pulsing, small-caps treatment as the AMASS modal's own
   "Voices Heard" campaign label (.amass-flow__campaign-label in
   style.css) -- reuses dilemma-cue-pulse by name, defined once there
   and already loaded on this page via style.css. */
.archive-community__cta {
  grid-area: cta;
  align-self: start;
  justify-self: end;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-vandalism);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .archive-community__cta {
    animation: dilemma-cue-pulse 2s ease-in-out infinite;
  }
}

/* ---------- Featured transmission ---------- */

.archive-featured {
  border-bottom: 1px solid var(--color-card-border);
  padding-top: 40px;
  padding-bottom: 40px;
}

.archive-featured__label {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

/* The inner box: the card itself is logo-colored, with its text inverted
   to the bg color. The outer .archive-featured backdrop above stays the
   page's normal background. */
.featured-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-card-border);
  text-decoration: none;
  color: var(--color-bg);
  background: var(--color-text);
}

.featured-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-card);
  background-size: cover;
  background-position: center;
}

.featured-card__text {
  padding: 28px clamp(20px, 4vw, 40px) 32px;
}

.featured-card__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 6px 0 10px;
}

/* The dark equivalent of --color-text-muted (rgba(20,20,20) instead of
   rgba(255,255,255)), needed because this card's background/text pair is
   inverted from the rest of the page. */
.featured-card__excerpt {
  color: rgba(20, 20, 20, 0.65);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 12px 0 20px;
  max-width: 60ch;
}

/* .transmission-card__date/__format are shared with the plain grid cards
   below, which stay on the normal dark background -- scoped here so only
   the featured card's copies pick up the inverted muted color. */
.featured-card .transmission-card__date,
.featured-card .transmission-card__format {
  color: rgba(20, 20, 20, 0.65);
}

/* ---------- All transmissions grid ---------- */

.archive-grid-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.archive-grid-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.archive-grid-section__label {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 24px;
}

.transmission-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-card-border);
  text-decoration: none;
  color: var(--color-text);
}

.transmission-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-card);
  background-size: cover;
  background-position: center;
}

.transmission-card__body {
  padding: 20px 24px 24px;
}

.transmission-card__date {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.transmission-card__series {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  margin-top: 4px;
}

.transmission-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 4px;
}

.transmission-card__format {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.transmission-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.transmission-card__cta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.archive-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* ---------- Individual transmission post ---------- */

.transmission-post {
  padding-top: 40px;
  padding-bottom: 60px;
}

.transmission-post__back {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.transmission-post__back--bottom {
  margin-top: 40px;
  margin-bottom: 0;
}

.transmission-post__series {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.transmission-post__title {
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.transmission-post__meta-row {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.transmission-post__meta-sep {
  margin: 0 8px;
}

.transmission-post__image {
  width: 100%;
  height: auto;
  margin: 32px 0;
  border: 1px solid var(--color-card-border);
}

.transmission-post__body {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 70ch;
}

.transmission-post__body p {
  margin-bottom: 24px;
}

.transmission-post__body h2,
.transmission-post__body h3 {
  margin: 40px 0 16px;
  font-weight: 700;
}

/* ---------- Desktop ---------- */

@media (min-width: 760px) {
  .archive-filters__pillars {
    flex-wrap: nowrap;
  }

  .archive-filters__row {
    flex-direction: row;
  }

  .archive-select,
  .archive-search {
    width: 50%;
  }

  .featured-card {
    flex-direction: row;
  }

  .featured-card__image {
    width: 55%;
    aspect-ratio: 16 / 9;
  }

  .featured-card__text {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .archive-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Single row: icon, text (title+subtitle stacked within their own
     area), divider, a flexible empty column to push the CTA to the far
     right, then the CTA. */
  .archive-community__inner {
    grid-template-columns: auto auto auto 1fr auto;
    grid-template-areas: "icon-frame text divider . cta";
    align-items: center;
    column-gap: 16px;
    row-gap: 0;
  }

  /* Mobile-only divider and the icon's padded square frame -- not part
     of this layout, so both revert back here. */
  .archive-community__divider-mobile {
    display: none;
  }

  .archive-community__icon-frame {
    padding: 0;
  }

  .archive-community__icon {
    width: 53px;
    height: 35px;
  }

  .archive-community__text {
    text-align: left;
  }

  .archive-community__title {
    font-size: 1rem;
  }

  .archive-community__subtitle {
    font-size: 0.85rem;
  }

  /* align-self:stretch alone would only fill the grid row's own
     content height; the negative margins bleed through
     .archive-community's 20px top/bottom padding so the line actually
     reaches that section's own border lines instead of stopping short
     at the row's natural (shorter) height -- the extra 1px on the
     bottom additionally crosses the section's own border-bottom
     itself (border-box width, included in its measured height),
     which the top side doesn't have to account for since the line
     above comes from .archive-filters's border-bottom instead. */
  .archive-community__divider {
    display: block;
    grid-area: divider;
    align-self: stretch;
    width: 1px;
    margin-top: -20px;
    margin-bottom: -21px;
    background: var(--color-card-border);
  }

  .archive-community__cta {
    align-self: center;
    justify-self: start;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* Shared expandable feed; desktop filter layout stays intact. */
.archive-category, .archive-search-toggle { display: none; }
.archive-featured[hidden], .archive-empty[hidden], .featured-card__image[hidden] { display: none; }
.archive-load-more {
  display: block; width: 100%; margin-top: 24px; padding: 14px 20px;
  border: 1px solid var(--color-card-border); border-radius: 0;
  background: transparent; color: var(--color-text); font: 700 .85rem var(--font-body);
  cursor: pointer;
}
.archive-load-more[hidden], .archive-search[hidden] { display: none; }
.archive-load-more span { margin-left: 12px; }
.archive-feed-status { margin-top: 12px; color: var(--color-text-muted); font-size: .8rem; }
.archive-empty .archive-filter-btn { margin-top: 16px; }
.archive-intro-card .featured-card__text { flex: 1; min-width: 0; }
.archive-select:focus-visible, .archive-search-toggle:focus-visible,
.archive-load-more:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
@media (max-width: 759px) {
  .archive-filters { padding-top: 16px; padding-bottom: 16px; }
  .archive-filters__controls {
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) 44px;
    gap: 8px;
  }
  .archive-filters__pillars { display: none; }
  .archive-filters__row { display: contents; }
  .archive-category { display: block; }
  .archive-filters .archive-select {
    min-width: 0; width: 100%; height: 44px;
    padding: 10px 20px 10px 12px;
    font-size: 16px; font-weight: 600; letter-spacing: 0; /* 16px+ so iOS doesn't zoom on focus */
    text-transform: uppercase; text-overflow: ellipsis;
    background-position: calc(100% - 14px) center, calc(100% - 8px) center;
  }
  .archive-category.is-active {
    color: var(--color-bg); background-color: var(--color-text);
    background-image: linear-gradient(45deg, transparent 50%, var(--color-bg) 50%), linear-gradient(135deg, var(--color-bg) 50%, transparent 50%);
  }
  .archive-search-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 10px;
    background: transparent; color: var(--color-text);
    border: 0; border-radius: 0; cursor: pointer;
  }
  .archive-search-toggle svg { width: 24px; height: 24px; }
  .archive-filters .archive-search { grid-column: 1 / -1; width: 100%; min-width: 0; font-size: 16px; }
  .archive-grid { grid-template-columns: minmax(0,1fr); }
}

/* Compact community link; the SVG slot can receive animated artwork later. */
.archive-community { padding-block: 6px; }
.archive-community__inner {
  grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: none;
  gap: 8px; align-items: stretch; color: var(--color-text); text-decoration: none;
}
.archive-community__icon-frame {
  grid-area: auto; align-self: stretch; padding: 6px 5px;
  margin-top: -6px; margin-bottom: -7px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
}
.archive-community__icon { width: 100%; height: 60px; max-width: 100%; object-fit: contain; }
.archive-community__link-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center;
  gap: 8px; padding: 6px 10px; border: 0;
}
.archive-community__text { grid-area: auto; text-align: left; }
.archive-community__title { display: block; font-size: 1rem; line-height: 1.2; }
.archive-community__subtitle { color: #fff; display: block; margin-top: 4px; font-size: .85rem; line-height: 1.3; }
.archive-community__cta {
  grid-area: auto; align-self: center; justify-self: end; font-size: 1.5rem;
  line-height: 1; letter-spacing: 0; color: var(--color-text); animation: none;
}
.archive-community__inner:focus-visible { outline: 2px solid var(--color-text); outline-offset: 4px; }
@media (max-width: 360px) {
  .archive-community__inner { grid-template-columns: 76px minmax(0, 1fr); gap: 6px; }
  .archive-community__link-body { padding: 8px; gap: 4px; grid-template-columns: minmax(0, 1fr) 18px; }
  .archive-community__title { font-size: .85rem; }
  .archive-community__subtitle { font-size: .75rem; }
}
@media (max-width: 759px) {
  .archive-community__icon-frame { margin-left: calc(-1 * var(--section-padding-x)); }
}

/* Share the community header's animated heat map behind this entire CTA. */
.archive-community { position: relative; isolation: isolate; overflow: hidden; }
.archive-community::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse at 0% 25%, #ff322088, transparent 45%),
              radial-gradient(ellipse at 100% 80%, #00cde877, transparent 45%);
}
.archive-community__heat {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}
@media (max-width: 759px) {
  .archive-community__inner {
    grid-template-columns: 64px minmax(0, 1fr); gap: 0; padding-right: 12px;
  }
  .archive-community__link-body {
    padding: 6px 0; gap: 6px; grid-template-columns: minmax(0, 1fr) 18px;
  }
  .archive-community__title { font-size: clamp(12px, 3.7vw, 16px); white-space: nowrap; }
  .archive-community__subtitle { font-size: clamp(10px, 3vw, 12px); white-space: nowrap; }
}
@media (max-width: 759px) {
  .archive-community__icon-frame {
    margin-left: 0; padding-left: 0; padding-right: 0;
  }
}
@media (max-width: 759px) {
  .archive-community__inner { padding-left: 0; grid-template-columns: 80px minmax(0, 1fr); }
}
@media (max-width: 759px) {
  .archive-community__inner {
    padding-left: var(--section-padding-x);
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .archive-community__icon-frame { margin-left: 0; }
}
@media (max-width: 759px) {
  .archive-community__inner { column-gap: 10px; }
}
@media (max-width: 360px) {
  .archive-community__subtitle { font-size: 9.5px; }
}

/* ---------- Collapsing breadcrumb + bottom filter dock (mobile) ----------
   Appear once .archive-community scrolls fully out of view above the
   viewport (see js/transmissions.js), replacing the page's own filter
   controls -- which have scrolled away by then -- with a condensed path
   back to them. Desktop never shows these; JS only toggles them inside
   the mobile breakpoint, and the hard `display: none` below is a
   defense-in-depth guard against a flash before JS runs. */
.archive-crumb,
.archive-dock,
.archive-filter-panel {
  display: none;
}

@media (max-width: 759px) {
  .archive-crumb {
    display: block;
    position: fixed;
    top: var(--t-nav-height, 64px);
    left: var(--frame-margin);
    right: var(--frame-margin);
    z-index: 90;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-card-border);
    border-left: 1px solid var(--color-card-border);
    border-right: 1px solid var(--color-card-border);
  }
  .archive-crumb[hidden] { display: none; }

  .archive-crumb__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .archive-crumb__root {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text);
    cursor: pointer;
  }
  .archive-crumb__root[aria-current="page"] { color: var(--color-text-muted); cursor: default; }

  .archive-crumb__sep {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transform: skewX(-15deg);
    display: inline-block;
  }
  .archive-crumb__sep[hidden] { display: none; }

  .archive-crumb__current {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .archive-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: var(--frame-margin);
    right: var(--frame-margin);
    z-index: 90;
    /* Reserved dead space below the bar for the home-indicator area --
       kept off the buttons themselves so their padding (and the vertical
       dividers it carries) stays symmetric top/bottom, and so those
       dividers run the bar's full height edge to edge. */
    padding-bottom: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-card-border);
    border-left: 1px solid var(--color-card-border);
    border-right: 1px solid var(--color-card-border);
    border-bottom: 1px solid var(--color-card-border);
  }
  .archive-dock[hidden] { display: none; }

  .archive-dock__btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
    background: none;
    border: none;
    border-right: 1px solid var(--color-card-border);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
  }
  .archive-dock__btn:last-child { border-right: none; }

  .archive-dock__btn--icon { flex: 0 0 auto; padding: 16px 18px; }
  .archive-dock__btn--icon svg { width: 18px; height: 18px; }

  /* Same glow as the Community Wall CTA section up the page. */
  .archive-dock__wall {
    background: radial-gradient(ellipse at 0% 25%, #ff322088, transparent 45%),
                radial-gradient(ellipse at 100% 80%, #00cde877, transparent 45%);
  }

  .archive-dock__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.65rem;
    font-weight: 700;
  }
  .archive-dock__count[hidden] { display: none; }

  .archive-filter-panel {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
  }
  .archive-filter-panel[hidden] { display: none; }

  .archive-filter-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
  }

  .archive-filter-panel__sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-card-border);
    padding: 20px var(--section-padding-x) calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 80vh;
    overflow-y: auto;
    animation: archive-panel-up 0.2s ease-out;
  }
  @media (prefers-reduced-motion: reduce) {
    .archive-filter-panel__sheet { animation: none; }
  }
  @keyframes archive-panel-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .archive-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .archive-filter-panel__header h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .archive-filter-panel__close {
    background: none;
    border: 1px solid var(--color-card-border);
    color: var(--color-text);
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
  }

  .archive-filter-panel__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .archive-filter-panel__actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
  }
  .archive-filter-panel__actions .archive-filter-btn { flex: 1 1 0; text-align: center; }
}

/* Mobile sticky controls sit beside Transmissions; the bottom CTA stands alone. */
@media (max-width: 759px) {
  .archive-crumb__inner { justify-content: space-between; }
  .archive-crumb__path {
    display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  }
  .archive-crumb__root { flex-shrink: 0; }
  .archive-sticky-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .archive-sticky-actions .archive-dock__btn {
    flex: none; padding: 10px 12px; border: 1px solid var(--color-card-border);
  }
  .archive-sticky-actions .archive-dock__btn--icon {
    width: 44px; height: 44px; padding: 0; border: 0;
  }
  .archive-dock__wall { width: 100%; }
}


/* Keep the intermediate archive layout out of view during a saved return.
   Visibility preserves the geometry needed to restore the card's position. */
.archive-restoring main,
.archive-restoring .site-footer,
.archive-restoring .archive-crumb,
.archive-restoring .archive-dock { visibility: hidden; }
.archive-return-ready main,
.archive-return-ready .site-footer,
.archive-return-ready .archive-crumb,
.archive-return-ready .archive-dock { animation: archive-return-fade .16s ease-out; }
@keyframes archive-return-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .archive-return-ready main,
  .archive-return-ready .site-footer,
  .archive-return-ready .archive-crumb,
  .archive-return-ready .archive-dock { animation: none; }
}

/* Pin the bar to the screen edge; symmetric safe-area padding centers its label. */
@media (max-width: 759px) {
  .archive-dock { bottom: 0; padding-bottom: 0; }
  .archive-dock__wall {
    justify-content: center; align-items: center; text-align: center;
    padding: calc(22px + env(safe-area-inset-bottom, 0px) / 2) 0;
  }
}

.archive-desktop-filters, .archive-sticky-input { display: none; }
@media (min-width: 760px) {
  .archive-crumb {
    display: block; position: fixed; top: var(--t-nav-height, 64px);
    left: var(--frame-margin); right: var(--frame-margin); z-index: 90;
    background: var(--color-bg); border: 1px solid var(--color-card-border);
  }
  .archive-crumb[hidden], .archive-dock[hidden] { display: none; }
  .archive-crumb__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
  .archive-crumb__path { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .archive-crumb__root { background: none; border: 0; padding: 0; color: var(--color-text); font: 700 .85rem var(--font-body); cursor: pointer; }
  .archive-crumb__current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
  .archive-sticky-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .archive-desktop-filters { display: flex; gap: 10px; }
  .archive-desktop-filters .archive-select { display: block; width: 150px; padding: 12px 30px 12px 12px; background-position: calc(100% - 18px) center, calc(100% - 12px) center; }
  #archive-sticky-filters { display: none; }
  #archive-sticky-search { display: flex; align-items: center; justify-content: center; flex: none; background: none; border: 0; color: var(--color-text); cursor: pointer; padding: 0; width: 32px; }
  #archive-sticky-search svg { width: 18px; height: 18px; }
  .archive-sticky-input { display: block; width: clamp(130px, 18vw, 280px); padding: 12px; }
  .archive-sticky-input:focus, .archive-desktop-filters .archive-select:focus { outline: none; box-shadow: none; }
  .archive-dock { display: flex; position: fixed; bottom: 0; left: var(--frame-margin); right: var(--frame-margin); z-index: 90; background: var(--color-bg); border: 1px solid var(--color-card-border); }
  .archive-dock__wall { display: flex; justify-content: center; width: 100%; padding: 20px 0; color: var(--color-text); font: 700 .75rem var(--font-body); text-decoration: none; background: radial-gradient(ellipse at 0% 25%, #ff322088, transparent 45%), radial-gradient(ellipse at 100% 80%, #00cde877, transparent 45%); }
}

@media (min-width: 760px) {
  .archive-crumb__root { font-size: 1.1rem; line-height: 1.2; text-transform: uppercase; }
  .archive-desktop-filters .archive-select { font-size: .85rem; }
  #archive-sticky-search { display: none; }
  #archive-sticky-input {
    padding: 14px 14px 14px 46px;
    font-size: .9rem;
    letter-spacing: normal;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f3f4' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 20px 20px;
  }
}

@media (min-width: 760px) {
  #archive-sticky-input,
  .archive-desktop-filters .archive-select {
    box-sizing: border-box;
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.2;
  }
}

/* Match the regular Transmissions search to the boxed sticky search. */
#search-input {
  padding-left: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f3f4' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 20px 20px;
}

/* Keep the dropdown's single border when it receives focus. */
.archive-select:focus,
.archive-select:focus-visible {
  outline: none;
  box-shadow: none;
}

@media (max-width: 759px) {
  .archive-search-toggle:focus,
  .archive-search-toggle:focus-visible { outline: none; box-shadow: none; }
}

/* The sticky archive title stays white in every filter state. */
.archive-crumb__root,
.archive-crumb__root[aria-current="page"] {
  color: var(--color-text);
}

/* The main nav's bottom border supplies this shared divider. */
.archive-crumb { border-top: 0; }

/* Footer CTA shares the vivid thermal animation of the community banner. */
.archive-dock .archive-dock__wall {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(110deg, #EB152880, #FF322080 18%, #FFDC0080 42%, #B8EF0080 58%, #A8E00080 73%, #00CDE880 88%, #45CDF680);
}
.archive-dock__heat { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.archive-dock__label { position: relative; z-index: 1; }

/* Gentle separation from moving bright colors without a heavy dark patch. */
.archive-community__text,
.archive-community__cta,
.archive-dock__label {
  text-shadow: 0 1px 2px rgb(0 25 27 / 80%), 0 0 5px rgb(0 25 27 / 35%);
}

/* Mobile sticky controls open directly below their toolbar buttons. */
@media (max-width: 759px) {
  .archive-filter-panel { pointer-events: none; }
  .archive-filter-panel__backdrop {
    top: var(--archive-popup-top);
    background: transparent;
    pointer-events: auto;
  }
  .archive-filter-panel__sheet {
    top: var(--archive-popup-top);
    left: var(--archive-popup-left);
    right: auto;
    bottom: auto;
    width: var(--archive-popup-width);
    box-sizing: border-box;
    border: 1px solid var(--color-card-border);
    padding: 16px;
    max-height: calc(100dvh - var(--archive-popup-top) - 12px);
    pointer-events: auto;
    animation: none;
  }
  .archive-filter-panel__sheet .archive-select,
  .archive-search-panel .archive-search { display: block; width: 100%; min-width: 0; }
  .archive-filter-panel__sheet :is(input, select) { font-size: 16px; }
  .archive-filter-panel__sheet :is(button, input, select):focus { outline: none; box-shadow: none; }
}

/* Shared full-width search disclosure beneath the sticky toolbar. */
#archive-sticky-search { display: inline-flex; }
.archive-sticky-search-row { padding-top: 0; padding-bottom: 20px; }
.archive-sticky-search-row[hidden] { display: none; }
#archive-sticky-input {
  display: block; box-sizing: border-box; width: 100%; height: 54px;
  padding: 12px 16px 12px 48px; font-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f3f4' stroke-width='1.8'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px center; background-size: 22px;
}
/* Matching feathered tint over both community CTA heat maps. */
.archive-community::after,
.archive-dock__wall::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(1, 20, 23, .52), rgba(1, 20, 23, .25) 18%, transparent 42%);
}

/* Place the tint above the canvas and below the sticky label. */
.archive-dock__wall::after {
  z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(1, 20, 23, .25) 18%, rgba(1, 20, 23, .52) 38%, rgba(1, 20, 23, .52) 62%, rgba(1, 20, 23, .25) 82%, transparent);
}

/* One fixed stack avoids a sticky/fixed handoff and keeps the divider inset
   from Safari's viewport edge. The slot reserves only the primary nav. */
.transmissions-page {
  --archive-nav-top: max(var(--frame-margin), env(safe-area-inset-top, 0px));
  --archive-dock-inset: 0px;
}
.transmissions-page .site-frame {
  border-top: 0;
  padding-top: max(0px, calc(var(--archive-nav-top) - var(--frame-margin)));
}
body.transmissions-page:has(#archive-crumb:not([hidden])) .site-frame {
  padding-top: max(0px, calc(var(--archive-nav-top) - var(--frame-margin)));
}
.archive-nav-slot { height: var(--t-nav-height, 64px); }
.archive-nav-stack {
  position: fixed;
  top: var(--archive-nav-top);
  left: calc(var(--frame-margin) + 1px);
  right: calc(var(--frame-margin) + 1px);
  z-index: 100;
  background: var(--color-bg);
}
.archive-nav-stack::before {
  content: "";
  position: absolute;
  bottom: 100%; left: -1px; right: -1px;
  height: var(--archive-nav-top);
  background: var(--color-bg);
  pointer-events: none;
}
.archive-nav-stack > .nav { position: relative; top: auto; }
.archive-nav-stack > .nav::before { content: none; }
.archive-nav-stack > .archive-crumb {
  position: relative;
  top: auto; left: auto; right: auto;
  border-left: 0; border-right: 0;
}
@media (max-width: 759px) {
  .transmissions-page {
    --archive-dock-inset: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  }
  .transmissions-page .archive-dock { bottom: var(--archive-dock-inset); }
  .transmissions-page .archive-dock__wall { padding: 22px 0; }
}

/* The condensed community link belongs to the top navigation stack. */
.archive-nav-stack > .archive-dock {
  position: relative;
  inset: auto;
  border: 0;
  border-bottom: 1px solid var(--color-card-border);
}

/* A slim label strip in the sticky navigation stack. */
.archive-nav-stack .archive-dock .archive-dock__wall {
  padding: 8px 12px;
  line-height: 1.25;
  align-items: center;
}

/* No bottom dock remains; finish the feed compactly with room for copyright. */
.transmissions-page .archive-grid-section { padding-bottom: 24px; }

/* Match the Community Wall footer despite this page's edge-to-edge viewport. */
.transmissions-page .site-footer { padding-bottom: 24px; }

@media (max-width: 759px) {
  .archive-filter-panel__sheet { border-top: 0; }
  .archive-filter-panel__close { border: 0; }
}
