/*
 * 3DMark — sección de las fichas (.tdm-info) y piezas compartidas con la página /3dmark
 * (espectro de gamas, medidor). Lenguaje de la ficha: borde negro de 3 px, sombra dura, amarillo Terxo;
 * el marcador principal va en negro, como la pantalla de resultados de un benchmark.
 */

:root {
    --tdm-ink: #0a0a0a;
    --tdm-paper: #ffffff;
    --tdm-yellow: #ffe566;
    --tdm-pink: #ff5c93;
    --tdm-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================
   Espectro de gamas (compartido)
   ========================================================= */
.tdm-spec {
    position: relative;
    padding: 30px 0 22px;
}

.tdm-spec__bar {
    position: relative;
    height: 16px;
    border: 2px solid var(--tdm-ink);
    background: #f2f2f2;
}

.tdm-spec__seg {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--c);
    border-right: 2px solid var(--tdm-ink);
}

.tdm-spec__seg:last-of-type {
    border-right: 0;
}

.tdm-spec__seg em {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    overflow: hidden;
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    opacity: 0.75;
}

.tdm-spec__mark {
    position: absolute;
    top: -7px;
    bottom: -7px;
    width: 0;
    border-left: 2px dashed currentColor;
}

.tdm-spec__mark--vs {
    border-left: 4px solid #ff4f93;
}

/* Marcador: parte de la izquierda y se desliza hasta su sitio */
.tdm-spec__pin {
    position: absolute;
    top: -30px;
    bottom: -6px;
    left: 0;
    width: 0;
    z-index: 2;
    transition: left 1.5s var(--tdm-ease) 0.15s;
}

.tdm-spec__pin::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 0;
    left: -2px;
    width: 4px;
    background: currentColor;
}

.tdm-spec__pin i {
    position: absolute;
    top: 0;
    left: -9px;
    width: 18px;
    height: 16px;
    background: var(--tdm-pink);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.is-in .tdm-spec__pin,
.tdm-spec--static .tdm-spec__pin {
    left: var(--pos);
}

/* =========================================================
   Sección en la ficha
   ========================================================= */
.tdm-info {
    margin-top: 0 !important;
    padding: 24px 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-top: 3px solid var(--tdm-ink) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    position: relative;
}

.tdm-info .tdm-title {
    margin: 0 0 4px !important;
    font-family: 'Syne', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    color: var(--tdm-ink) !important;
    text-transform: uppercase;
    display: block;
}

.tdm-info .tdm-title span {
    display: inline-block;
    padding: 8px 14px;
    background: var(--tdm-yellow);
    border: 3px solid var(--tdm-ink);
    box-shadow: 4px 4px 0 var(--tdm-ink);
}

.tdm,
.tdm *,
.tdp,
.tdp * {
    box-sizing: border-box;
}

.tdm {
    display: grid;
    background: var(--tdm-paper);
    border: 3px solid var(--tdm-ink);
    box-shadow: 6px 6px 0 var(--tdm-ink);
    font-family: 'Montserrat', system-ui, sans-serif;
    color: var(--tdm-ink);
    overflow: hidden;
}

/* —— Marcador principal (negro) —— */
.tdm__board {
    position: relative;
    padding: 18px 20px 6px;
    color: #fff;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 229, 102, 0.14), transparent 55%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
        #0d0d0f;
    border-bottom: 3px solid var(--tdm-ink);
}

.tdm__board-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tdm__test {
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.tdm__src {
    display: inline-flex;
    padding: 4px 9px;
    font-family: 'Syne', sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    border: 1.5px solid currentColor;
}

.tdm__src--m {
    color: #0d0d0f;
    background: #7ee0a8;
    border-color: #7ee0a8;
}

.tdm__src--e {
    color: rgba(255, 255, 255, 0.85);
    border-style: dashed;
}

.tdm__score-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 8px;
}

.tdm__score {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
    line-height: 0.9;
}

.tdm__approx {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255, 229, 102, 0.6);
}

.tdm__score strong {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--tdm-yellow);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 28px rgba(255, 229, 102, 0.25);
}

.tdm__score small {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.tdm__verdict {
    display: grid;
    justify-items: end;
    gap: 8px;
    text-align: right;
}

.tdm__tier {
    display: inline-flex;
    padding: 6px 12px;
    font-family: 'Syne', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--tdm-ink);
    background: var(--tier, var(--tdm-yellow));
    border: 2px solid var(--tdm-ink);
    box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.85);
}

.tdm__beats {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

.tdm__beats strong {
    font-size: 1.05rem;
    color: #fff;
}

.tdm__beats span {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.55);
}

.tdm__board .tdm-spec {
    color: #fff;
    margin-top: 6px;
}

.tdm__board .tdm-spec__bar {
    border-color: #fff;
    background: #2a2a2e;
}

.tdm__board .tdm-spec__seg {
    border-right-color: #0d0d0f;
    opacity: 0.92;
}

.tdm__spec-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 12px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.tdm__spec-legend i {
    display: inline-block;
    margin-right: 6px;
    vertical-align: -1px;
}

