/* Klod pricing — 3-tier plan layout, top-level period toggle */

.pr-body {
  background: var(--bg);
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ─── Top bar ─── */
.pr-top {
  display: flex;
  align-items: center;
  padding: 18px 28px;
}
.pr-back {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.pr-back:hover {
  background: var(--hover-bg);
  color: var(--text);
}

/* ─── Main ─── */
.pr-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px 56px;
}

/* ─── Hero ─── */
.pr-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 48px;
}
.pr-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 460;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
.pr-subtitle {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
  max-width: 560px;
  line-height: 1.5;
}

/* ─── Audience toggle (Личный / Команды) ─── */
.pr-aud {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: -24px auto 40px;
  width: fit-content;
  background: var(--hover-bg);
  border-radius: 12px;
  padding: 4px;
}
.pr-aud__btn {
  padding: 8px 18px;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  transition: background 140ms ease, color 140ms ease;
}
.pr-aud__btn.is-active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}
.pr-aud__btn:not(.is-active):hover { color: var(--text); }

/* ─── Grid of plan cards (auto-centred: 3 cards for free, 2 for paid) ─── */
.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
  align-items: stretch;
}

.pr-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* display:flex above would defeat the [hidden] attribute — keep it winning */
.pr-card[hidden] { display: none; }
/* Featured: a calm, slightly stronger border — no glow, no loud colours */
.pr-card--featured {
  border-color: var(--border-strong);
}
.pr-card__badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--card-bg);
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 11px;
  border-radius: 999px;
}

.pr-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--accent);
}

.pr-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pr-card__name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 480;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}
.pr-card__pitch {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
  margin: 0;
}

.pr-card__price {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 4px 0 2px;
  min-height: 44px;
}
.pr-card__amount {
  font-family: var(--font-sans);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}
.pr-card__period-note {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.35;
}

/* Max usage selector (5x / 20x) */
.pr-usage {
  display: inline-flex;
  gap: 4px;
  width: fit-content;
  background: var(--hover-bg);
  border-radius: 9px;
  padding: 3px;
}
.pr-usage__btn {
  padding: 5px 14px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  transition: background 130ms ease, color 130ms ease;
}
.pr-usage__btn.is-active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.pr-card__note {
  margin: -8px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

/* Invisible placeholders so CTA rows and lists line up across cards
   (the Max card has a 5x/20x selector and a note that others lack) */
.pr-usage--ghost,
.pr-card__note--ghost { visibility: hidden; }

.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  transition: background 140ms ease, transform 80ms ease;
}
.pr-btn:hover { background: var(--btn-bg-hover); }
.pr-btn:active { transform: translateY(1px); }
.pr-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.pr-btn--ghost:hover {
  background: var(--hover-bg);
  border-color: var(--text);
}
.pr-btn.is-current {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border-strong);
  cursor: default;
  pointer-events: none;
}

.pr-list-head {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.pr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.pr-list li {
  position: relative;
  padding-left: 24px;
}
/* Muted check marks, like the reference plans screen */
.pr-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 10px;
  height: 6px;
  border-left: 1.8px solid var(--text-muted);
  border-bottom: 1.8px solid var(--text-muted);
  transform: rotate(-45deg);
  border-radius: 1px;
}

.pr-limits-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 56px;
}

/* Toast for the Team stub */
.pr-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 50;
}
.pr-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Business CTA ─── */
.pr-business {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.pr-business__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 540;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.pr-business__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  max-width: 680px;
}
.pr-business .pr-btn { padding: 0 22px; }

/* ─── Disclaimer ─── */
.pr-disclaimer {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* ─── Foot ─── */
.pr-foot {
  text-align: center;
  padding: 32px 24px 24px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 56px;
}
.pr-foot a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0 4px;
}
.pr-foot a:hover { color: var(--text); }

/* ─── Mobile ─── */
@media (max-width: 980px) {
  .pr-grid { grid-template-columns: minmax(0, 420px); gap: 16px; }
  /* stacked cards don't need cross-card alignment ghosts */
  .pr-usage--ghost, .pr-card__note--ghost { display: none; }
  .pr-card--featured { order: -1; }
}
@media (max-width: 600px) {
  .pr-main { padding: 18px 16px 48px; }
  .pr-grid { grid-template-columns: 1fr; }
  .pr-card { padding: 24px 22px 22px; }
  .pr-card__name { font-size: 24px; }
  .pr-card__amount { font-size: 30px; }
  .pr-hero { margin-bottom: 28px; gap: 14px; }
  .pr-aud { margin: -14px auto 30px; }
  .pr-business { padding: 20px 22px; }
}

/* ─── API balance section ──────────────────────────────────────────── */
.pr-api-hero {
  max-width: 760px;
  margin: 80px auto 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pr-api-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.pr-api-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 460;
  color: var(--text);
  margin: 2px 0 0;
  letter-spacing: -0.02em;
}
.pr-api-subtitle {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 580px;
}

.pr-grid--api { margin-top: 12px; }

.pr-card--api .pr-card__name { font-size: 22px; }
.pr-card--api .pr-card__period-note { color: var(--text-muted); }

/* Credit chip: calm inline row — amount + label on one line */
.pr-api-credit {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  margin: -4px 0 6px;
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pr-api-credit-amount {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pr-api-credit-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-soft);
}

/* Code icon on API cards — same 40px slot as the brand mark above */
.pr-card__icon--code {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.pr-api-note {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 0 22px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}
.pr-api-note a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}
.pr-api-note a:hover { text-decoration-color: var(--accent); }

@media (max-width: 600px) {
  .pr-api-hero { margin-top: 56px; }
  .pr-api-title { font-size: 28px; }
  .pr-api-subtitle { font-size: 14px; padding: 0 18px; }
  .pr-api-credit-amount { font-size: 20px; }
}
