/* The "comparar" area on the taste design: /comparativas, /comparativas/[slug], /migrar,
   /migrar/[slug], /software-para-wisp. Scoped to main.pg-comparar; every value from the
   system's tokens (spacing --s-*, type --t-*, --line, --ink, --muted). */

/* ---------- the hero's picture: a lit frame filling .hero__media */
.pg-comparar .hero__media > .hero-frame { position: absolute; inset: 0; --ratio: 0px; border: 0; }
.pg-comparar .hero-frame--dg { padding: var(--s-6); }
.pg-comparar .hero-frame--dg > .dg { width: 100%; height: 100%; }

/* split frames: the kit's 4:5 (frame--lit would make them 2:1) */
.pg-comparar .frame--split { --ratio: 80%; }
.pg-comparar .hero h1 { font-size: clamp(40px, 1.6vw + 30px, 54px); }

/* ---------- marks: ✓ / ◐ / ✗ */
.pg-comparar .mk { display: inline-flex; flex: none; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; }
.pg-comparar .mk svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-comparar .mk--yes { background: #e3f6ee; color: #0b6b4a; }
.pg-comparar .mk--partial { background: #fdf0d9; color: #8a5400; }
.pg-comparar .mk--no { background: rgb(10 18 40 / .07); color: var(--p-muted); }

/* ---------- the small comparison panel (hero pictures): built from the kit's ui-panel */
.pg-comparar .cmp-mini { width: 100%; padding: 0; overflow: hidden; font: 400 14px/1.4 var(--font-text); color: var(--u-ink); }
.pg-comparar .cmp-mini__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--u-line); }
.pg-comparar .cmp-mini__head .ui-meta { font-family: var(--font-mono); font-size: 12px; }
.pg-comparar .cmp-mini__cols,
.pg-comparar .cmp-mini__rows > li { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 18px; }
.pg-comparar .cmp-mini__cols { font: 500 12px/1.2 var(--font-mono); color: var(--u-muted); background: var(--u-fill); }
.pg-comparar .cmp-mini__rows { margin: 0; padding: 0; list-style: none; }
.pg-comparar .cmp-mini__rows > li + li { border-top: 1px solid var(--u-line); }
.pg-comparar .cmp-mini__rows > li > span:not(:first-child) { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.pg-comparar .cmp-mini__rows--two > li { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); align-items: start; }
.pg-comparar .cmp-mini__rows--two > li.is-ours { background: color-mix(in oklab, var(--p-accent) 6%, #fff); }
.pg-comparar .cmp-mini__rows--two > li.is-ours > span:last-child { font-family: var(--font-text); font-size: 14px; }
.pg-comparar .cmp-mini__rows > li > span:first-child { font-weight: 500; }
.pg-comparar .cmp-mini__foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--u-line); font: 400 12px/1.3 var(--font-mono); color: var(--u-muted); }

/* ---------- the comparison table (sections-library.md, comparison-table): rows of the grid */
.pg-cmp .cmp-sec .cmp-head { margin-bottom: var(--s-6); }
.pg-cmp .cmp { display: grid; }
.pg-cmp .cmp__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.pg-cmp .cmp__row > :nth-child(1) { grid-column: 1 / span 3; }
.pg-cmp .cmp__row > :nth-child(2) { grid-column: 4 / span 4; }
.pg-cmp .cmp__row > :nth-child(3) { grid-column: 8 / span 5; }
.pg-cmp .cmp__row--head { padding-block: var(--s-3); background: var(--bg); align-items: end; }
.pg-cmp .cmp__who { display: grid; gap: 2px; }
.pg-cmp .cmp__who b { font-weight: 500; }
.pg-cmp .cmp__row--head > .cmp__who:nth-child(2) b { color: var(--p-accent); }
.pg-cmp .cmp__who small { font: 400 13px/1.3 var(--font-mono); color: var(--muted); }
.pg-cmp .cmp__dim { display: grid; gap: 2px; align-content: start; }
.pg-cmp .cmp__dim b { font-weight: 500; }
.pg-cmp .cmp__dim span { font-size: var(--t-small); line-height: 1.4; color: var(--muted); }
.pg-cmp .cmp__cell { display: flex; gap: var(--s-3); align-items: flex-start; line-height: 1.5; }
.pg-cmp .cmp__cell .mk { margin-top: 2px; }
.pg-cmp .cmp__row > .cmp__cell:nth-child(2) { color: var(--ink); }
.pg-cmp .cmp__legend { margin: var(--s-5) 0 0; font: 400 13px/1.5 var(--font-mono); color: var(--muted); max-width: 90ch; }
@media (min-width: 640px) and (max-width: 1023px) {
  .pg-cmp .cmp__row > :nth-child(1) { grid-column: 1 / span 4; }
  .pg-cmp .cmp__row > :nth-child(2) { grid-column: 5 / span 4; }
  .pg-cmp .cmp__row > :nth-child(3) { grid-column: 9 / span 4; }
}
/* a phone: each row is its own block; each answer says whose it is */
@media (max-width: 639px) {
  .pg-cmp .cmp-sec { --hm: 2; }
  .pg-cmp .cmp__row { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s-2); }
  .pg-cmp .cmp__row > :nth-child(n) { grid-column: 1; }
  .pg-cmp .cmp__row--head { display: none; }
  .pg-cmp .cmp__dim span { display: none; }
  .pg-cmp .cmp__cell { font-size: var(--t-body); }
  .pg-cmp .cmp__cell::before { content: attr(data-who); flex: none; width: 76px; font: 500 13px/1.6 var(--font-mono); color: var(--muted); }
}

