/* GA4 Q3 2026: desktop 57.51% / mobile 40.76% of Ledge.ai page views.
   CSS viewport layout: <768 phone, 768–1119 compact, >=1120 wide.
   Screen-resolution observations inform QA widths, not viewport measurements. */
:root {
  --page-width: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
}
.hero-inner,
.special-inner {
  max-width: calc(var(--page-width) + var(--gutter) * 2);
}
.hero h1 {
  font-size: clamp(52px, 5.4vw, 86px);
}
.hero-inner {
  min-width: 0;
}
/* Remove the inherited 5% translation, which exposed a flat strip at the
   left edge of the paper illustration, especially on wide monitors. */
.hero-art {
  transform: none;
}
.intro-copy,
.live-lead,
.schedule,
.story-copy {
  min-width: 0;
}
.live-lead {
  position: static;
}
.live-article-link,
.story-read,
.special-footer-links a,
#story-index-list a {
  min-height: 44px;
  align-content: center;
}
.special-footer-links a {
  display: inline-flex;
  align-items: center;
}
.special-nav {
  --special-nav-height: 64px;
}
.special-inner {
  min-height: var(--special-nav-height);
}
html {
  scroll-padding-top: calc(
    var(--ledge-shell-height) +
    var(--special-nav-height, 64px) +
    20px
  );
}
.mobile-menu {
  position: absolute;
  inset: 100% 0 auto;
  max-height: calc(100vh - var(--ledge-shell-height) - 64px);
  max-height: calc(
    100dvh -
    var(--ledge-shell-height) -
    64px -
    env(safe-area-inset-bottom, 0px)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
}
.nav-register,
.menu-button {
  min-height: 44px;
}
.menu-button {
  width: 44px;
  padding-inline: 11px;
  flex-shrink: 0;
}
#ledge-category-nav {
  justify-content: safe center;
}

