/* The crawler's entry and report share an identity, not the evidence-table layout. */
body[data-crawler-page] {
  --cw-surface: #fff;
  --cw-ink: #252b34;
  --cw-muted: #657180;
  --cw-line: #dfe5e9;
  --cw-accent: #087f8c;
  --cw-soft: #edf8f7;
}
body[data-pc-theme="dark"][data-crawler-page] {
  --cw-surface: #202731;
  --cw-ink: #f2f5f8;
  --cw-muted: #b3bdc9;
  --cw-line: #35404c;
  --cw-accent: #63d5cb;
  --cw-soft: #253a3d;
}
#bostic-app-content .crawler-workspace-card {
  position: relative; isolation: isolate; background: var(--cw-surface);
  color: var(--cw-ink); border: 1px solid var(--cw-line); border-radius: 8px;
  margin: 0; letter-spacing: 0; box-shadow: none;
}
#bostic-app-content .crawler-workspace-card::before { content: none; }
.crawler-workspace-card *, .crawler-workspace-card *::before, .crawler-workspace-card *::after { box-sizing: border-box; min-width: 0; }
.crawler-workspace-card [hidden] { display: none !important; }
.crawler-workspace-art { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: -1; }
.crawler-workspace-art i { position: absolute; right: -16px; top: -12px; font-size: 260px; line-height: 1; opacity: .07; color: var(--cw-accent); transform: rotate(-12deg); animation: crawler-network-hop 15s ease-in-out 5s infinite; }
@keyframes crawler-network-hop {
  0%, 28%, 100% { transform: translate(0, 0) rotate(-12deg); }
  8% { transform: translate(-20px, -14px) rotate(-4deg); }
  14% { transform: translate(-28px, 0) rotate(-16deg); }
  21% { transform: translate(-12px, -7px) rotate(-6deg); }
}
@keyframes crawler-network-tilt { 0%, 24%, 100% { transform: rotate(0); } 8% { transform: rotate(-16deg); } 16% { transform: rotate(12deg); } }
#bostic-app-content .crawler-workspace-card > .card-body { padding: 0; }
.crawler-entry-heading, .crawler-dossier-heading { padding: 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.crawler-dossier-heading { flex-wrap: nowrap; justify-content: space-between; border-bottom: 1px solid var(--cw-line); }
.crawler-dossier-identity { display: flex; gap: 16px; align-items: center; }
#bostic-app-content .crawler-workspace-card :is(.crawler-launch-icon, .crawler-dossier-mark) {
  display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px;
  border: 0; border-radius: 8px; background: var(--cw-soft); color: var(--cw-accent);
}
.crawler-workspace-card :is(.crawler-launch-icon, .crawler-dossier-mark) i { display: block; font-size: 30px; line-height: 1; animation: crawler-network-tilt 15s ease-in-out 5s infinite; }
#bostic-app-content .crawler-workspace-card h2 { color: var(--cw-ink); font-size: 28px; line-height: 1.3; letter-spacing: 0; margin: 5px 0 8px; }
.crawler-workspace-card :is(.crawler-kicker, .crawler-kicker-row) { font-size: 11px; color: var(--cw-muted); letter-spacing: 0; }
#bostic-app-content .crawler-workspace-card :is(.crawler-launch-heading, .crawler-dossier-identity) p { color: var(--cw-muted); font-size: 13px; line-height: 1.7; margin: 0; max-width: 68ch; }
#bostic-app-content .crawler-entry-heading .crawler-launch-heading { width: 100%; gap: 16px; }
#bostic-app-content .crawler-entry-heading .crawler-capability-row { margin: 0; padding: 0; gap: 20px; flex: 1; }
#bostic-app-content .crawler-entry-heading .crawler-capability-row > span { background: transparent; border: 0; padding: 0; color: var(--cw-muted); }
#bostic-app-content .crawler-entry-heading .crawler-capability-row i { color: var(--cw-accent); }
.crawler-entry-new { display: none !important; }
body[data-report-workspace-view="history"] .crawler-entry-new { display: inline-flex !important; }
.crawler-entry-setup { border-top: 1px solid var(--cw-line); padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; scroll-margin-top: 130px; }
.crawler-entry-setup > :is(.bostic-tool-empty-state, .crawler-entry-scope, .crawler-policy-note, .crawler-active-run, .crawler-launch-actions) { grid-column: 1 / -1; }
#bostic-app-content .crawler-entry-setup .crawler-console-heading { margin: 0; align-self: center; }
#bostic-app-content .crawler-entry-setup .crawler-console-state { display: none; }
#bostic-app-content .crawler-entry-setup .crawler-target-card { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.crawler-entry-setup .bostic-tool-project-mark { display: none !important; }
.crawler-entry-setup .bostic-tool-project-card-main { display: block; }
.crawler-entry-scope { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding-top: 18px; border-top: 1px solid var(--cw-line); }
#bostic-app-content .crawler-entry-scope .crawler-mode-picker { margin: 0; }
#bostic-app-content .crawler-entry-scope .crawler-mode-option { padding: 14px; background: var(--cw-surface); border: 1px solid var(--cw-line); border-radius: 6px; }
#bostic-app-content .crawler-entry-scope .crawler-mode-option.is-selected { border-color: var(--cw-accent); background: var(--cw-soft); }
#bostic-app-content .crawler-entry-scope .crawler-scope-controls { margin: 0; gap: 18px; align-items: stretch; }
#bostic-app-content .crawler-entry-scope .bostic-tool-control-card { background: transparent !important; border: 0; padding: 0; margin: 0; box-shadow: none; display: flex; flex-direction: column; gap: 8px; }
.crawler-entry-scope .bostic-tool-control-card select { margin-top: auto; min-height: 44px; }
.crawler-entry-scope :is(.bostic-tool-control-card small, .crawler-mode-option small) { color: var(--cw-muted); font-size: 12px; line-height: 1.6; }
.crawler-entry-setup .crawler-policy-note { margin: 0; }
#bostic-app-content .crawler-entry-setup .crawler-launch-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; border: 0; padding: 0; margin: 0; gap: 10px; }
.crawler-workspace-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 12px; line-height: 1.4; padding: 11px 15px; white-space: normal; }
.crawler-workspace-card .btn i { display: block; flex-shrink: 0; font-size: 20px; line-height: 1; margin: 0 !important; }
.crawler-dossier-target { padding: 26px 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 26px; align-items: center; }
.crawler-dossier-target > div:first-child > :is(span,strong,small) { display: block; overflow-wrap: anywhere; }
.crawler-dossier-target > div:first-child > span, .crawler-dossier-scope span { font-size: 11px; color: var(--cw-muted); line-height: 1.5; }
.crawler-dossier-target > div:first-child > strong { font-size: 21px; line-height: 1.5; color: var(--cw-ink); margin: 5px 0; font-weight: 600; }
.crawler-dossier-target small { color: var(--cw-muted); font-size: 12px; }
.crawler-dossier-scope { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.crawler-dossier-scope > div { display: flex; flex-direction: column; gap: 8px; }
.crawler-dossier-scope i { font-size: 24px; line-height: 1; color: var(--cw-accent); }
.crawler-dossier-scope strong { font-size: 13px; line-height: 1.5; color: var(--cw-ink); font-weight: 550; overflow-wrap: anywhere; }
#bostic-app-content .crawler-dossier-live { display: flex; align-items: center; gap: 20px; margin: 0 28px; padding: 22px; background: var(--cw-soft); border: 1px solid var(--cw-line); border-radius: 6px; }
.crawler-dossier-live > .min-w-0 { flex: 1; }
.crawler-dossier-live .crawler-coverage-icon { position: relative; display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; background: var(--cw-surface); color: var(--cw-accent); border-radius: 50%; }
.crawler-dossier-live .crawler-coverage-icon i { font-size: 26px; }
.crawler-dossier-live[data-state="running"] .crawler-coverage-icon::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--cw-line); border-top-color: var(--cw-accent); border-radius: 50%; animation: crawler-live-rotation 1.6s linear infinite; }
@keyframes crawler-live-rotation { to { transform: rotate(360deg); } }
.crawler-dossier-live .crawler-coverage-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.crawler-dossier-live .crawler-coverage-heading strong { font-size: 16px; line-height: 1.5; color: var(--cw-ink); }
.crawler-dossier-live p { color: var(--cw-muted); font-size: 12px; line-height: 1.75; margin: 7px 0 0; }
.crawler-dossier-live .crawler-coverage-progress { margin-top: 14px; }
.crawler-dossier-live .progress-bar { background: var(--cw-accent); }
.crawler-dossier-live .crawler-coverage-progress small { display: block; margin-top: 8px; font-size: 12px; color: var(--cw-ink); }
.crawler-dossier-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 24px 28px; margin: 0; }
.crawler-dossier-facts dt { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--cw-muted); font-weight: 500; }
.crawler-dossier-facts dt i { font-size: 18px; }
.crawler-dossier-facts dd { margin: 8px 0 0; color: var(--cw-ink); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.crawler-dossier-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 20px 28px; border-top: 1px solid var(--cw-line); }
.crawler-dossier-actions > small { flex-basis: 100%; color: var(--cw-muted); font-size: 11px; line-height: 1.6; }
.crawler-dossier-actions [data-crawler-start-again] { margin-left: auto; }
.crawler-workspace-navigation { border-top: 1px solid var(--cw-line); }
.crawler-workspace-navigation:empty, .crawler-dossier-lifecycle:empty { display: none; }
#bostic-app-content .crawler-workspace-card .report-workspace-embedded { border: 0; border-radius: 0 0 8px 8px; box-shadow: none; background: transparent; margin: 0; --rw-surface: var(--cw-surface); --rw-ink: var(--cw-ink); --rw-muted: var(--cw-muted); --rw-border: var(--cw-line); }
.crawler-workspace-card .rw-header, .crawler-workspace-card .rw-facts { padding: 18px 28px; }
.crawler-workspace-card .rw-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; width: 100%; }
#bostic-app-content .crawler-dossier-lifecycle .bostic-job-status-hero { background: transparent; border: 0; border-top: 1px solid var(--cw-line); border-radius: 0; box-shadow: none; margin: 0; }
.crawler-dossier-lifecycle :is(.bostic-job-status-visual, .bostic-job-status-copy, .bostic-job-status-hero.is-terminal) { display: none; }
.crawler-dossier-lifecycle .bostic-job-status-grid { display: block; }
.crawler-dossier-lifecycle .card-body { padding: 20px 28px; }
.crawler-workspace-card :is(a,button,input,select):focus-visible { outline: 2px solid #ffa11d; outline-offset: 3px; }
#crawler-pages-title { scroll-margin-top: 140px; }
body[data-report-workspace-view="history"] [data-crawler-latest-panel] { display: none; }
/* History becomes labelled records on narrow screens; URLs never widen a column. */
body[data-crawler-page="index"] .crawler-history-table { min-width: 0; width: 100%; table-layout: fixed; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(1) { width: 19%; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(2) { width: 20%; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(3) { width: 14%; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(4) { width: 12%; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(5) { width: 21%; }
body[data-crawler-page="index"] .crawler-history-table th:nth-child(6) { width: 14%; }
body[data-crawler-page="index"] .crawler-history-table :is(th,td) { padding: 18px 12px; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
body[data-crawler-page="index"] .crawler-table-target :is(strong,small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
body[data-crawler-page="index"] .crawler-table-outcome { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
body[data-crawler-page="index"] .crawler-table-outcome span { white-space: normal; font-size: 10px; }
body[data-crawler-page="index"] .crawler-table-progress .progress-bar { height: 100%; background: var(--cw-accent); }
.crawler-table-scope { display: grid; gap: 6px; font-size: 12px; }
.crawler-table-scope small { color: var(--cw-muted); }
.crawler-table-date .bostic-report-time { font-size: 12px; }
.crawler-table-duration { display: block; margin-top: 8px; font-size: 11px; color: var(--cw-muted); }
body[data-crawler-page="index"] .crawler-table-actions { display: flex; flex-wrap: nowrap; gap: 5px; justify-content: flex-end; }
body[data-crawler-page="index"] .crawler-table-icon-action { width: 36px; height: 36px; min-height: 36px; flex: 0 0 36px; }
.crawler-cell-label { display: none; }
@media (max-width: 1199.98px) {
  .crawler-entry-scope { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .crawler-dossier-target { grid-template-columns: minmax(0, 1fr); }
  .crawler-dossier-scope { border-top: 1px solid var(--cw-line); padding-top: 18px; }
  body[data-crawler-page="index"] .crawler-history-table :is(tbody,tr,td) { display: block; width: auto; }
  body[data-crawler-page="index"] .crawler-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body[data-crawler-page="index"] .crawler-history-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--cw-line); padding: 10px 0; }
  body[data-crawler-page="index"] .crawler-history-table tbody td { padding: 10px 12px; border: 0; min-width: 0; }
  .crawler-cell-label { display: block; font-size: 10px; color: var(--cw-muted); margin-bottom: 8px; }
  body[data-crawler-page="index"] .crawler-table-actions { justify-content: flex-start; flex-wrap: wrap; }
  body[data-crawler-page="index"] .crawler-table-icon-action { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
}
@media (max-width: 767.98px) {
  .crawler-entry-heading, .crawler-dossier-heading, .crawler-dossier-target, .crawler-dossier-facts, .crawler-dossier-actions, .crawler-entry-setup { padding: 20px; }
  .crawler-dossier-heading { flex-wrap: wrap; }
  .crawler-dossier-identity { align-items: flex-start; gap: 12px; }
  #bostic-app-content .crawler-workspace-card h2 { font-size: 23px; }
  #bostic-app-content .crawler-workspace-card :is(.crawler-launch-icon, .crawler-dossier-mark) { width: 44px; height: 44px; flex-basis: 44px; }
  .crawler-entry-setup { grid-template-columns: minmax(0, 1fr); }
  #bostic-app-content .crawler-entry-scope .crawler-mode-picker { grid-template-columns: minmax(0, 1fr); }
  #bostic-app-content .crawler-entry-heading .crawler-capability-row { gap: 10px; }
  .crawler-entry-new { width: 100%; }
  .crawler-dossier-scope { gap: 12px; }
  .crawler-dossier-facts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #bostic-app-content .crawler-dossier-live { margin: 0 20px; padding: 18px; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
  .crawler-dossier-live > .min-w-0 { flex-basis: 100%; }
  .crawler-dossier-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crawler-dossier-actions > small { grid-column: 1 / -1; }
  .crawler-dossier-actions [data-crawler-start-again] { margin: 0; }
  .crawler-workspace-card .rw-header, .crawler-workspace-card .rw-facts { padding: 16px 20px; }
  .crawler-workspace-card .rw-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crawler-workspace-card .rw-nav .rw-action:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .crawler-workspace-art i, .crawler-workspace-card :is(.crawler-launch-icon, .crawler-dossier-mark) i,
  .crawler-dossier-live[data-state="running"] .crawler-coverage-icon::after { animation: none; }
}
