/* ============================================================
   polish.css — subtle modal + mobile refinements
   Loaded AFTER app.css so these rules take precedence.
   ============================================================ */

:root {
  --tr-navy: #015581;
  --tr-navy-deep: #013e5d;
  --tr-red: #ff675f;
  --tr-red-hover: #eb534b;
  --tr-ink: #1a2530;
  --tr-muted: #6b7884;
  --tr-rule: rgba(1, 85, 129, 0.12);
}

/* ---------- 1. Hero heading respects small screens ------------ */
h1 {
  text-wrap: balance;
}
.mainContent > h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
}

/* ---------- 2. Top bar: stack nav + social as centered rows ---- */
@media screen and (max-width: 39.9375em) {
  .top-bar {
    padding: 0.35rem 1rem !important;
  }
  .top-bar > .columns {
    padding: 0 !important;
  }
  /* Stack the nav links and the social icons as two centered rows. */
  .top-bar .mainContent {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  /* Foundation turns BOTH menus into drilldowns (meant to live behind a
     hamburger toggle this layout doesn't have), so they render as tall
     vertical lists and get a fixed inline height stamped on the .is-drilldown
     wrapper. Neutralize the wrapper and show each as one centered, wrapping
     horizontal row instead. */
  .top-bar-left .is-drilldown,
  .top-bar-right .is-drilldown {
    height: auto !important;
    width: auto !important;
  }
  .top-bar-left ul.menu,
  .top-bar-right ul.menu {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
  }
  .top-bar-left ul.menu > li,
  .top-bar-right ul.menu > li {
    flex: 0 0 auto;
  }
  .top-bar-left ul.menu > li > a {
    padding: 0.5rem 0.55rem;
    font-size: 12px;
    letter-spacing: 0.03em;
  }
  /* Social icon row sits just under the nav links. */
  .top-bar-right ul.menu > li > a {
    padding: 0.2rem 0.5rem;
  }
}

/* ---------- 3. Bio: photo above text on mobile ----------------- */
@media screen and (max-width: 39.9375em) {
  #about > .row {
    display: flex;
    flex-direction: column;
  }
  #about .bio-photo {
    order: -1;
    margin-bottom: 1.25rem;
    text-align: center;
  }
  #about .bio-photo img {
    max-width: 270px;
    border-radius: 4px;
    /* The image is display:block, so text-align:center on the parent can't
       center it — auto side margins do. */
    margin-left: auto;
    margin-right: auto;
  }
}
.bio-photo img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- 4. Book cards — better stacked spacing on mobile --- */
@media screen and (max-width: 39.9375em) {
  #books .row > .columns + .columns,
  #books .row > .column + .column {
    margin-top: 3rem;
  }
}

/* ---------- 4b. Books grid: use CSS Grid at medium-up ----------
   The floated Foundation grid leaves the 6th book hanging alone
   on its own row whenever an earlier card is taller than its
   neighbours. A real grid keeps the 3×2 layout intact at every
   width and gives each row a consistent baseline. */
@media screen and (min-width: 40em) {
  #books > .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.875rem;
    row-gap: 3.5rem;
    align-items: start;
  }
  /* Foundation's .row uses ::before / ::after pseudo-elements as a
     clearfix; under display:grid those pseudos become grid items and
     push the first real child into column 2. Suppress them. */
  #books > .row::before,
  #books > .row::after {
    content: none;
    display: none;
  }
  #books > .row > .columns,
  #books > .row > .column {
    width: auto;
    max-width: 100%;
    float: none !important;
    clear: none !important;
    padding-left: 0;
    padding-right: 0;
  }
  /* Modals inside book columns shouldn't be affected by grid sizing */
  #books > .row > .columns > .reveal {
    width: auto;
  }
}

