:root{
  --bg:#F4F5FA;--panel:#FFFFFF;--line:#E3E6F0;--border:#C9CDDD;--ink:#22253A;--grey:#4E5370;--grey2:#686D88;
  --red-bg:#FDEDEE;--red-soft:#F9D5D7;--red-btn:#F0A5A9;--red:#B7313C;--red-dark:#8E2530;
  --green-bg:#DDEFE6;--green:#3F7D63;--green-dark:#2C5E49;--amber-bg:#FBF0D2;--amber-ink:#6B4D0F;
  --font-title:'Bricolage Grotesque','Trebuchet MS',sans-serif;--font:'Figtree','Segoe UI',system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px;line-height:1.45}
a{color:var(--grey);text-decoration:none}a:hover{color:var(--ink)}
button{font:inherit;cursor:pointer}
h1,h2,h3{margin:0}
.title{font-family:var(--font-title);font-size:32px;line-height:1.1;font-weight:700;letter-spacing:-.01em}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--grey2)}
.muted{color:var(--grey);font-size:13px}
.shell{min-height:100vh;display:flex;flex-wrap:wrap}
.side{flex:0 0 230px;background:var(--panel);border-right:1px solid var(--line);padding:24px 16px 16px;display:flex;flex-direction:column;gap:24px}
.brand{display:flex;flex-direction:column;align-items:center;gap:2px}
.brand.row{flex-direction:row;gap:10px;padding:0 4px;align-items:center}
.brand .word{font-family:var(--font-title);font-size:24px;line-height:1;font-weight:700}
.nav{display:flex;flex-direction:column;gap:4px}
.nav a{height:44px;padding:0 12px;border-radius:10px;font-weight:500;display:flex;align-items:center;gap:12px}
.nav a.on{background:var(--red-soft);color:var(--ink);font-weight:600}
.nav a:hover{background:var(--bg)}.nav a.on:hover{background:var(--red-soft)}
.nav .badge{margin-left:auto;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--red-soft);color:var(--red-dark);font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center}
.me{margin-top:auto;padding:12px;border-radius:12px;background:var(--bg);display:flex;flex-direction:column;gap:2px}
.me form{margin:6px 0 0}
.main{flex:999 1 560px;min-width:0;padding:32px 40px 40px;display:flex;flex-direction:column;gap:24px}
.narrow{width:100%;max-width:760px;display:flex;flex-direction:column;gap:20px}
.card{padding:24px;border-radius:16px;background:var(--panel);display:flex;flex-direction:column;gap:18px}
.row{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.between{justify-content:space-between}
.grow{flex:1 1 220px}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
.field small{font-weight:400;color:var(--grey);font-size:13px}
input[type=text],input[type=email],input[type=password],input[type=number],select,textarea{height:44px;padding:0 14px;border:1px solid var(--border);border-radius:12px;background:#fff;font:inherit;font-weight:400;color:var(--ink);width:100%}
textarea{height:auto;min-height:96px;padding:10px 14px;resize:vertical}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:3px solid var(--red-btn);outline-offset:1px}
.btn{height:44px;padding:0 20px;border:0;border-radius:12px;background:var(--red-btn);color:var(--ink);font-size:15px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn:hover{background:#ec9298;color:var(--ink)}
.btn.big{height:48px;padding:0 32px;font-size:16px}
.btn.ghost{background:#fff;border:1px solid var(--border)}
.btn.ghost:hover{background:var(--bg)}
.btn.danger{background:#fff;border:1px solid var(--red);color:var(--red)}
.btn.small{height:34px;padding:0 12px;font-size:13px;border-radius:9px}
.btn:disabled{background:#ECEEF5;color:var(--grey2);cursor:default}
.pills{display:flex;flex-wrap:wrap;gap:8px}
.pills label{cursor:pointer}
.pills input{position:absolute;opacity:0;pointer-events:none}
.pills span{height:40px;padding:0 16px;border-radius:999px;background:var(--bg);color:var(--grey);font-size:14px;font-weight:600;display:inline-flex;align-items:center}
.pills input:checked+span{background:var(--ink);color:#fff}
.pills input:focus-visible+span{outline:3px solid var(--red-btn)}
.switch{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.switch .t{display:flex;flex-direction:column;gap:2px}.switch .t b{font-weight:600}
.switch input{width:22px;height:22px;margin:0;accent-color:var(--red);flex-shrink:0}
.seg{display:inline-flex;padding:3px;gap:2px;border-radius:12px;background:var(--bg)}
.seg a,.seg button{height:36px;padding:0 14px;border:0;border-radius:9px;background:transparent;color:var(--grey);font-size:13px;font-weight:600;display:inline-flex;align-items:center}
.seg .on{background:#fff;box-shadow:0 1px 2px rgba(34,37,58,.12);color:var(--ink);font-weight:700}
.alert{padding:12px 16px;border-radius:12px;font-size:14px}
.alert.ok{background:var(--green-bg);color:var(--green-dark)}
.alert.warn{background:var(--amber-bg);color:var(--amber-ink)}
.alert.err{background:var(--red-bg);color:var(--red-dark)}
.tag{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--bg);color:var(--grey)}
.tag.green{background:var(--green-bg);color:var(--green-dark)}
.tag.amber{background:var(--amber-bg);color:var(--amber-ink)}
.tag.red{background:var(--red-soft);color:var(--red-dark)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:16px}
.kpi{padding:18px 20px;border-radius:16px;background:#fff;display:flex;flex-direction:column;gap:6px}
.kpi b{font-family:var(--font-title);font-size:36px;line-height:1;font-weight:700}
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--grey2);padding:8px 10px;border-bottom:1px solid var(--line)}
td{padding:10px;border-bottom:1px solid var(--line);vertical-align:middle}
tr:last-child td{border-bottom:0}
.tablewrap{overflow-x:auto}
.bars{display:flex;align-items:flex-end;gap:8px;height:160px;padding-top:8px}
.bars .b{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;height:100%;min-width:0}
.bars .b i{display:block;width:100%;max-width:34px;border-radius:6px 6px 2px 2px;background:var(--red-btn);min-height:3px}
.bars .b i.none{background:var(--line)}
.bars .b span{font-size:11px;color:var(--grey2)}
.bars .b em{font-size:11px;font-style:normal;color:var(--grey);font-variant-numeric:tabular-nums}
.themes{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:16px}
.theme{position:relative;padding:20px;border-radius:16px;background:#fff;border:2px solid transparent;display:flex;flex-direction:column;gap:10px}
.theme.done{border-color:var(--green-bg)}
.theme h3{font-family:var(--font-title);font-size:22px;font-weight:700}
.theme .check{position:absolute;top:16px;right:16px;width:30px;height:30px;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center}
.theme .foot{margin-top:auto;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-top:6px}
.score{font-weight:700;font-variant-numeric:tabular-nums}
/* question */
.qpage{min-height:100vh;display:flex;flex-direction:column}
.qtop{padding:16px 32px;display:flex;align-items:center;gap:20px}
.qtop .x{width:44px;height:44px;border-radius:999px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.qtop .x:hover{background:var(--line)}
.progress{flex-grow:1;min-width:0;height:12px;border-radius:999px;background:var(--line)}
.progress div{height:12px;border-radius:999px;background:var(--red)}
.qmain{flex-grow:1;width:100%;max-width:760px;margin:0 auto;padding:24px 24px 32px;display:flex;flex-direction:column;justify-content:center;gap:32px}
.qmain h1{font-family:var(--font-title);font-size:40px;line-height:1.1;font-weight:700;letter-spacing:-.01em;text-wrap:pretty}
.opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:16px}
.opt{position:relative;display:block}
.opt input{position:absolute;opacity:0}
.opt span{height:88px;border:2px solid var(--line);border-radius:16px;background:#fff;font-family:var(--font-title);font-size:28px;font-weight:700;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 12px;cursor:pointer}
.opt input:checked+span{border-color:var(--red);background:var(--red-bg)}
.opt input:focus-visible+span{outline:3px solid var(--red-btn)}
.opt.right span,.opt.right input:checked+span{border-color:var(--green);background:var(--green-bg);color:var(--green-dark)}
.opt.wrong span,.opt.wrong input:checked+span{border-color:#d9b25a;background:var(--amber-bg);color:var(--amber-ink)}
.textans{font-family:var(--font-title);font-size:28px;height:64px;font-weight:700}
.kbd{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.kbd button{width:44px;height:44px;border:1px solid var(--border);border-radius:10px;background:#fff;font-size:20px;font-weight:600}
.fb{padding:16px 20px;border-radius:16px;display:flex;align-items:center;gap:14px}
.fb.ok{background:var(--green-bg);color:var(--green-dark)}
.fb.almost{background:var(--amber-bg);color:var(--amber-ink)}
.fb b{font-size:17px;display:block}
.qfoot{padding:16px 32px;background:#fff;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.qfoot a{height:44px;padding:0 12px;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;border-radius:10px}
/* login */
.auth{min-height:100vh;display:flex;flex-wrap:wrap}
.auth .hero{flex:1 1 420px;background:var(--red-bg);padding:48px;display:flex;flex-direction:column;justify-content:center;gap:28px}
.auth .hero h2{font-family:var(--font-title);font-size:38px;line-height:1.1;max-width:420px}
.auth .hero .sample{display:flex;gap:12px;flex-wrap:wrap}
.auth .hero .sample div{background:#fff;border-radius:16px;padding:14px 20px;display:flex;flex-direction:column;gap:2px}
.auth .hero .sample b{font-family:var(--font-title);font-size:26px}
.auth .formside{flex:1 1 420px;display:flex;align-items:center;justify-content:center;padding:32px 20px;position:relative}
.auth .box{width:100%;max-width:400px;background:#fff;border-radius:20px;padding:32px;display:flex;flex-direction:column;gap:18px}
.auth .lang{position:absolute;top:20px;right:24px}
.hr{height:1px;background:var(--line);border:0;margin:0;width:100%}
.inline{display:inline}
.stack{display:flex;flex-direction:column;gap:12px}
.qrow{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)}
.qrow:last-child{border-bottom:0}
.mono{font-family:ui-monospace,Consolas,monospace;font-size:14px;background:var(--bg);padding:2px 8px;border-radius:6px}
@media (max-width:760px){
  .side{flex:1 1 100%;border-right:0;border-bottom:1px solid var(--line);padding:12px}
  .brand{flex-direction:row;gap:10px;justify-content:flex-start}
  .nav{flex-direction:row;flex-wrap:wrap}
  .nav a{height:40px;padding:0 10px}
  .me{display:none}
  .main{padding:20px 16px 32px}
  .qmain h1{font-size:30px}.qtop,.qfoot{padding:12px 16px}
  .auth .formside{flex-direction:column;align-items:stretch}.auth .lang{position:static;align-self:flex-end;margin-bottom:12px}
  .auth .hero{padding:28px 20px;flex-basis:auto}.auth .hero h2{font-size:28px}
}
