/* DermaScan web app. Self-contained: no external fonts or frameworks. */

:root {
  --bg: #f5f7fb;
  --bg-alt: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --border: #e1e7ef;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #5a6478;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-soft: rgba(15, 118, 110, 0.09);
  --on-primary: #ffffff;
  --danger: #c81e1e;
  --danger-bar: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --success-border: #bbf7d0;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --warn-border: #fcd34d;
  --benign-bar: #0d9488;
  --track: #e6ebf2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1020; --bg-alt: #0d1528; --surface: #111a2e; --surface-2: #16213a; --border: #233050;
    --border-strong: #31405f; --text: #e6ebf5; --text-muted: #9aa6bd; --primary: #2dd4bf; --primary-hover: #5eead4;
    --primary-soft: rgba(45, 212, 191, 0.12); --on-primary: #042f2b; --danger: #fca5a5; --danger-bar: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.1); --danger-border: rgba(248, 113, 113, 0.35); --success: #86efac;
    --success-soft: rgba(74, 222, 128, 0.08); --success-border: rgba(74, 222, 128, 0.3); --warn: #fcd34d;
    --warn-soft: rgba(251, 191, 36, 0.08); --warn-border: rgba(251, 191, 36, 0.35); --benign-bar: #2dd4bf;
    --track: #1d2944; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1020; --bg-alt: #0d1528; --surface: #111a2e; --surface-2: #16213a; --border: #233050;
  --border-strong: #31405f; --text: #e6ebf5; --text-muted: #9aa6bd; --primary: #2dd4bf; --primary-hover: #5eead4;
  --primary-soft: rgba(45, 212, 191, 0.12); --on-primary: #042f2b; --danger: #fca5a5; --danger-bar: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1); --danger-border: rgba(248, 113, 113, 0.35); --success: #86efac;
  --success-soft: rgba(74, 222, 128, 0.08); --success-border: rgba(74, 222, 128, 0.3); --warn: #fcd34d;
  --warn-soft: rgba(251, 191, 36, 0.08); --warn-border: rgba(251, 191, 36, 0.35); --benign-bar: #2dd4bf;
  --track: #1d2944; --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.03em; font-weight: 750; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 720; }
h3 { font-size: 1.08rem; font-weight: 650; }
h4 { font-size: 0.95rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.narrow { max-width: 820px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.86rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary); color: var(--on-primary);
  padding: 8px 14px; border-radius: 8px; transition: top 0.15s; }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text);
  text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; }
.brand-bg { fill: var(--primary); }
.brand-ring { fill: none; stroke: var(--on-primary); stroke-width: 2; opacity: 0.75; }
.brand-dot { fill: var(--on-primary); }
.brand-tick { stroke: var(--on-primary); stroke-width: 2; stroke-linecap: round; opacity: 0.75; }
.brand-small { font-size: 1rem; margin-bottom: 6px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.93rem; font-weight: 550; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; color: var(--text-muted); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .icon-btn { margin-left: auto; }
}

