/* Moved from websites/templates/websites/_seo_report_styles.html (redesign checklist: local CSS out of the
   templates). Loaded only by the pages that include that partial. */

.seo-kpis { display: flex; gap: var(--space-2); overflow-x: auto;
  padding-bottom: var(--space-1); }
.seo-kpi { flex: 1 1 0; min-width: 92px; text-align: center;
  padding: var(--space-2) var(--space-1);
  border-radius: 18px; background: var(--white); box-shadow: var(--shadow-tile);
  border-top: 0; }
.seo-kpi b { display: block; font-size: 20px; font-weight: 900; line-height: 1.2;
  white-space: nowrap; }
.seo-kpi span { display: block; font-size: 11px; margin-top: 2px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.seo-kpi--good { border-top-color: var(--mint); }
.seo-kpi--good b { color: var(--mint-text); }
.seo-kpi--warn { border-top-color: var(--amber); }
.seo-kpi--warn b { color: var(--amber-text); }
.seo-kpi--bad { border-top-color: var(--coral); }
.seo-kpi--bad b { color: var(--coral-text); }

.seo-score-hero {
  display: flex; align-items: center; gap: var(--space-6);
  flex-wrap: wrap;
}
.seo-score-ring {
  --pct: 0; width: 120px; height: 120px; border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--color-surface) 76%, transparent 77%),
    conic-gradient(var(--ring-color, var(--color-accent)) calc(var(--pct) * 1%), var(--color-neutral-300) 0);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
}
.seo-counts { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.seo-counts .seo-count { text-align: center; }
.seo-counts .seo-count b { display: block; font-size: 22px; }
.seo-status { display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; white-space: nowrap; }
.seo-status--good { background: var(--mint-bg); color: var(--mint-text); }
.seo-status--warn { background: var(--amber-bg); color: var(--amber-text); }
.seo-status--bad  { background: var(--coral-bg); color: var(--coral-text); }
.seo-status--info { background: var(--grey-btn); color: var(--slate-text); }
/* `display: block` is load-bearing, not tidiness. The meter is a <span>,
   and on a non-replaced INLINE box `width`, `height` and `overflow` are all
   ignored — the bar draws at text height and clips nothing. It looked right
   everywhere only because every other caller puts it inside
   `.seo-check-score` (or `.rank-fact`), and a flex item is blockified. The
   two callers with a plain block parent — the website page's `.stage-wait`
   and `.rank-score` — got an unclipped 70px-tall bar that overflowed its box
   onto the buttons below. Declared here so the meter no longer depends on
   who its parent is. */
.seo-meter { display: block; width: 110px; height: 8px; border-radius: 999px;
  background: var(--color-neutral-300); overflow: hidden; }
.seo-meter span { display: block; height: 100%; border-radius: 999px; }
.seo-meter--good span { background: var(--mint); }
.seo-meter--warn span { background: var(--amber); }
.seo-meter--bad span  { background: var(--coral); }
.seo-check-score { display: flex; align-items: center; gap: var(--space-2); }

/* .seo-table-wrap moved to akoore.css — every page gets the scrollport,
   not only the ones importing the report styles. */
.seo-checks-table td { vertical-align: top; }
.seo-checks-table td.seo-cell-check { min-width: 230px; max-width: 320px; }
.seo-cell-result { min-width: 220px; max-width: 380px;
  overflow-wrap: anywhere; }
.seo-cell-quality { min-width: 150px; white-space: nowrap; }
.seo-cell-advice { min-width: 260px; max-width: 420px; }
.seo-advice { padding: var(--space-2) var(--space-3);
  border-left: 0; background: var(--amber-bg); border-radius: 14px; }
.seo-advice--bad { background: var(--coral-bg); }
.seo-advice--info { background: var(--row-tint); }

.seo-plan { margin: 0; padding-left: 1.4em; }
.seo-plan li { margin-bottom: var(--space-3); }
.seo-plan li:last-child { margin-bottom: 0; }
.seo-plan .seo-plan-meta { color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 12px; }
.seo-plan-group { margin-top: var(--space-4); }
.seo-plan-group h3 { margin: 0 0 var(--space-2); font-size: 15px; }
/* "How to use this plan" — the beginner briefing above the groups. */
.seo-plan-explainer { border: 0; border-radius: 18px;
  background: var(--color-neutral-100); padding: var(--space-3);
  margin-bottom: var(--space-2); }
.seo-plan-explainer li { margin-bottom: var(--space-2); }
/* The labelled parts of one recommendation (what to do / found / why). */
.seo-plan-part { margin-top: var(--space-1); }
.seo-section-head { display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap; }
.seo-section-head .seo-check-score { margin-left: auto; }
.seo-data-title { margin: var(--space-4) 0 var(--space-2); font-size: 14px; }
.seo-ai-qa { border: 1px solid var(--border); border-radius: 18px;
  margin-bottom: var(--space-2); }
.seo-ai-qa:last-child { margin-bottom: 0; }
.seo-ai-qa--cited { border-color: var(--mint);
  box-shadow: inset 3px 0 0 var(--mint); }
.seo-ai-qa-question { display: flex; align-items: baseline;
  gap: var(--space-2); flex-wrap: wrap; cursor: pointer;
  padding: var(--space-2) var(--space-3); list-style: none; }
.seo-ai-qa-question::-webkit-details-marker { display: none; }
.seo-ai-qa-question::before { content: "▸"; flex: 0 0 auto;
  color: color-mix(in srgb, var(--color-text) 45%, transparent); }
details[open] > .seo-ai-qa-question::before { content: "▾"; }
.seo-ai-qa-qtext { font-weight: 600; flex: 1 1 auto; min-width: 200px; }
.seo-ai-qa-body { padding: 0 var(--space-3) var(--space-3);
  border-top: 1px solid var(--color-divider); }
.seo-ai-qa-answer { margin: var(--space-2) 0; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.seo-ai-qa-links-title { margin: 0 0 var(--space-1); font-size: 12px;
  font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.seo-ai-qa-links { margin: 0; padding-left: 1.4em; }
.seo-ai-qa-links li { overflow-wrap: anywhere;
  margin-bottom: var(--space-1); }
.seo-ai-qa-links li:last-child { margin-bottom: 0; }
.seo-ai-qa-links li strong { margin-right: var(--space-1); }
.seo-ai-qa-link--own strong { color: var(--mint-text); }
.seo-ai-qa-domains { display: flex; align-items: baseline;
  gap: var(--space-1); flex-wrap: wrap; margin: 0 0 var(--space-3); }

/* Effort tags: who does the work (copy-paste / content / developer /
   outreach), shown on every check point and recommendation. */
.seo-effort { display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; white-space: nowrap; }
.seo-effort--copy-paste { background: var(--sky); color: var(--blue-deep); }
.seo-effort--content { background: #EFEAFB; color: var(--violet-text); }
.seo-effort--developer { background: var(--amber-bg); color: var(--amber-text); }
.seo-effort--outreach { background: #FBE8F1; color: var(--pink-text); }

/* Ready-to-paste fixes: one bordered block per fix with a copy button. */
.seo-fix { border: 1px solid var(--border); border-radius: 20px;
  padding: var(--space-3); margin-bottom: var(--space-3); }
.seo-fix:last-child { margin-bottom: 0; }
.seo-fix-head { display: flex; align-items: center; gap: var(--space-2);
  flex-wrap: wrap; }
.seo-fix-head h3 { margin: 0; font-size: 15px; flex: 1 1 auto; }
.seo-fix-code { background: var(--row-tint);
  border: 1px solid var(--border); border-radius: 14px;
  padding: var(--space-3); overflow-x: auto; font-size: 12px;
  line-height: 1.5; margin: var(--space-2) 0 0; white-space: pre; }
.seo-copy-btn { flex: 0 0 auto; }

/* Progress marks on the action plan and the score history line. */
.seo-mark-form { display: inline-flex; gap: var(--space-1);
  margin-top: var(--space-1); vertical-align: middle; }
.seo-mark-btn { font-size: 11px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--color-divider); background: var(--color-surface);
  cursor: pointer; }
.seo-mark-btn:hover { background: var(--color-neutral-200); }
.seo-mark-btn--active { background: var(--color-success-bg); border-color: var(--color-success);
  color: var(--color-success-text); font-weight: 600; }
.seo-rec--done { opacity: 0.55; }
.seo-rec--done > strong { text-decoration: line-through; }
.seo-history { display: flex; align-items: baseline; gap: var(--space-2);
  flex-wrap: wrap; }
.seo-history-point { white-space: nowrap; }
.seo-history-point b { font-size: 15px; }
.seo-history-arrow { color: color-mix(in srgb, var(--color-text) 40%, transparent); }

/* The report body. It used to be the right-hand column of a two-column
   layout whose left was a 240px sticky `.seo-toc`; every report navigates
   by the contents plate above it now (DOC_DESIGN_UI_KIT.md §4.8), so the
   body is the only child and takes the whole width. The wrapper stays
   because the print rules below key off it. Anchor targets keep a scroll
   margin so headings are not hidden under the viewport edge after a jump. */
.seo-report-layout { display: block; }
.seo-report-body { min-width: 0; }
.seo-report-body .card[id], .seo-report-body [id] { scroll-margin-top: 16px; }

/* Read by screen readers and by the copy-to-clipboard buttons, invisible
   on screen (table captions, the plain-text action plan). */
.seo-visually-hidden { position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }

/* ---- Print / PDF: the version you hand to a client or an agency ---- */
@media print {
  @page { margin: 14mm 12mm; }
  body { background: var(--white); }
  /* Everything that only makes sense on screen. */
  .site-header, .site-footer, .breadcrumbs, .messages,
  .seo-mark-form, .seo-copy-btn, form, .btn, .seo-plan-explainer ol,
  .header-search { display: none !important; }
  .seo-report-layout { display: block; }
  .seo-report-body { width: 100%; }
  .card { break-inside: avoid; page-break-inside: avoid;
    border: 1px solid var(--border); box-shadow: none; margin-bottom: 10mm; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  table { break-inside: auto; font-size: 10px; }
  tr, li { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }  /* repeat headers across pages */
  .seo-table-wrap { overflow: visible; }
  /* Collapsed blocks must print open — a printed report hides nothing. */
  details { display: block; }
  details > summary { list-style: none; font-weight: 600; }
  details > *:not(summary) { display: block !important; }
  /* Backgrounds are dropped by default; keep the status colours readable. */
  .seo-status, .seo-effort, .seo-kpi { border: 1px solid var(--slate);
    background: none !important; }
  .seo-meter { border: 1px solid var(--slate); }
  a { text-decoration: none; color: inherit; }
  /* Give the printed page the context the screen gets from the header. */
  .seo-print-stamp { display: block !important; margin-bottom: 6mm;
    font-size: 11px; }
}
.seo-print-stamp { display: none; }
