/*!
 * seocert.css: the seocert design system (PRD R9, docs/UI_REDESIGN_PROPOSAL.md).
 * Paper, ink and stamp. Plain CSS: no framework, no build step.
 * Tokens follow "Design tokens" in docs/SEO_PRODUCT_AND_PLATFORM_PROPOSAL.md (v7.0).
 * Legacy CSS (w3.css, style-181025.css) is loaded in the `legacy` cascade layer
 * through /css/legacy.css, so every rule here wins over it.
 */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Oswald";
  src: url("/fonts/oswald/oswald-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("/fonts/oswald/oswald-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --stamp: #BF2927;
  --stamp-dark: #9E1D22;
  --stamp-tint: #FBECEA;
  --ink: #2E2D27;
  --ink-muted: #63625B;
  --rule: #DEDDD5;
  --rule-strong: #C9C8BE;
  --field-border: #8C8B83;
  --paper: #FFFFFF;
  --paper-warm: #F4F4F2;
  --good: #2A7549;
  --good-tint: #E8F3EC;
  --attention: #8A5A00;
  --attention-tint: #FFF4DC;
  --link: #1F5FA8;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --radius: 6px;
  --w-read: 720px;
  --w-wide: 1120px;
  --shadow-pop: 0 6px 24px rgba(46, 45, 39, .14), 0 1px 3px rgba(46, 45, 39, .10);
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--ink);
  --header-h: 56px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 100%; }
/* W3.CSS sets html and body to Verdana 15px; this file loads after it and resets both. */
body.sc {
  margin: 0;
  background: var(--paper-warm);
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
}
:where(.sc) :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-body); line-height: 1.25; margin: 0 0 var(--s3); font-weight: 650; color: var(--ink); }
:where(.sc) h1 { font: 700 2rem/1.15 var(--font-display); letter-spacing: .01em; }
:where(.sc) h2 { font-size: 1.375rem; margin-top: var(--s6); }
:where(.sc) h3 { font-size: 1.125rem; margin-top: var(--s5); }
:where(.sc) h4 { font-size: 1rem; }
.sc :where(p, ul, ol, dl) { margin: 0 0 var(--s4); }
.sc :where(a) { color: var(--link); text-underline-offset: 2px; }
.sc :where(a:hover) { color: var(--stamp-dark); }
.sc :where(img, svg) { max-width: 100%; height: auto; }
.sc :where(code, kbd, samp) { font-family: var(--font-mono); font-size: .9em; }
.sc :where(hr) { border: 0; border-top: 1px solid var(--rule); margin: var(--s5) 0; }
.sc :focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }
.sc ::selection { background: var(--stamp-tint); }
.num { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: var(--s3) !important; }
.mt-6 { margin-top: var(--s6) !important; }
.muted { color: var(--ink-muted); }
.small { font-size: .8125rem; }
.lead { font-size: 1.125rem; color: var(--ink-muted); max-width: 60ch; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:where(.sc) [id] { scroll-margin-top: calc(var(--header-h) + var(--s4)); }
.skip-link { position: absolute; left: var(--s2); top: -100px; z-index: 100; background: var(--paper); padding: var(--s2) var(--s3); }
.skip-link:focus { top: var(--s2); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon-sm { width: 1em; height: 1em; vertical-align: -.125em; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--w-wide); margin-inline: auto; padding-inline: var(--s4); }
.wrap-read { max-width: calc(var(--w-read) + 2 * var(--s4)); }
.page { padding-block: var(--s5) var(--s7); }
.page-hero { padding-top: 0; }
.page-hero > .analyze-hero { margin-bottom: var(--s6); }
.page-head { margin-bottom: var(--s5); }
.page-head .lead { margin-bottom: 0; }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.row-between { justify-content: space-between; }
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-2 { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.with-aside { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .with-aside { grid-template-columns: minmax(0, 1fr) 300px; } }

/* Unconverted page bodies (until each page moves to the new components): contain their floats
   and let wide legacy tables scroll inside the page, as the old w3-container w3-responsive wrapper did. */
.legacy-body { display: flow-root; overflow-x: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 36px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.nav-group { position: relative; }
.nav-group > summary, .nav-link {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 44px; padding: 0 var(--s3); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: .9375rem; white-space: nowrap;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover, .nav-link:hover { background: var(--paper-warm); color: var(--ink); }
.nav-group[open] > summary .icon { transform: rotate(180deg); }
.nav-link[aria-current="page"], .nav-group.is-current > summary { box-shadow: inset 0 -3px 0 var(--stamp); border-radius: 0; }
.nav-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 290px; z-index: 60;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: var(--s2); margin: 0; list-style: none;
}
.nav-menu a {
  display: block; padding: var(--s2) var(--s3); border-radius: 4px;
  color: var(--ink); text-decoration: none; line-height: 1.35;
}
.nav-menu a small { display: block; color: var(--ink-muted); font-size: .8125rem; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--paper-warm); }
.nav-menu-right { left: auto; right: 0; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-toggle > summary { list-style: none; }
  .nav-toggle > summary::-webkit-details-marker { display: none; }
  .nav { display: none; }
  .nav-toggle[open] + .nav, .nav-toggle[open] ~ .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-pop);
    padding: var(--s2) var(--s4) var(--s4); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-group > summary, .nav-link { justify-content: flex-start; width: 100%; }
  .nav-group > summary > .icon:last-child { margin-left: auto; }
  .nav-menu { position: static; box-shadow: none; border: 0; padding: 0 0 var(--s2) var(--s3); min-width: 0; }
  .nav-link[aria-current="page"], .nav-group.is-current > summary { box-shadow: inset 3px 0 0 var(--stamp); }
}

/* Analyze bar: always visible, every width (R9.3). */
.analyze-bar { background: var(--paper-warm); border-bottom: 1px solid var(--rule); padding-block: var(--s3); }
.analyze-form { display: flex; gap: var(--s2); align-items: stretch; max-width: var(--w-read); }
.analyze-form .input { flex: 1; min-width: 0; }
.analyze-hero { background: var(--paper); border-bottom: 1px solid var(--rule); padding-block: var(--s7); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; grid-template-columns: minmax(0, 1fr); }
.hero-grid h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); max-width: 22ch; }
.hero-stamp { display: none; width: 100%; max-width: 340px; height: auto; justify-self: center; }
.hero-links { margin: var(--s4) 0 0; font-size: .9375rem; color: var(--ink-muted); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; } .hero-stamp { display: block; } }
.analyze-hero .analyze-form { margin-top: var(--s5); }
.analyze-hero .input, .analyze-hero .btn { min-height: 52px; font-size: 1.0625rem; }
@media (max-width: 480px) {
  .analyze-hero .analyze-form { flex-direction: column; }
}

