/* ==========================================================================
   SEOWay site styles
   Loaded only on pages rendered by the SEOWay Site plugin.
   ========================================================================== */

:root {
  --brand: #1652f0;
  --brand-600: #0f3fc4;
  --brand-700: #0c329c;
  --brand-50: #eef3ff;
  --brand-100: #dce6ff;

  --ink: #0b1220;
  --ink-2: #1f2a3d;
  --muted: #5b6576;
  --muted-2: #8a93a3;
  --line: #e3e8f0;
  --line-2: #d3dae6;
  --mist: #f5f7fb;
  --paper: #ffffff;
  --night: #0b1220;
  --night-2: #121b2e;

  --error: #d92d20;
  --error-bg: #fef3f2;
  --error-line: #fecdca;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --warn-line: #fedf89;
  --notice: #0e7490;
  --notice-bg: #ecfdff;
  --notice-line: #a5f0fc;
  --pass: #067647;
  --pass-bg: #ecfdf3;
  --pass-line: #abefc6;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-display: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem);
  --fs-h1: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --fs-h2: clamp(1.65rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-h3: 1.15rem;
  --fs-lead: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: .92rem;
  --fs-caption: .82rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06);
  --shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 8px 24px -10px rgba(11, 18, 32, .14);
  --shadow-lg: 0 2px 4px rgba(11, 18, 32, .05), 0 24px 48px -18px rgba(11, 18, 32, .28);
  --ring: 0 0 0 3px rgba(22, 82, 240, .28);

  --header-h: 68px;
  --container: 1200px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.seoway {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.seoway.nav-open { overflow: hidden; }

.seoway h1, .seoway h2, .seoway h3, .seoway h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 var(--s4);
  font-weight: 700;
}
.seoway h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
.seoway h2 { font-size: var(--fs-h2); }
.seoway h3, .seoway .h3 { font-size: var(--fs-h3); letter-spacing: -.01em; font-weight: 650; line-height: 1.3; }
.seoway p { margin: 0 0 var(--s4); }
.seoway a { color: var(--brand); text-decoration: none; }
.seoway a:hover { color: var(--brand-600); }
.seoway img, .seoway svg { max-width: 100%; }
.seoway code { font-family: var(--font-mono); font-size: .88em; background: var(--mist); border: 1px solid var(--line); border-radius: 6px; padding: .08em .38em; color: var(--ink); }
.seoway :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.seoway ::selection { background: var(--brand-100); color: var(--ink); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff !important; padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.site-main { display: block; outline: none; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 600px) { .container { width: calc(100% - 32px); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
  margin-bottom: var(--s3);
}
.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.6; }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.text-link { font-weight: 600; }
.text-link::after { content: " \2192"; }

/* Old pasted headers and footers, if a theme part still prints them */
.seoway-custom-header:not([data-sws]), .seoway-custom-footer:not([data-sws]) { display: none !important; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid var(--btn-bd); border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg) !important;
  font: 600 .97rem/1 var(--font-body); letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }
.btn--primary { --btn-bg: var(--brand); box-shadow: 0 1px 2px rgba(15, 63, 196, .3), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn--primary:hover { --btn-bg: var(--brand-600); }
.btn--dark { --btn-bg: var(--ink); }
.btn--dark:hover { --btn-bg: #1b2539; }
.btn--light { --btn-bg: #fff; --btn-fg: var(--brand-700); }
.btn--light:hover { --btn-bg: var(--brand-50); }
.btn--ghost { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bg: var(--mist); }
.btn--danger { --btn-bg: #fff; --btn-fg: var(--error); --btn-bd: var(--error-line); }
.btn--danger:hover { --btn-bg: var(--error-bg); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn--xs { min-height: 32px; padding: 0 11px; font-size: .84rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: sw-spin .7s linear infinite;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(11, 18, 32, .35); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink) !important; flex: none; }
.brand-mark { width: 32px; height: 32px; display: block; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.03em; color: var(--ink); }
.brand-name span { color: var(--brand); }
.brand--light .brand-name { color: #fff; }
.brand--light .brand-name span { color: #6e98ff; }
.bm-pulse { transform-origin: 25px 9px; animation: sw-pulse 2.6s ease-in-out infinite; opacity: .35; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  position: relative; padding: 8px 14px; border-radius: 10px;
  color: var(--ink-2); font-weight: 550; font-size: .96rem;
  transition: color .15s ease, background-color .15s ease;
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--mist); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand);
}
.nav-cta { display: none !important; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--ink);
  transition: transform .22s ease, opacity .2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--ink); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--ink); }

@media (max-width: 900px) {
  /* backdrop-filter turns the header into the containing block for the fixed menu panel,
     which squashes the panel to the header's height. Use a solid header on small screens. */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
  .nav-toggle { display: inline-block; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: var(--s4) 16px var(--s6);
    background: #fff; border-top: 1px solid var(--line);
    overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .admin-bar .nav { top: calc(var(--header-h) + 46px); }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .nav a:not(.btn) { padding: 14px 12px; font-size: 1.08rem; border-bottom: 1px solid var(--mist); border-radius: 0; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav-cta { display: inline-flex !important; margin-top: var(--s5); min-height: 50px; }
}
@media (max-width: 600px) {
  .admin-bar .nav { top: var(--header-h); }
  .header-cta { display: none !important; }
}

/* --------------------------------------------------------------------------
   Sections and layout helpers
   -------------------------------------------------------------------------- */

.section { padding: var(--s9) 0; }
.section--tight { padding: var(--s8) 0; }
.section--mist { background: var(--mist); border-block: 1px solid var(--line); }
.section--result { padding-top: 0; }
.section--result:has(.result-panel:empty) { padding: 0; }
@media (max-width: 720px) { .section { padding: var(--s8) 0; } .section--tight { padding: var(--s7) 0; } }

.section-head { max-width: 760px; margin-bottom: var(--s7); }
.section-head .lead { margin-bottom: 0; }

.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid--4 { grid-template-columns: 1fr; } }
.split { align-items: center; gap: var(--s8); }
.split .btn { margin-top: var(--s3); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card--hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card h3 { margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--s4);
  border-radius: 12px; background: var(--brand-50); color: var(--brand);
}
.card-icon svg { width: 22px; height: 22px; }
.card p { color: var(--muted); font-size: var(--fs-small); }

.card--cta {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s4);
  background: linear-gradient(150deg, #1d5cff 0%, var(--brand-600) 100%);
  border-color: transparent; color: #fff !important; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card--cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card--cta .eyebrow { color: rgba(255, 255, 255, .78); margin: 0; }
.card-cta-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.card-cta-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.card-cta-link svg { width: 18px; height: 18px; transition: transform .2s ease; }
.card--cta:hover .card-cta-link svg { transform: translateX(3px); }

.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; color: var(--muted); }

.notice-box {
  border: 1px solid var(--warn-line); background: var(--warn-bg); color: #7a2e0e;
  border-radius: var(--r); padding: 14px 18px; margin: 0 0 var(--s5);
}
.notice-box p { margin: 0; }

/* --------------------------------------------------------------------------
   Reveal on scroll (content is visible without JavaScript)
   -------------------------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }
/* Failsafe: if the script never runs, show everything after 1.5s */
.js:not(.sw-ready) .reveal { animation: sw-show .01s linear 1.5s forwards; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; animation: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 7vw, 104px) 0 clamp(56px, 8vw, 112px);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(22, 82, 240, .10), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, rgba(22, 82, 240, .07), transparent 70%),
    #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -.035em; margin-bottom: var(--s5); max-width: 13ch; }
.hero .lead { max-width: 54ch; margin-bottom: var(--s6); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { max-width: 16ch; } }

.audit-form { max-width: 600px; margin: 0; }
.field-row {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 46px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-row:focus-within { border-color: var(--brand); box-shadow: var(--shadow), var(--ring); }
.field-row.has-error { border-color: var(--error); box-shadow: var(--shadow), 0 0 0 3px rgba(217, 45, 32, .18); }
.field-icon { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--muted-2); pointer-events: none; }
.field-row input {
  flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent;
  font: 500 1.02rem/1.2 var(--font-body); color: var(--ink); padding: 0 4px;
}
.field-row input::placeholder { color: var(--muted-2); font-weight: 400; }
.field-row .btn { min-height: 48px; border-radius: 11px; flex: none; }
.field-hint { margin: 10px 2px 0; font-size: var(--fs-caption); color: var(--muted); min-height: 1.4em; }
.field-hint.is-error, .form-error { color: var(--error); font-weight: 500; }
.form-error { font-size: var(--fs-small); margin: 10px 0 0; min-height: 0; }
.form-error:empty { display: none; }
@media (max-width: 520px) {
  .field-row { flex-wrap: wrap; padding: 6px 6px 6px 42px; }
  .field-icon { top: 30px; left: 14px; }
  .field-row .btn { width: calc(100% + 36px); margin-left: -36px; }
}

.hero-points { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--ink-2); font-weight: 500; }
.hero-points svg { width: 18px; height: 18px; color: var(--pass); padding: 2px; border-radius: 50%; background: var(--pass-bg); }

/* Console visual */
.console {
  position: relative;
  background: linear-gradient(180deg, #0f1830 0%, var(--night) 100%);
  border: 1px solid #1e2a44; border-radius: 22px; padding: 0 0 4px;
  box-shadow: 0 40px 80px -40px rgba(11, 18, 32, .65), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  font-family: var(--font-mono); font-size: .86rem; color: #c8d1e3; overflow: hidden;
}
.console::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(500px 200px at 80% -20%, rgba(47, 107, 255, .28), transparent 70%);
}
.console-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid #1c2741; }
.console-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a3654; }
.console-dot:nth-child(1) { background: #f97066; }
.console-dot:nth-child(2) { background: #fdb022; }
.console-dot:nth-child(3) { background: #47cd89; }
.console-url { margin-left: 10px; color: #7d8aa5; font-size: .8rem; }
.console-line {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 20px; border-bottom: 1px dashed #18223a;
  animation: sw-line .55s cubic-bezier(.2, .7, .2, 1) both;
}
.tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.tick svg { width: 13px; height: 13px; }
.tick-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tick.v-pass { background: rgba(71, 205, 137, .14); color: #47cd89; }
.tick.v-err { background: rgba(249, 112, 102, .14); color: #f97066; }
.tick.v-warn { background: rgba(253, 176, 34, .14); color: #fdb022; }
.tick.v-notice { background: rgba(103, 227, 249, .12); color: #67e3f9; }
.console .label { color: #dbe3f4; }
.verdict { font-size: .8rem; }
.verdict.v-pass { color: #47cd89; } .verdict.v-err { color: #f97066; } .verdict.v-warn { color: #fdb022; } .verdict.v-notice { color: #67e3f9; }
.console-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 14px; color: #7d8aa5; font-size: .8rem; }
.console-score { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; letter-spacing: -.03em; }
.console-score small { font-size: .78rem; color: #6b7688; font-weight: 500; margin-left: 2px; }
@media (prefers-reduced-motion: reduce) { .console-line { animation: none; } .bm-pulse { animation: none; } }

/* --------------------------------------------------------------------------
   Severity tags and legend
   -------------------------------------------------------------------------- */

.sev-tag {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid;
  font: 600 .74rem/1.4 var(--font-body); letter-spacing: .02em; text-transform: uppercase;
}
.sev-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sev-error { color: var(--error); background: var(--error-bg); border-color: var(--error-line); }
.sev-warning { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.sev-notice { color: var(--notice); background: var(--notice-bg); border-color: var(--notice-line); }
.sev-passed { color: var(--pass); background: var(--pass-bg); border-color: var(--pass-line); }
.sev-site { color: var(--muted); background: var(--mist); border-color: var(--line); }
.c-pass { color: var(--pass); } .c-error { color: var(--error); } .c-warn { color: var(--warn); } .c-notice { color: var(--notice); }

.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 900px) { .legend { grid-template-columns: 1fr; } }
.legend-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.legend-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.legend-card--error::before { background: var(--error); }
.legend-card--warning::before { background: #f79009; }
.legend-card--notice::before { background: #06aed4; }
.legend-card h3 { margin: var(--s4) 0 var(--s2); font-size: 1.3rem; }
.legend-card ul { list-style: none; padding: 0; margin: var(--s4) 0 0; border-top: 1px solid var(--line); }
.legend-card li { position: relative; padding: 10px 0 10px 20px; border-bottom: 1px solid var(--mist); font-size: var(--fs-small); color: var(--ink-2); }
.legend-card li:last-child { border-bottom: 0; }
.legend-card li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; }
.legend-card--error li::before { background: var(--error); }
.legend-card--warning li::before { background: #f79009; }
.legend-card--notice li::before { background: #06aed4; }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); counter-reset: step; }
.step { position: relative; counter-increment: step; padding-top: 64px; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff;
  font: 600 .9rem/1 var(--font-mono);
}
.step::after { content: ""; position: absolute; left: 60px; right: -12px; top: 22px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.step:last-child::after { display: none; }
.step:last-child::before { background: var(--brand); }
.step p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: var(--s5); }
  .step { padding: 0 0 0 64px; min-height: 44px; }
  .step::after { left: 21px; right: auto; top: 52px; bottom: -20px; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px); }
}

/* --------------------------------------------------------------------------
   Projects (cards on home and projects page)
   -------------------------------------------------------------------------- */

.project-card { padding: 24px; display: flex; flex-direction: column; gap: var(--s4); }
.project-card--demo { box-shadow: var(--shadow-lg); }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-domain { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; word-break: break-all; }
.project-url { font-family: var(--font-mono); font-size: .76rem; color: var(--muted-2); word-break: break-all; margin-top: 2px; }
.project-date { font-size: var(--fs-caption); color: var(--muted); margin-top: 4px; }
.project-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.project-stat { padding: 12px 10px; text-align: center; border-right: 1px solid var(--line); background: #fff; }
.project-stat:last-child { border-right: 0; }
.project-stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; letter-spacing: -.03em; }
.project-stat span { display: block; margin-top: 4px; font-size: .74rem; color: var(--muted); font-weight: 500; }
.delta { font-style: normal; font-weight: 700; font-size: .72rem; margin-left: 3px; }
.delta--up { color: var(--pass); } .delta--down { color: var(--error); } .delta--flat { color: var(--muted-2); }
.project-card .small { margin: 0; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.project-card.is-busy .project-stats { opacity: .45; }
.project-card.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 82, 240, .14), var(--shadow); }
.project-error { font-size: var(--fs-caption); color: var(--error); margin: 0; }

.add-project { max-width: 680px; margin: 0 auto; }
.field-label { display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--ink); margin-bottom: 8px; letter-spacing: .02em; }
.slot-wrap { margin-top: var(--s4); }
.slot-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.slot-meter span { height: 6px; border-radius: 6px; background: var(--line); transition: background-color .25s ease; }
.slot-meter span.is-used { background: var(--brand); }
.slot-meter.is-full span.is-used { background: var(--warn); }
.slot-wrap p { margin: 8px 0 0; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s5); margin-top: var(--s6); }
.project-grid:empty { display: none; }
@media (max-width: 400px) { .project-grid { grid-template-columns: 1fr; } }
.empty-state { grid-column: 1 / -1; text-align: center; padding: var(--s7) var(--s5); border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); background: #fff; }
.empty-state h2 { font-size: 1.2rem; }
.report-anchor { margin: var(--s8) 0 var(--s5); scroll-margin-top: calc(var(--header-h) + 16px); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-h { margin: 0 !important; font-size: inherit !important; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%;
  padding: 22px 4px; background: none; border: 0; cursor: pointer; text-align: left;
  font: 600 1.08rem/1.4 var(--font-display); color: var(--ink); letter-spacing: -.01em;
}
.faq-q:hover { color: var(--brand); }
.sign { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--mist); border: 1px solid var(--line); transition: background-color .2s ease, transform .3s ease; }
.sign::before, .sign::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.8px; margin: -.9px 0 0 -5.5px; background: var(--ink); border-radius: 2px; transition: transform .3s ease; }
.sign::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .sign { background: var(--brand); border-color: var(--brand); transform: rotate(180deg); }
.faq-q[aria-expanded="true"] .sign::before, .faq-q[aria-expanded="true"] .sign::after { background: #fff; }
.faq-q[aria-expanded="true"] .sign::after { transform: rotate(0deg); }
.faq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease; }
.js .faq-a { grid-template-rows: 0fr; }
.js .faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 56px 22px 4px; color: var(--muted); }

/* --------------------------------------------------------------------------
   CTA band, page heads, prose
   -------------------------------------------------------------------------- */

.section--cta { padding: 0 0 var(--s9); }
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: 28px; color: #fff;
  background: radial-gradient(600px 260px at 50% -30%, rgba(255, 255, 255, .22), transparent 70%), linear-gradient(150deg, #1d5cff 0%, var(--brand-700) 100%);
}
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: var(--fs-lead); margin-bottom: var(--s5); }

.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); background: linear-gradient(180deg, var(--mist), #fff); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: var(--s3); }
.page-head .lead { max-width: 62ch; margin-bottom: 0; }
.page-head--tool { border-bottom: 0; padding-bottom: var(--s6); background: radial-gradient(800px 300px at 90% -20%, rgba(22, 82, 240, .09), transparent 70%), linear-gradient(180deg, var(--mist), #fff); }
.page-head--tool .lead { margin-bottom: var(--s5); }
.page-head--tool .audit-form { max-width: 720px; }
.breadcrumb { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-caption); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

.prose { color: var(--ink-2); }
.prose--narrow { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin-top: var(--s7); margin-bottom: var(--s3); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.75; }
.prose ul { padding-left: 1.2em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-decoration-color: var(--brand-100); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--brand); }

.about-grid, .contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s7); align-items: start; }
.about-aside, .contact-aside { display: grid; gap: var(--s5); position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 960px) { .about-grid, .contact-grid { grid-template-columns: 1fr; } .about-aside, .contact-aside { position: static; } }
.facts { margin: 0 0 var(--s5); }
.facts div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--mist); font-size: var(--fs-small); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: var(--s4); }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { margin: 6px 0 0; font-size: var(--fs-caption); color: var(--error); }
.field-error:empty { display: none; }
.form-note { margin: var(--s4) 0 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: var(--s6) var(--s4); outline: none; }
.success-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto var(--s4); border-radius: 50%; background: var(--pass-bg); color: var(--pass); }
.success-icon svg { width: 28px; height: 28px; }

/* 404 */
.page-head--404 { text-align: center; padding: clamp(56px, 10vw, 120px) 0; }
.narrow-center { max-width: 640px; }
.narrow-center .audit-form { margin: var(--s6) auto 0; text-align: left; }
.code-404 { font: 700 clamp(4.5rem, 12vw, 8rem)/1 var(--font-display); letter-spacing: -.06em; background: linear-gradient(150deg, #2f6bff, var(--brand-700)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: var(--s4); }
.links-404 { display: flex; justify-content: center; gap: var(--s5); margin-top: var(--s6); font-weight: 600; }

/* Ad slots: space is reserved so filling them causes no layout shift */
.ad-slot { position: relative; min-height: 280px; margin: var(--s6) 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; }
.ad-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); text-align: center; margin-bottom: 6px; }

/* Check reference list (audit page) */
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 900px) { .checklist { grid-template-columns: 1fr; } }
.checklist-group { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 22px 10px; }
.checklist-group h3 { font-size: 1.05rem; margin-bottom: var(--s3); }
.checklist-group h3 .muted { font-weight: 500; }
.checklist-group ul { list-style: none; margin: 0; padding: 0; }
.checklist-group li { border-top: 1px solid var(--mist); }
.checklist details summary { display: flex; align-items: center; gap: 10px; padding: 11px 0; cursor: pointer; list-style: none; }
.checklist details summary::-webkit-details-marker { display: none; }
.checklist details summary::after { content: ""; margin-left: auto; flex: none; width: 8px; height: 8px; border-right: 1.6px solid var(--muted-2); border-bottom: 1.6px solid var(--muted-2); transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.checklist details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.checklist .sev-tag { font-size: .66rem; padding: 2px 8px 2px 6px; min-width: 82px; }
.checklist-title { font-size: var(--fs-small); color: var(--ink); font-weight: 500; }
.checklist-body { padding: 0 0 12px; }
.checklist-body p { font-size: var(--fs-small); color: var(--muted); margin-bottom: 8px; }
.checklist-body strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   Audit report
   -------------------------------------------------------------------------- */

.result-panel:empty { display: none; }
.result-panel { scroll-margin-top: calc(var(--header-h) + 16px); }

.try-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: var(--fs-caption); color: var(--muted); }
.try-chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 12px; font: 500 .82rem/1.4 var(--font-mono); color: var(--ink-2); cursor: pointer; }
.try-chip:hover { border-color: var(--brand); color: var(--brand); }

