/* Optimize for AI — light theme by default; dark is opt-in via [data-theme="dark"]. */
:root {
  --bg: #f5f6fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f2f9;
  --border: #e1e5ef;
  --text: #151a2d;
  --muted: #5a6378;
  --accent: #5b4ef0;
  --accent-2: #19b3d9;
  --accent-text: #4a3dd8;
  --glow-1: rgba(91, 78, 240, .14);
  --glow-2: rgba(25, 179, 217, .12);

  --pass: #15803d;  --pass-bg: rgba(22, 163, 74, .12);
  --warn: #a8530a;  --warn-bg: rgba(245, 158, 11, .16);
  --fail: #c01d1d;  --fail-bg: rgba(220, 38, 38, .11);
  --info: #1d4fd8;  --info-bg: rgba(59, 130, 246, .11);
  --skip: #667085;  --skip-bg: rgba(102, 112, 133, .12);

  --grade-a: #16a34a; --grade-b: #0d9488; --grade-c: #d97706; --grade-d: #ea580c; --grade-f: #dc2626; --grade-x: #8a93a6;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(21, 26, 45, .04), 0 10px 30px rgba(21, 26, 45, .07);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0f1a;
  --bg-2: #111526;
  --panel: #141a2b;
  --panel-2: #1b2237;
  --border: #283150;
  --text: #e8ebf5;
  --muted: #9aa3ba;
  --accent: #8b80ff;
  --accent-2: #3fd0f0;
  --accent-text: #a79fff;
  --glow-1: rgba(139, 128, 255, .16);
  --glow-2: rgba(63, 208, 240, .10);

  --pass: #4ade80;  --pass-bg: rgba(74, 222, 128, .13);
  --warn: #fbbf24;  --warn-bg: rgba(251, 191, 36, .14);
  --fail: #f87171;  --fail-bg: rgba(248, 113, 113, .14);
  --info: #7cb0ff;  --info-bg: rgba(96, 165, 250, .14);
  --skip: #98a2b8;  --skip-bg: rgba(152, 162, 184, .13);

  --grade-a: #4ade80; --grade-b: #2dd4bf; --grade-c: #fbbf24; --grade-d: #fb923c; --grade-f: #f87171; --grade-x: #8a93a6;
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 12% -8%, var(--glow-1), transparent 60%),
    radial-gradient(900px 500px at 92% -4%, var(--glow-2), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
code { font-family: var(--mono); font-size: .9em; }
a { color: var(--accent-text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- icons (CSS masks keep the markup and the CSP clean) ---- */
.chip-icon {
  display: inline-block; flex: 0 0 auto; width: 1.15em; height: 1.15em; vertical-align: -.2em;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
[data-icon="shield"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
[data-icon="firewall"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='1.5'/%3E%3Cpath d='M3 10h18M3 15h18M9 5v5M15 10v5M9 15v4'/%3E%3C/svg%3E"); }
[data-icon="doc"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
[data-icon="braces"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4H7a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1M16 4h1a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-1'/%3E%3C/svg%3E"); }
[data-icon="tree"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='5' rx='1'/%3E%3Crect x='3' y='16' width='6' height='5' rx='1'/%3E%3Crect x='15' y='16' width='6' height='5' rx='1'/%3E%3Cpath d='M12 8v4M6 16v-2h12v2'/%3E%3C/svg%3E"); }
[data-icon="spark"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3l1.9 5.1L18 10l-5.1 1.9L11 17l-1.9-5.1L4 10l5.1-1.9z'/%3E%3Cpath d='M19 14l.9 2.1L22 17l-2.1.9L19 20l-.9-2.1L16 17l2.1-.9z'/%3E%3C/svg%3E"); }
[data-icon="agent"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4l7 17 2.5-7.5L21 11z'/%3E%3Cpath d='M13.5 13.5 19 19'/%3E%3C/svg%3E"); }
[data-icon="cart"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a2 2 0 0 0 2 1.6h8.6a2 2 0 0 0 2-1.5L22 7H6'/%3E%3C/svg%3E"); }

/* ---- header ---- */
.site-header {
  max-width: 1100px; margin: 0 auto; padding: 22px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { display: block; filter: drop-shadow(0 4px 12px rgba(91, 78, 240, .35)); }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-for { font-weight: 500; color: var(--muted); margin: 0 .28em; }

.ghost-btn, .primary-btn {
  font: inherit; font-weight: 600; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; min-height: 44px;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.ghost-btn { background: var(--panel); color: var(--text); border-color: var(--border); padding: 8px 14px; font-size: .9rem; }
.ghost-btn:hover { border-color: var(--accent); }
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; padding: 0 26px; font-size: 1rem; box-shadow: 0 8px 22px rgba(91, 78, 240, .35);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(91, 78, 240, .45); }
.primary-btn:disabled { opacity: .6; cursor: progress; }
.theme-toggle { width: 44px; padding: 0; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---- hero ---- */
main { max-width: 1100px; margin: 0 auto; padding: 0 20px 64px; }
.hero { text-align: center; padding: 56px 0 28px; }
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border); color: var(--accent-text);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 16px; }
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 680px; margin: 0 auto 30px; color: var(--muted); font-size: 1.1rem; }

.scan-form { max-width: 680px; margin: 0 auto; }
.input-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-row:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--glow-1); }
.input-icon { color: var(--muted); flex: 0 0 auto; }
.input-row input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.08rem; padding: 10px 4px; outline: none;
}
.input-row .primary-btn { min-height: 48px; }

.advanced { margin: 12px auto 0; text-align: left; font-size: .9rem; }
.advanced summary { cursor: pointer; color: var(--muted); width: fit-content; margin: 0 auto; padding: 6px 4px; }
.advanced summary:hover { color: var(--text); }
.advanced[open] summary { margin-bottom: 8px; }
.advanced input {
  width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font: inherit; padding: 11px 14px;
}
.advanced input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { color: var(--muted); font-size: .82rem; margin: 6px 2px 0; }
.muted { color: var(--muted); font-weight: 400; }

.check-chips { list-style: none; padding: 0; margin: 26px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.check-chips li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border); font-size: .85rem; color: var(--muted); cursor: default;
}
.check-chips .chip-icon { color: var(--accent-text); }

/* ---- errors & progress ---- */
.error {
  max-width: 680px; margin: 18px auto 0; padding: 12px 16px; border-radius: 12px;
  background: var(--fail-bg); border: 1px solid color-mix(in srgb, var(--fail) 35%, transparent); color: var(--fail);
}
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.progress { max-width: 680px; margin: 26px auto 0; padding: 24px; display: flex; gap: 24px; align-items: center; }
.progress-title { margin: 0; font-size: 1.05rem; }
.progress-sub { margin: 2px 0 12px; color: var(--muted); font-size: .88rem; }
#progress-time { font-variant-numeric: tabular-nums; color: var(--accent-text); font-weight: 600; margin-left: 4px; }
.progress-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.progress-steps li {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--muted); animation: pulse 1.8s ease-in-out infinite;
}
.progress-steps li:nth-child(2n) { animation-delay: .3s; }
.progress-steps li:nth-child(3n) { animation-delay: .6s; }
@keyframes pulse { 50% { color: var(--accent-text); background: var(--glow-1); } }
.radar { position: relative; flex: 0 0 72px; height: 72px; }
.radar span {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  animation: ripple 2.1s ease-out infinite; opacity: 0;
}
.radar span:nth-child(2) { animation-delay: .7s; border-color: var(--accent-2); }
.radar span:nth-child(3) { animation-delay: 1.4s; }
.radar::after {
  content: ""; position: absolute; inset: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
@keyframes ripple { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }

/* ---- results ---- */
.results { margin-top: 34px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }

.summary { display: grid; grid-template-columns: auto 1fr minmax(240px, 300px); gap: 28px; padding: 26px; align-items: center; }
.score-ring { position: relative; width: 150px; height: 150px; color: var(--grade-x); }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 11; }
.score-ring .track { stroke: var(--panel-2); }
.score-ring .meter { stroke: currentColor; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1); }
.score-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-text .grade { font-size: 3.2rem; font-weight: 800; line-height: 1; color: currentColor; }
.score-text .score-num { font-size: .85rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.grade-a { color: var(--grade-a); } .grade-b { color: var(--grade-b); } .grade-c { color: var(--grade-c); }
.grade-d { color: var(--grade-d); } .grade-f { color: var(--grade-f); } .grade-x { color: var(--grade-x); }

.summary-body h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.summary-body h2:focus { outline: none; }
.summary-body .site { color: var(--accent-text); }
.verdict { margin: 6px 0 12px; color: var(--muted); }
.lanes { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.lane { display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 12px; border-radius: 10px; background: var(--panel-2); font-size: .88rem; }
.lane span { color: var(--text); font-weight: 600; }
.lane strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.meta { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.meta li:not(:last-child)::after { content: "·"; margin-left: 16px; opacity: .6; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.count { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; padding: 4px 10px 4px 4px; border-radius: 999px; }
.count.s-fail { background: var(--fail-bg); } .count.s-warn { background: var(--warn-bg); }
.count.s-pass { background: var(--pass-bg); } .count.s-info { background: var(--info-bg); }
.note {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: .88rem;
  background: var(--warn-bg); color: var(--text); border-left: 3px solid var(--warn);
}

.group-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.group-bars a {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  text-decoration: none; color: var(--text); font-size: .84rem; padding: 4px 6px; border-radius: 8px;
}
.group-bars a:hover { background: var(--panel-2); }
.group-bars .chip-icon { color: var(--muted); grid-row: span 2; }
.group-bars .bar { grid-column: 2; grid-row: 2; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 3px; }
.group-bars .bar span { display: block; height: 100%; background: currentColor; border-radius: inherit; transition: width 1s ease; }
.bar-score { grid-column: 3; grid-row: span 2; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }

/* status badge: ✓ ! ✕ i – in a coloured circle */
.badge {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; font-weight: 800; line-height: 1;
}
.badge.s-pass { background: var(--pass-bg); color: var(--pass); }
.badge.s-warn { background: var(--warn-bg); color: var(--warn); }
.badge.s-fail { background: var(--fail-bg); color: var(--fail); }
.badge.s-info { background: var(--info-bg); color: var(--info); font-style: italic; font-family: Georgia, serif; }
.badge.s-skip { background: var(--skip-bg); color: var(--skip); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-spacer { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border); transition: background .15s ease; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent-text); outline-offset: 2px; }

.priorities { padding: 20px 22px; border-left: 4px solid var(--accent); }
.priorities h2 { margin: 0 0 10px; font-size: 1.05rem; }
.plan-btn { padding: 8px 14px; font-size: .9rem; }
.priorities ol { margin: 0; padding: 0; list-style: none; counter-reset: fix; display: grid; gap: 6px; }
.priority {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid transparent; border-radius: 10px; padding: 9px 12px; cursor: pointer;
}
.priority::before { counter-increment: fix; content: counter(fix); font-weight: 800; color: var(--muted); min-width: 1ch; }
.priority:hover { border-color: var(--accent); }
.priority-title { flex: 1; font-weight: 600; }
.priority-group { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.priority-gain {
  font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px;
  color: var(--pass); background: var(--pass-bg); white-space: nowrap;
}
.priority-gain.is-critical { color: var(--fail); background: var(--fail-bg); }

/* ---- groups & checks ---- */
.group { padding: 8px 8px 12px; scroll-margin-top: 16px; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.group-head h2 { margin: 0; font-size: 1.12rem; flex: 1; letter-spacing: -.01em; }
.group-icon {
  width: 34px; height: 34px; border-radius: 10px; padding: 0; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-mask: none; mask: none; position: relative;
}
.group-icon::after {
  content: ""; position: absolute; inset: 8px; background: #fff;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.group-counts { display: flex; gap: 6px; }
.mini { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.mini .badge { width: 20px; height: 20px; font-size: .7rem; }
.score-chip {
  min-width: 46px; text-align: center; font-weight: 800; font-size: .95rem; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 13%, transparent);
}

.checks { display: flex; flex-direction: column; gap: 4px; }
.check { border-radius: 12px; border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.check:hover, .check[open] { background: var(--panel-2); }
.check[open] { border-color: var(--border); }
.check summary {
  display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; border-radius: 12px;
}
.check summary::-webkit-details-marker { display: none; }
.check summary::after {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin: 8px 4px 0 auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease;
}
.check[open] summary::after { transform: rotate(-135deg); margin-top: 11px; }
.check .badge { margin-top: 1px; }
.check-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.check-title { font-weight: 650; }
.check.s-fail .check-title { color: var(--fail); }
.check-detail { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check[open] .check-detail { display: none; }
.tag {
  align-self: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 999px; background: var(--info-bg); color: var(--info);
}
.check-body { padding: 0 16px 16px 50px; font-size: .92rem; }
.check-desc { margin: 0 0 10px; }
.evidence {
  margin: 0 0 12px; padding: 10px 12px 10px 28px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: .8rem; color: var(--muted); overflow-wrap: anywhere;
}
.evidence li + li { margin-top: 3px; }
.fix { padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); margin-bottom: 10px; }
.fix p { margin: 0 0 8px; }
.fix-title { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.code-block { position: relative; }
.code-block pre {
  margin: 0; padding: 14px 16px; border-radius: 10px; overflow-x: auto;
  background: var(--panel-2); border: 1px solid var(--border);
}
.code-block code { font-size: .8rem; white-space: pre; color: var(--text); }
.copy-btn {
  position: absolute; top: 8px; right: 8px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.copied { color: var(--pass); border-color: var(--pass); }
.source { font-size: .84rem; font-weight: 600; text-decoration: none; }
.source:hover { text-decoration: underline; }

.check-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 4px; }
.basis {
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .01em;
}
.basis-vendor { background: var(--pass-bg); color: var(--pass); }
.basis-spec { background: var(--info-bg); color: var(--info); }
.basis-heuristic { background: var(--skip-bg); color: var(--skip); }
.prompt-btn { min-height: 34px; padding: 4px 12px; font-size: .8rem; margin-left: auto; }
.tag-critical { background: var(--fail-bg); color: var(--fail); }
.group-note { color: var(--muted); font-size: .88rem; margin: -4px 14px 12px; }
.bot-caveat { color: var(--muted); font-size: .8rem; margin: 8px 4px 4px; }
.side-panel { padding: 18px 22px; }
.side-panel h2 { margin: 0 0 6px; font-size: 1.05rem; }
.side-panel .group-note { margin: 0 0 10px; }
.plain-list { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--muted); display: grid; gap: 6px; }
.plain-list strong { color: var(--text); }
.group-access .bot-matrix { margin-bottom: 10px; }

/* "Issues only": just the checks, crawlers and pages that need work — no empty groups, no info panels. */
.results.issues-only .check.s-pass,
.results.issues-only .check.s-info,
.results.issues-only .check.s-skip,
.results.issues-only .no-issues,
.results.issues-only .side-panel,
.results.issues-only .bot-table tr.bot-ok,
.results.issues-only .pages-table tr.page-ok { display: none; }

/* ---- tables ---- */
.bot-matrix { margin: 8px 6px 0; }
.bot-matrix summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; padding: 10px 12px;
  border-radius: 12px; border: 1px dashed var(--border); list-style: none;
}
.bot-matrix summary::-webkit-details-marker { display: none; }
.bot-matrix summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: 4px;
}
.bot-matrix[open] summary::before { transform: rotate(45deg); }
.bot-matrix summary:hover { border-color: var(--accent); }
.bot-matrix-title { font-weight: 700; margin-right: 4px; }
.bot-matrix .table-wrap { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; margin: 10px 6px 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
caption { text-align: left; font-weight: 700; padding: 12px 14px 4px; }
th, td { text-align: left; padding: 9px 14px; border-top: 1px solid var(--border); vertical-align: top; }
thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; }
.tgroup { background: var(--panel-2); font-size: .8rem; font-weight: 700; color: var(--text); }
.bot { white-space: nowrap; font-weight: 400; }
.bot-name { font-weight: 700; color: var(--text); text-decoration: none; display: block; }
.bot-name:hover { color: var(--accent-text); text-decoration: underline; }
.bot-vendor { display: block; font-size: .78rem; color: var(--muted); }
.what { color: var(--muted); min-width: 180px; }
.bot-note { display: block; font-size: .75rem; font-style: italic; margin-top: 2px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.chip-ok { background: var(--pass-bg); color: var(--pass); }
.chip-bad { background: var(--fail-bg); color: var(--fail); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-muted { background: var(--skip-bg); color: var(--skip); }
.chip-type { background: var(--info-bg); color: var(--info); font-weight: 600; margin: 0 4px 4px 0; }

.pages .table-wrap { margin-top: 0; }
.page { font-weight: 400; min-width: 220px; max-width: 420px; }
.role {
  display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); margin-right: 6px;
}
.role-home { background: var(--glow-1); color: var(--accent-text); }
.page-url { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }
.page-title { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; }
.bad-text { color: var(--fail); font-weight: 700; }
.ok-text { color: var(--pass); font-size: .82rem; }
.issues ul { margin: 0; padding-left: 16px; color: var(--warn); font-size: .82rem; }

/* ---- FAQ & footer ---- */
.agents-box { margin-top: 56px; padding: 20px 24px; border-left: 4px solid var(--accent); }
.agents-box h2 { margin: 0 0 8px; font-size: 1.1rem; }
.agents-box p { margin: 0; color: var(--muted); line-height: 1.7; }
.agents-box code { color: var(--text); background: var(--panel-2); padding: 2px 7px; border-radius: 6px; overflow-wrap: anywhere; }
.faq { margin-top: 48px; }
.faq h2 { font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 18px; text-align: center; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq article { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.faq h3 { margin: 0 0 6px; font-size: 1rem; }
.faq p { margin: 0; color: var(--muted); font-size: .92rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 20px 40px; }
.site-footer p { max-width: 640px; margin: 0 auto; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .summary { grid-template-columns: auto 1fr; }
  .group-bars { grid-column: 1 / -1; }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  main { padding: 0 16px 48px; }
  .site-header { padding: 16px 16px 0; }
  .hero { padding-top: 34px; }
  .lede { font-size: 1rem; }
  .input-row { flex-wrap: wrap; padding: 8px; }
  .input-icon { display: none; }
  .input-row input { flex-basis: 100%; padding: 8px 8px; }
  .input-row .primary-btn { width: 100%; }
  .progress { flex-direction: column; text-align: center; }
  .progress-steps { justify-content: center; }
  .summary { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 20px; }
  .meta, .counts, .lanes { justify-content: center; }
  .meta li::after { display: none; }
  .group-bars { width: 100%; text-align: left; }
  .toolbar .ghost-btn { flex: 1 1 auto; }
  .toolbar-spacer { display: none; }
  .check-body { padding-left: 16px; }
  .group-counts { display: none; }
  .priority-group { display: none; }
}
/* Wide tables become one card per row: the name and its verdict/status on top, then labelled lines. */
@media (max-width: 900px) {
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack, .stack caption, .stack tbody, .stack tr, .stack th, .stack td { display: block; }
  .stack tr:not(.tgroup-row) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 10px 14px; border-top: 1px solid var(--border); }
  .pages-table.stack tr { grid-template-columns: minmax(0, 1fr) auto; }
  .pages-table.stack td[data-label] { grid-column: 1 / -1; }
  .stack tr th, .stack tr td { border: 0; padding: 0; min-width: 0; max-width: none; }
  .stack .tgroup { padding: 9px 14px; border-top: 1px solid var(--border); }
  .stack .bot, .stack .chip { white-space: normal; }
  .stack td.verdict { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  .stack td.what, .stack td.issues { grid-column: 1 / -1; }
  .stack td.what { order: 1; font-size: .8rem; }
  .stack td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); margin-bottom: 2px;
  }
}

@media print {
  .site-header, .scan-form, .check-chips, .toolbar, .faq, .progress, .copy-btn { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}
