/* ADAMAS Athlete Suspensions v0.2.8 — white / deep olive */

/* The same tokens are defined on body-level menus so an open dropdown can
   follow the hero theme without inheriting from the section. */
.adamas-suspension,
.as-custom-menu[data-as-module] {
    --as-base: #ffffff;
    --as-accent: #53663c;
    --as-gold: #e8bd46;
    --as-gold-hover: #fbd479;
    --as-button-ink: #151b15;
    --as-ink: #1d281b;
    --as-copy: #4d5748;
    --as-muted: #56624f;
    --as-line: rgba(29,40,27,.12);
    --as-strong-line: rgba(29,40,27,.22);
    --as-wash: rgba(29,40,27,.018);
    --as-chip-fill: rgba(83,102,60,.065);
    --as-hover-fill: rgba(83,102,60,.055);
    --as-open-fill: rgba(83,102,60,.045);
    --as-menu-fill: #fbfcf8;
    --as-menu-shadow: 0 22px 48px rgba(13,19,14,.14);
    --as-scroll-track: rgba(29,40,27,.035);
    --as-scroll-thumb: rgba(83,102,60,.38);
    --as-accent-soft: rgba(83,102,60,.52);
    --as-focus: #53663c;
    --as-selected-start: rgba(83,102,60,.095);
    --as-selected-end: rgba(83,102,60,.02);
    --as-detail-tint: rgba(83,102,60,.035);
    --as-transparent: rgba(29,40,27,0);
    --as-active-ink: #53663c;
    --as-provisional-line: #a5884e;
    --as-provisional-ink: #85520a;
    color-scheme: light;
}

.adamas-suspension[data-theme="dark"],
.as-custom-menu[data-as-module][data-theme="dark"] {
    --as-base: #151b15;
    --as-accent: #e8bd46;
    --as-ink: #f4f1e6;
    --as-copy: rgba(244,241,230,.76);
    --as-muted: rgba(244,241,230,.72);
    --as-line: rgba(244,241,230,.13);
    --as-strong-line: rgba(244,241,230,.22);
    --as-wash: rgba(244,241,230,.018);
    --as-chip-fill: rgba(244,241,230,.025);
    --as-hover-fill: rgba(244,241,230,.055);
    --as-open-fill: rgba(244,241,230,.028);
    --as-menu-fill: #1c261b;
    --as-menu-shadow: 0 22px 48px rgba(0,0,0,.30);
    --as-scroll-track: rgba(244,241,230,.035);
    --as-scroll-thumb: rgba(232,189,70,.38);
    --as-accent-soft: rgba(232,189,70,.52);
    --as-focus: #e8bd46;
    --as-selected-start: rgba(232,189,70,.095);
    --as-selected-end: rgba(232,189,70,.02);
    --as-detail-tint: rgba(232,189,70,.018);
    --as-transparent: rgba(244,241,230,0);
    --as-active-ink: #e8bd46;
    --as-provisional-line: #a5884e;
    --as-provisional-ink: #e7c68a;
    color-scheme: dark;
}

.adamas-suspension {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
    isolation: auto;
    color: var(--as-ink);
    background: var(--as-base);
    font-family: "Sora", Arial, sans-serif;
}

.adamas-suspension * { box-sizing: border-box; }

.as-shell {
    width: min(1380px, calc(100% - 64px));
    margin: 0 auto;
    padding: 54px 0 58px;
}

/* =========================================================
   HEADING
   ========================================================= */

.as-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 36px;
}

.as-heading-copy { max-width: 720px; }

.as-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--as-accent);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.as-kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    background: var(--as-accent);
}

.as-title {
    margin: 0;
    color: var(--as-ink);
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.07;
    font-weight: 800;
    letter-spacing: -.04em;
}

.as-intro {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--as-copy);
    font-size: 14px;
    line-height: 1.75;
}

.as-dataset-meta {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto auto 1px auto;
    align-items: end;
    gap: 12px;
    padding-bottom: 4px;
    color: var(--as-muted);
}

.as-meta-number {
    color: var(--as-ink);
    font-size: 24px;
    line-height: .85;
    font-weight: 800;
    letter-spacing: -.04em;
}

.as-meta-label,
.as-meta-range {
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.as-meta-separator {
    width: 1px;
    height: 22px;
    background: var(--as-line);
}

/* =========================================================
   SEARCH DECK
   ========================================================= */

.as-search-panel {
    position: relative;
    border-top: 1px solid var(--as-strong-line);
    border-bottom: 1px solid var(--as-strong-line);
}

.as-primary-controls {
    display: grid;
    grid-template-columns: minmax(300px, 1.35fr) minmax(150px,.55fr) minmax(230px,.8fr) 130px;
    align-items: stretch;
}

.as-control {
    position: relative;
    min-width: 0;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 24px;
    border-right: 1px solid var(--as-line);
}

.as-control:first-child { padding-left: 0; }

.as-control-label,
.as-advanced-field > span {
    display: block;
    margin-bottom: 9px;
    color: var(--as-muted);
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.as-search-input-wrap,
.as-select-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0,1fr) auto;
    align-items: center;
    min-width: 0;
}

