/**
 * Shared short tariff cards — used on / and /tariffs via partial.
 * Colors via --ds-* / --ln-* (Linen).
 */
.tf-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 56px;
  align-items: stretch;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .tf-plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: min(420px, 100%);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}
.tf-plan {
  position: relative;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--ds-radius-xl);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  box-shadow: var(--ds-shadow-soft);
  color: var(--ds-ink);
  transition:
    transform var(--ds-dur-tab, 0.35s) var(--ds-ease-tab, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow var(--ds-dur-tab, 0.35s) var(--ds-ease-tab, cubic-bezier(0.16, 1, 0.3, 1));
}
.tf-plan:hover {
  transform: translateY(-6px);
  box-shadow: var(--ds-shadow, var(--ds-card-lift, 0 22px 38px -20px color-mix(in srgb, var(--ds-muted) 55%, transparent)));
}
.tf-plan--start { background: var(--ds-pastel-mint); }
.tf-plan--optimal {
  background: var(--ds-pastel-lavender);
  box-shadow: var(--ds-shadow);
  transform: translateY(-4px);
}
.tf-plan--optimal:hover {
  transform: translateY(-10px);
  box-shadow: var(--ds-shadow);
}
.tf-plan--pro { background: var(--ln-peach, var(--ds-pastel-coral)); }
.tf-plan--extra { background: var(--ds-surface); }
.tf-plans.is-wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
@media (max-width: 900px) {
  .tf-plan--optimal { transform: none; }
  .tf-plan--optimal:hover { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .tf-plan,
  .tf-plan:hover,
  .tf-plan--optimal:hover {
    transition: none;
    transform: none;
  }
}
.tf-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ds-surface);
  background: var(--ds-accent);
  border-radius: var(--ds-radius-pill);
  padding: 5px 12px;
  white-space: nowrap;
}
.tf-plan-name {
  margin: 0;
  font-family: var(--ds-font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-display);
}
.tf-plan-level {
  margin: 0;
  color: color-mix(in srgb, var(--ds-ink) 68%, transparent);
  font-size: 12.5px;
}
.tf-plan-price {
  margin: 4px 0 0;
  font-family: var(--ds-font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-display);
  line-height: 1.1;
}
.tf-plan-price small {
  display: block;
  margin-top: 4px;
  font-family: var(--ds-font-ui);
  font-size: 12px;
  font-weight: 500;
  color: color-mix(in srgb, var(--ds-ink) 62%, transparent);
  letter-spacing: 0;
}
.tf-plan-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  flex: 1;
}
.tf-plan-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.3;
  padding: 3px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ds-ink) 7%, transparent);
}
.tf-plan-list li:last-child { border-bottom: 0; }
.tf-plan-list .k {
  color: color-mix(in srgb, var(--ds-ink) 68%, transparent);
  text-align: left;
}
.tf-plan-list .v {
  font-weight: 700;
  color: var(--ds-ink);
  text-align: right;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 18px;
}
.tf-plan-list .v.is-off {
  font-weight: 600;
  color: var(--ds-muted);
}
.tf-plan-list .v.is-yes { color: var(--ds-accent-deep); }
.tf-plan-list .v.is-yes svg {
  width: 16px;
  height: 16px;
  display: block;
}
.tf-plan-list .k .tf-tip { margin-left: 4px; }
.tf-tip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  z-index: 1;
}
.tf-tip-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ds-ink) 16%, transparent);
  background: var(--ds-surface);
  color: var(--ds-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: help;
}
.tf-tip-pop {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, 72vw);
  padding: 10px 12px;
  border-radius: var(--ds-radius-md);
  background: var(--ds-ink);
  color: var(--ds-surface);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  box-shadow: var(--ds-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 80;
}
.tf-tip-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--ds-ink);
}
.tf-tip:hover,
.tf-tip:focus-within { z-index: 90; }
.tf-tip:hover .tf-tip-pop,
.tf-tip:focus-within .tf-tip-pop {
  opacity: 1;
  visibility: visible;
}
.tf-plan-metrics {
  margin: 6px 0 0;
  list-style: none;
  display: grid;
  gap: 0;
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-surface) 55%, transparent);
  padding: 4px 10px;
}
.tf-plan-metrics li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.3;
  padding: 4px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ds-ink) 7%, transparent);
}
.tf-plan-metrics li:last-child { border-bottom: 0; }
.tf-plan-metrics .k {
  color: color-mix(in srgb, var(--ds-ink) 68%, transparent);
}
.tf-plan-metrics .v {
  font-weight: 700;
  color: var(--ds-ink);
  text-align: right;
  white-space: nowrap;
}
.tf-plan-includes {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--ds-radius-md);
  background: color-mix(in srgb, var(--ds-surface) 72%, transparent);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: color-mix(in srgb, var(--ds-ink) 78%, transparent);
}
.tf-plan-includes a {
  color: var(--ds-accent-deep);
  font-weight: 700;
  text-decoration: none;
}
.tf-plan-includes a:hover { text-decoration: underline; }
.tf-plan-cta {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.tf-plan-cta .hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--ds-ink) 58%, transparent);
}
.tf-plan-cta .btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* CTA buttons when cards sit on landing (not only go-public) */
.tf-plan .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--ds-radius-pill, 999px);
  padding: 12px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
}
@media (max-width: 420px) {
  .tf-plan .btn {
    padding: 11px 12px;
    font-size: 12.5px;
  }
}
.tf-plan .btn-cyan {
  background: var(--ds-accent);
  color: var(--ds-surface);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ds-accent) 28%, transparent);
}
.tf-plan .btn-cyan:hover { background: var(--ds-accent-deep); }
.tf-plan .btn.is-soon,
.tf-plan .btn[disabled] {
  opacity: 0.8;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--ds-surface) 78%, transparent);
  color: var(--ds-muted);
  border: 1px solid color-mix(in srgb, var(--ds-ink) 8%, transparent);
  box-shadow: none;
}