/* Tool pages: one input and one button on a line (wraps on phones) */
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: stretch; max-width: var(--w-read); margin-bottom: var(--s5); }
.inline-form .input { flex: 1 1 260px; min-width: 0; }
.inline-form .btn { flex: none; }
.related-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: .9375rem; margin: 0 0 var(--s5); padding: 0; list-style: none; }
.section-title { font-size: 1.25rem; margin: var(--s6) 0 var(--s3); }
.prose { max-width: var(--w-read); }
.prose p, .prose li { color: var(--ink); }

/* Read-only code output (sitemap XML, meta tags) */
.code-box {
  width: 100%; min-height: 240px; padding: var(--s3); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: #FBFBF9; color: var(--ink); font: .8125rem/1.5 var(--font-mono); white-space: pre; overflow: auto; resize: vertical;
}

/* Raw text records (whois) */
.raw-box { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4); font: .8125rem/1.6 var(--font-mono); max-height: 520px; overflow: auto; overflow-wrap: anywhere; }
.stat { font-size: 1.375rem; margin: var(--s1) 0; font-variant-numeric: tabular-nums; }
.kv + .section-title, .grid + .kv { margin-top: var(--s5); }

/* Search-result preview (title and meta optimizer) */
.serp { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4); font-family: Arial, sans-serif; overflow-wrap: anywhere; }
.serp-url { color: #202124; font-size: .875rem; }
.serp-title { color: #1a0dab; font-size: 1.25rem; line-height: 1.3; margin: 2px 0; }
.serp-desc { color: #4d5156; font-size: .875rem; line-height: 1.58; }
.counter { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; font-size: .8125rem; color: var(--ink-muted); margin-top: var(--s1); }
.yesno-yes { color: var(--good); font-weight: 650; white-space: nowrap; }
.yesno-no { color: var(--ink-muted); white-space: nowrap; }
#cke .cell-title { overflow-wrap: anywhere; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4); border-radius: var(--radius);
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 600 .9375rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--paper-warm); color: var(--ink); }
.btn-primary { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.btn-primary:hover { background: var(--stamp-dark); border-color: var(--stamp-dark); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--link); padding-inline: var(--s2); }
.btn-quiet:hover { background: var(--paper-warm); color: var(--stamp-dark); }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: .875rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: var(--s1); margin-bottom: var(--s4); }
.field > label, .label { font-weight: 600; font-size: .9375rem; }
.field .help { color: var(--ink-muted); font-size: .8125rem; margin: 0; }
.field .error { color: var(--stamp-dark); font-size: .875rem; font-weight: 600; margin: 0; display: flex; gap: var(--s1); align-items: center; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: var(--s2) var(--s3);
  border: 1px solid var(--field-border); border-radius: var(--radius); background: var(--paper);
  color: var(--ink); font: 1rem/1.4 var(--font-body);
}
.textarea { min-height: 120px; resize: vertical; }
.textarea-sm { min-height: 72px; }
.input::placeholder { color: #74736C; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(46, 45, 39, .15); }
.field.has-error .input, .field.has-error .textarea { border-color: var(--stamp); background: var(--stamp-tint); }
.check-input { display: flex; gap: var(--s2); align-items: flex-start; min-height: 44px; padding-top: 10px; }
.check-input input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s5); }
.captcha { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.captcha img { border: 1px solid var(--rule); border-radius: 4px; height: 44px; width: auto; }

/* ---------- Card ---------- */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s5); }
.card > :last-child { margin-bottom: 0; }
.card-title { font-size: 1.125rem; margin: 0 0 var(--s2); }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s; }
.card-link:hover { border-color: var(--ink-muted); color: inherit; }
.card-link .card-title { color: var(--link); }
.card-sm { padding: var(--s4); }
@media (max-width: 480px) { .card { padding: var(--s4); } }