.progress-card { max-width: 720px; }
.progress-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s4); font-weight: 600; color: var(--ink); word-break: break-all; }
.spinner { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--brand-100); border-top-color: var(--brand); animation: sw-spin .7s linear infinite; }
.progress-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.progress-steps li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted-2); font-size: var(--fs-small); transition: background-color .2s ease, color .2s ease; }
.progress-steps li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); }
.progress-steps li.is-active { color: var(--ink); background: var(--brand-50); }
.progress-steps li.is-active::before { border-color: var(--brand); border-top-color: transparent; animation: sw-spin .7s linear infinite; }
.progress-steps li.is-done { color: var(--ink-2); }
.progress-steps li.is-done::before { border-color: var(--pass); background: var(--pass); }
.progress-steps li.is-fail { color: var(--error); }
.progress-steps li.is-fail::before { border-color: var(--error); background: var(--error); }

.error-card { max-width: 720px; border-color: var(--error-line); }
.error-card .error-title { display: flex; align-items: center; gap: 10px; color: var(--error); margin-bottom: var(--s2); }
.error-card .error-title svg { width: 20px; height: 20px; }
.error-card p { color: var(--ink-2); font-size: var(--fs-body); }
.error-card .btn { margin-top: var(--s2); }

.report { display: grid; gap: var(--s5); }
.report-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s6); align-items: center; padding: 28px; }
@media (max-width: 960px) { .report-head { grid-template-columns: auto minmax(0, 1fr); } .report-actions { grid-column: 1 / -1; } }
@media (max-width: 600px) { .report-head { grid-template-columns: 1fr; gap: var(--s5); padding: 22px; } }

