/* These additions live alongside the existing small-screen header and feed. */
.acu-desktop-intro, .acu-desktop-views, .acu-community-tools { display: none; }

@media screen and (min-width: 1024px) {
  .acu-community-layout {
    box-sizing: border-box;
    width: 100%;
    max-width: 78rem;
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2.8vw, 2.75rem) 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(13rem, 20vw, 17.5rem);
    align-items: start;
    gap: 1.1rem clamp(1rem, 2vw, 1.75rem);
  }
  .acu-community-layout .acu-desktop-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    grid-column: 1 / -1;
    box-sizing: border-box;
    min-height: clamp(9rem, calc(4rem + 7.6vw), 11.75rem);
    padding: clamp(1.125rem, 2.2vw, 2rem);
    border: 1px solid #415348;
    border-radius: 1rem;
    color: #f1f3ed;
    background: linear-gradient(90deg, rgba(8,23,16,.96), rgba(8,23,16,.79) 34%, rgba(8,23,16,.03) 77%),
      url('../../../../assets/images/allhir-v14-community.webp') center 42% / cover no-repeat, #10251a;
  }
  .acu-desktop-intro > div { max-width: 30rem; }
  .acu-desktop-intro h1 {
    margin: 0;
    color: #e8bf68;
    font-family: inherit;
    font-size: clamp(1.85rem, 3vw, 2.6rem);
    line-height: 1.1;
  }
  .acu-desktop-intro p { margin: .45rem 0 0; max-width: 40ch; color: #e3ece5; font: inherit; line-height: 1.45; }
  .acu-desktop-intro > a {
    display: inline-flex; flex: none; align-self: flex-start; align-items: center; gap: .45rem; min-height: 44px;
    padding: .4rem .9rem; border: 1px solid #899373; border-radius: .7rem;
    color: #eed18e !important; background: #142d1f; font-weight: 650; text-decoration: none;
  }
  .acu-desktop-intro > a span { font-size: 1.25rem; line-height: 1; }
  .acu-community-layout > .acu-desktop-views { grid-column: 1 / -1; width: 100%; margin: 0; }
  nav.acu-desktop-views {
    box-sizing: border-box; display: flex; align-items: stretch; flex-wrap: wrap; gap: .3rem;
    width: min(calc(100% - 2rem), 73rem); margin: 1rem auto; border-bottom: 1px solid #38483e;
  }
  nav.acu-desktop-views a {
    display: grid; align-items: center; padding: .6rem 1rem; min-height: 44px; box-sizing: border-box;
    color: #c2d0c6 !important; text-decoration: none; font-weight: 550;
    border-bottom: 2px solid transparent;
  }
  nav.acu-desktop-views a[aria-current] { border-color: #e8bf68; color: #e8bf68 !important; font-weight: 700; }
  nav.acu-desktop-views a:hover, .acu-community-shortcuts a:hover { color: #f4e3bb !important; background: #193529; }
  .acu-community-layout > #acu-community {
    min-width: 0; max-width: none; width: 100%; margin: 0; padding: 0;
  }
  #acu-community .acu-view { min-width: 0; }
  #acu-community .allhir-community-feed { width: 100%; margin: 0; }
  #acu-community .acu-mobile-entry { min-width: 0; }
  #acu-community .acu-mobile-permalink, #acu-community .acu-mobile-link, #acu-community .acu-mobile-pager a { color: #e8bf68; }
  #acu-community .acu-mobile-pager { display: flex; justify-content: space-between; gap: .75rem; margin-block: 1rem; }
  #acu-community .acu-mobile-note, #acu-community .acu-notice, #acu-community .acu-mobile-link {
    display: block; margin: 0 0 .75rem; padding: 1rem 1.15rem; border: 1px solid #38483e;
    border-radius: .75rem; background: #10251a; color: #c8d4cb; line-height: 1.55;
  }
  .acu-community-tools {
    display: grid; gap: 1rem; min-width: 0; font-size: 1rem; color: #f1f3ed;
  }
  .acu-community-tools section, .acu-community-shortcuts {
    box-sizing: border-box; min-width: 0; border: 1px solid #38483e; border-radius: .9rem;
    background: #10251a; padding: 1rem;
  }
  .acu-community-tools h2 { margin: 0 0 .8rem; color: #f1f3ed; font-weight: 650; font-family: inherit; font-size: 1.08rem; line-height: 1.4; }
  .acu-search-row { display: flex; min-width: 0; }
  .acu-community-tools :is(input, select) {
    box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 42px;
    padding: .45rem .65rem; border: 1px solid #536858; border-radius: .45rem; background: #101a14; color: #f1f3ed;
  }
  .acu-search-row input { border-radius: .45rem 0 0 .45rem; }
  .acu-search-row button {
    flex: none; display: grid; place-items: center; width: 44px; padding: 0; border: 1px solid #536858;
    border-inline-start: 0; border-radius: 0 .45rem .45rem 0; background: #213d2b; color: #e8bf68; cursor: pointer;
  }
  .acu-search-row svg { width: 20px; height: 20px; }
  .acu-community-tools summary { display: list-item; width: fit-content; margin-top: .3rem; padding-block: .4rem; cursor: pointer; color: #c2d0c6; font-size: .92rem; }
  .acu-community-tools details label { display: grid; gap: .25rem; margin: .5rem 0; }
  .acu-community-tools .acu-reset-search { color: #e8bf68; text-underline-offset: .15rem; }
  .acu-community-shortcuts { display: grid; padding: .4rem .75rem; }
  .acu-community-shortcuts a {
    display: flex; gap: .6rem; align-items: center; min-height: 44px; padding: .3rem .2rem; box-sizing: border-box;
    border-bottom: 1px solid #38483e; color: #e6eae5 !important; text-decoration: none;
  }
  .acu-community-shortcuts a:last-child { border-bottom: 0; }
  .acu-community-shortcuts svg { width: 20px; height: 20px; flex: none; color: #e8bf68; }
  .acu-community-layout :is(a, summary, input, select, button):focus-visible,
  .acu-desktop-views a:focus-visible { outline: 2px solid #e8bf68; outline-offset: 2px; }
}

@layer allhir-v14-mobile-layout {
  @media screen and (min-width: 1024px) {
    /* Keep the same canonical feed, permission checks and links under both headers. */
    body:has(.acu-desktop-views) nav:is(.acu-tabs, .acu-mobile-tabs),
    .acu-community-layout #acu-community > .acu-hub-header,
    .acu-community-layout #acu-community .acu-view > .acu-filters {
      display: none !important;
    }
    .acu-community-layout #acu-community .acu-view:has(> .acu-filters) > .acu-compose { display: none !important; }
    .acu-community-layout #acu-community .allhir-community-feed {
      display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 1rem !important;
      padding: 0 !important;
    }
    .acu-community-layout #acu-community .allhir-feed-card {
      display: block !important; box-sizing: border-box; width: 100% !important; min-width: 0; max-width: 100% !important;
      padding: clamp(.85rem, 1.2vw, 1.3rem) !important; margin: 0 !important;
      overflow-wrap: anywhere; border: 1px solid #38483e !important; border-radius: .9rem !important; background: #10251a !important;
    }
    .acu-community-layout #acu-community .allhir-feed-card__media {
      display: block !important; box-sizing: border-box; width: 100% !important; min-width: 0;
      max-width: 100% !important; min-height: 0 !important; height: auto !important; aspect-ratio: auto !important;
      margin: .75rem 0 !important; border-radius: .65rem !important; padding: 0 !important; background: #101614 !important;
    }
    .acu-community-layout #acu-community .allhir-r71-carousel-slide {
      display: grid; align-content: center; flex: 0 0 100%; max-width: 100%; margin: 0;
    }
    .acu-community-layout #acu-community .allhir-r71-carousel-slide :is(img,video) {
      display: block; width: 100% !important; height: auto !important; max-height: min(56vh, 30rem) !important;
      min-height: 0 !important; border-radius: 0 !important; aspect-ratio: auto !important; object-fit: contain !important;
    }
    .acu-community-layout #acu-community .allhir-feed-card__text {
      max-width: 100%; margin: .75rem 0 0 !important; padding: 0 !important; font-size: 1rem !important;
      line-height: 1.55 !important; background: transparent !important; border: 0 !important; color: #edf2ee !important;
    }
    .acu-community-layout #acu-community .allhir-feed-card__text.is-collapsed { -webkit-line-clamp: 6; }
    body:has(.acu-desktop-views) .allhir-r71-forum .allhir-r71-forum-board { min-width: 0; grid-template-columns: minmax(11rem, 26%) minmax(0, 1fr) !important; }
    body:has(.acu-desktop-views) :is(.allhir-r71-forum-content, .allhir-r71-forum-content__head > div, .allhir-r71-topic-list > a > div) { min-width: 0; }
    body:has(.acu-desktop-views) .allhir-r71-forum :is(.allhir-forum-eyebrow,.allhir-r71-forum-sections header small) { display: none !important; }
    body:has(.acu-desktop-views) .allhir-r71-forum :is(h2,h3,.allhir-r71-thread-body,.allhir-r71-post-body) { overflow-wrap: anywhere; white-space: normal; }
  }
}

@layer allhir-mobile-surfaces {
@media (min-width:768px) {
  html body .acu-community-layout .acu-desktop-intro :is(h1,a),
  html body #acu-community .acu-hub-header > h1,
  html body #acu-community a.acu-compose {
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
    letter-spacing:normal!important;text-transform:none!important;text-shadow:none!important;
  }
}
}