/* ---------- Status chip (icon + word, never color alone) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px;
  border-radius: 999px; border: 1px solid transparent; font-size: .8125rem; font-weight: 650; line-height: 1.5;
  white-space: nowrap;
}
.chip .icon { width: 1.1em; height: 1.1em; }
.chip-good { background: var(--good-tint); color: var(--good); }
.chip-problem { background: var(--stamp-tint); color: var(--stamp-dark); }
.chip-attention { background: var(--attention-tint); color: var(--attention); }
.chip-unknown { background: transparent; color: var(--ink-muted); border: 1px dashed var(--rule-strong); }
.chip-neutral { background: var(--paper-warm); color: var(--ink); border-color: var(--rule); }

/* ---------- Stamp (verification mark) ---------- */
.stamp {
  display: inline-block; padding: 3px 9px; transform: rotate(-2deg);
  border: 3px double currentColor; border-radius: 2px;
  font: 700 .8125rem/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.stamp-good { color: var(--good); }
.stamp-brand { color: var(--stamp); }

/* ---------- Alert ---------- */
.alert {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s3) var(--s4); border-radius: var(--radius); border: 1px solid; margin-bottom: var(--s4);
}
.alert > .icon { margin-top: 2px; }
.alert p { margin: 0; }
.alert-problem { background: var(--stamp-tint); border-color: #EFC5C0; color: var(--stamp-dark); }
.alert-attention { background: var(--attention-tint); border-color: #F1DCA7; color: var(--attention); }
.alert-good { background: var(--good-tint); border-color: #BFDCC9; color: var(--good); }
.alert-info { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.alert a { color: inherit; font-weight: 650; }

/* ---------- Data table: cards on phones ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--paper); font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; font-weight: 650; padding: var(--s3); background: var(--paper); border-bottom: 1px solid var(--rule); }
.data-table th, .data-table td {
  padding: 10px var(--s3); text-align: left; vertical-align: top;
  border: 0; border-bottom: 1px solid var(--rule); font-size: .9375rem;
}
.data-table thead th {
  background: var(--paper-warm); color: var(--ink-muted);
  font-size: .8125rem; font-weight: 650; text-transform: none; letter-spacing: 0; white-space: nowrap;
  border-bottom-color: var(--rule-strong);
}
.data-table tbody tr:hover { background: #FAFAF8; }
.data-table .is-num { text-align: right; }
.data-table .is-problem { background: var(--stamp-tint); }
.data-table td.cell-url { word-break: break-word; }
.table-card-frame { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.table-card-frame .data-table tbody tr:last-child > * { border-bottom: 0; }

@media (max-width: 639px) {
  .data-table.stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.stack-sm, .data-table.stack-sm tbody, .data-table.stack-sm tr, .data-table.stack-sm td { display: block; width: 100%; }
  .data-table.stack-sm { background: transparent; }
  .table-card-frame:has(.stack-sm) { border: 0; overflow: visible; }
  .data-table.stack-sm tr {
    background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: var(--s2) var(--s3); margin-bottom: var(--s3);
  }
  .data-table.stack-sm td {
    display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: var(--s3);
    border: 0; padding: 6px 0; text-align: left;
  }
  .data-table.stack-sm td > .chip { justify-self: start; }
  .data-table.stack-sm caption { display: block; background: transparent; border: 0; padding: 0 0 var(--s2); }
  .data-table.stack-sm td::before { content: attr(data-label); color: var(--ink-muted); font-size: .8125rem; font-weight: 600; }
  .data-table.stack-sm td[data-label=""]::before, .data-table.stack-sm td.cell-title::before { display: none; }
  .data-table.stack-sm td.cell-title { display: block; font-weight: 650; padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); margin-bottom: var(--s1); }
}

/* Key and value list (replaces two-column layout tables) */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: var(--s2) var(--s5); margin: 0; }
.kv dt { color: var(--ink-muted); font-size: .875rem; font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: var(--s3); } }

/* ---------- Disclosure ---------- */
.disclosure { border-top: 1px solid var(--rule); }
.disclosure > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s2);
  min-height: 44px; color: var(--link); font-weight: 600; font-size: .9375rem;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { transition: transform .15s; transform: rotate(-90deg); }
.disclosure[open] > summary .icon { transform: rotate(0); }
.disclosure > .disclosure-body { padding: 0 0 var(--s3) calc(1.25em + var(--s2)); color: var(--ink); }
.disclosure-row { display: flex; flex-wrap: wrap; column-gap: var(--s5); }
.disclosure-row > .disclosure { border-top: 0; }

/* ---------- Report: summary, score, check cards ---------- */
.report-summary {
  display: grid; gap: var(--s5); align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
}
@media (max-width: 560px) {
  .report-summary { gap: var(--s4); align-items: start; }
  .report-summary .score { width: 88px; height: 88px; }
  .report-summary .score-value { font-size: 2rem; }
}
.score {
  display: grid; place-items: center; width: 128px; height: 128px; border-radius: 50%;
  border: 3px double var(--ink); background: var(--paper); text-align: center;
}
.score-value { font: 700 2.75rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.score-max { display: block; font-size: .8125rem; color: var(--ink-muted); }
.score-meter { height: 8px; border-radius: 4px; background: var(--paper-warm); overflow: hidden; border: 1px solid var(--rule); }
.score-meter > span { display: block; height: 100%; background: var(--ink); }
.counts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; padding: 0; list-style: none; }

.jump-links { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s3) 0; margin: var(--s5) 0 var(--s4); border-block: 1px solid var(--rule); }
.jump-links a { padding: 6px var(--s3); border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: .875rem; font-weight: 600; }
.jump-links a:hover { border-color: var(--ink-muted); }