/* ---------- 5. Book action links → real pill buttons ----------- */
/* Hide the inline | separators visually without touching markup.   */
#books .text-center.padding {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  font-size: 0;            /* swallow whitespace + | separators */
  line-height: 0;
  margin-top: 1.25rem;
}
#books .text-center.padding > a.bookLinks {
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: background-color 160ms ease, color 160ms ease,
    border-color 160ms ease;
}
#books .text-center.padding > a.bookLinks.lightRed {
  color: var(--tr-red);
  border-color: rgba(255, 103, 95, 0.55);
}
#books .text-center.padding > a.bookLinks.lightRed:hover {
  background: var(--tr-red);
  color: #fff;
  border-color: var(--tr-red);
}
#books .text-center.padding > a.bookLinks.lightBlue {
  color: var(--tr-navy);
  border-color: rgba(1, 85, 129, 0.35);
}
#books .text-center.padding > a.bookLinks.lightBlue:hover {
  background: var(--tr-navy);
  color: #fff;
  border-color: var(--tr-navy);
}
/* The "ORDER NOW" link — emphasize as primary */
#books .text-center.padding > a.bookLinks[href*="routledge"],
#books .text-center.padding > a.bookLinks[href*="amazon"],
#books .text-center.padding > a.bookLinks[href*="rowman"],
#books .text-center.padding > a.bookLinks[href*="novapublishers"] {
  background: var(--tr-red);
  color: #fff;
  border-color: var(--tr-red);
}
#books
  .text-center.padding
  > a.bookLinks[href*="routledge"]:hover,
#books .text-center.padding > a.bookLinks[href*="amazon"]:hover,
#books .text-center.padding > a.bookLinks[href*="rowman"]:hover,
#books .text-center.padding > a.bookLinks[href*="novapublishers"]:hover {
  background: var(--tr-red-hover);
  border-color: var(--tr-red-hover);
}

/* ---------- 6. Publications tabs: equal thirds on small -------
   Foundation floats the three tab titles in a row sized to their text,
   which overflows narrow screens and clips the last tab ("OP-EDS/REPORTS").
   On small, lay them out as three equal-width flex columns whose labels
   wrap, so all three always fit with no horizontal scroll or cutoff. */
@media screen and (max-width: 39.9375em) {
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow: visible;
  }
  /* Foundation's clearfix pseudo-elements would become stray flex items. */
  .tabs::before,
  .tabs::after {
    content: none;
    display: none;
  }
  .tabs-title {
    float: none;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
  .tabs-title > a {
    padding: 0.7rem 0.35rem;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }
}

/* ============================================================
   MODALS (Foundation .reveal)
   ============================================================ */

/* Darker, blurred backdrop + CSS-flex centering.
   We override Foundation's JS-calculated `top` on .reveal so the modal
   is centered by the overlay's flexbox layout instead. This avoids the
   "off-center on first open" issue caused by Foundation measuring
   modal height before fonts/content finish laying out.
   Only apply flex/visible styles when Foundation has shown the overlay
   (inline display:block) — otherwise the overlay would be visible at
   page load, painting everything blue. */
.reveal-overlay[style*="display: block"],
.reveal-overlay[style*="display:block"] {
  background-color: rgba(2, 28, 48, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem;
  overflow-y: auto;
}
.reveal-overlay[style*="display: block"] .reveal,
.reveal-overlay[style*="display:block"] .reveal {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 auto !important;
  max-height: none !important;
}

/* Container: rounded, lifted, hairline border, top accent bar */
.reveal {
  border: 1px solid rgba(2, 28, 48, 0.08);
  border-top: none;
  border-radius: 10px;
  box-shadow: 0 24px 60px -20px rgba(2, 30, 50, 0.45),
    0 2px 8px rgba(2, 30, 50, 0.08);
  padding: 2.25rem 2rem 2rem;
  animation: tr-reveal-in 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--tr-navy) 0%,
    var(--tr-navy) 70%,
    var(--tr-red) 100%
  );
  border-radius: 10px 10px 0 0;
}

@keyframes tr-reveal-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Opacity-only entrance (no transform). Used on mobile, where the close
   button is position:fixed — a transform on .reveal would briefly make it
   the containing block for the fixed button, causing it to jump from the
   modal corner to the viewport corner when the animation ends. */
@keyframes tr-reveal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sensible measure for body copy inside modals */
.reveal > p,
.reveal > h1,
.reveal > h2,
.reveal > h3,
.reveal > h4,
.reveal > p.review {
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
}