.score { position: relative; width: 132px; height: 132px; flex: none; }
.score svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.score .track { stroke: var(--mist); }
.score .bar { transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .2, 1); }
.score-inner { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-num { font: 700 2.5rem/1 var(--font-display); letter-spacing: -.04em; color: var(--ink); }
.score-num small { font-size: .9rem; color: var(--muted-2); font-weight: 600; letter-spacing: 0; }
.score-label { margin-top: 4px; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.score--good .bar { stroke: #17b26a; } .score--good .score-label { color: var(--pass); }
.score--ok .bar { stroke: #f79009; } .score--ok .score-label { color: var(--warn); }
.score--bad .bar { stroke: var(--error); } .score--bad .score-label { color: var(--error); }

.report-meta .eyebrow { margin-bottom: 6px; }
.report-url { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem) !important; margin-bottom: 6px !important; word-break: break-all; }
.report-url a { color: var(--ink); }
.report-final { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); word-break: break-all; margin-bottom: var(--s4); }
.report-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.report-facts div { min-width: 0; }
.report-facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.report-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); font-size: .95rem; }
.report-actions { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 960px) { .report-actions { flex-direction: row; flex-wrap: wrap; } }

.report-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 720px) { .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  font: inherit; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.stat:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stat[aria-pressed="true"] { border-color: currentColor; box-shadow: 0 0 0 3px rgba(11, 18, 32, .05); }
.stat b { font: 700 2rem/1.1 var(--font-display); letter-spacing: -.03em; }
.stat span { font-size: var(--fs-caption); color: var(--muted); font-weight: 600; }
.stat--error { color: var(--error); } .stat--warning { color: var(--warn); } .stat--notice { color: var(--notice); } .stat--passed { color: var(--pass); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); border: 1px solid var(--warn-line); background: var(--warn-bg); color: #7a2e0e; font-size: var(--fs-small); }
.banner p { margin: 0; }
.banner--critical { border-color: var(--error-line); background: var(--error-bg); color: #912018; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters-label { font-size: var(--fs-caption); color: var(--muted); font-weight: 600; margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; cursor: pointer;
  font: 500 .86rem/1.3 var(--font-body); color: var(--ink-2); transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-size: .74rem; font-weight: 700; opacity: .7; }
.filters-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
@media (max-width: 720px) { .filters-sep { display: none; } .filters { gap: 6px; } }

.issue-list { display: grid; gap: 10px; }
.issue { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.issue:hover { border-color: var(--line-2); }
.issue.is-open { box-shadow: var(--shadow); border-color: var(--line-2); }
.issue-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 18px; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.issue-head .sev-tag { min-width: 92px; justify-content: flex-start; }
.issue-title { font-weight: 600; color: var(--ink); line-height: 1.4; }
.issue-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-caption); white-space: nowrap; }
.issue-count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); font-weight: 700; color: var(--ink-2); font-size: .76rem; }
.chev { width: 9px; height: 9px; border-right: 1.8px solid var(--muted-2); border-bottom: 1.8px solid var(--muted-2); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; justify-self: end; }
.issue.is-open .chev { transform: rotate(225deg) translate(-2px, -2px); }
.issue-body { padding: 0 18px 18px; }
.issue-body[hidden] { display: none; }
.evidence {
  margin: 0 0 var(--s4); padding: 14px 16px; border-radius: 12px; background: var(--night); color: #d6def0;
  font: 400 .8rem/1.65 var(--font-mono); white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-height: 280px;
}
.issue-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.issue-cols h4 { font-family: var(--font-body) !important; font-size: .74rem !important; letter-spacing: .07em !important; text-transform: uppercase; color: var(--muted) !important; margin-bottom: 6px !important; }
.issue-cols p { margin: 0; font-size: var(--fs-small); color: var(--ink-2); }
@media (max-width: 720px) {
  .issue-head { grid-template-columns: minmax(0, 1fr) 18px; gap: 8px 12px; }
  .issue-head .sev-tag { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; }
  .issue-title { grid-column: 1 / -1; grid-row: 2; }
  .issue-meta { grid-column: 1; grid-row: 3; }
  .chev { grid-column: 2; grid-row: 1; }
  .issue-cols { grid-template-columns: 1fr; gap: var(--s4); }
}
.issue--pass .issue-title { font-weight: 500; color: var(--ink-2); }
.issue--site { background: var(--mist); }