/* Use the original mobile components until the full desktop navigation fits. */
@media (max-width: 1119px) {
  :root {
    --ledge-shell-height: 108px;
    --special-nav-height: 64px;
  }
  #ledge-desktop-header {
    display: none !important;
  }
  #ledge-mobile-header {
    display: flex !important;
    z-index: 60;
  }
  #ledge-mobile-header .hidden.md\:flex {
    display: none !important;
  }
  #ledge-mobile-header .flex.md\:hidden {
    display: flex !important;
  }
  #ledge-mobile-header [data-common-menu],
  #ledge-mobile-header [data-common-close] {
    min-width: 44px;
    min-height: 44px;
  }
  #ledge-category-nav {
    top: 0;
    margin-top: 68px;
    height: 40px;
    padding: 0;
    gap: 0;
    justify-content: flex-start;
  }
  #ledge-category-nav > a {
    display: flex;
    padding: 0 12px;
    min-height: 40px;
  }
  #ledge-category-nav > a > p {
    margin: 0;
    padding: 0;
  }
  #ledge-category-nav > a > p + p {
    display: none;
  }
  .special-links {
    display: none;
  }
  .menu-button {
    display: grid;
  }
  .mobile-menu:not([hidden]) {
    display: grid;
  }
  .nav-register {
    margin-left: auto;
  }
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero-art {
    position: static;
    transform: none;
    height: auto;
    aspect-ratio: 1672 / 941;
    object-fit: cover;
    width: 100%;
  }
  .hero-inner {
    min-height: 0;
    padding-block: 36px 24px;
  }
  .hero h1 {
    margin-top: 24px;
  }
  .live-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .live-lead {
    position: static;
  }
  .live-lead p {
    max-width: 580px;
  }
  .live-lead h2 {
    font-size: 30px;
  }
  .theme-opening {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .theme-art {
    max-width: 560px;
  }
  .special-footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .special-footer-registration {
    padding-left: 0;
    border-left: 0;
  }
  .special-footer-links {
    grid-template-columns: minmax(0, 1fr);
  }
  .special-footer-top {
    justify-self: start;
  }
  .ledge-common-footer footer > ul {
    flex-direction: column;
    gap: 16px;
  }
  .ledge-common-footer footer {
    padding-block: 32px;
  }
  .ledge-common-footer footer > div:last-child {
    margin-top: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1119px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .hero-inner {
    grid-column: 1;
    grid-row: 1;
    padding-right: 16px;
  }
  .hero-art {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    height: 100%;
    aspect-ratio: auto;
    object-position: 70% center;
  }
  .hero h1 {
    font-size: clamp(40px, 5.2vw, 58px);
  }
  .hero-english {
    margin-top: 18px;
    font-size: 12px;
  }
  .hero-bottom {
    margin-top: 20px;
  }
  .hero-bottom p {
    font-size: 14px;
  }
  .editorial-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
    gap: 36px;
    padding-block: 64px;
  }
  .intro-side {
    display: block;
  }
  .issue-mark {
    width: 100%;
    max-width: 180px;
    margin-top: 28px;
  }
  .intro-copy h2 {
    font-size: 32px;
  }
  .theme-opening {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 32px;
  }
  .theme-opening h2 {
    font-size: clamp(32px, 4.3vw, 46px);
  }
  .theme-description br {
    display: none;
  }
  .theme-art {
    margin-left: 12px;
  }
  .live-lead {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px 32px;
  }
  .live-date {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .live-lead h2,
  .live-lead p {
    grid-column: 2;
    margin-top: 0;
  }
  .live-lead .schedule-draft {
    grid-column: 2;
    margin-top: 0;
  }
  .live-lead .button {
    grid-column: 1;
    grid-row: 3 / span 2;
    min-width: 0;
    align-self: start;
    margin: 0;
  }
  .live-article-link {
    grid-column: 2;
    margin-top: 0;
  }
  .ye-bs-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-feature,
  .story-feature.lead,
  .story-feature.reverse {
    gap: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-feature h3,
  .story-feature.lead h3,
  .story-pair h3 {
    font-size: clamp(25px, 3vw, 30px);
  }
  .story-description {
    font-size: 14px !important;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 20px;
    --special-nav-height: 60px;
  }
  .special-nav {
    --special-nav-height: 60px;
  }
  .special-inner {
    gap: 8px;
    padding-inline: 16px 10px;
  }
  .special-name {
    font-size: 10px;
    letter-spacing: 0.02em;
  }
  .special-name .latin {
    font-size: 8px;
    letter-spacing: 0.06em;
  }
  .nav-register {
    padding: 10px 12px;
    font-size: 12px;
  }
  .nav-register span {
    margin-left: 8px;
  }
  .mobile-menu {
    max-height: calc(100vh - var(--ledge-shell-height) - 60px);
    max-height: calc(
      100dvh -
      var(--ledge-shell-height) -
      60px -
      env(safe-area-inset-bottom, 0px)
    );
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-top: 24px;
  }
  .hero-inner {
    display: contents;
  }
  .hero-overline {
    grid-row: 1;
    margin-inline: var(--gutter);
    font-size: 11px;
    gap: 12px;
  }
  .hero h1 {
    grid-row: 2;
    font-size: clamp(36px, 10.8vw, 60px);
    margin: 20px var(--gutter) 24px;
    line-height: 1.2;
  }
  .hero h1 > .hero-title-sub {
    margin-top: 10px;
    font-size: 0.5em;
  }
  .hero-english {
    display: none;
  }
  .hero-art {
    grid-row: 3;
    order: initial;
    aspect-ratio: 1.65;
    object-fit: cover;
    object-position: 70% center;
  }
  .hero-bottom {
    grid-row: 4;
    margin: 20px var(--gutter) 28px;
    max-width: none;
  }
  .hero-bottom p {
    font-size: 14px;
    line-height: 1.85;
  }
  .hero-bottom .button {
    margin-top: 18px;
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }
  .hero-benefit {
    font-size: 11px;
    margin-top: 10px;
  }
  .editorial-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    padding-block: 56px;
  }
  .intro-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .issue-mark {
    margin: 0;
    width: 112px;
    max-width: 40%;
  }
  .intro-copy h2 {
    font-size: clamp(27px, 6.5vw, 36px);
    line-height: 1.5;
    margin-bottom: 22px;
  }
  .intro-copy p {
    font-size: 16px;
    line-height: 2;
  }
  .live-section {
    padding-block: 28px 44px;
  }
  .section-top {
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .live-date {
    margin-bottom: 22px;
  }
  .live-date strong {
    font-size: 66px;
    line-height: 1;
  }
  .live-lead h2 {
    font-size: 29px;
    line-height: 1.45;
  }
  .live-lead p {
    font-size: 14px;
    line-height: 1.9;
    margin-top: 16px;
  }
  .schedule-draft {
    margin-top: 18px;
    font-size: 11px;
  }
  .live-lead .button {
    min-width: 0;
    width: 100%;
  }
  .live-article-link {
    margin-top: 10px;
    font-size: 12px;
  }
  .session-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    padding-block: 22px;
  }
  .session-time {
    font-size: 15px;
  }
  .session-time small {
    font-size: 10px;
  }
  .session-kind {
    font-size: 9px;
    letter-spacing: 0.03em;
  }
  .session-title {
    font-size: 17px;
    line-height: 1.65;
  }
  .session-people {
    flex-wrap: wrap;
    gap: 8px;
  }
  .avatar {
    width: 38px;
    height: 38px;
  }
  .speaker-names {
    font-size: 12px;
  }
  .session-action {
    font-size: 21px;
  }
  .session-action-label {
    display: none;
  }
  .schedule-footnote {
    font-size: 11px;
  }
  .stories-section {
    padding-block: 52px;
  }
  .theme-opening {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-bottom: 24px;
    margin-bottom: 24px;
  }
  .theme-opening h2 {
    font-size: clamp(31px, 8.4vw, 54px);
    margin-top: 24px;
  }
  .theme-label strong {
    font-size: 14px;
  }
  .theme-opening .theme-description {
    font-size: 14px;
    margin-top: 22px;
  }
  .theme-description br {
    display: none;
  }
  .theme-art {
    margin: 8px 0 16px 12px;
    max-width: none;
  }
  .theme-art img {
    aspect-ratio: 16 / 9;
  }
  .stories-collection-label {
    margin-bottom: 16px;
  }
  .story-index summary {
    min-height: 52px;
  }
  #story-index-list {
    grid-template-columns: minmax(0, 1fr);
  }
  #story-index-list a {
    font-size: 14px;
  }
  .story-feature,
  .story-feature.lead,
  .story-feature.reverse,
  .story-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .story-feature.reverse .story-image {
    order: initial;
  }
  .story-feature h3,
  .story-feature.lead h3,
  .story-pair h3 {
    font-size: clamp(25px, 6.8vw, 34px);
    line-height: 1.5;
  }
  .story-copy,
  .story-pair .story-copy {
    padding-top: 0;
  }
  .story-pair .story + .story {
    padding-top: 32px;
    border-top: 1px solid var(--color-line);
  }
  .story-pair .story-copy {
    margin-top: 24px;
  }
  .story-description,
  .story-feature .story-description,
  .story-pair .story-description {
    font-size: 16px;
    line-height: 1.95;
  }
  .story-meta {
    font-size: 11px;
  }
  .story-read {
    margin-top: 18px;
    font-size: 14px;
  }
  .story-spread {
    padding-bottom: 36px;
    margin-bottom: 36px;
  }
  .story-last {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .partners {
    padding-block: 44px 52px;
  }
  .partner-primary,
  .partner-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .partner-primary > div,
  .partner-secondary > div {
    min-height: 85px;
    padding: 10px;
    font-size: 11px;
  }
  .special-footer {
    padding-top: 36px;
  }
  .special-footer-registration .button {
    max-width: none;
  }
  .special-footer-links nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
  }
  .special-footer-links a {
    font-size: 12px;
  }
  .special-footer-registration p br {
    display: none;
  }
  .special-footer-dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .pickup {
    right: 12px;
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    width: auto;
    z-index: 25;
  }
  .pickup-close {
    z-index: 1;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--color-ink);
  }
  .pickup-link {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    min-height: 96px;
  }
  .pickup-link > img {
    width: 76px;
    height: 100%;
    object-fit: cover;
  }
  .pickup-link > span {
    padding: 10px 44px 10px 0;
  }
  .pickup small {
    font-size: 8px;
    letter-spacing: 0;
  }
  .pickup strong {
    font-size: 12px;
    line-height: 1.5;
    margin: 4px 0;
  }
  .pickup b {
    font-size: 10px;
  }
  .review-toggle {
    position: static;
    margin: 12px 20px 128px;
    min-height: 44px;
  }
  .review-panel {
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .review-panel select {
    font-size: 16px;
    min-height: 44px;
  }
}

