/* AI Price Tracker v1.2.0 — every rule is scoped to #aipt-root so the theme is not affected. */
#aipt-root {
  --aipt-bg: #0b1020;
  --aipt-card: #141a2e;
  --aipt-line: #26304d;
  --aipt-text: #e8ecf5;
  --aipt-muted: #a7b0c4;
  --aipt-accent: #3b82f6;
  --aipt-accent-text: #9cc2ff;
  --aipt-in: #7aa7ff;
  --aipt-out: #f2a65a;
  background: var(--aipt-bg);
  color: var(--aipt-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  border-radius: 20px;
  padding: clamp(18px, 4vw, 40px);
  box-sizing: border-box;
  max-width: 1180px;
  margin: 0 auto;
}
#aipt-root *, #aipt-root *::before, #aipt-root *::after { box-sizing: border-box; }
#aipt-root[aria-busy="true"]::before { content: "Loading prices…"; color: var(--aipt-muted); }
#aipt-root h2, #aipt-root h3, #aipt-root h4, #aipt-root p, #aipt-root ul { margin: 0; }
#aipt-root ul { padding: 0; list-style: none; }
#aipt-root a { color: var(--aipt-accent-text); text-decoration: underline; text-underline-offset: 2px; }
#aipt-root a:hover { color: #cfe0ff; }
#aipt-root a:focus-visible, #aipt-root button:focus-visible, #aipt-root input:focus-visible,
#aipt-root select:focus-visible, #aipt-root summary:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
/* neutralise the theme's own table styling inside the tracker */
#aipt-root table, #aipt-root th, #aipt-root td, #aipt-root tr { border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }
#aipt-root table { margin: 0; border: 0; }
#aipt-root .aipt-rates tr, #aipt-root .aipt-rates th, #aipt-root .aipt-rates td { background: transparent; }
#aipt-root .aipt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#aipt-root .aipt-muted { color: var(--aipt-muted); }
#aipt-root .aipt-small { font-size: 14px; }
#aipt-root .aipt-strong { font-weight: 700; }
#aipt-root > section { margin-top: 40px; }
#aipt-root > section:first-child { margin-top: 0; }
#aipt-root h3 { font-size: 22px; line-height: 1.3; font-weight: 700; color: #fff; }

/* hero */
#aipt-root .aipt-hero { display: flex; flex-direction: column; gap: 14px; }
#aipt-root .aipt-checked { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #13213f; color: var(--aipt-accent-text); font-size: 14px; font-weight: 600; }
#aipt-root .aipt-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; }
#aipt-root .aipt-title { font-size: clamp(32px, 6vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
#aipt-root .aipt-lead { font-size: 18px; color: #c3cadb; max-width: 720px; }
#aipt-root .aipt-stats { display: flex; flex-wrap: wrap; gap: 10px; }
#aipt-root .aipt-stats li { padding: 8px 14px; border: 1px solid var(--aipt-line); border-radius: 10px; background: var(--aipt-card); font-size: 15px; color: var(--aipt-muted); }
#aipt-root .aipt-stats strong { color: #fff; }

/* cards & events */
#aipt-root .aipt-card { background: var(--aipt-card); border: 1px solid var(--aipt-line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
#aipt-root .aipt-changes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
#aipt-root .aipt-upcoming { background: #1b1a12; border-color: #4a3f17; }
#aipt-root .aipt-upcoming h3 { color: #fde68a; }
#aipt-root .aipt-list { display: flex; flex-direction: column; gap: 14px; }
#aipt-root .aipt-event { display: flex; flex-direction: column; gap: 3px; }
#aipt-root .aipt-event-date { font-size: 13px; font-weight: 600; color: var(--aipt-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#aipt-root .aipt-upcoming .aipt-event-date { color: #fcd34d; }
#aipt-root .aipt-event-title { font-weight: 700; color: #fff; }
#aipt-root .aipt-event-detail { font-size: 14px; color: #c3cadb; }
#aipt-root .aipt-event-src { font-size: 13px; color: var(--aipt-muted); }

