/* Tariffs and tokens page (public/tariffs.html), in the app's palette. */
:root { --ink: #241c2d; --ink2: #6b6075; --muted: #998ea3; --line: #e8e1ef; --page: #faf8fc; --card: #ffffff; --accent: #302637; --soft: #f3eff8; --brand: #8a63c2; }
* { box-sizing: border-box; }
body.tariffs-page { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.5 "Plus Jakarta Sans", system-ui, sans-serif; }
.tp-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.tp-brand { font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; }
.tp-header nav { display: flex; gap: 18px; }
.tp-header nav a { color: var(--ink2); text-decoration: none; font-size: 14px; }
.tp-main { max-width: 1180px; margin: 0 auto; padding: 32px 28px 72px; display: flex; flex-direction: column; gap: 44px; }
.tp-eyebrow { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); margin: 0 0 6px; }

.tp-current { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 30px; }
.tp-current h1 { font-size: 40px; margin: 0; letter-spacing: -1px; }
.tp-renew { margin: 6px 0 0; color: var(--ink2); }
.tp-balance { background: var(--soft); border-radius: 14px; padding: 16px 18px; }
.tp-balance span { font-size: 12px; color: var(--ink2); }
.tp-balance strong { display: block; font-size: 30px; letter-spacing: -0.5px; margin: 2px 0 10px; }
.tp-meter { height: 6px; border-radius: 3px; background: #e2d9ec; overflow: hidden; }
.tp-meter i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width 0.3s; }
.tp-balance small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }

.tp-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; }
.tp-heading h2, .tp-costs h2, .tp-faq h2 { font-size: 24px; margin: 0; letter-spacing: -0.5px; }
.tp-heading p { margin: 0; color: var(--ink2); font-size: 13px; max-width: 560px; }

