/* Промежуточная страница внешнего API: тарифы Basic/PRO/MCP. Раскладка повторяет
   /traffic/pricing, палитра — бирюзовая, в тон оболочке /api-docs. */
:root {
  --ap-bg: #f4f8f7;
  --ap-surface: #fff;
  --ap-surface-2: #e9f5f2;
  --ap-border: rgb(44 55 68 / 11%);
  --ap-text: #2c3744;
  --ap-muted: #5e6b78;
  --ap-accent: #0abaaa;
  --ap-accent-hover: #089d90;
  --ap-accent-soft: rgb(10 186 170 / 11%);
  --ap-pro-from: #23343c;
  --ap-pro-to: #1d4a45;
}

body[data-page="api"] { color: var(--ap-text); background: var(--ap-bg); }
.ap-hero { padding: 130px 0 44px; text-align: center; background: linear-gradient(180deg, var(--ap-surface-2), var(--ap-bg)); }
.ap-backs { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; margin-bottom: 26px; }
.ap-back { color: var(--ap-muted); }
.ap-back:hover { color: var(--ap-accent); }
.ap-kicker { margin-bottom: 16px; font-size: 12px; font-weight: 700; color: var(--ap-accent); text-transform: uppercase; letter-spacing: .09em; }
.ap-hero h1 { max-width: 890px; margin: 0 auto 24px; font-family: var(--font-h); font-size: clamp(28px, 4vw, 46px); line-height: 1.25; }
.ap-intro { max-width: 740px; margin: auto; line-height: 1.75; color: var(--ap-muted); }
.ap-section { padding: 44px 0; }
.ap-section h2, .ap-bottom h2 { margin-bottom: 24px; font-family: var(--font-h); font-size: clamp(24px, 3vw, 34px); }
.ap-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.ap-card { display: grid; grid-template-rows: subgrid; grid-row: span 6; padding: 28px 24px; background: var(--ap-surface); border: 1px solid var(--ap-border); border-radius: 24px; box-shadow: 0 16px 40px rgb(44 55 68 / 6%); }
.ap-card-pro { color: #fff; background: linear-gradient(155deg, var(--ap-pro-from), var(--ap-pro-to)); border-color: var(--ap-accent); }
.ap-card-mcp { border-color: rgb(10 186 170 / 45%); }
.ap-card-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; color: var(--ap-accent); }
.ap-card-head span { padding: 6px 12px; font-size: 12px; font-weight: 600; background: var(--ap-accent-soft); border-radius: 30px; }
.ap-icon { flex: 0 0 40px; width: 40px; height: 40px; color: var(--ap-text); }
.ap-card-pro .ap-icon { color: var(--ap-accent); }
.ap-card h2 { margin-bottom: 12px; }
.ap-card-pro h2 { color: #fff; }
.ap-subtitle { min-height: 76px; font-weight: 600; line-height: 1.6; }
.ap-price { margin-top: 20px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.025em; }
.ap-price span { font-size: 15px; font-weight: 500; letter-spacing: normal; }
.ap-caption { margin: 8px 0 4px; font-size: 13px; color: var(--ap-muted); }
.ap-card-pro .ap-caption { color: rgb(255 255 255 / 70%); }
.ap-btn { display: inline-flex; justify-content: center; padding: 14px 28px; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--ap-accent); border-radius: 999px; transition: background .18s, box-shadow .18s; }
.ap-btn-pro { color: #fff; background: var(--ap-accent); }
.ap-btn-pro:hover { background: var(--ap-accent-hover); box-shadow: 0 4px 14px rgb(10 186 170 / 30%); }
.ap-btn-ghost { font-weight: 600; color: var(--ap-accent-hover); background: var(--ap-surface); }
.ap-btn-ghost:hover { background: var(--ap-surface-2); }
.ap-card .ap-btn { width: 100%; margin-top: 12px; }
.ap-card h3 { margin: 24px 0 12px; font-size: 12px; color: var(--ap-muted); text-transform: uppercase; letter-spacing: .05em; }
.ap-card-pro h3 { color: rgb(255 255 255 / 60%); }
.ap-card ul { padding: 0; line-height: 1.6; list-style: none; }
.ap-card li { position: relative; padding-left: 22px; margin: 8px 0; font-size: 14px; }
.ap-card li::before { position: absolute; left: 0; font-weight: 700; color: var(--ap-text); content: "✓"; }
.ap-card-pro li::before { color: var(--ap-accent); }
.ap-note { margin-top: 22px; font-size: 12px; line-height: 1.7; color: var(--ap-muted); }
.ap-card-pro .ap-note { color: rgb(255 255 255 / 65%); }
.ap-shared { max-width: 850px; margin: 28px auto; line-height: 1.7; color: var(--ap-muted); text-align: center; }
.ap-exchange { background: var(--ap-surface-2); }
.ap-exchange h2 { max-width: 720px; }
.ap-exchange-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ap-exchange-col { padding: 28px 32px; background: var(--ap-surface); border: 1px solid var(--ap-border); border-radius: 18px; }
.ap-exchange-col h3 { margin: 0 0 14px; font-size: 18px; }
.ap-exchange-col ul { padding: 0; line-height: 1.65; list-style: none; }
.ap-exchange-col li { position: relative; padding-left: 22px; margin: 8px 0; }
.ap-exchange-col li::before { position: absolute; left: 0; font-weight: 700; color: var(--ap-accent); content: "✓"; }
.ap-clients { max-width: 850px; margin: 24px 0 0; line-height: 1.7; color: var(--ap-muted); }
.ap-clients a { font-weight: 600; color: var(--ap-accent-hover); }
.ap-comparison { background: var(--ap-surface-2); }
.ap-details { padding: 20px 24px; margin-bottom: 14px; background: var(--ap-surface); border: 1px solid var(--ap-border); border-radius: 14px; }
.ap-details summary { font-weight: 600; line-height: 1.6; cursor: pointer; }
.ap-details p { margin-top: 18px; line-height: 1.75; }
.ap-details code { padding: 2px 7px; font-size: 13px; background: var(--ap-accent-soft); border-radius: 6px; }
.ap-table-wrap { margin-top: 22px; overflow-x: auto; }
.ap-details table { width: 100%; min-width: 700px; font-size: 13px; line-height: 1.6; border-collapse: collapse; }
.ap-details th, .ap-details td { width: 25%; padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ap-border); }
.ap-details thead { background: var(--ap-accent-soft); }
.ap-faq { max-width: var(--max-w); }
.ap-bottom { padding: 56px 0 70px; text-align: center; background: var(--ap-accent-soft); }
.ap-bottom p { margin-bottom: 24px; }
.ap-bottom__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (width <= 1080px) {
  .ap-cards { grid-template-columns: minmax(0, 1fr); }
  .ap-subtitle { min-height: 0; }
}

@media (width <= 720px) {
  .ap-hero { padding-top: 110px; }
  .ap-exchange-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-card { display: block; padding: 24px 20px; }
  .ap-details { padding: 18px; }
  .ap-section { padding: 32px 0; }
}

/* Акция основной платформы не относится к тарифам внешнего API. */
body[data-page="api"] .modal__platform-offer { display: none; }