/* tags */
#aipt-root .aipt-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
#aipt-root .aipt-tag-change { background: #0f2e25; color: #6ee7b7; }
#aipt-root .aipt-tag-launch { background: #13213f; color: var(--aipt-accent-text); }
#aipt-root .aipt-tag-soon { background: #33290c; color: #fcd34d; }
#aipt-root .aipt-tag-pending { background: #262b3d; color: #c9cfdc; }
#aipt-root .aipt-cat { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--aipt-muted); border: 1px solid var(--aipt-line); border-radius: 6px; padding: 0 6px; }
#aipt-root .aipt-cat-flagship { color: #f6c7a8; border-color: #5b3a26; }
#aipt-root .aipt-cat-budget { color: #a7e8cf; border-color: #1f4a3c; }

/* controls */
#aipt-root .aipt-main { display: flex; flex-direction: column; gap: 18px; }
#aipt-root .aipt-controls { display: flex; flex-direction: column; gap: 16px; }
#aipt-root .aipt-label { font-size: 14px; font-weight: 600; color: var(--aipt-muted); margin-bottom: 8px; }
#aipt-root .aipt-presets { display: flex; flex-wrap: wrap; gap: 8px; }
#aipt-root .aipt-preset { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--aipt-line); background: var(--aipt-card); color: #dfe4ef; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
#aipt-root .aipt-preset[aria-pressed="true"] { background: var(--aipt-accent); border-color: var(--aipt-accent); color: #fff; }
#aipt-root .aipt-assumption { margin-top: 10px; font-size: 14px; color: var(--aipt-muted); max-width: 900px; }
#aipt-root .aipt-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 12px; }
#aipt-root .aipt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#aipt-root .aipt-field label { font-size: 13px; font-weight: 600; color: var(--aipt-muted); }
#aipt-root .aipt-field input, #aipt-root .aipt-field select { min-height: 44px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid #33406a; background: #0e1426; color: var(--aipt-text); font: inherit; font-size: 15px; }

/* table */
#aipt-root .aipt-table-wrap { border: 1px solid var(--aipt-line); border-radius: 16px; overflow: hidden; background: #10162a; }
#aipt-root .aipt-table { width: 100%; border-collapse: collapse; font-size: 15px; }
#aipt-root .aipt-table thead th { background: var(--aipt-card); color: var(--aipt-muted); font-weight: 600; text-align: left; padding: 12px 14px; font-size: 13.5px; }
#aipt-root .aipt-table td, #aipt-root .aipt-table tbody th { padding: 16px 14px; border-top: 1px solid #2e3a5e; vertical-align: top; text-align: left; font-weight: 400; }
#aipt-root .aipt-table tbody tr.aipt-row:nth-child(even of .aipt-row) > * { background: #121933; }
#aipt-root .aipt-table tbody tr.aipt-row:hover > * { background: #172142; }
#aipt-root .aipt-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
#aipt-root .aipt-model-name { display: block; font-weight: 700; color: #fff; font-size: 17px; line-height: 1.3; }
#aipt-root .aipt-ratelabel { display: block; margin-top: 6px; font-size: 12.5px; color: var(--aipt-muted); }
#aipt-root .aipt-unit { display: block; font-size: 11.5px; font-weight: 500; color: #8d96ab; margin-top: 2px; }
#aipt-root .aipt-model .aipt-cat { display: inline-block; }
#aipt-root .aipt-cost { font-weight: 700; color: var(--aipt-accent-text); }
#aipt-root .aipt-tagwrap { display: flex; flex-wrap: wrap; gap: 6px; }
#aipt-root .aipt-verify { font-size: 14px; color: #c3cadb; white-space: nowrap; }
#aipt-root .aipt-vdate { display: block; margin-bottom: 4px; }
#aipt-root .aipt-src { display: inline-block; margin-right: 8px; font-weight: 600; }
#aipt-root .aipt-hero-link { font-size: 15px; }
#aipt-root .aipt-hero-link a { font-weight: 600; }
#aipt-root .aipt-more { margin-left: 0; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #33406a; background: transparent; color: #dfe4ef; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
#aipt-root .aipt-row.is-open > * { background: #172142 !important; border-top: 2px solid var(--aipt-accent); }
#aipt-root .aipt-detail-row td { background: #172142; border-top: 0; padding: 4px 14px 22px; }
#aipt-root .aipt-detail-row + .aipt-row > * { border-top: 2px solid #2e3a5e; }
#aipt-root .aipt-empty { text-align: center; color: var(--aipt-muted); padding: 28px; }
#aipt-root .aipt-count { margin-top: 10px; font-size: 14px; }

