.kt-ai-prices .kt-shell { width: min(100% - 40px, 1080px); }
.ap { --ap-strong: #114e38; --ap-warn: #875319; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .ap { --ap-strong: #a1efd0; --ap-warn: #f3c88d; } }
.ap [hidden] { display: none !important; }
.ap-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ap h1, .ap h2, .ap h3, .ap p, .ap dl, .ap dd { margin: 0; }
.ap a { text-underline-offset: .2em; }
.ap-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px 24px; margin-bottom: 23px; }
.ap-heading h1 { font-size: 36px; line-height: 1.13; font-weight: 740; letter-spacing: 0; overflow-wrap: anywhere; }
.ap-heading h1 + p { color: var(--kt-muted); margin-top: 8px; }
.ap .ap-date { display: grid; gap: 1px; flex: none; border-left: 2px solid var(--kt-line); padding-left: 12px; font-size: .79rem; color: var(--kt-muted); }
.ap-date time { color: var(--kt-text); font-weight: 650; white-space: nowrap; }
.ap-provider-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-provider { display: flex; align-items: center; gap: 10px; min-height: 55px; min-width: 0; padding: 8px 12px; color: var(--kt-text); background: var(--kt-panel); border: 1px solid var(--kt-line); border-radius: 6px; font: inherit; text-align: left; cursor: pointer; }
.ap-provider > span:last-child { min-width: 0; }
.ap-provider:hover { border-color: var(--kt-accent); }
.ap-provider[aria-pressed="true"] { border-color: var(--kt-accent); background: var(--kt-tint); box-shadow: inset 0 -2px var(--kt-accent); }
.ap-provider strong, .ap-provider small { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.ap-provider small { color: var(--kt-muted); font-size: .75rem; }
.ap-provider-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 5px; color: #244a89; background: #e5efff; }
[data-ap-provider="claude"] .ap-provider-icon { color: #833f2b; background: #fcebe4; }
[data-ap-provider="codex"] .ap-provider-icon { color: #215343; background: #dcf2e9; }
.ap-filters { display: grid; grid-template-columns: 1.35fr 1fr 1fr .8fr; gap: 12px; margin: 13px 0 17px; }
.ap-filters label, .ap-history-filter { min-width: 0; color: var(--kt-muted); font-size: .78rem; font-weight: 650; }
.ap .kt-field { min-height: 40px; height: auto; padding: 7px 9px; background-color: var(--kt-panel); font-size: .88rem; }
.ap-filters .kt-field, .ap-history-filter .kt-field { margin-top: 4px; }
.ap .kt-field:disabled { opacity: .82; }
.ap .kt-button { font-weight: 650; cursor: pointer; }
.ap-overview { display: grid; grid-template-columns: 1.35fr 1fr 1fr; border-block: 1px solid var(--kt-line); background: var(--kt-panel); }
.ap-overview > div { min-width: 0; padding: 12px 18px; }
.ap-overview > div + div { border-left: 1px solid var(--kt-line); }
.ap-overview dt { font-size: .77rem; font-weight: 650; color: var(--kt-muted); line-height: 1.3; }
.ap-overview dd:not(.ap-sub) { margin: 4px 0 1px; font-size: 25px; line-height: 1.18; font-weight: 730; overflow-wrap: anywhere; }
.ap-overview .ap-low { background: var(--kt-tint); }
.ap-low dd:not(.ap-sub) { color: var(--ap-strong); }
.ap-overview .ap-sub { color: var(--kt-muted); font-size: .76rem; overflow-wrap: anywhere; }
.ap-section { margin-top: 29px; scroll-margin-block-start: 16px; }
.ap-section-head { display: flex; justify-content: space-between; align-items: end; gap: 8px 16px; margin-bottom: 11px; }
.ap-section h2 { line-height: 1.23; font-size: 21px; font-weight: 700; }
.ap-section-head p, .ap-muted { margin-top: 4px; color: var(--kt-muted); font-size: .84rem; }
.ap-find { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin-bottom: 9px; }
.ap-search { position: relative; min-width: 160px; flex: 1 1 210px; }
.ap-search svg { position: absolute; left: 9px; top: 11px; color: var(--kt-muted); pointer-events: none; }
.ap-search .kt-field { padding-left: 35px; }
.ap-sort { min-width: 150px; }
.ap-toggle { display: inline-flex; align-items: center; gap: .45em; color: var(--kt-muted); font-size: .82rem; min-height: 40px; }
.ap-toggle input { accent-color: var(--kt-accent); width: 16px; height: 16px; }
.ap-table-wrap { overflow-x: auto; border: 1px solid var(--kt-line); border-radius: 6px; background: var(--kt-panel); }
.ap-table { width: 100%; border-spacing: 0; font-size: .9rem; table-layout: fixed; }
.ap-table thead tr { background: var(--kt-tint); }
.ap-table :is(th, td) { padding: 7px 12px; text-align: left; overflow-wrap: anywhere; }
.ap-table :is(th, td):last-child { width: 68px; text-align: center; }
.ap-table thead th:first-child { width: 64px; }
.ap-table thead th:nth-child(3), .ap-table thead th:nth-child(4) { width: 23%; }
.ap-table thead th { color: var(--kt-muted); font-size: .78rem; height: 36px; }
.ap-table tbody :is(td, th) { height: 38px; border-top: 1px solid var(--kt-line); }
.ap-table tbody tr:hover { background: color-mix(in srgb, var(--kt-tint) 53%, var(--kt-panel)); }
.ap-rank { color: var(--kt-muted); }
.ap-table tbody th { font-weight: 650; }
.ap-table small { display: inline-block; margin-left: 7px; color: var(--kt-muted); font-size: .7rem; font-weight: 500; }
.ap-table small.ap-flag { color: var(--ap-warn); }
.ap .ap-number { font-weight: 630; }
.ap-market-link { color: var(--kt-text) !important; text-decoration: none; }
.ap-market-link:hover { text-decoration: underline; }
.ap-source { display: inline-grid; place-items: center; width: 30px; height: 29px; vertical-align: middle; border-radius: 4px; }
.ap-source:hover { background: var(--kt-tint); }
.ap-source svg { width: 16px; height: 16px; }
.ap-table .ap-empty { text-align: left; padding: 14px 12px; color: var(--kt-muted); }
.ap[data-listed="true"] .ap-fx-cell, .ap[data-listed="true"] #ap-fx-column { display: none; }
.ap[data-listed="true"] .ap-table thead th:nth-child(3) { width: 44%; }
.ap-table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--kt-muted); font-size: .81rem; margin-top: 7px; }
.ap-history-filter { min-width: min(240px, 100%); }
.ap-chart { border-block: 1px solid var(--kt-line); background: var(--kt-panel); }
.ap-chart svg { display: block; width: min(100%, 820px); height: auto; margin-inline: auto; }
.ap-chart text { stroke: none; fill: var(--kt-muted); font-size: 12px; }
.ap-gridline { stroke: var(--kt-line); stroke-width: 1; }
.ap-graphline { stroke: var(--kt-accent); stroke-width: 2; stroke-dasharray: 5 4; }
.ap-dot { fill: var(--kt-accent); stroke: var(--kt-panel); stroke-width: 1.5; }
.ap-events { list-style: none; margin: 0; padding: 0; }
.ap-events li { min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; border-bottom: 1px solid var(--kt-line); padding: 4px 0; font-size: .83rem; overflow-wrap: anywhere; }
.ap-events time { min-width: 104px; color: var(--kt-muted); }
.ap-event-kind { color: var(--kt-muted); }
.ap-events .ap-source { margin-left: auto; }
.ap-delta { color: var(--ap-strong); font-weight: 650; }
.ap-plan-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ap-plan-index section { min-width: 0; border-top: 2px solid var(--kt-accent); }
.ap-plan-index h3 { font-size: .98rem; padding: 5px 0; }
.ap-plan-index ul { list-style: none; margin: 0; padding: 0; }
.ap-plan-index li { display: flex; justify-content: space-between; gap: 6px 10px; align-items: baseline; border-top: 1px solid var(--kt-line); padding: 6px 0; font-size: .85rem; }
.ap-plan-index li > span:last-child { text-align: right; flex: none; }
.ap-plan-index li a { text-decoration: none; font-weight: 650; }
.ap-plan-index li small { font-size: .72rem; font-weight: 450; }
.ap-method { padding-block-start: 13px; border-top: 1px solid var(--kt-line); color: var(--kt-muted); font-size: .85rem; }
.ap-method h2 { color: var(--kt-text); margin-bottom: 6px; }
.ap-method p + p { margin-top: 4px; }
.ap-method ul { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; }

@media (max-width: 720px) {
  .kt-ai-prices .kt-shell { width: min(100% - 28px, 1080px); }
  .ap-heading { align-items: start; flex-wrap: wrap; margin-bottom: 15px; }
  .ap-heading h1 { font-size: 28px; }
  .ap .ap-date { display: flex; gap: 5px; padding-left: 8px; }
  .ap-filters { grid-template-columns: 1.2fr 1fr; gap: 7px 10px; }
  .ap-overview > div { padding-inline: 9px; }
  .ap-overview dd:not(.ap-sub) { font-size: 21px; }
  .ap-table :is(th, td) { padding-inline: 7px; font-size: .81rem; }
  .ap-table thead th:first-child { width: 42px; }
  .ap-table :is(th, td):last-child { width: 44px; }
  .ap-table thead th:nth-child(3), .ap-table thead th:nth-child(4) { width: 23%; }
  .ap-table small { margin-left: 0; display: block; }
  .ap-plan-index { gap: 10px; }
}
@media (max-width: 500px) {
  .ap-provider { padding: 7px; gap: 6px; font-size: .88rem; }
  .ap-provider-icon { width: 23px; height: 25px; }
  .ap-provider-icon svg { width: 15px; height: 15px; }
  .ap-section { margin-top: 22px; }
  .ap-section-head { flex-wrap: wrap; align-items: start; }
  .ap-section-head .kt-button { min-height: 34px; padding-block: 4px; }
  .ap-plan-index { grid-template-columns: 1fr; }
  .ap-overview dt { min-height: 2.6em; }
  .ap-overview dd:not(.ap-sub) { font-size: 18px; }
  .ap-table .ap-number { overflow-wrap: normal; }
}