.list-empty { padding: var(--s6); text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); background: #fff; }
.list-empty b { color: var(--pass); }
.report-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: var(--s2); font-size: var(--fs-caption); color: var(--muted); }
.group-title { display: flex; align-items: center; gap: 10px; margin: var(--s4) 0 2px; font: 600 .78rem/1 var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Toasts */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; padding: 13px 18px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: var(--fs-small); font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast--error { background: #912018; }
.toast--success { background: #05603a; }
.toast a { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--night); color: #a3aec4; padding: var(--s8) 0 var(--s5); font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s6); padding-bottom: var(--s7); border-bottom: 1px solid #1d2840; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.footer-about p { margin: var(--s4) 0 0; max-width: 36ch; color: #a3aec4; }
.footer-mail { color: #fff !important; font-weight: 600; }
.footer-heading { font: 600 .76rem/1 var(--font-body) !important; letter-spacing: .1em !important; text-transform: uppercase; color: #fff !important; margin: 6px 0 var(--s4) !important; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #a3aec4; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: var(--s5); font-size: var(--fs-caption); color: #6f7b94; }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes sw-spin { to { transform: rotate(360deg); } }
@keyframes sw-show { to { opacity: 1; transform: none; } }
@keyframes sw-line { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes sw-pulse { 0%, 100% { transform: scale(1); opacity: .35; } 50% { transform: scale(1.55); opacity: 0; } }

@media print {
  .site-header, .site-footer, .ad-slot, .report-actions, .filters, .nav-toggle { display: none !important; }
  .issue-body[hidden] { display: block !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   Download menu (report actions)
   -------------------------------------------------------------------------- */

.dl { position: relative; }
.dl > .btn { width: 100%; }
.dl-caret { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 2px; transition: transform .2s ease; }
.dl [aria-expanded="true"] .dl-caret { transform: rotate(225deg) translate(-2px, -2px); }
.dl-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
}
.dl-menu[hidden] { display: none; }
.dl-item {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px 12px; border: 0; background: none;
  border-radius: 10px; cursor: pointer; text-align: left; font: inherit; color: var(--ink-2);
}
.dl-item:hover, .dl-item:focus-visible { background: var(--mist); outline: none; }
.dl-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff; font: 700 .68rem/1 var(--font-mono); letter-spacing: .02em; }
.dl-ico--xlsx { background: #107c41; }
.dl-ico--sheets { background: #188038; }
.dl-ico--pdf { background: #d92d20; }
.dl-ico--json { background: #5b6576; }
.dl-item b { display: block; color: var(--ink); font-weight: 600; font-size: .93rem; }
.dl-item small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
@media (max-width: 960px) {
  /* Anchor the menu to the whole actions row so it never pushes past the screen edge */
  .report-actions { position: relative; }
  .dl { position: static; }
  .dl-menu { left: 0; right: auto; width: min(340px, 100%); }
}

/* --------------------------------------------------------------------------
   PDF report (print view built by export.js; hidden on screen)
   -------------------------------------------------------------------------- */

.print-report { display: none; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html.sw-printing body > *:not(#sw-print) { display: none !important; }
  html.sw-printing body { background: #fff !important; }
  html.sw-printing #sw-print { display: block !important; }
  #sw-print { -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #1f2a3d; font: 10pt/1.5 var(--font-body); }
}

#sw-print p { margin: 0; }
.pr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1652f0; padding-bottom: 8px; margin-bottom: 14px; }
.pr-brand { font: 700 20pt/1 var(--font-display); color: #0b1220; letter-spacing: -.03em; }
.pr-brand span { color: #1652f0; }
.pr-meta { text-align: right; font-size: 8.5pt; color: #5b6576; }
.seoway .pr-h1 { font: 700 17pt/1.2 var(--font-display); margin: 0 0 12px; color: #0b1220; word-break: break-all; letter-spacing: -.02em; }
.pr-summary { display: flex; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.pr-score { border: 1px solid #e3e8f0; border-radius: 10px; padding: 10px 16px; min-width: 130px; }
.pr-score b { font: 700 30pt/1 var(--font-display); letter-spacing: -.04em; }
.pr-score span { color: #8a93a3; font-weight: 600; margin-left: 2px; }
.pr-score em { display: block; margin-top: 4px; font-style: normal; font-weight: 700; font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; }
.pr-score--good b, .pr-score--good em { color: #067647; }
.pr-score--ok b, .pr-score--ok em { color: #b54708; }
.pr-score--bad b, .pr-score--bad em { color: #d92d20; }
.pr-counts { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pr-count { border: 1px solid #e3e8f0; border-radius: 10px; padding: 8px 12px; font-size: 8.5pt; font-weight: 600; color: #5b6576; }
.pr-count b { display: block; font: 700 18pt/1.1 var(--font-display); }
.pr-count--error b { color: #d92d20; }
.pr-count--warning b { color: #b54708; }
.pr-count--notice b { color: #0e7490; }
.pr-count--passed b { color: #067647; }
.pr-facts { width: 100%; border-collapse: collapse; margin-bottom: 6px; font-size: 8.8pt; }
.pr-facts th { width: 24%; text-align: left; vertical-align: top; padding: 4px 10px 4px 0; color: #5b6576; font-weight: 600; }
.pr-facts td { padding: 4px 0; word-break: break-word; }
.pr-facts tr + tr th, .pr-facts tr + tr td { border-top: 1px solid #eef1f6; }
.seoway .pr-h2 { font: 700 12.5pt/1.3 var(--font-display); margin: 16px 0 8px; color: #0b1220; letter-spacing: -.01em; }
.pr-break { break-before: page; page-break-before: always; }
.pr-issue { border: 1px solid #e3e8f0; border-left: 4px solid #8a93a3; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; break-inside: avoid; page-break-inside: avoid; }
.pr-error { border-left-color: #d92d20; }
.pr-warning { border-left-color: #f79009; }
.pr-notice { border-left-color: #06aed4; }
.pr-issue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pr-num { font-weight: 700; color: #8a93a3; font-size: 9pt; }
.pr-tag { font-size: 7pt; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border: 1px solid; border-radius: 99px; }
.pr-tag--error { color: #d92d20; background: #fef3f2; border-color: #fecdca; }
.pr-tag--warning { color: #b54708; background: #fffaeb; border-color: #fedf89; }
.pr-tag--notice { color: #0e7490; background: #ecfdff; border-color: #a5f0fc; }
.pr-title { font-weight: 700; color: #0b1220; font-size: 10pt; }
.pr-title em { font-style: normal; color: #d92d20; font-weight: 600; font-size: 8.5pt; }
.pr-area { margin-left: auto; font-size: 8pt; color: #5b6576; }
.pr-evidence { margin: 6px 0; padding: 6px 8px; background: #f5f7fb; border-radius: 6px; font: 7.8pt/1.45 var(--font-mono); white-space: pre-wrap; word-break: break-word; color: #1f2a3d; }
.pr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 8.6pt; }
.pr-cols b { display: block; font-size: 7pt; text-transform: uppercase; letter-spacing: .06em; color: #5b6576; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 8.3pt; }
.pr-table th { text-align: left; background: #f5f7fb; padding: 5px 6px; font-weight: 600; color: #5b6576; }
.pr-table td { padding: 4px 6px; border-top: 1px solid #eef1f6; vertical-align: top; word-break: break-word; }
.pr-table tr { break-inside: avoid; page-break-inside: avoid; }
.pr-foot { margin-top: 14px !important; font-size: 7.5pt; color: #8a93a3; }

/* --------------------------------------------------------------------------
   Whole-site audit
   -------------------------------------------------------------------------- */

.field-hint:empty { display: none; }

.mode-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mode-opt { position: relative; cursor: pointer; }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt > span {
  display: flex; flex-direction: column; gap: 1px; padding: 9px 16px 9px 38px; border: 1px solid var(--line-2);
  border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mode-opt > span::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; border: 2px solid var(--line-2); background: #fff; transition: all .15s ease;
}
.mode-opt b { font-size: .93rem; color: var(--ink); font-weight: 600; }
.mode-opt small { font-size: .78rem; color: var(--muted); }
.mode-opt:hover > span { border-color: var(--muted-2); }
.mode-opt input:checked + span { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand) inset; }
.mode-opt input:checked + span::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 4px, #fff 4.5px); }
.mode-opt input:focus-visible + span { box-shadow: var(--ring); }
.mode-note { margin: 10px 2px 0; font-size: var(--fs-caption); color: var(--muted); min-height: 1.4em; }
@media (max-width: 520px) { .mode-opt { flex: 1 1 140px; } }

/* Pages-to-crawl dropdowns */
.size-select, .size-mini select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  font: 600 .93rem/1.2 var(--font-body); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b6577' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px;
  padding: 0 32px 0 12px; height: 40px; transition: border-color .15s ease, box-shadow .15s ease;
}
.size-select:hover, .size-mini select:hover { border-color: var(--muted-2); }
.size-select:focus-visible, .size-mini select:focus-visible { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.size-select:disabled, .size-mini select:disabled { opacity: .5; cursor: not-allowed; }

.size-pick {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
}
.size-pick[hidden] { display: none; }
.size-pick > span { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.size-pick .size-select { height: 40px; }

.field-row .size-select { flex: none; height: 48px; border-color: transparent; background-color: var(--mist); border-radius: 11px; }
.field-row .size-select:hover { border-color: var(--line-2); }

.size-mini { display: inline-flex; }
.size-mini select { height: 32px; font-size: .84rem; padding: 0 28px 0 10px; border-radius: 9px; background-position: right 10px center; }

@media (max-width: 520px) {
  .size-pick { flex: 1 1 100%; justify-content: space-between; }
  .field-row .size-select { padding: 0 28px 0 10px; background-position: right 10px center; }
}

/* Crawl progress */
.crawl-card { max-width: 820px; }
.crawl-phase { font-size: var(--fs-small); color: var(--muted); margin: -6px 0 14px; }
.crawl-bar { height: 8px; border-radius: 8px; background: var(--mist); overflow: hidden; border: 1px solid var(--line); }
.crawl-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #2f6bff, var(--brand)); transition: width .4s ease; }
.crawl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 10px; }
.crawl-stats div { display: flex; flex-direction: column; }
.crawl-stats b { font: 700 1.5rem/1.1 var(--font-display); color: var(--ink); letter-spacing: -.02em; }
.crawl-stats span { font-size: .78rem; color: var(--muted); }
.crawl-current { font: 400 .78rem/1.5 var(--font-mono); color: var(--muted-2); min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crawl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.crawl-foot p { margin: 0; flex: 1 1 260px; }
@media (max-width: 600px) { .crawl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Site report */
.stat span em { display: block; font-style: normal; font-weight: 500; color: var(--muted-2); font-size: .74rem; margin-top: 1px; }
.stat--pages { color: var(--ink); }
.site-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.site-tabs button {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; background: none;
  cursor: pointer; font: 600 .95rem/1 var(--font-body); color: var(--muted); white-space: nowrap;
}
.site-tabs button:hover { color: var(--ink); }
.site-tabs button[aria-selected="true"] { color: var(--brand); }
.site-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.site-tabs .n { font-size: .74rem; padding: 2px 7px; border-radius: 99px; background: var(--mist); border: 1px solid var(--line); color: var(--ink-2); }
.site-panel { display: grid; gap: 10px; }
.site-panel[hidden] { display: none; }
.issue-count--wide { min-width: 0; padding: 0 9px; font-weight: 600; }

.affected { margin-top: var(--s4); }
.affected h4, .pg-h { font-family: var(--font-body) !important; font-size: .74rem !important; letter-spacing: .07em !important; text-transform: uppercase; color: var(--muted) !important; margin: 0 0 8px !important; }
.aff-list { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.aff-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-top: 1px solid var(--mist); font-size: var(--fs-small); }
.aff-list li:first-child { border-top: 0; }
.aff-list a { font-family: var(--font-mono); font-size: .8rem; word-break: break-all; }
.aff-ev { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.dup-list { margin: 0 0 10px; padding-left: 1.1em; font-size: var(--fs-small); }
.dup-list > li { margin-bottom: 8px; }
.dup-list ul { margin: 4px 0 0; padding-left: 1.1em; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-2); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th { text-align: left; background: var(--mist); padding: 9px 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.data-table td { padding: 8px 12px; border-top: 1px solid var(--mist); vertical-align: top; font-family: var(--font-mono); font-size: .78rem; word-break: break-all; }
.data-table tr[hidden] { display: none; }

.pg-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-search { flex: 1 1 220px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: 400 .93rem var(--font-body); color: var(--ink); }
.pg-controls select { height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: 500 .88rem var(--font-body); color: var(--ink-2); }
.pg-search:focus, .pg-controls select:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
.pg-list { display: grid; gap: 6px; }
.pg { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pg.is-open { box-shadow: var(--shadow); border-color: var(--line-2); }
.pg-head {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 40px 96px 18px; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.pg-status { display: inline-grid; place-items: center; height: 24px; border-radius: 7px; font: 600 .76rem/1 var(--font-mono); background: var(--mist); color: var(--ink-2); }
.pg-status.s-2 { background: var(--pass-bg); color: var(--pass); }
.pg-status.s-3 { background: var(--warn-bg); color: var(--warn); }
.pg-status.s-4, .pg-status.s-5, .pg-status.s-x { background: var(--error-bg); color: var(--error); }
.pg-url { font: 400 .84rem/1.4 var(--font-mono); color: var(--ink); word-break: break-all; }
.pg-url .pill { font-family: var(--font-body); margin-left: 4px; }
.pg-score { font: 700 1rem/1 var(--font-display); text-align: right; }
.pg-counts { display: flex; gap: 6px; justify-content: flex-end; font-size: .78rem; }
.pg-counts i { font-style: normal; font-weight: 700; min-width: 24px; text-align: center; padding: 2px 4px; border-radius: 6px; background: var(--mist); }
.pg-note { color: var(--muted); font-weight: 500; }
.pg-body { padding: 4px 14px 14px; }
.pg-body[hidden] { display: none; }
.pg-facts { display: grid; grid-template-columns: 1fr; margin: 0 0 12px; font-size: .86rem; }
.pg-facts div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--mist); }
.pg-facts dt { color: var(--muted); }
.pg-facts dd { margin: 0; word-break: break-word; }
.pg-fails { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg-fails li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.pg-fails li b { color: var(--ink); font-size: .9rem; }
.pg-fails .evidence { margin: 6px 0; }
.pg-fails p { margin: 0; }
.pg-more { text-align: center; padding-top: 6px; }
.pg-more:empty { display: none; }
@media (max-width: 720px) {
  .pg-head { grid-template-columns: 48px minmax(0, 1fr) 36px 18px; }
  .pg-head .pg-counts { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; }
  .pg-facts div { grid-template-columns: 1fr; gap: 2px; }
  .pg-fails li { grid-template-columns: 1fr; gap: 6px; }
}

.data-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.data-sec h3 { font-size: 1.05rem; margin-bottom: 10px; }
.data-sec h3 .muted { font-weight: 500; }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; font: 400 .8rem/1.6 var(--font-mono); word-break: break-all; }
.plain-list li { padding: 4px 0; border-bottom: 1px solid var(--mist); }
.plain-list .muted { font-family: var(--font-body); margin-left: 6px; }
.depth-bars { display: grid; gap: 8px; max-width: 560px; }
.depth-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: .86rem; }
.depth-bar { height: 10px; background: var(--mist); border-radius: 6px; overflow: hidden; }
.depth-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.depth-row b { text-align: right; }

/* Site report in print */
.pr-urls { margin: 4px 0 6px; padding-left: 1.2em; font: 7.8pt/1.45 var(--font-mono); color: #1f2a3d; }
.pr-urls .pr-more { font-family: var(--font-body); color: #5b6576; list-style: none; margin-left: -1.2em; }
.pr-note { margin: 6px 0 !important; font-size: 8.5pt; color: #b54708; }
