/* «Это настоящий скан?» — standalone page; tokens match css/styles.css */
:root {
    --bg: #f6f7f9; --surface: #fff; --text: #1d2330; --muted: #5d6576; --line: #dfe3ea; --line-strong: #c7cdd8;
    --accent: #2350c8; --accent-hover: #1b40a6; --accent-soft: #e8eefc; --ok: #1d7a46; --danger: #b42318; --danger-soft: #fdecea;
    --radius: 10px; --focus: 0 0 0 3px rgba(35, 80, 200, .35);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text); -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 16px; line-height: 1.5; min-height: 100dvh; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
a { color: var(--accent); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.top__home { font-weight: 650; color: var(--text); text-decoration: none; }
.top__link { text-decoration: none; font-weight: 500; padding: 8px 0; }
.top__link:hover { text-decoration: underline; }

.page { max-width: 640px; margin: 0 auto; padding: 28px 20px 56px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
.lead { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.lead svg { color: var(--ok); flex: none; }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 44px 20px; text-align: center;
    background: var(--surface); border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { color: var(--accent); }
.drop__title { color: var(--accent); font-weight: 650; font-size: 18px; }
.drop__note { color: var(--muted); font-size: 14px; }
body:not([data-state="idle"]) .drop { padding: 16px 20px; flex-direction: row; justify-content: center; gap: 10px; }
body:not([data-state="idle"]) .drop svg { width: 22px; height: 22px; }
body:not([data-state="idle"]) .drop__title { font-size: 15px; }
body[data-state="reading"] .drop, body[data-state="analysing"] .drop { display: none; }
body[data-state="result"] .drop { display: none; }

.progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.progress__name { margin: 0 0 12px; font-weight: 600; overflow-wrap: anywhere; }
.progress__text { margin: 10px 0 12px; color: var(--muted); font-size: 14px; }
.bar { height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .25s; }

.error { margin: 14px 0 0; padding: 12px 14px; background: var(--danger-soft); color: var(--danger); border-radius: var(--radius); }

.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; }
.result:focus { outline: none; }
.result__file { margin: 0 0 6px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.verdict { font-size: 24px; line-height: 1.25; margin: 0 0 4px; }
.verdict__sub { margin: 0 0 18px; color: var(--muted); }
.classes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.class__head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.class__pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.class__bar { height: 10px; margin-top: 4px; background: #eef0f4; border-radius: 5px; overflow: hidden; }
.class__bar span { display: block; height: 100%; background: var(--line-strong); border-radius: 5px; width: 0; transition: width .5s ease-out; }
.class.is-top .class__name { font-weight: 650; }
.class.is-top .class__bar span { background: var(--accent); }

.pages { margin: 0 0 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.pages summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.pages__list { margin: 8px 0 0; padding-left: 22px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.disclaimer { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--muted); padding-left: 0; }
.btn-ghost:hover { color: var(--text); }

.about { margin-top: 36px; }
.about h2 { font-size: 17px; margin: 0 0 10px; }
.about dl { margin: 0; display: grid; gap: 10px; }
.about dt { font-weight: 600; }
.about dd { margin: 0; color: var(--muted); font-size: 15px; }

.veil { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
    background: rgba(35, 80, 200, .12); border: 3px dashed var(--accent); pointer-events: none; }
.veil span { background: var(--surface); padding: 12px 20px; border-radius: var(--radius); font-weight: 650; color: var(--accent); }

@media (max-width: 480px) {
    .page { padding: 20px 16px 40px; }
    h1 { font-size: 24px; }
    .verdict { font-size: 21px; }
    .drop { padding: 36px 16px; }
    .btn-primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) { .drop, .btn { border: 1px solid CanvasText; } .class__bar span { background: Highlight; } }
