/* =====================================================================
   Nialler9 homepage (n9h) and category pages
   Loaded on the front page while the new homepage is showing, and on
   category pages while the new category layout is showing (see
   inc/home.php). Markup: front-page.php + template-parts/home/, and
   category.php.

   - Everything is inside <div class="n9h">, and every class starts n9h-,
     so nothing here can touch the rest of the site.
   - Colours are variables on body.n9h-home (homepage) and body.n9h-cat
     (category pages). Dark mode follows Maag's own toggle, which sets
     data-scheme="dark" on <body>.
   - Mobile layout starts below 860px.
   ===================================================================== */

body:is(.n9h-home, .n9h-cat) {
  --n9h-blue: #3535FF;        /* bands, tiles, buttons: the same in both schemes */
  --n9h-blue-ink: #3535FF;    /* blue text and links */
  --n9h-bg: #FFFFFF;
  --n9h-surface: #FFFFFF;
  --n9h-surface-2: #F5F5F5;
  --n9h-ink: #1A1A1A;
  --n9h-ink-2: #4A4A4A;
  --n9h-muted: #767676;
  --n9h-rule: #E8E8E8;
  --n9h-rule-2: #D0D0D0;
  --n9h-strong-rule: #1A1A1A;
  --n9h-band-dark: #1A1A1A;
  --n9h-card-dark: #1A1A1A;
  --n9h-card-dark-border: transparent;
  --n9h-btn-bg: #1A1A1A;
  --n9h-btn-ink: #FFFFFF;
  --n9h-img-filter: none;
  --n9h-display: 'Barlow', sans-serif;
  --n9h-cond: 'Barlow Condensed', 'Barlow', sans-serif;
  --n9h-body: 'DM Sans', 'Barlow', sans-serif;
  --n9h-wrap: 1200px;
  --n9h-gutter: 20px;
  --cs-site-background: var(--n9h-bg);
}

body:is(.n9h-home, .n9h-cat)[data-scheme="dark"] {
  --n9h-blue-ink: #8C8CFF;
  --n9h-bg: #121212;
  --n9h-surface: #1E1E22;
  --n9h-surface-2: #1B1B1F;
  --n9h-ink: #EDEDED;
  --n9h-ink-2: #BDBDBD;
  --n9h-muted: #A0A0A0;
  --n9h-rule: #2E2E33;
  --n9h-rule-2: #3A3A40;
  --n9h-strong-rule: #EDEDED;
  --n9h-band-dark: #16163C;
  --n9h-card-dark: #000000;
  --n9h-card-dark-border: #333333;
  --n9h-btn-bg: #EDEDED;
  --n9h-btn-ink: #121212;
  --n9h-img-filter: brightness(.9);
}

/* Only used if the Customizer's colour scheme is ever set to "System" */
@media (prefers-color-scheme: dark) {
  body:is(.n9h-home, .n9h-cat)[data-scheme="auto"] {
    --n9h-blue-ink: #8C8CFF;
    --n9h-bg: #121212;
    --n9h-surface: #1E1E22;
    --n9h-surface-2: #1B1B1F;
    --n9h-ink: #EDEDED;
    --n9h-ink-2: #BDBDBD;
    --n9h-muted: #A0A0A0;
    --n9h-rule: #2E2E33;
    --n9h-rule-2: #3A3A40;
    --n9h-strong-rule: #EDEDED;
    --n9h-band-dark: #16163C;
    --n9h-card-dark: #000000;
    --n9h-card-dark-border: #333333;
    --n9h-btn-bg: #EDEDED;
    --n9h-btn-ink: #121212;
    --n9h-img-filter: brightness(.9);
  }
}

/* ---------- Maag's page shell ----------
   Maag wraps the page in a padded .cs-container. The homepage runs edge to
   edge so the coloured bands can, and .n9h-wrap holds the 1200px column.
   Category pages use the same shell so their column lines up with it. */
