/* The SEO page (seo/seo.js; docs/seo-in-hub.md), in the calm redesign. Loaded after styles.css, so a rule here wins over the same rule there.
   Docs/Hub design standard.md has the rules. Colours only from the tokens in styles.css (light and dark alike). */

.seo-screen .seo-hero .seo-src { margin-top: 8px; }
.seo-src { margin: 4px 0 0; font: 400 .85rem/1.4 var(--rt-body); color: var(--text-2); }

/* The Hub's own parts, folded one under another below the design's (the exact design replica, Oct 23, 2026). */
.seo-cols { display: flex; flex-direction: column; gap: 4px; }

.seo-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--calm-line); border-radius: var(--r-card); background: var(--surface); }
.seo-h { margin: 0; font: 700 1.05rem/1.3 var(--rt-body); color: var(--text); }
.seo-h3 { margin: 6px 0 0; font: 600 .9rem/1.3 var(--rt-body); color: var(--text-2); }

/* The numbers: Barlow Condensed, the words under them quiet. */
.seo-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.seo-stat { display: flex; flex-direction: column; min-width: 0; }
.seo-num { font: 700 2rem/1.05 var(--rt-cond); color: var(--text); font-variant-numeric: tabular-nums; }
.seo-lab { font: 400 .85rem/1.3 var(--rt-body); color: var(--text-2); }

/* A row with a soft bar under it (pages, where leads came from). */
.seo-bars { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.seo-bar-t { display: flex; justify-content: space-between; gap: 12px; font: 400 .95rem/1.35 var(--rt-body); color: var(--text); }
.seo-bar-l { min-width: 0; overflow-wrap: anywhere; }
.seo-bar-n { flex: none; color: var(--text-2); font-variant-numeric: tabular-nums; }
.seo-bar-track { display: block; height: 6px; margin-top: 4px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.seo-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--link); transform-origin: 0 50%; transition: transform var(--t-screen) var(--ease-out); }

/* The top searches: the words, the counts, and ours or not ours. */
.seo-terms { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
/* Top search terms: the design's .keyword-row (styles.css .ds-keyword-row), ours or not ours in its badge. */
.seo-term > strong { min-width: 0; overflow-wrap: anywhere; }
/* A badge in a keyword row or a metric card is a direct span there, so styles.css's quiet "> span" rules (the position,
   the card's title) would turn it grey, and block and bigger in the card; its own tone and size come back here. In the
   row it keeps the position's width, its words centred in the pill. */
.seo-screen :is(.ds-keyword-row, .ds-metric-card) > .ds-badge { display: inline-flex; color: var(--text-3); font-size: 0.7rem; }
.seo-screen .ds-keyword-row > .ds-badge { justify-content: center; }
.seo-screen :is(.ds-keyword-row, .ds-metric-card) > .ds-badge--blue { color: var(--link); }
.seo-screen :is(.ds-keyword-row, .ds-metric-card) > .ds-badge--green { color: var(--rt-ok); }
.seo-screen :is(.ds-keyword-row, .ds-metric-card) > .ds-badge--amber { color: var(--ds-amber); }
.seo-screen :is(.ds-keyword-row, .ds-metric-card) > .ds-badge--red { color: var(--rt-bad); }

.seo-err { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font: 400 .9rem/1.4 var(--rt-body); color: var(--rt-bad); }
.seo-err .ic { flex: none; margin-top: 2px; }
.seo-missing { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.seo-missing p { display: flex; gap: 8px; margin: 0; }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.seo-links .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Switching between Marketing's tabs (ads/mk-shape.js switchIn): one page, so the new tab fades in quickly instead of rising.
   Reduce motion gets the same quick fade (css/motion.css). */
.mk-switch.enter-rise { animation: cr-fade var(--motion-fast) ease-out backwards; }

/* The hero's ring: the design's .score-ring, filled by Google search's share of all leads (--share, set from seo.js). */
.ds-score-ring.seo-ring { position: relative; flex: none; border: 0; }
.ds-score-ring.seo-ring::before { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--accent) var(--share, 0%), var(--surface-2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), var(--text) calc(100% - 9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), var(--text) calc(100% - 9px)); content: ""; }
.seo-hero > div { min-width: 0; }
.seo-sec > .more-b { display: flex; flex-direction: column; gap: 12px; }
.seo-h3 { margin: 0; }
.seo-screen a.ds-button { text-decoration: none; }
.seo-cols > .more.seo-sec { padding: 4px 22px; }
.seo-cols > .more.seo-sec[open] { padding-bottom: 20px; }
/* The clicks card's line sits beside its number, clear of the badge under it. */
.seo-screen .seo-metrics .ds-metric-card svg { top: 54px; bottom: auto; width: 40%; height: 46px; }
/* The Search health hero: the recipe in one quiet line under the score's words. */
.seo-screen .seo-hero .seo-recipe { max-width: 62ch; margin: 10px 0 0; font-size: .78rem; line-height: 1.45; }
/* The Hub's own numbers under the design's three. */
.seo-screen .seo-metrics-2 .ds-metric-card { min-height: 0; }
