:root {
  --bg: #f5f7fb;
  --bg-hero: radial-gradient(1200px 500px at 50% -120px, rgba(79, 70, 229, .14), transparent 70%);
  --surface: #ffffff;
  --surface-2: #f2f4f9;
  --surface-3: #e9edf5;
  --border: #e2e6ef;
  --border-strong: #cfd5e2;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent-2: #0891b2;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, .1);
  --pass: #15803d;
  --pass-strong: #16a34a;
  --pass-bg: #e7f6ec;
  --pass-border: #bfe6cc;
  --warn: #b45309;
  --warn-strong: #f59e0b;
  --warn-bg: #fef4e2;
  --warn-border: #f7d9a4;
  --fail: #b91c1c;
  --fail-strong: #ef4444;
  --fail-bg: #fdecec;
  --fail-border: #f6c3c3;
  --info: #475569;
  --info-strong: #64748b;
  --info-bg: #eef1f6;
  --info-border: #d6dce7;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 18px 48px rgba(15, 23, 42, .10);
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1d;
    --bg-hero: radial-gradient(1200px 500px at 50% -120px, rgba(124, 116, 255, .22), transparent 70%);
    --surface: #111829;
    --surface-2: #172036;
    --surface-3: #1d2842;
    --border: #222d46;
    --border-strong: #2f3c5c;
    --text: #e8ebf3;
    --text-2: #c3cad9;
    --muted: #8d98b0;
    --accent: #8b84ff;
    --accent-2: #22d3ee;
    --accent-hover: #a29cff;
    --accent-soft: rgba(139, 132, 255, .14);
    --pass: #4ade80;
    --pass-strong: #22c55e;
    --pass-bg: rgba(34, 197, 94, .12);
    --pass-border: rgba(34, 197, 94, .3);
    --warn: #fbbf24;
    --warn-strong: #f59e0b;
    --warn-bg: rgba(245, 158, 11, .12);
    --warn-border: rgba(245, 158, 11, .32);
    --fail: #f87171;
    --fail-strong: #ef4444;
    --fail-bg: rgba(239, 68, 68, .12);
    --fail-border: rgba(239, 68, 68, .32);
    --info: #a5b0c6;
    --info-strong: #94a3b8;
    --info-bg: rgba(148, 163, 184, .12);
    --info-border: rgba(148, 163, 184, .28);
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.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;
}
code { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo {
  width: 32px; height: 32px; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}
.nav-tag { color: var(--muted); font-size: 13px; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-hero); text-align: center; padding: 64px 0 40px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 5.4vw, 54px); line-height: 1.06; letter-spacing: -.035em; margin: 0 auto 14px; max-width: 760px; }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 18.5px); margin: 0 auto 34px; max-width: 620px; }

.scan-form {
  position: relative; display: flex; gap: 8px; max-width: 660px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); padding: 8px; border-radius: 18px;
  box-shadow: var(--shadow-lg); transition: border-color .15s, box-shadow .15s;
}
.scan-form:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft); }
.input-icon { display: grid; place-items: center; padding-left: 10px; color: var(--muted); }
.scan-form input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 18px; padding: 12px 8px;
}
.scan-form input::placeholder { color: var(--muted); opacity: .75; }
.scan-form button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-hover)); color: #fff;
  font-weight: 650; font-size: 16px; padding: 0 26px; min-height: 50px; cursor: pointer; white-space: nowrap;
  transition: transform .1s, filter .15s;
}
.scan-form button:hover { filter: brightness(1.08); }
.scan-form button:active { transform: translateY(1px); }
.scan-form button:disabled { cursor: progress; filter: saturate(.7); }
.btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.scan-form button.busy .btn-spinner { display: inline-block; }

.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.error-box {
  display: flex; align-items: center; gap: 10px; text-align: left;
  max-width: 660px; margin: 16px auto 0; padding: 12px 16px; border-radius: 12px;
  background: var(--fail-bg); color: var(--fail); border: 1px solid var(--fail-border); font-weight: 550;
}
.trust { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 13.5px; }
.trust li::before { content: "✓"; color: var(--pass-strong); font-weight: 800; margin-right: 6px; }

