/* Escalation · Y8S4 Preview view (escalation-info.php?season=y8s4). Loaded only for that season, on top of
 * public/escalation-info.css; every rule is scoped to .es-app--y8s4 so nothing reaches the live view. */
.es-app--y8s4 { --es-red: #e97b76; --es-blue: #7cb6ed; --es-yellow: #e8c35f; --es-mint: #8ed2ac; --es-hot: #ff813c; }
.es-app--y8s4 h4 { font: 700 18px/1.2 var(--es-heading); color: var(--es-text); margin: 0 0 10px; }
.es-app--y8s4 h5 { margin: 20px 0 6px; font-size: 11px; line-height: 1.3; letter-spacing: 1.4px; text-transform: uppercase; color: var(--es-muted); }
.es-app--y8s4 code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; color: #f2c495; overflow-wrap: anywhere; }
.es-app--y8s4 .es-y4-icon { object-fit: contain; flex: none; }
.es-app--y8s4 td small { display: block; margin-top: 4px; font-size: 10px; color: #929fae; }
.es-app--y8s4 .es-inset p:not(:last-child) { margin-bottom: 12px; }

/* Tier comparison: metrics in rows, the four Tiers in columns. */
.es-app--y8s4 .es-y4-tier-table { min-width: 680px; }
.es-app--y8s4 .es-y4-tier-table thead th:first-child { width: 28%; }
.es-app--y8s4 .es-y4-tier-table :is(thead th:not(:first-child), td) { text-align: center; }
.es-app--y8s4 .es-y4-tier-table thead th { font-size: 10px; }
.es-app--y8s4 .es-y4-tier-table thead strong { display: block; margin: 8px 0 2px; color: var(--es-orange); font: 700 17px/1.1 var(--es-heading); letter-spacing: 0; text-transform: none; }
.es-app--y8s4 .es-y4-tier-icon { display: block; width: 64px; height: 64px; margin: 0 auto; object-fit: contain; }
.es-app--y8s4 .es-y4-tier-table td { font-size: 13px; }
.es-app--y8s4 .es-y4-row--hp td { font-weight: 700; font-size: 16px; color: var(--es-orange); }
.es-app--y8s4 .es-y4-tier-table tbody th, .es-app--y8s4 .es-y4-tier-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: #11181f; box-shadow: 1px 0 0 #303944; }
.es-app--y8s4 .es-y4-tier-table thead th:first-child { z-index: 2; background: #202832; }
.es-app--y8s4 .es-y4-tier-table tbody tr:nth-child(even) > th { background: #151b22; }

/* Directive tabs and panels */
.es-y4-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0 0; }
.es-y4-tabs[hidden] { display: none; }
.es-app--y8s4 .es-y4-tabs button { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; align-items: center; min-height: 44px; padding: 18px 16px; text-align: left; background: var(--es-surface); border: 1px solid #333e49; border-radius: 0; color: var(--es-text); font: 700 16px/1.3 var(--es-heading); cursor: pointer; }
.es-app--y8s4 .es-y4-tabs button:hover { border-color: #8a9cae; }
.es-app--y8s4 .es-y4-tabs button img { width: 36px; height: 36px; grid-row: span 2; }
.es-app--y8s4 .es-y4-tabs button span { display: block; margin-top: 3px; font: 400 11px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #9eabb6; }
.es-app--y8s4 .es-y4-tabs button[aria-selected="true"] { border-color: var(--es-orange); background: #2a221b; color: var(--es-orange); box-shadow: inset 0 -2px var(--es-orange); }
.es-y4-panel { margin-top: 12px; padding: 26px; background: #12181e; border: 1px solid #333e49; }
.es-y4-panel[hidden] { display: none; }
.es-y4-panel + .es-y4-panel { margin-top: 16px; }
.es-y4-tabs:not([hidden]) ~ .es-y4-panel + .es-y4-panel { margin-top: 12px; }
.es-y4-panel:target, .es-y4-panel.wiki-search-target { outline: 0; }
.es-y4-panel-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.es-y4-panel-heading img { width: 60px; height: 60px; }
.es-y4-panel-heading .es-eyebrow { margin: 0 0 6px; }
.es-app--y8s4 .es-y4-panel-heading h3 { font-size: 30px; margin: 0; }
.es-app--y8s4 .es-y4-panel .es-cards { margin: 0 0 4px; }
.es-y4-inset-icon { float: right; width: 44px; height: 44px; margin: 0 0 12px 12px; }
.es-y4-profile { min-width: 0; padding: 20px; background: #1b222b; border-top: 3px solid; }
.es-y4-profile--red { border-color: var(--es-red); }
.es-y4-profile--blue { border-color: var(--es-blue); }
.es-y4-profile--yellow { border-color: var(--es-yellow); }
.es-y4-profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.es-y4-profile-head img { width: 34px; height: 34px; }
.es-app--y8s4 .es-y4-profile-head h4 { margin: 0; }
.es-app--y8s4 .es-y4-profile--red h4 { color: var(--es-red); }
.es-app--y8s4 .es-y4-profile--blue h4 { color: var(--es-blue); }
.es-app--y8s4 .es-y4-profile--yellow h4 { color: var(--es-yellow); }
.es-y4-small { font-size: 10px; color: #a1aebb; }
.es-app--y8s4 .es-y4-profile p { margin: 0; font-size: 12px; line-height: 1.8; }
.es-y4-wounded { margin-top: 16px; border-left: 2px solid #d47871; }
.es-app--y8s4 .es-y4-panel .es-tactic { margin-top: 22px; }

/* Rating grades */
.es-y4-grades { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.es-y4-grades article { min-width: 0; padding: 16px 10px; text-align: center; background: var(--es-surface); border: 1px solid var(--es-line); }
.es-y4-grades img { width: 62px; height: 72px; margin-bottom: 12px; object-fit: contain; }
.es-app--y8s4 .es-y4-grades h3 { font-size: 16px; margin: 0 0 6px; text-align: center; }
.es-app--y8s4 .es-y4-grades p { margin: 0; font-size: 11px; color: var(--es-orange); }

/* Loot calculator */
.es-y4-range > span { display: flex; justify-content: space-between; gap: 12px; }
.es-y4-range output { font-size: 14px; font-weight: 700; color: var(--es-orange); }
.es-app--y8s4 .es-controls input[type="range"] { min-height: 42px; padding: 0; border: 0; background: transparent; accent-color: var(--es-orange); }
.es-y4-loot { align-items: start; }
.es-y4-big-number { margin-bottom: 8px; font: 700 68px/1.15 var(--es-heading); color: var(--es-orange); }
.es-y4-chart { display: block; width: 100%; height: auto; overflow: visible; }
.es-y4-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 15px; font-size: 10px; }
.es-y4-t1 { color: var(--es-blue); }
.es-y4-t2 { color: var(--es-mint); }
.es-y4-t3 { color: var(--es-yellow); }
.es-y4-t4 { color: var(--es-hot); }

/* The playlist table sits inside an open disclosure here, so it needs a little less width than on the live view. */
.es-app--y8s4 .es-playlist-table { min-width: 820px; }

/* Credits, caches and modifier catalogue */
.es-app--y8s4 .es-currency > img { width: 72px; height: 72px; }
.es-y4-cache-table { min-width: 600px; }
.es-app--y8s4 .es-y4-cache-table td strong { color: #fff; }
.es-y4-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.es-y4-filter[hidden] { display: none; }
.es-app--y8s4 .es-y4-filter button { min-height: 40px; padding: 9px 15px; background: #19212a; border: 1px solid #3c4752; border-radius: 0; color: var(--es-text); font: inherit; font-size: 12px; cursor: pointer; }
.es-app--y8s4 .es-y4-filter button[aria-pressed="true"] { color: var(--es-orange); border-color: var(--es-orange); }
.es-app--y8s4 .es-mutator[hidden] { display: none; }
.es-y4-mutator-icon { width: 50px; height: 50px; }
.es-status--current { color: #86b99c; }
.es-status--archived { color: #c7a76c; }
.es-app--y8s4 .es-mutator a { font-size: 11px; }

@container es-page (max-width: 900px) {
    .es-app--y8s4 .es-y4-tabs button { padding: 14px 10px; column-gap: 8px; font-size: 14px; }
    .es-app--y8s4 .es-y4-tabs button span { font-size: 10px; }
}
@container es-page (max-width: 640px) {
    .es-y4-tabs { gap: 7px; }
    .es-app--y8s4 .es-y4-tabs button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 12px 4px; text-align: center; font-size: 13px; }
    .es-app--y8s4 .es-y4-tabs button span { display: none; }
    .es-app--y8s4 .es-y4-tabs button img { width: 30px; height: 30px; }
    .es-y4-panel { padding: 18px 14px; }
    .es-y4-panel-heading { gap: 12px; }
    .es-y4-panel-heading img { width: 44px; height: 44px; }
    .es-app--y8s4 .es-y4-panel-heading h3 { font-size: 26px; }
    .es-y4-grades { gap: 5px; }
    .es-y4-grades article { padding: 12px 3px; }
    .es-y4-grades img { width: 38px; height: 46px; margin-bottom: 8px; }
    .es-app--y8s4 .es-y4-grades h3 { font-size: 12px; }
    .es-app--y8s4 .es-y4-grades p { font-size: 9px; }
    .es-app--y8s4 .es-currency > img { width: 44px; height: 44px; }
    .es-y4-big-number { font-size: 56px; }
    .es-app--y8s4 .es-y4-filter button { font-size: 11px; padding: 8px 10px; }
}

@media print {
    .es-y4-tabs, .es-y4-filter { display: none !important; }
    .es-y4-panel[hidden] { display: block !important; }
    .es-app--y8s4 .es-mutator[hidden] { display: flex !important; }
    .es-y4-panel { break-before: page; padding: 0; border: 0; }
    .es-y4-profile, .es-y4-grades article { break-inside: avoid; }
    .es-y4-grades img, .es-y4-tier-icon, .es-app--y8s4 .es-y4-icon { filter: invert(1); }
    .es-app--y8s4 .es-cache-icon { filter: none; }
    .es-y4-big-number { font-size: 22pt; }
    .es-y4-tier-table { min-width: 0 !important; }
}
