﻿.tbl-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

table.lb {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

    table.lb th {
        background: #FAF8F3;
        border-bottom: 1px solid var(--line);
        padding: 0;
        text-align: left;
        font-weight: 600;
        font-size: 12px;
        color: var(--ink-dim);
        white-space: nowrap;
    }

.th-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 12px 14px;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
    justify-content: center;
}

    .th-btn:hover {
        color: var(--ink);
        background: #F3EFE4;
    }

    .th-btn:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: -2px;
    }

th.num .th-btn {
    justify-content: center;
}

th[aria-sort="ascending"] .th-btn, th[aria-sort="descending"] .th-btn {
    color: var(--ink);
}

.arr {
    display: inline-flex;
    width: 12px;
    height: 12px;
    color: var(--gold);
}

    .arr svg {
        width: 12px;
        height: 12px;
    }

th[aria-sort="none"] .arr {
    color: #CFC8B6;
    opacity: 0;
}

th[aria-sort="none"] .th-btn:hover .arr, th[aria-sort="none"] .th-btn:focus-visible .arr {
    opacity: 1;
}

table.lb td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: middle;
    text-align:center;
}

table.lb tbody tr:last-child td {
    border-bottom: none;
}

table.lb tbody tr {
    cursor: pointer;
    transition: background .12s ease;
}

    table.lb tbody tr:hover {
        background: #FAF6EA;
    }

td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

td.c-pos {
    width: 56px;
}

.rank {
    font-weight: 600;
    color: var(--ink-dim);
    font-variant-numeric: tabular-nums;
}

    .rank.top {
        color: var(--gold);
        font-weight: 700;
    }

.name-link {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

    .name-link:hover {
        color: var(--gold);
        text-decoration: underline;
    }

    .name-link:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
        border-radius: 3px;
    }

td.c-tag {
    color: var(--ink-dim);
    white-space: nowrap;
}

td.dim {
    color: var(--ink-dim);
}




.th-hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    color: #EDEAE2;
    border-radius: 14px;
    padding: 34px 36px;
    margin-bottom: 22px;
}

    .th-hero .mark {
        position: absolute;
        right: 44px;
        top: 50%;
        transform: translateY(-50%);
        height: 86%;
        width: auto;
        opacity: .15;
        color: var(--gold);
        pointer-events: none;
        user-select: none;
        border: none;
        background: none;
        border-radius: 0;
    }

    .th-hero .gold-rule {
        width: 46px;
        height: 3px;
        background: var(--gold);
        border-radius: 2px;
        margin-bottom: 16px;
        position: relative;
    }

    .th-hero h1 {
        margin: 0 0 8px;
        font-size: 34px;
        font-weight: 600;
        color: #fff;
        position: relative;
    }

    .th-hero p {
        margin: 0;
        max-width: 560px;
        color: #B7B2BE;
        font-size: 14.5px;
        position: relative;
    }

.th-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-bright);
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 3px 12px;
}

    .chip.plain {
        color: #CFCAD6;
        border-color: #3A3742;
    }

    .chip i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
    }

.th-hero .sub {
    position: relative;
    color: var(--gold-bright);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Pestañas (subrayado) */
.tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}

.tab {
    position: relative;
    background: none;
    border: none;
    padding: 11px 16px 12px;
    font: 600 14px 'Inter',sans-serif;
    color: var(--ink-dim);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

    .tab:hover {
        color: var(--ink);
        background: #EFEBDF;
    }

    .tab[aria-selected="true"] {
        color: var(--ink);
    }

        .tab[aria-selected="true"]::after {
            content: "";
            position: absolute;
            left: 10px;
            right: 10px;
            bottom: -1px;
            height: 3px;
            border-radius: 2px 2px 0 0;
            background: var(--gold);
        }

    .tab:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: -2px;
    }

.t-view {
    display: none;
}

    .t-view.active {
        display: block;
    }

/* Podio */
.podium {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.pod {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .pod:hover {
        border-color: var(--gold);
        box-shadow: 0 6px 18px rgba(14,13,17,.08);
    }

    .pod:focus-visible {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
    }

    .pod.first {
        border-color: var(--gold);
        background: linear-gradient(180deg,#FFFDF6,#fff 60%);
    }

.pod-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--gold-bright);
    font: 700 13px 'Inter',sans-serif;
    margin-bottom: 6px;
}

.pod.first .pod-pos {
    background: var(--gold-bright);
    color: var(--dark);
}

.pod.second .pod-pos {
    background: var(--silver);
    color: var(--dark);
}

.pod.third .pod-pos {
    background: var(--bronze);
    color: var(--dark);
}

.pod-name {
    font-family: 'Fraunces',serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pod-tag {
    font-size: 13px;
    color: var(--ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pod-diff {
    font-family: 'Fraunces',serif;
    font-size: 30px;
    font-weight: 600;
    margin-top: 8px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.pod-range {
    font-size: 12.5px;
    color: var(--ink-dim);
    font-variant-numeric: tabular-nums;
}

@media (max-width:760px) {
    .podium {
        grid-template-columns: 1fr;
    }
}

/* Diferencia y "no califica" */
.diff {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

    .diff.pos {
        color: #2F7A41;
    }

    .diff.neg {
        color: #B0453D;
    }

    .diff.zero {
        color: var(--ink-dim);
    }

tr.nq td {
    color: var(--ink-dim);
}

tr.nq .name-link {
    color: var(--ink-dim);
}

.nq-pill {
    display: inline-block;
    margin-left: 8px;
    font: 600 11px 'Inter',sans-serif;
    color: #8A5A12;
    background: #F8EBCF;
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
}

table.lb {
    min-width: 960px;
}

td.c-name, td.c-tag {
    white-space: nowrap;
}

    td.c-name .name-link, td.c-tag span {
        display: inline-block;
        max-width: 230px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
    }

table.lb td.c-pos {
    width: 70px;
}

.tbl-note {
    margin: 14px 2px 0;
    font-size: 12.5px;
    color: var(--ink-dim);
}

/* Reglas */
.rules {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
}

.rules-intro {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    margin: 0 0 6px;
}

.rule {
    display: flex;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 22px;
}

.rule-n {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--gold-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 16px 'Fraunces',serif;
}

.rule h3 {
    margin: 2px 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.rule p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: #3A3640;
}

    .rule p + p {
        margin-top: 8px;
    }

.example {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    align-items: center;
    margin-top: 12px;
    padding: 12px 16px;
    background: #FAF6EA;
    border: 1px solid #EADFC0;
    border-radius: 10px;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

    .example b {
        font-weight: 700;
    }

    .example .pos {
        color: #2F7A41;
    }

    .example .neg {
        color: #B0453D;
    }

.glossary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 22px;
}

    .glossary h3 {
        margin: 0 0 12px;
        font-size: 18px;
        font-weight: 600;
    }

    .glossary dl {
        margin: 0;
        display: grid;
        grid-template-columns: max-content 1fr;
        gap: 10px 22px;
        font-size: 14px;
    }

    .glossary dt {
        font-weight: 600;
    }

    .glossary dd {
        margin: 0;
        color: #3A3640;
    }

@media (max-width:640px) {
    .glossary dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .glossary dd {
        margin-bottom: 10px;
    }
}

.highcharts-figure{
    margin:0px;
    border-radius:5px;
}

.graph-container {
    border-radius: var(--radius);
    overflow:hidden;
    margin-top:20px;
}