:root {
    --al-bg: #0d1210;
    --al-bg-2: #111815;
    --al-surface: rgba(22, 30, 26, 0.92);
    --al-surface-2: rgba(27, 38, 33, 0.88);
    --al-surface-3: rgba(35, 47, 41, 0.84);
    --al-line: rgba(221, 230, 211, 0.12);
    --al-line-strong: rgba(221, 230, 211, 0.2);
    --al-text: #f5f2e9;
    --al-text-2: #c6d0c5;
    --al-text-3: #89988f;
    --al-gold: #f2c14e;
    --al-green: #2bd18a;
    --al-teal: #3eb7b8;
    --al-red: #f06b5f;
    --al-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
    --al-radius: 8px;
}

.al-body {
    min-height: 100vh;
    margin: 0;
    color: var(--al-text);
    background:
        linear-gradient(180deg, rgba(13, 18, 16, 0.98), rgba(12, 16, 14, 1) 42%, rgba(16, 21, 18, 1)),
        var(--al-bg);
    font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.al-body::before {
    content: "";
    position: fixed;
    inset: 64px 0 auto 0;
    height: 220px;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(43, 209, 138, 0.09), transparent 31%, rgba(242, 193, 78, 0.08) 69%, transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
    z-index: -1;
}

.al-page {
    width: min(1500px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.al-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: end;
    gap: 24px;
    min-height: 246px;
    padding: 34px 0 22px;
    border-bottom: 1px solid var(--al-line);
}

.al-hero__copy {
    max-width: 860px;
}

.al-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--al-gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.al-eyebrow span {
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: var(--al-gold);
}

.al-hero h1 {
    margin: 0;
    max-width: 800px;
    color: var(--al-text);
    font-family: "Barlow Condensed", "Source Sans 3", sans-serif;
    font-size: clamp(3.4rem, 6vw, 6.7rem);
    line-height: 0.88;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.al-hero p {
    max-width: 740px;
    margin: 18px 0 0;
    color: var(--al-text-2);
    font-size: 1.08rem;
    line-height: 1.5;
}

.al-snapshot {
    display: grid;
    gap: 7px;
    padding: 18px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: var(--al-surface);
    box-shadow: var(--al-shadow);
}

.al-snapshot span,
.al-snapshot small,
.al-metric span,
.al-metric small,
.al-filter-grid span,
.al-spot-card span,
.al-row__label,
.al-summary-card span {
    color: var(--al-text-3);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.al-snapshot strong {
    color: var(--al-text);
    font-size: 1.2rem;
    line-height: 1.15;
}

.al-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.al-metric {
    min-height: 116px;
    padding: 16px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: var(--al-surface);
}

.al-metric strong {
    display: block;
    margin-top: 10px;
    color: var(--al-text);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 3.1rem;
    line-height: 0.9;
    font-weight: 800;
}

.al-metric small {
    display: block;
    margin-top: 10px;
    letter-spacing: 0.05em;
    text-transform: none;
}

.al-spotlight {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.al-spot-card {
    min-height: 158px;
    padding: 16px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: linear-gradient(180deg, rgba(35, 47, 41, 0.9), rgba(18, 26, 22, 0.92));
    overflow: hidden;
}

.al-spot-card strong {
    display: block;
    margin-top: 10px;
    color: var(--al-text);
    font-size: 1.04rem;
    line-height: 1.15;
}

.al-spot-card p {
    margin: 8px 0 0;
    color: var(--al-text-2);
    font-size: 0.92rem;
    line-height: 1.35;
}

.al-spot-card b {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-top: 14px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(43, 209, 138, 0.12);
    color: var(--al-green);
    font-size: 0.8rem;
}

.al-controls {
    position: sticky;
    top: 64px;
    z-index: 30;
    margin-top: 18px;
    padding: 12px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: rgba(16, 23, 20, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.al-mode-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.al-mode-tabs button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--al-text-2);
    font: 800 0.78rem/1 "Source Sans 3", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.al-mode-tabs button:hover,
.al-mode-tabs button:focus-visible {
    color: var(--al-text);
    border-color: var(--al-line-strong);
    outline: 0;
}

.al-mode-tabs button.is-active {
    color: #07100c;
    border-color: rgba(242, 193, 78, 0.72);
    background: var(--al-gold);
}

.al-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr 0.95fr 0.9fr 0.72fr 0.9fr minmax(220px, 1.25fr);
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--al-line);
}

.al-filter-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.al-filter-grid select,
.al-filter-grid input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: rgba(8, 13, 11, 0.74);
    color: var(--al-text);
    padding: 0 12px;
    font: 700 0.94rem/1 "Source Sans 3", sans-serif;
    outline: 0;
}

.al-filter-grid input::placeholder {
    color: rgba(198, 208, 197, 0.48);
}

.al-filter-grid select:focus,
.al-filter-grid input:focus {
    border-color: rgba(62, 183, 184, 0.72);
    box-shadow: 0 0 0 3px rgba(62, 183, 184, 0.16);
}

.al-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}

.al-panel {
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: var(--al-surface);
    box-shadow: var(--al-shadow);
    overflow: hidden;
}

.al-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--al-line);
    background: var(--al-surface-2);
}

.al-panel__head h2 {
    margin: 0;
    color: var(--al-text);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0;
}

