.pricing-page { max-width: 1376px; margin-inline: auto; padding: 12px clamp(18px, 3.2vw, 48px) 8px; }
.pricing-title { grid-area: title; display: flex; align-items: center; gap: 10px; }
.pricing-back { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: var(--radius-control); color: var(--muted); font-size: 17px; }
.pricing-back:hover { background: var(--panel-active); color: var(--text-strong); }
.pricing-intro { display: grid; grid-template-areas: "title" "costs"; align-items: center; gap: 7px 20px; margin: 4px 0 20px; }
.pricing-costs { grid-area: costs; margin: 0; color: var(--text); font-size: 15px; }
.pricing-intro h1 { margin: 0; color: var(--text-strong); font-size: clamp(28px, 3.1vw, 44px); font-weight: 550; letter-spacing: -.055em; line-height: 1.1; }
.pricing-period { grid-row: 1; justify-self: center; display: flex; gap: 2px; min-width: 0; margin: 0; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-shell); }
.pricing-period label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px; color: var(--muted); border-radius: var(--radius-control); cursor: pointer; font-size: 13px; }
.pricing-period input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pricing-period label:has(:checked) { color: var(--text-strong); background: var(--panel-active); font-weight: 650; }
.pricing-period label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pricing-period small { color: var(--accent); font: 11px/1.2 var(--mono); }
.pricing-picker { grid-area: picker; display: none; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(10px, 1.25vw, 20px); }
.price-card { display: grid; grid-row: span 8; grid-template-rows: subgrid; row-gap: 7px; padding: clamp(16px, 1.7vw, 26px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-shell); }
.price-card header { grid-row: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.price-card h2 { margin: 0; color: var(--text-strong); font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.price-badge { padding: 3px 7px; color: var(--accent); border: 1px solid var(--line-strong); border-radius: var(--radius-control); font-size: 12px; line-height: 1.25; }
.price-popular { background: var(--accent); color: var(--text-on-action); border-color: var(--accent); font-weight: 650; }
.price-card p { margin: 0; }
.price-amount { grid-row: 3; align-self: start; padding: 4px 0 8px; color: var(--muted); font-size: 14px; }
.price-amount strong, .bf-first-month b { color: var(--text-strong); font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; font-weight: 550; letter-spacing: -.06em; }
.price-amount .bf-first-month { display: none; }
[data-intro-eligible] .bf-discounted > :not(.bf-first-month) { display: none; }
[data-intro-eligible] .bf-discounted .bf-first-month { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bf-first-month small { color: var(--text); font-size: inherit; }
.price-credits { grid-row: 4; color: var(--text-strong); font-size: clamp(17px, 1.45vw, 22px); font-weight: 650; line-height: 1.25; }
.price-card [data-daily-example] { grid-row: 5; color: var(--muted); font-size: 14px; }
.price-card [data-monthly-grant] { grid-row: 6; color: var(--text-strong); font-size: 15px; font-weight: 550; }
.price-card .price-actions { grid-row: 7; padding-top: 7px; }
.price-features { grid-row: 8; padding-top: 5px; color: var(--text); font-size: 14px; }
.price-action { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 40px; padding: 6px 8px; font-size: 14px; font-weight: 650; border: 1px solid var(--line-strong); border-radius: var(--radius-control); }
.price-action:hover { background: var(--panel-active); }
.price-action:disabled { opacity: .6; }
.price-card--featured { background: var(--panel-raised); border-color: var(--accent); }
.price-card--featured .price-action { color: var(--text-on-action); background: var(--accent); border-color: var(--accent); }
.price-card--featured .price-action:not(:disabled):hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.price-card--featured .price-action:active:not(:disabled) { background: var(--accent-pressed); border-color: var(--accent-pressed); color: var(--text-on-action-pressed); }
.pricing-included { grid-column: 1 / -1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-shell); background: var(--panel); }
.pricing-included summary, .pricing-usage summary { margin: 0; color: var(--text-strong); font-size: 14px; font-weight: 650; }
.pricing-included ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; padding: 0; font-size: 13px; list-style: none; }
.pricing-included li::before { content: ''; display: inline-block; width: .32em; height: .32em; vertical-align: .16em; margin-right: .5em; border-radius: 50%; background: var(--accent); }
.pricing-included summary { width: fit-content; cursor: pointer; }
.pricing-meta { display: grid; gap: 12px; margin-block: 12px; }
.pricing-usage summary { width: fit-content; cursor: pointer; }
.pricing-terms { display: grid; gap: 4px; margin-top: 8px; }
.pricing-terms p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.pricing-availability { margin: 4px 0; color: var(--muted); font-size: 12px; }
.pricing-billing { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.pricing-billing p { margin: 0; }
.pricing-billing button, .billing-return button { padding: 4px 0; min-height: 24px; font: inherit; text-decoration: underline; }
[data-pricing-status] { margin: 4px 0 0; font-size: 13px; }
[data-pricing-status]:empty { margin: 0; }
[data-pricing-feedback] a { text-decoration: underline; }

.credit-pack { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "heading heading heading" "selector price buy"; gap: 12px 24px; align-items: center; margin: 18px 0 8px; padding: 15px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-shell); background: var(--panel-raised); scroll-margin-block: 12px; }
.pack-heading { grid-area: heading; }
.pack-heading h2 { margin: 0; color: var(--text-strong); font-size: clamp(16px, 1.4vw, 21px); letter-spacing: -.03em; line-height: 1.25; }
.pack-price { grid-area: price; margin: 0; }
.pack-price [data-pack-saving] { margin-inline-start: 4px; color: var(--accent); font-size: 12px; white-space: nowrap; }
.pack-price strong { color: var(--text-strong); font-size: 22px; }
.pack-price span, .pack-unavailable { font-size: 13px; color: var(--muted); }
.credit-pack .price-actions { grid-area: buy; min-width: 128px; }
.pack-selector { grid-area: selector; min-width: 0; }
.pack-selector input { display: block; width: calc(90% + 14px); margin: 0 calc(5% - 7px); height: 22px; appearance: none; background: transparent; cursor: pointer; }
.pack-selector input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--pack-progress, 0%), var(--line-strong) var(--pack-progress, 0%)); }
.pack-selector input::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 2px solid var(--panel); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pack-selector input::-moz-range-track { height: 4px; background: var(--line-strong); }
.pack-selector input::-moz-range-progress { height: 4px; background: var(--accent); }
.pack-selector input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); }
.pack-selector input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-stops { position: relative; display: flex; justify-content: space-between; }
.pack-stops button { position: relative; width: 10%; min-width: 0; min-height: 24px; padding: 2px 0 0; font: 11px/1.4 var(--mono); color: var(--muted); cursor: pointer; }
.pack-stops button::before { content: ''; position: absolute; top: -2px; left: 50%; width: 1px; height: 4px; background: var(--line-strong); }
.pack-stops button[data-current] { color: var(--text-strong); font-weight: 700; }
@media (min-width: 1200px) and (min-height: 840px) {
  body:has(> .pricing-page) { display: flex; flex-direction: column; }
  .pricing-page { width: 100%; max-width: 1520px; margin-bottom: auto; }
  .pricing-intro { margin-block: 14px 24px; }
  .price-action { min-height: 44px; }
}
@media (max-width: 959px) {
  .pricing-page { max-width: 680px; }
  .pricing-intro { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "costs costs" ". picker"; gap: 7px 10px; margin-bottom: 10px; }
  .pricing-period label { padding-inline: 7px; }
  .pricing-picker:not([hidden]) { display: block; justify-self: end; }
  .pricing-picker select { max-width: 100%; min-height: 36px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-control); }
  .pricing-grid { grid-template-columns: 1fr; row-gap: 8px; }
  .pricing-grid:has([data-selected-plan]) .price-card:not([data-selected-plan]) { display: none; }
  .price-card { grid-template-rows: none; grid-row: auto; padding: 14px; gap: 5px; }
  .price-card > :is(header, p, fieldset, .price-actions) { grid-row: auto; }
  .pricing-meta { gap: 8px; }
  .pricing-billing { justify-content: start; }
  .credit-pack { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "heading heading" "selector selector" "price buy"; padding: 12px 14px; gap: 8px; }
  .credit-pack .price-actions { min-width: 0; }
  .price-action { min-height: 44px; }
}
@media (max-width: 550px) {
  .pricing-page { padding-inline: 14px; }
  .pricing-intro h1 { font-size: 28px; }
  .pricing-costs { font-size: 14px; }
  .pricing-period small { font-size: 10px; }
}