.notice-bar { background: var(--warn-soft); border-bottom: 1px solid var(--warn-border); color: var(--text); font-size: 0.88rem; padding: 9px 0; }
.notice-bar strong { color: var(--warn); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; background:
  radial-gradient(900px 340px at 85% -10%, var(--primary-soft), transparent 70%),
  radial-gradient(700px 300px at 0% 0%, color-mix(in srgb, #6366f1 9%, transparent), transparent 70%); }
.hero-inner { max-width: 1180px; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-muted); max-width: 720px; }
.hero h1 { max-width: 820px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 28px 0 0; }
.hero-stats div { border-left: 3px solid var(--primary); padding-left: 12px; }
.hero-stats dt { font-size: 0.8rem; color: var(--text-muted); }
.hero-stats dd { margin: 0; font-size: 1.45rem; font-weight: 720; letter-spacing: -0.02em; }

/* ---------- Sections and cards ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.analyse-section { padding-top: 20px; }
.section-lead { color: var(--text-muted); max-width: 760px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
@media (max-width: 520px) { .card { padding: 18px; } }
.card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.card-head h3 { margin: 2px 0 2px; font-size: 1.2rem; }
.card-head p { margin: 0; font-size: 0.92rem; }
.step-badge { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--primary-soft); color: var(--primary); font-weight: 750; font-size: 0.95rem; }

.analyse-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .analyse-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Upload ---------- */
.dropzone {
  position: relative; display: grid; place-items: center; min-height: 260px; border: 2px dashed var(--border-strong);
  border-radius: var(--radius); background: var(--surface-2); cursor: pointer; text-align: center; overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--primary); }
.dropzone.has-image { border-style: solid; border-color: var(--border); background: #000; }
.dropzone-empty { padding: 24px; }
.dropzone-empty p { margin: 0 0 6px; }
.dropzone-icon { width: 56px; height: 56px; margin: 0 auto 12px; fill: none; stroke: var(--primary); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.link-like { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.preview { width: 100%; height: 300px; object-fit: contain; }
.dropzone-overlay { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; color: var(--primary);
  background: color-mix(in srgb, var(--surface) 88%, transparent); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.dropzone.dragging { border-color: var(--primary); }
.dropzone.dragging .dropzone-overlay { opacity: 1; }
.file-meta { margin: 10px 0 0; font-size: 0.86rem; color: var(--text-muted); overflow-wrap: anywhere; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 0.9rem; cursor: pointer;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.consent.attention { border-color: var(--warn-border); background: var(--warn-soft); animation: nudge 0.4s; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 11px; border: 1px solid transparent; font-weight: 620; font-size: 0.95rem; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); margin-left: auto; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
@media (max-width: 520px) { .actions .btn { flex: 1 1 auto; } .btn-primary { margin-left: 0; width: 100%; } }

.privacy { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.privacy .icon { width: 16px; height: 16px; color: var(--success); }

.examples { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.examples h4 { margin-bottom: 10px; }
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.example { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); aspect-ratio: 1; transition: transform 0.15s, border-color 0.15s; }
.example:hover { transform: translateY(-2px); border-color: var(--primary); }
.example img { width: 100%; height: 100%; object-fit: cover; }
.example span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 0.7rem; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); text-align: left; line-height: 1.2; }
.examples p { margin: 10px 0 0; }

.tips { margin-top: 18px; font-size: 0.9rem; }
.tips summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
.tips ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-muted); }
.tips li { margin-bottom: 6px; }

/* ---------- Result states ---------- */
.result-card { min-height: 420px; }
.state-empty { display: grid; place-items: center; text-align: center; min-height: 320px; color: var(--text-muted); }
.state-empty svg { width: 150px; margin-bottom: 8px; }
.ill-frame { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 2; }
.ill-lesion { fill: color-mix(in srgb, var(--primary) 25%, transparent); }
.ill-ring { fill: none; stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 6; }
.ill-line { stroke: var(--border-strong); stroke-width: 4; stroke-linecap: round; }

.state-loading { text-align: center; padding: 12px 0 24px; }
.state-loading p { margin: 14px 0 0; display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 600; }
.state-loading p.muted { font-weight: 400; margin-top: 4px; }
.scan { position: relative; width: min(260px, 70%); aspect-ratio: 1; margin: 8px auto 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.scan img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8); }
.scan-line { position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(transparent, color-mix(in srgb, var(--primary) 45%, transparent), transparent);
  animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { to { top: 100%; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary);
  animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid; margin: 0; }
.alert-error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-border); }
.alert-warn strong { color: var(--warn); }
#upload-error { margin-top: 12px; }
#model-missing { margin-top: 8px; margin-bottom: 8px; }

/* ---------- Result ---------- */
.state-result { animation: fade-in 0.35s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; border: 1px solid; }
.verdict p { margin: 0; }
.verdict-title { font-weight: 720; font-size: 1.12rem; }
.verdict-text { font-size: 0.93rem; margin-top: 2px; }
.verdict-icon .icon { width: 28px; height: 28px; }
.verdict.high { background: var(--danger-soft); border-color: var(--danger-border); }
.verdict.high .verdict-title, .verdict.high .verdict-icon { color: var(--danger); }
.verdict.low { background: var(--success-soft); border-color: var(--success-border); }
.verdict.low .verdict-title, .verdict.low .verdict-icon { color: var(--success); }
.verdict.high .icon-check, .verdict.low .icon-alert { display: none; }

.risk { margin: 20px 0 6px; }
.risk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.92rem; color: var(--text-muted); }
.risk-head strong { font-size: 1.6rem; color: var(--text); letter-spacing: -0.02em; }
.risk-track { position: relative; height: 12px; margin-top: 30px; border-radius: 999px; background: var(--track); }
.risk-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--benign-bar);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.risk-fill.high { background: var(--danger-bar); }
.risk-threshold { position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 2px dashed var(--text); left: 0; }
.risk-threshold span { position: absolute; bottom: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap;
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--surface); padding: 0 4px; }
.risk-threshold.edge-left span { transform: translateX(-6px); }
.risk-threshold.edge-right span { transform: translateX(calc(-100% + 6px)); }
.risk-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.75rem; color: var(--text-muted); }

