.tarifas {
  width: min(1190px, calc(100% - 96px));
  margin-inline: auto;
  padding-block: clamp(38px, 5vw, 80px) clamp(50px, 6vw, 86px);
}
.catalogo-planes .nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.tarifas-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  align-items: end;
  gap: 36px;
  padding-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 2px solid var(--ink);
}
.tarifas-intro .eyebrow { color: var(--blue); margin-bottom: 14px; }
.tarifas-intro h1 { font-size: clamp(54px, 6.4vw, 92px); }
.tarifas-lead { max-width: 43ch; font-size: clamp(16px, 1.5vw, 19px); }
.tarifas-lead .text-link { margin-top: 12px; min-height: 40px; font-size: 15px; }
.tarifas-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.tarifas-opciones { padding-top: 26px; }
.tarifas .billing {
  display: none;
  width: fit-content;
  margin: 0 0 22px;
  padding: 3px;
  gap: 2px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.js .tarifas .billing { display: flex; }
.tarifas .billing button {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 16px;
  line-height: 1.3;
  border: 0;
  border-radius: 3px;
  color: var(--ink);
}
.tarifas .billing button[aria-pressed="true"] { color: white; background: var(--blue); }
.tarifas .plan-grid { gap: 16px; }
.tarifas .plan {
  min-width: 0;
  padding: clamp(20px, 2.15vw, 32px);
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--line);
}
.tarifas .plan:not(.plan--featured) { background: white; }
.tarifas .plan--featured { border-color: var(--blue); }
.tarifas .plan::after { display: none; }
.tarifas .plan h3 { font-size: clamp(32px, 3.1vw, 45px); }
.tarifas .plan__for { margin-top: 2px; }
.tarifas .plan__price { font-size: clamp(40px, 4.4vw, 67px); margin-block: 18px 20px; }
.tarifas .plan li { margin-bottom: 8px; }
.tarifas .plan ul { margin-bottom: 22px; }
.tarifas .plans__note { margin: 16px 0 0; text-align: left; }
.tarifas .plan-comparison { max-width: none; margin: clamp(30px, 4vw, 54px) 0 0; }
.tarifas .plan-comparison > summary {
  margin-inline: 0;
  color: var(--ink);
  font: 400 clamp(28px, 3vw, 40px)/1.18 var(--font-head);
  letter-spacing: -.025em;
  text-decoration: none;
}
.tarifas .plan-comparison > summary span { color: var(--blue); font: 500 22px/1 var(--font-body); }
.tarifas .table-scroll th, .tarifas .table-scroll td { padding: 12px 16px; }
.tarifas .table-scroll tr > :not(:first-child) { text-align: center; }