.al-panel__head p {
    margin: 4px 0 0;
    color: var(--al-text-3);
    font-size: 0.94rem;
    line-height: 1.35;
}

.al-panel__head > span {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(62, 183, 184, 0.13);
    color: var(--al-teal);
    font-weight: 800;
    white-space: nowrap;
}

.al-row-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.al-row {
    display: grid;
    grid-template-columns: 52px minmax(230px, 1.35fr) 112px 112px 112px minmax(240px, 1.1fr);
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: rgba(13, 19, 16, 0.78);
}

.al-row__score {
    display: grid;
    place-items: center;
    width: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(242, 193, 78, 0.12);
    color: var(--al-gold);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.al-row__identity {
    min-width: 0;
}

.al-row__identity a {
    color: var(--al-text);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
}

.al-row__identity a:hover {
    color: var(--al-gold);
}

.al-row__identity span,
.al-row__read span {
    display: block;
    margin-top: 3px;
    color: var(--al-text-3);
    font-size: 0.86rem;
    line-height: 1.25;
}

.al-delta {
    min-width: 0;
}

.al-delta strong {
    display: block;
    margin-top: 2px;
    color: var(--al-text);
    font-size: 1.02rem;
    white-space: nowrap;
}

.al-delta strong.is-positive,
.al-tag.is-positive {
    color: var(--al-green);
}

.al-delta strong.is-negative,
.al-tag.is-negative {
    color: var(--al-red);
}

.al-delta small {
    display: block;
    margin-top: 2px;
    color: var(--al-text-3);
    font-size: 0.76rem;
    line-height: 1.15;
}

.al-row__read {
    min-width: 0;
}

.al-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: 100%;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(43, 209, 138, 0.12);
    color: var(--al-green);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.al-row__read p {
    margin: 7px 0 0;
    color: var(--al-text-2);
    font-size: 0.9rem;
    line-height: 1.28;
}

.al-summary-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.al-summary-card {
    padding: 14px;
    border: 1px solid var(--al-line);
    border-radius: var(--al-radius);
    background: rgba(13, 19, 16, 0.78);
}

.al-summary-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.al-summary-card h3 {
    margin: 2px 0 0;
    color: var(--al-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
}

.al-summary-card a {
    color: inherit;
    text-decoration: none;
}

.al-summary-card a:hover {
    color: var(--al-gold);
}

.al-summary-score {
    color: var(--al-gold);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 0.9;
}

.al-summary-card p {
    margin: 10px 0 0;
    color: var(--al-text-2);
    font-size: 0.9rem;
    line-height: 1.32;
}

.al-mix {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.al-mix__row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 8px;
    color: var(--al-text-2);
    font-size: 0.78rem;
    font-weight: 800;
}

.al-mix__track {
    height: 7px;
    border-radius: 999px;
    background: rgba(221, 230, 211, 0.1);
    overflow: hidden;
}

.al-mix__track span {
    display: block;
    height: 100%;
    width: var(--mix-width, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--al-teal), var(--al-green));
}

.al-loading,
.al-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: var(--al-text-3);
    text-align: center;
}

.al-loading {
    grid-template-columns: repeat(3, 12px);
    justify-content: center;
    gap: 8px;
}

.al-loading span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--al-gold);
    animation: al-pulse 850ms ease-in-out infinite alternate;
}

.al-loading span:nth-child(2) {
    animation-delay: 140ms;
}

.al-loading span:nth-child(3) {
    animation-delay: 280ms;
}

.al-empty {
    padding: 28px;
}

.al-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--al-text);
    font-size: 1.1rem;
}

@keyframes al-pulse {
    from {
        opacity: 0.35;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(-5px);
    }
}

@media (max-width: 1240px) {
    .al-layout {
        grid-template-columns: 1fr;
    }

    .al-panel--pitchers {
        order: -1;
    }

    .al-summary-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .al-row {
        grid-template-columns: 52px minmax(220px, 1fr) repeat(3, minmax(92px, 0.35fr));
    }

    .al-row__read {
        grid-column: 2 / -1;
    }
}

@media (max-width: 980px) {
    .al-page {
        width: min(100% - 24px, 900px);
        padding-top: 16px;
    }

    .al-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 18px;
    }

    .al-snapshot {
        max-width: none;
    }

    .al-metric-grid,
    .al-spotlight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .al-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .al-search {
        grid-column: 1 / -1;
    }

    .al-controls {
        position: static;
    }
}

@media (max-width: 720px) {
    .al-body {
        padding-left: 0;
    }

    .al-hero h1 {
        font-size: 3.4rem;
    }

    .al-hero p {
        font-size: 1rem;
    }

    .al-metric-grid,
    .al-spotlight,
    .al-summary-list {
        grid-template-columns: 1fr;
    }

    .al-filter-grid {
        grid-template-columns: 1fr;
    }

    .al-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .al-panel__head > span {
        width: max-content;
    }

    .al-row {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 12px;
    }

    .al-row__score {
        width: 42px;
        font-size: 1.1rem;
    }

    .al-delta,
    .al-row__read {
        grid-column: 2;
    }

    .al-delta {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: baseline;
        gap: 10px;
    }

    .al-delta strong,
    .al-delta small {
        margin: 0;
    }

    .al-delta small {
        grid-column: 2;
    }
}
