:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e2e5ef;
  --text: #141a2e;
  --text-2: #4a5270;
  --muted: #7a82a0;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-soft: #eef0ff;
  --pass: #16a34a;
  --pass-soft: #e8f7ee;
  --warn: #d97706;
  --warn-soft: #fdf3e2;
  --fail: #dc2626;
  --fail-soft: #fdeaea;
  --info: #64748b;
  --info-soft: #eef1f5;
  --shadow: 0 1px 2px rgba(20, 26, 46, .04), 0 6px 24px rgba(20, 26, 46, .06);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1120;
    --surface: #151a2c;
    --surface-2: #1c2238;
    --border: #2a3150;
    --text: #e8ebf6;
    --text-2: #b3b9d3;
    --muted: #868daa;
    --accent: #818cf8;
    --accent-2: #38bdf8;
    --accent-soft: #232a4d;
    --pass: #34d399;
    --pass-soft: #12302a;
    --warn: #fbbf24;
    --warn-soft: #3a2e12;
    --fail: #f87171;
    --fail-soft: #3d1a1d;
    --info: #94a3b8;
    --info-soft: #222a3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo svg { width: 34px; height: 34px; }
.brand-logo rect { fill: var(--accent); stroke: none; }
.brand-logo path { stroke: #fff; stroke-width: 3; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; }
.brand-text small { font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.big { padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; background:
  radial-gradient(900px 300px at 15% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
  radial-gradient(700px 280px at 95% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%); }
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; max-width: 860px; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text-2); font-size: 16.5px; max-width: 820px; margin: 14px 0 26px; }
.search { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); max-width: 900px; }
.search-row { display: flex; gap: 10px; align-items: stretch; }
.search-icon { display: flex; align-items: center; padding-left: 8px; color: var(--muted); }
.search-icon svg { width: 22px; height: 22px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; padding: 14px 6px; }
.search .btn.big { height: 52px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 8px 2px; border-top: 1px solid var(--border); margin-top: 12px; color: var(--text-2); font-size: 13.5px; }
.chk, .sel { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.chk small { color: var(--muted); }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.sel select { font: inherit; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; }

.alert { border-radius: 12px; padding: 12px 16px; margin-top: 16px; max-width: 900px; font-weight: 500; }
.alert.error { background: var(--fail-soft); color: var(--fail); border: 1px solid color-mix(in srgb, var(--fail) 30%, transparent); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 700; color: var(--accent); }

/* ---------- progress ---------- */
#progress { margin-top: 8px; margin-bottom: 40px; }
.progress-card { max-width: 900px; }
.progress-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.progress-head h2 { font-size: 20px; margin-top: 4px; word-break: break-all; }
.prog-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-2); font-size: 20px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 18px 0; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .5s; }
.steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 6px 0; }
.steps .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.steps .pending .st { border: 2px solid var(--border); }
.steps .running .st { border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps .done .st { background: var(--pass); color: #fff; }
.steps .warn .st { background: var(--warn); color: #fff; }
.steps .error .st { background: var(--fail); color: #fff; }
.steps .lbl { font-weight: 600; }
.steps .pending .lbl { color: var(--muted); font-weight: 500; }
.steps .note { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- report layout ---------- */
#report { padding-bottom: 60px; }
.rep-head { padding: 34px 0 10px; }
.rep-head-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.rep-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.01em; word-break: break-all; }
.rep-meta { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.rep-meta a { word-break: break-all; }
.rep-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.secnav { position: sticky; top: 62px; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.secnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.secnav .wrap::-webkit-scrollbar { display: none; }
.secnav a { flex: none; padding: 7px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.secnav a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.secnav a.active { background: var(--accent-soft); color: var(--accent); }

.sec { margin-bottom: 44px; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-title h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sec-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* scores */
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 16px; }
.gauge-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; }
.gauge { position: relative; width: 132px; height: 132px; }
.gauge svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.gauge .track { stroke: var(--surface-2); stroke-width: 11; }
.gauge .val { stroke-width: 11; transition: stroke-dashoffset 1s ease; }
.gauge .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gauge-card h3 { margin-top: 10px; font-size: 16px; }
.gauge-card .lbl { font-size: 13px; font-weight: 700; margin-top: 2px; }
.gauge-card p { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.c-pass { color: var(--pass); } .c-warn { color: var(--warn); } .c-fail { color: var(--fail); } .c-info { color: var(--info); }
.s-pass { stroke: var(--pass); } .s-warn { stroke: var(--warn); } .s-fail { stroke: var(--fail); }
.counts-card { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.count-row { display: flex; align-items: center; gap: 12px; }
.count-row .n { font-size: 26px; font-weight: 800; min-width: 48px; font-variant-numeric: tabular-nums; }
.count-row .t { color: var(--text-2); font-weight: 600; }

/* category bars */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.catbars h3 { font-size: 15px; margin-bottom: 14px; display: flex; justify-content: space-between; }
.catbar { display: grid; grid-template-columns: 1fr 44px; gap: 4px 12px; align-items: center; padding: 7px 0; color: var(--text); }
.catbar:hover { text-decoration: none; }
.catbar .nm { font-weight: 600; font-size: 14px; }
.catbar .nm small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.catbar .sc { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.catbar .track { grid-column: 1 / -1; height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.catbar .fill { height: 100%; border-radius: 99px; }
.bg-pass { background: var(--pass); } .bg-warn { background: var(--warn); } .bg-fail { background: var(--fail); }

/* previews */
.serp { font-family: Arial, sans-serif; max-width: 640px; }
.serp-site { display: flex; align-items: center; gap: 10px; }
.serp-fav { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); }
.serp-fav img { width: 18px; height: 18px; }
.serp-name { font-size: 14px; color: var(--text); line-height: 1.2; }
.serp-crumb { font-size: 12px; color: var(--text-2); }
.serp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 6px 0 3px; }
@media (prefers-color-scheme: dark) { .serp-title { color: #99c3ff; } }
.serp-desc { color: var(--text-2); font-size: 14px; line-height: 1.58; }
.social-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-width: 520px; background: var(--surface-2); }
.social-img { aspect-ratio: 1.91/1; background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.social-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-body { padding: 10px 14px 12px; background: var(--surface); }
.social-body .dom { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.social-body .tt { font-weight: 700; margin: 2px 0; }
.social-body .ds { font-size: 13px; color: var(--text-2); }
.card h3.ct { font-size: 15px; margin-bottom: 14px; }

.kv { display: grid; grid-template-columns: minmax(130px, 32%) 1fr; gap: 0; font-size: 14px; }
.kv > div { padding: 8px 0; border-bottom: 1px solid var(--border); }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 500; padding-right: 12px; }
.kv > div:nth-child(even) { word-break: break-word; }

.taglist { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.tag.pass { background: var(--pass-soft); color: var(--pass); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.fail { background: var(--fail-soft); color: var(--fail); border-color: transparent; }
.tag.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag.acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; }
.checklist .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; margin-top: 1px; }

/* action plan */
.plan-group { margin-bottom: 22px; }
.plan-group h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.plan-group h3 .pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; color: #fff; }
.p1 { background: var(--fail); } .p2 { background: var(--warn); } .p3 { background: var(--accent); }
.plan-list { display: grid; gap: 10px; }
.plan-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 18px; }
.plan-num { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--text-2); }
.plan-item h4 { font-size: 15px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plan-item .found { color: var(--text-2); font-size: 13.5px; margin: 6px 0; word-break: break-word; }
.plan-item .fix { font-size: 14px; white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border-left: 3px solid var(--accent); }

/* check groups */
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.cat-block { margin-bottom: 18px; padding: 0; overflow: hidden; }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.cat-head h3 { font-size: 17px; }
.cat-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cat-score { display: flex; align-items: center; gap: 10px; }
.cat-score .big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.check { border-bottom: 1px solid var(--border); }
.check:last-child { border-bottom: 0; }
.check > summary { list-style: none; display: grid; grid-template-columns: 26px minmax(160px, 300px) 1fr auto 16px; gap: 12px; align-items: center; padding: 12px 20px; cursor: pointer; }
.check > summary::-webkit-details-marker { display: none; }
.check > summary:hover { background: var(--surface-2); }
.check .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; }
.ic.pass { background: var(--pass); } .ic.warn { background: var(--warn); } .ic.fail { background: var(--fail); } .ic.info { background: var(--info); }
.check .t { font-weight: 600; font-size: 14px; }
.check .v { color: var(--text-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.check .chev { color: var(--muted); transition: transform .15s; }
.check[open] .chev { transform: rotate(90deg); }
.check-body { padding: 4px 20px 18px 58px; display: grid; gap: 12px; font-size: 14px; }
.check-body .full { color: var(--text); word-break: break-word; white-space: pre-wrap; }
.check-body .why b, .check-body .fixbox b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.check-body .fixbox { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; white-space: pre-wrap; }
.check-body .fixbox b { color: var(--accent); }
.dlist { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; display: grid; gap: 3px; }
.dlist li { word-break: break-word; }
.hide-pass .check.st-pass, .hide-pass .check.st-info { display: none; }
.only-pass .check.st-warn, .only-pass .check.st-fail { display: none; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 12px; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td { word-break: break-word; max-width: 460px; }
td.ok { color: var(--pass); font-weight: 700; }
td.no { color: var(--fail); font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* psi */
.psi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.psi-card h3 { display: flex; align-items: center; justify-content: space-between; font-size: 17px; margin-bottom: 16px; }
.mini-gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.mini { text-align: center; }
.mini .gauge, .mini .gauge svg { width: 76px; height: 76px; margin: 0 auto; }
.mini .gauge .num { font-size: 20px; }
.mini .gauge .track, .mini .gauge .val { stroke-width: 9; }
.mini span { display: block; font-size: 12px; color: var(--text-2); margin-top: 6px; font-weight: 600; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.metric { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; border-left: 3px solid var(--info); }
.metric.pass { border-left-color: var(--pass); } .metric.warn { border-left-color: var(--warn); } .metric.fail { border-left-color: var(--fail); }
.metric .mn { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric .mv { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric .mc { font-size: 11.5px; font-weight: 700; }
.opps { display: grid; gap: 6px; }
.opp { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 12px; background: var(--surface-2); border-radius: 9px; font-size: 13.5px; }
.opp .sv { font-weight: 700; color: var(--warn); white-space: nowrap; font-size: 12.5px; }
.opp small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.shot { max-width: 140px; border-radius: 10px; border: 1px solid var(--border); float: right; margin: 0 0 10px 12px; }
h4.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }

/* content */
.outline { list-style: none; padding: 0; margin: 0; font-size: 13.5px; max-height: 520px; overflow: auto; }
.outline li { padding: 4px 0; display: flex; gap: 8px; align-items: baseline; }
.outline .hl { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); flex: none; }
.outline .h1 .hl { background: var(--accent); color: #fff; }
.outline .q { color: var(--pass); font-weight: 700; font-size: 11px; }
.kw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.tile .tv { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .tn { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* do / dont */
.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dd h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 12px; }
.dd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dd li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; }
.dd li::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--pass-soft); color: var(--pass); margin-top: 1px; }
.dd.dont li::before { content: "✕"; background: var(--fail-soft); color: var(--fail); }
.ctx-donts { border: 1px solid color-mix(in srgb, var(--fail) 35%, transparent); background: var(--fail-soft); }
.ctx-donts h3 { color: var(--fail); }

pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 0; }
details.raw > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* history */
.dlg { border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(720px, 94vw); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.dlg::backdrop { background: rgba(10, 14, 30, .5); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 18px; }
.history-list { max-height: 70vh; overflow: auto; padding: 8px 12px 14px; }
.h-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.h-item:last-child { border-bottom: 0; }
.h-item .hu { font-weight: 600; word-break: break-all; }
.h-item .hd { font-size: 12px; color: var(--muted); }
.h-scores { display: flex; gap: 6px; }

.foot { color: var(--muted); font-size: 12.5px; padding: 26px 20px 40px; border-top: 1px solid var(--border); }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .score-grid { grid-template-columns: repeat(3, 1fr); }
  .counts-card { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-around; }
  .psi-grid, .two-col, .dd-grid { grid-template-columns: 1fr; }
  .kw-grid { grid-template-columns: 1fr; }
  .check > summary { grid-template-columns: 26px 1fr auto 16px; }
  .check .v { grid-column: 2 / 4; grid-row: 2; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 32px 0 26px; }
  .search-row { flex-wrap: wrap; }
  .search-icon { display: none; }
  .search input { width: 100%; flex-basis: 100%; padding: 10px 6px; }
  .search .btn.big { width: 100%; justify-content: center; }
  .score-grid { grid-template-columns: 1fr; }
  .gauge-card { flex-direction: row; text-align: left; gap: 16px; }
  .gauge-card .gtxt { flex: 1; }
  .gauge, .gauge svg { width: 96px; height: 96px; }
  .gauge .num { font-size: 26px; }
  .mini-gauges { grid-template-columns: repeat(2, 1fr); }
  .check-body { padding-left: 20px; }
  .check .imp { display: none; }
  .brand-text small { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; }
  .h-item { grid-template-columns: 1fr auto; }
  .h-scores { grid-column: 1 / -1; }
}

/* ---------- print / PDF ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; color-scheme: light; }
  body { font-size: 11.5px; background: #fff; color: #000; }
  .topbar, .hero, #progress, .secnav, .rep-actions, .toolbar, .foot, .no-print, .dlg { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
  .check { break-inside: avoid; }
  .sec { break-before: auto; margin-bottom: 26px; }
  .check-body { padding-left: 40px; }
  .check .v { -webkit-line-clamp: unset; }
  .tbl-wrap { overflow: visible; }
  td { max-width: none; }
  a { color: #000; }
  .outline, pre.code, .history-list { max-height: none; overflow: visible; }
  .print-head { display: block !important; }
}
.print-head { display: none; }