.tdm__spec-legend .pin {
    width: 10px;
    height: 9px;
    background: var(--tdm-pink);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.tdm__spec-legend .med {
    width: 0;
    height: 11px;
    border-left: 2px dashed currentColor;
}

/* —— Cuerpo blanco —— */
.tdm__body {
    display: grid;
    gap: 16px;
    padding: 18px 20px 20px;
}

.tdm__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tdm-tile {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 12px 12px 11px 18px;
    background: #fff;
    border: 2px solid var(--tdm-ink);
    box-shadow: 3px 3px 0 var(--tdm-ink);
    overflow: hidden;
}

.tdm-tile::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--tone);
    border-right: 2px solid var(--tdm-ink);
}

.tdm-tile__name {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
}

.tdm-tile__val {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.tdm-tile__val i {
    margin-right: 2px;
    font-style: normal;
    font-weight: 600;
    color: #999;
}

.tdm-tile__val--na {
    font-size: 0.82rem;
    letter-spacing: 0;
    color: #777;
}

.tdm-tile__rank {
    font-size: 0.66rem;
    font-weight: 700;
    color: #777;
}

.tdm-tile--na {
    background: repeating-linear-gradient(135deg, #fafafa 0 7px, #f0f0f0 7px 14px);
}

.tdm-tile--na::before {
    background: #ddd;
}

.tdm__sum {
    margin: 0;
    padding-left: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    border-left: 4px solid var(--tdm-yellow);
}

.tdm__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding-top: 14px;
    border-top: 2px dashed #cfcfcf;
}

.tdm__note {
    flex: 1 1 240px;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #666;
}

.tdm__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--tdm-yellow);
    border: 3px solid var(--tdm-ink);
    box-shadow: 4px 4px 0 var(--tdm-ink);
    font-family: 'Syne', sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tdm-ink);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.tdm__cta:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--tdm-ink);
    background: #fff07f;
}

.tdm__cta:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--tdm-ink);
}

.tdm__cta span[aria-hidden] {
    transition: transform 0.25s var(--tdm-ease);
}

.tdm__cta:hover span[aria-hidden] {
    transform: translateX(4px);
}

/* Entrada: las fichas suben en cascada */
.tdm .tdm-tile {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.6s var(--tdm-ease);
    transition-delay: calc(0.35s + var(--i, 0) * 0.08s);
}

.tdm.is-in .tdm-tile {
    opacity: 1;
    transform: none;
}

/* Acceso rápido junto a los iconos de AnTuTu y Geekbench */


/* =========================================================
   Medidor en arco (se mantiene para quien lo use)
   ========================================================= */
.tdm-gauge {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tdm-gauge__track,
.tdm-gauge__fill {
    fill: none;
    stroke-linecap: round;
    stroke-width: 13;
}

.tdm-gauge__track {
    stroke: #ececec;
}

.tdm-gauge__fill {
    stroke: var(--g-color, var(--tdm-yellow));
    stroke-dasharray: 0 100;
}

.tdm-gauge__num {
    font-family: 'Montserrat', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    fill: var(--tdm-ink);
}

.tdm-gauge__sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 6.2px;
    font-weight: 700;
    fill: #555;
    text-transform: uppercase;
}

.is-in .tdm-gauge__fill {
    stroke-dasharray: var(--g-pct) 100;
    transition: stroke-dasharray 1.4s var(--tdm-ease);
}

@media (max-width: 560px) {
    .tdm__board {
        padding: 16px 14px 4px;
    }

    .tdm__body {
        padding: 16px 14px;
    }

    .tdm__verdict {
        justify-items: start;
        text-align: left;
    }

    .tdm__tiles {
        grid-template-columns: minmax(0, 1fr);
    }

    .tdm-tile {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: baseline;
    }

    .tdm-tile__rank {
        grid-column: 1 / -1;
    }

    /* Etiquetas del espectro: hasta dos líneas en vez de cortarse */
    .tdm-spec {
        padding-bottom: 30px;
    }

    .tdm-spec__seg em {
        font-size: 0.5rem;
        line-height: 1.15;
        white-space: normal;
        text-overflow: clip;
    }

    .tdm__cta {
        width: 100%;
        justify-content: center;
    }
}

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

    .tdm-spec__pin {
        left: var(--pos);
    }

    .tdm .tdm-tile {
        opacity: 1;
        transform: none;
    }
}

/* —— Logo de 3DMark y datos reales —— */
.tdm-title__logo {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: -3px 8px -3px 0;
    vertical-align: middle;
    border: 2px solid var(--tdm-ink);
    border-radius: 50%;
    background: var(--tdm-ink);
}

.tdm__test {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.tdm__logo {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 6px;
}

.tdm__live {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 10px 0 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.tdm__live b {
    color: #fff;
}

.tdm-tile__name em {
    margin-left: 7px;
    font-size: 0.56rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #999;
}

.tdm-tile.is-real .tdm-tile__name em {
    padding: 2px 6px;
    color: var(--tdm-ink);
    background: #7ee0a8;
    border-radius: 2px;
}
