:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #059669;
  --primary-hover: #047857;
  --pass: #16a34a;
  --warn: #d97706;
  --fail: #dc2626;
  --info: #0284c7;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
       font-size: 0.92em; background: var(--bg-alt); padding: 1px 4px; border-radius: 4px; }

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ===== Sidebar layout ===== */
body { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  padding: 0 0 16px;
  z-index: 30;
}
.sidebar__brand {
  display: block;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 1;
}
.sidebar__brand:hover { text-decoration: none; }
.brand-name {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.2;
}
.brand-tagline {
  display: block;
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar__nav { padding: 8px 0 16px; }

/* Accordion group */
.nav-group {
  border-bottom: 1px solid var(--border);
}
.nav-group:last-child { border-bottom: none; }

.nav-group__head {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 22px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav-group__head:hover {
  background: rgba(5, 150, 105, 0.05);
  color: var(--primary);
}
.nav-group.is-open .nav-group__head {
  color: var(--primary);
  background: rgba(5, 150, 105, 0.04);
}

.nav-group__title { flex: 1; }

.nav-group__chev {
  font-size: 0.85rem;
  color: var(--text-muted);
  transform: rotate(0deg);
  transition: transform 0.22s ease-out;
}
.nav-group.is-open .nav-group__chev {
  transform: rotate(90deg);
  color: var(--primary);
}

/* Collapsing items via grid-template-rows trick. The inner wrapper is the
   single grid item so all child links collapse together (a bare grid with
   multiple <a> children only sizes the first explicit row). */
.nav-group__items {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease-out;
}
.nav-group.is-open .nav-group__items {
  grid-template-rows: 1fr;
}
.nav-group__items-inner {
  min-height: 0;
  overflow: hidden;
}

/* Item links */
.nav-group__items a {
  display: block;
  padding: 8px 22px 8px 38px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: background 0.14s ease-out, color 0.14s ease-out, border-color 0.14s ease-out;
}
.nav-group__items a:hover {
  background: rgba(5, 150, 105, 0.06);
  color: var(--primary);
  text-decoration: none;
}
.nav-group__items a.is-active {
  background: rgba(5, 150, 105, 0.08);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
/* Last item gets a bit of bottom space inside the group */
.nav-group.is-open .nav-group__items-inner > a:last-child {
  padding-bottom: 14px;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 25;
}
.sidebar-backdrop.is-open { display: block; }

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  body { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .main-wrap { padding-top: 56px; }
}

/* Hero */
.hero { padding: 60px 0 40px; text-align: center; }
.hero h1 { font-size: 2.2rem; margin: 0 0 12px; line-height: 1.2; }
.hero__sub { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 28px; }
.hero__note { font-size: 0.85rem; color: var(--text-muted); margin-top: 12px; }

/* Form */
.scan-form {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}
.scan-form input {
  flex: 1;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.scan-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}
.scan-form button {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.scan-form button:hover:not(:disabled) { background: var(--primary-hover); }
.scan-form button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Status */
.status {
  margin: 24px 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.status--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.status--loading { color: var(--text-muted); }

/* Results */
.results { margin-top: 32px; }
.results__meta {
  background: var(--bg-alt);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.muted { color: var(--text-muted); }

.scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.score {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.score__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.score__value {
  font-size: 2.4rem;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1;
}
.score__value::after { content: ""; font-size: 1rem; color: var(--text-muted); }
.score__value[data-band="good"] { color: var(--pass); }
.score__value[data-band="ok"]   { color: var(--warn); }
.score__value[data-band="bad"]  { color: var(--fail); }

.results h2 { margin-top: 32px; margin-bottom: 12px; font-size: 1.3rem; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.checklist li {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.checklist li:last-child { border-bottom: none; }
.checklist li.row--pass { background: #f0fdf4; }
.checklist li.row--warn { background: #fffbeb; }
.checklist li.row--fail { background: #fef2f2; }
.checklist li.row--info { background: var(--bg-alt); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  color: white;
  min-width: 50px;
  text-align: center;
}
.badge--pass { background: var(--pass); }
.badge--warn { background: var(--warn); }
.badge--fail { background: var(--fail); }
.badge--info { background: var(--info); }

.check__name { font-weight: 600; }
.check__msg { color: var(--text); margin-top: 2px; }
.check__fix {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}
.check__fix::before { content: "→ "; }

.export {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.export button {
  padding: 8px 14px;
  font-size: 0.9rem;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.export button:hover { border-color: var(--primary); color: var(--primary); }

/* Explainer */
.explainer { margin-top: 60px; padding: 32px 0; border-top: 1px solid var(--border); }
.explainer h2 { font-size: 1.4rem; margin: 0 0 20px; }
.explainer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.explainer h3 { font-size: 1.05rem; margin: 0 0 8px; }
.explainer ul { padding-left: 20px; margin: 0; color: var(--text-muted); }
.explainer ul li { margin-bottom: 4px; }

/* Prose pages */
.prose { max-width: 720px; padding: 30px 0 60px; }
.prose h1 { font-size: 2rem; margin: 0 0 18px; }
.prose h2 { font-size: 1.4rem; margin: 32px 0 12px; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.prose p, .prose ul { font-size: 1.02rem; }
.prose .lede { font-size: 1.15rem; color: var(--text-muted); }
.prose ul { padding-left: 22px; }
.prose ul li { margin-bottom: 6px; }

/* Footer */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Ad slots */
.ad-slot {
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-alt);
}

/* Branded promo cards (used until AdSense is configured) */
.promo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.promo:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.promo-art {
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.promo-text { min-width: 0; }
.promo-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2px;
}
.promo-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.promo-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.promo-cta {
  background: var(--primary);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.promo:hover .promo-cta { background: var(--primary-hover); }

/* Slot-specific accents */
.promo--header { background: linear-gradient(180deg, #ecfdf5, #ffffff); border-color: #a7f3d0; }
.promo--inline { background: linear-gradient(180deg, #f0f9ff, #ffffff); border-color: #bae6fd; }
.promo--footer { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-color: #bbf7d0; }

@media (max-width: 600px) {
  .promo { grid-template-columns: auto 1fr; }
  .promo-cta { grid-column: 1 / -1; text-align: center; }
}

/* Audit page */
.audit-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 12px;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.audit-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.audit-form input[type="url"],
.audit-form input[type="file"],
.audit-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  outline: none;
}
.audit-form input[type="url"]:focus,
.audit-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}
.audit-form textarea { resize: vertical; min-height: 120px; }
.audit-form .small { font-size: 0.85rem; margin-top: 6px; }

.audit-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.audit-controls label { margin-bottom: 0; font-weight: 500; color: var(--text-muted); }
.audit-controls select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.95rem;
}
.audit-controls button {
  margin-left: auto;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.audit-controls button:hover:not(:disabled) { background: var(--primary-hover); }
.audit-controls button:disabled { opacity: 0.6; cursor: not-allowed; }

.audit-results { margin-top: 32px; }
.audit-results h2 { margin-top: 28px; margin-bottom: 12px; font-size: 1.2rem; }

.small { font-size: 0.85rem; }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.93rem;
}
.audit-table th, .audit-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.audit-table th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.audit-table tbody tr:last-child td { border-bottom: none; }
.audit-table td a {
  word-break: break-all;
  display: inline-block;
  max-width: 500px;
}
.cell-score {
  display: inline-block;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}
.cell-score[data-band="good"] { color: var(--pass); }
.cell-score[data-band="ok"]   { color: var(--warn); }
.cell-score[data-band="bad"]  { color: var(--fail); }

.issues-cell { min-width: 220px; }
.issues-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
  color: var(--text);
}
.issues-details[open] summary { color: var(--primary); }
.issue-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 4px 0 0;
  border-top: 1px solid var(--border);
}
.issue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.issue:last-child { border-bottom: none; }
.issue-name { font-weight: 600; font-size: 0.92rem; }
.issue-msg { font-size: 0.9rem; color: var(--text); margin-top: 2px; }
.issue-fix {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}
.issue-fix::before { content: "→ "; }

.check__locations,
.issue-locations {
  margin-top: 8px;
  font-size: 0.88rem;
}
.check__locations summary,
.issue-locations summary {
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 0;
  font-weight: 500;
}
.check__locations[open] summary,
.issue-locations[open] summary { color: var(--primary); }
.check__locations ul,
.issue-locations ul {
  list-style: none;
  padding: 6px 0 4px 12px;
  margin: 0;
  border-left: 2px solid var(--border);
}
.check__locations li,
.issue-locations li {
  padding: 3px 0;
  word-break: break-all;
}
.check__locations code,
.issue-locations code {
  background: white;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.check__scalar {
  margin-top: 6px;
  font-size: 0.9rem;
}
.check__scalar .scalar-key {
  color: var(--text-muted);
  margin-right: 4px;
  font-weight: 500;
}
.check__scalar code {
  background: white;
  border: 1px solid var(--border);
  font-size: 0.86rem;
  word-break: break-all;
}

.affected-pages {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.affected-pages summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.affected-pages ul {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
}
.affected-page {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.affected-page:last-child { border-bottom: none; }
.affected-url {
  font-weight: 500;
  word-break: break-all;
  display: inline-block;
}
.affected-msg {
  font-size: 0.88rem;
  color: var(--text);
  margin-top: 2px;
}
.affected-detail {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.loc-pill {
  display: inline-block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.82rem;
}
.loc-pill code { font-size: 0.82rem; background: transparent; border: none; padding: 0; }

/* Related Tools / Cross-link block */
.related-tools {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related-tools h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.related-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  background: white;
}
.related-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.98rem;
  margin-bottom: 4px;
}
.related-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Descriptive Link Scanner */
.ls-results { margin-top: 32px; }
.ls-card {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.ls-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ls-anchor-pill {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}
.ls-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ls-pill--internal { background: #dbeafe; color: #1e40af; }
.ls-pill--external { background: var(--bg-alt); color: var(--text-muted); }
.ls-dest-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}
.ls-link-row {
  margin-bottom: 8px;
  font-size: 0.88rem;
  word-break: break-all;
}
.ls-context {
  background: var(--bg-alt);
  border-left: 2px solid var(--border);
  padding: 8px 12px;
  margin: 8px 0 10px;
  font-size: 0.92rem;
  border-radius: 4px;
}
.ls-ctx-quote { color: var(--text); }
.ls-ctx-quote mark {
  background: #fef3c7;
  color: #92400e;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}
.ls-suggestions {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 10px;
}
.ls-sug-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #166534;
  margin-bottom: 6px;
}
.ls-sug-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ls-sug-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.94rem;
}
.ls-sug-btn {
  background: white;
  border: 1px solid var(--pass);
  color: var(--pass);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.ls-sug-btn:hover { background: var(--pass); color: white; }
.ls-sug-text { word-break: break-word; }
.ls-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.ls-ticket-btn {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.ls-ticket-btn:hover { background: var(--primary); color: white; }

/* Sitemap Finder */
.sv-find-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
.sv-find-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.sv-find-card.is-confirmed { border-left: 4px solid var(--pass); background: #f0fdf4; }
.sv-find-url { word-break: break-all; margin-bottom: 6px; font-size: 0.95rem; font-weight: 600; }
.sv-find-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 0.85rem; }
.sv-find-source {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
}
.sv-find-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}
.sv-find-status.status-ok { background: var(--pass); color: white; }
.sv-find-status.status-bad { background: var(--fail); color: white; }
.sv-validate-btn {
  background: white !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.sv-validate-btn:hover { background: var(--primary) !important; color: white !important; }

/* AEO/SEO Comparator */
.cmp-form { max-width: 600px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 8px; }
.cmp-url-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; }
.cmp-url-label { color: var(--text-muted); font-size: 0.92rem; }
.cmp-url {
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}
.cmp-url:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18); }
#cmp-btn {
  align-self: flex-end;
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
#cmp-btn:hover:not(:disabled) { background: var(--primary-hover); }

.cmp-sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cmp-site-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cmp-site-host { word-break: break-all; margin-bottom: 8px; }
.cmp-site-scores { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; text-align: center; }
.cmp-site-scores .cell-score { font-size: 1.4rem; font-weight: 700; }
.cmp-site-counts { display: flex; gap: 6px; flex-wrap: wrap; }

.cmp-keywin {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.cmp-kw-check { font-weight: 700; margin-bottom: 8px; }
.cmp-kw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp-kw-side { padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; word-break: break-all; }
.cmp-kw-winners { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cmp-kw-losers { background: #fef2f2; border: 1px solid #fecaca; }
.cmp-kw-label { font-weight: 700; margin-bottom: 4px; }

.cmp-cell-pass { color: var(--pass); text-align: center; font-weight: 700; }
.cmp-cell-warn { color: var(--warn); text-align: center; font-weight: 700; }
.cmp-cell-fail { color: var(--fail); text-align: center; font-weight: 700; }
.cmp-cell-info, .cmp-cell-missing { color: var(--text-muted); text-align: center; }

@media (max-width: 600px) {
  .cmp-url-row { grid-template-columns: 1fr; }
  .cmp-kw-grid { grid-template-columns: 1fr; }
}

/* llms.txt tool */
.lt-meta { margin-bottom: 12px; }
.lt-validate-tabs { display: flex; gap: 18px; margin-bottom: 12px; font-size: 0.92rem; }
.lt-validate-tabs label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.snippet-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
  flex-wrap: wrap;
}
.snippet-actions button {
  position: static;
  top: auto;
  right: auto;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
}
.snippet-actions button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
/* Second button gets a "secondary" treatment */
.snippet-actions button + button {
  background: white;
  color: var(--primary);
}
.snippet-actions button + button:hover {
  background: var(--bg-alt);
}

.lt-deploy-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
}
.lt-deploy-box h3 { margin: 0 0 12px; font-size: 1.05rem; }
.lt-deploy-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.lt-deploy-steps li { margin-bottom: 6px; }
.lt-verify-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.lt-verify-btn:hover { background: var(--primary-hover); }

.lt-spec-link {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Robots Tester */
.rt-results { margin-top: 32px; }
.rt-section-h { font-size: 1rem; margin: 18px 0 10px; }
.rt-bot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.rt-bot-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}
.rt-bot-row.rt-row-allow { border-left: 4px solid var(--pass); }
.rt-bot-row.rt-row-block { border-left: 4px solid var(--fail); background: #fef2f2; }
.rt-bot-icon { font-size: 1.1rem; font-weight: 700; text-align: center; }
.rt-row-allow .rt-bot-icon { color: var(--pass); }
.rt-row-block .rt-bot-icon { color: var(--fail); }
.rt-bot-status { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.rt-row-allow .rt-bot-status { color: var(--pass); }
.rt-row-block .rt-bot-status { color: var(--fail); }
.rt-bot-reason { grid-column: 1 / -1; margin-top: 4px; }
.rt-bot-reason summary { cursor: pointer; color: var(--text-muted); font-size: 0.82rem; }
.rt-bot-reason p { margin: 6px 0 0; font-size: 0.82rem; color: var(--text); padding-left: 16px; }

.rt-test-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr auto;
  gap: 10px;
  margin: 12px 0;
}
.rt-test-form select, .rt-test-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: white;
}
.rt-test-form button {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
.rt-test-form button:hover { background: var(--primary-hover); }
.rt-test-result {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 8px 0;
}
.rt-test-result.rt-test-pass { background: #f0fdf4; border-color: #bbf7d0; }
.rt-test-result.rt-test-fail { background: #fef2f2; border-color: #fecaca; }
.rt-test-headline { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.rt-test-pass .rt-test-headline { color: var(--pass); }
.rt-test-fail .rt-test-headline { color: var(--fail); }

.rt-sitemap-list { list-style: none; padding: 0; margin: 0; }
.rt-sitemap-list li { padding: 6px 0; word-break: break-all; }

.rt-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.rt-block-agents { font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.rt-block-rules { list-style: none; padding-left: 12px; margin: 0; font-size: 0.86rem; }
.rt-block-rules li { padding: 2px 0; }

@media (max-width: 720px) {
  .rt-bot-grid { grid-template-columns: 1fr; }
  .rt-test-form { grid-template-columns: 1fr; }
}

/* HTTP Inspector */
.ua-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.ua-row select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.92rem;
}
.hi-results { margin-top: 32px; }
.hi-summary { display: grid; grid-template-columns: 1fr; gap: 8px; }
.hi-sum-row {
  display: grid;
  grid-template-columns: 180px 220px 1fr;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  align-items: baseline;
}
.hi-sum-row.hi-band-good { border-left-color: var(--pass); }
.hi-sum-row.hi-band-ok { border-left-color: var(--warn); }
.hi-sum-row.hi-band-warn { border-left-color: var(--warn); }
.hi-sum-row.hi-band-slow { border-left-color: var(--warn); }
.hi-sum-row.hi-band-fail,
.hi-sum-row.hi-band-very_slow { border-left-color: var(--fail); }
.hi-sum-label { color: var(--text-muted); font-weight: 600; }
.hi-sum-value { font-weight: 700; word-break: break-all; }
.hi-sum-explain { color: var(--text); }

.hi-sum-fix {
  margin-top: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}
.hi-sum-fix summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.hi-sum-fix[open] summary { margin-bottom: 6px; }
.hi-sum-fix ul {
  list-style: disc;
  padding-left: 22px;
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
}
.hi-sum-fix li { padding: 3px 0; }

.hi-chain {
  list-style: none;
  padding: 12px 0 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hi-hop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.hi-hop--final { background: #f0fdf4; border-color: #bbf7d0; }
.hi-status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--warn);
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.hi-status-pill--ok { background: var(--pass); }

.hi-header-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.hi-header-name { font-weight: 700; margin-bottom: 4px; }
.hi-header-value { font-size: 0.88rem; margin-bottom: 6px; word-break: break-all; }
.hi-header-explain { font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }

.hi-dev-section {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.hi-dev-section summary { padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--primary); }
.hi-dev-body { padding: 14px 18px; border-top: 1px solid var(--border); }
.hi-dev-body h3 { font-size: 0.95rem; margin: 16px 0 6px; }
.hi-dev-body h3:first-child { margin-top: 0; }
.hi-raw {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
}

@media (max-width: 720px) {
  .hi-sum-row { grid-template-columns: 1fr; }
}

/* Intent & Keywords Scanner */
.ik-results { margin-top: 32px; }
.ik-intent-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.ik-intent-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ik-intent-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}
.ik-confidence { font-size: 0.95rem; color: var(--text-muted); }
.ik-intent-explain {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.55;
}
.ik-bars { margin-bottom: 12px; }
.ik-intent-row {
  display: grid;
  grid-template-columns: 130px 1fr 50px;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.92rem;
}
.ik-intent-name { color: var(--text-muted); }
.ik-intent-name.is-primary { color: var(--text); font-weight: 700; }
.ik-intent-bar {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}
.ik-intent-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease-out;
}
.ik-intent-pct { text-align: right; font-variant-numeric: tabular-nums; }

.ik-signals-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.ik-signals-section summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.ik-signal-list {
  list-style: disc;
  padding-left: 24px;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text);
}
.ik-signal-list li { padding: 2px 0; }

.ik-keywords { margin-top: 14px; }
.ik-kw-list {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.ik-kw-row {
  display: grid;
  grid-template-columns: 36px 1fr 200px 50px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}
.ik-kw-row:last-child { border-bottom: none; }
.ik-kw-rank { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ik-kw-text { font-weight: 500; }
.ik-kw-bar {
  height: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.ik-kw-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}
.ik-kw-score { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }

.ik-question-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ik-question-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.ik-question-list li:last-child { border-bottom: none; }
.ik-q-source {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ik-q-text { color: var(--text); }

.ik-no-questions {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  margin-top: 12px;
}

@media (max-width: 600px) {
  .ik-kw-row { grid-template-columns: 30px 1fr 60px; }
  .ik-kw-bar { display: none; }
  .ik-question-list li { grid-template-columns: 1fr; }
}

/* Spinner + loading helpers (used across all tools) */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 12px;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status--loading {
  display: flex;
  align-items: center;
}
.status--loading .loading-text { line-height: 1.5; }

/* HTML Bloat Detector */
.hb-results { margin-top: 32px; }
.hb-meta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.hb-summary { margin-bottom: 24px; }
.hb-stat { font-size: 1.4rem !important; }

.hb-no-issues {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.hb-issue {
  background: white;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.hb-issue--fail { border-left-color: var(--fail); }
.hb-issue--warn { border-left-color: var(--warn); }
.hb-issue--info { border-left-color: var(--info); }

.hb-issue-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.severity-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.severity-pill--fail { background: #fee2e2; color: #991b1b; }
.severity-pill--warn { background: #fef3c7; color: #92400e; }
.severity-pill--info { background: #dbeafe; color: #1e40af; }
.hb-issue-title { margin: 0; font-size: 1.1rem; line-height: 1.3; }

.hb-plain-section {
  margin-bottom: 12px;
}
.hb-plain-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.hb-plain-row:last-child { border-bottom: none; }
.hb-plain-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 2px;
}
.hb-plain-text { color: var(--text); line-height: 1.55; }

.hb-dev-section {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-alt);
}
.hb-dev-section summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  user-select: none;
}
.hb-dev-section[open] summary {
  border-bottom: 1px solid var(--border);
}
.hb-dev-body {
  padding: 12px 14px;
  font-size: 0.9rem;
}
.hb-dev-row {
  margin-bottom: 10px;
}
.hb-dev-row:last-child { margin-bottom: 0; }
.hb-dev-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.hb-dev-content code {
  background: white;
  border: 1px solid var(--border);
}

.hb-issue-details {
  margin-top: 8px;
  font-size: 0.9rem;
}
.hb-issue-details summary {
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 0;
  font-weight: 500;
}
.hb-issue-details[open] summary { color: var(--primary); }
.hb-issue-details ul {
  list-style: none;
  padding: 6px 0 4px 12px;
  margin: 0;
  border-left: 2px solid var(--border);
}
.hb-issue-details li {
  padding: 3px 0;
  font-size: 0.86rem;
  word-break: break-all;
}
.hb-issue-details code {
  background: white;
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.hb-issue-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* PSI help block (when no API key configured) */
.psi-help { padding: 18px 22px; }
.psi-help-body { line-height: 1.65; font-size: 0.95rem; }
.psi-help-body ol { margin: 12px 0; padding-left: 22px; }
.psi-help-body li { margin-bottom: 6px; }
.psi-help-body code { background: white; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.9rem; }
.psi-help-body em { font-style: normal; font-weight: 600; }

/* Schema validator */
.sv-results { margin-top: 32px; }
.sv-summary { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sv-summary-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.sv-summary-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sv-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.sv-pill--good { background: #dcfce7; color: #166534; }
.sv-pill--fail { background: #fee2e2; color: #991b1b; }
.sv-pill--warn { background: #fef3c7; color: #92400e; }
.sv-pill--info { background: #dbeafe; color: #1e40af; }

.sv-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.sv-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sv-type-badge { font-weight: 600; }
.sv-type-badge code {
  background: white;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
}
.sv-rr-desc { font-size: 0.92rem; color: var(--text-muted); margin: 4px 0 10px; }

.sv-issue-list { list-style: none; padding: 0; margin: 8px 0 0; }
.sv-issue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.sv-issue:last-child { border-bottom: none; }
.sv-issue code {
  background: white;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.sv-no-issues { color: var(--pass); font-size: 0.95rem; margin: 8px 0 0; }

.sv-recommendations {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.92rem;
}
.sv-recommendations code {
  background: white;
  margin-right: 4px;
  padding: 1px 6px;
  border: 1px solid #fde68a;
}

.sv-raw { margin-top: 12px; }
.sv-raw summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 4px 0;
}
.sv-raw[open] summary { color: var(--primary); }
.sv-raw pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 6px 0 0;
}

/* PageSpeed test */
.ps-strategy-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.ps-strategy-row label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-results { margin-top: 32px; }

.ps-strategies {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}
.ps-strategies.two-col { grid-template-columns: 1fr 1fr; }

.ps-strategy {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.ps-strategy-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.ps-strategy-name { font-size: 1.05rem; font-weight: 700; }

.ps-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.ps-score {
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--border);
}
.ps-score__value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.ps-score__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-top: 4px; }
.ps-score[data-band="good"] .ps-score__value { color: var(--pass); }
.ps-score[data-band="needs_improvement"] .ps-score__value { color: var(--warn); }
.ps-score[data-band="poor"] .ps-score__value { color: var(--fail); }
.ps-score[data-band="unknown"] .ps-score__value { color: var(--text-muted); }

.ps-cwvs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ps-cwv {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.ps-cwv__name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.ps-cwv__lab {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 4px;
}
.ps-cwv[data-band="good"] .ps-cwv__lab { color: var(--pass); }
.ps-cwv[data-band="needs_improvement"] .ps-cwv__lab { color: var(--warn); }
.ps-cwv[data-band="poor"] .ps-cwv__lab { color: var(--fail); }
.ps-cwv__field {
  margin-top: 6px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  padding-top: 4px;
}
.ps-cwv__field-label { color: var(--text-muted); }
.ps-cwv__field-value { font-weight: 600; }
.ps-cwv__field-value[data-band="fast"] { color: var(--pass); }
.ps-cwv__field-value[data-band="average"] { color: var(--warn); }
.ps-cwv__field-value[data-band="slow"] { color: var(--fail); }

.opp-category {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.opp-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.opp-title { font-weight: 700; font-size: 1rem; }
.opp-savings-group { display: flex; gap: 6px; flex-wrap: wrap; }
.opp-savings {
  background: var(--fail);
  color: white;
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}
.opp-savings--bytes { background: #059669; }
.opp-desc { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 6px; }
.opp-display { display: block; margin-top: 4px; }

.opp-fix {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.92rem;
}
.opp-fix-action { margin-bottom: 4px; }
.opp-fix-how { font-size: 0.88rem; }
.opp-fix-how code {
  display: block;
  background: #0f172a;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 4px;
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
  border: none;
}
.opp-tool-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.opp-items {
  margin-top: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.opp-items-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.opp-items ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.opp-items li {
  padding: 4px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--border);
  word-break: break-all;
}
.opp-items li:last-child { border-bottom: none; }
.opp-items code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
}

.opp-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.opp-copy {
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.opp-copy:hover { background: var(--primary); color: white; }

.ps-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.diag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.92rem;
}
.diag-key { color: var(--text-muted); }
.diag-val { font-weight: 700; }

@media (max-width: 720px) {
  .ps-strategies.two-col { grid-template-columns: 1fr; }
  .ps-scores { grid-template-columns: repeat(2, 1fr); }
  .ps-cwvs { grid-template-columns: repeat(2, 1fr); }
}

/* Image inspector */
.img-form {
  max-width: 700px;
  margin: 24px auto 0;
}
.img-form input[type="url"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}
.img-form input[type="url"]:focus,
.img-form input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}
.img-target-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.img-target-row label {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.img-target-row input[type="number"] {
  width: 100px;
  padding: 8px 10px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.img-target-row button {
  margin-left: auto;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.img-target-row button:hover:not(:disabled) { background: var(--primary-hover); }
.img-target-row button:disabled { opacity: 0.6; cursor: not-allowed; }

.img-results { margin-top: 32px; }
.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.img-preview {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.img-preview img {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: white;
}
.img-preview p { margin-top: 8px; word-break: break-all; }

.img-stats {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.img-stats h2 { margin-top: 0; font-size: 1.1rem; }
.stat-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  margin: 0;
}
.stat-list dt { font-weight: 600; color: var(--text-muted); font-size: 0.92rem; }
.stat-list dd { margin: 0; font-size: 0.92rem; word-break: break-word; }

.performance-flags { margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.perf-flag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.92rem;
}
.perf-flag--warn { background: #fffbeb; border-color: #fde68a; }
.perf-flag--fail { background: #fef2f2; border-color: #fecaca; }
.perf-flag--pass { background: #f0fdf4; border-color: #bbf7d0; }

.target-analysis { margin-top: 24px; }
.target-card {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.target-card--ok { background: #f0fdf4; border-color: #bbf7d0; }
.target-card--over { background: #fffbeb; border-color: #fde68a; }
.target-headline { font-weight: 600; margin-bottom: 10px; }
.target-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.92rem;
  margin: 8px 0;
}
.target-paths { font-size: 0.95rem; margin: 12px 0 4px; }
.target-paths.warn { color: #92400e; }
.target-card ul { margin: 4px 0 0 0; padding-left: 20px; font-size: 0.92rem; }
.target-card ul li { margin-bottom: 4px; }

.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.sug-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.sug-action { font-weight: 600; margin-bottom: 6px; }
.sug-savings { font-size: 0.95rem; margin-bottom: 6px; }
.sug-pct { color: var(--pass); font-weight: 600; margin-left: 6px; }
.sug-why { font-size: 0.88rem; color: var(--text-muted); }

.snippet { position: relative; margin-top: 12px; }
.snippet pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}
/* Single-button snippet (e.g. cURL command in HTTP Inspector, snippet preview elsewhere).
   Sits below the code block as a real readable button — not overlaid on the dark code. */
.snippet > button:not(.snippet-actions button) {
  position: static;
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
}
.snippet > button:not(.snippet-actions button):hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Resize & download panel ------------------------------------------------- */
.rs-panel {
  margin-top: 18px;
  padding: 24px 24px 22px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f5f9f7 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.rs-panel__head { margin-bottom: 18px; }
.rs-panel h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rs-panel h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}
.rs-panel__lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rs-form { display: block; }
.rs-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

.rs-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin: 0;
  min-width: 0;
}
.rs-group legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 6px;
  margin-left: -2px;
}

.rs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-field--full { width: 100%; margin-top: 12px; }
.rs-field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.rs-field__label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.rs-quality-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-alt);
  padding: 1px 8px;
  border-radius: 999px;
}

.rs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.rs-input-wrap input {
  width: 100%;
  padding: 8px 38px 8px 10px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rs-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
.rs-input-suffix {
  position: absolute;
  right: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
}

.rs-group select {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.rs-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
  outline: none;
}

.rs-dim-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
}
.rs-link-btn {
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.rs-link-btn:hover { color: var(--primary); border-color: var(--primary); }
.rs-link-btn[aria-pressed="true"] {
  background: rgba(5, 150, 105, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}
.rs-link-icon--broken { display: none; }
.rs-link-btn[aria-pressed="false"] .rs-link-icon--linked { display: none; }
.rs-link-btn[aria-pressed="false"] .rs-link-icon--broken { display: inline-block; }

.rs-fit-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.rs-fit-modes input { position: absolute; opacity: 0; pointer-events: none; }
.rs-fit-modes label {
  text-align: center;
  padding: 7px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.rs-fit-modes label:hover { color: var(--text); }
.rs-fit-modes input:checked + label {
  background: var(--bg);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.rs-fit-modes input:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.rs-range {
  width: 100%;
  margin-top: 4px;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  outline: none;
}
.rs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}
.rs-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border: 2px solid var(--bg);
  border-radius: 50%;
  cursor: pointer;
}
.rs-range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.rs-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.rs-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}
.rs-btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.25);
}
.rs-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.rs-status {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.rs-result {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.rs-result__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.rs-result__preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  /* Subtle checkerboard so transparency is visible */
  background-image:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.rs-result__preview img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  display: block;
  margin: 0 auto;
}
.rs-result__caption {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.rs-result__stats {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.rs-result__stats h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rs-stat-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 18px;
}
.rs-stat-list dt {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rs-stat-list dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.rs-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--pass);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all .15s;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.25);
}
.rs-download-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(22, 163, 74, 0.25);
}

.rs-better {
  color: var(--pass);
  font-weight: 700;
  background: rgba(22, 163, 74, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.rs-worse {
  color: var(--fail);
  font-weight: 700;
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 720px) {
  .rs-row { grid-template-columns: 1fr; }
  .rs-result__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .img-grid { grid-template-columns: 1fr; }
  .suggestions { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  .scan-form { flex-direction: column; }
  .scores { grid-template-columns: 1fr; }
  .explainer__cols { grid-template-columns: 1fr; gap: 20px; }
  .site-nav a { margin-left: 12px; font-size: 0.85rem; }
}

/* Title & Meta Counter ---------------------------------------------------- */
.tmc { display: grid; gap: 20px; margin-top: 24px; }
.tmc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}
.tmc-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.tmc-card label { font-size: 1rem; }
.tmc-meter {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted);
}
.tmc-meter__count { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.tmc-meter__limit { color: var(--text-muted); }
.tmc-meter__words { color: var(--text-muted); margin-left: 6px; }
.tmc-meter__pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid var(--border); background: var(--bg-alt); color: var(--text-muted);
}
.tmc-meter__pill--good  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tmc-meter__pill--short { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.tmc-meter__pill--risky { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.tmc-meter__pill--long  { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.tmc-meter__pill--empty { background: var(--bg-alt); color: var(--text-muted); }

.tmc-card input[type="text"],
.tmc-card textarea {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); font-family: inherit;
  resize: vertical;
}
.tmc-card input[type="text"]:focus,
.tmc-card textarea:focus { outline: none; border-color: var(--primary); }

.tmc-bar {
  position: relative; height: 6px; margin: 10px 0 8px;
  background: var(--bg-alt); border-radius: 999px; overflow: hidden;
}
.tmc-bar__fill {
  display: block; height: 100%; width: 0%;
  background: var(--primary); transition: width .12s ease, background .12s ease;
  border-radius: 999px;
}
.tmc-bar__fill--empty { background: var(--border); }
.tmc-bar__fill--short { background: #f59e0b; }
.tmc-bar__fill--good  { background: var(--primary); }
.tmc-bar__fill--risky { background: #f59e0b; }
.tmc-bar__fill--long  { background: var(--fail); }
.tmc-bar__mark {
  position: absolute; top: -2px; bottom: -2px; width: 1px;
  background: rgba(15, 23, 42, 0.25);
}
.tmc-bar__mark--limit { background: rgba(220, 38, 38, 0.4); }

.tmc-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

.tmc-serp {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 16px; background: #fff;
  font-family: arial, sans-serif;
}
.tmc-serp__url   { font-size: 0.8rem; color: #4d5156; margin-bottom: 4px; }
.tmc-serp__title { font-size: 1.25rem; color: #1a0dab; line-height: 1.3; margin-bottom: 4px; }
.tmc-serp__desc  { font-size: 0.88rem; color: #4d5156; line-height: 1.45; }

.tmc-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tmc-actions button {
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font-size: 0.9rem;
}
.tmc-actions button:hover { border-color: var(--primary); color: var(--primary); }

/* Scanner result → counter deep-link */
.check__tool-link {
  display: inline-block; margin-top: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--primary); text-decoration: none;
}
.check__tool-link:hover { text-decoration: underline; }

/* Sitemap Splitter chunks ------------------------------------------------- */
.ss-results { margin-top: 24px; }
.ss-chunk {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ss-chunk__head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 8px;
}
.ss-chunk__sample { font-size: 0.85rem; line-height: 1.55; margin-bottom: 10px; word-break: break-all; }
.ss-chunk__sample code { font-size: 0.8rem; }
.ss-chunk__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ss-chunk__actions button {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font-size: 0.85rem;
}
.ss-chunk__actions button:hover { border-color: var(--primary); color: var(--primary); }

/* ───── Site audit: page-centric report ───── */
.ar-filter-bar {
  display: flex; flex-direction: column; gap: 8px;
  margin: 8px 0 16px;
}
.ar-filter-label { font-size: 0.85rem; color: var(--text-muted); }
.ar-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); cursor: pointer;
  font-size: 0.85rem; font-family: inherit;
}
.ar-chip:hover { border-color: var(--primary); }
.ar-chip--active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.ar-chip--fail { border-color: var(--fail); }
.ar-chip--warn { border-color: var(--warn); }
.ar-chip--active.ar-chip--fail { background: var(--fail); border-color: var(--fail); }
.ar-chip--active.ar-chip--warn { background: var(--warn); border-color: var(--warn); }
.ar-chip__count {
  background: rgba(0,0,0,0.07); padding: 0 7px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
}
.ar-chip--active .ar-chip__count {
  background: rgba(255,255,255,0.25); color: #fff;
}

.ar-pages { display: flex; flex-direction: column; gap: 10px; }
.ar-page {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); overflow: hidden;
}
.ar-page[open] { border-color: var(--primary); }
.ar-page--error { padding: 12px 14px; }
.ar-page__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  list-style: none;
}
.ar-page__head::-webkit-details-marker { display: none; }
.ar-page__head::before {
  content: "▸"; color: var(--text-muted); font-size: 0.85rem;
  transition: transform 0.15s ease;
  display: inline-block; width: 0.8em;
}
.ar-page[open] > .ar-page__head::before { transform: rotate(90deg); }
.ar-page__url { flex: 1; min-width: 250px; word-break: break-all; }
.ar-page__url a { color: var(--text); text-decoration: none; font-weight: 500; }
.ar-page__url a:hover { color: var(--primary); text-decoration: underline; }
.ar-page__scores { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ar-page__scores .cell-score { font-size: 0.95rem; font-weight: 600; }
.ar-page__counts { display: flex; gap: 6px; }
.ar-page__body {
  border-top: 1px solid var(--border); padding: 12px 14px;
  background: var(--bg-alt);
}

.ar-issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ar-issue {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
}
.ar-issue--fail { border-left: 3px solid var(--fail); }
.ar-issue--warn { border-left: 3px solid var(--warn); }
.ar-issue__name { font-weight: 600; }
.ar-issue__msg { margin-top: 2px; font-size: 0.92rem; color: var(--text); }
.ar-issue__fix {
  margin-top: 6px; font-size: 0.88rem; color: var(--text-muted);
  border-left: 2px solid var(--primary); padding-left: 8px;
}
.ar-issue__detail, .ar-issue__inline-list { margin-top: 6px; font-size: 0.88rem; }
.ar-issue__inline-list ul {
  margin: 4px 0 0; padding-left: 18px;
}
.ar-issue__rollup { margin-top: 8px; font-size: 0.88rem; }
.ar-issue__rollup summary { cursor: pointer; color: var(--primary); }
.ar-issue__rollup ul {
  margin: 6px 0 0; padding-left: 18px; max-height: 280px; overflow-y: auto;
}
.ar-issue__rollup ul li { margin: 2px 0; word-break: break-all; }

.ar-page--errored {
  border-color: var(--fail);
  background: #fef2f2;
}
.ar-page--errored[open] {
  border-color: var(--fail);
}
.ar-errored-banner {
  margin-bottom: 12px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--fail);
  border-left: 4px solid var(--fail);
  border-radius: 6px; font-size: 0.92rem;
  color: #7f1d1d;
}
.ar-errored-banner strong { color: #991b1b; }
.ar-suppressed { margin-top: 14px; }
.ar-suppressed > summary {
  cursor: pointer; font-size: 0.88rem; color: var(--text-muted);
  padding: 6px 8px; border-radius: 4px; background: var(--bg-alt);
}
.ar-suppressed > summary:hover { color: var(--text); }
.ar-issue-list--suppressed { opacity: 0.7; margin-top: 8px; }

/* ───── Intent scanner: signals + recommendations ───── */
.ik-mixed-warn {
  margin: 10px 0;
  padding: 8px 12px; border-radius: 6px;
  background: #fffbeb; border: 1px solid #fcd34d;
  color: #92400e; font-size: 0.9rem;
}

.ik-mismatch-warn {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #f59e0b;
  background: #fffbeb;
  color: #78350f;
}
.ik-mismatch-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 12px; margin-bottom: 8px;
}
.ik-mismatch-head strong { font-size: 1rem; color: #78350f; }
.ik-mismatch-arrow {
  font-size: 0.9rem; color: #92400e;
}
.ik-mismatch-arrow em { font-style: normal; font-weight: 600; }
.ik-mismatch-body { font-size: 0.92rem; line-height: 1.5; }
.ik-mismatch-body > div { margin: 4px 0; }
.ik-mismatch-fix {
  margin-top: 10px !important;
  padding: 8px 10px;
  background: rgba(255,255,255,0.6);
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
}

/* ───── Intent: personalized fix snippet ───── */
.ik-snippet {
  margin: 8px 0;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
  background: #1e293b;
  display: flex; flex-direction: column-reverse;
}
.ik-snippet pre {
  margin: 0; padding: 14px 16px;
  background: #0f172a; color: #e2e8f0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.5;
}
.ik-snippet button {
  padding: 6px 12px;
  margin: 8px 12px;
  align-self: flex-end;
  background: rgba(255,255,255,0.1); color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
  cursor: pointer; font-size: 0.82rem; font-family: inherit;
}
.ik-snippet button:hover { background: rgba(255,255,255,0.2); }

/* ───── Intent: page audit ───── */
.ik-audit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; margin: 8px 0 16px;
}
.ik-audit-card {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; background: var(--bg);
}
.ik-audit-card h3 { margin: 0 0 8px; font-size: 0.95rem; }
.ik-audit-card ul { list-style: none; margin: 0; padding: 0; }
.ik-audit-card li {
  padding: 5px 0; font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
.ik-audit-card li:first-child { border-top: none; }
.ik-audit-card code {
  font-size: 0.85rem; background: var(--bg-alt);
  padding: 1px 5px; border-radius: 3px;
}

.ik-audit-clean {
  padding: 10px 14px;
  border: 1px solid #86efac; background: #f0fdf4;
  border-radius: 8px; color: #166534;
}

.ik-audit-issue-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ik-audit-issue {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
}
.ik-audit-issue--fail { border-left: 3px solid var(--fail); }
.ik-audit-issue--warn { border-left: 3px solid var(--warn); }
.ik-audit-issue__title { font-weight: 600; }
.ik-audit-issue__detail { margin-top: 4px; font-size: 0.88rem; color: var(--text); }
.ik-audit-issue__fix {
  margin-top: 6px; font-size: 0.88rem;
  padding: 6px 10px; background: var(--bg-alt);
  border-left: 2px solid var(--primary); border-radius: 4px;
}

/* ───── Cross-tool CTAs (counter ↔ splitter ↔ validator) ───── */
.sm-cta-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 14px 0 4px;
}
.sm-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg); color: var(--primary);
  border: 1px solid var(--primary); border-radius: 8px;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
}
.sm-cta:hover { background: var(--primary); color: #fff; }
.sm-cta--disabled {
  color: var(--text-muted); border-color: var(--border);
  cursor: not-allowed; pointer-events: none;
  background: var(--bg-alt);
}
.sm-cta--inline {
  margin-top: 8px;
  cursor: pointer; font-family: inherit;
}
.ss-validate, .ss-audit {
  background: var(--bg); color: var(--primary);
  border: 1px solid var(--primary);
}
.ss-validate:hover, .ss-audit:hover { background: var(--primary); color: #fff; }
.ss-clear-btn {
  margin-top: 8px;
  padding: 6px 12px; border-radius: 6px;
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer; font-size: 0.85rem;
}
.ss-clear-btn:hover { color: var(--fail); border-color: var(--fail); }

/* ───── HTML Cleaner ───── */
.hc-results { margin-top: 24px; }
.hc-summary {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--pass);
  border-radius: 8px;
  background: var(--bg);
}
.hc-summary-headline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px;
  margin-bottom: 8px;
}
.hc-summary-headline strong {
  font-size: 1.5rem; color: var(--pass);
}
.hc-summary-list {
  margin: 0; padding-left: 18px;
  font-size: 0.92rem; line-height: 1.6;
}
.hc-clear-btn {
  padding: 9px 18px;
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-size: 0.92rem; font-family: inherit;
}
.hc-clear-btn:hover { color: var(--fail); border-color: var(--fail); }

.hc-output-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-top: 18px; margin-bottom: 8px;
}
.hc-output-header h2 { margin: 0; }
.hc-snippet__actions { display: flex; gap: 8px; }
.hc-snippet__actions button {
  padding: 8px 14px;
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary); border-radius: 6px;
  cursor: pointer; font-size: 0.88rem; font-weight: 500;
  font-family: inherit;
}
.hc-snippet__actions button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.hc-snippet {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.hc-snippet pre {
  margin: 0; padding: 14px 16px;
  background: #0f172a; color: #e2e8f0;
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem; line-height: 1.5;
  max-height: 600px; overflow-y: auto;
}

/* ───── Aspect Ratio calculator ───── */
.ar-calc { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.ar-calc__row { display: flex; flex-direction: column; gap: 4px; }
.ar-calc__row label { font-size: 0.85rem; color: var(--text-muted); }
.ar-calc__row select,
.ar-calc__row input[type="number"] {
  padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.95rem; font-family: inherit;
  background: var(--bg); color: var(--text);
}
.ar-calc__row--dims { flex-direction: row; gap: 12px; }
.ar-calc__col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ar-calc__pair { display: flex; align-items: center; gap: 8px; }
.ar-calc__pair input { flex: 1; }
.ar-calc__sep { font-weight: 600; color: var(--text-muted); }
.ar-summary {
  padding: 10px 12px;
  background: var(--bg-alt);
  border-radius: 6px;
  font-size: 0.92rem; line-height: 1.5;
}
.ar-summary:not(.muted) { color: var(--text); font-weight: 500; }
.ar-calc__preview {
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; padding: 16px 0;
}
.ar-calc__preview-box {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary), white 30%));
  border-radius: 4px;
  transition: width 0.15s ease, height 0.15s ease;
}

.ik-signals-section { margin-top: 18px; }
.ik-signals-section h3 { font-size: 1rem; margin-bottom: 4px; }

.ik-sig-group {
  margin: 12px 0; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg);
}
.ik-sig-group.is-primary { border-color: var(--primary); }
.ik-sig-group__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.ik-sig-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%;
}
.ik-sig-list { list-style: none; margin: 0; padding: 0; }
.ik-sig-list li {
  padding: 8px 0; border-top: 1px solid var(--border);
}
.ik-sig-list li:first-child { border-top: none; }
.ik-sig-label {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
  font-size: 0.92rem;
}
.ik-sig-loc {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  background: var(--bg-alt); padding: 2px 6px; border-radius: 4px;
}
.ik-sig-mech {
  margin-top: 4px; font-size: 0.85rem; color: var(--text-muted);
}
.ik-sig-empty { padding: 10px 0; }

.ik-recs-section { margin-top: 22px; }
.ik-recs-section h3 { font-size: 1rem; margin-bottom: 4px; }

.ik-rec-group {
  margin-top: 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg);
}
.ik-rec-group summary {
  cursor: pointer; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.92rem;
}
.ik-rec-group[open] summary { border-bottom: 1px solid var(--border); }
.ik-rec-list { list-style: none; margin: 0; padding: 8px 12px 12px; }
.ik-rec {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-top: 1px solid var(--border);
}
.ik-rec:first-child { border-top: none; }
.ik-rec-impact {
  flex: 0 0 auto; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 7px; border-radius: 4px;
  font-weight: 600; white-space: nowrap;
}
.ik-rec--high .ik-rec-impact { background: #fee2e2; color: #991b1b; }
.ik-rec--medium .ik-rec-impact { background: #fef3c7; color: #92400e; }
.ik-rec--low .ik-rec-impact { background: #e0f2fe; color: #075985; }
.ik-rec-action { font-weight: 500; font-size: 0.92rem; }
.ik-rec-why { margin-top: 3px; font-size: 0.85rem; color: var(--text-muted); }

/* ───── Intent type reference cards (bottom of page) ───── */
.ik-intent-types { margin-top: 40px; }
.ik-intent-types h2 { margin-bottom: 6px; }
.ik-itype-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px; margin-top: 16px;
}
.ik-itype {
  border: 1px solid var(--border); border-top: 3px solid var(--text-muted);
  border-radius: var(--radius); padding: 14px 16px; background: var(--bg);
}
.ik-itype h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; font-size: 1.05rem;
}
.ik-itype p { font-size: 0.92rem; line-height: 1.5; margin: 6px 0; }
.ik-itype-links { margin-top: 10px; font-size: 0.85rem; }
.ik-itype-links a { color: var(--primary); text-decoration: none; }
.ik-itype-links a:hover { text-decoration: underline; }
.ik-itype-footnote { margin-top: 16px; font-style: italic; }

/* ───── Schema validator: Google Rich Results Test link ───── */
.sv-google-callout {
  margin: 12px 0 0; padding: 10px 14px;
  background: var(--bg-alt); border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.sv-google-callout a { color: var(--primary); font-weight: 600; text-decoration: none; }
.sv-google-callout a:hover { text-decoration: underline; }
.sv-google-btn {
  display: inline-block;
  margin: 12px 0;
  padding: 10px 16px;
  border: 1px solid var(--primary); border-radius: 8px;
  color: var(--primary); background: var(--bg);
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.sv-google-btn:hover { background: var(--primary); color: #fff; }
