:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .10);
  --shadow: 0 10px 26px rgba(15, 23, 42, .08);
  --shadowSm: 0 6px 16px rgba(15, 23, 42, .08);
  --radius: 16px;
  --radiusSm: 12px;
  --accent: #2563eb;
  --accent2: #22c55e;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height:1.45;
}
a{color:inherit}
.container{max-width:none;margin:0;padding:0 18px}
.topbar{
  position:sticky;top:0;z-index:10;
  background: rgba(246, 247, 251, .75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px}
.brand__title{font-weight:760;letter-spacing:-.2px}
.brand__sub{color:var(--muted);font-size:13px;margin-top:2px}
.tabs{
  display:flex;
  gap:8px;
}
.tab{
  text-decoration:none;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 999px;
  color:var(--muted);
  background: rgba(255,255,255,.65);
}
.tab--active{
  color:var(--text);
  border-color: rgba(37, 99, 235, .28);
  background: rgba(37, 99, 235, .08);
}
.main{padding:16px 18px 30px;display:flex;flex-direction:column;gap:12px}
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card__title{font-weight:740;margin-bottom:12px;letter-spacing:-.2px}
.muted{color:var(--muted)}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace}
.hint{color:var(--muted);font-size:12px;margin-top:10px}
.footnote{color:var(--muted);font-size:13px;margin-top:10px}

.qr{display:grid;grid-template-columns: 260px 1fr;gap:14px;align-items:center}
.qr__imgWrap{
  width:260px;height:260px;
  border-radius: var(--radiusSm);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadowSm);
}
.qr__img{width:260px;height:260px;display:block}

.stats{
  display:flex;
  flex-direction:row;
  gap:10px;
}
.qblock{
  flex:1 1 0;
  min-width:0;
  border-left:1px solid var(--line);
  padding-left:10px;
}
.qblock:first-child{
  border-left:none;
  padding-left:0;
}
.qhead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  min-height:88px; /* выравниваем старт рядов по высоте шапки */
}
.qtext{
  font-weight:650;
  letter-spacing:-.15px;
  font-size:15px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.qmeta{color:var(--muted);font-size:13px;white-space:nowrap;padding-top:2px}
.rows{display:flex;flex-direction:column;gap:6px}
.row{
  display:grid;
  grid-template-columns: 30px 1fr 72px;
  gap:10px;
  align-items:center;
}
.key{
  width:30px;height:30px;border-radius: 9px;
  display:flex;align-items:center;justify-content:center;
  border: 1px solid var(--line);
  background: rgba(37, 99, 235, .06);
  color: #1e40af;
  font-weight: 800;
}
.bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  overflow:hidden;
  border: 1px solid rgba(15, 23, 42, .08);
}
.bar > div{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(37, 99, 235, .95), rgba(34, 197, 94, .85));
}
.val{justify-self:end;color:var(--muted);font-variant-numeric: tabular-nums}

.form{display:flex;flex-direction:column;gap:14px}
.question{
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.question:first-child{border-top:none;padding-top:0}
.question__title{font-weight:650;margin-bottom:10px;letter-spacing:-.1px}
.options{display:flex;flex-direction:column;gap:8px}
.opt{
  display:flex;gap:10px;align-items:flex-start;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radiusSm);
  background: rgba(255,255,255,.85);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.opt:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadowSm);
  border-color: rgba(37, 99, 235, .22);
}
.opt:has(input:focus-visible){
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}
.opt:has(input:checked){
  border-color: rgba(37, 99, 235, .45);
  background: rgba(37, 99, 235, .06);
}
.opt input{margin-top:4px}
.opt__label{display:flex;flex-direction:column;gap:3px}
.opt__key{font-weight:700}
.form__actions{display:flex;align-items:center;gap:12px;margin-top:2px}
.btn{
  border: 1px solid rgba(37, 99, 235, .25);
  background: linear-gradient(180deg, rgba(37, 99, 235, .92), rgba(37, 99, 235, .82));
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radiusSm);
  cursor:pointer;
  font-weight:650;
  box-shadow: var(--shadowSm);
}
.btn:disabled{opacity:.55;cursor:not-allowed}
.status{font-size:14px}

.qr-full-body{
  background:#0b1120;
  color:#e5e7eb;
}
.qr-full-body .topbar{
  background: rgba(11, 17, 32, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.qr-full-body .brand__title{
  color:#f9fafb;
}
.qr-full-body .brand__sub{
  color:#cbd5e1;
}
.qr-full-body .tab{
  color:#cbd5e1;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}
.qr-full-body .tab--active{
  color:#f9fafb;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12);
}
.qr-full-main{
  min-height:calc(100vh - 56px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px 32px;
}
.qr-full-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.qr-full-img{
  width:min(70vh,70vw);
  height:min(70vh,70vw);
  background:#fff;
  border-radius:24px;
  padding:16px;
  box-shadow:0 24px 80px rgba(15,23,42,.8);
}
.qr-full-caption{
  text-align:center;
  max-width:90vw;
}
.qr-full-label{
  font-size:16px;
  font-weight:600;
  margin-bottom:4px;
}
.qr-full-url{
  font-size:14px;
  color:#9ca3af;
}

@media (max-width:720px){
  .container{padding:0 12px}

  .topbar__inner{
    flex-wrap:wrap;
    gap:8px 12px;
  }

  .tabs{
    width:100%;
    overflow-x:auto;
    padding-bottom:4px;
  }

  .main{
    padding:12px 12px 20px;
    gap:10px;
  }

  .qr{
    grid-template-columns: 1fr;
    justify-items:center;
  }
  .qr__imgWrap{
    width:260px;
    height:260px;
  }
  .qr__img{
    width:260px;
    height:260px;
  }

  .stats{
    flex-direction:column;
  }
  .qblock{
    border-left:none;
    border-top:1px solid var(--line);
    padding-left:0;
    padding-top:10px;
  }
  .qblock:first-child{
    border-top:none;
  }

  .row{
    grid-template-columns: 30px 1fr 72px;
  }
}

