/* Comparativa Aulink · visual, propia y directa (hereda marca y tipografía de ../styles.css) */
.compare-page { background: var(--paper); }
.compare-page .link-login { color: var(--navy); }
.cmp-wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- portada compacta ---------- */
.cmp-hero { padding: 40px 0 56px; background: linear-gradient(180deg, #e9effa 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.cmp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.cmp-kicker { display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-size: .84rem; font-weight: 700; }
.cmp-hero h1 { font-size: clamp(2.2rem, 4vw, 3.35rem); line-height: 1.06; font-weight: 800; max-width: 18ch; }
.cmp-hero h1 span { color: var(--blue); }
.cmp-lead { margin-top: 16px; font-size: 1.08rem; max-width: 44ch; color: var(--text); }
.cmp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cmp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmp-kpi { padding: 22px 20px; background: var(--white); border: 1px solid #d5deeb; border-radius: 18px; box-shadow: var(--shadow-sm); }
.cmp-kpi strong { display: block; font: 800 clamp(1.55rem, 2.3vw, 2rem)/1.05 "Plus Jakarta Sans", sans-serif; color: var(--ink); letter-spacing: -.03em; }
.cmp-kpi span { display: block; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.cmp-kpi-accent { background: var(--navy); border-color: var(--navy); color: #dbe4f0; }
.cmp-kpi-accent strong { color: #80e7c1; }
.cmp-kpi-accent span { color: #dbe4f0; }

/* ---------- secciones ---------- */
.cmp-section { padding: 68px 0; }
.cmp-section-alt { background: #e9effa; }
.cmp-head-inline { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 28px; }
.cmp-head-inline h2 { font-size: clamp(1.8rem, 2.9vw, 2.45rem); line-height: 1.12; }
.cmp-sub { margin-top: 6px; font-size: .98rem; color: var(--muted); }

/* Selector Mensual / Anual */
.period-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: #e2e8f0; gap: 4px; }
.period-switch button { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 700 .9rem/1 "Inter", sans-serif; cursor: pointer; transition: background-color .18s, color .18s; }
.period-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* ---------- simulador propio de Aulink ---------- */
.sim-layout { display: grid; grid-template-columns: 4.5fr 7.5fr; gap: 24px; align-items: stretch; }
.sim-controls-card { padding: 28px 26px; background: var(--white); border: 1px solid #d5deeb; border-radius: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 22px; }
.calc-form { accent-color: var(--blue); display: grid; gap: 18px; }
.calc-field label { display: block; font: 700 .93rem/1.3 "Plus Jakarta Sans", sans-serif; color: var(--ink); margin-bottom: 8px; }
.calc-field label small { font: 500 .82rem/1 "Inter", sans-serif; color: var(--muted); }
.calc-row { display: flex; align-items: center; gap: 12px; }
.calc-range { flex: 1; min-height: 36px; cursor: pointer; }
.calc-number { width: 104px; min-height: 44px; padding: 8px 12px; border: 1.5px solid #cbd5e1; border-radius: 12px; font: 700 1.05rem/1 "Inter", sans-serif; color: var(--ink); background: var(--paper); text-align: right; font-variant-numeric: tabular-nums; }
.calc-number:focus { border-color: var(--blue); background: var(--white); }
.calc-money { width: 100%; max-width: 220px; text-align: left; }
.calc-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.calc-presets button { min-height: 34px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 999px; background: var(--paper); color: var(--ink); font: 650 .85rem/1 "Inter", sans-serif; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.calc-presets button:hover { border-color: var(--blue); color: var(--blue); }
.calc-presets button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.calc-field label.calc-check { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 0; font: 600 .93rem/1.35 "Inter", sans-serif; color: var(--ink); cursor: pointer; }
.calc-check input { width: 19px; height: 19px; margin: 0; cursor: pointer; }
.calc-hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* Fallback para navegadores sin accent-color (brand-consistent-forms) */
@supports not (accent-color: #1e3a8a) {
  .calc-check { position: relative; padding-left: 2rem; }
  .calc-check input[type="checkbox"].visually-hidden { position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; white-space: nowrap !important; }
  .calc-check input[type="checkbox"] + span::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; border: 2px solid #94a3b8; background: #fff; border-radius: 4px; box-sizing: border-box; }
  .calc-check input[type="checkbox"]:focus-visible + span::before { outline: 3px solid var(--blue); outline-offset: 2px; }
  .calc-check input[type="checkbox"]:checked + span::before { background: var(--blue); border-color: var(--blue); }
  .calc-check input[type="checkbox"]:checked + span::after { content: "✓"; position: absolute; left: .26rem; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 700; font-size: .85rem; }
  .calc-range { -webkit-appearance: none; appearance: none; background: transparent; }
  .calc-range::-webkit-slider-runnable-track { width: 100%; height: 8px; background: linear-gradient(to right, var(--blue) var(--progress, 26%), #cbd5e1 var(--progress, 26%)); border-radius: 999px; }
  .calc-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); margin-top: -6px; cursor: pointer; }
  .calc-range::-moz-range-track { width: 100%; height: 8px; background: #cbd5e1; border-radius: 999px; }
  .calc-range::-moz-range-progress { height: 8px; background: var(--blue); border-radius: 999px; }
  .calc-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--blue); cursor: pointer; }
}

.sim-roi { margin-top: auto; padding: 18px; border-radius: 14px; background: var(--green-soft); border: 1px solid #b6ebd5; color: var(--ink); }
.sim-roi strong { display: block; font: 800 .9rem/1.2 "Plus Jakarta Sans", sans-serif; color: var(--green-ink); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.sim-roi p { font-size: .88rem; line-height: 1.45; color: var(--ink); }

/* Panel derecho: tarjeta protagonista Aulink + grid comparativo */
.sim-results { display: flex; flex-direction: column; gap: 18px; }
.sim-aulink-hero { padding: 28px 30px; border-radius: 22px; background: var(--navy); color: #dbe4f0; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.sim-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(128, 231, 193, .16); color: #80e7c1; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sim-big-price { margin-top: 10px; font: 800 clamp(2.1rem, 3.2vw, 2.75rem)/1.05 "Plus Jakarta Sans", sans-serif; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sim-big-price small { font: 500 .95rem/1 "Inter", sans-serif; color: #cbd5e1; letter-spacing: 0; }
.sim-per-student { margin-top: 8px; font-size: .95rem; color: #cbd5e1; }
.sim-per-student strong { color: #80e7c1; }
.sim-vs-label { font: 700 .85rem/1.3 "Plus Jakarta Sans", sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sim-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sim-card { padding: 20px 18px; background: var(--white); border: 1px solid #d5deeb; border-radius: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.sim-card[hidden] { display: none; }
.sim-card-current { border-color: var(--blue); background: #f4f8ff; }
.sim-card-kicker { font: 700 .9rem/1.25 "Plus Jakarta Sans", sans-serif; color: var(--ink); }
.sim-card-price { font: 800 1.32rem/1.15 "Plus Jakarta Sans", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sim-card-meta { font-size: .82rem; color: var(--muted); }
.sim-diff { margin-top: auto; padding-top: 8px; font-size: .84rem; font-weight: 700; color: var(--green-ink); }

/* ---------- tira visual de 4 ventajas ---------- */
.cmp-strip { padding: 56px 0; background: var(--navy); color: #cbd5e1; }
.cmp-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cmp-pillar { padding: 24px 20px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.cmp-pillar img { width: 64px; height: 56px; object-fit: contain; margin-bottom: 14px; }
.cmp-pillar h3 { color: #fff; font-size: 1.08rem; margin-bottom: 6px; }
.cmp-pillar p { font-size: .9rem; color: #cbd5e1; }

/* ---------- tabla comparativa responsive (modern-web-guidance: responsive-table) ---------- */
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: .81rem; font-weight: 700; white-space: nowrap; }
.pill-yes { background: var(--green-soft); color: var(--green-ink); }
.pill-opt { background: var(--blue-soft); color: var(--blue); }
.pill-no { background: #fee2e2; color: #991b1b; }
.pill-unk { background: #f1f5f9; color: #475569; }

.table-wrapper { overflow: auto; max-inline-size: 100%; max-block-size: min(720px, 80vh); border: 1px solid #cbd5e1; border-radius: 20px; background: var(--white); box-shadow: var(--shadow-sm); container-type: inline-size; }
.table-wrapper:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .94rem; text-align: left; }
.cmp-table caption { text-align: left; padding: 14px 20px; font: 700 .92rem/1.3 "Plus Jakarta Sans", sans-serif; color: var(--ink); background: var(--tint); border-bottom: 1px solid var(--line); }
.cmp-table thead { position: sticky; inset-block-start: 0; z-index: 2; }
.cmp-table thead th { padding: 15px 16px; background: var(--navy); color: #fff; font: 700 .94rem/1.25 "Plus Jakarta Sans", sans-serif; border-bottom: 2px solid var(--blue); white-space: nowrap; }
.cmp-table thead th small { display: block; font: 500 .76rem/1.2 "Inter", sans-serif; color: #cbd5e1; margin-top: 2px; }
.cmp-table thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 3; }
.cmp-table thead th.col-aulink { background: var(--blue); }
.cmp-table tbody th, .cmp-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp-table tbody th { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--white); font: 650 .94rem/1.35 "Inter", sans-serif; color: var(--ink); min-width: 220px; border-right: 1px solid var(--line); }
.cmp-table tbody tr:nth-child(even) th, .cmp-table tbody tr:nth-child(even) td { background: #f9fbff; }
.cmp-table tbody td.col-aulink { background: #f0fdf8; }
.cmp-table tbody tr:nth-child(even) td.col-aulink { background: #e7f8f1; }

@container (width < 680px) {
  .table-wrapper { max-block-size: none; border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .cmp-table, .cmp-table caption, .cmp-table thead, .cmp-table tbody, .cmp-table tr, .cmp-table th, .cmp-table td { display: block; }
  .cmp-table caption { width: 100%; border-radius: 14px; border: 1px solid #cbd5e1; margin-bottom: 14px; }
  .cmp-table thead { display: none; }
  .cmp-table tbody tr { margin-block-end: 14px; border: 1px solid #cbd5e1; border-radius: 16px; background: var(--white); overflow: hidden; box-shadow: var(--shadow-sm); }
  .cmp-table tbody th { position: sticky; inset-block-start: 0; z-index: 2; min-width: 0; border-right: 0; border-bottom: 1px solid var(--line); background: var(--navy); color: #fff; padding: 12px 16px; font-family: "Plus Jakarta Sans", sans-serif; }
  .cmp-table tbody tr:nth-child(even) th { background: var(--navy); }
  .cmp-table tbody td { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
  .cmp-table tbody td:last-child { border-bottom: 0; }
  .cmp-table { --label-2: "Aulink"; --label-3: "EduBox"; --label-4: "PowerSchool"; --label-5: "FACTS SIS"; }
  .cmp-table td::before { font: 700 .86rem/1.2 "Plus Jakarta Sans", sans-serif; color: var(--ink); }
  .cmp-table td:nth-child(2)::before { content: var(--label-2); color: var(--blue); }
  .cmp-table td:nth-child(3)::before { content: var(--label-3); }
  .cmp-table td:nth-child(4)::before { content: var(--label-4); }
  .cmp-table td:nth-child(5)::before { content: var(--label-5); }
}

/* ---------- fuentes plegables ---------- */
.cmp-sources { margin-top: 20px; background: var(--white); border: 1px solid #d5deeb; border-radius: 14px; padding: 0 20px; }
.cmp-sources summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font: 700 .92rem/1.3 "Plus Jakarta Sans", sans-serif; color: var(--ink); }
.cmp-sources summary::-webkit-details-marker { display: none; }
.cmp-sources summary::after { content: "+"; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e9effa; color: var(--blue); font-weight: 800; }
.cmp-sources[open] summary::after { content: "–"; }
.cmp-sources-body { padding: 14px 0 18px; font-size: .88rem; color: var(--text); border-top: 1px solid var(--line); }
.cmp-sources-body ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.cmp-sources-body a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }

.cmp-cta-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.cmp-inline-link { color: #fff; font-weight: 650; text-underline-offset: 5px; }

@media (max-width: 1100px) {
  .cmp-hero-grid, .sim-layout { grid-template-columns: 1fr; }
  .cmp-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .cmp-hero { padding: 24px 0 40px; }
  .cmp-section { padding: 52px 0; }
  .cmp-pillars, .sim-cards { grid-template-columns: 1fr; }
  .cmp-kpis { gap: 10px; }
  .cmp-kpi { padding: 16px 14px; }
  .sim-controls-card, .sim-aulink-hero { padding: 20px 16px; }
  .cmp-hero-actions .btn, .sim-aulink-hero .btn { width: 100%; }
}