.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
@media (max-width: 600px) { .result-grid { grid-template-columns: minmax(0, 1fr); } }
.viewer { margin: 0; }
.viewer-stage { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.viewer-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heatmap { opacity: 0.65; transition: opacity 0.2s; mix-blend-mode: normal; }
.viewer-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.segmented button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.opacity-control { flex: 1; display: flex; }
.opacity-control input { width: 100%; accent-color: var(--primary); }
.viewer figcaption { margin-top: 8px; }

.overline { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.diagnosis-name { font-size: 1.4rem; font-weight: 720; letter-spacing: -0.02em; margin: 4px 0 10px; line-height: 1.25; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.chip-malignant { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.chip-benign { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.chip-neutral { color: var(--text-muted); background: var(--surface-2); border-color: var(--border); }
.diagnosis-desc { color: var(--text-muted); font-size: 0.95rem; }
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.notes li { font-size: 0.86rem; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid var(--warn-border); }

.block-title { margin-top: 26px; }
.prob-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.prob-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 4px 12px; align-items: center; }
.prob-name { font-size: 0.9rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.prob-name .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--benign-bar); }
.prob-row.malignant .dot { background: var(--danger-bar); }
.prob-value { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 0.9rem; text-align: right; }
.prob-bar { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.prob-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--benign-bar); transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.prob-row.malignant .prob-bar span { background: var(--danger-bar); }
.prob-row.top .prob-name { font-weight: 650; }

.next-steps { margin-top: 22px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.next-steps ul { margin: 0; padding-left: 20px; }
.next-steps li { margin-bottom: 6px; font-size: 0.93rem; }
.result-meta { margin: 14px 0 0; font-family: var(--mono); font-size: 0.75rem; overflow-wrap: anywhere; }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }
.step-num { display: block; font-family: var(--mono); font-weight: 700; color: var(--primary); margin-bottom: 14px; font-size: 0.9rem; }

/* ---------- Performance ---------- */
.metric-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .metric-sets { grid-template-columns: minmax(0, 1fr); } }
.metric-set h3 { margin-bottom: 2px; }
.metric-set > p { font-size: 0.86rem; margin-bottom: 16px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.metric dt { font-size: 0.8rem; color: var(--text-muted); }
.metric dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 720; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.recall-title { margin: 18px 0 8px; font-size: 0.86rem; }
.recall-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.recall-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 0.82rem; }
.recall-list .bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.recall-list .bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.recall-list .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.model-line { margin-top: 18px; font-size: 0.88rem; color: var(--text-muted); }
.glossary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 28px 0 0; }
@media (max-width: 960px) { .glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .glossary { grid-template-columns: minmax(0, 1fr); } }
.glossary dt { font-weight: 650; font-size: 0.92rem; }
.glossary dd { margin: 4px 0 0; color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Skin checks ---------- */
.abcde { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .abcde { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .abcde { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.abcde-item { padding: 18px; }
.abcde-item p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.abcde-letter { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 1.2rem; }
.diagnoses-card { margin-top: 18px; }
.diagnoses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
@media (max-width: 760px) { .diagnoses { grid-template-columns: minmax(0, 1fr); } }
.diagnosis-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.diagnosis-item h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.diagnosis-item p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 620; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-muted); margin: 0 0 16px; }

/* ---------- Footer ---------- */
.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }
.site-footer p { margin: 0 0 6px; }

/* ---------- Printable report ---------- */
.print-report { display: none; }

@media print {
  @page { size: A4; margin: 16mm; }
  :root { --text: #000; --text-muted: #444; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body > *:not(.print-report) { display: none !important; }
  .print-report { display: block; }
  .print-report h1 { font-size: 20pt; margin: 0 0 2mm; }
  .print-report h2 { font-size: 12pt; margin: 6mm 0 2mm; }
  .print-report .rp-meta { color: #444; font-size: 9pt; margin-bottom: 5mm; }
  .print-report .rp-verdict { border: 1.5pt solid #000; border-radius: 3mm; padding: 4mm 5mm; margin-bottom: 4mm; }
  .print-report .rp-verdict.high { border-color: #b91c1c; }
  .print-report .rp-verdict.low { border-color: #15803d; }
  .print-report .rp-verdict p { margin: 0; }
  .print-report .rp-verdict .rp-big { font-size: 14pt; font-weight: 700; }
  .print-report .rp-images { display: flex; gap: 6mm; }
  .print-report figure { margin: 0; width: 60mm; }
  .print-report figure img { width: 60mm; height: 60mm; object-fit: cover; border-radius: 2mm; }
  .print-report figcaption { font-size: 8.5pt; color: #444; margin-top: 1mm; }
  .print-report table { border-collapse: collapse; width: 100%; font-size: 10pt; }
  .print-report th, .print-report td { text-align: left; padding: 1.5mm 2mm; border-bottom: 0.5pt solid #bbb; }
  .print-report td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .print-report .rp-disclaimer { margin-top: 6mm; padding: 3mm 4mm; border: 0.5pt solid #999; font-size: 9pt; }
}

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