/* HERMES PLAYER STATS + LEADERBOARDS V1 */
.portal-grid.stats-active {
    display: block;
    width: var(--portal-measure);
    max-width: none;
    padding-top: 26px;
}

.hermes-stats-mount,
.hermes-stats-workspace,
.hermes-leaderboard-workspace { width: 100%; min-width: 0; }

.hermes-stats-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 42px;
    padding: 8px 0 26px;
    border-bottom: 1px solid rgba(225,232,238,.075);
}
.hermes-stats-intro small,
.hermes-stats-section > header small,
.hermes-source-status > small,
.hermes-stat-tile small,
.hermes-game-stat-head span,
.hermes-instance-name small,
.hermes-instance-metric small,
.hermes-fact-row small,
.hermes-leader-control small,
.hermes-period-lock small,
.hermes-leader-scope small { color: #596267; font-size: var(--text-meta); letter-spacing: .11em; }
.hermes-stats-intro h2,
.hermes-stats-section h3 { margin: 8px 0 0; color: #c5ccd0; font: 300 var(--text-section) "Segoe UI", Arial, sans-serif; letter-spacing: -.015em; }
.hermes-stats-intro p { max-width: 720px; margin: 10px 0 0; color: #646e73; font-size: var(--text-small); line-height: 1.6; }
.hermes-stats-tracking { flex: 0 0 auto; min-width: 220px; text-align: right; }
.hermes-stats-tracking small,
.hermes-stats-tracking b { display: block; }
.hermes-stats-tracking b { margin-top: 8px; color: rgba(var(--accent-rgb),.8); font-size: var(--text-small); font-weight: 400; letter-spacing: .07em; }

.hermes-stat-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    border-bottom: 1px solid rgba(225,232,238,.075);
}
.hermes-stat-tile { min-height: 132px; padding: 25px 30px 22px 0; border-right: 1px solid rgba(225,232,238,.055); }
.hermes-stat-tile:nth-child(3n+2), .hermes-stat-tile:nth-child(3n+3) { padding-left: 30px; }
.hermes-stat-tile:nth-child(3n) { border-right: 0; }
.hermes-stat-tile:nth-child(-n+3) { border-bottom: 1px solid rgba(225,232,238,.055); }
.hermes-stat-tile small,
.hermes-stat-tile b { display: block; }
.hermes-stat-tile b { margin-top: 12px; color: #d0d6d9; font-size: clamp(20px, 1.8vw, 29px); font-weight: 300; letter-spacing: -.02em; }
.hermes-stat-tile p { margin: 9px 0 0; color: #525c61; font-size: var(--text-meta); line-height: 1.5; }

.hermes-stats-section { padding: 34px 0 8px; }
.hermes-stats-section > header { margin-bottom: 18px; }
.hermes-game-stat-panel { border-top: 1px solid rgba(225,232,238,.075); }
.hermes-game-stat-panel + .hermes-game-stat-panel { margin-top: 28px; }
.hermes-game-stat-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hermes-game-stat-head b { color: rgba(var(--accent-rgb),.82); font-size: var(--text-small); font-weight: 400; letter-spacing: .11em; }
.hermes-instance-stat-row {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(110px, .72fr));
    align-items: center;
    border-top: 1px solid rgba(225,232,238,.05);
}
.hermes-instance-name b,
.hermes-instance-name small,
.hermes-instance-metric small,
.hermes-instance-metric b { display: block; }
.hermes-instance-name b { color: #adb6ba; font-size: var(--text-small); font-weight: 400; letter-spacing: .05em; }
.hermes-instance-name small { margin-top: 7px; }
.hermes-instance-metric { min-width: 0; padding-left: 22px; border-left: 1px solid rgba(225,232,238,.045); }
.hermes-instance-metric b { margin-top: 7px; color: #c6cdd0; font-size: var(--text-value); font-weight: 300; }

.hermes-fact-list { border-top: 1px solid rgba(225,232,238,.075); }
.hermes-fact-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid rgba(225,232,238,.05); }
.hermes-fact-row b { display: block; color: #aeb7bb; font-size: var(--text-small); font-weight: 400; letter-spacing: .035em; }
.hermes-fact-row small { display: block; margin-top: 6px; }
.hermes-fact-row time { color: #4f595e; font-size: var(--text-meta); white-space: nowrap; }

.hermes-source-status { margin-top: 32px; padding: 22px 0 0; border-top: 1px solid rgba(225,232,238,.075); }
.hermes-source-status > small,
.hermes-source-status > b { display: block; }
.hermes-source-status > b { margin-top: 8px; color: rgba(var(--accent-rgb),.74); font-size: var(--text-small); font-weight: 400; letter-spacing: .07em; }
.hermes-source-status p { max-width: 900px; margin: 8px 0 0; color: #596368; font-size: var(--text-meta); line-height: 1.6; }
.hermes-stats-empty { min-height: 96px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px 0; color: #525c61; }
.hermes-stats-empty b { color: #8f999e; font-size: var(--text-small); font-weight: 400; letter-spacing: .08em; }
.hermes-stats-empty span { font-size: var(--text-meta); line-height: 1.55; }

.hermes-leader-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(190px, .9fr);
    border-top: 1px solid rgba(225,232,238,.075);
    border-bottom: 1px solid rgba(225,232,238,.075);
}
.hermes-leader-control,
.hermes-period-lock { min-height: 94px; display: flex; flex-direction: column; justify-content: center; padding: 16px 24px 16px 0; border-right: 1px solid rgba(225,232,238,.055); }
.hermes-leader-control + .hermes-leader-control,
.hermes-period-lock { padding-left: 24px; }
.hermes-period-lock { border-right: 0; }
.hermes-leader-control select {
    width: 100%;
    margin-top: 10px;
    border: 0;
    border-bottom: 1px solid rgba(225,232,238,.12);
    background: rgba(3,6,7,.2);
    color: #c1c9cd;
    padding: 8px 2px;
    font: 400 var(--text-small) "Segoe UI", Arial, sans-serif;
    letter-spacing: .05em;
    outline: none;
}
.hermes-leader-control select:focus { border-bottom-color: rgba(var(--accent-rgb),.55); }
.hermes-leader-control select:disabled { color: #657075; }
.hermes-period-lock small,
.hermes-period-lock b,
.hermes-period-lock span { display: block; }
.hermes-period-lock b { margin-top: 9px; color: #aeb8bc; font-size: var(--text-small); font-weight: 400; }
.hermes-period-lock span { margin-top: 6px; color: #495359; font-size: var(--text-meta); }

.hermes-leader-status { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(225,232,238,.055); }
.hermes-leader-status span { color: rgba(var(--accent-rgb),.66); font-size: var(--text-meta); letter-spacing: .1em; }
.hermes-leader-status b { color: #687277; font-size: var(--text-meta); font-weight: 400; letter-spacing: .08em; }
.hermes-leader-list { min-height: 280px; }
.hermes-leader-row {
    min-height: 72px;
    display: grid;
    grid-template-columns: 70px minmax(220px, 1.6fr) minmax(180px, 1fr) minmax(120px, .55fr);
    align-items: center;
    border-bottom: 1px solid rgba(225,232,238,.05);
}
.hermes-leader-row:hover { background: rgba(var(--accent-rgb),.012); }
.hermes-leader-row.is-self { box-shadow: inset 2px 0 rgba(var(--accent-rgb),.65); background: rgba(var(--accent-rgb),.018); }
.hermes-leader-rank { color: #586267; font-size: var(--text-small); letter-spacing: .12em; }
.hermes-leader-row.rank-1 .hermes-leader-rank,
.hermes-leader-row.rank-2 .hermes-leader-rank,
.hermes-leader-row.rank-3 .hermes-leader-rank { color: rgba(var(--accent-rgb),.86); }
.hermes-leader-identity b,
.hermes-leader-identity small,
.hermes-leader-scope small,
.hermes-leader-scope span { display: block; }
.hermes-leader-identity b { color: #c4ccd0; font-size: var(--text-value); font-weight: 300; letter-spacing: .015em; }
.hermes-leader-identity small { margin-top: 6px; color: #4f595e; font-size: var(--text-meta); letter-spacing: .1em; }
.hermes-leader-scope span { margin-top: 6px; color: #788287; font-size: var(--text-meta); }
.hermes-leader-value { justify-self: end; color: #d0d7da; font-size: clamp(19px, 1.6vw, 27px); font-weight: 300; letter-spacing: -.02em; }
.hermes-leader-note { display: flex; align-items: flex-start; gap: 20px; padding: 22px 0 0; color: #4e585d; font-size: var(--text-meta); line-height: 1.55; }
.hermes-leader-note b { flex: 0 0 auto; color: rgba(var(--accent-rgb),.64); font-weight: 400; letter-spacing: .09em; }

@media (max-width: 980px) {
    .hermes-stat-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hermes-stat-tile { border-bottom: 1px solid rgba(225,232,238,.055); }
    .hermes-stat-tile:nth-child(3n) { border-right: 1px solid rgba(225,232,238,.055); }
    .hermes-stat-tile:nth-child(even) { border-right: 0; }
    .hermes-stat-tile:nth-child(odd) { padding-left: 0; }
    .hermes-stat-tile:nth-child(even) { padding-left: 24px; }
    .hermes-leader-controls { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hermes-leader-control:nth-child(2) { border-right: 0; }
    .hermes-leader-control:nth-child(-n+2) { border-bottom: 1px solid rgba(225,232,238,.055); }
    .hermes-instance-stat-row { grid-template-columns: minmax(160px,1.1fr) repeat(2,minmax(100px,.7fr)); row-gap: 15px; padding: 16px 0; }
    .hermes-leader-row { grid-template-columns: 52px minmax(170px,1.5fr) minmax(130px,1fr) minmax(90px,.6fr); }
}

@media (max-width: 680px) {
    .hermes-stats-intro { align-items: flex-start; flex-direction: column; gap: 18px; }
    .hermes-stats-tracking { min-width: 0; text-align: left; }
    .hermes-stat-summary { grid-template-columns: 1fr; }
    .hermes-stat-tile,
    .hermes-stat-tile:nth-child(3n+2),
    .hermes-stat-tile:nth-child(3n+3),
    .hermes-stat-tile:nth-child(even) { padding: 20px 0; border-right: 0; border-bottom: 1px solid rgba(225,232,238,.055); }
    .hermes-instance-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .hermes-instance-name { grid-column: 1 / -1; }
    .hermes-instance-metric { padding: 0; border-left: 0; }
    .hermes-leader-controls { grid-template-columns: 1fr; }
    .hermes-leader-control,
    .hermes-leader-control + .hermes-leader-control,
    .hermes-period-lock { padding: 14px 0; border-right: 0; border-bottom: 1px solid rgba(225,232,238,.055); }
    .hermes-leader-row { grid-template-columns: 42px 1fr auto; gap: 10px; padding: 12px 0; }
    .hermes-leader-scope { display: none; }
    .hermes-fact-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 0; }
}