/* Headings inside modals: navy, restrained */
.reveal h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tr-navy-deep);
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
  margin: 0 auto 1.25rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--tr-rule);
  max-width: 64ch;
  text-align: left;
}
.reveal h1 em {
  font-style: italic;
  color: var(--tr-ink);
}
.reveal h2 {
  font-size: 1.25rem;
  color: var(--tr-navy-deep);
  font-weight: 600;
}

/* Paragraph rhythm */
.reveal p {
  line-height: 1.6;
  color: var(--tr-ink);
}
.reveal p strong {
  color: var(--tr-navy-deep);
}

/* Review-style paragraphs → pull quote */
.reveal p.review {
  font-style: normal;
  font-size: 1rem;
  padding: 0.25rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--tr-navy);
  margin-bottom: 1.5rem;
  color: var(--tr-ink);
}
.reveal p.review .author {
  display: block;
  float: none;
  margin-top: 0.65rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--tr-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.reveal p.review a {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--tr-navy);
}

/* Close button: circular, easy to hit */
.reveal .close-button {
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(2, 28, 48, 0.06);
  color: var(--tr-navy-deep);
  font-size: 1.5rem;
  line-height: 1;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  z-index: 2;
}
.reveal .close-button span {
  position: relative;
  top: -2px;
}
.reveal .close-button:hover,
.reveal .close-button:focus {
  background: var(--tr-navy);
  color: #fff;
}

/* Mobile: tighter padding, full-bleed feel */
@media screen and (max-width: 39.9375em) {
  /* In this Foundation build the .reveal is NOT moved into the overlay — it
     stays in the page as position:absolute, and Foundation sets an inline
     `top` that, for a modal taller than the screen, goes negative and pushes
     the top off-screen with no way to scroll (body scroll is locked). So we
     take over positioning on mobile: pin the open modal to the viewport and
     let it scroll INTERNALLY. `[style*="display: block"]` targets only the
     currently-open modal (Foundation sets that inline style on open), and the
     !important overrides beat Foundation's inline top/left/width. dvh accounts
     for the mobile address bar; the vh line is a fallback. */
  .reveal[style*="display: block"],
  .reveal[style*="display:block"] {
    position: fixed !important;
    top: 1rem !important;
    left: 0.6rem !important;
    right: 0.6rem !important;
    bottom: auto !important;
    width: auto !important;
    margin: 0 !important;
    max-height: calc(100vh - 2rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .reveal {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 8px;
    /* No-transform entrance so the fixed close button doesn't jump (see
       tr-reveal-fade note above). */
    animation: tr-reveal-fade 200ms ease;
  }
  .reveal h1 {
    font-size: 1.2rem;
  }
  /* Pin the close button to the viewport so it stays in a consistent spot and
     never scrolls out of reach. The modal's own overflow doesn't clip it,
     because .reveal isn't its containing block (no transform/filter ancestor).
     A solid background + shadow keeps it legible over text. */
  .reveal .close-button {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--tr-navy);
    color: #fff;
    box-shadow: 0 2px 10px rgba(2, 30, 50, 0.35);
    z-index: 1006;
  }
}

/* Desktop: slightly wider small reveal so 64ch breathes */
@media screen and (min-width: 40em) {
  .reveal.small {
    width: 60%;
    max-width: 44rem;
  }
}

/* ---------- 7. Footer slightly less cramped ------------------- */
footer p {
  margin-top: 28px;
  margin-bottom: 28px;
}
/* The global `p, li { color: #15212c }` rule overrides footer's inherited
   white, leaving dark text on the navy footer. Restore white. */
footer,
footer p,
footer li {
  color: #fff;
}

/* ---------- 7b. Publication metadata caption under book buttons */
#books .book-pub-meta {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tr-red);
  font-style: normal;
  margin: -2rem 0 0;
  text-align: center;
}

/* ---------- 8. Global: square off all buttons to match cards --- */
/* Foundation defaults vary (0 / pill / etc.); normalize every
   button-like element to the 8px corner radius the article cards
   use. Modal close-button stays circular intentionally. */
