/* Compact layout, loaded after the theme: content first, less empty space and scrolling.
   The homepage hero keeps its full-screen design; everything else is tightened here. */

/* Page headers (masthead): a slim band instead of a 300px block. */
.nm-nav-spacer { height: 4rem; }
.nm-masthead { min-height: 0; padding: 1.2rem 0 .9rem; }
.nm-masthead__copy { width: 70%; }
.nm-masthead h1 { font-size: clamp(2.4rem, 4.2vw, 3.8rem); line-height: 1; margin: 0 0 .25rem; }
.nm-masthead p { font-size: .92rem; line-height: 1.5; margin-bottom: .7rem; }
.nm-masthead__art { opacity: .45; }
.nm-masthead .nm-action { min-height: 38px; padding-block: .45rem; }

/* Sections, headings, tabs. */
.nm-content-section { padding-block: clamp(1rem, 2vw, 1.6rem); }
.nm-content-section--first { padding-top: .9rem; min-height: 0; }
.nm-heading { margin-bottom: .7rem; gap: 1rem; }
.nm-heading h2, .nm-content h2 { font-size: clamp(1.45rem, 2.2vw, 2rem); }
html[dir="rtl"] .nm-heading h2, html[dir="rtl"] .nm-content h2 { font-size: clamp(1.25rem, 1.9vw, 1.7rem); }
.nm-tabs a { padding: .5rem 1rem; font-size: 1.15rem; min-height: 40px; }
html[dir="rtl"] .nm-tabs a { font-size: .95rem; }
.nm-mode-switch a { padding: .45rem .8rem; min-height: 38px; }
.nm-toolbar { margin-bottom: .7rem; }
.nm-description { line-height: 1.55; }
.nm-empty { padding: .9rem .5rem; }
.nm-disclosure { margin-block: .6rem; }