.as-field-icon {
    display: flex;
    align-items: center;
    color: var(--as-accent);
}

.as-field-icon svg {
    width: 18px;
    height: 18px;
}

.as-search-input,
.as-select {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 6px 10px;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--as-ink) !important;
    font: inherit;
}

.as-search-input {
    font-size: clamp(17px,1.35vw,21px);
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: -.02em;
}

.as-search-input::placeholder {
    color: var(--as-muted);
    opacity: 1;
}

.as-search-input::-webkit-search-cancel-button { display: none; }

.as-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.as-select option {
    color: var(--as-ink);
    background: var(--as-menu-fill);
}

.as-select-chevron {
    display: flex;
    align-items: center;
    color: var(--as-muted);
    pointer-events: none;
}

.as-select-chevron svg {
    width: 15px;
    height: 15px;
}

.as-input-clear,
.as-submit,
.as-advanced-toggle,
.as-reset-all,
.as-result-main,
.as-page {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 0;
    outline: 0;
    font: inherit;
    cursor: pointer;
}

.as-input-clear {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--as-muted);
    background: transparent;
}

.as-input-clear:hover { color: var(--as-accent); }
.as-input-clear svg { width: 15px; height: 15px; }

.as-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 24px;
    color: var(--as-button-ink);
    background: var(--as-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
    transition: background .2s ease;
}

.as-submit:hover { background: var(--as-gold-hover); }
.as-submit svg { width: 18px; height: 18px; transition: transform .22s ease; }
.as-submit:hover svg { transform: translateX(3px); }

.as-utility-row {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.as-advanced-toggle,
.as-reset-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: var(--as-muted);
    background: transparent;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.as-advanced-toggle:hover,
.as-advanced-toggle[aria-expanded="true"],
.as-reset-all:hover { color: var(--as-accent); }

.as-advanced-toggle svg,
.as-reset-all svg { width: 14px; height: 14px; }

.as-advanced {
    display: grid;
    grid-template-columns: repeat(3,minmax(180px,1fr));
    gap: 18px;
    padding: 0 0 22px;
    animation: asReveal .20s ease both;
}

.as-advanced-field {
    min-width: 0;
    padding-top: 15px;
    border-top: 1px solid var(--as-line);
}

.as-advanced-field .as-select {
    min-height: 38px;
    padding-left: 0;
    border-bottom: 1px solid var(--as-strong-line) !important;
}

.as-idle {
    min-height: 37px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--as-muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .02em;
}

.as-idle-line {
    width: 22px;
    height: 1px;
    background: var(--as-accent-soft);
}


/* =========================================================
   DROPDOWN PORTAL LAYER
   ---------------------------------------------------------
   v0.2.5: open menus are moved to <body> and positioned with
   position:fixed. This completely escapes SPPB overflow and
   stacking contexts, so the menu can extend over the section
   below without lifting the whole search section.
   ========================================================= */

.as-custom-menu.as-portal-open {
    position: fixed !important;
    margin: 0 !important;
    font-family: "Sora", Arial, sans-serif;
    isolation: isolate;
    z-index: 10050 !important;
}

/* =========================================================
   CUSTOM ADAMAS SELECT / DROPDOWN
   ========================================================= */

.as-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.as-select-wrap.is-custom {
    grid-template-columns: 24px minmax(0,1fr);
}

.as-select-wrap.is-custom > .as-select-chevron {
    display: none;
}

.as-select-wrap.is-custom > .as-custom-select {
    grid-column: 2;
    min-width: 0;
}

.as-custom-select {
    position: relative;
    width: 100%;
    min-width: 0;
    z-index: 12;
}


.as-custom-trigger {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 18px;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 6px 0 6px 10px;
    border: 0;
    border-radius: 0;
    outline: 0;
    color: var(--as-ink);
    background: transparent;
    font: inherit;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.as-custom-trigger:focus-visible {
    outline: 1px solid var(--as-focus);
    outline-offset: 5px;
}

.as-custom-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.as-custom-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--as-muted);
    transition: color .18s ease, transform .20s ease;
}

.as-custom-caret svg {
    width: 15px;
    height: 15px;
}

.as-custom-select.is-open .as-custom-caret {
    color: var(--as-accent);
    transform: rotate(180deg);
}

