/*
 * Crédito e impuestos (centr.ar/credito/). La portada: la solapa Crédito de la tarjeta, con la
 * escala de seis situaciones, la deuda de 24 meses que se dibuja de izquierda a derecha y los
 * cheques que llegan después; al lado, cómo facturarle. Ciclo de 11 s.
 * Los colores son los del producto: verde la situación 1, ámbar la 2 y rojo de la 3 en adelante.
 * site.css ya usa .cr-now, .cr-pill, .cr-block, .cr-months, .cr-check, .cr-scale y .cr-bars para
 * la ficha de la portada: acá ninguna clase repite esos nombres.
 */
.cr-live {
  --T: 11s;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background:
    radial-gradient(420px 260px at 100% 0, rgb(217 151 0 / 0.07), transparent 70%),
    #fff;
  font-size: 13px;
}

/* Tonos de las situaciones y de las píldoras. */
.cr-ok,
.cr-warn,
.cr-bad {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.cr-ok {
  background: #e5f2e8;
  color: #16804c;
}
.cr-warn {
  background: #fdefcc;
  color: #7a5200;
}
.cr-bad {
  background: #fde2de;
  color: #a3281c;
}

/* La tarjeta: cabecera con la empresa y sus píldoras, el riel y la solapa. */
.cr-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.cr-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#f6f8f3, #f1f5ee);
}
.cr-co {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cr-co > span:last-child {
  display: grid;
  min-width: 0;
}
.cr-co b {
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.cr-co small {
  color: var(--ink-3);
  font-size: 11.5px;
}
.cr-av {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.cr-pills,
.cr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cr-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
}
.cr-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  border-right: 1px solid var(--line);
}
.cr-rail i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--ink-3);
}
.cr-rail svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cr-rail .cr-sel,
.cr-rail .cr-now {
  background: #e5f2e8;
  color: #16804c;
}
.cr-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
}
.cr-h {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cr-pane .cr-h:not(:first-child) {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.cr-cur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink-2);
}
.cr-big {
  padding: 4px 11px;
  font-size: 12.5px;
}
.cr-alert {
  margin: 0;
  color: #a3281c;
  font-size: 12.5px;
  font-weight: 600;
}

/* Las seis situaciones, con la de la empresa marcada. */
.cr-sc {
  display: flex;
  gap: 4px;
}
.cr-sc i {
  display: grid;
  flex: 1;
  place-items: center;
  height: 26px;
  border-radius: 7px;
  background: #eef0f1;
  color: #9aa2a6;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.cr-sc .cr-on.cr-t1 {
  background: #16804c;
  color: #fff;
}
.cr-sc .cr-on.cr-t2 {
  background: #d99700;
  color: #fff;
}
.cr-sc .cr-on.cr-t3 {
  background: #c5392b;
  color: #fff;
}

/* Deuda informada: una barra por mes, del color de su situación. */
.cr-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 3px;
  height: 78px;
}
.cr-bars i {
  border-radius: 3px 3px 1px 1px;
}
.cr-bars .cr-t1 {
  background: #b9e3c8;
}
.cr-bars .cr-t2 {
  background: #f4d27a;
}
.cr-bars .cr-t3 {
  background: #ee9d93;
}
/* El mes en que alguna entidad informó una situación peor lleva una marca roja arriba. */
.cr-bars .cr-f {
  box-shadow: inset 0 3px 0 #c0392b;
}
.cr-bars [data-h='1'] {
  height: 10%;
}
.cr-bars [data-h='2'] {
  height: 20%;
}
.cr-bars [data-h='3'] {
  height: 30%;
}
.cr-bars [data-h='4'] {
  height: 40%;
}
.cr-bars [data-h='5'] {
  height: 50%;
}
.cr-bars [data-h='6'] {
  height: 60%;
}
.cr-bars [data-h='7'] {
  height: 70%;
}
.cr-bars [data-h='8'] {
  height: 80%;
}
.cr-bars [data-h='9'] {
  height: 90%;
}
.cr-bars [data-h='10'] {
  height: 100%;
}
.cr-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  color: var(--ink-2);
  font-size: 12px;
}
.cr-note b {
  color: #a3281c;
  font-weight: 650;
}

