/* Ask v2 palette, scoped exclusively to the component. Control boundary uses
   muted (AA 3:1); --af-line stays the original decorative separator token. */
.af {
  --af-bg: #f6f3ec; --af-surface: #fffefb; --af-ink: #1b1d1c; --af-muted: #5a5e5c; --af-line: #e4dfd3;
  --af-accent: #0f6b57; --af-accent-strong: #0b5546; --af-accent-ink: #ffffff; --af-accent-soft: #e4efe8; --af-accent-line: #b9d4c8;
  --af-warn: #fdf0c8; --af-warn-ink: #573a00; --af-warn-line: #d9a93a; --af-focus: #0f6b57;
  --af-radius: 18px; --af-control-line: var(--af-muted);
  color-scheme: light; background: var(--af-bg); color: var(--af-ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
  text-align: start; overflow-wrap: anywhere; min-inline-size: 0;
}
@media (prefers-color-scheme: dark) {
  .af {
    --af-bg: #141513; --af-surface: #1d1f1d; --af-ink: #ecebe6; --af-muted: #a9aca7; --af-line: #303330;
    --af-accent: #5cc6a8; --af-accent-strong: #84d8bf; --af-accent-ink: #0b1f19; --af-accent-soft: #1b322b; --af-accent-line: #2f5a4c;
    --af-warn: #3b3114; --af-warn-ink: #f6e6b5; --af-warn-line: #9a7a25; --af-focus: #84d8bf;
    color-scheme: dark;
  }
}
.af, .af *, .af *::before, .af *::after { box-sizing: border-box; }
.af :where(p, h1, h2, h3, ul) { margin-block: 0; }
.af :where(a) { color: var(--af-accent); text-underline-offset: .2em; }
.af :where(a:hover) { color: var(--af-accent-strong); }
.af :where(:focus-visible) { outline: 3px solid var(--af-focus); outline-offset: 3px; }
.af-table-scroll:focus-visible { outline: 3px solid var(--af-focus); outline-offset: 3px; }
.af :where(bdi), .af-money { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.af[lang="ur"] { line-height: 1.95; }
.af-answer { display: grid; gap: 12px; padding-block: 24px; padding-inline: clamp(16px, 3vw, 28px); border: 1px solid var(--af-line); border-radius: var(--af-radius); background: var(--af-surface); }
.af-eyebrow, .af-source, .af-card-note { color: var(--af-muted); font-size: 15px; }
.af-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; font-weight: 750; text-wrap: balance; }
.af-number { font-size: clamp(32px, 5vw, 52px); font-weight: 750; line-height: 1.18; }
.af-unit { display: inline-block; font-size: 16px; font-weight: 500; }
.af-lede { font-size: 17px; }
.af-source { padding-inline-start: 0; list-style: none; }
.af-status { display: inline-block; padding-block: 5px; padding-inline: 10px; font-size: 15px; font-weight: 650; line-height: 1.5; border-radius: 999px; background: var(--af-accent-soft); color: var(--af-accent); }
.af-status[data-status="historical"], .af-status[data-status="subtotal"], .af-status[data-status="paused"], .af-status[data-status="estimate"], .af-status[data-status="partial"] { background: var(--af-warn); color: var(--af-warn-ink); }
.af-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.af .af-action { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; padding-block: 9px; padding-inline: 14px; border: 1px solid var(--af-control-line); border-radius: 12px; background: var(--af-surface); color: var(--af-accent); font: inherit; font-weight: 650; text-align: start; cursor: pointer; }
.af .af-action:hover { background: var(--af-accent-soft); color: var(--af-accent-strong); }
.af :where(button:disabled, input:disabled, select:disabled, textarea:disabled, [aria-disabled="true"]) { color: var(--af-muted); background: var(--af-bg); border-color: var(--af-control-line); opacity: 1; cursor: not-allowed; }
.af-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 16px; }
.af-card { display: flex; flex-direction: column; align-items: start; gap: 12px; min-inline-size: 0; padding-block: 20px; padding-inline: 20px; border: 1px solid var(--af-line); border-radius: var(--af-radius); background: var(--af-surface); }
.af-card-title { font-size: 20px; line-height: 1.3; }
.af-card-value { font-size: 32px; line-height: 1.2; font-weight: 750; }
.af-card-spec { font-size: 16px; }
.af-card-action { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: auto; }
.af-filters { display: flex; flex-wrap: wrap; gap: 16px; padding-block: 16px; }
.af-filters > label { display: grid; gap: 6px; flex: 1 1 180px; font-size: 16px; }
.af-filters :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { inline-size: 100%; min-inline-size: 0; min-block-size: 44px; padding-block: 9px; padding-inline: 12px; font: inherit; color: var(--af-ink); background: var(--af-surface); border: 1px solid var(--af-control-line); border-radius: 10px; }
.af-empty { display: grid; justify-items: start; gap: 12px; padding-block: 20px; padding-inline: 20px; border: 1px solid var(--af-line); border-radius: var(--af-radius); }
.af-details { margin-block: 16px; border: 1px solid var(--af-line); border-radius: var(--af-radius); background: var(--af-surface); }
.af-details > summary { display: list-item; min-block-size: 44px; padding-block: 14px; padding-inline: 18px; color: var(--af-accent); font-size: 16px; font-weight: 650; cursor: pointer; }
.af-details > summary:hover { color: var(--af-accent-strong); background: var(--af-accent-soft); border-radius: var(--af-radius); }
.af-details-body { display: grid; gap: 16px; padding-block: 12px 20px; padding-inline: 18px; }
.af-table-scroll { max-inline-size: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.af-table-scroll table { inline-size: 100%; min-inline-size: 42rem; border-collapse: collapse; font-size: 16px; }
.af-table-scroll :where(th, td) { padding-block: 12px; padding-inline: 12px; text-align: start; vertical-align: top; border-block-end: 1px solid var(--af-line); }
.af-table-scroll th[scope="row"] { min-inline-size: 8rem; }
.af-table-scroll .af-money { white-space: nowrap; }
.af-table-scroll caption { padding-block: 8px; text-align: start; color: var(--af-muted); }
.af-cta { margin-block: 20px; }
.af-answer .af-cta { margin-block: 0; background: transparent; }
@media (max-width: 720px) {
  .af-cards { grid-template-columns: 1fr; }
  .af-card-value { font-size: 32px; }
}