.as-custom-menu {
    position: absolute;
    top: calc(100% + 11px);
    left: 0;
    width: max(100%, 235px);
    max-height: 326px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 7px 0;
    border: 1px solid var(--as-line);
    border-top: 2px solid var(--as-accent);
    border-radius: 0;
    background: var(--as-menu-fill);
    box-shadow: var(--as-menu-shadow);
    scrollbar-width: thin;
    scrollbar-color: var(--as-scroll-thumb) var(--as-scroll-track);
    animation: asDropdownReveal .16s ease both;
    z-index: 30;
}


.as-custom-menu::-webkit-scrollbar {
    width: 7px;
}

.as-custom-menu::-webkit-scrollbar-track {
    background: var(--as-scroll-track);
}

.as-custom-menu::-webkit-scrollbar-thumb {
    background: var(--as-scroll-thumb);
}

.as-custom-option {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 100%;
    min-height: 39px;
    display: flex;
    align-items: center;
    padding: 8px 18px 8px 19px;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    outline: 0;
    color: var(--as-copy);
    background: transparent;
    font: inherit;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, border-color .16s ease, padding-left .16s ease;
}

.as-custom-option:hover,
.as-custom-option:focus-visible {
    color: var(--as-ink);
    background: var(--as-hover-fill);
    border-left-color: var(--as-accent-soft);
    padding-left: 23px;
}

.as-custom-option.is-selected {
    color: var(--as-accent);
    border-left-color: var(--as-accent);
    background:
        linear-gradient(90deg, var(--as-selected-start), var(--as-selected-end) 45%, transparent 100%);
    font-weight: 760;
}

.as-custom-option.is-selected::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-left: auto;
    background: var(--as-accent);
    flex: 0 0 auto;
}

.as-advanced-field .as-custom-select {
    width: 100%;
}

.as-advanced-field .as-custom-trigger {
    min-height: 39px;
    padding: 7px 0;
    border-bottom: 1px solid var(--as-strong-line);
}

.as-advanced-field .as-custom-menu {
    width: 100%;
    min-width: 220px;
}

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


/* =========================================================
   RESULTS — INTEGRATED DARK CANVAS
   ========================================================= */

.as-results {
    position: relative;
    margin-top: 28px;
    color: var(--as-ink);
    background: transparent;
    border-top: 1px solid var(--as-line);
    animation: asReveal .24s ease both;
}

.as-results::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 58px;
    height: 2px;
    background: var(--as-accent);
}

.as-results-top {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 22px;
    border-bottom: 1px solid var(--as-line);
    background: var(--as-wash);
}