.button,
button.button,
a.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  border-radius: 8px;
}

/* ============================================================
   TYPOGRAPHIC POLISH
   - Cap measure on body copy outside grids/cards
   - Modern wrap algorithms for headings & paragraphs
   - Thin reading-progress bar at the very top
   ============================================================ */

/* Raleway at weight 400 reads noticeably lighter than the system
   sans-serifs the site fell back to before Raleway was loading.
   Nudge body weight up to 450/500 and darken the ink so paragraphs
   feel as solid as they did with the old fallback. */
body {
  font-weight: 450;
  color: #15212c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
p,
li {
  color: #15212c;
}
.mainContent p,
#about p,
#interviewsEvents p {
  font-weight: 450;
}

/* Wrap algorithms — supported in modern browsers, ignored elsewhere */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}
p,
li,
blockquote,
.reveal p.review {
  text-wrap: pretty;
}

/* Cap line length on body copy in narrative sections.
   Scoped so it doesn't disturb the books grid, publications list,
   contact form, footer columns, etc. */
.mainContent > p,
#about p,
#interviewsEvents p,
.section-narrative p {
  max-width: 68ch;
}
/* Don't cap footer paragraphs — they're centered, so a 68ch cap left-
   aligns the block inside a wider column and breaks the centering. */
footer .mainContent > p,
footer p {
  max-width: none;
}

/* In the bio row, the prose sits inside a column — center the measure
   so it doesn't pin awkwardly to the left of a wide column. */
@media screen and (min-width: 40em) {
  #about .columns:not(.bio-photo) p {
    max-width: 68ch;
  }
}

/* Filter toggle button (floats in top-right) + collapsible inline bar.
   The button is taken out of normal flow so it doesn't push content
   down. The filter panel itself still expands inline below it. */
.pub-panel {
  position: relative;
}
.pub-toolbar {
  position: absolute;
  top: 0.5rem;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  pointer-events: none;
}
.pub-toolbar > * {
  pointer-events: auto;
}
/* Reserve room at the right of the meta line so it never tucks under
   the button, and add a smidge of top-padding so the button doesn't
   crowd the first row of cards on very narrow viewports. */
.pub-result-meta {
  padding-right: 9.5rem;
  min-height: 1.6rem;
}
@media screen and (max-width: 39.9375em) {
  .pub-result-meta {
    padding-right: 6rem;
  }
}
.pub-filter-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.82rem/1 "Raleway", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(1, 85, 129, 0.35);
  color: var(--tr-navy-deep);
  cursor: pointer;
  box-shadow: 0 6px 18px -10px rgba(2, 30, 50, 0.35),
    0 1px 2px rgba(2, 30, 50, 0.06);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease;
}
.pub-filter-toggle:hover {
  background: var(--tr-navy);
  color: #fff;
  border-color: var(--tr-navy);
}
.pub-filter-toggle[aria-expanded="true"] {
  background: var(--tr-navy);
  color: #fff;
  border-color: var(--tr-navy);
}
.pub-filter-toggle .pub-filter-toggle-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.pub-filter-mount[hidden] {
  display: none;
}
/* When open, drop the filter panel below the floating toggle button so the
   two never overlap — the toolbar is position:absolute in the top-right, and
   without this the search box tucks up under it. The button sits at top:0.5rem
   and is ~36px tall, so ~3rem clears it. */
.pub-filter-mount:not([hidden]) {
  margin-top: 3rem;
}

/* When filters are open, mute the result meta row to feel like a single
   panel rather than two stacked surfaces. */
.pub-filter-mount + .pub-result-meta {
  margin-top: 0.25rem;
}

/* ============================================================
   PUBLICATIONS — filter bar, chips, masonry-ish list
   ============================================================ */
