/* --- 2026-08 UX consistency and accessibility pass --- */
:root {
  --page-max-width: 1320px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Off-screen until focused, so the first Tab on any page skips the ~10 header
   and nav links rather than walking a keyboard user through them per page. */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 200;
  transform: translateY(-150%);
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.container,
.header-container,
.footer-container,
.footer-bottom-bar-inner {
  max-width: var(--page-max-width);
}

:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Article pages share the site shell while preserving a readable line length. */
.article-page-shell > .back-link {
  width: min(100%, 1080px);
  margin-left: auto;
  margin-right: auto;
}

.article-layout {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: 4rem;
  align-items: start;
}

.article-container {
  max-width: none;
  min-width: 0;
  width: 100%;
  margin: 0;
}

/* Wrapper so the table of contents and linked concepts share one sticky
   column instead of competing for the same grid slot. */
.article-side-nav {
  order: 2;
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.article-toc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 1.25rem;
}

.article-toc-links {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.article-toc-links::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: var(--border);
}

.article-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-left: 1.25rem;
}

.article-concepts .article-toc-title {
  flex-basis: 100%;
  margin-bottom: 0;
}

.article-concept-link {
  display: inline-block;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.3rem 0.62rem;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.article-concept-link:hover,
.article-concept-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.article-toc-title {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc-link {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.35;
  padding: 0.42rem 0.55rem;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.article-toc-link:hover,
.article-toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--bg-secondary);
  text-decoration: none;
}

.article-toc-mobile {
  display: none;
}

.article-container section[id] {
  scroll-margin-top: 108px;
}

.related-papers {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-papers-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.related-papers-heading h2 {
  margin: 0;
}

.related-papers-heading > a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.related-papers-heading > a:hover,
.related-papers-heading > a:focus-visible {
  color: var(--accent);
}

.related-paper-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.related-paper-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 1rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.related-paper-card:hover,
.related-paper-card:focus-visible {
  color: var(--text-secondary);
  border-color: var(--accent);
}

.related-paper-card strong {
  color: var(--text-primary);
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.35;
}

.related-paper-card > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.related-paper-category {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feed-hero h1 small {
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.42em;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .related-paper-list {
    grid-template-columns: 1fr;
  }

  .feed-pagination {
    gap: 0.6rem;
  }

  .feed-pagination-current {
    font-size: 0.68rem;
  }
}

/* The disclosure remains visible and honest without competing with the title. */
.ai-disclosure {
  margin-top: 1.15rem;
  padding: 0.65rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-left-width: 1px;
  border-radius: var(--radius-sm);
}

.ai-disclosure-text {
  font-size: 0.8rem;
  line-height: 1.5;
}

.ai-disclosure-text strong {
  color: var(--text-primary);
}

.ai-disclosure-text a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

/* The disclosure and listening controls are both article utilities. Keep
   them as one compact cluster instead of stacking the generic header divider,
   header margins, and audio margins into a large empty band. */
.article-container article > header {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.article-container article > header + .article-audio-container {
  margin: 1.25rem 0 2.5rem;
}

/* Compact audio player: one clear action, with secondary choices tucked away. */
.article-audio-container {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  gap: 1rem 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
}

.audio-info,
.audio-primary-controls,
.device-audio-control {
  display: flex;
  align-items: center;
}

.audio-info {
  gap: 0.75rem;
}

.article-audio-container .audio-title-text {
  margin: 0 0 0.12rem;
  padding: 0;
  border: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 650;
}

.device-audio-play-btn {
  min-width: 88px;
  min-height: 42px;
  padding: 0.55rem 1rem;
}

.audio-settings {
  position: relative;
  justify-self: end;
}

.audio-settings summary {
  min-height: 42px;
  min-width: 44px;
  display: flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.audio-settings summary::-webkit-details-marker {
  display: none;
}

.audio-settings-chevron {
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.audio-settings summary:hover,
.audio-settings summary:focus-visible,
.audio-settings[open] summary {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-primary);
}

.audio-settings summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.audio-settings[open] {
  z-index: 5;
}

.audio-settings[open] .audio-settings-chevron {
  transform: rotate(180deg);
}

.audio-settings-fields {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 22rem) auto;
  justify-content: start;
  align-items: end;
  gap: 0.85rem;
  width: min(36rem, calc(100vw - 3rem));
  padding: 0.9rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.audio-settings-fields--speed-only {
  grid-template-columns: 7rem;
  width: auto;
}

.audio-restart-btn {
  min-height: 38px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
}

.audio-restart-btn:hover,
.audio-restart-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 560px) {
  .audio-settings-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.audio-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audio-speed-select {
  min-height: 38px;
  width: 100%;
  padding: 0.4rem 1.75rem 0.4rem 0.55rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
}

/* Device voice names run long ("Microsoft Sean - English (Ireland)"), so this
   fills the remaining column and truncates rather than setting a fixed width
   that is either too wide for short names or too narrow for long ones. */
#audio-voice-select {
  width: 100%;
  max-width: 100%;
  text-overflow: ellipsis;
}

.takeaways-list {
  list-style: disc;
  padding-left: 1.35rem;
}

.takeaways-list li {
  padding-left: 0.25rem;
}

.takeaways-list li::before {
  content: none;
}

.takeaways-list li::marker {
  color: var(--accent);
  font-size: 0.85em;
}

.diagram-section {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: auto;
}

.mermaid-inline-container svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.diagram-expand-btn {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.diagram-modal .close-modal {
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 650;
}

/* Compact feed introduction and visible overflow cues in both scroll columns. */
.feed-hero {
  padding: 0.25rem 0 0.9rem;
  margin-bottom: 1.25rem;
}

.feed-hero h1 {
  margin-bottom: 0.2rem;
}

.feed-hero p {
  max-width: 760px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.filters-sidebar,
.feed-sidebar-right {
  background:
    linear-gradient(var(--bg-primary) 30%, transparent) center top,
    linear-gradient(transparent, var(--bg-primary) 70%) center bottom,
    radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.38), transparent) center top,
    radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.38), transparent) center bottom;
  background-repeat: no-repeat;
  background-size: 100% 42px, 100% 42px, 100% 14px, 100% 14px;
  background-attachment: local, local, scroll, scroll;
}

[data-theme='light'] .filters-sidebar,
[data-theme='light'] .feed-sidebar-right {
  background-image:
    linear-gradient(var(--bg-primary) 30%, transparent),
    linear-gradient(transparent, var(--bg-primary) 70%),
    radial-gradient(farthest-side at 50% 0, rgba(30, 24, 20, 0.18), transparent),
    radial-gradient(farthest-side at 50% 100%, rgba(30, 24, 20, 0.18), transparent);
}

/* Hall of Fame timelines are now legible at a glance and usable by touch. */
.hof-section-timeline {
  min-width: 280px;
}

.hof-timeline-tick {
  width: 32px;
  height: 32px;
  background: transparent;
  transform: translate(-50%, -50%);
}

.hof-timeline-tick::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hof-timeline-tick:hover,
.hof-timeline-tick:focus-visible {
  transform: translate(-50%, -50%);
}

.hof-timeline-tick:hover::before,
.hof-timeline-tick:focus-visible::before {
  transform: translate(-50%, -50%) scale(1.55);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.hof-timeline-tick::after {
  width: 220px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  white-space: normal;
  text-align: left;
  line-height: 1.4;
  font-size: 0.7rem;
  padding: 0.5rem 0.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

@media (hover: hover) {
  .hof-panel,
  .paper-card,
  .compact-card,
  .article-toc-link,
  .filter-btn,
  .feed-filter-btn {
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  }
}

@media (max-width: 1150px) {
  .feed-sidebar-right {
    background: none;
  }
}

@media (min-width: 901px) and (max-width: 1150px) {
  .filters-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}

@media (min-width: 901px) and (max-width: 1050px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 2rem;
  }
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
  }
  .article-side-nav {
    display: none;
  }
  .article-toc-mobile {
    display: block;
    margin: -0.5rem 0 2.5rem;
    border-block: 1px solid var(--border);
  }
  .article-toc-mobile summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .article-toc-mobile nav {
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
  }
}

@media (max-width: 700px) {
  .article-audio-container {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .audio-info {
    grid-column: 1 / -1;
  }
  .audio-primary-controls {
    grid-column: 1;
  }
  .audio-settings {
    grid-column: 2;
    justify-self: start;
    border-top: 0;
    padding-top: 0;
  }
  .audio-settings[open] {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .audio-settings summary {
    width: max-content;
  }
  .article-audio-container[data-has-audio="0"] .audio-settings[open] summary {
    margin-left: calc(88px + 0.75rem);
  }
  .audio-settings-fields,
  .audio-settings-fields--speed-only {
    position: static;
    width: 100%;
    margin-top: 0.55rem;
    box-shadow: none;
  }
  .article-audio-element {
    max-width: 100%;
  }
  .hof-section-timeline {
    width: 100%;
    min-width: 0;
  }
  .main-layout.feed-3col {
    gap: 1.5rem;
  }
  .filters-sidebar {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .article-audio-container {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .audio-primary-controls {
    grid-column: 1;
  }
  .audio-settings {
    grid-column: 2;
  }
  .audio-settings[open] {
    grid-column: 1 / -1;
  }
  .device-audio-play-btn {
    width: auto;
  }
  .hof-timeline-tick::after {
    width: 180px;
    max-width: calc(100vw - 24px);
  }
}


/* Related concepts on a glossary term page: horizontal chips, since these are
   short noun phrases rather than sentences. */
.glossary-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.glossary-related-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.glossary-related-link:hover,
.glossary-related-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* Homepage topic row: three topics plus a link to the feed, so the row cannot
   overflow. The feed's own row is allowed to scroll horizontally, since
   browsing every topic is that page's purpose. */
.feed-filter-all-link {
  align-self: center;
  margin-left: auto;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.feed-filter-all-link:hover,
.feed-filter-all-link:focus-visible {
  text-decoration: underline;
}

.feed-layout .feed-category-filter {
  --topic-underline-offset: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}

.home-feed-section .feed-category-filter {
  flex-wrap: wrap;
  overflow-x: visible;
}

.home-topic-filter-summary {
  display: none;
}

@media (max-width: 768px) {
  .home-topic-filter {
    margin-bottom: 2rem;
  }

  .home-topic-filter-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    list-style: none;
  }

  .home-topic-filter-summary::-webkit-details-marker {
    display: none;
  }

  .home-topic-filter-summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .home-topic-filter-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .home-topic-filter-current {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-topic-filter-chevron {
    color: var(--text-muted);
    transition: transform 0.15s ease;
  }

  .home-topic-filter[open] .home-topic-filter-chevron {
    transform: rotate(180deg);
  }

  .home-topic-filter[open] .home-topic-filter-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .home-feed-section .feed-category-filter {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .home-feed-section .feed-filter-btn {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0;
    text-align: left;
  }

  .home-feed-section .feed-filter-btn.active::after {
    display: none;
  }

  .home-feed-section .feed-filter-all-link {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    justify-content: flex-start;
    min-height: 44px;
    margin-left: 0;
    padding: 0.65rem 0;
  }
}

@media (pointer: coarse) {
  .feed-filter-all-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* --- Shared responsive disclosure system ---
   Mobile selectors, jump navigation, filters, and desktop-rail content all
   use one trigger and attached-panel grammar. Their inner layouts can differ
   (letter grid, link list, filters), but the interaction never has to be
   relearned from page to page. */
.mobile-disclosure-summary {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: inherit;
  letter-spacing: normal;
  list-style: none;
  text-transform: none;
}

.mobile-disclosure-summary::-webkit-details-marker {
  display: none;
}

.mobile-disclosure-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mobile-disclosure-label {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: normal;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.mobile-disclosure-value {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: normal;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.mobile-disclosure-chevron {
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.mobile-disclosure[open] > .mobile-disclosure-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.mobile-disclosure[open] > .mobile-disclosure-summary .mobile-disclosure-chevron {
  transform: rotate(180deg);
}

.article-mobile-nav {
  display: none;
}

@media (max-width: 1150px) {
  .sidebar-disclosure > .mobile-disclosure-summary {
    display: grid;
  }

  .sidebar-disclosure > .mobile-disclosure-panel {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .sidebar-disclosure-panel > .sidebar-section-header {
    display: none;
  }
}

@media (max-width: 900px) {
  .filters-sidebar > .mobile-disclosure-summary {
    display: grid;
  }

  .filters-sidebar > .mobile-disclosure-panel {
    padding: 1rem 0.85rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .filters-sidebar {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .article-mobile-nav {
    display: grid;
    gap: 0.75rem;
    margin: -0.5rem 0 2.5rem;
  }

  .article-toc-mobile,
  .article-concepts-mobile {
    display: block;
    margin: 0;
    border: 0;
  }

  .article-toc-mobile > .mobile-disclosure-summary,
  .article-concepts-mobile > .mobile-disclosure-summary {
    display: grid;
  }

  .article-toc-mobile > .mobile-disclosure-panel,
  .article-concepts-mobile > .mobile-disclosure-panel {
    padding: 0.45rem 0.85rem 0.65rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .article-toc-mobile .article-toc-link {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .article-concepts-mobile-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem !important;
  }
}

@media (max-width: 900px) {
  .hof-toc > .mobile-disclosure-summary {
    display: grid;
  }

  .hof-toc {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .hof-toc > .mobile-disclosure-panel {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .hof-toc > .mobile-disclosure-panel {
    padding: 0.45rem 0.85rem 0.65rem;
  }
}

@media (max-width: 768px) {
  .glossary-toc-shell > .mobile-disclosure-summary {
    display: grid;
  }

  .glossary-toc-shell {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .glossary-toc-shell > .mobile-disclosure-panel {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .home-topic-filter > .mobile-disclosure-summary {
    display: grid;
  }

  .home-topic-filter > .mobile-disclosure-panel {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-primary);
  }

  .feed-sidebar-right {
    flex-direction: column;
    gap: 0.75rem;
  }

  .feed-sidebar-right .sidebar-section {
    width: 100%;
    flex: 0 0 auto;
  }
}

/* Glossary term pages share the article shell, so the back link starts at the
   same x as on every other page and the side column can carry the contents nav
   and related concepts. The term body needs no extra top padding of its own. */
.glossary-term-article {
  padding-top: 0;
}

.glossary-term-article .static-page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.glossary-audio-container {
  margin-bottom: 2.5rem;
}