/* One-page sections: a sticky jump bar replaces tabs, so every section is visible by scrolling. */
.nm-jump { position: sticky; top: 4.6rem; z-index: 20; display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; padding: .25rem 0;
    background: #0a0f11f2; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--site-line); }
.nm-jump::-webkit-scrollbar { display: none; }
.nm-jump a { flex-shrink: 0; padding: .35rem .8rem .25rem; color: #abb4b5; text-decoration: none; white-space: nowrap;
    font: 600 1.15rem/1.2 var(--site-display); border-bottom: 2px solid transparent; }
html[dir="rtl"] .nm-jump a { font-size: .92rem; line-height: 1.5; }
.nm-jump a:hover { color: #fff; }
.nm-jump a.is-active { color: var(--site-yellow); border-bottom-color: var(--site-yellow); }
.nm-jump a .bi { font-size: .7em; }
.nm-jump__out { color: #8b9593 !important; }
.nm-jump a:not(.nm-jump__out) + .nm-jump__out { margin-inline-start: auto; }
.nm-block { scroll-margin-top: 7.2rem; }
.nm-content .nm-block.nm-content-section { padding-block: 1.1rem; min-height: 0; }
.nm-more { margin-top: .4rem; }
.nm-more > summary { cursor: pointer; color: var(--site-yellow); font: 600 1rem/1.4 var(--site-display); list-style: none; padding: .3rem 0; }
.nm-more > summary::-webkit-details-marker { display: none; }
.nm-more > summary::after { content: " \F282"; font-family: bootstrap-icons; font-size: .75em; }
.nm-more[open] > summary { display: none; }

/* Lists, cards and grids. */
.nm-match { padding: .55rem .6rem; gap: .9rem; }
.nm-team-grid, .nm-scrim-grid { gap: .7rem; }
.nm-team-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.nm-team { padding: 1rem; }
.nm-team__emblem { height: 96px; padding: .4rem; }
.nm-team__emblem img { width: 80px; height: 80px; }
.nm-team__emblem > span { font-size: 2.6rem; }
.nm-team__identity { padding-top: .6rem; }
.nm-team__identity h3 { font-size: 1.25rem; margin-top: .2rem; }
.nm-directory-team__meta { padding: .45rem .3rem; }
.nm-inspect-card { min-height: 0; padding: 1.5rem 1.2rem 1rem; }
.nm-empty--inline { padding: .5rem 0 0; color: var(--site-muted); }

/* Rankings: one slim line per squad. */
.nm-ranking__head { padding: .4rem .8rem; }
.nm-rank-list .nm-ranking__head, .nm-rank-list .nm-ranking__row { grid-template-columns: 34px minmax(0,1fr) 70px 14px; gap: .7rem; padding: .4rem .8rem; }
.nm-rank-list .nm-ranking__row { min-height: 0; }
.nm-rank-list .nm-ranking__identity { gap: .65rem; }
.nm-rank-list .nm-ranking__identity img, .nm-rank-list .nm-avatar { width: 34px; height: 34px; font-size: 1rem; }
.nm-rank-list .nm-ranking__identity > span:not(.nm-avatar) { display: flex; align-items: baseline; gap: .5rem; }
.nm-rank-list .nm-ranking__identity strong { font-size: 1.15rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-rank-list .nm-ranking__identity small { display: inline; margin: 0; flex-shrink: 0; }
.nm-rank-list .nm-ranking__rating { font-size: 1.35rem; }
.nm-rank-list .nm-ranking__row .nm-ranking__position { font-size: 1.15rem; }

/* Squad roster: small tiles, long notes cut to two lines (full text on hover). */
.nm-roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.nm-player-tile { padding: .6rem .75rem; border-top-width: 2px; }
.nm-player-tile h3 { font-size: 1.15rem; line-height: 1.25; margin: 0; }
.nm-player-tile > small { display: block; font-size: .72rem; margin-top: .1rem; }
.nm-player-tile__tags { gap: .5rem; margin-block: .35rem .25rem; font-size: .68rem; }
.nm-player-tile__about { font-size: .78rem; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important; }
.nm-player-tile__time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; margin-top: .2rem; }
.nm-player-tile__time .bi { color: var(--site-muted); }

/* Arena: results and scrims side by side on wide screens. */
.nm-split { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 0 2rem; }
.nm-split--single { grid-template-columns: minmax(0,1fr); }
.nm-split .nm-scrim-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Player and squad profile headers. */
.nm-profile-header { padding: .7rem 0 .3rem; }
.nm-profile-header__identity { gap: 1.1rem; padding: .7rem 0 .3rem; }
.nm-profile-header__identity > img, .nm-profile-header__identity > .nm-avatar { width: 84px; height: 84px; }
.nm-profile-header__identity > .nm-avatar { font-size: 2.1rem; }
.nm-profile-header h1 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; }
.nm-stat-strip { padding: .5rem 0 .7rem; gap: .5rem 2.2rem; grid-template-columns: repeat(auto-fit, minmax(90px, max-content)); }
.nm-stat-strip > div { padding-inline: .7rem 0; }
.nm-stat-strip strong { font-size: 1.6rem; line-height: 1.1; }
.nm-share { margin-top: .6rem; }
.nm-form { margin-top: .4rem; }
.nm-profile-grid { gap: 1.3rem; }

/* League overview and footer. */
.nm-league-overview { grid-template-columns: minmax(0,1.4fr) auto minmax(0,.8fr); gap: 2rem; padding-block: .3rem .4rem; }
.nm-content .nm-league-callout h2 { font-size: clamp(2rem, 3vw, 2.6rem); margin: .5rem 0 .4rem; }
.nm-league-cup img { height: 170px; }
.nm-league-facts > div { justify-content: flex-start; gap: .8rem; padding: .45rem 0; }
.nm-league-facts strong { font-size: 1.8rem; line-height: 1.2; min-width: 3.2rem; }
.nm-rulebook-actions { gap: 1rem; margin-block: .5rem; }
.nm-rulebook-sections { display: block; columns: 2 320px; column-gap: 2rem; margin-top: .6rem; }
.nm-rulebook-sections .nm-disclosure { margin-block: 0; padding: .35rem 0; break-inside: avoid; }
.nm-rulebook-sections summary { font-size: 1.2rem; line-height: 1.4; padding-block: .2rem; }
.nm-rulebook-sections ul { margin-block: .3rem .4rem; }
.nm-rulebook-sections li { padding-block: .1rem; line-height: 1.55; font-size: .85rem; }
.nm-rulebook-note { margin-top: .6rem; font-size: .8rem; }
.nm-site-footer { padding: 1.1rem max(var(--nm-gutter), calc((100% - var(--nm-page-max)) / 2)); }

/* New pages (tournament, heroes, calendar, seasons, free agents). */
.nm-cup { gap: 1.3rem; }
.nm-cup-block h3 { margin-bottom: .6rem; }
.nm-hero-note { margin: .5rem 0 1rem; }
.nm-champions { margin-bottom: 1rem; }
.nm-agents { gap: .5rem; }
.nm-agent { padding: .65rem .8rem; }

/* Player area: empty states are a line of text, not a big box. */
.player-empty { min-height: 0; padding: 8px; gap: 4px; }
.player-panel { padding: 12px 14px; margin-bottom: 10px; }

/* "Add to home screen" button (phones). */
.nm-install { position: fixed; inset-inline-end: 12px; bottom: 12px; z-index: 50; display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem .9rem; background: #ffc000; color: #111; border: 0; font: 700 .85rem/1 var(--nm-font-body); box-shadow: 0 6px 24px #0008; }
.nm-install[hidden] { display: none; }
.nm-install__close { margin-inline-start: .4rem; padding: 0 .2rem; font-size: 1.1rem; }

@media (max-width: 760px) {
    /* Large tap targets and no zoom-on-focus on phones. */
    .nm-action, .nm-mode-switch a, .nm-share__link, button.player-link { min-height: 44px; display: inline-flex; align-items: center; }
    input, select, textarea, .form-control, .form-select { font-size: 16px !important; }
    .nm-nav-spacer { height: 3.6rem; }
    .nm-masthead { padding: .8rem 0 .6rem; }
    .nm-masthead__copy { width: 100%; }
    .nm-masthead h1 { font-size: 2.3rem; }
    .nm-masthead p { font-size: .85rem; margin-bottom: .5rem; }
    .nm-masthead__art { width: 38%; opacity: .3; }
    .nm-tabs a { padding: .45rem .75rem; font-size: 1.05rem; min-height: 44px; }
    .nm-jump { top: 3.6rem; }
    .nm-jump a { padding: .5rem .7rem .4rem; font-size: 1.05rem; }
    .nm-block { scroll-margin-top: 6.2rem; }
    .nm-content-section { padding-block: .9rem; }
    .nm-split { grid-template-columns: minmax(0,1fr); }
    .nm-league-overview { grid-template-columns: minmax(0,1fr); gap: .6rem; }
    .nm-league-cup img { height: 130px; }
    .nm-roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nm-rank-list .nm-ranking__head, .nm-rank-list .nm-ranking__row { grid-template-columns: 26px minmax(0,1fr) 54px 12px; gap: .5rem; padding: .4rem .3rem; }
    .nm-rank-list .nm-ranking__identity strong { font-size: 1.05rem; }
    .nm-rank-list .nm-ranking__rating { font-size: 1.2rem; }
    .nm-stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
    .nm-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nm-team { padding: .8rem; }
    .nm-team__emblem { height: 80px; }
    .nm-team__emblem img { width: 66px; height: 66px; }
    .nm-profile-header__identity > img, .nm-profile-header__identity > .nm-avatar { width: 64px; height: 64px; }
    .nm-stat-strip strong { font-size: 1.55rem; }
}