.pub-panel {
  padding-top: 0.5rem;
}
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.1rem 1rem;
  background: #f6f8fa;
  border: 1px solid var(--tr-rule);
  border-radius: 10px;
}
.filter-search {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(2, 28, 48, 0.18);
  border-radius: 8px;
  padding: 0 0.85rem 0 2.3rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23015581' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>")
    no-repeat 0.7rem center / 16px 16px;
  color: var(--tr-ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-shadow: none;
  margin: 0;
}
.filter-search:focus {
  outline: none;
  border-color: var(--tr-navy);
  box-shadow: 0 0 0 3px rgba(1, 85, 129, 0.18);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.82rem/1 "Raleway", sans-serif;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(2, 28, 48, 0.16);
  color: var(--tr-ink);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}
.chip:hover {
  background: rgba(1, 85, 129, 0.06);
  border-color: rgba(1, 85, 129, 0.35);
}
.chip.is-active {
  background: var(--tr-navy);
  color: #fff;
  border-color: var(--tr-navy);
}
.chip-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(2, 28, 48, 0.08);
  color: var(--tr-muted);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  min-width: 1.5rem;
  text-align: center;
}
.chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.filter-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.filter-select {
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(2, 28, 48, 0.18);
  background: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--tr-ink);
  padding: 0 2rem 0 0.75rem;
  max-width: 100%;
  margin: 0;
  box-shadow: none;
}
.filter-select:focus {
  outline: none;
  border-color: var(--tr-navy);
  box-shadow: 0 0 0 3px rgba(1, 85, 129, 0.18);
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--tr-ink);
  cursor: pointer;
  margin: 0;
}
.filter-toggle input {
  margin: 0;
}

.pub-result-meta {
  font-size: 0.82rem;
  color: var(--tr-muted);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

/* Row-first reading order with tight column packing.
   We render N column containers in JS and round-robin items into them
   (item 0 → col 0, item 1 → col 1, item 2 → col 2, item 3 → col 0…),
   so reading across the top row stays newest-first while each column
   packs vertically without row-driven gaps from tall cards. */
.publications-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: start;
}
@media screen and (min-width: 40em) {
  .publications-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media screen and (min-width: 64em) {
  .publications-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.pub-col {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}
.publication-item {
  margin: 0;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid rgba(2, 28, 48, 0.06);
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.publication-item:hover {
  border-color: rgba(1, 85, 129, 0.22);
  box-shadow: 0 4px 14px -8px rgba(2, 30, 50, 0.18);
}
.publication-item strong {
  color: var(--tr-navy-deep);
}
.publication-item a {
  color: var(--tr-navy);
}
.publication-item a:hover { color: var(--tr-red); }
.publication-item img {
  max-width: 100%;
  height: auto;
  margin-top: 0.5rem;
  border-radius: 4px;
}

.pub-empty {
  font-size: 0.95rem;
  color: var(--tr-muted);
  text-align: center;
  padding: 2rem 0;
}
.link-button {
  background: none;
  border: none;
  color: var(--tr-navy);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.pub-loadmore {
  text-align: center;
  margin: 1.5rem 0 0.5rem;
}
.pub-loadmore .button {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Mobile-specific tweaks for the filter bar */
@media screen and (max-width: 39.9375em) {
  .filter-bar {
    padding: 0.85rem;
    border-radius: 8px;
  }
  /* Wrap the chips onto multiple rows instead of a horizontal-scroll strip,
     which clipped the trailing chips (2000s/1990s) off the right edge. */
  .filter-chips {
    flex-wrap: wrap;
  }
  .chip {
    flex: 0 0 auto;
  }
}

/* Reading-progress bar */
#tr-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--tr-navy) 0%, var(--tr-red) 100%);
  z-index: 9999;
  pointer-events: none;
  transition: width 80ms linear;
}
@media (prefers-reduced-motion: reduce) {
  #tr-read-progress {
    transition: none;
  }
}

/* ============================================================
   Utility classes — replaces inline style="" in markup
   ============================================================ */
.mt-1 { margin-top: 1rem; }
.mr-half { margin-right: 0.5rem; }
.no-underline { text-decoration: none; }
.hidden-init { display: none; }
.recaptcha-inset { padding-left: 14px; }
.form-messages {
  float: right;
  padding-right: 10px;
  font-weight: bold;
}
.submit-wide { width: 170px; }