@media (min-width: 1120px) {
  :root {
    --ledge-shell-height: 120px;
    --special-nav-height: 64px;
  }
  .special-links {
    display: flex;
    gap: clamp(14px, 1.4vw, 24px);
  }
  .menu-button,
  .mobile-menu {
    display: none !important;
  }
  .special-links a {
    padding-block: 20px;
  }
  .hero-inner {
    min-height: clamp(570px, calc(100svh - 184px), 780px);
    padding-block: 40px;
  }
  .hero h1 {
    font-size: clamp(62px, 5.4vw, 86px);
    margin-top: 32px;
  }
  .hero-bottom {
    margin-top: 28px;
  }
  .hero-bottom .button {
    margin-top: 20px;
  }
  .hero-english {
    margin-top: 22px;
  }
  .live-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: clamp(40px, 5vw, 80px);
  }
  .live-lead h2 {
    font-size: 31px;
  }
  .story-feature h3,
  .story-feature.lead h3 {
    font-size: clamp(30px, 2.7vw, 38px);
  }
  .story-pair h3 {
    font-size: clamp(28px, 2.5vw, 35px);
  }
  .story-feature,
  .story-feature.lead,
  .story-feature.reverse,
  .story-pair {
    gap: clamp(36px, 4vw, 56px);
  }
  .ye-bs-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1120px) and (min-height: 900px) {
  .live-lead {
    position: sticky;
    top: calc(var(--ledge-shell-height) + var(--special-nav-height) + 24px);
  }
}
@media (min-width: 1120px) and (max-height: 800px) {
  .hero-inner {
    min-height: 520px;
    padding-block: 28px;
  }
  .hero h1 {
    margin-top: 24px;
    font-size: clamp(58px, 5vw, 74px);
  }
  .hero h1 > .hero-title-sub {
    margin-top: 10px;
  }
  .hero-english {
    display: none;
  }
  .hero-bottom {
    margin-top: 24px;
  }
  .hero-bottom p {
    font-size: 14px;
  }
  .hero-bottom .button {
    margin-top: 16px;
    min-height: 50px;
  }
}
@media (max-height: 500px) and (max-width: 1119px) {
  .special-nav {
    position: relative;
    top: 0;
  }
  .mobile-menu {
    max-height: min(
      60vh,
      calc(100vh - var(--ledge-shell-height) - var(--special-nav-height))
    );
    max-height: min(
      60dvh,
      calc(100dvh - var(--ledge-shell-height) - var(--special-nav-height))
    );
  }
  .pickup {
    position: relative;
    inset: auto;
    width: auto;
    margin: 20px;
  }
}