/* details */
#aipt-root .aipt-details { display: flex; flex-direction: column; gap: 16px; background: #0c1224; border: 1px solid #33406a; border-radius: 12px; padding: 18px 20px; }
#aipt-root .aipt-scroll { overflow-x: auto; }
#aipt-root .aipt-rates { border-collapse: collapse; font-size: 14px; min-width: 460px; }
#aipt-root .aipt-rates caption { text-align: left; font-weight: 700; color: #fff; padding-bottom: 10px; }
#aipt-root .aipt-rates th, #aipt-root .aipt-rates td { padding: 10px 18px 10px 0; border-top: 1px solid #2e3a5e; text-align: left; color: #c3cadb; }
#aipt-root .aipt-rates thead th { border-top: 0; border-bottom: 1px solid #3a4870; color: var(--aipt-muted); font-weight: 600; font-size: 13px; }
#aipt-root .aipt-facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #c3cadb; border-top: 1px solid #2e3a5e; padding-top: 14px; }
#aipt-root .aipt-facts strong { color: #fff; }

/* history chart */
#aipt-root .aipt-chart-wrap { width: 100%; overflow-x: auto; }
#aipt-root .aipt-chart { width: 100%; min-width: 420px; max-width: 720px; height: auto; display: block; }
#aipt-root .aipt-grid { stroke: #26304d; stroke-width: 1; }
#aipt-root .aipt-axis { fill: #a7b0c4; font-size: 12px; }
#aipt-root .aipt-xlab { fill: #e8ecf5; font-size: 14px; font-weight: 600; }
#aipt-root .aipt-val { fill: #e8ecf5; font-size: 12px; font-weight: 600; }
#aipt-root .aipt-bar-input { fill: var(--aipt-in); }
#aipt-root .aipt-bar-output { fill: var(--aipt-out); }
#aipt-root .aipt-legend { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--aipt-muted); }
#aipt-root .aipt-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
#aipt-root .aipt-key-input { background: var(--aipt-in); }
#aipt-root .aipt-key-output { background: var(--aipt-out); margin-left: 10px; }

/* verdicts */
#aipt-root .aipt-verdicts { display: flex; flex-direction: column; gap: 14px; }
#aipt-root .aipt-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
#aipt-root .aipt-verdict h4 { font-size: 20px; color: #fff; margin: 0; }
#aipt-root .aipt-verdict p { color: #c3cadb; font-size: 15px; }
#aipt-root .aipt-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
#aipt-root .aipt-badge-0 { background: #f4a07f; color: #1a1208; }
#aipt-root .aipt-badge-1 { background: #b4a7ff; color: #15102e; }
#aipt-root .aipt-badge-2 { background: #5fd3ad; color: #06231a; }
#aipt-root .aipt-method { background: var(--aipt-card); border: 1px solid var(--aipt-line); border-radius: 12px; padding: 14px 18px; }
#aipt-root .aipt-method summary { cursor: pointer; font-weight: 600; min-height: 28px; }
#aipt-root .aipt-method ul { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #c3cadb; list-style: disc; padding-left: 20px; }

/* methodology */
#aipt-root .aipt-method-section { border-top: 1px solid var(--aipt-line); padding-top: 26px; display: flex; flex-direction: column; gap: 10px; }
#aipt-root .aipt-method-section ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: #c3cadb; max-width: 860px; }
#aipt-root .aipt-error { color: #fecaca; }

/* wide screens: match the width of the theme's page header */
@media (min-width: 1100px) {
  #aipt-root.aipt-wide { max-width: none; margin: 0; width: min(1740px, calc(100vw - 180px)); position: relative; left: 50%; transform: translateX(-50%); }
}