/* El encabezado de cada eje conserva el nombre y el espacio de la tabla original. */
#comparacion:has(> .compare-tip) > summary { margin-bottom: 2px; }
#comparacion .compare-tip { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
#comparacion th:has(> button) { padding: 0; }
#comparacion :is(.compare-plan, .compare-function) {
  position: relative;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
}
#comparacion .compare-plan { color: var(--blue-dark); font-weight: 600; }
#comparacion .compare-plan::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: calc(50% - 17px);
  width: 34px;
  height: 2px;
  background: currentColor;
  transform: scaleX(.32);
}
#comparacion .compare-plan[aria-pressed="true"]::after { transform: scaleX(1); }
#comparacion .compare-function::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 0;
  width: 3px;
  background: var(--blue);
  transform: scaleY(0);
}
#comparacion .compare-function[aria-pressed="true"]::before { transform: scaleY(1); }
#comparacion .compare-function[aria-pressed="true"] { color: var(--blue-dark); }
#comparacion thead th.is-plan { background: var(--blue); }
#comparacion thead th.is-plan button { color: var(--white); }
#comparacion tbody td.is-plan {
  background: #edf1fd;
  box-shadow: inset 1px 0 #c3cdeb, inset -1px 0 #c3cdeb;
}
#comparacion tbody tr.is-function > * { background: #e9eefb; }
#comparacion tbody tr.is-function > .is-plan {
  color: var(--blue-dark);
  background: #cfdbfd;
  box-shadow: inset 0 0 0 2px var(--blue);
}
#comparacion :is(.compare-plan, .compare-function):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
}
#comparacion th.is-plan button:focus-visible { outline-color: var(--white); }
@media (hover: hover) and (pointer: fine) {
  #comparacion .compare-plan:hover::after { transform: scaleX(1); }
  #comparacion tbody tr:not(.is-function):hover > * { background: #f0f2f8; }
  #comparacion tbody tr:not(.is-function):hover > .is-plan { background: #dce4fa; }
  #comparacion .compare-function:hover { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
}
@media (prefers-reduced-motion: no-preference) {
  #comparacion .comparison-entered tbody tr {
    animation: aparecer-funcion 300ms ease-out backwards;
    animation-delay: calc(var(--compare-order, 0) * 35ms);
  }
  @keyframes aparecer-funcion {
    from { opacity: .76; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
  #comparacion tbody :is(th, td) { transition: background-color 170ms ease-out; }
  #comparacion tbody td.is-plan { transition-delay: calc(var(--compare-order, 0) * 16ms); }
  #comparacion .compare-plan::after, #comparacion .compare-function::before { transition: transform 180ms ease-out; }
}
.tarifas-sin-js { margin-bottom: 20px; }
.tarifas-sin-js table { min-width: 0; }
.tarifas-casos {
  margin-top: clamp(32px, 5vw, 68px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 3vw, 42px);
}
.tarifas-casos h2 { font-size: clamp(32px, 3.6vw, 50px); }
.tarifas-casos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin: 24px 0; }
.tarifas-casos h3 { font-size: 24px; }
.tarifas-casos p { margin-top: 8px; }
@media (max-width: 960px) {
  .tarifas { width: calc(100% - 48px); }
  .tarifas .plan-grid { gap: 12px; }
  .tarifas .plan { padding: 20px 16px; }
}
@media (max-width: 700px) {
  .tarifas { width: min(100% - 36px, 540px); padding-top: 30px; }
  .tarifas-intro { grid-template-columns: 1fr; gap: 12px; padding-bottom: 20px; }
  .tarifas-intro .eyebrow { font-size: 11px; margin-bottom: 8px; }
  .tarifas-intro h1 { font-size: clamp(43px, 10vw, 64px); }
  .tarifas-lead .text-link { margin-top: 3px; }
  .tarifas-opciones { padding-top: 16px; }
  .tarifas .billing { margin-bottom: 16px; }
  .tarifas .plan-grid { width: 100%; grid-template-columns: 1fr; gap: 14px; }
  .tarifas .plan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 18px;
    column-gap: 10px;
  }
  .tarifas .plan h3 { grid-column: 1; grid-row: 1; font-size: 31px; }
  .tarifas .plan__for { grid-column: 1; grid-row: 2; font-size: 14px; line-height: 1.35; margin-top: 3px; }
  .tarifas .plan__price { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; font-size: clamp(32px, 8vw, 45px); }
  .tarifas .plan__period { font-size: 12px; }
  .tarifas .plan ul { grid-column: 1 / -1; margin: 15px 0 12px; }
  .tarifas .plan li { margin-bottom: 4px; }
  .tarifas .plan .btn { grid-column: 1 / -1; min-height: 44px; }
  .tarifas .table-scroll table { min-width: 100%; font-size: 13px; }
  .tarifas .table-scroll th, .tarifas .table-scroll td { padding: 10px 4px; }
  .tarifas .table-scroll thead th { font-size: 12px; }
  #comparacion table { table-layout: fixed; }
  #comparacion thead th:first-child { width: 35%; }
  #comparacion thead th:nth-child(2) { width: 19%; }
  #comparacion thead th:nth-child(3) { width: 25%; }
  #comparacion .compare-plan { padding: 7px 2px; }
  #comparacion .compare-function { padding: 7px 2px 7px 5px; }
  .tarifas .table-scroll th:first-child { max-width: 126px; }
  .tarifas .table-scroll thead th:first-child, .tarifas .table-scroll tbody th {
    position: sticky; left: 0;
    background: var(--ivory);
    box-shadow: 1px 0 var(--line);
  }
  .tarifas .table-scroll thead th:first-child { background: #eeefef; }
  .tarifas-casos-grid { grid-template-columns: 1fr; gap: 20px; margin: 20px 0; }
}
@media (max-width: 350px) {
  #comparacion thead th:first-child { width: 36%; }
  #comparacion thead th:nth-child(2) { width: 18%; }
  #comparacion tbody td { padding-inline: 2px; }
  #comparacion .compare-function { padding-inline: 4px 1px; font-size: 12.5px; }
}
@media print {
  .catalogo-planes .billing, .catalogo-planes .btn, .catalogo-planes .text-link { display: none; }
  .catalogo-planes .plan { break-inside: avoid; }
  .catalogo-planes .tarifas { width: 100%; }
  #comparacion :is(th, td, button) {
    color: var(--ink) !important; background: transparent !important; box-shadow: none !important;
  }
  #comparacion .compare-tip, #comparacion .compare-plan::after, #comparacion .compare-function::before { display: none; }
  #comparacion .comparison-entered tbody tr { animation: none; }
}