:is(.n9h-home, .n9h-cat) .cs-site-content { margin-top: 0; }
:is(.n9h-home, .n9h-cat) .cs-site-content > .cs-container { max-width: none; padding: 0; margin-bottom: 0; }
:is(.n9h-home, .n9h-cat) .cs-site-content > .cs-container > :not(.cs-main-content) { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Base + resets against Maag ---------- */
.n9h, .n9h *, .n9h *::before, .n9h *::after { box-sizing: border-box; }
.n9h { background: var(--n9h-bg); color: var(--n9h-ink); font-family: var(--n9h-body); font-size: 16px; line-height: 1.4; letter-spacing: normal; }
.n9h :is(p, h1, h2, h3, ol, ul, li, figure) { margin: 0; padding: 0; }
.n9h :is(h1, h2, h3) { font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.n9h :is(ol, ul) { list-style: none; }
.n9h li::before, .n9h li::marker { content: none; }
/* Links. style.css turns every link white in dark mode with !important, and
   dims it on hover. So link colour is set once, here, from --n9h-link: a
   link that needs its own colour sets that variable instead of "color"
   (the same approach as gig-guide.css). */
:is(.n9h-home, .n9h-cat) .n9h a, :is(.n9h-home, .n9h-cat) .n9h a:hover, :is(.n9h-home, .n9h-cat) .n9h a:visited { color: var(--n9h-link, inherit) !important; opacity: 1; text-decoration: none; }
.n9h a:hover .n9h-hl, .n9h a.n9h-hl:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.n9h :focus-visible { outline: 3px solid var(--n9h-blue-ink); outline-offset: 2px; }
.n9h .n9h-on-blue :focus-visible, .n9h .n9h-on-dark :focus-visible, .n9h .n9h-ask--news :focus-visible { outline-color: #fff; }
.n9h-wrap { max-width: var(--n9h-wrap); margin: 0 auto; padding: 0 var(--n9h-gutter); }

/* FlyingPress "lazy render" gives below-the-fold blocks a remembered size
   (contain-intrinsic-size: auto 848px), and that one number counts as a
   width as well as a height. Inside a grid it forced the whole column to
   that width on phones until the block scrolled into view, then everything
   jumped back (a layout shift of 0.26 in PageSpeed). Two guards:
   1. nothing inside a homepage grid or rail may widen its column;
   2. the remembered size is never used as a width. */
.n9h :is(.n9h-top, .n9h-go, .n9h-split, .n9h-news, .n9h-albums, .n9h-roundup, .n9h-monthly, .n9h-bnm, .n9h-feat, .n9h-pod, .n9h-fest, .n9h-fest-list, .n9h-asks, .n9h-row4) > * { min-width: 0; }
.n9h [style*="content-visibility"] { contain-intrinsic-width: none !important; }
.n9h-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.n9h .n9h-kick { display: block; font: 600 10px var(--n9h-body); letter-spacing: .14em; text-transform: uppercase; color: var(--n9h-blue-ink); }
.n9h .n9h-meta { font: 400 12px var(--n9h-body); letter-spacing: normal; text-transform: none; color: var(--n9h-muted); }
.n9h .n9h-dek { font: 400 16px/1.5 var(--n9h-body); letter-spacing: normal; color: var(--n9h-ink-2); }
.n9h .n9h-dek--s { font-size: 14px; }
.n9h .n9h-t1 { font: 900 46px/1.02 var(--n9h-display); letter-spacing: -.025em; text-wrap: balance; }
.n9h .n9h-t2 { font: 800 24px/1.12 var(--n9h-display); letter-spacing: -.015em; text-wrap: balance; }
.n9h .n9h-t3 { font: 700 18px/1.22 var(--n9h-display); letter-spacing: normal; }
.n9h .n9h-t4 { font: 700 15px/1.3 var(--n9h-display); letter-spacing: normal; }
.n9h .n9h-on-blue, .n9h .n9h-on-blue .n9h-kick, .n9h .n9h-on-dark, .n9h .n9h-on-dark .n9h-kick { color: #fff; }

/* ---------- Image slots ----------
   The box sets the shape; the image is cropped to it. An empty slot
   (a post with no featured image) shows the grey gradient. */
.n9h-img { display: block; position: relative; overflow: hidden; background: linear-gradient(150deg, #6b6b78, #2a2a2a); filter: var(--n9h-img-filter); }
.n9h .n9h-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; margin: 0; }
.n9h .r-3x2 { aspect-ratio: 3 / 2; }
.n9h .r-16x10 { aspect-ratio: 16 / 10; }
.n9h .r-16x9 { aspect-ratio: 16 / 9; }
.n9h .r-4x3 { aspect-ratio: 4 / 3; }
.n9h .r-1 { aspect-ratio: 1; }
.n9h .r-3x4 { aspect-ratio: 3 / 4; }

/* ---------- Section header + bands ---------- */
.n9h-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 3px solid var(--n9h-strong-rule); padding-top: 12px; margin-bottom: 20px; }
.n9h .n9h-hd :is(h1, h2) { font: 900 30px/1 var(--n9h-display); letter-spacing: -.02em; }
.n9h .n9h-hd a, .n9h .n9h-hd__links a { --n9h-link: var(--n9h-blue-ink); font: 600 13px var(--n9h-body); white-space: nowrap; }
.n9h-hd__links { display: flex; gap: 16px; align-items: baseline; }
.n9h .n9h-hd__note { display: block; font: 600 13px var(--n9h-body); text-align: right; }
.n9h .n9h-hd__links a.is-plain { --n9h-link: var(--n9h-ink); }
.n9h-on-blue .n9h-hd, .n9h-on-dark .n9h-hd { border-top-color: #fff; }
.n9h .n9h-on-blue .n9h-hd a, .n9h .n9h-on-dark .n9h-hd a { --n9h-link: #fff; }
.n9h-section { padding-top: 48px; padding-bottom: 48px; }
.n9h-band { padding: 40px 0 48px; }
.n9h-band--blue { background: var(--n9h-blue); }
.n9h-band--grey { background: var(--n9h-surface-2); }
.n9h-band--dark { background: var(--n9h-band-dark); }
.n9h a.n9h-btn { --n9h-link: var(--n9h-btn-ink); display: block; text-align: center; padding: 12px; background: var(--n9h-btn-bg); font: 600 14px var(--n9h-body); }
.n9h a.n9h-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 1. Top ---------- */
.n9h-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px 300px; gap: 32px; padding-top: 32px; padding-bottom: 48px; } /* Latest is 300px wide so the 300x250 ad fits under it */
.n9h-lead__link { display: flex; flex-direction: column; gap: 14px; }
.n9h-second { display: flex; flex-direction: column; gap: 24px; border-left: 1px solid var(--n9h-rule); padding-left: 32px; }
.n9h-second__item { display: flex; flex-direction: column; gap: 8px; }
.n9h-second article + article .n9h-second__item { border-top: 1px solid var(--n9h-rule); padding-top: 20px; }
/* The 2nd and 3rd stories: a square thumb to the right of the kicker and headline. */
.n9h-second__item--thumb { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 6px 12px; align-content: start; }
.n9h .n9h-second__item--thumb .n9h-img { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.n9h-second__item--thumb > :not(.n9h-img) { grid-column: 1; }
.n9h .n9h-mobile-only { display: none; }
.n9h-latest__hd { display: flex; justify-content: space-between; align-items: baseline; border-top: 3px solid var(--n9h-blue); padding-top: 10px; margin-bottom: 6px; }
.n9h .n9h-latest__hd h2 { font: 900 18px var(--n9h-display); letter-spacing: normal; }
.n9h .n9h-latest__hd a { --n9h-link: var(--n9h-blue-ink); font: 600 12px var(--n9h-body); }
.n9h-latest li { border-bottom: 1px solid var(--n9h-rule); }
.n9h-latest li:last-child { border-bottom: 0; }
.n9h-latest a { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.n9h-latest__text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; }
.n9h .n9h-latest .n9h-img { flex: 0 0 72px; width: 72px; }
.n9h .n9h-latest__meta { font: 700 11px var(--n9h-body); letter-spacing: normal; text-transform: none; color: var(--n9h-muted); }
.n9h .n9h-latest__meta time { font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.n9h .n9h-latest .is-fresh .n9h-latest__meta { color: var(--n9h-blue-ink); }

/* ---------- 2. Gigs & going out ---------- */
.n9h-go { display: grid; grid-template-columns: 1.2fr 1.1fr 1fr; gap: 24px; }
.n9h .n9h-gg { background: var(--n9h-surface); color: var(--n9h-ink); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.n9h .n9h-gg .n9h-kick { color: var(--n9h-blue-ink); }
.n9h-gg__img { display: block; margin: -24px -24px 4px; } /* the guide's featured image, edge to edge across the top of the card */
.n9h-gg li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--n9h-rule); font: 500 14px var(--n9h-body); }
.n9h-gg li > b:first-child { font: 900 15px var(--n9h-cond); color: var(--n9h-blue-ink); text-transform: uppercase; }
.n9h .n9h-gg a.n9h-btn { margin-top: auto; }
.n9h-upcoming { display: flex; flex-direction: column; gap: 10px; color: #fff; }
.n9h-upcoming li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .35); align-items: baseline; font: 400 14px var(--n9h-body); }
.n9h-upcoming li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .35); }
.n9h-upcoming li > b:first-child { font: 900 15px var(--n9h-cond); }
.n9h .n9h-upcoming__all { font: 600 14px var(--n9h-body); }
.n9h-venues { display: flex; flex-direction: column; gap: 12px; border-left: 1px solid rgba(255, 255, 255, .35); padding-left: 24px; color: #fff; }
.n9h-venues__text { font: 400 14px/1.5 var(--n9h-body); }
.n9h-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.n9h-chips span { border: 1px solid #fff; padding: 4px 7px; font: 600 10px var(--n9h-body); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- 3. News (four to a row) ---------- */
.n9h-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; } /* Festivals & gigs + Most read */
.n9h-news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.n9h-card { display: flex; flex-direction: column; gap: 8px; }
/* The ads under Latest and under Most read: 250px is reserved so the page
   doesn't jump when one loads. With no ad to show, a slot isn't printed. */
.n9h-ad { margin-top: 20px; min-height: 250px; display: flex; align-items: center; justify-content: center; }
.n9h-section + .n9h-section { padding-top: 0; } /* News, then Irish music: one gap between them, not two */

/* ---------- 4. Albums ---------- */
.n9h-albums { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.n9h-roundup { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.n9h-roundup__covers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.n9h-roundup__text { display: flex; flex-direction: column; gap: 10px; }
.n9h .n9h-roundup__text time { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.n9h-roundup__next { font: 700 12px var(--n9h-body); border-top: 1px solid var(--n9h-rule-2); padding-top: 10px; }
.n9h-monthly { display: flex; flex-direction: column; gap: 18px; }
.n9h-monthly a { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; }
.n9h-monthly a + a { border-top: 1px solid var(--n9h-rule-2); padding-top: 18px; }
.n9h-monthly a > div { display: flex; flex-direction: column; gap: 4px; }
.n9h-score { position: absolute; right: 0; bottom: 0; background: var(--n9h-blue); color: #fff; font: 900 16px var(--n9h-cond); padding: 3px 6px; }
.n9h a.n9h-irish, .n9h a.n9h-irish:hover { --n9h-link: #fff; background: var(--n9h-card-dark); border: 1px solid var(--n9h-card-dark-border); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.n9h .n9h-irish .n9h-kick { color: #fff; }
.n9h-irish__year { font: 900 72px/.85 var(--n9h-cond); }
.n9h-irish__out { border-top: 1px solid #444; padding-top: 12px; display: flex; flex-direction: column; gap: 4px; font: 500 14px var(--n9h-body); }
.n9h-irish__out small { font: 600 10px var(--n9h-body); letter-spacing: .14em; text-transform: uppercase; color: #B0B0B0; }
.n9h-irish__more { margin-top: auto; font: 600 14px var(--n9h-body); }

/* ---------- 5. Best new music ---------- */
.n9h-bnm, .n9h-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } /* Best new music and Features: three cards, all the same size */
.n9h-count { position: absolute; left: 12px; bottom: 12px; background: #fff; color: #121212; font: 900 18px/1 var(--n9h-cond); padding: 5px 8px; }

/* ---------- 6. Podcast ---------- */
.n9h-pod { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; color: #fff; }
.n9h-pod a { display: flex; flex-direction: column; gap: 10px; }
.n9h .n9h-pod .n9h-kick { color: #B0B0B0; }
.n9h .n9h-pod__new .n9h-kick { color: #fff; }
.n9h .n9h-pod__dek { font: 400 14px/1.5 var(--n9h-body); color: #B0B0B0; }
.n9h-play { position: absolute; left: 16px; bottom: 16px; width: 56px; height: 56px; background: #fff; display: flex; align-items: center; justify-content: center; }
.n9h-play::after { content: ""; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #121212; margin-left: 4px; }

/* ---------- 7. Festivals + Most read ---------- */
.n9h-fest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.n9h-fest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 20px; }
.n9h-fest-list li { border-top: 1px solid var(--n9h-rule); padding: 12px 0; }
.n9h-popular li a { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--n9h-rule); }
.n9h-popular li:last-child a { border-bottom: 0; }
.n9h-popular__n { font: 900 40px/.85 var(--n9h-cond); color: var(--n9h-blue-ink); }

/* ---------- 8. Newsletter / Patreon / Events ---------- */
.n9h-asks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 48px; }
.n9h-ask { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.n9h-ask--news { background: var(--n9h-blue); color: #fff; }
.n9h .n9h-ask--news .n9h-kick { color: #fff; }
.n9h-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
/* The form shares its classes with the end-of-article newsletter box, so
   these are scoped tightly to win over those styles and Maag's inputs. */
.n9h .n9h-form .n9-newsletter-form__input { width: 100%; height: auto; min-height: 44px; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 12px; font: 400 14px var(--n9h-body); letter-spacing: normal; background: var(--n9h-surface); color: var(--n9h-ink); }
.n9h .n9h-form .n9-newsletter-form__input::placeholder { color: var(--n9h-muted); opacity: 1; }
/* !important: style.css makes this button blue in dark mode, which disappears on the blue box */
.n9h .n9h-form .n9-newsletter-form__submit { width: 100%; height: auto; min-height: 44px; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 12px; background-color: #1A1A1A !important; color: #fff !important; font: 600 14px var(--n9h-body); letter-spacing: normal; text-transform: none; cursor: pointer; opacity: 1; }
.n9h .n9h-form .n9-newsletter-form__submit:hover { text-decoration: underline; text-underline-offset: 3px; }
.n9h .n9h-form .n9-newsletter-form__message { min-height: 0; margin: 0; font: 500 13px/1.4 var(--n9h-body); color: #fff; }
.n9h-ask--patreon { border: 2px solid var(--n9h-strong-rule); }
.n9h .n9h-ask--patreon a.n9h-btn { --n9h-link: #fff; margin-top: auto; background: var(--n9h-blue); }
.n9h-ask--events { background: var(--n9h-surface-2); }
.n9h-ask__event { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.n9h-ask__event > div { display: flex; flex-direction: column; gap: 6px; }
.n9h .n9h-ask__more { --n9h-link: var(--n9h-blue-ink); margin-top: auto; font: 600 14px var(--n9h-body); }
.n9h .n9h-ask__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Irish music + 9. More stories: four cards in a row ---------- */
.n9h-more-wrap { padding-bottom: 56px; }
.n9h-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.n9h a.n9h-loadmore { --n9h-link: var(--n9h-ink); display: block; width: fit-content; margin: 32px auto 0; border: 2px solid var(--n9h-strong-rule); padding: 14px 32px; font: 600 14px var(--n9h-body); }
.n9h a.n9h-loadmore:hover { --n9h-link: var(--n9h-btn-ink); background: var(--n9h-btn-bg); border-color: var(--n9h-btn-bg); }

/* ---------- Category pages (category.php) ----------
   The heading and the cards are the News section's (.n9h-hd, .n9h-news,
   .n9h-card), three to a row. The page title, the ad row and the page
   links are new. */
.n9h-cat-wrap { padding-top: 32px; padding-bottom: 56px; }
/* Three to a row here, not the homepage's four, so the images are bigger. */
.n9h-cat-wrap .n9h-news { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.n9h .n9h-hd__page { font: 600 13px var(--n9h-body); color: var(--n9h-muted); white-space: nowrap; }
.n9h .n9h-cat__desc { max-width: 720px; margin: -4px 0 24px; }
.n9h .n9h-cat__desc a { --n9h-link: var(--n9h-blue-ink); text-decoration: underline; }
/* The ad that Advanced Ads prints between posts: a row of its own, with
   250px reserved so the cards below don't jump when it loads. */
.n9h-news > .n9h-cat__ad { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 250px; padding: 24px 0; border-top: 1px solid var(--n9h-rule); border-bottom: 1px solid var(--n9h-rule); }
.n9h-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.n9h .n9h-pages .page-numbers { --n9h-link: var(--n9h-ink); display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 2px solid var(--n9h-rule-2); font: 600 14px var(--n9h-body); color: var(--n9h-ink); }
.n9h .n9h-pages a.page-numbers:hover { --n9h-link: var(--n9h-btn-ink); background: var(--n9h-btn-bg); border-color: var(--n9h-btn-bg); }
.n9h .n9h-pages .page-numbers.current { background: var(--n9h-btn-bg); border-color: var(--n9h-btn-bg); color: var(--n9h-btn-ink); }
.n9h .n9h-pages .page-numbers.dots { min-width: 0; padding: 0 2px; border-color: transparent; color: var(--n9h-muted); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .n9h-top { grid-template-columns: minmax(0, 1fr) 280px; }
  .n9h-latest-wrap { grid-column: 1 / -1; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  body:is(.n9h-home, .n9h-cat) { --n9h-gutter: 16px; }
  .n9h .n9h-t1 { font-size: 30px; line-height: 1.04; }
  .n9h .n9h-t2 { font-size: 20px; }
  .n9h .n9h-hd :is(h1, h2) { font-size: 24px; }
  /* Touch targets of at least 44px, without moving the text */
  .n9h .n9h-hd a, .n9h .n9h-latest__hd a { display: inline-block; padding: 14px 0; margin: -14px 0; }
  .n9h a.n9h-btn { padding: 13px 12px; }
  .n9h .n9h-upcoming__all, .n9h .n9h-ask__more { display: flex; align-items: center; min-height: 44px; }
  .n9h-fest-list li { padding: 0; }
  .n9h-fest-list li a { display: block; padding: 13px 0; }
  .n9h-section { padding-top: 28px; padding-bottom: 28px; }
  .n9h-band { padding: 24px 0 28px; }
  .n9h-top { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-bottom: 24px; gap: 20px; }
  .n9h-lead .n9h-img { margin: 0 calc(var(--n9h-gutter) * -1); }

  /* Secondary stories: list rows with a square thumbnail on the right */
  .n9h-second { border-left: 0; padding-left: 0; gap: 0; }
  .n9h-second__item,
  .n9h-second article + article .n9h-second__item { display: grid; grid-template-columns: 1fr 96px; gap: 4px 12px; align-content: start; padding: 14px 0; border-top: 1px solid var(--n9h-rule); }
  .n9h .n9h-second__item .n9h-img { display: block; grid-column: 2; grid-row: 1 / span 3; aspect-ratio: 1; }
  .n9h-second__item > :not(.n9h-img) { grid-column: 1; }
  .n9h .n9h-second__item .n9h-dek, .n9h .n9h-second__item .n9h-meta { display: none; }
  .n9h .n9h-second__item :is(.n9h-t2, .n9h-t3) { font-size: 16px; }

  /* Horizontal swipe rails */
  .n9h-go, .n9h-pod, .n9h-bnm, .n9h-feat, .n9h-row4 { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; scroll-padding-left: var(--n9h-gutter); margin: 0 calc(var(--n9h-gutter) * -1); padding: 0 var(--n9h-gutter) 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .n9h-go::-webkit-scrollbar, .n9h-pod::-webkit-scrollbar, .n9h-bnm::-webkit-scrollbar, .n9h-feat::-webkit-scrollbar, .n9h-row4::-webkit-scrollbar { display: none; }
  .n9h-go > *, .n9h-pod > *, .n9h-bnm > *, .n9h-feat > *, .n9h-row4 > * { flex: none; width: 78%; scroll-snap-align: start; }
  .n9h-pod > *, .n9h-row4 > * { width: 46%; }
  .n9h-pod > .n9h-pod__new { width: 60%; }
  .n9h-venues { border: 1px solid rgba(255, 255, 255, .5); padding: 18px; }
  .n9h-monthly a { grid-template-columns: 112px 1fr; }
  .n9h-upcoming { border: 1px solid rgba(255, 255, 255, .5); padding: 18px; }

  .n9h-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .n9h-news { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .n9h-albums { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .n9h-fest, .n9h-fest-list { grid-template-columns: minmax(0, 1fr); }
  .n9h-asks { grid-template-columns: minmax(0, 1fr); padding-bottom: 28px; }
  .n9h-ask { padding: 20px; }
  .n9h-more-wrap { padding-bottom: 36px; }
  .n9h a.n9h-loadmore { width: 100%; text-align: center; }
  .n9h-hd { flex-wrap: wrap; }
  .n9h .n9h-hd__note { text-align: left; }
  .n9h-cat-wrap { padding-top: 20px; padding-bottom: 36px; }
  /* Two to a row on phones. The ad comes after nine cards (three full rows
     on a computer), which leaves a gap beside the ninth here: "dense" lets
     the tenth card move up to fill it. */
  .n9h-cat-wrap .n9h-news { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; grid-auto-flow: dense; }
  .n9h-news > .n9h-cat__ad { padding: 16px 0; }
  .n9h-pages { gap: 6px; margin-top: 28px; }
  .n9h .n9h-pages .page-numbers { padding: 0 10px; }
}
