.research-report { min-width: 0; }
.research-report > h2 { margin-bottom: 8px; }
.research-metadata { margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; background: #f8fafc; }
.research-metadata > summary { cursor: pointer; color: var(--brand-2); font-weight: 600; }
.research-prose { color: #27364b; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; margin: 24px 0; }
.research-prose > p, .research-prose > ul, .research-prose > ol, .research-prose > blockquote { max-width: 85ch; }
.research-prose h3, .research-prose h4, .research-prose h5, .research-prose h6 { color: #172b42; line-height: 1.35; margin: 30px 0 12px; }
.research-prose h3 { font-size: 24px; }
.research-prose h4 { font-size: 21px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.research-prose h5, .research-prose h6 { font-size: 18px; }
.research-prose p { margin: 12px 0 18px; }
.research-prose ul, .research-prose ol { padding-left: 26px; margin: 14px 0 22px; }
.research-prose li { padding-left: 5px; margin: 9px 0; }
.research-prose strong { color: #172b42; }
.research-prose a { color: #19618b; text-decoration: underline; text-underline-offset: 3px; }
.research-table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; margin: 22px 0; }
.research-table-wrap table { width: 100%; min-width: 620px; margin: 0; border-collapse: collapse; table-layout: auto; font-size: 14px; line-height: 1.65; }
.research-table-wrap th { background: #edf3f8; color: #17344c; text-align: left; font-weight: 700; }
.research-table-wrap th, .research-table-wrap td { padding: 15px 18px; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 140px; white-space: normal; }
.research-table-wrap tbody tr:nth-child(even) { background: #f8fafc; }
.research-table-wrap tbody tr:last-child td { border-bottom: 0; }
.research-prose blockquote { border-left: 4px solid #3c82aa; padding: 14px 20px; background: #f0f7fb; margin: 20px 0; border-radius: 0 8px 8px 0; }
.research-prose pre { overflow-x: auto; padding: 16px; background: #f3f5f8; border-radius: 8px; }
.research-prose code { font-size: .9em; background: #f3f5f8; padding: 2px 4px; }
.research-prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.research-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; padding: 0; list-style: none; }
.research-sources li { border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; background: #f8fafc; overflow-wrap: anywhere; }
.research-sources a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .research-prose { font-size: 15px; line-height: 1.75; }
  .research-prose h3 { font-size: 22px; }
  .research-prose h4 { font-size: 19px; }
  .research-metadata { padding: 12px; }
}

[hidden] {
  display: none !important;
}

:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #d9e1ec;
  --brand: #17202e;
  --brand-2: #255f85;
  --accent: #13795b;
  --accent-dark: #0d6048;
  --indigo: #3f5fbf;
  --amber: #b7791f;
  --danger: #c43d3d;
  --success: #168253;
  --shadow: 0 5px 16px rgba(16, 24, 40, 0.10);
  --shadow-soft: 0 2px 7px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: var(--brand-2);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.topbar {
  min-height: 76px;
  color: white;
  background: #17202e;
  padding: 14px clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #293548;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.18);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar h1 {
  margin: 0 0 3px;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar p {
  margin: 0;
  color: #dfeaf2;
  max-width: 820px;
  line-height: 1.4;
  font-size: 12px;
}

.top-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
}

.topbar > div {
  flex: 0 0 270px;
}

.top-nav a {
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #39465a;
  background: #222d3d;
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.top-nav a.is-active {
  background: #13795b;
  border-color: #2b9a78;
}

.top-nav {
  overflow-x: auto;
  padding-bottom: 4px;
}

.top-nav a:hover {
  background: #304057;
  transform: none;
}

.layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 16px clamp(12px, 2vw, 24px) 36px;
}

.dashboard-layout {
  width: 100%;
  max-width: none;
  margin: 0;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

.dashboard-section {
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 92px;
}

.dashboard-section-summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.dashboard-drag-handle {
  position: relative;
  width: 30px;
  height: 34px;
  flex: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #667085;
  background: transparent;
  cursor: grab;
}

.dashboard-drag-handle::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 9px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor, 7px 0 0 currentColor, 7px 6px 0 currentColor, 7px 12px 0 currentColor;
}

.dashboard-drag-handle:hover,
.dashboard-drag-handle:focus-visible {
  color: var(--brand-strong);
  background: #eef6f5;
  outline: 2px solid transparent;
}

.dashboard-drag-handle:active {
  cursor: grabbing;
}

.dashboard-section.is-dragging {
  opacity: 0.55;
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(21, 94, 89, 0.18);
}

.screen-reader-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;
}

.dashboard-section-summary::-webkit-details-marker {
  display: none;
}

.dashboard-section-summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.dashboard-section[open] > .dashboard-section-summary::after {
  transform: rotate(225deg);
}

.dashboard-section-summary:hover {
  background: #f8fafc;
}

.dashboard-section[open] > .dashboard-section-summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.dashboard-section-title {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  font-weight: 900;
}

.dashboard-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.dashboard-section-meta {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 5px 9px;
  border: 1px solid #d8e0e9;
  border-radius: 6px;
  color: #526071;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.dashboard-section > h2:first-of-type,
.dashboard-section > .section-heading:first-of-type h2 {
  display: none;
}

.dashboard-section > form,
.dashboard-section > table,
.dashboard-section > p,
.dashboard-section > .section-heading,
.dashboard-section > .subsection-disclosure,
.dashboard-section > .website-cards {
  width: calc(100% - 36px);
  margin-left: 18px;
  margin-right: 18px;
}

.dashboard-section > .section-heading {
  align-items: center;
  margin-top: 14px;
  margin-bottom: 10px;
}

.dashboard-section > .section-heading p {
  margin-bottom: 0;
}

.dashboard-section > :last-child:not(summary) {
  margin-bottom: 18px;
}

.subsection-disclosure {
  border: 1px solid #dce3eb;
  border-radius: 7px;
  background: #fbfcfd;
}

.subsection-disclosure > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.subsection-disclosure[open] > summary {
  border-bottom: 1px solid #dce3eb;
}

.subsection-disclosure > .queue-settings {
  margin: 12px;
}

.website-management {
  margin-top: 14px;
}

.dashboard-table-scroll {
  max-height: 70vh;
  overflow: auto;
}

.dashboard-table-scroll th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.responsive-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.dashboard-section > .responsive-table-scroll {
  width: calc(100% - 36px);
  margin-left: 18px;
  margin-right: 18px;
}

h2[id] {
  scroll-margin-top: 132px;
}

h2 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  margin: 18px 0 10px;
  font-size: 16px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 11px 13px;
  min-height: 72px;
  box-shadow: none;
}

.kpi-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
}

.kpi-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.website-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 2px;
}

.website-card {
  border: 1px solid #d9e1ec;
  border-radius: 7px;
  padding: 13px;
  background: #ffffff;
  box-shadow: none;
}

.website-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.website-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.website-card__meta {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.website-card__meta span,
.website-card__status {
  font-size: 12px;
  color: var(--muted);
}

.website-card__status strong,
.website-card__meta strong {
  color: var(--ink);
}

.website-card__status {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.website-card__schedule {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.website-card__actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.website-card__actions form {
  margin: 0;
}

.website-card__actions form:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.website-card__actions .primary,
.website-card__actions .button {
  width: 100%;
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
}

.website-card__details {
  margin-top: 12px;
}

.website-card .knowledge-stats {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  margin-top: 8px;
  border: 1px solid #e3edf7;
  border-radius: 8px;
  padding: 8px;
  background: #f8fbfd;
}

.website-card .knowledge-stats span {
  color: var(--muted);
}

.website-card .knowledge-stats strong {
  color: var(--ink);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2,
.section-heading p {
  margin-top: 0;
}

.log-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(165px, 1fr));
  gap: 14px;
}

.nested {
  margin-top: 14px;
}

.queue-settings,
.fix-action-form {
  align-items: end;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 15px;
  margin-bottom: 18px;
}

.config-section {
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px 15px 16px;
  margin: 0;
}

.config-section + .config-section {
  margin-top: 2px;
}

.config-section legend {
  padding: 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.wide,
details {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #526071;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ccd6e3;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 143, 120, 0.16);
}

textarea {
  height: auto;
  min-height: 94px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

.check {
  flex-direction: row;
  align-items: center;
  color: var(--ink);
  min-height: 44px;
}

.check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.primary,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 0 16px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.button {
  background: var(--brand-2);
  box-shadow: none;
}

.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.danger-button {
  background: var(--danger);
  box-shadow: 0 10px 20px rgba(196, 61, 61, 0.16);
}

.warning-button {
  background: var(--amber);
  box-shadow: 0 10px 20px rgba(183, 121, 31, 0.16);
}

.local-seo-button.is-active {
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(14, 143, 120, 0.18);
}

.local-seo-button.is-inactive {
  background: #6b7280;
  box-shadow: 0 10px 20px rgba(107, 114, 128, 0.16);
}

.primary:hover,
.button:hover {
  color: white;
  transform: none;
  filter: brightness(0.94);
}

.primary:disabled,
.button:disabled,
.is-loading {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-fetch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 2px;
}

.contact-fetch-status {
  min-height: 22px;
  font-size: 13px;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--brand-2);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.external-link::after {
  content: "Open";
  flex: 0 0 auto;
  border: 1px solid #cdd8e4;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--accent-dark);
  background: #eefaf7;
  font-size: 11px;
  font-weight: 800;
}

.topbar .external-link {
  color: #ffffff;
}

.topbar .external-link::after {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.nested-metrics {
  margin-top: 6px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(23px, 2.4vw, 31px);
  line-height: 1.1;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: 9px 10px;
}

th {
  color: #5a6575;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  background: #f5f8fb;
}

tbody tr:hover td {
  background: #fbfdff;
}

.url {
  max-width: 340px;
  overflow-wrap: anywhere;
  color: #244c66;
}

.fix-where {
  min-width: 260px;
  font-size: 13px;
  line-height: 1.5;
}

.fix-where div + div,
.fix-where .inline-details {
  margin-top: 6px;
}

.fix-where code {
  display: inline-block;
  max-width: 340px;
  padding: 4px 6px;
}

.inline-details summary,
.profile-details summary,
.credentials-details summary,
details > summary {
  cursor: pointer;
  color: var(--brand-2);
  font-weight: 900;
}

.pill,
.queue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.queued {
  background: #eef2ff;
  color: #4b5dff;
}

.queue-badge {
  margin-top: 7px;
  background: #e8f7ef;
  color: var(--success);
}

.critical,
.high,
.failed,
.error,
.publish_failed {
  background: #fff0f0;
  color: var(--danger);
}

.medium {
  background: #fff6df;
  color: var(--amber);
}

.low,
.success,
.ok,
.published {
  background: #e8f7ef;
  color: var(--success);
}

.skipped,
.publish_skipped {
  background: #edf2f7;
  color: var(--muted);
}

.evidence {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.table-shell {
  overflow-x: auto;
}

.section-heading {
  align-items: center;
}

.fix-steps {
  margin: 0;
  padding-left: 18px;
}

.fix-steps li {
  margin-bottom: 5px;
}

.publish-diagnosis {
  margin: 0 0 8px;
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  background: #fff8e8;
  color: #5f4618;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.pipeline-steps span {
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
}

.detail-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.detail-list li {
  margin-bottom: 8px;
}

.issue-groups {
  display: grid;
  gap: 12px;
}

.issue-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.issue-card summary {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
}

.issue-title {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.issue-count {
  color: var(--muted);
  white-space: nowrap;
}

.issue-body {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.fix-box {
  border-left: 4px solid var(--accent);
  background: #eefaf7;
  padding: 12px 14px;
  margin: 10px 0 14px;
  border-radius: 0 8px 8px 0;
}

.affected-pages {
  display: grid;
  gap: 10px;
}

.affected-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.affected-page h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #244c66;
  overflow-wrap: anywhere;
}

.affected-page p {
  margin: 6px 0;
}

code,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #eef3f8;
  border-radius: 8px;
  padding: 8px;
}

p,
td,
th {
  overflow-wrap: anywhere;
}

.blog-preview {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.featured-preview {
  width: min(380px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  margin: 10px 0;
}

.muted {
  color: var(--muted);
}

.website-health {
  min-width: 118px;
}

.health-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.health-button.is-up {
  background: var(--success);
  box-shadow: 0 8px 16px rgba(13, 126, 95, 0.18);
}

.health-button.is-down {
  background: var(--danger);
  box-shadow: 0 8px 16px rgba(196, 61, 61, 0.18);
}

.health-button.is-unknown {
  background: #64748b;
  box-shadow: 0 8px 16px rgba(100, 116, 139, 0.18);
}

.health-button:hover {
  transform: translateY(-1px);
}

.health-button:disabled,
.health-button.is-checking {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.health-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-actions {
  min-width: 168px;
}

.profile-actions form {
  margin: 0 0 8px;
}

.profile-actions > .button {
  width: 100%;
  margin-bottom: 8px;
}

.backlink-status-form {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 420px;
}

.profile-detail-row td {
  padding-top: 0;
  background: #f7fafc;
}

.profile-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 13px;
}

.knowledge-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.knowledge-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.knowledge-heading h3 {
  margin-top: 0;
}

.knowledge-heading p {
  margin: 4px 0 0;
}

.knowledge-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.knowledge-stats span {
  min-height: 54px;
  padding: 10px;
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-stats strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.knowledge-scroll {
  overflow-x: auto;
}

.knowledge-table {
  min-width: 980px;
  font-size: 13px;
}

.knowledge-description {
  max-width: 380px;
  margin-top: 6px;
  line-height: 1.45;
}

.knowledge-conflict {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-actions {
  min-width: 190px;
}

.knowledge-actions form {
  margin: 0 0 8px;
}

.knowledge-status-message {
  margin: 2px 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--success);
}

.knowledge-status-message.is-error {
  color: var(--danger);
}

.knowledge-edit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 260px;
  margin-top: 8px;
}

.knowledge-pages ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.status-approved,
.status-active,
.status-auto_approved {
  background: #e8f7ef;
  color: var(--success);
}

.status-discovered,
.status-review_required,
.status-no_longer_detected {
  background: #fff6df;
  color: var(--amber);
}

.status-rejected {
  background: #fff0f0;
  color: var(--danger);
}

.profile-edit-form {
  margin-top: 14px;
}

.saved-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.saved-details-grid strong {
  color: var(--ink);
}

.show-secrets {
  margin-top: 12px;
}

.retry-details {
  margin-top: 10px;
  min-width: 360px;
}

.log-details {
  max-width: 390px;
  max-height: 170px;
  overflow: auto;
  margin: 0;
  font-size: 12px;
}

.log-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.live-log-viewer {
  width: 100%;
  max-width: none;
  min-height: 430px;
  max-height: calc(100vh - 330px);
  overflow: auto;
  margin: 0;
  border: 1px solid #24364d;
  border-radius: 8px;
  background: #101827;
  color: #edf8f4;
  padding: 16px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.html-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  margin: 10px 0 14px;
}

.blog-reader {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin: 0 0 18px;
}

.blog-description {
  color: #344054;
  font-size: 17px;
  line-height: 1.6;
}

.blog-full-body {
  line-height: 1.7;
}

.blog-full-body img {
  max-width: 100%;
  height: auto;
}

.html-copy {
  width: 100%;
  min-height: 280px;
  border: 1px solid #24364d;
  border-radius: 8px;
  padding: 12px;
  font-family: Consolas, monospace;
  font-size: 13px;
  white-space: pre;
  background: #111827;
  color: #edf8f4;
}

.improvement-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 0 0 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.blog-editor-disclosure > summary {
  cursor: pointer;
  color: var(--brand-2);
  font-size: 16px;
  font-weight: 900;
}

.blog-editor-disclosure[open] > summary {
  margin-bottom: 12px;
}

.blog-edit-form textarea {
  min-height: 420px;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.edit-success,
.audit-stale-notice {
  padding: 11px 13px;
  border: 1px solid #aad9c9;
  border-radius: 6px;
  color: #125846;
  background: #eefaf6;
}

.audit-stale-notice {
  border-color: #ead39b;
  color: #755012;
  background: #fff9e9;
}

.improvement-context span,
.improvement-meta dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.improvement-form {
  margin-bottom: 18px;
}

.improvement-result {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.improvement-result h3,
.improvement-result h4 {
  margin: 0 0 8px;
}

.improvement-result h4 {
  margin-top: 18px;
}

.improvement-meta {
  display: grid;
  gap: 0;
  margin: 18px 0;
  border-top: 1px solid var(--line);
}

.improvement-meta > div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.improvement-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.improvement-meta dd {
  margin: 0;
}

.improved-draft,
.improvement-history {
  margin-top: 18px;
}

.improved-draft > summary,
.improvement-history > summary {
  cursor: pointer;
  color: var(--brand-2);
  font-weight: 900;
}

.improved-draft .html-preview {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .improvement-context,
  .improvement-meta > div {
    grid-template-columns: 1fr;
  }
}

.audit-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.55);
  backdrop-filter: blur(6px);
}

.audit-loader[hidden] {
  display: none;
}

.loader-card {
  width: min(620px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.22);
  padding: 24px;
}

.loader-top {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: center;
}

.loader-top h2 {
  margin: 0 0 6px;
}

.loader-top p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #dce6ef;
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

.progress-track {
  height: 10px;
  margin: 22px 0 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6edf5;
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--indigo));
  transition: width 0.45s ease;
}

.loader-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.loader-error {
  margin: 16px 0 0;
  color: var(--danger);
  font-weight: 900;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-nav a {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    position: static;
  }

  .topbar > div {
    flex: 0 0 auto;
  }

  .topbar p {
    display: none;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .top-nav a {
    padding: 6px 10px;
    font-size: 12px;
  }

  .kpi-strip {
    gap: 8px;
  }

  .website-cards {
    grid-template-columns: 1fr;
  }

  .website-card__meta {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
  }

  .layout {
    padding: 10px;
  }

  .panel {
    padding: 13px;
  }

  .dashboard-section {
    padding: 0;
    scroll-margin-top: 10px;
  }

  .dashboard-section-summary {
    min-height: 58px;
    padding: 10px 13px;
  }

  .dashboard-section-title small {
    max-width: 210px;
  }

  .dashboard-section-meta {
    display: none;
  }

  .kpi-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .dashboard-section > form,
  .dashboard-section > table,
  .dashboard-section > p,
  .dashboard-section > .section-heading,
  .dashboard-section > .subsection-disclosure,
  .dashboard-section > .website-cards {
    width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }

  table {
    min-width: 680px;
  }

  .issue-card summary {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .issue-count {
    white-space: normal;
  }

  .log-status {
    white-space: normal;
  }

  .live-log-viewer {
    min-height: 360px;
    max-height: 70vh;
  }

  .dashboard-section > .responsive-table-scroll {
    width: calc(100% - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }

  .form-grid > *,
  .config-section,
  .section-heading > *,
  .website-card,
  .metric,
  .topbar > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .website-card .knowledge-stats,
  .saved-details-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-heading {
    flex-direction: column;
  }

  input,
  select,
  textarea {
    min-width: 0;
    font-size: 16px;
  }

  .button,
  .primary,
  .top-nav a,
  details > summary {
    min-height: 44px;
  }

  .button,
  .primary {
    max-width: 100%;
    padding-top: 8px;
    padding-bottom: 8px;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
  }

  .topbar .external-link {
    display: inline-flex;
  }

  .topbar p:has(.external-link) {
    display: block;
  }

  .mobile-blog-table,
  .mobile-blog-table tbody,
  .mobile-blog-table tr,
  .mobile-blog-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .mobile-blog-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .mobile-blog-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .mobile-blog-table td {
    overflow-wrap: anywhere;
  }

  .mobile-blog-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-blog-table td:last-child {
    border-bottom: 0;
  }

  .mobile-blog-table td > form {
    margin-top: 8px;
  }

  .mobile-blog-table .retry-details {
    min-width: 0;
  }

  .blog-reader,
  .html-preview,
  .blog-full-body {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .blog-full-body,
  .html-preview {
    overflow-x: auto;
  }

  .html-preview img,
  .blog-full-body iframe,
  .blog-full-body video {
    max-width: 100%;
  }

  .html-preview img {
    height: auto;
  }

  .audit-loader {
    padding: 12px;
    overflow-y: auto;
  }

  .loader-card {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 16px;
  }
}
