.sg { --sg-border: #dce1ea; }
.sg-check-progress[hidden] { display: none; }
.sg-check-progress progress { display: block; width: 100%; height: 10px; margin-bottom: 10px; accent-color: #4654cc; }
.sg #gap-errors:not(:empty) { padding: 12px; border: 1px solid #e7a6ae; border-radius: 6px; background: #fff4f5; color: #862536; }
body:has(.sg-launch) #scrollTopButton { display: none; }
.sg h2 { font-size: 20px; line-height: 1.35; margin: 0 0 12px; }
.sg h3 { font-size: 17px; line-height: 1.4; margin: 0; }
.sg p { margin: 0 0 12px; }
.sg :is(p, h1, h2, h3, li, summary) { overflow-wrap: anywhere; }
.sg-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sg-inputs > section { min-width: 0; }
.sg-inputs .ui-upload { margin-top: 12px; }
.sg-upload { gap: 16px; }
.sg-upload > .tool-page-header { margin: 0; }
.sg-upload > p, .sg-upload .tool-page-header p, .sg-upload .ui-upload p { margin-bottom: 0; }
.sg-upload .ui-upload { padding: 16px; gap: 8px; }
.sg-upload .sg-steps { padding-block: 8px; }
.sg-steps { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 12px 0; border-block: 1px solid var(--sg-border); }
.sg-steps span { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; }
.sg-steps [aria-current] { color: #4654cc; font-weight: 700; }
.sg-actions, .sg-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sg-actions form { margin: 0; }
.sg-export-actions { align-items: end; }
.sg #sg-export { align-items: end; min-width: 0; max-width: 100%; }
.sg-export-scope { display: grid; gap: 6px; min-width: 0; max-width: 100%; font-size: 14px; }
.sg-export-scope select { max-width: 100%; }
.sg-pick { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.sg-pick input { flex: 0 0 auto; accent-color: var(--primary); }
.sg-pick:focus-within { outline: 2px solid var(--primary); outline-offset: 4px; }
.sg .sg-task .sg-actions select.input { width: auto; min-width: 150px; }
.sg-filters { align-items: end; }
.sg-filters label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; flex: 1 1 180px; min-width: 0; }
.sg-filters .input { min-width: 0; max-width: 100%; width: 100%; }
.sg-filters select { overflow: hidden; text-overflow: ellipsis; }
.sg .btn { min-height: 44px; max-width: 100%; white-space: normal; text-align: center; }
.sg-launch { background: #fff; border: 1px solid var(--sg-border); border-radius: 6px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sg-floating[hidden] { display: none; }
.sg-floating { position: fixed; left: var(--sg-launch-left, 16px); right: var(--sg-launch-right, 16px); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--sg-border); border-radius: 6px; padding: 12px 16px; box-shadow: 0 4px 16px #19203424; }
.sg-floating > div { min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.sg-floating span { color: #596479; font-size: 13px; }
.sg-floating .btn { flex-shrink: 0; }
.sg:has(.sg-floating:not([hidden])) { padding-bottom: 170px; }
.sg-launch, #gap-preview, #gap-errors { scroll-margin-block: 90px 170px; }
.sg-launch p { margin: 0; }
.sg-launch .btn { flex-shrink: 0; }
.sg-validated { border-left: 3px solid #2a8655; padding: 12px 16px; background: #f5faf7; }
.sg-validated details { margin: 12px 0; }
.sg-validated--warning { background: #fffaf0; border-color: #a86b1a; }
.sg-file-issue { padding-block: 12px; border-top: 1px solid var(--sg-border); }
.sg-file-issue h3 { margin-bottom: 8px; }
.sg-consent-ready #gap-preview .sg-confirm { display: none; }
.sg-task-number { font-variant-numeric: tabular-nums; }
.sg-details { padding: 16px; min-width: 0; }
.sg-details ul { padding-left: 22px; }
.sg-confirm { display: flex; align-items: start; gap: 10px; margin-top: 14px; }
.sg-confirm input { margin-top: 4px; flex-shrink: 0; }
.sg-table { overflow: auto; max-width: 100%; }
.sg-table table { border-collapse: collapse; min-width: 520px; width: 100%; }
.sg-table :is(th,td) { text-align: left; vertical-align: top; border-bottom: 1px solid var(--sg-border); padding: 10px; max-width: 320px; overflow-wrap: anywhere; }
.sg-changes-table { width: 100%; min-width: 0; }
.sg-changes-table table { table-layout: fixed; min-width: 0; }
.sg-changes-table :is(th,td) { white-space: normal; }
.sg-changes-table :is(th,td):first-child { width: 40%; }
.sg-result-summary { border-block: 1px solid var(--sg-border); padding: 18px 0; }
.sg-result-summary .sg-actions { margin-bottom: 12px; }
.sg-warning { border-left: 3px solid #a86b1a; padding: 14px 16px; background: #fff9eb; }
.sg-warning p:last-child { margin-bottom: 0; }
.sg #quick-plan { scroll-margin-top: 80px; }
.sg-task { padding: 18px 0; border-bottom: 1px solid var(--sg-border); }
.sg-task-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.sg-task-heading span { font-size: 14px; color: #596479; }
.sg-task details { margin: 14px 0; }
.sg-url { overflow-wrap: anywhere; color: #596479; }
.sg .gap-progress__track { height: 8px; background: #e9edf3; border-radius: 4px; overflow: hidden; }
.sg .gap-progress__bar { height: 100%; width: var(--gap-progress, 0%); background: #4654cc; }
.sg .gap-status-card { display: grid; gap: 20px; }
.sg :is(.gap-status-card__top, .gap-progress__meta, .gap-queue-summary__actions) { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sg .gap-queue-summary { display: grid; gap: 8px; padding-block: 16px; border-block: 1px solid var(--sg-border); }
.sg .gap-stage-list { display: grid; gap: 14px; }
.sg .gap-stage { display: flex; gap: 12px; align-items: start; }
.sg .gap-stage__num { flex: 0 0 28px; text-align: center; color: #596479; }
.sg .gap-stage.is-active { color: #4654cc; }
.sg .gap-side-card { margin-top: 24px; }
.sg-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-block: 20px; }
.sg-metrics > * { display: grid; gap: 8px; color: inherit; text-decoration: none; padding-block: 12px; border-top: 2px solid var(--sg-border); }
.sg-metrics strong { font-size: 30px; line-height: 1.2; }
.sg-metrics span { font-size: 14px; }
.sg-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 14px; }
.sg-comparison a { display: grid; gap: 6px; padding-block: 10px; color: inherit; text-decoration: none; border-top: 2px solid #28875d; }
.sg-comparison a:nth-child(2) { border-color: #929dab; }
.sg-comparison a:nth-child(3) { border-color: #bb7a17; }
.sg-comparison strong { font-size: 24px; line-height: 1.2; }
.sg-comparison span { font-size: 14px; overflow-wrap: anywhere; }
.sg-coverage { margin: 24px 0 14px; }
.sg-coverage-track { display: flex; height: 18px; overflow: hidden; border-radius: 3px; background: #edf0f3; }
.sg-coverage-track span { flex-basis: 0; min-width: 0; }
.sg-bucket-top10 { background: #28875d; }
.sg-bucket-below { background: #bb7a17; }
.sg-bucket-missing { background: #929dab; }
.sg-coverage figcaption { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 12px; font-size: 14px; }
.sg-coverage figcaption i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; }
.sg-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.sg-section-row { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--sg-border); color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.sg-section-row span { font-size: 14px; }
.sg-section-track { height: 6px; background: #edf0f3; }
.sg-section-track i { display: block; height: 100%; background: #bb7a17; }
.sg-view-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--sg-border); margin-bottom: 20px; }
.sg-view-tabs a { padding: 12px 0; border-bottom: 3px solid transparent; color: #596479; text-decoration: none; }
.sg-view-tabs [aria-current] { color: #2937a9; border-color: #4654cc; font-weight: 700; }
.sg .sg-single { flex: 1 1 260px; padding-bottom: 12px; }
.sg .sg-single > span { display: flex; align-items: flex-start; gap: 8px; }
.sg .sg-single input { flex: 0 0 auto; margin-top: 3px; }
.sg #work .sg-filters { margin-bottom: 16px; }
.sg #work { scroll-margin-top: 80px; }
.sg :is(.sg-metrics a, .sg-section-row, .sg-comparison a):hover { color: #2937a9; }
.sg :is(.sg-view-tabs a, .sg-section-row, .sg-metrics a, .sg-comparison a):focus-visible { outline: 2px solid #4654cc; outline-offset: 3px; }
.sg .sg-page-url { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.sg-growth {
  --sg-border: #e0e8e7;
}
.sg-growth > section + section { margin-top: 0; }
.sg-growth > section { padding-block: 8px 20px; border-bottom: 1px solid var(--sg-border); }
.sg-growth h2 { font-weight: 650; margin-bottom: 18px; }
.sg-growth .help { color: #60716f; line-height: 1.65; }
.sg-growth .sg-task-number { margin-left: auto; font-size: 13px; }
.sg-growth .sg-coverage-summary { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; }
.sg-growth .sg-coverage-summary strong { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sg-growth .sg-topic-summary { margin-block: 12px; }
.sg-growth .sg-empty { display: grid; justify-items: start; gap: 12px; padding: 20px 0; border-block: 1px solid var(--sg-border); }
.sg-growth .sg-empty p { margin: 0; max-width: 720px; }
.sg-growth .sg-metrics { gap: 16px; }
.sg-growth .sg-metrics > * { min-width: 0; padding: 16px; border: 0; border-left: 3px solid #91c6bb; background: #f0f7f5; }
.sg-growth .sg-metrics > .sg-metric-improve { border-color: #e4c58d; background: #fcf7ed; }
.sg-growth .sg-metrics > .sg-metric-good { border-color: #add0b4; background: #f1f7f2; }
.sg-growth .sg-metrics > .sg-metric-watch { border-color: #adc6df; background: #f0f5fa; }
.sg-growth .sg-metrics > .sg-metric-limited { border-color: var(--border); background: var(--surface-muted); }
.sg-growth .sg-metrics strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.sg-growth .sg-metrics span { line-height: 1.5; overflow-wrap: anywhere; }
.sg-growth .sg-comparison { gap: 16px; }
.sg-growth .sg-comparison a { min-width: 0; padding: 16px; border: 1px solid var(--sg-border); border-radius: 6px; background: #f5faf8; }
.sg-growth .sg-comparison .sg-compare-equal { background: #f6f8fa; }
.sg-growth .sg-comparison .sg-compare-behind { background: #fcf8f0; }
.sg-growth .sg-comparison strong { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.sg-growth .sg-comparison span { display: block; line-height: 1.5; }
.sg-growth .sg-comparison small { display: block; margin-top: 4px; font-size: 13px; color: #60716f; }
.sg-growth .sg-coverage-track { height: 14px; }
.sg-growth .sg-bucket-top10 { background: #70b49a; }
.sg-growth .sg-bucket-below { background: #e3be77; }
.sg-growth .sg-bucket-missing { background: #d6dfe5; }
.sg-growth .sg-coverage figcaption { gap: 10px 20px; }
.sg-growth .sg-coverage figcaption strong { font-weight: 600; }
.sg-growth .sg-section-row { gap: 8px; padding-block: 18px; }
.sg-growth .sg-section-row strong { font-weight: 600; }
.sg-growth .sg-section-row > span:not(.sg-section-track) { color: #60716f; }
.sg-growth .sg-section-track { border-radius: 3px; overflow: hidden; background: #f2f4f3; }
.sg-growth .sg-section-track i { background: #d7b271; }
.sg-growth .sg-view-tabs { gap: 0 16px; }
.sg-growth .sg-view-tabs a { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-muted); }
.sg-growth .sg-view-tabs a:hover { color: var(--primary-hover); }
.sg-growth .sg-view-tabs span { background: var(--surface-muted); color: var(--text-muted); border-radius: 4px; padding: 2px 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sg-growth .sg-view-tabs [aria-current] { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.sg-growth .sg-view-tabs [aria-current] span { background: var(--primary-soft); color: var(--primary); }
.sg-growth .sg-task { padding-block: 24px; }
.sg-growth .sg-page-url { line-height: 1.65; font-weight: 500; }
.sg-growth details > summary { font-size: 15px; font-weight: 500; }
.sg-growth :is(.sg-metrics a, .sg-section-row, .sg-comparison a):hover { color: var(--primary-hover); background: #edf5f2; text-decoration: none; }
.sg-growth :is(.sg-view-tabs a, .sg-section-row, .sg-metrics a, .sg-comparison a):focus-visible { outline-color: var(--primary); }
@media (max-width: 1000px) { .sg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sg #sg-export { width: 100%; }
  .sg-export-scope { width: 100%; }
  .sg #sg-export > .btn { flex: 1 1 auto; }
  .sg-comparison { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sg-comparison a { grid-template-columns: 76px minmax(0, 1fr); align-items: center; }
  .sg-growth .sg-metrics { gap: 10px; }
  .sg-growth .sg-metrics > * { padding: 12px; }
  .sg-growth .sg-metrics strong { font-size: 26px; }
  .sg-growth .sg-comparison { gap: 8px; }
  .sg-growth .sg-comparison a { padding: 12px; }
  .sg-growth .sg-actions > .btn { flex: 1 1 auto; }
  .sg-sections { grid-template-columns: minmax(0, 1fr); }
  .sg-filters label { flex-basis: 100%; }
  .sg-inputs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .sg-launch { bottom: 8px; display: grid; gap: 8px; padding: 10px 12px; }
  .sg-launch p { font-size: 13px; }
  .sg-launch .btn { width: 100%; }
  .sg-floating { display: grid; gap: 8px; padding: 10px 12px; }
  .sg-floating .btn { width: 100%; }
  .sg-floating strong { font-size: 14px; }
  .sg .sg-steps { gap: 8px 16px; }
  .sg-details { padding: 12px; }
  .sg-changes-table :is(th,td) { padding: 6px; font-size: 12px; }
  .sg-changes-table :is(th,td):first-child { width: 34%; }
  .sg-changes-table :is(th,td):nth-child(2) { width: 26%; }
  .sg .sg-task .sg-actions select.input { flex: 1; min-width: 0; }
}
.sg-inputs[data-reuse-mode="all"],
.sg-inputs[data-reuse-mode="own"] > section:last-child,
.sg-inputs[data-reuse-mode="add"] > section:first-child { display: none; }
.sg-inputs[data-reuse-mode="own"], .sg-inputs[data-reuse-mode="add"] { grid-template-columns: 1fr; }
.sg [data-dataset-context] { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.sg [data-dataset-context] legend { margin-bottom: 12px; overflow-wrap: anywhere; }
.sg [data-source-conditions] label:not(.sg-confirm) { display: grid; gap: 8px; }
.sg .sg-conditions { border-left: 3px solid var(--border); padding-left: 16px; color: var(--muted); }