/* ---------- Loading ---------- */
.loading { padding: 8px 0 24px; }
.loading-card {
  display: flex; gap: 22px; align-items: center; max-width: 660px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow);
}
.loading-title { font-size: 16px; margin-bottom: 8px; word-break: break-all; }
.loading-steps { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 13.5px; }
.loading-steps li { padding: 2px 0; opacity: .35; animation: step 2.4s ease-in-out infinite; }
.loading-steps li:nth-child(2) { animation-delay: .4s; }
.loading-steps li:nth-child(3) { animation-delay: .8s; }
.loading-steps li:nth-child(4) { animation-delay: 1.2s; }
.loading-steps li::before { content: "› "; color: var(--accent); }
@keyframes step { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }
.pulse { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Status primitives ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12px; font-weight: 750; letter-spacing: .04em;
  padding: 4px 10px 4px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.status-pill svg { width: 15px; height: 15px; }
.s-PASS { color: var(--pass); background: var(--pass-bg); border-color: var(--pass-border); }
.s-WARNING { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.s-FAIL { color: var(--fail); background: var(--fail-bg); border-color: var(--fail-border); }
.s-INFO { color: var(--info); background: var(--info-bg); border-color: var(--info-border); }

.status-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.status-icon svg { width: 22px; height: 22px; }
.i-PASS { color: var(--pass-strong); background: var(--pass-bg); }
.i-WARNING { color: var(--warn-strong); background: var(--warn-bg); }
.i-FAIL { color: var(--fail-strong); background: var(--fail-bg); }
.i-INFO { color: var(--info-strong); background: var(--info-bg); }

/* ---------- Score card ---------- */
.score-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 32px 36px; box-shadow: var(--shadow-lg); margin: 8px 0 12px;
}
.score-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--score-color, var(--accent));
}
.score-left { display: grid; place-items: center; }
.gauge { position: relative; width: 220px; height: 220px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 16; }
.gauge .track { stroke: var(--surface-3); }
.gauge .value { stroke: var(--score-color, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.gauge-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-num strong { font-size: 64px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.gauge-num span { color: var(--muted); font-size: 13px; margin-top: 4px; }

.score-kicker { font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.score-domain { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; word-break: break-all; }
.score-grade-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.score-grade-row .status-pill { font-size: 13px; padding: 5px 12px 5px 8px; }
.score-sentence { color: var(--text-2); }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.count-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 650; border: 1px solid;
}
.count-chip svg { width: 15px; height: 15px; }
.count-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }

.mini-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 22px; }
.mini { min-width: 0; }
.mini-top { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mini-top span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.m-full { background: var(--pass-strong); }
.m-partial { background: var(--warn-strong); }
.m-zero { background: var(--fail-strong); }
.meta-line { color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ---------- Blocks ---------- */
.block { margin-top: 44px; }
.block-head { margin-bottom: 16px; }
.block-head h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; }
.block-head p { color: var(--muted); margin: 0; font-size: 14px; max-width: 760px; }

/* ---------- Check cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0; overflow: hidden;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-strong); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--card-color, transparent); }
.card.c-PASS { --card-color: var(--pass-strong); }
.card.c-WARNING { --card-color: var(--warn-strong); }
.card.c-FAIL { --card-color: var(--fail-strong); }
.card.c-INFO { --card-color: var(--info-strong); }
.card-body { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { margin: 0; font-size: 16.5px; letter-spacing: -.01em; }
.card-title .sub { color: var(--muted); font-size: 12.5px; }
.card .summary { color: var(--text-2); font-weight: 550; line-height: 1.45; }
.card-points { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.card-points .meter { flex: 1; }
.card-points b { color: var(--text); font-variant-numeric: tabular-nums; }

.header-list { display: grid; gap: 4px; }
.header-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; }
.header-mini span:first-child { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 750; letter-spacing: .03em; }
.dot svg { width: 14px; height: 14px; }
.dot.t-PASS { color: var(--pass); } .dot.t-WARNING { color: var(--warn); } .dot.t-FAIL { color: var(--fail); }

/* ---------- Accordion (details) ---------- */
.acc { border-top: 1px solid var(--border); }
.acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 20px; font-size: 13.5px; font-weight: 650; color: var(--accent); user-select: none;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--surface-2); }
.chev { width: 18px; height: 18px; transition: transform .2s; flex: none; }
.acc[open] > summary .chev { transform: rotate(180deg); }
.acc-body { padding: 4px 20px 18px; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; font-size: 13px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; color: var(--text-2); }
.sub-label { font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.record {
  font-family: var(--mono); font-size: 12px; line-height: 1.5; background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; word-break: break-all; margin: 4px 0;
}
.chain-row { display: flex; gap: 8px; align-items: baseline; }
.chain-row .code { flex: none; font-weight: 700; }
.issue { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 6px 0; }
.issue svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.issue.err { color: var(--fail); }
.issue.warn { color: var(--warn); }
.header-row { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.header-row:last-child { border-bottom: 0; }
.header-row .line { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.header-row .hname { font-weight: 650; font-size: 13.5px; }
.header-row p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Fixes ---------- */
.fixes { display: grid; gap: 10px; }
.fix {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.fix .status-icon { width: 36px; height: 36px; border-radius: 10px; }
.fix .status-icon svg { width: 20px; height: 20px; }
.fix-main { min-width: 0; }
.fix-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.fix-title { font-weight: 700; }
.fix-cat { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.fix-why { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; }
.fix-how { font-size: 13.5px; color: var(--text-2); margin: 0; }
.fix-how code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; word-break: break-word; }
.fix-gain { text-align: right; white-space: nowrap; }
.fix-gain b { display: block; font-size: 18px; color: var(--pass); font-variant-numeric: tabular-nums; }
.fix-gain span { font-size: 12px; color: var(--muted); }
.prio { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.prio-high { color: var(--fail); background: var(--fail-bg); }
.prio-medium { color: var(--warn); background: var(--warn-bg); }
.prio-low { color: var(--info); background: var(--info-bg); }
.all-good {
  display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--radius);
  background: var(--pass-bg); border: 1px solid var(--pass-border); color: var(--pass); font-weight: 600;
}

/* ---------- Breakdown ---------- */
.breakdown {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.cat { border-bottom: 1px solid var(--border); }
.cat:last-of-type { border-bottom: 0; }
.cat > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr minmax(120px, 260px) 84px 18px;
  align-items: center; gap: 18px; padding: 16px 22px; user-select: none;
}
.cat > summary::-webkit-details-marker { display: none; }
.cat > summary:hover { background: var(--surface-2); }
.cat-name { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cat-name .status-icon { width: 30px; height: 30px; border-radius: 8px; }
.cat-name .status-icon svg { width: 17px; height: 17px; }
.cat-pts { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.cat-pts small { color: var(--muted); font-weight: 600; }
.cat .meter { height: 8px; }
.cat[open] > summary .chev { transform: rotate(180deg); }
.cat .chev { color: var(--muted); }
.items { background: var(--surface-2); border-top: 1px solid var(--border); }
.item {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 12px; align-items: start;
  padding: 12px 22px; border-top: 1px solid var(--border);
}
.item:first-child { border-top: 0; }
.item-icon { width: 20px; height: 20px; margin-top: 1px; }
.item-icon.full { color: var(--pass-strong); }
.item-icon.partial { color: var(--warn-strong); }
.item-icon.zero { color: var(--fail-strong); }
.item .label { font-weight: 600; }
.item .reason { grid-column: 2 / 3; color: var(--muted); font-size: 13px; }
.pts-pill {
  grid-row: 1 / 3; grid-column: 3; align-self: center; font-variant-numeric: tabular-nums; font-weight: 750; font-size: 13px;
  padding: 3px 10px; border-radius: 8px; white-space: nowrap;
}
.pts-pill.full { color: var(--pass); background: var(--pass-bg); }
.pts-pill.partial { color: var(--warn); background: var(--warn-bg); }
.pts-pill.zero { color: var(--fail); background: var(--fail-bg); }
.total-row {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 22px;
  font-weight: 800; font-size: 17px; border-top: 1px solid var(--border);
}
.total-row .big { font-size: 22px; font-variant-numeric: tabular-nums; }

.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 56px 0 36px; margin-top: 40px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-card { grid-template-columns: 220px 1fr; gap: 28px; padding: 28px; }
  .gauge { width: 200px; height: 200px; }
  .mini-bars { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .nav-tag { display: none; }
  .hero { padding: 40px 0 28px; }
  .scan-form { flex-wrap: wrap; padding: 6px; }
  .input-icon { display: none; }
  .scan-form input { flex-basis: 100%; padding: 12px; }
  .scan-form button { flex: 1; min-height: 48px; }
  .loading-card { padding: 18px; gap: 16px; }
  .score-card { grid-template-columns: 1fr; text-align: center; padding: 26px 18px; gap: 16px; }
  .gauge { width: 180px; height: 180px; }
  .gauge-num strong { font-size: 52px; }
  .score-grade-row, .counts { justify-content: center; }
  .mini-bars { grid-template-columns: repeat(2, 1fr); text-align: left; }
  .cards { grid-template-columns: 1fr; }
  .block { margin-top: 36px; }
  .fix { grid-template-columns: auto 1fr; padding: 14px; }
  .fix-gain { grid-column: 2; text-align: left; }
  .fix-gain b { display: inline; font-size: 15px; margin-right: 6px; }
  .cat > summary { grid-template-columns: 1fr 64px 18px; gap: 10px; padding: 14px 16px; }
  .cat > summary .meter { grid-column: 1 / -1; grid-row: 2; }
  .item { padding: 12px 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

#results { scroll-margin-top: 76px; }

/* ---------- Language switch ---------- */
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 7px; transition: color .15s, background .15s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ---------- PDF report button ---------- */
.score-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.pdf-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 650; padding: 9px 16px; border-radius: 10px;
  transition: border-color .15s, color .15s;
}
.pdf-btn:hover { border-color: var(--accent); color: var(--accent); }
.pdf-btn:disabled { cursor: progress; opacity: .7; }
.pdf-status { font-size: 13px; color: var(--fail); }
.pdf-status.info { color: var(--muted); }
.pdf-status.ok { color: var(--pass); font-weight: 600; }
@media (max-width: 680px) { .score-actions { justify-content: center; } }