.tp-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tp-plan, .tp-pack { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; }
.tp-plan.featured { background: #292332; color: #fff; border-color: #292332; }
.tp-plan.current { box-shadow: 0 0 0 2px var(--brand); }
.tp-badge { position: absolute; top: -11px; left: 20px; background: #e4d8f6; color: #4d3570; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; padding: 4px 10px; border-radius: 20px; }
.tp-plan h3 { font-size: 22px; margin: 0 0 6px; }
.tp-tagline { font-size: 12px; color: var(--muted); margin: 0; min-height: 36px; }
.tp-price { font-size: 40px; font-weight: 700; letter-spacing: -1.5px; margin: 16px 0 10px; }
.tp-price small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.tp-tokens { font-size: 15px; }
.tp-minutes, .tp-rate { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.tp-plan.featured .tp-tagline, .tp-plan.featured .tp-minutes, .tp-plan.featured .tp-rate, .tp-plan.featured ul { color: #c9bfd6; }
.tp-plan ul { list-style: none; padding: 18px 0; margin: 0; flex: 1; font-size: 13px; color: var(--ink2); line-height: 2.1; }
.tp-plan li::before { content: '✓'; color: var(--brand); margin-right: 9px; }
.tp-action { border: 0; border-radius: 11px; background: var(--accent); color: #fff; padding: 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 14px; }
.tp-plan.featured .tp-action { background: #e4d8f6; color: #2b1f3a; }
.tp-action:disabled { cursor: not-allowed; opacity: 0.55; }
.tp-plan.current .tp-action:disabled { opacity: 1; background: var(--soft); color: var(--ink2); }

.tp-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tp-pack strong { font-size: 18px; }
.tp-pack .tp-price { font-size: 32px; margin: 10px 0 6px; }
.tp-pack .tp-action { margin-top: 18px; }
.tp-note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin: 0; }

.tp-costs { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 30px; }
.tp-costs table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.tp-costs th { text-align: left; font-weight: 400; color: var(--ink2); padding: 11px 12px 11px 0; border-top: 1px solid var(--line); }
.tp-costs td { text-align: right; font-weight: 700; padding: 11px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.tp-costs p { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.7; }

.tp-faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.tp-faq h2 { margin-bottom: 10px; }
.tp-faq summary { cursor: pointer; font-weight: 600; }
.tp-faq p { color: var(--ink2); margin: 10px 0 0; font-size: 14px; }

@media (max-width: 1100px) { .tp-plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .tp-header { padding: 14px 16px; }
  .tp-main { padding: 20px 16px 56px; gap: 34px; }
  .tp-current { grid-template-columns: 1fr; padding: 20px; }
  .tp-current h1 { font-size: 32px; }
  .tp-plans, .tp-packs { grid-template-columns: 1fr; gap: 22px; }
  .tp-costs { padding: 20px 18px; }
  .tp-costs td { white-space: normal; }
}

/* Payment (LiqPay): local price, notices, subscription line, checkout window */
.tp-local { font-size: 13px; font-weight: 600; margin: -4px 0 10px; color: var(--ink2); }
.tp-plan.featured .tp-local { color: #e4d8f6; }
.tp-notice { margin: 0; padding: 14px 18px; border-radius: 14px; background: var(--soft); color: var(--ink); font-size: 14px; }
.tp-notice.success { background: #e3f4e8; color: #1f5130; }
.tp-notice.error { background: #fbe4e4; color: #7a1f1f; }
.tp-subscription { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 10px 0 0; font-size: 13px; color: var(--ink2); }
.tp-subscription[hidden] { display: none; }
.tp-link { border: 0; background: none; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.tp-link:disabled { opacity: 0.5; cursor: wait; }
.tp-dialog { border: 0; border-radius: 20px; padding: 28px 30px 22px; width: min(440px, calc(100vw - 32px)); box-sizing: border-box; color: var(--ink); background: var(--card); }
.tp-dialog::backdrop { background: rgba(20, 14, 28, 0.55); }
.tp-dialog h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -0.5px; }
.tp-dialog-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--muted); }
.tp-dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: 14px; }
.tp-dialog dt { color: var(--ink2); }
.tp-dialog dd { margin: 0; text-align: right; font-weight: 700; }
.tp-dialog-note { font-size: 13px; color: var(--ink2); margin: 0 0 10px; line-height: 1.6; }
.tp-dialog-note.sandbox { color: #8a5a00; }
.tp-dialog-error { color: #b42318; font-size: 13px; margin: 0; min-height: 0; }
.tp-dialog-actions { display: flex; gap: 10px; margin-top: 8px; }
.tp-dialog-actions .tp-action { flex: 1; margin-top: 6px; }
.tp-action.secondary { background: var(--soft); color: var(--ink); }
.tp-dialog-legal { font-size: 11px; color: var(--muted); margin: 12px 0 0; }

/* Public offer (offer.html) */
.tp-legal { max-width: 820px; }
.tp-legal h1 { font-size: 36px; letter-spacing: -1px; margin: 0 0 16px; }
.tp-legal h2 { font-size: 19px; margin: 30px 0 10px; }
.tp-legal p { color: var(--ink2); font-size: 14px; line-height: 1.75; margin: 0 0 10px; }
.tp-legal a { color: var(--brand); }
.tp-legal-details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 14px; margin: 0 0 14px; }
.tp-legal-details dt { color: var(--muted); }
.tp-legal-details dd { margin: 0; font-weight: 600; }
.tp-dialog-legal a { color: var(--brand); }

/* What every plan has; «Усе з …, плюс:» in plan cards */
.tp-plan li.tp-includes { font-weight: 600; color: var(--ink); }
.tp-plan.featured li.tp-includes { color: #fff; }
.tp-plan li.tp-includes::before { content: none; }
.tp-plan li { line-height: 1.5; padding: 4px 0 4px 20px; text-indent: -20px; }
.tp-plan li::before { display: inline-block; width: 11px; text-indent: 0; }
.tp-basics { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; }
.tp-basics h3 { font-size: 15px; margin: 0 0 10px; }
.tp-basics ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 24px; font-size: 13px; color: var(--ink2); }
.tp-basics li::before { content: '✓'; color: var(--brand); margin-right: 9px; }
@media (max-width: 900px) { .tp-basics ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tp-basics ul { grid-template-columns: 1fr; } }
