/* ============================================================
   BASE — layout, typography, shared components
   (tokens live in tokens.css, the reset in reset.css)
   ============================================================ */

.pl-container {
    max-width: var(--pl-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.pl-section-title {
    font-family: var(--pl-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pl-ink);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--pl-green);
    display: inline-block;
}

.pl-section-title--center {
    display: block;
    text-align: center;
    border-bottom: none;
    position: relative;
}
.pl-section-title--center::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--pl-green);
    margin: 8px auto 0;
}

.pl-empty {
    color: var(--pl-ink-light);
    font-style: italic;
    font-size: 0.95rem;
}

.pl-diff--pos { color: var(--pl-green); }
.pl-diff--neg { color: var(--pl-red); }

/* Shared page hero (teams hub, standings, schedule, etc.) */
.pl-page-hero {
    background-color: var(--pl-green);
    background-image: repeating-linear-gradient(
        90deg,
        transparent, transparent 28px,
        rgba(255,255,255,0.04) 28px, rgba(255,255,255,0.04) 30px
    );
    padding: 48px 24px 52px;
    position: relative;
    overflow: hidden;
}

.pl-page-hero::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0; right: 0;
    height: 60px;
    background: var(--pl-white);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.pl-page-hero .pl-container { position: relative; z-index: 1; }

.pl-page-hero__eyebrow {
    font-family: var(--pl-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
}

.pl-page-hero__title {
    font-family: var(--pl-font-display);
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pl-white);
    line-height: 1;
    margin-bottom: 8px;
}

.pl-page-hero__sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

/* Buttons */
.pl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--pl-radius);
    font-family: var(--pl-font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border: 2px solid transparent;
}
.pl-btn--outline {
    border-color: var(--pl-green);
    color: var(--pl-green);
    background: transparent;
}
.pl-btn--outline:hover {
    background: var(--pl-green);
    color: var(--pl-white);
    text-decoration: none;
}

/* Shared stats table base */
.pl-table-wrap { overflow-x: auto; margin-top: 4px; }

.pl-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--pl-white);
    border-radius: var(--pl-radius-lg);
    overflow: hidden;
    box-shadow: var(--pl-shadow);
    white-space: nowrap;
}

.pl-stats-table thead { background: var(--pl-green); color: var(--pl-white); }

.pl-stats-table th {
    padding: 10px 12px;
    font-family: var(--pl-font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.pl-stats-table__player { text-align: left !important; min-width: 160px; }

.pl-stats-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--pl-border);
    text-align: center;
    font-family: var(--pl-font-mono);
    font-size: 0.83rem;
    color: var(--pl-ink-mid);
}

.pl-stats-table td.pl-stats-table__player {
    font-family: var(--pl-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pl-ink);
    text-align: left;
}

.pl-stats-table tbody tr:last-child td { border-bottom: none; }
.pl-stats-table tbody tr:hover { background: var(--pl-green-muted); }
.pl-stats-table__avg, .pl-stats-table__era { font-weight: 700; color: var(--pl-green) !important; }
.pl-stats-table__ops { font-weight: 700; color: var(--pl-green) !important; }
.pl-stats-table__opsplus { font-family: var(--pl-font-mono); font-size: 0.83rem; }
.pl-stats-cell-teams {
    font-family: var(--pl-font-display) !important;
    font-size: 0.7rem !important;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--pl-ink-light) !important;
}

/* Sortable table headers */
.pl-sortable thead th { cursor: pointer; user-select: none; position: relative; padding-right: 20px; }
.pl-sortable thead th::after { content: '⇅'; position: absolute; right: 5px; font-size: 0.65rem; opacity: 0.3; }
.pl-sortable thead th.pl-sort-active::after { opacity: 1; }
.pl-sortable thead th.pl-sort-asc::after  { content: '↑'; }
.pl-sortable thead th.pl-sort-desc::after { content: '↓'; }
.pl-sortable thead th.pl-sort-active { background: #0d4330; color: var(--pl-white); }

/* Responsive base */
@media (max-width: 480px) {
    .pl-container { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}