.check { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4) var(--s5) var(--s2); margin-bottom: var(--s3); }
.check-head { display: flex; gap: var(--s3); align-items: flex-start; justify-content: space-between; margin-bottom: var(--s2); }
.check-title { margin: 0; font-size: 1.0625rem; font-weight: 650; }
.check-finding { margin: 0 0 var(--s3); overflow-wrap: anywhere; }
.check-problem { border-left: 4px solid var(--stamp); }
.check-attention { border-left: 4px solid #D9A63A; }
.check-good { border-left: 4px solid var(--good); }
.check-unknown { border-left: 4px dashed var(--rule-strong); }
.check .data-table th, .check .data-table td { font-size: .875rem; padding: 6px var(--s2); }
@media (max-width: 480px) {
  .check { padding: var(--s3) var(--s4) var(--s1); }
  .check-head { flex-direction: column; gap: var(--s1); }
}

/* Report page (UI-3) */
.report-cover { position: relative; overflow: hidden; }
.report-cover .report-summary { position: relative; z-index: 1; }
.report-logo { display: none; position: absolute; right: var(--s5); top: 50%; transform: translateY(-50%); width: 200px; height: auto; opacity: .9; }
@media (min-width: 900px) { .report-cover .report-summary { padding-right: 220px; } .report-logo { display: block; } }
.eyebrow { margin: 0 0 2px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.report-site { margin: 0 0 4px; font-size: 1.625rem; overflow-wrap: anywhere; }
.inline-control { display: inline-flex; margin: 0; }
.report-group { scroll-margin-top: 72px; }
.report-group .check { scroll-margin-top: 72px; }
.jump-count { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: var(--stamp-tint); color: var(--stamp-dark); font-size: .75rem; }
.check-value { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-left: 3px solid var(--rule-strong); background: var(--paper-warm); overflow-wrap: anywhere; }
.check-subhead { margin: var(--s3) 0 var(--s2); font-size: .875rem; color: var(--ink-muted); }
.check-tool { margin: var(--s3) 0 var(--s2); }
.check-tool .icon { width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; }
.check .kv { margin-bottom: var(--s2); }
.check .disclosure-body ul { margin: 0; padding-left: 1.2em; }
.cloud { line-height: 1.9; overflow-wrap: anywhere; }
.cloud span { margin-right: .5em; }
.cloud-1 { font-size: .8125rem; color: var(--ink-muted); } .cloud-2 { font-size: .9375rem; } .cloud-3 { font-size: 1.125rem; }
.cloud-4 { font-size: 1.375rem; font-weight: 600; } .cloud-5 { font-size: 1.75rem; font-weight: 700; }
.fix-more { margin: var(--s3) 0 0; font-size: .875rem; }
@media print { .report-logo { display: block; width: 140px; } .report-cover .report-summary { padding-right: 160px; } .report-group { break-before: auto; } }

.fix-list { list-style: none; padding: 0; margin: 0; counter-reset: fix; }
.fix-list li {
  counter-increment: fix; display: grid; grid-template-columns: 32px 1fr auto; gap: var(--s3); align-items: start;
  padding: var(--s3) 0; border-bottom: 1px solid var(--rule);
}
.fix-list li:last-child { border-bottom: 0; }
.fix-list li::before {
  content: counter(fix); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 700 .875rem/1 var(--font-display);
}
@media (max-width: 480px) { .fix-list li { grid-template-columns: 32px 1fr; } .fix-list li > :last-child { grid-column: 2; justify-self: start; } }

/* Compare: two sites side by side, stacked on phones */
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.compare-cell { background: var(--paper-warm); border-radius: 4px; padding: var(--s3); min-width: 0; overflow-wrap: anywhere; }
.compare-cell.is-winner { background: var(--good-tint); }
.compare-cell .site-label { display: block; font-size: .75rem; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 560px) { .compare-row { grid-template-columns: 1fr; } }

/* Compare page (UI-3b) */
.compare-form { display: grid; gap: var(--s3); grid-template-columns: 1fr; align-items: end; margin-bottom: var(--s5); }
.compare-form .field { margin: 0; }
@media (min-width: 720px) { .compare-form { grid-template-columns: 1fr 1fr auto; } }
.compare-score { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin: var(--s2) 0; }
.compare-score .counts { flex-direction: column; align-items: flex-start; margin: 0; }
.score-sm { width: 88px; height: 88px; }
.score-sm .score-value { font-size: 2rem; }
.compare-cell > p { margin: var(--s2) 0; }
.compare-cell .kv { font-size: .875rem; }
.jump-count-neutral { background: var(--paper-warm); color: var(--ink); }

/* Range bar (AI visibility, from v7.0) */
.range { display: grid; grid-template-columns: 110px 1fr 90px; gap: var(--s3); align-items: center; margin-bottom: var(--s2); }
.range-track { position: relative; height: 14px; background: var(--paper-warm); border: 1px solid var(--rule); border-radius: 7px; }
.range-band { position: absolute; top: -1px; bottom: -1px; background: var(--stamp-tint); border: 1px solid var(--stamp); border-radius: 7px; }
.range-mark { position: absolute; top: -4px; width: 3px; height: 20px; background: var(--stamp); transform: translateX(-1px); }
.range-tick { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--ink-muted); }
@media (max-width: 480px) { .range { grid-template-columns: 1fr; gap: var(--s1); } }

/* ---------- States ---------- */
.empty-state { text-align: center; padding: var(--s7) var(--s4); border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: var(--paper); }
.empty-state .icon { width: 40px; height: 40px; color: var(--ink-muted); }
.working { display: flex; gap: var(--s4); align-items: center; }
.working .spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--ink); animation: sc-spin 1s linear infinite; flex: none; }
@keyframes sc-spin { to { transform: rotate(360deg); } }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s5); counter-reset: step; flex-wrap: wrap; }
.stepper li { counter-increment: step; display: flex; gap: var(--s2); align-items: center; color: var(--ink-muted); font-weight: 600; font-size: .9375rem; }
.stepper li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule-strong); font-size: .8125rem; }
.stepper li + li::after { order: -1; content: ""; width: 24px; height: 1px; background: var(--rule-strong); }
.stepper li[aria-current="step"] { color: var(--ink); }
.stepper li[aria-current="step"]::before { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.stepper li.is-done::before { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: center; margin: var(--s5) 0 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--s3);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--paper); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; font-weight: 700; }
.pagination .gap { min-width: 24px; color: var(--ink-muted); }