/* Landing wrapper: cards sit under section head */
.lx-tariffs .tf-plans { margin-bottom: 0; }
.lx-tariffs-more {
  margin: 18px 0 0;
  text-align: center;
}
.lx-tariffs-more a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-accent-deep);
  text-decoration: none;
}
.lx-tariffs-more a:hover { text-decoration: underline; }

/* T2 / C.1: coming_soon from catalog — только у обещанных пунктов */
[data-tf-soon="1"] {
  position: relative;
}
.tf-cats {
  display: grid;
  gap: 12px;
}
.tf-cat {
  border-radius: var(--ds-radius-xl);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  box-shadow: var(--ds-shadow-soft);
  overflow: hidden;
  max-width: 100%;
}
.tf-cat > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--ds-font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: var(--ds-tracking-display);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ds-surface-tint);
  border-radius: var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
}
.tf-cat:not([open]) > summary {
  border-radius: var(--ds-radius-xl);
}
.tf-cat > summary::-webkit-details-marker { display: none; }
.tf-cat > summary::after {
  content: "+";
  color: var(--ds-accent);
  font-family: var(--ds-font-ui);
  font-weight: 700;
  font-size: 18px;
}
.tf-cat[open] > summary::after { content: "–"; }
.tf-cat-lede {
  margin: 0;
  padding: 0 20px 12px;
  color: var(--ds-muted);
  font-size: var(--ds-fs-sm);
  line-height: var(--ds-lh-body);
  background: var(--ds-surface-tint);
}
.tf-cat .tf-compare-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
  padding-bottom: 2px;
}
table.tf-compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: var(--ds-fs-sm);
}
.tf-compare th,
.tf-compare td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--ds-line);
  vertical-align: middle;
}
.tf-compare thead th {
  font-family: var(--ds-font-display);
  font-weight: 600;
  font-size: 14px;
  background: color-mix(in srgb, var(--ds-pastel-mint) 55%, var(--ds-surface));
}
.tf-compare tbody th {
  font-weight: 600;
  width: 42%;
}
.tf-compare tbody th .tf-feat {
  display: inline;
}
.tf-compare td {
  text-align: center;
  color: color-mix(in srgb, var(--ds-ink) 78%, transparent);
  white-space: nowrap;
}
.tf-compare tbody tr:last-child th,
.tf-compare tbody tr:last-child td { border-bottom: 0; }
.tf-compare .muted { color: var(--ds-muted); }
.tf-cat:nth-child(1) .tf-compare thead th {
  background: color-mix(in srgb, var(--ds-pastel-mint) 70%, var(--ds-surface));
}
.tf-cat:nth-child(2) .tf-compare thead th {
  background: color-mix(in srgb, var(--ds-pastel-butter) 70%, var(--ds-surface));
}
.tf-cat:nth-child(3) .tf-compare thead th {
  background: color-mix(in srgb, var(--ds-pastel-sky) 70%, var(--ds-surface));
}
.tf-cat:nth-child(4) .tf-compare thead th {
  background: color-mix(in srgb, var(--ds-pastel-lavender) 70%, var(--ds-surface));
}
.tf-cat:nth-child(5) .tf-compare thead th {
  background: color-mix(in srgb, var(--ln-peach, var(--ds-pastel-coral)) 70%, var(--ds-surface));
}

.tf-compare [data-tf-soon="1"]::after,
.tf-plan-metrics [data-tf-soon="1"]::after,
.tf-plan-list [data-tf-soon="1"] .v::after {
  content: " · скоро";
  color: var(--ds-muted);
  font-size: 0.85em;
  font-weight: 500;
}
