/* Mobile navigation drawer (shared, activated below 1180) */
@media (max-width: 1180px) {
  .gkpg-burger {
    display: inline-flex;
  }

  /* Elevate the sticky masthead's stacking context above page content
     while the drawer is open, so the fixed drawer paints over the hero. */
  .gkpg-masthead:has(.gkpg-nav.is-open) {
    z-index: 200;
  }

  .gkpg-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(88vw, 22rem);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--gkpg-gap-4);
    background: var(--gkpg-surface-2);
    border-left: var(--gkpg-rule-bold) solid var(--gkpg-lime);
    padding: 5rem var(--gkpg-gap-5) var(--gkpg-gap-5);
    transform: translateX(100%);
    transition: transform var(--gkpg-ease);
    visibility: hidden;
    z-index: 110;
    overflow-y: auto;
  }

  .gkpg-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .gkpg-nav__list {
    flex-direction: column;
    gap: var(--gkpg-gap-3);
  }

  .gkpg-nav__link {
    font-size: 1.1rem;
    padding-block: 0.6rem;
    border-bottom: var(--gkpg-rule-thin) solid var(--gkpg-line);
  }

  .gkpg-nav__cta {
    width: 100%;
    justify-content: center;
  }

  .gkpg-scrim {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 3, 0.6);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--gkpg-ease);
  }

  .gkpg-scrim.is-open {
    opacity: 1;
    visibility: visible;
  }

  .gkpg-with-aside {
    grid-template-columns: 1fr;
  }

  .gkpg-aside {
    position: static;
    border-left: none;
    border-top: var(--gkpg-rule-thin) solid var(--gkpg-line);
    padding-left: 0;
    padding-top: var(--gkpg-gap-4);
  }

  .gkpg-aside ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1180px) {
  .gkpg-hero__grid {
    grid-template-columns: 1fr;
  }

  .gkpg-hero__issue {
    display: none;
  }

  /* Side-index article layout (rating / views / legal pages):
     drop the sticky 15rem index to a static full-width block. */
  .gkpg-layout__grid {
    grid-template-columns: 1fr;
  }

  .gkpg-sideindex {
    position: static;
    top: auto;
    border-left: none;
    border-top: var(--gkpg-rule-bold) solid var(--gkpg-lime);
    padding-left: 0;
    padding-top: var(--gkpg-gap-3);
  }

  .gkpg-sideindex ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Multi-column card grids collapse to two columns on tablet. */
  .gkpg-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gkpg-index {
    grid-template-columns: repeat(2, 1fr);
  }

  .gkpg-index__cell:nth-child(even) {
    transform: none;
  }

  .gkpg-index__cell:nth-child(2n) {
    border-right: none;
  }

  .gkpg-features {
    grid-template-columns: 1fr;
  }

  .gkpg-feature--lead,
  .gkpg-feature--stat,
  .gkpg-feature--list {
    grid-column: 1 / -1;
  }

  .gkpg-excerpts {
    grid-template-columns: 1fr;
  }

  .gkpg-directory {
    grid-template-columns: 1fr;
  }

  .gkpg-split,
  .gkpg-split--reverse {
    grid-template-columns: 1fr;
  }

  .gkpg-split--reverse .gkpg-split__media {
    order: 0;
  }

  .gkpg-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gkpg-collage-band {
    grid-template-columns: 1fr;
  }

  .gkpg-collage-band .gkpg-frame {
    grid-column: 1 / -1 !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .gkpg-index {
    grid-template-columns: 1fr;
  }

  .gkpg-index__cell {
    border-right: none;
    border-bottom: var(--gkpg-rule-thin) solid var(--gkpg-line);
  }

  .gkpg-index__cell:last-child {
    border-bottom: none;
  }

  .gkpg-tickrow {
    grid-template-columns: 1fr;
  }

  .gkpg-aside ol {
    grid-template-columns: 1fr;
  }

  .gkpg-sideindex ul {
    grid-template-columns: 1fr;
  }

  .gkpg-grid--3 {
    grid-template-columns: 1fr;
  }

  .gkpg-profile__facts {
    grid-template-columns: 1fr;
  }

  .gkpg-footer__grid {
    grid-template-columns: 1fr;
  }

  .gkpg-ledger__row {
    grid-template-columns: 2.4rem 1fr;
    grid-template-areas:
      "rank name"
      "rank score";
  }

  .gkpg-ledger__rank {
    grid-area: rank;
  }

  .gkpg-ledger__score {
    grid-area: score;
    text-align: left;
  }

  .gkpg-criterion {
    grid-template-columns: 2.2rem 1fr;
  }

  .gkpg-criterion__weight {
    grid-column: 2;
    justify-self: start;
  }

  .gkpg-consent__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .gkpg-consent__actions .gkpg-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .gkpg-totop {
    bottom: 8.5rem;
  }
}

@media (max-width: 400px) {
  :root {
    --gkpg-shell: 100%;
  }

  .gkpg-profile__top {
    flex-direction: column;
  }

  .gkpg-actions .gkpg-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 1600px) {
  .gkpg-section {
    padding-block: clamp(3rem, 5vw, 5rem);
  }
}