/* ---------- Ad slot (R9.6): fixed reserved height, no layout shift ---------- */
.ad-slot { margin: var(--s6) auto; text-align: center; min-height: 120px; max-width: 970px; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: .6875rem; color: var(--ink-muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--s1); }
.ad-slot-placeholder { display: grid; place-items: center; min-height: 100px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); color: var(--ink-muted); font-size: .875rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D8D7CF; margin-top: var(--s7); padding-block: var(--s7) var(--s5); font-size: .9375rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-cols { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-cols h2 { color: #fff; font: 600 .8125rem/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 var(--s3); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { padding: 4px 0; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); font-size: .8125rem; color: #B5B4AA; }
.footer-legal a { color: #D8D7CF; }
.footer-brand p { margin-top: var(--s3); color: #B5B4AA; }
.footer-brand img { height: 40px; width: auto; background: #fff; border-radius: 4px; padding: 4px 6px; }

/* ---------- Admin shell ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--ink); color: #D8D7CF; padding: var(--s4); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand img { height: 32px; background: #fff; border-radius: 4px; padding: 3px 5px; }
.admin-side h2 { color: #B5B4AA; font: 600 .75rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em; margin: var(--s5) 0 var(--s2); }
.admin-side ul { list-style: none; padding: 0; margin: 0; }
.admin-side a { display: flex; gap: var(--s2); align-items: center; padding: 8px var(--s2); border-radius: 4px; color: #E9E8E1; text-decoration: none; font-size: .9375rem; }
.admin-side a:hover { background: #3B3A33; color: #fff; }
.admin-side a[aria-current="page"] { background: #45443C; color: #fff; box-shadow: inset 3px 0 0 var(--stamp); }
.admin-main { padding: var(--s5); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; justify-content: space-between; margin-bottom: var(--s4); }
.switch { display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; min-height: 44px; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 12px; background: var(--rule-strong); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { box-shadow: var(--focus); }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-main { padding: var(--s4); }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* UI-4 lists and statistics */
.site-title { display: block; font-size: .8125rem; color: var(--ink-muted); overflow-wrap: anywhere; }
.data-table td.col-n, .data-table th.col-n { width: 3.5em; color: var(--ink-muted); }
.data-table .nowrap { white-space: nowrap; }
.data-table td.col-share { width: 34%; min-width: 160px; }
.share { display: flex; align-items: center; gap: var(--s2); }
.share-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--paper-warm); border: 1px solid var(--rule); overflow: hidden; }
.share-bar > span { display: block; height: 100%; background: var(--ink); }
.share-pct { min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.site-list { margin: 0 0 var(--s5); padding-left: 2.5em; }
.site-list li { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.site-list li::marker { color: var(--ink-muted); font-size: .875rem; }
.site-list mark, .site-title mark { background: var(--attention-tint); color: inherit; padding: 0 1px; }
.topic-section + .topic-section { margin-top: var(--s5); }
.topic-columns { columns: 4 11rem; column-gap: var(--s5); margin: 0; padding: 0; list-style: none; }
.topic-columns li { break-inside: avoid; padding: 3px 0; }
.keyword-map a { color: var(--link); text-decoration: none; margin-right: .45em; }
.keyword-map a:hover { text-decoration: underline; }
.related-links [aria-current] { font-weight: 650; }
@media (max-width: 639px) {
  .data-table.stack-sm td.col-n { display: none; }
  .data-table td.col-share { width: auto; min-width: 0; }
}

@media print {
  @page { size: A4 portrait; margin: 16mm 14mm; }
  body.sc { background: #fff; font-size: 11pt; }
  .site-header, .analyze-bar, .site-footer, .ad-slot, .no-print, .nav-toggle, .jump-links { display: none !important; }
  .check, .card { break-inside: avoid; border-color: #bbb; }
  .print-section { break-before: page; }
  details > :not(summary) { display: block !important; }
  .disclosure > summary .icon { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; word-break: break-all; }
}
