/* AI API price explorer (pricing.js), loaded only on the tracker page (owner, 18/10/2026: «fantastic and interactive») */
.aih-pricing { margin: 28px 0; display: grid; gap: 18px; font-family: var(--text); }
.aih-pricing .ap-loading { color: var(--muted); }
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ap-stats div { background: linear-gradient(135deg, #1a0f4a, #0c0a1f); border: 1px solid #2f2470; border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.ap-stats b { font: 700 22px/1.15 var(--head); color: #fff; overflow-wrap: anywhere; }
.ap-stats span { font-size: 12.5px; line-height: 1.35; color: #b9b2e6; }
.ap-work, .ap-filters { background: #0d0b1c; border: 1px solid #241d52; border-radius: 16px; padding: 16px; display: grid; gap: 14px; }
.ap-h { font: 700 19px/1.2 var(--head); color: #fff; }
.ap-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.ap-presets button { text-align: left; background: #15122e; color: #fff; border: 1px solid #2e2766; border-radius: 12px; padding: 11px 12px; cursor: pointer; display: grid; gap: 3px; transition: border-color .15s, background .15s; }
.ap-presets button b { font: 700 16px/1.1 var(--head); }
.ap-presets button small { font-size: 12px; color: #a59ddc; }
.ap-presets button:hover { border-color: #5a4fcf; }
.ap-presets button[aria-checked="true"] { background: linear-gradient(135deg, #5a28fb, #3d2ccb); border-color: #8f7cff; box-shadow: 0 6px 24px rgba(90, 40, 251, .35); }
.ap-presets button[aria-checked="true"] small { color: #e9e4ff; }
.ap-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-custom[hidden] { display: none; }
.ap-custom label, .ap-slider span { display: grid; gap: 6px; font: 600 13px/1.3 var(--text); color: #cfc6ff; }
.aih-pricing input[type="number"], .aih-pricing input[type="search"], .aih-pricing select { font: 500 16px/1.2 var(--text); color: #fff; background: #000; border: 1px solid #3b3290; border-radius: 10px; padding: 10px 12px; width: 100%; }
.aih-pricing input:focus, .aih-pricing select:focus, .aih-pricing button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.ap-slider { display: grid; gap: 8px; }
.ap-slider span { display: flex; justify-content: space-between; align-items: baseline; }
.ap-slider output { font: 700 20px/1 var(--head); color: var(--lime); }
.ap-slider input[type="range"] { width: 100%; accent-color: #8f7cff; height: 28px; }
.ap-formula { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chips button { background: #15122e; color: #ddd8ff; border: 1px solid #2e2766; border-radius: 999px; padding: 6px 11px; font: 600 13px/1.2 var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ap-chips button i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ap-chips button small { color: #8e86c4; font-weight: 500; }
.ap-chips button.on { background: #cdb4ff; color: #000; border-color: #cdb4ff; }
.ap-chips button.on small { color: #333; }
.ap-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ap-sort { display: flex; gap: 8px; align-items: center; font: 600 13px/1 var(--text); color: #cfc6ff; }
.ap-sort select { width: auto; padding: 8px 10px; }
.ap-count { font: 600 13px/1 var(--text); color: var(--muted); }
.ap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.ap-card { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1.2fr) 150px; gap: 14px; align-items: center; background: #0f0d1f; border: 1px solid #221c4a; border-left: 4px solid var(--pc); border-radius: 14px; padding: 14px 16px; transition: transform .12s, border-color .12s; }
.ap-card:hover { transform: translateY(-1px); border-color: #3b3290; border-left-color: var(--pc); }
.ap-card.is-cmp { background: #17123a; border-color: #5a4fcf; }
.ap-rank { font: 700 22px/1 var(--head); color: #5d55a3; text-align: center; }
.ap-id { display: grid; gap: 4px; min-width: 0; }
.ap-prov { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--text); color: #b9b2e6; text-transform: uppercase; letter-spacing: .04em; }
.ap-prov i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.ap-id a { font: 700 18px/1.2 var(--head); color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.ap-id a:hover { color: var(--lime); }
.ap-id small, .ap-bars small { font-size: 12px; color: var(--muted); }
.ap-bars { display: grid; gap: 6px; }
.ap-bars div { display: grid; grid-template-columns: 50px 1fr 62px; gap: 8px; align-items: center; }
.ap-bars span { font-size: 12px; color: #a59ddc; }
.ap-bars b { height: 8px; border-radius: 99px; background: #1d1840; position: relative; overflow: hidden; }
.ap-bars b::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #5a28fb, #a98bff); }
.ap-bars b.o::after { background: linear-gradient(90deg, #ff3d9a, #ffb3d6); }
.ap-bars em { font: 600 13px/1 var(--text); font-style: normal; color: #fff; text-align: right; }
.ap-cost { display: grid; gap: 4px; justify-items: end; text-align: right; }
.ap-cost strong { font: 700 26px/1 var(--head); color: var(--lime); }
.ap-cost small { font-size: 12px; color: var(--muted); }
.ap-cost button, .ap-more, .ap-tray button { background: transparent; color: #cfc6ff; border: 1px solid #3b3290; border-radius: 999px; padding: 6px 12px; font: 600 12.5px/1 var(--text); cursor: pointer; }
.ap-cost button[aria-pressed="true"] { background: #5a28fb; border-color: #8f7cff; color: #fff; }
.ap-more { justify-self: center; padding: 11px 22px; font-size: 14px; }
.ap-more[hidden] { display: none; }
.ap-tray { position: sticky; bottom: 12px; z-index: 30; background: rgba(13, 11, 31, .96); backdrop-filter: blur(8px); border: 1px solid #5a4fcf; border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); display: grid; gap: 10px; }
.ap-tray[hidden] { display: none; }
.ap-tray-h { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ap-tray-h b { font: 700 17px/1 var(--head); color: #fff; }
.ap-tray-h span { font-size: 12.5px; color: var(--muted); flex: 1; }
.ap-tray-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ap-tray-l div { position: relative; background: #15122e; border: 1px solid #2e2766; border-top: 3px solid var(--pc); border-radius: 12px; padding: 10px 28px 10px 12px; display: grid; gap: 3px; }
.ap-tray-l b { font: 600 14px/1.2 var(--text); color: #fff; overflow-wrap: anywhere; }
.ap-tray-l strong { font: 700 22px/1 var(--head); color: var(--lime); }
.ap-tray-l small { font-size: 12px; color: var(--muted); }
.ap-tray-l i { display: none; }
.ap-tray-l button { position: absolute; top: 6px; right: 6px; border: 0; padding: 2px 6px; font-size: 18px; color: #a59ddc; }
/* price changes as a timeline (server-rendered list) */
.ap-changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ap-changes li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; background: #0f0d1f; border: 1px solid #221c4a; border-radius: 12px; padding: 12px 14px; }
.ap-changes .dir { font: 700 13px/1 var(--text); padding: 5px 9px; border-radius: 99px; }
.ap-changes .down { background: rgba(227, 255, 138, .14); color: var(--lime); }
.ap-changes .up { background: rgba(255, 61, 154, .14); color: #ff7ab8; }
.ap-changes time { font-size: 12.5px; color: var(--muted); }
/* the full tables, folded */
.ap-table { border: 1px solid #221c4a; border-radius: 14px; padding: 0 16px; margin: 24px 0; }
.ap-table summary { cursor: pointer; padding: 14px 0; font: 700 17px/1.2 var(--head); color: #cfc6ff; }
.ap-table[open] summary { border-bottom: 1px solid #221c4a; margin-bottom: 12px; }
.ap-table .wp-block-table, .ap-table table { font-size: 14px; }
@media (max-width: 767px) {
	.ap-card { grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "r id cost" "bars bars bars"; gap: 10px 12px; padding: 12px; }
	.ap-rank { grid-area: r; font-size: 18px; }
	.ap-id { grid-area: id; }
	.ap-id a { font-size: 17px; }
	.ap-cost { grid-area: cost; }
	.ap-cost strong { font-size: 22px; }
	.ap-bars { grid-area: bars; }
	.ap-custom { grid-template-columns: 1fr; }
	.ap-stats b { font-size: 19px; }
}
/* company logos (Simple Icons, CC0) */
.ap-logo { width: 16px; height: 16px; fill: currentColor; flex: none; }
.ap-mono { width: auto; height: auto; font: 800 11px/1 var(--text); letter-spacing: -.02em; }
.ap-chips button .ap-logo { width: 14px; height: 14px; color: var(--pc); }
.ap-chips button.on .ap-logo { color: #000; }
.ap-id { display: flex; gap: 12px; align-items: center; }
.ap-name { display: grid; gap: 4px; min-width: 0; }
.ap-tile { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff;
	background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pc) 75%, #fff 10%), color-mix(in srgb, var(--pc) 45%, #000)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ap-tile .ap-logo { width: 24px; height: 24px; }
.ap-tile .ap-mono { font-size: 13px; }
.ap-tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.ap-tile.sm .ap-logo { width: 16px; height: 16px; }
.ap-tray-l div { grid-template-columns: auto 1fr; column-gap: 8px; }
.ap-tray-l .ap-tile { grid-row: span 3; }
@media (max-width: 767px) { .ap-tile { width: 38px; height: 38px; } .ap-tile .ap-logo { width: 21px; height: 21px; } }
/* the article's list styles (.prose ol/ul: padding, li + li margin) must not reach the explorer */
.prose .aih-pricing .ap-list, .prose .ap-changes { padding: 0; }
.prose .aih-pricing li + li, .prose .ap-changes li + li { margin-top: 0; }
