/* ==============================================
   Responsive: Tablet (980px)
   ============================================== */
@media (max-width: 980px) {
  /* Top bar — keep tagline + league logo, drop socials */
  .ch-top-bar-right {
    display: none;
  }

  .ch-top-bar-left {
    font-size: 11px;
  }

  /* Brand bar — make sticky on mobile so the burger is always reachable.
     Position: relative is needed so the nav slide-down panel anchors here. */
  .ch-brand-bar {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  /* Hide scoreboard cards on tablet to keep the brand bar tidy */
  .ch-scoreboard {
    display: none;
  }

  /* Nav row collapses to zero-height; its only job on mobile is to host the
     absolute-positioned slide-down nav-list. CTA + search hide.
     position: relative so .ch-nav-list (top: 100%) anchors to it — and since
     .ch-header sits directly below the brand bar in document flow, the panel
     renders beneath the brand bar visually. */
  .ch-header {
    background: transparent;
    border: 0;
    box-shadow: none;
    position: relative;
  }

  .ch-header-inner {
    padding: 0;
    height: 0;
    gap: 0;
    overflow: visible;
  }

  .ch-header-actions {
    display: none;
  }

  .ch-menu-toggle {
    display: block;
  }

  .ch-primary-name {
    font-size: 32px;
  }

  /* Mobile nav slide-down panel — anchors to the brand bar so it appears
     directly beneath it when the burger is tapped. */
  .ch-nav {
    position: static;
    flex: none;
    height: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .ch-nav-list {
    display: none;
    flex-direction: column;
    height: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    padding: 0;
    margin: 0;
  }

  .ch-nav-list.ch-nav-open {
    display: flex;
    animation: ch-nav-slide-down 0.24s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  @keyframes ch-nav-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .ch-nav-list > li {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .ch-nav-list > li > a {
    height: auto;
    padding: 14px 24px;
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
    border-bottom-color: var(--header-border) !important;
    margin-bottom: 0;
    justify-content: space-between;
    font-size: 14px;
  }

  /* Suppress the sliding underline on mobile — the border-bottom is the divider */
  .ch-nav-list > li > a::before {
    display: none;
  }

  /* Accordion chevron stays visible on mobile */
  .ch-nav-list > li.menu-item-has-children > a::after {
    display: inline-block;
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  .ch-nav-list > li.menu-item-has-children.ch-sub-open > a::after {
    transform: rotate(180deg);
  }

  /* Reset desktop stagger — items must be fully visible in the mobile accordion */
  .ch-nav-list > li > ul.sub-menu > li {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Sub-menus: hidden by default, shown via accordion toggle */
  .ch-nav-list > li > ul.sub-menu {
    display: none;
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    padding: 0;
    min-width: 0;
    background: var(--header-off-white);
  }

  .ch-nav-list > li.ch-sub-open > ul.sub-menu {
    display: block;
    animation: ch-sub-slide-down 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  @keyframes ch-sub-slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }


  .ch-nav-list > li > ul.sub-menu > li:first-child { padding-top: 0; }
  .ch-nav-list > li > ul.sub-menu > li:last-child  { padding-bottom: 0; }

  .ch-nav-list > li > ul.sub-menu > li > a {
    height: auto;
    padding: 12px 32px;
    color: var(--header-muted);
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--header-border);
    background: none;
  }

  .ch-nav-list > li > ul.sub-menu > li > a:hover {
    color: var(--primary);
    background: var(--header-border);
  }

  .ch-nav-list > li > ul.sub-menu > li > a::before {
    display: none;
  }

  /* Scores strip — hide 1st item (oldest), keep 3 */
  .ch-score-item:nth-child(1) {
    display: none;
  }

  .ch-scores-inner {
    padding: 0 16px;
  }

  .ch-score-item {
    gap: 10px;
    padding: 8px 16px;
  }

  /* Page hero */
  .ch-page-hero {
    padding: 32px 16px;
  }

  .ch-page-hero-title {
    font-size: 36px;
  }

  .ch-page-hero-ghost {
    display: none;
  }

  /* Page hero — section nav: tighter spacing so 4 items still share one row */
  .ch-page-hero-nav-inner {
    gap: 2px;
    padding: 10px 16px;
  }

  .ch-page-hero-nav-item {
    font-size: 13px;
    padding: 9px 14px;
  }

  /* Quick links — 2 columns on tablet */
  .ch-quick-links {
    grid-template-columns: 1fr 1fr;
  }

  /* Hero — tablet: tighter padding, foot stacks */
  .ch-hero {
    min-height: 64vh;
  }

  .ch-hero-inner {
    padding: 56px 24px 32px;
    gap: 24px;
  }

  .ch-hero-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .ch-hero-actions {
    width: 100%;
  }

  .ch-arena-columns {
    flex-direction: column;
  }

  .ch-arena-col {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  /* Roster — hide hometown + last stat, 4-col grid */
  .ch-roster-header,
  .ch-roster-row {
    grid-template-columns: 56px 1fr 60px 60px;
  }

  .ch-roster-hometown,
  .ch-roster-header-cell.ch-col-hometown {
    display: none;
  }

  .ch-roster-stat:last-child,
  .ch-roster-header-cell.ch-col-stat:last-child {
    display: none;
  }

  .ch-roster-number {
    font-size: 32px;
  }

  .ch-roster-player-name {
    font-size: 17px;
  }

  .ch-roster {
    padding: 24px 16px;
  }

  /* Footer — Tablet: 4-col grid → 2-col */
  .ch-ft-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .ch-ft-brand {
    grid-column: 1 / -1;
  }

  .ch-ft-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Featured Roster — 2 columns on tablet */
  .ch-featured-roster {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==============================================
   Responsive: Phone (480px)
   ============================================== */
@media (max-width: 480px) {
  /* Top bar disappears on phone — space is tight */
  .ch-top-bar {
    display: none;
  }

  .ch-brand-bar-inner {
    padding: 12px 16px;
    gap: 12px;
  }

  .ch-primary-name {
    font-size: 24px;
    letter-spacing: 0.03em;
  }

  .ch-logo-img {
    height: 36px;
    max-width: 44px;
  }

  /* Footer — phone: collapse to single column */
  .ch-ft-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .ch-ft-brand-link,
  .ch-ft-social {
    justify-content: center;
  }

  .ch-ft-blurb {
    margin-left: auto;
    margin-right: auto;
  }

  /* Scores strip — hide 1st and 2nd items, keep last 2 */
  .ch-score-item:nth-child(1),
  .ch-score-item:nth-child(2) {
    display: none;
  }

  .ch-scores-inner {
    padding: 0 12px;
  }

  .ch-score-item {
    gap: 8px;
    padding: 8px 12px;
  }

  .ch-score-date {
    font-size: 10px;
  }

  .ch-score-row {
    font-size: 12px;
    gap: 10px;
  }

  .ch-score-tag {
    font-size: 9px;
  }

  .ch-score-upcoming-label {
    font-size: 12px;
  }

  .ch-score-upcoming-detail {
    font-size: 10px;
  }

  /* Page hero */
  .ch-page-hero {
    padding: 24px 12px;
  }

  .ch-page-hero-title {
    font-size: 28px;
  }

  .ch-page-hero-breadcrumbs {
    font-size: 11px;
  }

  /* Page hero — section nav: minimum padding, stays single row */
  .ch-page-hero-nav-inner {
    padding: 8px 12px;
  }

  .ch-page-hero-nav-item {
    font-size: 12px;
    padding: 8px 10px;
  }

  /* Quick links — single column on phone */
  .ch-quick-links {
    grid-template-columns: 1fr;
  }

  .ch-quick-link {
    height: 120px;
  }

  /* Hero — phone */
  .ch-hero .ch-hero-inner {
    padding: 40px 16px 28px;
    gap: 20px;
  }

  .ch-hero .ch-hero-wordmark {
    font-size: clamp(64px, 18vw, 120px);
  }

  .ch-hero .ch-hero-wordmark-2 {
    margin-left: 24px;
  }

  .ch-hero .ch-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ch-hero .ch-hero-btn {
    justify-content: center;
  }

  .ch-nav-list li a {
    padding: 12px 20px;
    font-size: 11px;
  }

  /* Roster — number + name + GP only */
  .ch-roster-header,
  .ch-roster-row {
    grid-template-columns: 48px 1fr 50px;
  }

  .ch-roster-stat:nth-last-child(2),
  .ch-roster-header-cell.ch-col-stat:nth-last-child(2) {
    display: none;
  }

  .ch-roster-number {
    font-size: 28px;
    padding: 12px 8px 12px 12px;
  }

  .ch-roster-player-name {
    font-size: 14px;
  }

  .ch-roster-player-detail {
    font-size: 10px;
  }

  .ch-roster-stat-val {
    font-size: 15px;
  }

  .ch-roster-filter {
    font-size: 11px;
    padding: 8px 12px;
  }

  .ch-roster {
    padding: 20px 12px;
  }

  /* Footer — Phone: stack columns under brand */
  .ch-ft-col {
    text-align: center;
  }

  /* Featured Roster — 2 columns on mobile */
  .ch-featured-roster {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ch-frp-number {
    font-size: 32px;
    top: 10px;
    right: 10px;
  }

  .ch-frp-body {
    padding: 10px 12px 12px;
  }

  .ch-frp-name {
    font-size: 15px;
    margin-bottom: 9px;
  }

  .ch-frp-stat-val {
    font-size: 17px;
  }

  .ch-frp-stat--highlight .ch-frp-stat-val {
    font-size: 21px;
  }

  .ch-frp-stat-lbl {
    font-size: 8px;
  }
}
