
.comp { padding-block: clamp(2rem, 5vw, 3.5rem); }
.comp h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); color: var(--granate); margin-bottom: .45em; max-width: 22ch; text-wrap: balance; }
.comp h2 { font-size: clamp(1.7rem, 3.3vw, 2.5rem); color: var(--th); }
.comp .entrada-seccion { max-width: 70ch; }
.comp section { margin-top: clamp(2.2rem, 5vw, 3.6rem); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }


.comp-plataforma-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.2rem; align-items: stretch; }
.comp-plataforma article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); padding: 1.15rem 1.25rem; }
.comp-plataforma h3 { font-size: 1.3rem; color: var(--granate); margin-bottom: .2em; }
.comp-plataforma .lema { margin: 0 0 .5rem; font-weight: 700; color: var(--accent); font-size: .92rem; }
.comp-plataforma article p:last-child { margin: 0; color: var(--soft); font-size: .92rem; }
.comp-plataforma .propia {
  position: relative; overflow: hidden; padding: clamp(1.4rem, 3vw, 2rem); color: #fff6e8; border-color: var(--brasa);
  background: radial-gradient(70% 90% at 100% 0, #f6c06399, transparent 65%), linear-gradient(135deg, #5f1f08, var(--brasa) 35%, #b4501a 75%, var(--azafran));
  box-shadow: 0 16px 40px #6b240940;
}
.comp-plataforma .propia h3 { font-size: clamp(2.2rem, 4vw, 3rem); color: #ffe9b0; }
.comp-plataforma .propia .lema { color: #fff6e8; font-size: 1.08rem; }
.dispositivos, .ventajas { list-style: none; margin: 0; padding: 0; }
.dispositivos { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 1.2rem; }
.dispositivos li { padding: .32rem .85rem; border: 1px solid #ffe9b080; border-radius: 99px; background: #3a211040; font-weight: 700; font-size: .88rem; color: #ffe9b0; }
.ventajas li { position: relative; padding-left: 1.5rem; margin-top: .55rem; color: #fff1d6; }
.ventajas li::before { content: ""; position: absolute; left: 0; top: .5em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ambar); }
.ajenas { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-content: start; }
.nota-ajenas { grid-column: 1 / -1; margin: 0; color: var(--soft); font-size: .95rem; }


.comp-muestrario { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0 1.4rem; padding: 0; }
.comp-muestrario a { display: block; text-decoration: none; color: var(--soft); font-size: .8rem; font-weight: 700; text-align: center; }
.comp-muestrario img { display: block; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: .35rem; border: 1px solid var(--line); border-radius: var(--radio); background: var(--panel2); box-shadow: var(--sombra); transition: transform .2s; }
.comp-muestrario a:hover img, .comp-muestrario a:focus-visible img { transform: translateY(-3px); }
.comp-muestrario a:hover, .comp-muestrario a:focus-visible { color: var(--accent); }
.comp-visual-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.comp-visual-rejilla article { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--azafran); border-radius: var(--radio); padding: 1.05rem 1.2rem; }
.comp-visual-rejilla h3 { font-size: 1.15rem; color: var(--granate); margin-bottom: .35em; }
.comp-visual-rejilla p { margin: 0; color: var(--txt); font-size: .93rem; }
.comp-visual-rejilla .plan { display: inline-block; margin-top: .6rem; padding: .14rem .55rem; border: 1px solid var(--accent); border-radius: 99px; background: #fff6e8; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }


.comp-leyenda { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: .8rem 0 1.1rem; padding: .85rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); font-size: .9rem; }
.comp-leyenda li { display: flex; align-items: center; gap: .5rem; }
.comp-indice { flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.comp-indice a { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .7rem; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); text-decoration: none; font-size: .84rem; font-weight: 700; color: var(--soft); }
.comp-indice a:hover { background: var(--hover); color: var(--accent); border-color: var(--azafran); }
.comp-indice span, .comp-matriz .cat span { font-weight: 400; font-size: .78em; opacity: .75; }
.comp-controles { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin-bottom: .9rem; }
.comp-controles[hidden] { display: none; }
.comp-controles label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.comp-controles input { flex: 1 1 16rem; min-width: 0; max-width: 26rem; }
.comp-controles button { padding: .5rem 1rem; font-size: .86rem; background: var(--panel2); color: var(--accent); border-color: var(--line); box-shadow: none; }
.comp-controles button:hover:not(:disabled) { background: var(--hover); box-shadow: none; filter: none; transform: none; }
.comp-controles button[aria-pressed="true"] { background: var(--accent); color: var(--accentTxt); border-color: var(--accent); }
#comp-resultado { flex-basis: 100%; margin: 0; min-height: 0; color: var(--accent); font-weight: 700; font-size: .9rem; }
#comp-resultado:empty { display: none; }


.comp-marco {
  --c1: 16rem; --cn: 8.6rem;
  
  position: relative; overflow: auto; max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem);
  border: 1px solid var(--line); border-radius: var(--radio); background: var(--panel); box-shadow: var(--sombra);
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 3.6rem;
}
.comp-marco:focus-visible { outline-offset: 2px; }
.comp-matriz { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; min-width: calc(var(--c1) + 6 * var(--cn)); font-size: .9rem; line-height: 1.35; font-variant-numeric: normal; }
.comp-matriz col { width: var(--cn); }
.comp-matriz col.col-funcion { width: var(--c1); }
.comp-matriz th, .comp-matriz td { padding: .55rem .6rem; border: 0; border-bottom: 1px solid var(--line); letter-spacing: 0; }
.comp-matriz thead th {
  position: sticky; top: 0; z-index: 3; text-align: center; vertical-align: bottom;
  background: var(--granate); color: #ffeed4; font: 700 .84rem/1.2 var(--sans); padding-block: .7rem;
}
.comp-matriz thead th span { display: block; font-weight: 400; font-size: .92em; color: #ffe4ac; }
.comp-matriz thead th.h { background: linear-gradient(160deg, var(--azafran), var(--accent)); color: #fff; }
.comp-matriz thead th.h span { color: #fff6e8; font-weight: 700; }
.comp-matriz thead th.esquina { left: 0; z-index: 5; text-align: left; }
.comp-matriz tbody th[scope="row"] {
  position: sticky; left: 0; z-index: 2; text-align: left; vertical-align: top;
  background: var(--panel); color: var(--txt); font: 400 .9rem/1.35 var(--sans); border-right: 1px solid var(--line);
  overflow-wrap: break-word; hyphens: auto;
}
.comp-matriz td { text-align: center; vertical-align: top; background: #fffaf0; color: var(--txt); overflow-wrap: break-word; }
.comp-matriz td.h { background: #fdebc8; border-inline: 1px solid #ecc98e; }
.comp-matriz td.h + td.h { border-left: 0; }
.comp-matriz tbody tr, .comp-matriz tbody tr:nth-child(even), .comp-matriz tbody tr:hover { background: none; }
.comp-matriz tbody tr:not(.cat):hover > * { background: var(--hover); }
.comp-matriz tbody tr:not(.cat):hover > td.h { background: #f8d9a0; }
.comp-matriz td small { display: block; margin-top: .25rem; font-size: .76rem; line-height: 1.3; color: var(--soft); hyphens: auto; }
.comp-matriz td.c-txt small, .comp-matriz td.c-parcial small { color: var(--txt); }
.comp-matriz td.c-txt small { margin-top: 0; font-size: .8rem; }
.comp-matriz.sin-notas td.c-si:not(.h) small, .comp-matriz.sin-notas td.c-no small { display: none; }
.comp-matriz tbody[id] { scroll-margin-top: 3.6rem; }
.comp-matriz .cat th { padding: 0; background: var(--panel2); border-bottom: 1px solid var(--line); border-top: 2px solid var(--azafran); text-align: left; }
.comp-matriz .cat button {
  position: sticky; left: 0; display: inline-flex; align-items: center; gap: .55rem; width: auto; max-width: min(100vw - 2.4rem, 40rem);
  padding: .6rem .8rem; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--th);
  font: 400 1.18rem/1.2 var(--serif); text-align: left; cursor: pointer;
}
.comp-matriz .cat button:hover:not(:disabled) { transform: none; box-shadow: none; filter: none; color: var(--accent); }
.comp-matriz .cat button::before { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.comp-matriz .cat button[aria-expanded="false"]::before { transform: rotate(-45deg); }
.comp-matriz tbody.plegada tr:not(.cat), .comp-matriz tr.oculta, .comp-matriz tbody.vacia { display: none; }
.comp-pista { display: none; margin: .6rem 0 0; font-size: .85rem; color: var(--soft); }


.signo { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font: 700 .8rem/1 var(--sans); font-style: normal; vertical-align: middle; flex: none; }
.m-si { background: var(--accent); }
.m-si::before { content: ""; width: .32rem; height: .62rem; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-1px, -1px); }
td.h .m-si { background: var(--granate); }
.m-parcial { border: 2px solid var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.m-no::before { content: ""; width: .8rem; height: 2px; background: #9a8468; }
.m-sc { border: 1.5px dashed #9a8468; color: #6f5a41; }
.m-sc::before { content: "?"; }
.m-pro { width: auto; height: auto; padding: .18rem .5rem; border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; background: #fff6e8; }
.m-pro::before { content: "Pro"; }


.comp-cierre { padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); border-inline-start: 6px solid var(--azafran); }
.comp-cierre p { max-width: 68ch; color: var(--soft); }
.comp-cierre .acciones { flex-wrap: wrap; gap: .7rem; }
.comp .boton.secundario { background: var(--panel2); color: var(--accent); border-color: var(--line); box-shadow: none; }
.comp-notas-pie { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--soft); }
.comp-notas-pie p { max-width: 90ch; margin-bottom: .6em; }


@media (max-width: 960px) {
  .comp-plataforma-rejilla { grid-template-columns: 1fr; }
  .comp-muestrario { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .comparativa .barra { flex-wrap: wrap; gap: .3rem; }
  .comparativa .barra nav { flex-wrap: wrap; }
  .comp-marco { --c1: 8.2rem; --cn: 6.9rem; max-height: calc(100vh - 6.5rem); max-height: calc(100dvh - 6.5rem); }
  .comp-matriz { font-size: .82rem; }
  .comp-matriz th, .comp-matriz td { padding: .45rem .4rem; }
  .comp-matriz tbody th[scope="row"] { font-size: .8rem; }
  .comp-matriz thead th { font-size: .76rem; }
  .comp-matriz td small { font-size: .7rem; }
  .comp-matriz .cat button { font-size: 1.05rem; }
  .comp-pista { display: block; }
  .comp-leyenda { flex-direction: column; gap: .45rem; }
}
@media (max-width: 520px) {
  .ajenas { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .comp-muestrario { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .comp-matriz .cat button::before, .comp-muestrario img { transition: none; }
}
@media print {
  .comp-marco { max-height: none; overflow: visible; }
  .comp-matriz thead th, .comp-matriz tbody th[scope="row"], .comp-matriz .cat button { position: static; }
  .comp-controles, .comp-indice, .comp-pista { display: none; }
}


.comp-marcador { margin: 1.6rem 0 2rem; padding: 1.1rem 1.3rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radio); }
.comp-marcador h2 { margin: 0 0 .9rem; font-size: 1.25rem; }
.comp-marcador ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.comp-marcador li { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr 3rem; align-items: center; gap: .8rem; font-size: .95rem; }
.comp-marcador .medida { display: block; height: .8rem; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.comp-marcador .medida i { display: block; height: 100%; background: var(--soft, #b9a98c); border-radius: 99px; }
.comp-marcador li b { text-align: right; font-variant-numeric: tabular-nums; }
.comp-marcador li.propia .nombre, .comp-marcador li.propia b { color: var(--accent); font-weight: 700; }
.comp-marcador li.propia .medida i { background: linear-gradient(90deg, var(--azafran), var(--accent)); }
.comp-marcador p { margin: .8rem 0 0; font-size: .82rem; opacity: .8; }
@media (max-width: 640px) { .comp-marcador li { grid-template-columns: 1fr 2.6rem; } .comp-marcador .medida { grid-column: 1 / -1; order: 3; } }


.comp-marco { max-height: calc(100vh - var(--barra-alto, 4rem) - 1rem); max-height: calc(100dvh - var(--barra-alto, 4rem) - 1rem); scroll-margin-top: calc(var(--barra-alto, 4rem) + .5rem); }
@media (min-width: 1100px) {
  .comp-tabla { --ancho-tabla: min(96vw, 100rem); width: var(--ancho-tabla); margin-inline: calc((100% - var(--ancho-tabla)) / 2); }
  .comp-marco { --c1: 17rem; overflow: visible; max-height: none; }
  .comp-matriz { min-width: 0; font-size: .92rem; }
  .comp-matriz col { width: auto; }
  .comp-matriz col.col-funcion { width: var(--c1); }
  .comp-matriz thead th { top: var(--barra-alto, 4rem); box-shadow: 0 2px 0 #0000001f; }
  .comp-matriz thead th:first-child { border-top-left-radius: var(--radio); }
  .comp-matriz thead th:last-child { border-top-right-radius: var(--radio); }
  .comp-matriz tbody th[scope="row"], .comp-matriz td small { hyphens: manual; }
  .comp-matriz td small { font-size: .8rem; }
  .comp-matriz td { border-left: 1px solid #f0e2c8; }
  .comp-matriz tbody[id] { scroll-margin-top: calc(var(--barra-alto, 4rem) + 3.6rem); }
}
@media (min-width: 1500px) { .comp-marco { --c1: 21rem; } }


.comp-cierre h2 { margin-top: 0; }
@media (min-width: 1100px) {
  .comp-cierre, .comp-notas-pie { --ancho-tabla: min(96vw, 100rem); width: var(--ancho-tabla); margin-inline: calc((100% - var(--ancho-tabla)) / 2); box-sizing: border-box; }
  .comp-cierre { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: center; }
  .comp-cierre h2, .comp-cierre p { grid-column: 1; }
  .comp-cierre p { max-width: none; margin-bottom: 0; }
  .comp-cierre .acciones { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: stretch; margin: 0; }
  .comp-cierre .acciones .boton { text-align: center; white-space: nowrap; }
  .comp-notas-pie { columns: 2; column-gap: 3rem; }
  .comp-notas-pie p { max-width: none; break-inside: avoid; margin-top: 0; }
}


@media (min-width: 1100px) {
  .comparativa { --ancho-pagina: min(96vw, 100rem); }
  .comparativa main.comp { width: var(--ancho-pagina); }
  .comparativa .barra { padding-inline: calc((100vw - var(--ancho-pagina)) / 2); }
  .comparativa .comp-tabla, .comparativa .comp-cierre, .comparativa .comp-notas-pie { width: auto; margin-inline: 0; }
  .comp .entrada-seccion { max-width: 95ch; }
  .comp h1 { max-width: 30ch; }
  .comp-marcador li { grid-template-columns: 16rem 1fr 3rem; }
}


@media (max-width: 1099px) {
  .comp-marco { --cp: 9.5rem; }
  .comp-matriz { min-width: calc(var(--c1) + var(--cp) + 5 * var(--cn)); }
  .comp-matriz col:nth-child(3) { width: var(--cp); }
  .comp-matriz thead th:nth-child(3), .comp-matriz tbody td:nth-child(3) { position: sticky; left: var(--c1); }
  .comp-matriz tbody td:nth-child(3) { z-index: 2; box-shadow: 3px 0 6px -3px #6b240955; }
  .comp-matriz thead th:nth-child(3) { z-index: 5; box-shadow: 3px 0 6px -3px #0006; }
  .comp-matriz tbody tr:not(.cat):hover > td:nth-child(3) { background: #f8d9a0; }
}
@media (max-width: 700px) {
  .comp-marco { --c1: 7.2rem; --cp: 8.6rem; --cn: 7.4rem; }
}