/* ---------- in 30 seconds, and when each one wins: two cards on the split */
.pg-cmp .tldr, .pg-cmp .when { margin-top: var(--s-7); align-items: stretch; }
.pg-cmp .tldr .card, .pg-cmp .when .card { gap: var(--s-4); }
.pg-cmp .tldr .card > p, .pg-cmp .when .card > p { max-width: none; }
.pg-cmp .tldr__pick { margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--line); font-weight: 500; }
.pg-cmp .when__list { margin: 0; padding: var(--s-4) 0 0; list-style: none; display: grid; gap: var(--s-3); border-top: 1px solid var(--line); }
.pg-cmp .when__list li { position: relative; padding-left: 24px; }
.pg-cmp .when__list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--muted); }
.pg-cmp .when__list--ours li::before { width: 8px; height: 8px; top: .5em; border-radius: 2px; background: var(--p-accent); }
@media (max-width: 639px) { .pg-cmp #cuando, .pg-cmp #resumen { --hm: 2; } .pg-comparar .sync-frame { --ratio: 64%; } }

/* ---------- migration split: the sync diagram in a split frame */
.pg-comparar .sync-frame { --ratio: 72%; padding: var(--s-6); }
.pg-comparar .sync-frame > .dg { width: 100%; height: 100%; position: absolute; inset: var(--s-6); width: auto; height: auto; }
.pg-comparar .ask { margin: 0; padding-top: var(--s-5); border-top: 1px solid var(--line); max-width: 62ch; }
.pg-comparar .ask b { font-weight: 500; }
.pg-comparar .ask .link { margin-left: var(--s-1); }

/* ---------- sources and other comparisons */
.pg-cmp .sources { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.pg-cmp .sources a { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.pg-cmp .sources a:hover span:first-child { color: var(--p-accent); }
.pg-comparar .others { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3) var(--s-6); margin-top: var(--s-7); }
@media (max-width: 1023px) { .pg-cmp .sources { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-6); } }
@media (max-width: 639px) { .pg-cmp #fuentes { --hm: 2; } }

/* ---------- the hub cards (comparisons, migrations): the home's open columns */
.pg-comparar .rivals { margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.pg-comparar .rivals > li { display: flex; }
.pg-comparar .rivals .pillar { flex: 1; }
.pg-comparar .pillar .pc .row > span:first-child { min-width: 0; }
.pg-comparar .pc-marks { display: inline-flex; gap: 6px; }
.pg-comparar .rivals + .ask { margin-top: var(--s-7); }
.pg-cmp-index .mono-note { font-family: var(--font-mono); font-size: var(--t-small); }
@media (max-width: 1023px) { .pg-comparar .rivals > li { grid-column: 1 / -1; } }
@media (min-width: 640px) and (max-width: 1023px) { .pg-comparar #sistemas, .pg-comparar #origen { --h: 2; } }
@media (max-width: 639px) { .pg-comparar #sistemas, .pg-comparar #origen { --hm: 2; } }

/* ---------- migration: what comes across, and the four weeks */
.pg-mig .mg-lists { margin-top: var(--s-7); align-items: stretch; }
.pg-mig .mg-lists .card { gap: var(--s-4); }
.pg-mig .mg-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.pg-mig .mg-list li { position: relative; padding-left: 24px; }
.pg-mig .mg-list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--muted); }
.pg-mig .mg-list--ok li::before { width: 8px; height: 8px; top: .5em; border-radius: 2px; background: var(--p-accent); }
.pg-mig .mg-after { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
.pg-mig .mg-after .others { margin-top: 0; }
.pg-mig .mg-steps { margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.pg-mig .mg-steps .panel { --p-h: 220px; container-type: inline-size; }
.pg-mig .mg-steps .panel > .pc,
.pg-wisp .hybrid .panel > .pc { position: absolute; left: 8%; right: 8%; top: 28px; border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgb(10 18 40 / .08), 0 18px 40px -18px rgb(10 18 40 / .3); font-size: max(13px, 4cqw); gap: 2.6cqw; padding: 5.5cqw; }
.pg-mig .mg-steps .panel > .pc .lbl,
.pg-wisp .hybrid .panel > .pc .lbl { font-size: max(13px, 3.4cqw); }
.pg-mig .mg-steps .panel > .pc .chip,
.pg-wisp .hybrid .panel > .pc .chip { font-size: max(13px, 3.2cqw); padding: 1.2cqw 2.4cqw; }
@media (max-width: 639px) {
  .pg-mig .mg-steps .pc .row, .pg-wisp .hybrid .pc .row { display: flex; }
  .pg-mig #datos, .pg-mig #proceso, .pg-mig #antes, .pg-mig #empezar { --hm: 2; }
  .pg-mig .mg-steps .panel { --p-h: 170px; }
}
@media (min-width: 640px) and (max-width: 1279px) { .pg-mig #proceso { --h: 2; } }

/* ---------- WISP: the network split, its four items, the hybrid cards, the money split, guides */
.pg-wisp .red-frame { --ratio: 64%; }
.pg-wisp .claim { font: 500 var(--t-lead)/1.4 var(--font-text); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.pg-wisp .net-items { margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.pg-wisp .net-items h3 { margin: 0 0 var(--s-2); font: 500 var(--t-card)/1.3 var(--font-text); }
.pg-wisp .net-items p { margin: 0; }
@media (min-width: 640px) and (max-width: 1023px) { .pg-wisp .net-items > li { grid-column: auto / span 6; } }
@media (max-width: 639px) { .pg-wisp #red, .pg-wisp #plata, .pg-wisp #fibra, .pg-wisp #guias { --hm: 2; } }
.pg-wisp .hybrid { margin-top: var(--s-7); }
.pg-wisp .hybrid .panel { --p-h: 220px; container-type: inline-size; }
.pg-wisp .hybrid h3 { margin: 0; }
.pg-wisp .plata-frame { --ratio: 80%; }
.pg-wisp .money-points { margin: 0; }
.pg-wisp .guides { margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.pg-wisp .guides > li { display: flex; }
.pg-wisp .guide { flex: 1; color: inherit; text-decoration: none; gap: var(--s-3); }
.pg-wisp .guide__meta { display: flex; justify-content: space-between; font: 500 13px/1.2 var(--font-mono); color: var(--muted); }
.pg-wisp .guide h3 { margin: 0; }
.pg-wisp .guide .link { margin-top: auto; }
.pg-wisp .guides + .ask { margin-top: var(--s-7); }
@media (max-width: 1023px) { .pg-wisp .guides > li { grid-column: 1 / -1; } }

/* the comparison page's h1 is a 46-character question: one step smaller so it holds three lines */
/* the other comparisons under the sources: two open columns */
.pg-cmp .rivals--two { margin-top: var(--s-7); row-gap: var(--s-4); }
.pg-cmp .rivals--two > .rival-slot { display: flex; }
.pg-cmp .rivals--two > p { margin: 0; }
@media (max-width: 1023px) { .pg-cmp .rivals--two > .rival-slot { grid-column: 1 / -1; } .pg-cmp #fuentes { --h: 1; } }

/* fit fixes from the layout check */
@media (max-width: 639px) {
  .pg-comparar .rivals .pillar .panel { display: block; --p-h: 160px; }
  .pg-mig #empezar { --hm: 1; }
  .pg-wisp #plata { --hm: 1; }
  .pg-wisp .plata-frame { --ratio: 70%; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .pg-mig #empezar .frame--split { --ratio: 110%; } }
