* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: var(--brand-font); background: var(--brand-bg); color: var(--brand-text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
header.top { background: var(--brand-surface); border-bottom: 1px solid var(--brand-border); padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
header.top .logos { display: flex; gap: 10px; align-items: center; }
header.top .logos img { height: 40px; width: auto; }
header.top .spacer { flex: 1; }
.lang, .linkbtn { font: inherit; font-weight: 600; color: var(--brand-primary); background: none; border: 2px solid var(--brand-border); border-radius: 10px; padding: 8px 16px; text-decoration: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.lang:hover, .linkbtn:hover { border-color: var(--brand-primary); }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 8px 0 6px; color: var(--brand-primary); }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
.sysname { font-size: 1rem; font-weight: 700; color: var(--brand-muted); margin: 0; }
.lead { color: var(--brand-muted); margin: 0 0 24px; }
.choices { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { display: block; background: var(--brand-surface); border: 2px solid var(--brand-border); border-radius: 18px; padding: 26px 22px; text-decoration: none; color: inherit; text-align: center; transition: border-color .15s, box-shadow .15s; }
.choice:hover, .choice:focus-visible { border-color: var(--brand-primary); box-shadow: 0 4px 18px rgba(11,61,145,.14); outline: none; }
.choice svg { width: 64px; height: 64px; color: var(--brand-primary); }
.choice strong { display: block; font-size: 1.3rem; margin: 10px 0 6px; color: var(--brand-primary); }
.choice span { color: var(--brand-muted); }
.card { background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 18px; padding: 26px 22px; }
label { display: block; font-weight: 700; margin: 18px 0 8px; }
input[type=email], input[type=text] { width: 100%; font: inherit; font-size: 1.15rem; padding: 14px; border: 2px solid var(--brand-border); border-radius: 12px; background: #fff; color: var(--brand-text); }
input:focus { outline: none; border-color: var(--brand-primary); }
input.code { font-size: 1.8rem; letter-spacing: .35em; text-align: center; direction: ltr; }
.btn { display: block; width: 100%; margin-top: 20px; font: inherit; font-size: 1.2rem; font-weight: 700; color: #fff; background: var(--brand-primary); border: 0; border-radius: 14px; padding: 16px; cursor: pointer; min-height: 56px; }
.btn:hover { background: var(--brand-primary-dark); }
.back { display: inline-block; margin-bottom: 14px; color: var(--brand-primary); font-weight: 600; text-decoration: none; }
.msg { border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; font-weight: 600; }
.msg.error { background: #fdecea; color: #8e1b1b; border: 1px solid #f3b6b0; }
.msg.info { background: #eef4ff; color: #0b3d91; border: 1px solid #c3d5f7; }
.msg.test { background: #fff6e0; color: #6b4a00; border: 1px solid #f0d48a; }
.msg.test b { display: block; font-size: 2rem; letter-spacing: .3em; direction: ltr; text-align: center; margin-top: 6px; }
.badge { display: inline-block; background: #eef4ff; color: var(--brand-primary); border-radius: 999px; padding: 8px 18px; font-weight: 700; margin: 6px 0 20px; }
.inline { display: inline; }
.muted { color: var(--brand-muted); }
footer { text-align: center; color: var(--brand-muted); font-size: .85rem; padding: 18px 16px; border-top: 1px solid var(--brand-border); background: var(--brand-surface); }

/* ---------- stage 2: console screens ---------- */
header.top .logos { text-decoration: none; }
.small { font-size: .9rem; }
.center { text-align: center; }
.q { font: inherit; font-weight: 800; font-size: 1rem; width: 34px; height: 34px; min-width: 34px; border-radius: 50%; border: 2px solid var(--brand-primary); background: #fff; color: var(--brand-primary); cursor: pointer; vertical-align: middle; padding: 0; line-height: 1; margin-inline-start: 6px; }
.q:hover, .q:focus-visible { background: var(--brand-primary); color: #fff; outline: none; }
.tiles { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { main { max-width: 980px; } .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile-wrap { position: relative; }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; background: var(--brand-surface); border: 2px solid var(--brand-border); border-radius: 20px; padding: 28px 18px 22px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile:hover, .tile:focus-visible { border-color: var(--brand-primary); box-shadow: 0 6px 22px rgba(11,61,145,.16); transform: translateY(-2px); outline: none; }
.tile-icon { width: 92px; height: 92px; border-radius: 50%; background: #eef4ff; display: flex; align-items: center; justify-content: center; color: var(--brand-primary); }
.tile-icon svg { width: 54px; height: 54px; }
.tile strong { font-size: 1.35rem; margin: 14px 0 4px; color: var(--brand-primary); }
.tile span { color: var(--brand-muted); }
.tile-q { position: absolute; top: 10px; inset-inline-end: 10px; }
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 14px 0 18px; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--brand-muted); font-size: .9rem; font-weight: 600; position: relative; }
.stepper .num { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--brand-border); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; }
.stepper li.now { color: var(--brand-primary); }
.stepper li.now .num { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
.stepper li.done .num { border-color: var(--verdict-safe); background: var(--verdict-safe); color: #fff; font-size: 0; }
.stepper li.done .num::after { content: "\2713"; font-size: 1.2rem; }
.js .step[hidden] { display: none; }
.step { margin-bottom: 16px; }
.row { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.row .btn { margin-top: 0; }
.btn { text-align: center; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--brand-primary); border: 2px solid var(--brand-primary); flex: 0 0 34%; }
.btn.ghost:hover { background: #eef4ff; }
.btn.go { background: var(--verdict-safe); }
.btn.busy { opacity: .6; cursor: wait; }
.with-q { flex: 1; display: flex; align-items: center; }
textarea { width: 100%; font: inherit; font-size: 1.1rem; padding: 14px; border: 2px solid var(--brand-border); border-radius: 12px; resize: vertical; color: var(--brand-text); }
textarea:focus { outline: none; border-color: var(--brand-primary); }
.drop { border: 3px dashed var(--brand-border); border-radius: 16px; padding: 22px 16px; text-align: center; background: #fafbfe; }
.drop.over { border-color: var(--brand-primary); background: #eef4ff; }
.drop .pick { display: inline-block; width: auto; padding: 16px 34px; margin: 0 0 6px; }
.drop p { margin: 8px 0 0; }
.chosen { font-weight: 700; color: var(--verdict-safe); word-break: break-all; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sr:focus + .pick { outline: 3px solid var(--brand-accent); }
.bigvalue { font-size: 1.2rem; font-weight: 700; background: #eef4ff; border-radius: 12px; padding: 14px; word-break: break-word; margin: 8px 0; }
.tick { width: 84px; height: 84px; border-radius: 50%; background: var(--verdict-safe); color: #fff; font-size: 3rem; line-height: 84px; margin: 0 auto 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tab { font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--brand-border); background: #fff; color: var(--brand-primary); cursor: pointer; min-height: 44px; }
.tab.on { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.js .tabpane { display: none; }
.js .tabpane.on { display: block; }
.js .tabname { display: none; }
.help-img { display: block; width: 100%; max-width: 480px; height: auto; margin: 8px auto 12px; border-radius: 14px; border: 1px solid var(--brand-border); }
.steps-list { padding-inline-start: 1.4em; margin: 8px 0; }
.steps-list li { margin-bottom: 10px; padding-inline-start: 4px; }
.steps-list li::marker { font-weight: 800; color: var(--brand-primary); }
.help-intro { font-weight: 600; }
dialog.help { border: 0; border-radius: 20px; padding: 20px; width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; color: var(--brand-text); font-weight: 400; font-size: 1rem; text-align: start; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.help::backdrop { background: rgba(10, 20, 40, .55); }
.help-head { display: flex; align-items: flex-start; gap: 12px; }
.help-head h3 { flex: 1; margin: 0 0 6px; font-size: 1.3rem; color: var(--brand-primary); }
.help-x { font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef2f8; color: var(--brand-text); cursor: pointer; }
@media (max-width: 560px) { header.top .logos img { height: 30px; } .linkbtn, .lang { padding: 6px 10px; font-size: .9rem; } .stepper .lbl { font-size: .8rem; } }
