/* =========================================================================
   SEOKit — design system & layout
   Single stylesheet, no build step. Light + dark themes, fully responsive.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-300: #a5b4fc;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --accent-500: #06b6d4;

  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --info: #0369a1;
  --info-bg: #e0f2fe;

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-elevated: #ffffff;
  --surface-2: #f1f3f9;
  --text: #101322;
  --text-soft: #4b5266;
  --text-muted: #6b7280;
  --border: #e4e7ef;
  --border-strong: #cfd4e2;
  --ring: rgba(99, 102, 241, 0.45);

  --shadow-sm: 0 1px 2px rgba(16, 19, 34, 0.06), 0 1px 3px rgba(16, 19, 34, 0.06);
  --shadow-md: 0 6px 18px rgba(16, 19, 34, 0.08);
  --shadow-lg: 0 18px 45px rgba(16, 19, 34, 0.12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  --container: 1160px;
  --header-h: 66px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0e17;
  --bg-soft: #0f131f;
  --bg-elevated: #141926;
  --surface-2: #1b2130;
  --text: #eef1f8;
  --text-soft: #b9c0d4;
  --text-muted: #8c95ad;
  --border: #232a3b;
  --border-strong: #333d55;
  --brand-50: #1b2140;
  --brand-100: #232a52;

  --ok-bg: #06281a;
  --warn-bg: #2c1e05;
  --bad-bg: #2c0f0f;
  --info-bg: #062033;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.15rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }

p { margin: 0 0 1rem; color: var(--text-soft); }

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: var(--brand-300); }

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--text-soft); }
li { margin-bottom: 0.35rem; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-500); color: #fff; }

/* ---------- Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.section-head p { font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 0.6rem;
}
[data-theme="dark"] .eyebrow { color: var(--brand-300); }

.lead { font-size: 1.1rem; color: var(--text-soft); }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--brand-600);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.75rem; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--secondary {
  --btn-bg: var(--bg-elevated);
  --btn-fg: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn--sm { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
.btn--lg { padding: 0.9rem 1.5rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }

label,
.label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.hint { font-size: 0.82rem; color: var(--text-muted); margin: 0.3rem 0 0; }

input[type="text"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
textarea.mono { font-family: var(--font-mono); font-size: 0.88rem; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--ring);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.85; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.check input { width: 1.05rem; height: 1.05rem; margin: 0.2rem 0 0; accent-color: var(--brand-600); flex: none; }

.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.counter {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.counter b { font-variant-numeric: tabular-nums; }
.counter[data-state="good"] b { color: var(--ok); }
.counter[data-state="warn"] b { color: var(--warn); }
.counter[data-state="bad"] b { color: var(--bad); }

/* ---------- Cards & panels ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  box-shadow: var(--shadow-sm);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card__head h2, .card__head h3 { margin: 0; }

.tool-layout {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 940px) {
  .tool-layout--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool-layout--sticky > .tool-side { position: sticky; top: calc(var(--header-h) + 1rem); }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: var(--surface-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Code output ---------- */
.code {
  position: relative;
  background: #0d1220;
  color: #e6edf3;
  border: 1px solid #1e2637;
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
  max-height: 460px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  white-space: pre;
  tab-size: 2;
  margin: 0;
}
.code:empty::before { content: "Output appears here…"; color: #6b7794; }

/* ---------- Badges / chips / alerts ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-soft);
}
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }
.badge--info { background: var(--info-bg); color: var(--info); }

.alert {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.92rem;
  color: var(--text-soft);
}
.alert--info { background: var(--info-bg); border-color: transparent; color: var(--info); }
.alert--warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.alert--bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.alert--ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.alert strong { color: inherit; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0; }
.chip {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}
[data-theme="dark"] .chip { color: var(--brand-300); }

/* ---------- Tabs / segmented control ---------- */
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  flex-wrap: wrap;
}
.tabs button {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
}
.stat dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }
.stat dd {
  margin: 0.15rem 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }

/* ---------- Meter ---------- */
.meter {
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
  transition: width 0.35s ease;
}
.meter--ok > span { background: var(--ok); }
.meter--warn > span { background: var(--warn); }
.meter--bad > span { background: var(--bad); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  flex: none;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav__links li { margin: 0; }
.nav__links a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
}
.nav__links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--brand-600); background: var(--brand-50); }
[data-theme="dark"] .nav__links a[aria-current="page"] { color: var(--brand-300); }

.nav__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.25rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); }