/* custom workload calculator */
#aipt-root .aipt-preset-custom { border-style: dashed; }
#aipt-root .aipt-preset-custom[aria-pressed="true"] { border-style: solid; }
#aipt-root .aipt-custom { margin-top: 14px; background: var(--aipt-card); border: 1px solid #33406a; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
#aipt-root .aipt-custom[hidden] { display: none; }
#aipt-root .aipt-custom .aipt-label { margin: 0; color: #fff; font-size: 15px; }
#aipt-root .aipt-custom-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
#aipt-root .aipt-custom-grid input, #aipt-root .aipt-custom-grid select { min-height: 44px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid #33406a; background: #0e1426; color: var(--aipt-text); font: inherit; font-size: 15px; }
#aipt-root .aipt-inline { display: flex; gap: 8px; }
#aipt-root .aipt-inline input { flex: 1 1 40%; min-width: 0; }
#aipt-root .aipt-inline select { flex: 1 1 60%; min-width: 0; }
#aipt-root .aipt-hint { font-size: 12.5px; color: #8d96ab; }
#aipt-root .aipt-error-msg { color: #fecaca; font-size: 14px; font-weight: 600; }
#aipt-root .aipt-error-msg:empty, #aipt-root .aipt-summary:empty { display: none; }
#aipt-root .aipt-summary { color: #c3cadb; font-size: 14px; }
#aipt-root .aipt-cost-na { font-weight: 500; font-size: 13px; color: var(--aipt-muted); white-space: normal; }

/* tablet */
@media (max-width: 980px) {
  #aipt-root .aipt-filters { grid-template-columns: 1fr 1fr; }
  #aipt-root .aipt-custom-grid { grid-template-columns: 1fr 1fr; }
}

/* phone: rows become cards */
@media (max-width: 760px) {
  #aipt-root .aipt-filters { grid-template-columns: 1fr; }
  #aipt-root .aipt-custom-grid { grid-template-columns: 1fr; }
  #aipt-root .aipt-table-wrap { border: 0; background: transparent; overflow: visible; }
  #aipt-root .aipt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #aipt-root .aipt-table, #aipt-root .aipt-table tbody { display: block; }
  #aipt-root .aipt-table tr.aipt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; background: var(--aipt-card); border: 1px solid var(--aipt-line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
  #aipt-root .aipt-table tr.aipt-row > * { display: block; padding: 0; border: 0; background: transparent; }
  #aipt-root .aipt-table tr.aipt-row > *::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--aipt-muted); }
  #aipt-root .aipt-table tr.aipt-row > .aipt-model { grid-column: 1 / -1; }
  #aipt-root .aipt-table tr.aipt-row > .aipt-model::before { display: none; }
  #aipt-root .aipt-table tr.aipt-row > .aipt-notes, #aipt-root .aipt-table tr.aipt-row > .aipt-verify { grid-column: 1 / -1; }
  #aipt-root .aipt-num { text-align: left !important; }
  #aipt-root .aipt-verify { white-space: normal; }
  #aipt-root .aipt-detail-row { display: block; margin: -6px 0 12px; }
  #aipt-root .aipt-detail-row td { display: block; border-radius: 0 0 14px 14px; padding: 14px; }
}

/* static snapshot (shown before the script loads, and to crawlers) */
#aipt-root .aipt-snapshot { font-size: 15px; }
#aipt-root .aipt-snapshot h2 { font-size: 26px; color: #fff; margin: 0 0 8px; }
#aipt-root .aipt-snapshot p { color: #c3cadb; margin: 0 0 12px; }
#aipt-root .aipt-snapshot table { width: 100%; border-collapse: collapse; }
#aipt-root .aipt-snapshot th, #aipt-root .aipt-snapshot td { text-align: left; padding: 8px 10px; border-top: 1px solid #2e3a5e; color: #c3cadb; }
#aipt-root .aipt-snapshot th { color: var(--aipt-muted); font-size: 13px; }
#aipt-root .aipt-snapshot a { color: var(--aipt-accent-text); }
@media (max-width: 760px) { #aipt-root .aipt-snapshot { overflow-x: auto; } }

/* "About this tracker" text block that sits below the tool on the page */
.aipt-about { max-width: 860px; margin: 40px auto 0; padding: 0 4px; line-height: 1.65; }
.aipt-about h2 { font-size: 26px; margin: 0 0 12px; }
.aipt-about p { margin: 0 0 14px; }

/* give model names room on desktop */
@media (min-width: 761px) {
  #aipt-root .aipt-table thead th:first-child, #aipt-root .aipt-table tbody th.aipt-model { min-width: 210px; }
}
