/* Button reset for the existing About/Donate menu actions. The same text-only
   presentation is preserved on desktop and mobile. */
.nav-action {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

/* Visible label for compact navigation; do not change desktop navigation. */
.mobile-nav-heading {
  display: none;
}

/* Crowded.news | Responsive edition
   Loaded AFTER news.css and politics.css.
   All layout changes below are scoped to screens narrower than 992px,
   so the traditional desktop newspaper layout is preserved.
*/

@media (max-width: 991.98px) {
  /* The original mobile CSS sets html to .58rem (about 9px on phones).
     Use a normal reading baseline instead of scaling every element down. */
  html {
    font-size: 16px !important;
  }

  body {
    margin-top: 0;
    line-height: 1.45;
    text-shadow: none;
    background: #fff;
    color: #171717;
    overflow-wrap: break-word;
  }

  body a:visited {
    color: #555;
  }

  /* Newspaper masthead: keep this centered, not the article copy. */
  #topBar {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    height: auto !important;
    min-height: 88px;
    padding: 14px 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #siteTitle {
    width: 100% !important;
    float: none;
    /* The original 1.65rem made the newspaper logo look tiny on phones. */
    font-size: clamp(2.25rem, 11.25vw, 3.3rem) !important;
    line-height: 1.12;
    text-align: center;
    overflow-wrap: normal;
  }

  #siteTitle small {
    font-size: .82em;
  }

  /* The Politics edition has a longer title: use a deliberate two-line masthead. */
  #siteTitle.politics-masthead small {
    display: block;
    font-size: .61em;
    line-height: 1.1;
    margin-bottom: 1px;
  }

  #siteCatchPhrase,
  #localWeather,
  #currentVolume,
  #donations {
    display: none !important;
  }

  #topBar2 {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    margin: 0 auto;
    padding: 8px 0 10px;
    display: flex;
    justify-content: center;
  }

  #currentDate {
    width: 100%;
    /* 16px date and clock instead of the previous 12.5px. */
    font-size: 1rem !important;
    line-height: 1.4;
    font-style: normal;
    text-align: center;
    color: #555;
  }

  /* Use Bootstrap's standard collapse, but make the affordance clear.
     A sticky navigation row lets readers change sections while scrolling. */
  #nav-contain {
    z-index: 1020;
    background: #f8f8f6;
  }

  nav.navbar {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    min-height: 56px;
    margin: 0 auto;
    padding: 6px 0;
    background: #f8f8f6 !important;
    font-size: 1rem;
    line-height: 1.35;
  }

  .mobile-nav-heading {
    display: block;
    margin-right: auto;
    font-family: 'Heebo-Black', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .01em;
    color: #171717;
  }

  .navbar-toggler {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    border: 1px solid #9c9c9c;
    border-radius: 3px;
    padding: 7px 11px;
    color: #171717;
    background: #fff;
  }

  .nav-menu-label {
    font-family: 'Roboto-Medium', Arial, sans-serif;
    font-size: .95rem;
    font-weight: 600;
  }

  #navbarNav {
    width: 100%;
    margin-top: 7px;
    border-top: 1px solid #d6d6d6;
    background: #fff;
  }

  #navbarNav .navbar-nav {
    display: block;
    width: 100%;
    margin-left: 0 !important;
  }

  #navbarNav .nav-item {
    display: block;
    width: 100%;
    margin: 0;
  }

  #navbarNav .nav-link,
  #navbarNav .nav-action {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    color: #181818 !important;
    text-align: left;
    text-decoration: none;
    font: inherit;
    line-height: 1.3;
    border: 0;
    border-bottom: 1px solid #ededed;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
  }

  #navbarNav .nav-link:hover,
  #navbarNav .nav-action:hover,
  #navbarNav .nav-link:focus-visible,
  #navbarNav .nav-action:focus-visible {
    background: #f0f0ed;
    text-decoration: underline;
  }

  .navbar-toggler:focus-visible,
  .topStory a:focus-visible,
  .sectionTitle a:focus-visible {
    outline: 3px solid #555;
    outline-offset: 2px;
  }

  .menu-double {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    margin-bottom: 0;
  }

  /* Ensure section jump-links land below the sticky menu. */
  a.anchor {
    margin-top: 0;
    padding-bottom: 0;
    height: 0;
    scroll-margin-top: 74px;
  }

  #about {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    padding: 12px 2px;
    font-size: 1rem;
    line-height: 1.55;
    text-align: left;
  }

  #hiddenDiv {
    width: calc(100% - 32px);
    margin: 0 auto;
    font-size: 1rem;
  }

  #donationImage {
    width: min(200px, 80vw);
    height: auto;
  }

  /* Mobile editorial rhythm: section bar, lead story, article list. */
  .sectionTitle {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    margin: 20px auto 0;
    padding: 9px 11px;
    font-size: 1.125rem !important;
    line-height: 1.25;
    letter-spacing: .015em;
    text-align: left;
    background: #151515;
    color: #fff;
  }

  .sectionTitleLink,
  .sectionTitleLink:visited {
    color: #fff !important;
  }

  .moreLink {
    font-size: .65em !important;
    padding: 3px 6px;
    border-radius: 2px;
  }

  .topStory {
    width: calc(100% - 32px) !important;
    max-width: 840px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 12px 0 0;
    align-items: stretch;
  }

  .headline,
  .topHeadline {
    display: block;
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0;
    text-align: left !important;
    text-transform: none;
    line-height: 1.28;
    font-size: clamp(1.28rem, 4.8vw, 1.55rem) !important;
    text-wrap: pretty;
  }

  .topHeadline p {
    margin: 0 0 11px;
  }

  .headlineLinks {
    font-family: 'Roboto-Medium', Arial, sans-serif;
    font-size: .62em !important;
    line-height: 1.35;
    font-weight: 400;
    color: #5b5b5b;
  }

  .imageThumb,
  .primaryThumb {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    max-height: 360px;
    margin: 0 auto 12px;
    object-fit: contain;
  }

  .feed {
    display: block;
    float: none !important;
    width: 100% !important;
    padding: 5px 0 0 !important;
    margin-top: 14px;
    border-left: 0 !important;
    border-top: 1px solid #b9b9b9;
    text-align: left !important;
    font-size: 1rem !important;
    line-height: 1.5;
  }

  .feed p {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #e4e4e4;
    text-wrap: pretty;
  }

  .feed p:last-child {
    border-bottom: 0;
  }

  .remainderLinks {
    font-size: .86em !important;
    font-weight: 400;
    line-height: 1.45;
    color: #5b5b5b;
  }

  .remainderLinks a {
    color: #515151;
  }

  .double,
  .dashDouble {
    width: calc(100% - 32px) !important;
    max-width: 840px;
  }

  #copyright {
    width: calc(100% - 32px);
    max-width: 840px;
    margin: 0 auto;
    padding: 0 0 24px;
    font-size: .75rem;
    line-height: 1.55;
    color: #555;
    text-shadow: none;
  }
}

/* On a wide tablet, the familiar newspaper's two-column story layout fits
   again. Narrow phones and most tablets retain the more readable stack. */
@media (min-width: 860px) and (max-width: 991.98px) {
  .topStory {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
  }

  .feed {
    margin: 0;
    padding: 0 0 0 22px !important;
    border-top: 0;
    border-left: 1px dashed #8b8b8b !important;
  }
}
