:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f4f6f8;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: #0b5cad; }

.shell { max-width: 1120px; margin: 0 auto; padding: 48px 24px 80px; }
.hero { margin-bottom: 28px; }
.eyebrow, .report-kicker, .result-label { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800; color: #52606d; margin: 0 0 8px; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1; margin: 0; }
h2, h3, h4 { color: #17202a; }
.lede { font-size: 1.12rem; color: #52606d; max-width: 780px; }
.panel { background: white; border: 1px solid #d9e0e7; border-radius: 14px; padding: 24px; margin-top: 18px; box-shadow: 0 6px 24px rgba(19, 33, 48, .05); }
.panel h2 { margin-top: 0; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 8px; }
input { width: 100%; border: 1px solid #aab7c4; border-radius: 8px; padding: 13px 14px; }
input:focus, button:focus, a:focus, summary:focus { outline: 3px solid #82b7f3; outline-offset: 2px; }
button { border: 0; border-radius: 8px; padding: 13px 20px; background: #174ea6; color: white; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.hint { color: #667582; font-size: .92rem; }
.error { color: #a61b1b; font-weight: 650; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.badge { background: #e9eef5; border-radius: 999px; padding: 6px 10px; font-size: .85rem; font-weight: 800; text-transform: capitalize; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.button-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.secondary-button { background: #eef3f8; color: #174ea6; border: 1px solid #cbd7e3; }
.mode-copy { color: #667582; font-size: .9rem; }

.report-metadata { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 0; }
.report-metadata div { border-top: 1px solid #e1e6eb; padding-top: 10px; }
.report-metadata dt { color: #667582; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.report-metadata dd { margin: 4px 0 0; font-weight: 650; }

.assessment-summary { font-size: 1.08rem; background: #f8fafb; border-left: 4px solid #174ea6; padding: 12px 16px; margin: 12px 0 20px; }
.assessment-summary p { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 24px; }
.card { border: 1px solid #d9e0e7; border-radius: 10px; padding: 16px; }
.card strong { display: block; font-size: 1.8rem; }
.card span { color: #667582; }
.methodology-note { border: 1px solid #d8dee6; background: #fbfcfd; border-radius: 10px; padding: 14px 16px; color: #465663; margin: 0 0 32px; }
.result-heading { border-top: 2px solid #17202a; padding-top: 22px; margin-top: 30px; }
.result-heading h3 { font-size: 1.55rem; margin: 0 0 12px; }
.confirmed-label { color: #8a2d2d; }
.review-label { color: #775b00; }

.finding { border: 1px solid #dfe5ea; border-radius: 12px; padding: 18px; margin: 14px 0; break-inside: avoid; }
.finding.confirmed { border-left: 5px solid #b83a3a; }
.finding.review { border-left: 5px solid #b08600; }
.finding h4 { font-size: 1.2rem; margin: 8px 0 6px; }
.finding-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.meta { color: #667582; font-size: .9rem; }
.wcag-chip { display: inline-block; background: #eaf1f8; color: #234b70; border-radius: 999px; padding: 5px 9px; margin: 0 5px 5px 0; font-size: .78rem; font-weight: 750; }
.impact { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 800; text-transform: capitalize; background: #eef1f4; }
.impact-critical, .impact-serious { background: #fae6e6; color: #822727; }
.impact-moderate { background: #fff1d6; color: #725200; }
.impact-minor { background: #eaf2fb; color: #27547a; }
.remediation { background: #f5f8fa; border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.remediation p { margin: 5px 0 0; }
.occurrences { margin-top: 14px; }
.occurrences summary { cursor: pointer; font-weight: 750; }
code { background: #f1f4f7; padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.node { background: #fbfcfd; border: 1px solid #e1e6eb; border-radius: 8px; margin-top: 10px; padding: 12px; }
.node > div, .node > p { margin: 5px 0; }
.occurrence-number { color: #667582; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.empty-state { background: #f7faf8; border: 1px solid #dce8df; border-radius: 10px; padding: 16px; color: #375b42; }
.recent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; border-top: 1px solid #e5e9ee; padding: 12px 0; }
.recent-row:first-child { border-top: 0; }

@media (max-width: 760px) {
  .input-row, .cards, .recent-row, .report-metadata { grid-template-columns: 1fr; }
  .section-heading, .finding-topline { align-items: flex-start; flex-direction: column; }
  .button-group { justify-content: flex-start; }
}

@media print {
  :root { background: white; font-size: 10pt; }
  body { background: white; }
  .shell { max-width: none; padding: 0; }
  .no-print, .button-group { display: none !important; }
  .panel { border: 0; box-shadow: none; padding: 0; margin: 0 0 20px; }
  #run-panel, #results-panel { display: block !important; }
  .badge { border: 1px solid #bbb; background: white; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .finding { break-inside: avoid; }
  .occurrences { display: block; }
  .occurrences > * { display: block; }
  a { color: inherit; text-decoration: none; }
}

@media print {
  details:not([open]) > :not(summary) { display: block !important; }
}

.delete-audit { padding: 0.45rem 0.75rem; font-size: 0.85rem; }

/* v0.3.2 complete evidence controls */
.extra-occurrence { display: none; }
.occurrences.show-all-occurrences .extra-occurrence { display: block; }
.occurrence-toggle { margin-top: 12px; padding: 0.55rem 0.8rem; font-size: 0.86rem; }
.occurrence-print-note { margin-top: 10px; }
.measurement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed #d8dee6; }
.measurement-grid div { min-width: 0; }
.measurement-grid dt { color: #667582; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.measurement-grid dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .measurement-grid { grid-template-columns: 1fr; }
}

@media print {
  .extra-occurrence { display: block !important; }
  .occurrence-print-note, .occurrence-toggle { display: none !important; }
  .measurement-grid { grid-template-columns: repeat(2, 1fr); }
}

/* v0.5 bounded site crawling */
.scan-mode-fieldset { border: 0; padding: 0; margin: 18px 0 10px; }
.scan-mode-fieldset legend { font-weight: 800; margin-bottom: 8px; }
.radio-option { display: inline-flex; align-items: center; gap: 7px; margin-right: 18px; font-weight: 650; }
.crawl-options { margin-top: 16px; padding: 16px; background: #f8fafb; border: 1px solid #dce3e8; border-radius: 10px; }
.compact-heading { margin-bottom: 12px; }
.compact-heading h3 { margin: 0 0 4px; }
.crawl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 12px; margin: 12px 0; }
.crawl-grid label { display: grid; gap: 6px; font-weight: 700; }
.crawl-grid input { width: 100%; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; }
.check-row label { display: inline-flex; align-items: center; gap: 7px; }
#exclude-paths { width: 100%; resize: vertical; min-height: 110px; font: inherit; margin-top: 6px; padding: 10px; border: 1px solid #cfd8df; border-radius: 8px; }
.hint-inline { font-size: .82rem; color: #667582; font-weight: 500; }
.scope-preview { margin-top: 12px; border-left: 4px solid #174ea6; background: #eef5fb; padding: 10px 12px; font-size: .92rem; }
.site-coverage { margin: 26px 0; }
.page-inventory { border: 1px solid #dfe5ea; border-radius: 10px; overflow: hidden; }
.page-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 90px 100px 100px auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid #e5e9ee; font-size: .9rem; }
.page-row:first-child { border-top: 0; }
.page-row.page-header { background: #f6f8fa; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; color: #5e6c76; }
.page-url { min-width: 0; }
.page-url strong, .page-url code { display: block; }
.page-url code { margin-top: 3px; }
.page-shot { white-space: nowrap; }
.occurrence-page { margin: 4px 0; padding: 5px 7px; background: #f2f6f8; border-radius: 5px; font-size: .84rem; }
.selector-patterns { background: #f8fafb; border: 1px solid #dfe5ea; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.selector-patterns ul { margin: 6px 0 0; padding-left: 20px; }

@media (max-width: 760px) {
  .crawl-grid { grid-template-columns: 1fr; }
  .page-row { grid-template-columns: 1fr; }
  .page-row.page-header { display: none; }
}

@media print {
  .crawl-options, .site-coverage .page-shot { display: none !important; }
}

/* v0.6 retest and comparison */
.history-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px 0 18px; border-bottom: 1px solid #e1e6eb; margin-bottom: 18px; }
.history-controls label { display: grid; gap: 5px; min-width: 280px; font-weight: 700; }
.history-controls select { min-height: 40px; padding: 7px 9px; border: 1px solid #cfd8df; border-radius: 7px; background: white; font: inherit; }
.comparison-cards { grid-template-columns: repeat(3, 1fr); }
.comparison-runs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comparison-run { border: 1px solid #dfe5ea; border-radius: 10px; padding: 14px; }
.comparison-run h4 { margin: 0 0 8px; }
.comparison-run dl { margin: 0; display: grid; gap: 7px; }
.comparison-run dt { color: #667582; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.comparison-run dd { margin: 1px 0 0; font-weight: 650; }
.comparison-coverage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.comparison-page-list { border: 1px solid #dfe5ea; border-radius: 8px; padding: 12px; }
.comparison-page-list h4 { margin: 0 0 7px; }
.comparison-page-list ul { margin: 0; padding-left: 20px; }
.change-card { border: 1px solid #dfe5ea; border-radius: 10px; padding: 15px; margin: 12px 0; }
.change-card h4 { margin: 6px 0; }
.change-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.change-status { border-radius: 999px; padding: 5px 9px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.change-status-fixed { background: #e5f3e8; color: #27613a; }
.change-status-new, .change-status-regressed { background: #fae6e6; color: #822727; }
.change-status-improved { background: #eaf2fb; color: #27547a; }
.change-status-unchanged { background: #eef1f4; color: #58666c; }
.change-status-coverage-changed { background: #fff1d6; color: #725200; }
.change-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.change-metrics div { background: #f7f9fa; border-radius: 7px; padding: 8px; }
.change-metrics span { display: block; color: #667582; font-size: .75rem; }
.change-metrics strong { display: block; margin-top: 2px; font-size: 1.05rem; }
.pattern-deltas { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 9px; }
.pattern-deltas th, .pattern-deltas td { border-bottom: 1px solid #e1e6eb; padding: 6px 5px; text-align: left; vertical-align: top; }
.pattern-deltas th { color: #667582; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.coverage-note { border-left: 4px solid #b08600; background: #fff9e9; padding: 9px 11px; margin: 9px 0; }
.recent-compare { white-space: nowrap; }
@media (max-width: 760px) {
  .comparison-runs, .comparison-coverage, .change-metrics { grid-template-columns: 1fr; }
  .history-controls label { min-width: 100%; }
  .change-topline { flex-direction: column; }
}
.recent-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.comparison-page-changes { grid-column: 1 / -1; overflow-x: auto; }

/* v0.6.4 UI correctness: hidden state must always win over component display rules. */
[hidden], .activity-indicator[hidden] { display: none !important; }

/* v0.6.1 live assessment experience */
.hero-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.activity-indicator { display: inline-flex; align-items: center; gap: 8px; background: #eef5fb; color: #174ea6; border: 1px solid #cbdced; padding: 9px 12px; white-space: nowrap; }
.activity-indicator:hover { background: #e4eff9; }
.activity-dot { width: 10px; height: 10px; border-radius: 999px; background: #1f7a45; box-shadow: 0 0 0 0 rgba(31,122,69,.35); animation: activityPulse 1.8s infinite; }
@keyframes activityPulse { 0% { box-shadow: 0 0 0 0 rgba(31,122,69,.35); } 70% { box-shadow: 0 0 0 8px rgba(31,122,69,0); } 100% { box-shadow: 0 0 0 0 rgba(31,122,69,0); } }
.badge.status-queued { background: #fff1d6; color: #725200; }
.badge.status-running { background: #eaf2fb; color: #27547a; }
.badge.status-completed { background: #e5f3e8; color: #27613a; }
.badge.status-failed { background: #fae6e6; color: #822727; }
.badge.status-checking { background: #eef1f4; color: #52606d; }
.live-progress { margin-top: 16px; }
.progress-track { height: 10px; background: #e9eef3; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: #174ea6; border-radius: inherit; transition: width .35s ease; }
.progress-bar.indeterminate { width: 34%; animation: indeterminateProgress 1.2s ease-in-out infinite alternate; }
@keyframes indeterminateProgress { from { transform: translateX(-10%); } to { transform: translateX(210%); } }
.progress-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.progress-metric { border: 1px solid #dfe5ea; border-radius: 8px; padding: 9px 10px; background: #fbfcfd; }
.progress-metric strong { display: block; font-size: 1.05rem; }
.progress-metric span { display: block; color: #667582; font-size: .74rem; margin-top: 2px; }
.current-page { margin: 10px 0 0; padding: 9px 10px; background: #f5f8fa; border-radius: 7px; color: #465663; }
.recent-status { display: inline-flex; align-items: center; gap: 6px; }
.recent-status-dot { width: 8px; height: 8px; border-radius: 999px; background: #8a98a5; }
.recent-status-dot.running { background: #174ea6; }
.recent-status-dot.queued { background: #b08600; }
.recent-progress { color: #667582; font-size: .84rem; }
.form-error-card { border: 1px solid #e5b7b7; background: #fff6f6; border-radius: 9px; padding: 12px 14px; margin-top: 12px; }
@media (max-width: 760px) {
  .hero-topline { flex-direction: column; }
  .progress-metrics { grid-template-columns: repeat(2, 1fr); }
  .activity-indicator { white-space: normal; }
}
@media print {
  .activity-indicator, .live-progress { display: none !important; }
}
.recent-progress { max-width: 320px; overflow-wrap: anywhere; }
@media (min-width: 761px) {
  .recent-row { grid-template-columns: minmax(0, 1fr) minmax(135px, auto) minmax(180px, 320px) auto; }
}
@media (prefers-reduced-motion: reduce) {
  .activity-dot, .progress-bar.indeterminate { animation: none; }
  .progress-bar { transition: none; }
}

/* v0.7 contractor-facing assessment history and baselines */
.series-history { margin: 18px 0 28px; padding: 18px; border: 1px solid #dce3e8; border-radius: 12px; background: #fbfcfd; }
.series-heading-row { align-items: center; }
.series-heading-row h3 { margin: 2px 0 4px; font-size: 1.35rem; }
.baseline-badge { display: inline-flex; align-items: center; background: #e5f3e8; color: #27613a; border: 1px solid #c9e4d0; border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 800; }
.trend-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; margin: 14px 0 16px; }
.trend-chart-card, .custom-compare-card { border: 1px solid #dfe5ea; border-radius: 10px; padding: 14px; background: white; }
.trend-chart-card h4, .custom-compare-card h4 { margin: 0 0 10px; }
.trend-chart { width: 100%; min-height: 220px; display: block; background: #fff; }
.trend-axis { stroke: #b9c4cc; stroke-width: 1; }
.trend-gridline { stroke: #e7ecef; stroke-width: 1; }
.trend-line { fill: none; stroke: #174ea6; stroke-width: 3; }
.trend-point { fill: #174ea6; stroke: white; stroke-width: 2; }
.trend-point.baseline { fill: #1f7a45; }
.trend-label { fill: #667582; font-size: 11px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.trend-value { fill: #17202a; font-size: 11px; font-weight: 750; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.custom-compare-card label { display: grid; gap: 5px; margin: 10px 0; font-weight: 700; }
.custom-compare-card select { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #cfd8df; border-radius: 7px; background: white; font: inherit; }
.custom-compare-card button { width: 100%; margin-top: 4px; }
.history-table-wrap { overflow-x: auto; border: 1px solid #dfe5ea; border-radius: 10px; background: white; }
.history-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: .88rem; }
.history-table th, .history-table td { border-bottom: 1px solid #e6ebee; padding: 9px 10px; text-align: left; vertical-align: top; }
.history-table th { color: #667582; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; background: #f7f9fa; }
.history-table tr:last-child td { border-bottom: 0; }
.history-date strong { display: block; }
.history-date span { color: #667582; font-size: .78rem; }
.history-baseline-marker { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: #e5f3e8; color: #27613a; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.history-comparable { color: #465663; font-size: .82rem; line-height: 1.45; }
.history-actions { display: flex; gap: 6px; justify-content: flex-end; }
.history-actions button { padding: 7px 9px; font-size: .78rem; white-space: nowrap; }
.finding-pattern-trends { margin-top: 18px; }
.finding-pattern-trends h4 { margin-bottom: 8px; }
.pattern-trend-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid #dfe5ea; border-radius: 10px; overflow: hidden; font-size: .85rem; }
.pattern-trend-table th, .pattern-trend-table td { border-bottom: 1px solid #e6ebee; padding: 8px 9px; text-align: left; vertical-align: top; }
.pattern-trend-table th { background: #f7f9fa; color: #667582; text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; }
.pattern-trend-table tr:last-child td { border-bottom: 0; }
.pattern-signature { color: #667582; font-size: .74rem; }

@media (max-width: 760px) {
  .trend-layout { grid-template-columns: 1fr; }
  .series-heading-row { align-items: flex-start; }
}

/* v0.7.1 GeoFirefly Brand Integration */
:root {
  --gf-navy-950: #061522;
  --gf-navy-900: #081b2c;
  --gf-navy-850: #0b2435;
  --gf-navy-800: #0e3040;
  --gf-teal-500: #67c9c5;
  --gf-teal-200: #bce9e6;
  --gf-gold-500: #f6ad2f;
  --gf-gold-400: #ffc252;
  --gf-gold-100: #fff1d3;
  --gf-ink: #142231;
  --gf-text: #31465a;
  --gf-muted: #66798a;
  --gf-border: #d9e2e8;
  --gf-border-strong: #c7d4dc;
  --gf-surface: #ffffff;
  --gf-surface-soft: #f7fafb;
  --gf-page: #f2f6f7;
  --gf-info: #1b5f93;
  --gf-success: #26764d;
  --gf-warning: #8b6400;
  --gf-danger: #9a3030;
  --gf-shadow: 0 18px 50px rgba(8, 27, 44, .10);
  --gf-shadow-soft: 0 8px 28px rgba(8, 27, 44, .07);
  color: var(--gf-ink);
  background: var(--gf-page);
}

html { scroll-behavior: smooth; }
body { background: var(--gf-page); color: var(--gf-ink); }
a { color: #165f91; }
a:hover { color: #0f476d; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: var(--gf-navy-900);
  font-weight: 800;
  box-shadow: var(--gf-shadow-soft);
}
.skip-link:focus { transform: translateY(0); }

.shell { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(100deg, var(--gf-navy-950), #0a2638 58%, #0b3140);
  border-bottom: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 8px 25px rgba(0,0,0,.12);
}
.topbar-inner {
  max-width: 1180px;
  min-height: 76px;
  margin: 0 auto;
  padding: 10px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; }
.brand-mark-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,.16);
  overflow: hidden;
}
.brand-mark { width: 43px; height: 39px; object-fit: contain; }
.brand-wordmark { width: 184px; max-width: 30vw; height: 42px; object-fit: contain; object-position: left center; }
.app-nav { display: flex; justify-content: center; align-items: center; gap: clamp(14px, 2.2vw, 32px); }
.app-nav a { color: #edf5f7; text-decoration: none; font-size: .92rem; font-weight: 750; letter-spacing: .01em; }
.app-nav a:hover { color: var(--gf-gold-400); }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gf-gold-400), var(--gf-gold-500));
  color: #172638;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 850;
  box-shadow: 0 5px 14px rgba(246, 173, 47, .18);
}
.site-cta:hover { color: #172638; background: #ffc75f; }

.hero-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 28%, rgba(81, 184, 173, .20), transparent 25%),
    radial-gradient(circle at 96% 90%, rgba(53, 137, 137, .18), transparent 28%),
    linear-gradient(110deg, var(--gf-navy-950), #08283a 52%, #0a3b44);
  color: white;
}
.hero-band::after {
  content: "";
  position: absolute;
  inset: auto -8% -92px -8%;
  height: 130px;
  background: var(--gf-page);
  transform: rotate(-1.6deg);
  transform-origin: center;
}
.hero {
  position: relative;
  z-index: 1;
  min-height: 382px;
  padding-top: 54px;
  padding-bottom: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 52px;
  align-items: center;
}
.hero-copy { max-width: 650px; }
.hero-kicker-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.hero .eyebrow { color: #a7e0dc; letter-spacing: .18em; margin: 0; }
.standard-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #e7f4f5;
  background: rgba(255,255,255,.07);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.hero h1 { display: grid; gap: 2px; margin: 16px 0 14px; color: #fff; font-size: clamp(3rem, 6vw, 5rem); line-height: .94; letter-spacing: -.045em; }
.hero h1 span { display: block; }
.hero .hero-accent { color: var(--gf-gold-400); }
.hero .lede { max-width: 690px; margin: 0; color: #e4edf1; font-size: clamp(1.05rem, 1.8vw, 1.26rem); line-height: 1.55; }
.hero-proof { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero-proof span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #d8e9ed;
  font-size: .78rem;
  font-weight: 720;
}

.hero-intelligence-card {
  min-height: 268px;
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(7,22,34,.28));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 18px 42px rgba(0,0,0,.14);
  backdrop-filter: blur(5px);
}
.radar-visual { position: relative; aspect-ratio: 1; min-width: 150px; }
.radar-ring, .radar-core { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.radar-ring { border: 1px solid rgba(72, 169, 190, .45); }
.ring-one { width: 96%; height: 96%; }
.ring-two { width: 68%; height: 68%; }
.ring-three { width: 40%; height: 40%; }
.radar-core { width: 10px; height: 10px; background: var(--gf-gold-400); box-shadow: 0 0 0 8px rgba(246,173,47,.08), 0 0 24px rgba(246,173,47,.65); }
.radar-visual::before, .radar-visual::after { content: ""; position: absolute; background: rgba(72,169,190,.18); }
.radar-visual::before { width: 1px; top: 2%; bottom: 2%; left: 50%; }
.radar-visual::after { height: 1px; left: 2%; right: 2%; top: 50%; }
.hero-card-kicker { margin: 0 0 7px; color: var(--gf-gold-400); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.hero-intelligence-card h2 { color: white; margin: 0 0 8px; font-size: 1.42rem; line-height: 1.12; }
.hero-card-copy > p:not(.hero-card-kicker) { color: #d8e4e8; margin: 0; line-height: 1.45; font-size: .93rem; }
.hero-card-stats { display: grid; gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.13); }
.hero-card-stats div { display: grid; gap: 2px; }
.hero-card-stats dt { color: #fff; font-size: .77rem; font-weight: 800; }
.hero-card-stats dd { margin: 0; color: #aebfc7; font-size: .72rem; }

.app-shell { position: relative; z-index: 2; margin-top: -58px; padding-bottom: 64px; }
.section-anchor { position: absolute; margin-top: -110px; }
.panel {
  border: 1px solid rgba(188, 203, 212, .72);
  border-radius: 18px;
  box-shadow: var(--gf-shadow-soft);
  background: rgba(255,255,255,.98);
}
.audit-panel { padding: 28px 30px; box-shadow: var(--gf-shadow); }
.access-panel { border-top: 4px solid var(--gf-gold-500); }
.panel h2 { color: var(--gf-ink); }
.panel-heading-with-icon { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.panel-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf3f5;
  color: var(--gf-navy-800);
  font-size: 1.35rem;
  font-weight: 900;
}
.panel-icon-gold { background: var(--gf-gold-100); color: #9a6500; }
.panel-kicker { margin: 0 0 5px; color: #2c7c82; text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 900; }
.panel-subtitle, .section-intro { margin: 4px 0 0; color: var(--gf-muted); line-height: 1.5; }
.panel-heading-with-icon h2, .recent-panel h2 { margin: 0; }

.assessment-url-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) minmax(300px, .92fr) minmax(210px, .55fr);
  gap: 18px;
  align-items: end;
}
.field-block, .assessment-submit { min-width: 0; }
.field-block label, .scan-mode-fieldset legend { display: block; color: var(--gf-ink); font-weight: 800; margin-bottom: 8px; }
.field-help { margin: 7px 0 0; color: var(--gf-muted); font-size: .8rem; line-height: 1.4; }
input, textarea, select {
  color: var(--gf-ink);
  background: white;
  border-color: #aebfca;
}
input:hover, textarea:hover, select:hover { border-color: #7f9aaa; }
input:focus, textarea:focus, select:focus, button:focus, a:focus, summary:focus {
  outline: 3px solid rgba(246, 173, 47, .55);
  outline-offset: 2px;
}

button {
  background: linear-gradient(135deg, var(--gf-gold-400), var(--gf-gold-500));
  color: #172638;
  border: 1px solid #e5a02b;
  box-shadow: 0 5px 13px rgba(246,173,47,.15);
}
button:hover:not(:disabled) { background: #ffc65c; }
.secondary-button {
  background: #f3f7f9;
  color: #194f70;
  border: 1px solid #c8d6de;
  box-shadow: none;
}
.secondary-button:hover:not(:disabled) { background: #eaf1f4; color: #103e5b; }

.scan-mode-fieldset { margin: 0; }
.scan-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.radio-option.scan-option-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 86px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--gf-border-strong);
  border-radius: 12px;
  background: #fbfcfd;
  cursor: pointer;
}
.radio-option.scan-option-card:hover { border-color: #9ab1be; background: #f6fafb; }
.radio-option.scan-option-card:has(input:checked) { border-color: var(--gf-gold-500); background: #fffaf0; box-shadow: inset 0 0 0 1px rgba(246,173,47,.22); }
.radio-option.scan-option-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #b87300; }
.scan-option-copy { display: grid; gap: 4px; }
.scan-option-copy strong { font-size: .94rem; }
.scan-option-copy small { color: var(--gf-muted); line-height: 1.35; }
.assessment-submit { display: grid; align-self: stretch; align-content: end; }
.assessment-submit button { min-height: 52px; white-space: nowrap; }

.crawl-options { margin-top: 22px; background: #f6fafb; border-color: #d6e3e7; padding: 18px; }
.crawl-options h3 { margin-top: 0; }
.scope-preview { border-left-color: #2b8c8b; background: #eaf6f5; color: #2f5960; border-radius: 0 8px 8px 0; }
.scan-mode-hint { margin-bottom: 0; }

.status-panel { border-top: 4px solid #328a8a; }
.run-url { padding: 10px 12px; border-radius: 8px; background: #f3f7f8; color: #3c5668; }
.progress-copy { color: var(--gf-text); font-weight: 700; }
.progress-track { background: #e5ecef; height: 11px; }
.progress-bar { background: linear-gradient(90deg, #2a7d86, #3ca19f); }
.progress-metric { border-color: #d7e2e7; border-radius: 10px; background: #f9fbfc; }
.progress-metric strong { color: var(--gf-ink); }
.current-page { border: 1px solid #dbe5e9; background: #f4f8f9; }

.activity-indicator {
  min-height: 42px;
  background: rgba(255,255,255,.08);
  color: #effafb;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
}
.activity-indicator:hover { background: rgba(255,255,255,.13); }
.activity-dot { background: #62d395; }

.report-panel { padding: 28px; }
.results-heading { align-items: center; padding-bottom: 18px; border-bottom: 1px solid #e2e9ed; }
.report-kicker, .result-label { color: #407783; }
.report-primary-actions { align-items: center; }
.evidence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 4px;
  padding: 11px 12px;
  border: 1px solid #dfe7eb;
  border-radius: 10px;
  background: #f7fafb;
}
.toolbar-label { color: #566b79; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.evidence-toolbar button { padding: 8px 10px; font-size: .8rem; }

.history-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: end;
  padding: 16px 0 20px;
}
.history-action-primary, .history-action-compare { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.history-action-primary .toolbar-label, .history-action-compare .toolbar-label { width: 100%; }
.history-controls label { min-width: 230px; font-size: .8rem; color: var(--gf-text); }

.assessment-summary { background: #f3f8f9; border-left-color: #2f8388; border-radius: 0 10px 10px 0; color: #324d5d; }
.cards { gap: 14px; }
.card { border-color: #d8e2e7; border-radius: 13px; background: linear-gradient(180deg, #fff, #fbfcfd); box-shadow: 0 5px 18px rgba(8,27,44,.035); }
.card strong { color: var(--gf-ink); font-size: 1.95rem; letter-spacing: -.025em; }
.card span { color: var(--gf-muted); }
.methodology-note { border-color: #d7e4e8; background: #f8fbfb; color: #405966; }
.methodology-note-primary { border-left: 4px solid var(--gf-gold-500); background: #fffbf3; }
.result-heading { border-top-color: #17384a; }
.confirmed-label { color: var(--gf-danger); }
.review-label { color: var(--gf-warning); }
.finding { border-color: #dbe4e8; box-shadow: 0 4px 16px rgba(8,27,44,.035); }
.finding.confirmed { border-left-color: #a43b3b; }
.finding.review { border-left-color: var(--gf-gold-500); }
.wcag-chip { background: #e8f2f5; color: #1d5669; }
.remediation, .selector-patterns { background: #f5f9fa; }

.series-history { border-color: #d5e2e6; border-radius: 16px; background: #f5f9fa; padding: 20px; }
.series-heading-row h3 { font-size: 1.55rem; }
.baseline-badge { background: var(--gf-gold-100); color: #7a5100; border-color: #f0d18b; }
.trend-chart-card, .custom-compare-card { border-color: #d8e3e7; border-radius: 14px; box-shadow: 0 5px 18px rgba(8,27,44,.035); }
.trend-line { stroke: #2e858b; }
.trend-point { fill: #2e858b; }
.trend-point.baseline { fill: var(--gf-gold-500); }
.trend-gridline { stroke: #e4ecef; }
.trend-axis { stroke: #b7c8cf; }
.history-table-wrap { border-color: #d8e3e7; border-radius: 12px; }
.history-table th { background: #f1f6f7; color: #536c79; }
.history-baseline-marker { background: var(--gf-gold-100); color: #7a5100; }
.pattern-trend-table { border-color: #d8e3e7; }
.pattern-trend-table th { background: #f1f6f7; }

.comparison-panel { border-top: 4px solid #2d8288; }
.comparison-run, .comparison-page-list, .change-card { border-color: #d8e3e7; border-radius: 12px; }
.change-status-fixed { background: #e5f3e8; color: #27613a; }
.change-status-improved { background: #e6f2f4; color: #235e67; }
.change-status-new, .change-status-regressed { background: #fae6e6; color: #822727; }
.change-status-unchanged { background: #eef2f4; color: #58666c; }
.change-status-coverage-changed { background: var(--gf-gold-100); color: #725200; }
.coverage-note { border-left-color: var(--gf-gold-500); background: #fff9eb; }

.recent-panel { padding: 26px 28px; }
.recent { margin-top: 12px; }
.recent-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(190px, 320px) auto;
  padding: 14px 12px;
  margin: 0 -12px;
  border-top-color: #e3eaed;
  border-radius: 10px;
}
.recent-row:hover { background: #f7fafb; }
.recent-status-dot.running { background: #2c8c91; }
.recent-status-dot.queued { background: var(--gf-gold-500); }
.recent-progress { color: var(--gf-muted); }
.delete-audit { background: #fff5f5; color: #8c3030; border: 1px solid #e9caca; box-shadow: none; }
.delete-audit:hover:not(:disabled) { background: #fdeaea; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.feature-card {
  display: flex;
  gap: 13px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #d9e3e7;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 5px 18px rgba(8,27,44,.035);
}
.feature-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf3f5;
  color: #17384a;
  font-size: 1.25rem;
  font-weight: 900;
}
.feature-card h2 { margin: 2px 0 6px; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--gf-muted); font-size: .86rem; line-height: 1.5; }

.app-footer { background: var(--gf-navy-900); color: #ccdade; }
.footer-inner { min-height: 116px; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding-top: 26px; padding-bottom: 26px; }
.footer-inner > div { display: grid; gap: 2px; }
.footer-inner strong { color: white; }
.footer-inner span { font-size: .82rem; color: #9eb4bc; }
.footer-inner p { margin: 0; text-align: center; font-size: .82rem; color: #9fb2ba; }
.footer-inner a { color: var(--gf-gold-400); font-weight: 750; }

.mode-copy { color: var(--gf-muted); }
.badge.status-queued { background: var(--gf-gold-100); color: #735100; }
.badge.status-running { background: #e4f1f3; color: #225d65; }
.badge.status-completed { background: #e5f3e8; color: #27613a; }
.badge.status-failed { background: #fae6e6; color: #822727; }
.badge.status-checking { background: #eef2f4; color: #52606d; }

@media (max-width: 1020px) {
  .topbar-inner { grid-template-columns: auto 1fr; }
  .app-nav { order: 3; grid-column: 1 / -1; justify-content: flex-start; padding: 2px 0 5px; }
  .topbar-actions { justify-self: end; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 92px; }
  .hero-copy { max-width: 760px; }
  .hero-intelligence-card { max-width: 760px; grid-template-columns: 220px 1fr; }
  .assessment-url-grid { grid-template-columns: 1fr 1fr; }
  .assessment-submit { grid-column: 1 / -1; }
  .assessment-submit button { justify-self: start; min-width: 240px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner p { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}

@media (max-width: 760px) {
  html { scroll-behavior: auto; }
  .shell { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { padding: 10px 16px; gap: 12px; }
  .brand-wordmark { width: 142px; max-width: 45vw; }
  .brand-mark-wrap { width: 42px; height: 42px; flex-basis: 42px; }
  .brand-mark { width: 38px; height: 34px; }
  .site-cta { display: none; }
  .activity-indicator { max-width: 160px; }
  .app-nav { gap: 14px 18px; overflow-x: auto; padding-bottom: 7px; }
  .app-nav a { white-space: nowrap; font-size: .82rem; }
  .hero { padding-top: 38px; padding-bottom: 82px; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .hero-intelligence-card { grid-template-columns: 1fr; }
  .radar-visual { max-width: 190px; margin: 0 auto; width: 100%; }
  .app-shell { margin-top: -42px; padding-bottom: 44px; }
  .panel, .audit-panel, .report-panel, .recent-panel { padding: 20px; border-radius: 15px; }
  .assessment-url-grid { grid-template-columns: 1fr; }
  .scan-mode-grid { grid-template-columns: 1fr; }
  .assessment-submit { grid-column: auto; }
  .assessment-submit button { width: 100%; min-width: 0; }
  .evidence-toolbar { align-items: flex-start; flex-direction: column; }
  .history-controls { grid-template-columns: 1fr; }
  .history-action-primary, .history-action-compare { align-items: stretch; }
  .history-controls label { min-width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .recent-row { grid-template-columns: 1fr; margin: 0; padding: 15px 0; border-radius: 0; }
  .recent-actions { justify-content: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 10px; }
  .footer-inner p { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .app-footer, .hero-band, .app-topbar, .feature-grid, .evidence-toolbar { display: none !important; }
  .app-shell { margin-top: 0; padding: 0; }
}

/* Native form controls remain compact inside branded card treatments. */
input[type="radio"], input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin-block: 0;
  accent-color: #a66a00;
  box-shadow: none;
}

/* v0.7.2 GeoFirefly sign-in */
body.auth-active { min-height: 100vh; background: #071928; }
.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 24%, rgba(24, 126, 133, .28), transparent 28rem),
    linear-gradient(135deg, #071725 0%, #0a2a3a 54%, #0d4651 100%);
  color: #fff;
}
.auth-backdrop { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-orbit { position: absolute; border: 1px solid rgba(150, 218, 215, .12); border-radius: 50%; }
.auth-orbit-one { width: 520px; height: 520px; right: -120px; top: 6%; }
.auth-orbit-two { width: 760px; height: 760px; right: -250px; top: -6%; }
.auth-star { position: absolute; right: 18%; top: 28%; width: 10px; height: 10px; border-radius: 50%; background: #e5a12a; box-shadow: 0 0 0 8px rgba(229, 161, 42, .08), 0 0 28px rgba(229, 161, 42, .45); }
.auth-frame { position: relative; z-index: 1; width: min(100% - 40px, 470px); margin: 0 auto; padding: 7vh 0 40px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 26px; }
.auth-mark-wrap { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.auth-mark-wrap img { width: 37px; height: 37px; object-fit: contain; }
.auth-wordmark { width: min(230px, 62vw); height: auto; }
.auth-card { background: rgba(255,255,255,.985); color: #17202a; border: 1px solid rgba(255,255,255,.62); border-radius: 22px; padding: 34px; box-shadow: 0 28px 70px rgba(0,0,0,.28); backdrop-filter: blur(16px); }
.auth-kicker { margin: 0 0 8px; color: #9a660d; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 850; }
.auth-card h1 { margin: 0; color: #0a2132; font-size: clamp(2rem, 6vw, 2.65rem); line-height: 1.02; }
.auth-intro { color: #566776; line-height: 1.55; margin: 14px 0 24px; }
.auth-card form { display: grid; gap: 9px; }
.auth-card label { margin-top: 7px; color: #223847; font-weight: 780; }
.auth-card input { min-height: 48px; border-color: #bac6cf; background: #fff; }
.auth-primary-button { width: 100%; min-height: 49px; margin-top: 11px; background: linear-gradient(135deg, #d58f20, #edaa35); color: #12202a; font-weight: 850; box-shadow: 0 10px 22px rgba(213,143,32,.22); }
.auth-primary-button:hover { filter: brightness(.97); }
.auth-link-button { justify-self: center; background: transparent; color: #0c5f78; padding: 8px 10px; font-weight: 760; }
.auth-link-button:hover { text-decoration: underline; background: transparent; }
.auth-message, .auth-error { border-radius: 10px; padding: 11px 12px; margin: 14px 0 0; line-height: 1.45; }
.auth-message { background: #edf7f1; color: #285f3e; border: 1px solid #cce5d4; }
.auth-error { background: #fff2f2; color: #8b2929; border: 1px solid #e9c2c2; font-weight: 650; }
.auth-access-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #e5e9ed; color: #697984; font-size: .86rem; text-align: center; }
.auth-footer-copy { margin: 22px 0 0; text-align: center; color: rgba(255,255,255,.66); font-size: .86rem; }
.user-session { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.user-email { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dce9ef; font-size: .84rem; }
.topbar-signout { padding: 8px 11px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font-size: .82rem; }
.topbar-signout:hover { background: rgba(255,255,255,.15); }
@media (max-width: 760px) {
  .auth-frame { width: min(100% - 28px, 470px); padding-top: 38px; }
  .auth-card { padding: 26px 22px; border-radius: 18px; }
  .user-email { display: none; }
  .topbar-signout { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-primary-button { transition: none; }
}

body.auth-active .skip-link { display: none; }

/* v0.8 authenticated assessment profile management */
.auth-manage-trigger {
  margin-top: 10px;
  padding: 9px 12px;
  font-size: .84rem;
}

.auth-profile-manager {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: #172b38;
  box-shadow: 0 28px 80px rgba(6, 24, 37, .32);
}

.auth-profile-manager::backdrop {
  background: rgba(5, 21, 33, .68);
  backdrop-filter: blur(3px);
}

.auth-manager-shell {
  padding: 26px;
  background: #fff;
}

.auth-manager-heading,
.auth-profile-list-heading,
.auth-profile-card-heading,
.auth-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-manager-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid #dce4e9;
}

.auth-manager-heading h2,
.auth-profile-list-heading h3,
.auth-profile-editor-panel h3 {
  margin: 0;
  color: #102b3b;
}

.auth-manager-intro {
  max-width: 780px;
  margin: 8px 0 0;
  color: #526774;
  line-height: 1.55;
}

.auth-manager-grid {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.35fr);
  gap: 22px;
  margin-top: 20px;
}

.auth-profile-list-panel,
.auth-profile-editor-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d7e0e6;
  border-radius: 15px;
  background: #fbfcfd;
}

.auth-profile-management-list {
  display: grid;
  gap: 10px;
  max-height: 580px;
  margin-top: 14px;
  overflow: auto;
}

.auth-profile-card {
  padding: 14px;
  border: 1px solid #ccd8df;
  border-radius: 12px;
  background: #fff;
}

.auth-profile-card.is-disabled {
  border-style: dashed;
  background: #f4f6f7;
}

.auth-profile-card-heading strong {
  overflow-wrap: anywhere;
  color: #153747;
}

.auth-profile-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f4ec;
  color: #285d3a;
  font-size: .73rem;
  font-weight: 800;
}

.auth-profile-card.is-disabled .auth-profile-status {
  background: #e9edf0;
  color: #445966;
}

.auth-profile-login-url {
  margin: 7px 0 10px;
  color: #526774;
  font-size: .83rem;
  overflow-wrap: anywhere;
}

.auth-profile-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin: 0 0 12px;
  color: #435a67;
  font-size: .8rem;
}

.auth-profile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-profile-card-actions button {
  padding: 8px 10px;
  font-size: .8rem;
}

.auth-profile-editor-form {
  display: grid;
  gap: 15px;
  margin-top: 14px;
}

.auth-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.auth-editor-grid .wide-field {
  grid-column: 1 / -1;
}

.auth-credential-fieldset,
.auth-selector-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 15px;
  border: 1px solid #d7e0e6;
  border-radius: 12px;
  background: #fff;
}

.auth-credential-fieldset legend,
.auth-selector-fieldset legend {
  padding: 0 6px;
  color: #173746;
  font-weight: 800;
}

.auth-profile-editor-form label:not(.auth-enabled-control) {
  display: grid;
  gap: 6px;
  color: #263f4d;
  font-weight: 760;
}

.auth-profile-editor-form textarea {
  min-height: 98px;
  resize: vertical;
  font: inherit;
}

.auth-profile-editor-form .field-help {
  margin: -5px 0 0;
  color: #526774;
}

.auth-enabled-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #263f4d;
  font-weight: 780;
}

.auth-editor-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.auth-profile-editor-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cbe0d2;
  border-radius: 9px;
  background: #eef7f1;
  color: #285d3a;
  line-height: 1.45;
}

.auth-profile-editor-status.error {
  border-color: #e7c4c4;
  background: #fff3f3;
  color: #812c2c;
}

.auth-profile-empty {
  margin: 10px 0 0;
  padding: 14px;
  border: 1px dashed #bdcbd3;
  border-radius: 10px;
  color: #526774;
  background: #fff;
}

@media (max-width: 820px) {
  .auth-profile-manager { width: min(100vw - 18px, 1080px); max-height: calc(100vh - 18px); }
  .auth-manager-shell { padding: 18px; }
  .auth-manager-heading { align-items: flex-start; }
  .auth-manager-grid, .auth-editor-grid { grid-template-columns: 1fr; }
  .auth-editor-grid .wide-field { grid-column: auto; }
  .auth-profile-management-list { max-height: 320px; }
}

/* v0.9 AI-assisted assessment insights */
.ai-insights-panel {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid #d9e1e4;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfcfd 0%, #ffffff 100%);
  box-shadow: 0 12px 32px rgba(18, 49, 61, .06);
}

.ai-insights-heading-row { align-items: flex-start; }
.ai-insights-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ai-model-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cfdadd;
  border-radius: 999px;
  background: #fff;
  color: #334f5a;
  font-size: .82rem;
  font-weight: 700;
}
.ai-insights-safety-note { margin: 14px 0 18px; }
.ai-insights-status { min-height: 24px; margin: 0 0 16px; color: #526970; font-size: .92rem; }
.ai-insights-content > section { margin-top: 24px; }
.ai-insights-content h4 { margin-top: 0; }
.ai-executive-summary {
  padding: 18px 20px;
  border-left: 4px solid #d9a629;
  background: #fffaf0;
  border-radius: 8px;
}
.ai-executive-summary p { margin-bottom: 0; }
.ai-section-title { margin: 0 0 12px; font-size: 1.1rem; }
.ai-card-grid, .ai-findings-grid { display: grid; gap: 14px; }
.ai-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-findings-grid { grid-template-columns: 1fr; }
.ai-insight-card, .ai-finding-insight {
  border: 1px solid #dbe4e7;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.ai-card-heading { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.ai-card-heading h4 { margin-bottom: 4px; }
.ai-priority, .ai-confidence {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.ai-priority-high { background: #fff1ee; color: #8a2d24; border: 1px solid #efc3bc; }
.ai-priority-medium { background: #fff8e8; color: #725313; border: 1px solid #e9d49c; }
.ai-priority-low { background: #eef7f4; color: #245f53; border: 1px solid #bddbd2; }
.ai-confidence { background: #f2f5f7; color: #4b626b; border: 1px solid #d5dfe2; margin-left: 4px; }
.ai-basis {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.ai-basis-finding { background: #eef7f4; color: #245f53; border: 1px solid #bddbd2; }
.ai-basis-coverage { background: #f3f4f8; color: #44536a; border: 1px solid #d3d8e2; }
.ai-evidence-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ai-evidence-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #b9d7db;
  background: #eff8f9;
  color: #175763;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}
.ai-evidence-chip:hover, .ai-evidence-chip:focus-visible { text-decoration: underline; }
.ai-evidence-none { color: #6c7b80; font-size: .8rem; }
.ai-criteria .wcag-chip { margin: 3px 3px 3px 0; }
.ai-acr-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.ai-acr-table th, .ai-acr-table td { border-bottom: 1px solid #dde5e8; padding: 10px 8px; text-align: left; vertical-align: top; }
.ai-acr-table th { color: #516971; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.ai-acr-table th:nth-child(1), .ai-acr-table td:nth-child(1) { width: 16%; }
.ai-acr-table th:nth-child(2), .ai-acr-table td:nth-child(2) { width: 18%; }
.ai-acr-table th:nth-child(4), .ai-acr-table td:nth-child(4) { width: 22%; }
.ai-acr-table .ai-evidence-links { margin-top: 0; }
.ai-limitations { padding: 14px 16px; border: 1px solid #dce3e5; background: #f7f9fa; border-radius: 10px; }
.ai-limitations ul { margin-bottom: 0; }

@media (max-width: 840px) {
  .ai-card-grid { grid-template-columns: 1fr; }
  .ai-insights-actions { justify-content: flex-start; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* v0.10.1 WCAG criterion evidence matrix */
.evidence-matrix-panel {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid #d5e2e6;
  border-radius: 16px;
  background: #f8fbfb;
}
.evidence-matrix-heading-row {
  align-items: end;
  gap: 22px;
}
.evidence-matrix-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  min-width: min(100%, 500px);
}
.evidence-matrix-controls label {
  display: grid;
  gap: 6px;
  font-size: .79rem;
  font-weight: 760;
  color: #324d5d;
}
.evidence-matrix-controls select,
.evidence-matrix-controls input {
  width: 100%;
  min-width: 0;
}
.evidence-matrix-note { margin: 16px 0; }
.evidence-matrix-status {
  margin: 14px 0;
  color: #405966;
  font-size: .9rem;
}
.evidence-matrix-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0 18px;
}
.evidence-matrix-table-wrap { overflow-x: auto; background: #fff; }
.evidence-matrix-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  font-size: .84rem;
}
.evidence-matrix-table th,
.evidence-matrix-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #e1e9ec;
  text-align: left;
  vertical-align: top;
}
.evidence-matrix-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef5f6;
  color: #314d59;
  font-size: .76rem;
  letter-spacing: .02em;
}
.evidence-matrix-table tbody tr:hover { background: #f8fbfc; }
.evidence-matrix-table td:first-child { width: 210px; }
.evidence-matrix-table td:nth-child(2) { width: 70px; }
.evidence-matrix-table td:nth-child(3) { width: 170px; }
.evidence-matrix-table td:nth-child(4) { width: 330px; }
.evidence-matrix-table td:nth-child(5) { min-width: 290px; }
.matrix-criterion-title,
.matrix-principle { display: block; }
.matrix-criterion-title { margin-top: 3px; color: #17384a; font-weight: 720; }
.matrix-principle { margin-top: 4px; color: #536c79; font-size: .76rem; }
.matrix-state {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  line-height: 1.25;
  font-weight: 800;
}
.matrix-state-confirmed_automated_evidence { background: #fae6e6; border-color: #e6bcbc; color: #762626; }
.matrix-state-review_required { background: #fff3d6; border-color: #ebd08a; color: #674900; }
.matrix-state-supporting_automated_evidence { background: #e5f3e8; border-color: #b9d9c2; color: #235b35; }
.matrix-state-applicability_confirmation_needed { background: #f0ecfb; border-color: #d2c6ee; color: #4e3c78; }
.matrix-state-human_evidence_needed { background: #e8f2f5; border-color: #bfd4dc; color: #204f60; }
.matrix-evidence-summary { margin: 0 0 8px; color: #405966; line-height: 1.45; }
.matrix-rule-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.matrix-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #cedde2;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #214958;
  font-size: .7rem;
  line-height: 1.25;
  text-decoration: none;
}
a.matrix-rule-chip:hover { text-decoration: underline; }
.matrix-rule-confirmed { border-color: #e1b7b7; background: #fff7f7; color: #742a2a; }
.matrix-rule-review { border-color: #e6ce8f; background: #fffaf0; color: #634900; }
.matrix-rule-pass { border-color: #bad7c2; background: #f4faf5; color: #285c38; }
.matrix-rule-inapplicable { border-color: #d2c6ee; background: #faf8ff; color: #514078; }
.matrix-no-ai-note { color: #5b707a; font-style: italic; }
.evidence-matrix-table td:last-child p { margin: 0 0 8px; line-height: 1.5; }
.evidence-matrix-limitations {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d8e3e7;
  color: #405966;
  font-size: .84rem;
}
.evidence-matrix-limitations h4 { margin: 0 0 7px; color: #17384a; }
.evidence-matrix-limitations ul { margin: 0; padding-left: 20px; }
.evidence-matrix-limitations li + li { margin-top: 5px; }

@media (max-width: 1020px) {
  .evidence-matrix-heading-row { align-items: stretch; }
  .evidence-matrix-controls { min-width: 0; width: 100%; }
  .evidence-matrix-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .evidence-matrix-panel { padding: 18px; }
  .evidence-matrix-controls { grid-template-columns: 1fr; }
  .evidence-matrix-summary { grid-template-columns: 1fr 1fr; }
  .evidence-matrix-table { min-width: 0; }
  .evidence-matrix-table thead { display: none; }
  .evidence-matrix-table,
  .evidence-matrix-table tbody,
  .evidence-matrix-table tr,
  .evidence-matrix-table td { display: block; width: 100% !important; }
  .evidence-matrix-table tr { padding: 12px 0; border-bottom: 1px solid #dce6e9; }
  .evidence-matrix-table td { border: 0; padding: 5px 12px 5px 132px; position: relative; min-height: 28px; }
  .evidence-matrix-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 5px;
    width: 108px;
    color: #536c79;
    font-size: .71rem;
    font-weight: 800;
  }
}

/* v0.10.2 scope and applicability intelligence */
.evidence-matrix-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.matrix-state-additional_scope_needed { background: #eef1f8; border-color: #c9d1e4; color: #3b4d78; }
.evidence-matrix-scope-inventory {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #d8e3e6;
  border-radius: 12px;
  background: #fff;
}
.matrix-scope-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid #d1a34b;
  background: #fff9ec;
  color: #5b4a25;
  line-height: 1.5;
}
.matrix-scope-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.matrix-scope-heading > div { display: grid; gap: 2px; }
.matrix-scope-heading span { color: #5b707a; font-size: .78rem; }
.matrix-scope-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfd4dc;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f8fa;
  color: #295266 !important;
  font-weight: 760;
  white-space: nowrap;
}
.matrix-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.matrix-scope-card {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid #e0e8eb;
  border-radius: 10px;
  background: #f9fbfb;
}
.matrix-scope-card strong { font-size: 1.15rem; color: #143b4a; }
.matrix-scope-card span { font-size: .77rem; font-weight: 720; color: #3d5966; }
.matrix-scope-card small { color: #6a7d86; font-size: .68rem; }
@media (max-width: 1050px) {
  .evidence-matrix-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .matrix-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .evidence-matrix-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix-scope-grid { grid-template-columns: 1fr; }
  .matrix-scope-heading { align-items: flex-start; flex-direction: column; }
}


/* v0.10.3 automated interaction and state probes */
.evidence-matrix-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.matrix-state-automated_interaction_evidence {
  background: #eef8f6;
  border-color: #b9ddd5;
  color: #1f5a4f;
}
.matrix-rule-probe {
  background: #eef8f6;
  border-color: #c2e1da;
  color: #245b51;
}
.matrix-rule-info {
  background: #f5f7f8;
  border-color: #d9e0e3;
  color: #536873;
}
@media (max-width: 1180px) {
  .evidence-matrix-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .evidence-matrix-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
