.ca-tool { min-width: 0; }
.ca-tool [hidden] { display: none !important; }
.ca-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ca-form-heading, .ca-start-row, .ca-result-toolbar, .ca-downloads, .ca-progress-row, .ca-history-row, .ca-history-actions, .ca-dialog-actions { display: flex; align-items: center; gap: 12px; }
.ca-form-heading, .ca-result-toolbar, .ca-history-row { justify-content: space-between; }
.ca-form-heading h2, .ca-history h2 { margin: 0; font-size: 22px; }
.ca-tool .button { min-height: 40px; padding: 9px 15px; font-size: 14px; gap: 8px; border-radius: 6px; }
.ca-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 2px; margin: 22px 0; border-bottom: 1px solid var(--line); }
.ca-tab-item { display: flex; flex: 0 0 auto; align-items: center; border-bottom: 3px solid transparent; }
.ca-tab-item:has([aria-selected="true"]) { border-color: var(--accent); }
.ca-tab-item button, .ca-view-tabs button { border: 0; background: transparent; padding: 10px 12px; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.ca-tab-item [aria-selected="true"], .ca-view-tabs [aria-selected="true"] { color: var(--accent); font-weight: 700; }
.ca-tab-item button[data-ca-remove] { width: 30px; padding: 8px; }
.ca-page-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.ca-page-fields label { min-width: 0; font-size: 14px; }
.ca-page-fields input, .ca-page-fields select { min-width: 0; width: 100%; font-size: 16px; }
.ca-field-label { display: flex; align-items: center; gap: 7px; }
.ca-help { flex: 0 0 18px; display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--muted); font-size: 14px; cursor: help; }
.ca-scan-notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; margin: 22px 0; background: #eef7f7; border-left: 3px solid var(--accent); font-size: 14px; line-height: 1.6; }
.ca-scan-notice > i { margin-top: 5px; color: var(--accent); }
.ca-scan-notice p { margin: 0; }
.ca-start-row > span { color: var(--muted); font-size: 14px; font-weight: 600; }
.ca-status { margin-top: 22px; padding: 14px 16px; background: #eef7f7; overflow-wrap: anywhere; }
.ca-status.ca-error { color: #a22b39; background: #fff1f2; }
.ca-progress-row { margin-top: 12px; }
.ca-progress-row progress { flex: 1; min-width: 0; height: 10px; accent-color: var(--accent); }
.ca-tool { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ca-tool > * { min-width: 0; max-width: 100%; }
.ca-tool .ca-form, .ca-results { scroll-margin-top: 100px; }
.ca-results, .ca-history { margin-top: 32px; }
.ca-result-toolbar { flex-wrap: wrap; margin-bottom: 16px; }
.ca-view-tabs { display: flex; border-bottom: 1px solid var(--line); }
.ca-view-tabs [aria-selected="true"] { border-bottom: 2px solid var(--accent); }
.ca-table-scroll { width: 100%; max-height: 75vh; overflow: auto; border: 1px solid var(--line); }
.ca-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ca-table th, .ca-table td { padding: 12px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); min-width: 175px; background: var(--surface, white); }
.ca-table thead th { position: sticky; top: 0; z-index: 3; background: #edf5f5; }
.ca-table tr > th:first-child { position: sticky; left: 0; z-index: 2; width: 260px; min-width: 230px; max-width: 300px; }
.ca-table thead th:first-child { z-index: 4; }
.ca-table th a { overflow-wrap: anywhere; }
.ca-table th small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.ca-table .ca-group th { background: #e4eeee; padding-top: 10px; padding-bottom: 10px; font-weight: 700; }
.ca-cell summary { cursor: pointer; font-size: 13px; white-space: nowrap; }
.ca-result-good { color: #24724a; }
.ca-result-missing { color: #a33a45; }
.ca-result-unknown { color: #846014; }
.ca-cell .ca-evidence { min-width: 230px; max-width: 320px; }
.ca-evidence { font-size: 14px; overflow-wrap: anywhere; }
.ca-evidence p { margin: 12px 0; line-height: 1.6; }
.ca-evidence-image { display: block; margin-top: 12px; }
.ca-evidence-image img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.ca-context-label, .ca-report-note { color: var(--muted); font-size: 13px; }
.ca-report-group { margin: 28px 0; }
.ca-report-group h2 { font-size: 22px; }
.ca-report-check { border-bottom: 1px solid var(--line); padding: 14px 0; }
.ca-report-check > summary { cursor: pointer; font-weight: 600; }
.ca-report-check > summary span { margin-left: 14px; color: var(--muted); font-size: 13px; font-weight: 400; }
.ca-report-body { max-width: 920px; padding: 10px 0; }
.ca-report-body h3 { margin: 20px 0 8px; font-size: 16px; }
.ca-report-body > p { font-size: 14px; line-height: 1.7; }
.ca-report-body .ca-evidence-image img { max-height: 720px; width: auto; }
.ca-competitor-example { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--line); }
.ca-history-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ca-history-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.ca-history-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.ca-history-actions { flex: 0 0 auto; gap: 6px; }
.ca-history-actions button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface, white); color: var(--accent); cursor: pointer; }
.ca-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.ca-dialog::backdrop { background: rgb(20 40 45 / 45%); }
.ca-dialog h2 { margin-top: 0; font-size: 23px; }
.ca-dialog p { line-height: 1.6; }
.ca-dialog-actions { justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.ca-tool button:focus-visible, .ca-tool summary:focus-visible, .ca-help:focus-visible { outline: 3px solid #68c4c0; outline-offset: 3px; }
@media (max-width: 767px) {
  body:has(.ca-tool) .ambassador-content { min-width: 0; width: 100%; grid-template-columns: minmax(0, 1fr); }
  body:has(.ca-tool) .ambassador-content > * { min-width: 0; overflow-wrap: anywhere; }
  body:has(.ca-tool) .ambassador-content h2 { font-size: 24px; white-space: normal; overflow-wrap: anywhere; }
  body:has(.ca-tool) .ambassador-button { min-width: 0; max-width: 100%; white-space: normal; font-size: 14px; }
  body:has(.ca-tool) .tool-rating-current { min-width: 0; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
  .ca-page-fields { grid-template-columns: 1fr; gap: 16px; }
  .ca-form-heading { align-items: flex-start; flex-direction: column; }
  .ca-form-heading h2 { font-size: 20px; }
  .ca-table tr > th:first-child { width: 150px; min-width: 145px; max-width: 160px; }
  .ca-table th, .ca-table td { padding: 10px; }
  .ca-tool .ca-table-single { table-layout: fixed; min-width: 0; }
  .ca-table-single th, .ca-table-single td { min-width: 0; overflow-wrap: anywhere; }
  .ca-table-single tr > th:first-child { width: 46%; min-width: 0; max-width: none; }
  .ca-table-single .ca-cell summary { white-space: normal; }
  .ca-table-single .ca-cell .ca-evidence { min-width: 0; max-width: 100%; }
  .ca-history-row { flex-wrap: wrap; gap: 10px; }
  .ca-progress-row { flex-wrap: wrap; }
  .ca-progress-row progress { flex-basis: 100%; }
  .ca-dialog { padding: 20px; }
  .ca-dialog h2 { font-size: 20px; }
}
