@layer seo {
  .embedded-workspace .sidebar,
  .embedded-workspace .sidebar-scrim { display: none; }
  .embedded-workspace .dashboard { margin-left: 0; }

  .seo-dashboard { max-width: 1600px; }
  .seo-progress-badge { display: inline-flex; align-items: center; min-height: 34px; border: 1px solid #cfc9f1; border-radius: 999px; background: var(--lavender); color: var(--indigo); padding: 6px 12px; font-size: .72rem; font-weight: 750; }
  .seo-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; margin: 12px 0; padding: 18px; }
  .seo-intro .metric-icon { margin-top: 2px; }
  .seo-intro h2 { margin-top: 2px; font-size: 1.05rem; }
  .seo-intro p:last-child { max-width: 780px; margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
  .seo-section { margin-top: 12px; overflow: hidden; }
  .seo-section-heading { align-items: flex-start; padding: 17px 18px 13px; }
  .section-description { margin-top: 4px; color: var(--muted); font-size: .76rem; }
  .seo-loading { padding: 28px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
  .findings-table { min-width: 840px; }
  .runs-table { min-width: 820px; }
  .runs-table th, .runs-table td { padding-inline: 14px; vertical-align: middle; }
  .run-label { min-width: 150px; }
  .run-label strong { display: block; }
  .run-label small { display: block; margin-top: 2px; color: var(--muted); }
  .run-stat { white-space: nowrap; font-weight: 700; }
  .run-coverage-stack > strong, .run-coverage-stack > small { display: block; }
  .run-coverage-stack small { margin-top: 3px; color: var(--muted); font-size: .68rem; font-weight: 500; white-space: normal; }
  .pagespeed-metrics { margin-top: 7px; white-space: normal; }
  .pagespeed-label { display: block; color: var(--muted); font-size: .64rem; font-weight: 700; }
  .pagespeed-score-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
  .pagespeed-score { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 6px; font-size: .62rem; font-weight: 650; }
  .pagespeed-score strong { font-size: inherit; }
  .pagespeed-pass { background: var(--green); color: #24532b; }
  .pagespeed-warning { background: #f5efc6; color: #555216; }
  .pagespeed-critical { background: var(--pink); color: #742d3b; }
  .sitemap-metrics { margin-top: 7px; border-left: 2px solid #cfc9f1; padding-left: 7px; white-space: normal; }
  .sitemap-label { display: block; color: var(--indigo); font-size: .64rem; font-weight: 750; }
  .sitemap-metrics small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; font-weight: 500; }
  .run-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
  .run-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
  .run-success { background: var(--green); color: #24532b; }
  .run-running { background: var(--lavender); color: var(--indigo); }
  .run-partial_failure { background: #f5efc6; color: #555216; }
  .run-failed { background: var(--pink); color: #742d3b; }
  .findings-table th, .findings-table td { padding-inline: 14px; vertical-align: top; }
  .finding-title { min-width: 190px; font-weight: 700; }
  .finding-detail { min-width: 260px; color: #4d4c52; line-height: 1.5; }
  .finding-page { max-width: 280px; overflow-wrap: anywhere; }
  .finding-page a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 2px; }
  .severity-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
  .severity-pill::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
  .severity-critical { background: var(--pink); color: #742d3b; }
  .severity-warning { background: #f5efc6; color: #555216; }
  .severity-info { background: var(--lavender); color: var(--indigo); }
  .lifecycle-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
  .lifecycle-pill::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
  .lifecycle-new { background: var(--lavender); color: var(--indigo); }
  .lifecycle-ongoing { background: #f5efc6; color: #555216; }
  .lifecycle-resolved { background: var(--green); color: #24532b; }
  .lifecycle-detected { background: #f0eff3; color: #4d4c52; }
  .finding-title small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 500; }
  .seo-empty, .seo-error { margin: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 34px 18px 38px; }
  .seo-empty .metric-icon, .seo-error .metric-icon { margin-inline: auto; }
  .seo-empty h3, .seo-error h3 { margin-top: 10px; }
  .metric-icon.pink { background: var(--pink); color: #742d3b; }

  .manual-check-list { border-top: 1px solid var(--line); }
  .manual-check-card { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.25fr); gap: 24px; padding: 20px 18px; }
  .manual-check-card + .manual-check-card { border-top: 1px solid var(--line); }
  .manual-check-title { display: flex; align-items: flex-start; gap: 12px; }
  .manual-check-title .metric-icon { flex: 0 0 auto; }
  .manual-check-title h3 { margin-top: 2px; font-size: .95rem; }
  .manual-check-date { margin-top: 6px; color: var(--muted); font-size: .74rem; }
  .manual-check-note { margin-top: 10px; color: #4d4c52; font-size: .76rem; line-height: 1.5; white-space: pre-wrap; }
  .manual-check-form label { display: grid; gap: 6px; color: var(--muted); font-size: .72rem; font-weight: 700; }
  .manual-check-form textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid #aaa9a2; border-radius: 8px; background: white; padding: 10px 11px; color: var(--ink); font: inherit; line-height: 1.45; }
  .manual-check-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; }
  .manual-check-actions button { min-height: 44px; }
  .manual-check-error { margin-right: auto; color: #8a2438; font-size: .7rem; }

  @media (max-width: 760px) {
    .seo-dashboard .page-header { align-items: flex-start; }
    .seo-progress-badge { margin-top: 4px; }
    .manual-check-card { grid-template-columns: 1fr; gap: 18px; }
  }
  @media (max-width: 680px) {
    .seo-section .table-wrap { overflow: visible; }
    :is(.findings-table, .runs-table),
    :is(.findings-table, .runs-table) thead,
    :is(.findings-table, .runs-table) tbody,
    :is(.findings-table, .runs-table) tr,
    :is(.findings-table, .runs-table) td { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
    :is(.findings-table, .runs-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    :is(.findings-table, .runs-table) tr { padding: 13px 14px; border-top: 1px solid var(--line); }
    :is(.findings-table, .runs-table) td { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; border: 0; padding: 6px 0; font-size: .76rem; overflow-wrap: anywhere; }
    :is(.findings-table, .runs-table) td::before { content: attr(data-label); position: static; color: var(--muted); font-size: .68rem; font-weight: 650; }
    .finding-title, .finding-detail, .finding-page { max-width: none; }
    .run-label { min-width: 0; }
    .run-status { white-space: normal; line-height: 1.25; }
    .run-status::before { flex: 0 0 auto; }
  }
  @media (max-width: 520px) {
    .seo-intro { grid-template-columns: 1fr; }
    .seo-section-heading { flex-direction: column; gap: 12px; }
    .seo-section-heading .secondary-button { width: 100%; }
    .manual-check-actions { align-items: stretch; flex-direction: column; }
    .manual-check-error { margin: 0; }
    .manual-check-actions button { width: 100%; }
  }
}