.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle { display: grid; margin-left: auto; }
  .nav__links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem clamp(1rem, 3vw, 2rem) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .nav__links a { padding: 0.7rem 0.8rem; font-size: 1rem; }
  body[data-nav-open="true"] .nav__links { display: flex; }
  body[data-nav-open="true"] { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(1100px 420px at 12% -10%, var(--brand-50), transparent 65%),
    radial-gradient(900px 380px at 92% 0%, rgba(6, 182, 212, 0.14), transparent 60%);
}
.hero__inner { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { margin-bottom: 0.6rem; }
.hero .lead { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem); max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.75rem; font-size: 0.85rem; color: var(--text-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

.hero-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem;
}
.hero-preview__bar { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; }
.hero-preview__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }

/* ---------- Search + tool grid ---------- */
.tool-search { max-width: 520px; margin: 0 auto 1.75rem; position: relative; }
.tool-search input { padding-left: 2.4rem; }
.tool-search::before {
  content: "⌕";
  position: absolute;
  left: 0.85rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.tool-grid {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.tool-grid li { margin: 0; }
.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
  padding: 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}
.tool-card__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--brand-50);
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
.tool-card h3 { margin: 0; font-size: 1.02rem; }
.tool-card p { margin: 0; font-size: 0.88rem; color: var(--text-soft); }
.tool-card__more { margin-top: auto; padding-top: 0.6rem; font-size: 0.82rem; font-weight: 700; color: var(--brand-600); }
[data-theme="dark"] .tool-card__more { color: var(--brand-300); }

.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { padding: 1.25rem; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.feature h3 { font-size: 1.02rem; }
.feature p { margin: 0; font-size: 0.9rem; }

.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); list-style: none; padding: 0; }
.steps li { counter-increment: step; padding-left: 3rem; position: relative; margin: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}
.steps b { display: block; color: var(--text); }

/* ---------- Breadcrumbs & page head ---------- */
.crumbs { font-size: 0.85rem; color: var(--text-muted); padding-top: 1.25rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--border-strong); }

.page-head { padding: 1rem 0 clamp(1.25rem, 3vw, 2rem); }
.page-head h1 { margin-bottom: 0.4rem; }
.page-head .lead { max-width: 68ch; margin-bottom: 0; }

/* ---------- SERP preview ---------- */
.serp {
  background: #fff;
  color: #202124;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  font-family: Arial, Helvetica, sans-serif;
}
[data-theme="dark"] .serp { background: #12141c; color: #e8eaed; border-color: #2a2f3d; }
.serp__crumb { display: flex; align-items: center; gap: 0.5rem; font-size: 14px; color: #4d5156; }
[data-theme="dark"] .serp__crumb { color: #bdc1c6; }
.serp__favicon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--text-soft);
  flex: none;
}
.serp__site { font-weight: 600; line-height: 1.2; }
.serp__url { font-size: 12px; color: #4d5156; word-break: break-all; }
[data-theme="dark"] .serp__url { color: #9aa0a6; }
.serp__title {
  font-size: 20px;
  line-height: 1.3;
  color: #1a0dab;
  margin: 0.35rem 0 0.15rem;
  font-weight: 400;
}
[data-theme="dark"] .serp__title { color: #8ab4f8; }
.serp__desc { font-size: 14px; line-height: 1.58; color: #4d5156; margin: 0; }
[data-theme="dark"] .serp__desc { color: #bdc1c6; }
.serp--mobile { max-width: 400px; }
.serp--mobile .serp__title { font-size: 18px; }

/* ---------- Issue list ---------- */
.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.issues li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  margin: 0;
  font-size: 0.92rem;
}
.issues li[data-level="pass"] { border-left-color: var(--ok); }
.issues li[data-level="warn"] { border-left-color: var(--warn); }
.issues li[data-level="fail"] { border-left-color: var(--bad); }
.issues b { display: block; color: var(--text); }
.issues span { color: var(--text-soft); }

.outline { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.outline li { display: flex; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--border); margin: 0; }
.outline code {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-600);
  background: var(--brand-50);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  height: fit-content;
}
[data-theme="dark"] .outline code { color: var(--brand-300); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.6rem; max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 0.9rem 1.1rem;
}
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; color: var(--brand-600); }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { margin-bottom: 0.6rem; }
.faq p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: clamp(2rem, 4vw, 3.25rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500) 55%, var(--accent-500));
  color: #fff;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.9); max-width: 56ch; margin-inline: auto; }
.cta .btn { --btn-bg: #fff; --btn-fg: var(--brand-700); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 3rem) 0 1.5rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--brand-600); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  z-index: 300;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 0.5rem;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  animation: toast-in 0.2s ease;
}
.toast[data-type="error"] { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Print & motion ---------- */
@media print {
  .site-header, .site-footer, .btn, .tabs, .toast-host, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
