/* Global Dugout — shared styles for every page */

/* Brand colors (taken from the logo) */
:root {
  --bg: #0B1830; --panel: #11223F; --panel-2: #152A4B; --line: #1F3354; --line-2: #2E4670;
  --text: #F5F8FC; --muted: #A9B6CC; --soft: #D3DCEA;
  --accent: #FF5A66; --accent-ink: #0B1830; --ring: #4E80C4; --ring-light: #7FA6DC;
  --great: #C23443; --avg: #5A6B86; --poor: #2F5FA8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'IBM Plex Sans JP', system-ui, sans-serif; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: #FF8A93; }
:focus-visible { outline: 2px solid var(--ring-light); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .wrap { padding-left: 16px; padding-right: 16px; } }
.display { font-family: 'Barlow Condensed', 'IBM Plex Sans JP', sans-serif; font-weight: 800; font-style: italic; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
header.site { border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.logo { width: 48px; height: 48px; display: block; }
.wordmark { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-style: italic; font-size: 28px; letter-spacing: 0.01em; }
nav.main { display: flex; flex-wrap: wrap; gap: 0 28px; flex: 1 1 auto; }
nav.main a { color: var(--text); text-decoration: none; font-weight: 500; padding: 10px 0; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--accent); }
nav.main a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.toggle { display: flex; gap: 4px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.toggle button { border: 0; border-radius: 999px; min-height: 40px; padding: 0 16px; font: inherit; font-weight: 500; cursor: pointer; background: transparent; color: var(--soft); }
.toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- page titles ---------- */
.page-head { padding-top: 48px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.kicker { font-size: 14px; letter-spacing: 0.12em; color: var(--ring-light); text-transform: uppercase; }
.page-head h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.page-head p { margin: 0; color: var(--muted); font-size: 16px; max-width: 52rem; }

/* ---------- cards, tags ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 600px) { .card { padding: 20px 16px; } }
.card h2 { margin: 0; font-size: 32px; line-height: 1.1; }
.card .sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { font-size: 13px; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft); white-space: nowrap; }
.sample { font-size: 13px; color: var(--muted); border: 1px dashed #4A5260; border-radius: 4px; padding: 3px 8px; }
.more { font-weight: 500; text-decoration: none; padding: 8px 0; align-self: flex-start; }

/* ---------- controls ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 16px; }
.seg { display: inline-flex; gap: 4px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg button { border: 0; border-radius: 999px; min-height: 40px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; background: transparent; color: var(--soft); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg[hidden], [hidden] { display: none !important; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--soft); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field { min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 16px; }
.controls .field { flex: 1 1 200px; max-width: 280px; margin-left: auto; }
@media (max-width: 700px) { .controls .field { max-width: none; margin-left: 0; } }

/* ---------- tables ---------- */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { padding: 10px 10px; border-bottom: 1px solid var(--line-2); font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.lb th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.lb th button:focus-visible { outline: 2px solid var(--ring-light); }
.lb th[aria-sort="ascending"], .lb th[aria-sort="descending"] { color: var(--text); }
.lb th[aria-sort="ascending"] button::after { content: "▲"; font-size: 10px; color: var(--accent); }
.lb th[aria-sort="descending"] button::after { content: "▼"; font-size: 10px; color: var(--accent); }
.lb .sticky { position: sticky; left: 0; z-index: 1; background: var(--panel); }
.lb thead .sticky { z-index: 2; }
.lb tbody tr:hover .sticky { background: var(--panel-2); }
.lb .player { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.lb .rk { width: 28px; flex: none; text-align: right; color: var(--accent); font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.lb .pname a { color: var(--text); text-decoration: none; font-weight: 500; }
.lb .pname a:hover { color: var(--accent); text-decoration: underline; }
.lb .pmeta { display: block; font-size: 12px; color: var(--muted); }
.lb .dim { color: var(--muted); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 6px; border-radius: 999px; color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.count { font-size: 14px; color: var(--muted); padding: 12px 2px 0; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }

/* ---------- percentile bars ---------- */
.pct-list { display: flex; flex-direction: column; gap: 14px; }
.pct-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) 64px; align-items: center; gap: 14px; }
.pct-row.novalue { grid-template-columns: 132px minmax(0, 1fr); }
@media (max-width: 480px) { .pct-row { grid-template-columns: 96px minmax(0, 1fr) 52px; gap: 10px; } .pct-row.novalue { grid-template-columns: 96px minmax(0, 1fr); } }
.pct-label { font-size: 14px; color: var(--soft); }
.pct-val { font-size: 14px; text-align: right; color: var(--soft); font-family: 'IBM Plex Mono', monospace; }
.pct-track { position: relative; height: 32px; display: flex; align-items: center; margin: 0 16px; }
.pct-track::before { content: ""; width: 100%; height: 8px; border-radius: 4px; background: var(--line); }
.pct-fill { position: absolute; left: 0; height: 8px; border-radius: 4px; }
.pct-dot { position: absolute; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; border: 2px solid var(--panel); font-family: 'IBM Plex Mono', monospace; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: 72px; }
.foot { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--muted); }
.foot a { text-decoration: none; }
