/* Homepage additions are hidden on desktop; all layout changes are phone-only. */
.mobile-only { display: none; }

@media (max-width: 640px) {
  html { scroll-padding-top: 54px; }
  body { overflow-x: clip; }
  .mobile-only { display: block; }
  .hero-desktop-copy { display: none; }
  .hero-section { padding-top: 5rem !important; padding-bottom: 0 !important; }
  .hero-eyebrow { font-size: .65rem; letter-spacing: .12em; }
  .hero-lead { font-size: 1rem; line-height: 1.6; color: #d0cbcb; margin-bottom: 1.25rem; }
  .mobile-entry-actions { display: grid; gap: .5rem; width: 100%; max-width: 25rem; }
  .mobile-entry-actions a { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border: 1px solid #5a3437; border-radius: 4px; font-size: 1rem; color: #f4eeee; background: #100b0c; }
  .mobile-entry-actions .mobile-search-entry { background: #990e25; border-color: #b52a40; font-weight: 600; }
  .mobile-statistics { width: 100%; margin-top: .75rem; text-align: left; }
  .mobile-statistics > summary { min-height: 48px; padding: .65rem .25rem; color: #c2b7aa; font-size: .875rem; cursor: pointer; }
  #mobile-statistics-content { padding: .75rem 0; }
  .hero-stats-grid { max-width: none; }
  .hero-stats-grid .stat-card > div:last-child { font-size: .75rem !important; color: #c9c3c3; letter-spacing: .04em; }
  .archive-methodology { margin: .5rem 0 1rem; }
  .archive-methodology summary { font-size: .75rem; letter-spacing: .05em; }
  .archive-methodology-item span { font-size: .875rem; color: #b8b2a8; }
  .hero-quote { display: none; }
  .hero-actions { margin: 0 auto; }
  .hero-actions a { font-size: .75rem !important; min-height: 44px; letter-spacing: .04em !important; }
  #articles { scroll-margin-top: 0; }
  main > #articles { padding-top: 1.5rem !important; }
  #articles h2 { margin-bottom: 1rem; }
  .archive-search-toolbar { position: sticky; top: 54px; z-index: 40; background: #050505; padding: .5rem 0; margin-bottom: .75rem; }
  .article-search-row.flex { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
  #article-search { min-height: 48px; font-size: 16px; padding-right: .5rem; }
  #article-search::placeholder { color: #aaa; }
  #sort-controls { width: auto; }
  #sort-controls .filter-chip { min-height: 48px; padding: .5rem .65rem; font-size: .75rem; letter-spacing: 0; }
  #filter-controls { scroll-margin-top: 64px; max-height: 60svh; }
  #sort-controls .mobile-only { display: inline; }
  .active-filter-strip { gap: .5rem; flex-wrap: wrap; }
  .active-filter-label { color: #b9b1a6; font-size: .75rem; }
  #mobile-reset-filters { min-height: 44px; padding: .35rem .7rem; border: 1px solid #4d4141; border-radius: 4px; color: #eee; font-size: .875rem; }
  .active-filter-chip { font-size: .8rem; color: #d0c8be; }
  .active-filter-chip { min-height: 44px; }
  .mobile-density-control { margin: 0; padding: .4rem; gap: .75rem; }
  .mobile-density-label { color: #bcb5b5; font-size: .75rem; }
  .mobile-density-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-density-btn { min-height: 44px; color: #bcb5b5; font-size: .75rem; text-transform: none; letter-spacing: 0; }
  #article-grid { display: grid; gap: 1rem; }
  #article-table-wrap { display: none; }
  #article-grid .archive-article-card { position: relative; overflow: visible; }
  #article-grid .archive-article-card > div:first-child { border-radius: 4px 4px 0 0; }
  #article-grid h3 { font-size: 1.2rem; line-height: 1.35; }
  #article-grid .article-category-pill { color: #e87585; font-size: .7rem; letter-spacing: .02em; }
  #article-grid .article-card-body > div:first-child { flex-wrap: wrap; gap: .35rem; margin-bottom: .65rem; }
  #article-grid .article-card-body > div:first-child > span { color: #b9b1b1; font-size: .75rem; letter-spacing: 0; }
  #article-grid .article-card-body > p { color: #bcb6b6; font-size: .95rem; line-height: 1.5; -webkit-line-clamp: 2; margin-bottom: .5rem; flex-grow: 0; }
  #article-grid .article-author-line { color: #bbb3ad; font-size: .75rem; letter-spacing: .02em; white-space: normal; }
  #article-grid .article-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #article-grid .article-action-btn { min-height: 44px; height: auto; gap: .35rem; font-size: .75rem; color: #d5cece; }
  .mobile-article-more { position: relative; }
  .mobile-article-more summary { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #303030; border-radius: 4px; background: #101010; color: #d5cece; font-size: .75rem; cursor: pointer; list-style: none; }
  .mobile-article-more summary::-webkit-details-marker { display: none; }
  .mobile-article-more summary::after { content: '⌄'; margin-left: .5rem; }
  .mobile-article-more-panel { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; width: 160px; padding: .5rem; border: 1px solid #444; border-radius: 4px; background: #111; box-shadow: 0 10px 25px #000; }
  .mobile-article-more-panel .article-action-btn { margin: .15rem 0; }
  #article-grid .article-save-overlay { width: 44px; height: 44px; top: .4rem; left: .4rem; }
  #article-grid .share-popover { left: auto; right: 0; }
  html[data-mobile-density="compact"] #article-grid .archive-article-card > div:first-child { position: absolute; right: 1rem; top: 1rem; width: 80px; height: 80px; border-radius: 4px; }
  html[data-mobile-density="compact"] #article-grid .article-card-body > div:first-child,
  html[data-mobile-density="compact"] #article-grid h3 { margin-right: 96px; }
  html[data-mobile-density="compact"] #article-grid h3 { min-height: 65px; }
  html[data-mobile-density="compact"] #article-grid .article-card-body { padding: 1rem; }
  html[data-mobile-density="compact"] #article-grid .article-card-footer { margin-top: .5rem; padding-top: .65rem; }
  #mobile-featured-story { margin: 0 1rem 2rem; }
  #mobile-featured-story:empty { display: none; }
  #mobile-featured-story .story-welcome { position: static; width: 100%; max-height: none; overflow: visible; opacity: 1; transform: none; box-shadow: none; padding: 1rem; }
  #mobile-featured-story .story-welcome-title { font-size: 1.4rem; }
  #mobile-featured-story .story-welcome-summary { font-size: 1rem; }
  #mobile-featured-story .story-welcome-importance { display: none; }
  #mobile-featured-story .story-welcome-eyebrow,
  #mobile-featured-story .story-welcome-meta,
  #mobile-featured-story .story-welcome-source { font-size: .75rem; letter-spacing: .04em; }
  a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #d4af37; outline-offset: 3px; }
}