.as-results-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.as-results-number {
    color: var(--as-ink);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.as-results-text {
    color: var(--as-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.as-active-filter-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.as-active-filter-list span {
    padding: 5px 8px;
    border-left: 2px solid var(--as-accent);
    color: var(--as-copy);
    background: var(--as-chip-fill);
    font-size: 9px;
    font-weight: 700;
}

.as-table-head,
.as-result-main {
    display: grid;
    grid-template-columns: minmax(230px,1.45fr) 78px minmax(140px,.72fr) 76px minmax(130px,.72fr) 28px;
    gap: 20px;
    align-items: center;
}

.as-table-head {
    min-height: 43px;
    padding: 0 22px;
    color: var(--as-muted);
    border-bottom: 1px solid var(--as-line);
    background: var(--as-wash);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.as-result-list {
    background:
        linear-gradient(
            180deg,
            var(--as-wash),
            var(--as-transparent)
        );
}

.as-result {
    position: relative;
    border-bottom: 1px solid var(--as-line);
    transition: background .2s ease;
}

.as-result::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: transparent;
    transition: background .2s ease;
}

.as-result:hover {
    background: var(--as-wash);
}

.as-result.is-open {
    background: var(--as-open-fill);
}

.as-result.is-open::before {
    background: var(--as-accent);
}

.as-result-main {
    width: 100%;
    min-height: 76px;
    padding: 13px 22px;
    color: inherit;
    background: transparent;
    text-align: left;
    transition: background .18s ease;
}

.as-result-main:hover {
    background: var(--as-wash);
}

.as-col {
    min-width: 0;
}

.as-col-name strong {
    display: block;
    color: var(--as-ink);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
}

.as-col-name small {
    display: block;
    margin-top: 3px;
    color: var(--as-muted);
    font-size: 9px;
    line-height: 1.35;
    font-weight: 650;
}

.as-col-year,
.as-col-sport,
.as-col-test {
    color: var(--as-copy);
    font-size: 11px;
    line-height: 1.45;
    font-weight: 650;
}

.as-col-status em {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding-left: 8px;
    border-left: 2px solid var(--as-line);
    color: var(--as-muted);
    font-size: 9px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 800;
}

.as-col-status em[data-status="active"] {
    border-left-color: var(--as-accent);
    color: var(--as-active-ink);
}

.as-col-status em[data-status="provisional-suspension"] {
    border-left-color: var(--as-provisional-line);
    color: var(--as-provisional-ink);
}

.as-col-toggle {
    display: flex;
    justify-content: flex-end;
    color: var(--as-muted);
}

.as-col-toggle svg {
    width: 17px;
    height: 17px;
    transition: transform .2s ease, color .2s ease;
}

.as-result-main:hover .as-col-toggle {
    color: var(--as-accent);
}

.as-result.is-open .as-col-toggle svg {
    transform: rotate(180deg);
}

.as-result-detail {
    display: none;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px 28px;
    padding: 3px 22px 26px;
    background:
        linear-gradient(
            90deg,
            var(--as-detail-tint),
            var(--as-wash) 36%,
            var(--as-transparent)
        );
}

.as-result.is-open .as-result-detail {
    display: grid;
}

.as-detail {
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid var(--as-line);
}

.as-detail-wide {
    grid-column: span 2;
}

.as-detail-label {
    display: block;
    margin-bottom: 6px;
    color: var(--as-muted);
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.as-detail-value {
    color: var(--as-copy);
    font-size: 11px;
    line-height: 1.65;
}

.as-empty {
    padding: 48px 22px;
    color: var(--as-muted);
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid var(--as-line);
}

.as-pagination {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 18px;
    border-top: 1px solid var(--as-line);
    background: var(--as-wash);
}

.as-page {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--as-muted);
    background: transparent;
}

.as-page:hover:not(:disabled) {
    color: var(--as-accent);
}

.as-page:disabled {
    opacity: .20;
    cursor: default;
}

.as-page svg {
    width: 18px;
    height: 18px;
}

.as-page-status {
    min-width: 105px;
    color: var(--as-muted);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .07em;
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .as-primary-controls {
        grid-template-columns: minmax(260px,1.2fr) 150px minmax(200px,.8fr) 110px;
    }

    .as-control { padding-left: 18px; padding-right: 18px; }
    .as-result-main,
    .as-table-head {
        grid-template-columns: minmax(210px,1.3fr) 68px minmax(120px,.7fr) 65px minmax(105px,.65fr) 24px;
        gap: 14px;
    }
}

@media (max-width: 860px) {
    .as-shell { width: min(100% - 36px, 1380px); padding: 44px 0 48px; }
    .as-heading { align-items: flex-start; }
    .as-dataset-meta { display: none; }

    .as-primary-controls {
        grid-template-columns: 1fr 1fr;
    }

    .as-control,
    .as-control:first-child {
        min-height: 82px;
        padding: 16px 18px;
        border-bottom: 1px solid var(--as-line);
    }

    .as-control:nth-child(2) { border-right: 0; }
    .as-control-sport { border-bottom: 0; }

    .as-submit {
        min-height: 82px;
        padding: 0 20px;
    }

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

    .as-table-head { display: none; }
    .as-result-main {
        grid-template-columns: minmax(0,1fr) 65px 24px;
        gap: 14px;
        padding: 18px;
    }

    .as-col-sport,
    .as-col-test,
    .as-col-status { display: none; }

    .as-result-detail { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 18px 22px; }
    .as-detail-wide { grid-column: span 2; }
    .as-results-top { padding: 0 18px; }
}

@media (max-width: 560px) {
    .as-shell { width: calc(100% - 28px); padding: 36px 0 40px; }
    .as-heading { margin-bottom: 27px; }
    .as-title { font-size: 29px; }
    .as-intro { font-size: 13px; }

    .as-primary-controls { grid-template-columns: 1fr; }
    .as-control,
    .as-control:first-child,
    .as-control:nth-child(2),
    .as-control-sport {
        min-height: 74px;
        padding: 13px 0;
        border-right: 0;
        border-bottom: 1px solid var(--as-line);
    }

    .as-submit {
        min-height: 54px;
        margin-top: 10px;
        padding: 0 18px;
    }

    .as-utility-row { min-height: 45px; }
    .as-advanced { grid-template-columns: 1fr; gap: 10px; }

    .as-results { margin-top: 24px; }
    .as-results-top { align-items: flex-start; flex-direction: column; justify-content: center; min-height: 72px; gap: 5px; }
    .as-active-filter-list { justify-content: flex-start; }

    .as-result-main {
        grid-template-columns: minmax(0,1fr) 24px;
        min-height: 70px;
        padding: 16px;
    }

    .as-col-year { display: none; }
    .as-col-name strong { font-size: 12px; }

    .as-result-detail { grid-template-columns: 1fr; padding: 0 16px 20px; }
    .as-detail-wide { grid-column: auto; }

    .as-pagination { justify-content: center; }
}