/* Al lado: los cheques y cómo facturarle. */
.cr-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cr-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.cr-chq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
}
.cr-chq > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-chq b {
  color: var(--ink);
  font-weight: 650;
}
.cr-tax > b {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.cr-tax .cr-h:not(:first-child) {
  margin-top: 6px;
}
.cr-src {
  margin: 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .cr-live .cr-bars {
    animation: cr-draw var(--T) infinite both;
  }
  .cr-live .cr-sc .cr-on {
    animation: cr-mark var(--T) infinite both;
  }
  .cr-live .cr-cur,
  .cr-live .cr-alert:not(.cr-box .cr-alert) {
    animation: cr-in-a var(--T) infinite both;
  }
  .cr-live .cr-note {
    animation: cr-in-b var(--T) infinite both;
  }
  .cr-live .cr-box:first-child .cr-alert,
  .cr-live .k1 {
    animation: cr-in-c var(--T) infinite both;
  }
  .cr-live .k2 {
    animation: cr-in-d var(--T) infinite both;
  }
  .cr-live .cr-tax {
    animation: cr-in-e var(--T) infinite both;
  }
}
/* La deuda se dibuja de izquierda a derecha. */
@keyframes cr-draw {
  0%,
  8% {
    clip-path: inset(0 100% 0 0);
  }
  34%,
  96% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes cr-mark {
  0%,
  4% {
    scale: 0.4;
    opacity: 0;
  }
  8% {
    scale: 1.18;
    opacity: 1;
  }
  11%,
  96% {
    scale: 1;
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-in-a {
  0%,
  6% {
    opacity: 0;
    translate: 0 6px;
  }
  10%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-in-b {
  0%,
  34% {
    opacity: 0;
    translate: 0 6px;
  }
  38%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-in-c {
  0%,
  42% {
    opacity: 0;
    translate: -8px 0;
  }
  46%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-in-d {
  0%,
  50% {
    opacity: 0;
    translate: -8px 0;
  }
  54%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-in-e {
  0%,
  62% {
    opacity: 0;
    translate: 0 8px;
  }
  67%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}

/* Paso 1: el cursor llega al riel y abre Crédito. */
.cr-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
}
.rdr-fx .cr-mini .cr-pills em {
  font-size: 10.5px;
}
.cr-rail.cr-row {
  flex-direction: row;
  align-self: flex-start;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: #fff;
}
.rdr-fx .cr-rail svg {
  width: 16px;
  height: 16px;
}
.cr-fx-open .cr-rail .cr-was {
  background: none;
  color: var(--ink-3);
}
.cr-fx-open .rdr-cur {
  left: 70px;
  top: 128px;
}
/* Paso 2: la escala y la deuda. */
.cr-fx-credit {
  gap: 12px;
}
.cr-fx-credit .cr-sc i {
  height: 22px;
}
.cr-fx-credit .cr-bars {
  height: 56px;
}
/* Paso 3: los recuadros de Impuestos. */
.rdr-fx .cr-box {
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
}
.rdr-fx .cr-tax > b {
  font-size: 13px;
}

@media (prefers-reduced-motion: no-preference) {
  .cr-fx-open .cr-rail .cr-now {
    animation: cr-step-on var(--s) infinite both;
  }
  .cr-fx-open .cr-rail .cr-was {
    animation: cr-step-off var(--s) infinite both;
  }
  .cr-fx-credit .cr-bars {
    animation: cr-step-draw var(--s) infinite both;
  }
  .cr-fx-credit .cr-on {
    animation: cr-step-pop var(--s) infinite both;
  }
  .cr-fx-credit .cr-note {
    animation: cr-step-late var(--s) infinite both;
  }
  .cr-fx-tax .cr-tax {
    animation: cr-step-pop var(--s) infinite both;
  }
  .cr-fx-tax .cr-hold {
    animation: cr-step-late var(--s) infinite both;
  }
}
@keyframes cr-step-on {
  0%,
  45% {
    background: none;
    color: var(--ink-3);
  }
  48%,
  100% {
    background: #e5f2e8;
    color: #16804c;
  }
}
@keyframes cr-step-off {
  0%,
  45% {
    background: #e5f2e8;
    color: #16804c;
  }
  48%,
  100% {
    background: none;
    color: var(--ink-3);
  }
}
@keyframes cr-step-draw {
  0%,
  12% {
    clip-path: inset(0 100% 0 0);
  }
  52%,
  94% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes cr-step-pop {
  0%,
  10% {
    opacity: 0;
    translate: 0 6px;
  }
  18%,
  94% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cr-step-late {
  0%,
  50% {
    opacity: 0;
    translate: 0 6px;
  }
  58%,
  94% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}

/* Las seis situaciones, en escalera. */
.cr-ladder {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.cr-ladder li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f6f8f3;
  font-size: 14.5px;
}
.cr-ladder i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-style: normal;
  font-weight: 700;
}
.cr-ladder .cr-t1 i {
  background: #16804c;
}
.cr-ladder .cr-t2 i {
  background: #d99700;
}
.cr-ladder .cr-t3 i {
  background: #c5392b;
}
.cr-ladder b {
  font-weight: 600;
  letter-spacing: -0.015em;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .cr-ladder li {
      animation: cr-rung linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 80%;
    }
  }
}
@keyframes cr-rung {
  from {
    opacity: 0;
    translate: -16px 0;
  }
}

/* Lo que trae la tarjeta: un recuadro de ejemplo al pie de cada columna. */
.cr-in {
  margin-top: auto;
  background: #f6f8f3;
  border-color: transparent;
}
.cr-in .cr-chq {
  grid-template-columns: minmax(0, 1fr) auto;
}
.cr-in .cr-chq:first-child {
  padding-top: 0;
  border-top: 0;
}
.cr-taxes > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
}
.cr-taxes > span:first-child {
  padding-top: 0;
  border-top: 0;
}
.cr-taxes small {
  color: var(--ink-3);
}
.cr-doc {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cr-doc > span {
  display: grid;
  gap: 1px;
  font-size: 13px;
}
.cr-doc small {
  color: var(--ink-3);
  font-size: 12px;
}
.cr-dl {
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}
.cr-links {
  width: min(760px, 100%);
  margin: 32px auto 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
  text-wrap: pretty;
}
.cr-links a {
  color: #205d42;
  font-weight: 600;
}

@media (max-width: 900px) {
  .cr-live {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .cr-top {
    padding: 14px;
  }
  .cr-pane {
    padding: 14px;
  }
  .cr-chq {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .cr-chq b {
    display: none;
  }
}
