/* AI Search Budget Calculator — only what the AI Revenue Calculator's calc.css
 * (loaded first) doesn't already give us. Tokens fall back so the file stands
 * on its own. */
.ab-money { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ab-money .rc-field { margin-bottom: 14px; }
.ab-money .rc-help { display: block; margin-top: 5px; }
.ab-money input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ab-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px; margin-top: 4px; border-radius: 12px; background: var(--bg-2, #f5f8fb); font-size: 15px; font-weight: 600; color: var(--ink-2, #2d4663); }
.ab-total b { font-family: var(--display, "Inter", sans-serif); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink, #0a2245); font-variant-numeric: tabular-nums; }

.ab .rc-results { grid-template-columns: minmax(0, 1fr); }
.ab .rc-big #abBig { font-size: clamp(44px, 6vw, 64px); background: linear-gradient(90deg, #fff, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ab .rc-sub { margin-bottom: 14px; }
#abPrint { display: none; }
.ab-range { display: grid; gap: 8px; margin-top: 4px; }
.ab-range .rc-bar { grid-template-columns: 104px 1fr 76px; }

.ab-quarters h3 { font-family: var(--display, "Inter", sans-serif); font-size: 20px; font-weight: 750; letter-spacing: -0.015em; color: var(--ink, #0a2245); }
.ab-q-help { margin: 4px 0 14px; }
.ab-q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ab-q-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 14.5px; }
.ab-q-tag { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-deep, #4338ca); background: var(--accent-soft, #eef0ff); border-radius: 6px; padding: 2px 7px; }
.ab-q-focus { font-weight: 600; color: var(--ink, #0a2245); }
.ab-q-amt { font-variant-numeric: tabular-nums; color: var(--ink, #0a2245); }
.ab-stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-3, #ecf2f8); gap: 2px; }
.ab-seg { display: block; height: 100%; }
.ab-seg-site { background: #4338ca; }
.ab-seg-answers { background: #8b5cf6; }
.ab-seg-mentions { background: #2f74e0; }
.ab-seg-tracking { background: #7a8aa3; }
.ab-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2, #2d4663); }
.ab-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ab-legend .ab-seg { width: 12px; height: 12px; border-radius: 3px; }
.ab-q-split { margin-top: 5px; font-size: 12.5px; color: var(--ink-dim, #566d8a); font-variant-numeric: tabular-nums; }
.ab-planline { margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2, #2d4663); }
.ab-planline:empty { display: none; }

.ab-plan .rc-tiles { margin-top: 14px; }
.ab-plan .rc-tile b { font-size: 21px; }
.ab-table-wrap { overflow-x: auto; margin: 6px 0 4px; border: 1px solid var(--rule, #e1e8f0); border-radius: 12px; }
.ab-table-wrap:focus-visible { outline: 3px solid var(--accent, #5a5ddb); outline-offset: 2px; }
.ab-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ab-table th, .ab-table td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--rule, #e1e8f0); }
.ab-table thead th { font-size: 12px; font-weight: 700; color: var(--ink-dim, #566d8a); background: var(--bg-2, #f5f8fb); }
.ab-table th:first-child, .ab-table td:nth-child(2), .ab-table thead th:nth-child(2) { text-align: left; }
.ab-table tbody th { font-weight: 600; color: var(--ink, #0a2245); }
.ab-table td:last-child, .ab-table tfoot td, .ab-table tfoot th { font-weight: 700; color: var(--ink, #0a2245); }
.ab-table tfoot th, .ab-table tfoot td { border-bottom: 0; background: var(--accent-soft, #eef0ff); }
.ab-table tfoot th { text-align: left; }
.ab-print-head h3 { margin-bottom: 2px; }
.ab-print-brand { display: none; }
.ab-print-meta { font-size: 13.5px; color: var(--ink-dim, #566d8a); }
.ab-print-only { display: none; }

@media (max-width: 520px) {
  .ab-money { grid-template-columns: 1fr; }
  .ab-range .rc-bar { grid-template-columns: 92px 1fr 68px; }
  .ab-plan .rc-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ab-plan .rc-tile { padding: 12px; }
  .ab-plan .rc-tile b { font-size: 17px; }
  /* phone table: no Focus column, short month names (quarters are in the card above and the PDF) */
  .ab-table { font-size: 11.5px; }
  .ab-table th, .ab-table td { padding: 7px 3px; }
  .ab-table-wrap { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .ab-table thead th { font-size: 10.5px; }
  .ab-table th:first-child { padding-left: 12px; }
  .ab-table th:last-child, .ab-table td:last-child { padding-right: 12px; }
  .ab-table td:nth-child(2), .ab-table thead th:nth-child(2) { display: none; }
  .ab-table tfoot th { white-space: nowrap; }
  .ab-m-long { display: none; }
  .ab-m-short { display: inline !important; }
}
.ab-m-short { display: none; }
@media (max-width: 340px) {
  .ab-q-head { grid-template-columns: auto 1fr; }
  .ab-q-amt { grid-column: 1 / -1; }
}

/* ---------- the PDF: "Save my plan as a PDF" copies the plan into #abPrint
 * and prints that alone. A normal Ctrl/Cmd+P still prints the whole page. ---------- */
@media print {
  html.ab-printing body > *:not(#abPrint) { display: none !important; }
  html.ab-printing #abPrint { display: block !important; padding: 0; }
  html.ab-printing #abPrint .ab-plan {
    display: block; margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; color: #0a2245;
  }
  html.ab-printing #abPrint .ab-plan::before { display: none; }
  html.ab-printing .ab-no-print { display: none !important; }
  html.ab-printing .ab-print-brand, html.ab-printing .ab-print-only { display: block; }
  .ab-print-brand { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #4338ca; margin-bottom: 4px; }
  .ab-plan h3 { font-size: 22pt; }
  .ab-plan .rc-tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .ab-plan .rc-tile { padding: 10px; transform: none !important; }
  .ab-plan .rc-tile b { font-size: 15pt; }
  .ab-table-wrap { overflow: visible; border-color: #cdd9e5; }
  .ab-table { font-size: 10pt; }
  .ab-table th, .ab-table td { padding: 5px 7px; }
  .ab-table thead th, .ab-table tfoot th, .ab-table tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ab-plan .rc-fine { font-size: 9pt; }
  @page { size: letter portrait; margin: 0.5in; }
}

