:root {
  --bg: #12141a; --panel: #1b1e27; --panel-2: #232733;
  --ink: #f0f2f7; --muted: #949cb0; --line: #2e3342;
  --accent: #ffc14d; --ok: #4ec98a; --no: #e2685f; --link: #7fb2ff;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
/* Атрибут hidden задаёт display:none, но любое правило с display его
   перебивает по специфичности — например .scoreboard{display:grid}.
   Без этого «скрытые» блоки остаются на экране. */
[hidden] { display: none !important; }
/* Класс скрытия был написан только для .answer, и новые блоки с тем же
   классом оставались видимыми. Для игры это означало показанный ответ. */
.hidden { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 80px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-wrap: wrap;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.topbar nav { display: flex; gap: 18px; font-size: 14px; }

.card { background: var(--panel); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card h2 { margin: 0 0 14px; font-size: 15px; text-transform: uppercase;
           letter-spacing: .09em; color: var(--muted); font-weight: 600; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.metric { background: var(--panel-2); border-radius: 11px; padding: 14px 16px; }
.metric .v { font-size: 27px; font-weight: 660; letter-spacing: -.02em; }
.metric .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.metric .h { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.4; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select, button {
  font-family: inherit; font-size: 15px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 10px 13px;
}
button { cursor: pointer; font-weight: 600; }
button.primary { background: var(--accent); color: #201800; border-color: transparent; }
button.primary:hover { filter: brightness(1.08); }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px;
     text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- игровой экран ---------- */
.stage { max-width: 1000px; margin: 0 auto; padding: 20px 22px 40px; }
.stage-head { display: flex; justify-content: space-between; align-items: center;
              gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.counter { font-size: 15px; color: var(--muted); }
.counter b { color: var(--ink); font-size: 20px; }

.timer { font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 680;
         letter-spacing: -.02em; min-width: 118px; text-align: right; }
.timer.run { color: var(--accent); }
.timer.over { color: var(--no); }

.qtext { font-size: 25px; line-height: 1.5; white-space: pre-wrap;
         background: var(--panel); border: 1px solid var(--line);
         border-radius: var(--radius); padding: 30px 32px; }
.note { background: #3a2f12; border: 1px solid #5d4a1a; color: #ffdc9b;
        border-radius: 11px; padding: 12px 15px; margin-bottom: 14px; font-size: 15px; }
.note b { color: var(--accent); }
.handout { background: var(--panel-2); border: 1px dashed var(--line);
           border-radius: 11px; padding: 16px 18px; margin-bottom: 14px; }
.handout img { max-width: 100%; border-radius: 8px; margin-top: 10px; }
.handout .cap { font-size: 12.5px; color: var(--muted); text-transform: uppercase;
                letter-spacing: .07em; margin-bottom: 6px; }

.answer { margin-top: 18px; background: #14261d; border: 1px solid #26543c;
          border-radius: var(--radius); padding: 22px 26px; }
.answer.hidden { display: none; }
.answer .a { font-size: 24px; font-weight: 650; color: var(--ok); }
.answer .zach { font-size: 16px; color: #9fdcbc; margin-top: 8px; }
.answer .cm { margin-top: 14px; font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; }
.answer .src { margin-top: 14px; font-size: 12.5px; color: var(--muted);
               border-top: 1px solid #26543c; padding-top: 11px; white-space: pre-wrap; }

.controls { display: flex; gap: 11px; margin-top: 20px; flex-wrap: wrap; }
.controls button { padding: 12px 19px; }
button.ok { background: var(--ok); color: #06231a; border-color: transparent; }
button.no { background: var(--no); color: #2b0c09; border-color: transparent; }
.marked-ok { outline: 2px solid var(--ok); }
.marked-no { outline: 2px solid var(--no); }

.pips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.pip { width: 30px; height: 30px; border-radius: 8px; background: var(--panel-2);
       display: grid; place-items: center; font-size: 12.5px; cursor: pointer;
       border: 1px solid var(--line); color: var(--muted); }
.pip.cur { border-color: var(--accent); color: var(--accent); }
.pip.ok { background: #1d4634; color: #7fe0b2; border-color: #2b6a4d; }
.pip.no { background: #4a201c; color: #ffa79f; border-color: #6e332c; }

.keys { margin-top: 24px; font-size: 12.5px; color: var(--muted); }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px;
      border-radius: 5px; padding: 2px 7px; font-family: ui-monospace, monospace;
      font-size: 12px; color: var(--ink); }
.license { margin-top: 34px; font-size: 12px; color: var(--muted); line-height: 1.6;
           border-top: 1px solid var(--line); padding-top: 14px; }

.handout .warn { margin-top: 10px; color: #ffb0a8; font-size: 14px; }
.a-images { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.a-images img { max-width: 320px; border-radius: 8px; }

/* ---------- табло ---------- */
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 18px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 26px; margin-bottom: 20px;
}
.scoreboard .side { text-align: center; }
.scoreboard .lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
                   color: var(--muted); }
.scoreboard .pts { font-size: 44px; font-weight: 700; line-height: 1.1;
                   font-variant-numeric: tabular-nums; }
.scoreboard .team .pts { color: var(--accent); }
.scoreboard .viewers .pts { color: var(--link); }
.scoreboard .mid { text-align: center; }
.scoreboard .upto { font-size: 12px; color: var(--muted); text-transform: uppercase;
                    letter-spacing: .08em; }
.scoreboard .gtitle { font-size: 15px; font-weight: 600; margin-top: 2px; }

/* ---------- волчок ---------- */
.table-wrap { display: grid; place-items: center; padding: 8px 0 4px; }
#wheel { width: min(420px, 78vw); height: min(420px, 78vw); }
#wheel .sec { fill: var(--panel-2); stroke: var(--bg); stroke-width: 2; }
#wheel .sec.clickable { cursor: pointer; }
#wheel .sec.clickable:hover { fill: #2c3242; }
#wheel .sec.ok { fill: #1d4634; }
#wheel .sec.no { fill: #45201c; }
#wheel .sec-label { fill: var(--muted); font-size: 13px; font-weight: 600;
                    text-anchor: middle; dominant-baseline: central;
                    font-family: var(--font); }
#wheel .hub { fill: var(--panel); stroke: var(--line); stroke-width: 2; }
#wheel .arrow { fill: var(--accent); }
#wheel .arrow-pin { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; }
#arrow { transform-origin: 0 0; }
.spin-hint { margin-top: 10px; color: var(--muted); font-size: 14px;
             text-transform: uppercase; letter-spacing: .09em; }
.controls.center { justify-content: center; }
button.big { padding: 15px 30px; font-size: 16px; }
button:disabled { opacity: .5; cursor: default; }

/* ---------- чёрный ящик и блиц ---------- */
.bbox { display: flex; align-items: center; gap: 14px; background: #0c0d11;
        border: 1px solid #3a3f4d; border-radius: var(--radius);
        padding: 14px 20px; margin-bottom: 14px; font-size: 17px; font-weight: 600; }
.bbox-icon { font-size: 30px; color: #6a7185; }
.part { background: var(--panel); border: 1px solid var(--accent);
        border-radius: var(--radius); padding: 20px 24px; margin-top: 14px; }
.part-no { font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
           color: var(--accent); margin-bottom: 8px; }
.part-text { font-size: 21px; line-height: 1.5; white-space: pre-wrap; }
.part-marks { display: flex; gap: 8px; margin-top: 12px; }
.pmark { width: 28px; height: 28px; border-radius: 7px; background: var(--panel-2);
         border: 1px solid var(--line); color: var(--muted); display: grid;
         place-items: center; font-size: 13px; }
.pmark.ok { background: #1d4634; color: #7fe0b2; border-color: #2b6a4d; }
.pmark.no { background: #4a201c; color: #ffa79f; border-color: #6e332c; }

/* ---------- финал ---------- */
.final { text-align: center; padding: 50px 20px 26px; font-size: 21px; }
.final-score { font-size: 76px; font-weight: 700; letter-spacing: -.03em;
               font-variant-numeric: tabular-nums; margin-bottom: 10px; }

/* ---------- музыкальная пауза ---------- */
.pause { text-align: center; padding: 46px 20px 26px; }
.pause-cap { font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
             color: var(--muted); }
.pause-clock { font-size: 84px; font-weight: 700; letter-spacing: -.03em;
               font-variant-numeric: tabular-nums; color: var(--link);
               margin: 8px 0 6px; }
.pause-note { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.pause-hint { margin-top: 20px; font-size: 12.5px; color: var(--muted); }

/* ---------- решающий раунд ---------- */
.decisive { text-align: center; padding: 46px 20px 26px; }
.dec-cap { font-size: 34px; font-weight: 700; letter-spacing: .04em;
           text-transform: uppercase; color: var(--no); }
.dec-score { font-size: 62px; font-weight: 700; font-variant-numeric: tabular-nums;
             margin: 6px 0 4px; }
.dec-note { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.dec-rule { display: inline-flex; align-items: center; gap: 9px; color: var(--muted);
            font-size: 14px; margin-bottom: 20px; cursor: pointer; }
.dec-rule input { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; }
.dec-badge { color: var(--no); text-transform: uppercase; letter-spacing: .07em;
             font-size: 15px; }
#phase-question.is-decisive .qtext { border-color: var(--no); }
#phase-question.is-decisive .timer.run { color: var(--no); }

/* ---------- настройки игры ---------- */
.opts { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.opts summary { cursor: pointer; font-size: 13.5px; color: var(--muted);
                text-transform: uppercase; letter-spacing: .08em; }
.opts summary:hover { color: var(--ink); }
.checks { display: grid; gap: 9px; margin-top: 16px;
          grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.checks label { display: flex; align-items: center; gap: 9px; font-size: 14px;
                color: var(--ink); margin: 0; cursor: pointer; }
.checks input { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }

button.linkish { background: none; border: none; color: var(--link); padding: 0;
                 font-size: 13px; text-decoration: underline; cursor: pointer; }
button.linkish:hover { color: var(--ink); }

/* ---------- табло на несколько команд ---------- */
.scoreboard.multi { grid-template-columns: 1fr; gap: 10px; }
.team-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.team-cell { background: var(--panel-2); border: 1px solid var(--line);
             border-radius: 11px; padding: 10px 18px; min-width: 130px; text-align: center; }
.team-cell .tn { font-size: 13px; color: var(--muted); }
.team-cell .tp { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.team-cell.lead { border-color: var(--accent); }
.team-cell.lead .tp { color: var(--accent); }

/* переключатели «кто взял» */
.takers { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.taker { padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line);
         background: var(--panel-2); color: var(--muted); cursor: pointer;
         font-size: 15px; font-weight: 600; font-family: var(--font); }
.taker.on { background: var(--ok); color: #06231a; border-color: transparent; }
.takers-hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- экран для игроков ---------- */
.screen { max-width: 1400px; margin: 0 auto; padding: 26px 34px 40px;
          min-height: calc(100vh - 60px); display: flex; flex-direction: column; gap: 20px; }
.scr-idle { flex: 1; display: grid; place-content: center; text-align: center; gap: 10px; }
.scr-title { font-size: 40px; font-weight: 700; }
.scr-sub { font-size: 18px; color: var(--muted); }

.scr-board .team-row { justify-content: center; }
.scr-board .team-cell { min-width: 190px; padding: 14px 26px; }
.scr-board .tn { font-size: 17px; }
.scr-board .tp { font-size: 44px; }

.scr-question { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.scr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.scr-label { font-size: 20px; color: var(--muted); text-transform: uppercase;
             letter-spacing: .1em; }
.scr-timer { font-size: 84px; font-weight: 700; font-variant-numeric: tabular-nums;
             letter-spacing: -.03em; line-height: 1; }
.scr-timer.run { color: var(--accent); }
.scr-timer.over { color: var(--no); }
.scr-text { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.42; white-space: pre-wrap; }
#scr-handout img { max-width: 100%; max-height: 42vh; border-radius: 12px; }
.scr-handout-text { font-size: 24px; background: var(--panel); border-radius: 12px;
                    padding: 18px 22px; white-space: pre-wrap; }

.scr-big { flex: 1; display: grid; place-content: center; text-align: center; }
.scr-cap { font-size: 30px; text-transform: uppercase; letter-spacing: .12em;
           color: var(--muted); }
.scr-cap.dec { color: var(--no); }
.scr-clock { font-size: 110px; font-weight: 700; font-variant-numeric: tabular-nums;
             letter-spacing: -.03em; }

.btn-link { display: inline-flex; align-items: center; padding: 15px 22px;
            border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2);
            color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.btn-link:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- отдельный вопрос по ссылке ---------- */
.q-share { font-size: 21px; line-height: 1.55; white-space: pre-wrap; }
.q-share + button { width: 100%; }

/* ---------- уведомления ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60;
          display: flex; flex-direction: column; gap: 10px; max-width: min(380px, 92vw); }
.toast { background: var(--panel); border: 1px solid var(--line); border-left-width: 3px;
         border-radius: 10px; padding: 13px 16px; font-size: 14.5px; line-height: 1.45;
         color: var(--ink); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45);
         opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--no); }
.toast.info { border-left-color: var(--accent); }

/* ---------- окна ---------- */
.modal-back { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
              background: rgba(8,9,12,.72); padding: 20px;
              opacity: 0; transition: opacity .18s; }
.modal-back.in { opacity: 1; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
         padding: 24px 26px; width: min(520px, 94vw); box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.modal-title { font-size: 17px; font-weight: 650; margin-bottom: 14px; }
.modal-body { font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.share-url { width: 100%; font-family: ui-monospace, monospace; font-size: 13.5px; }
.share-hint { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ====================== посадочная страница ====================== */
.lp-bar h1 { letter-spacing: -.01em; }
.lp { max-width: 1080px; margin: 0 auto; padding: 0 22px 90px; }
.lp section { padding: 68px 0; border-top: 1px solid var(--line); }
.lp section:first-child { border-top: 0; }
.lp h3 { font-size: 27px; font-weight: 660; letter-spacing: -.02em; margin: 0 0 18px; }
.lp p { font-size: 16.5px; line-height: 1.65; color: #c4cad8; max-width: 62ch; margin: 0 0 14px; }
.lp-note { font-size: 15px; color: var(--muted); }
.lp a { color: var(--link); }

/* герой: текст слева, волчок справа */
.lp-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px;
           align-items: center; padding-top: 56px; }
.lp-hero h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.03em;
              font-weight: 680; margin: 0 0 18px; }
.lp-lead { font-size: 18px; color: #c8cede; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.lp-btn { display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 9px;
          border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
          font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
          transition: transform .15s, border-color .15s; }
.lp-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.lp-btn:active { transform: translateY(0); }
.lp-btn.primary { background: var(--accent); color: #201800; border-color: transparent; }
.lp-btn.primary:hover { filter: brightness(1.07); }
.lp-hero-art { display: grid; place-items: center; }
#lp-wheel { width: 100%; max-width: 330px; }
#lp-wheel .sec { fill: var(--panel-2); stroke: var(--bg); stroke-width: 2; }
#lp-wheel .sec.ok { fill: #1d4634; }
#lp-wheel .sec.no { fill: #45201c; }
#lp-wheel .sec-label { fill: var(--muted); font-size: 12px; font-weight: 600;
                       text-anchor: middle; dominant-baseline: central; font-family: var(--font); }
#lp-wheel .hub { fill: var(--panel); stroke: var(--line); stroke-width: 2; }
#lp-wheel .arrow { fill: var(--accent); }
#lp-wheel .arrow-pin { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; }
#lp-arrow { transform-origin: 0 0; animation: lp-spin 44s linear infinite; }
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #lp-arrow { animation: none; } }

/* цифры */
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.lp-stats div { display: flex; flex-direction: column; gap: 5px; }
.lp-stats b { font-size: 32px; font-weight: 700; letter-spacing: -.03em;
              font-variant-numeric: tabular-nums; color: var(--accent); }
.lp-stats span { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* живой вопрос */
.lp-sample-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lp-tag { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lp-rate { font-size: 14px; color: var(--accent); }
.lp-sample blockquote { margin: 0 0 20px; padding: 26px 30px; background: var(--panel);
                        border: 1px solid var(--line); border-radius: var(--radius);
                        font-size: 19px; line-height: 1.55; white-space: pre-wrap; }

/* ход вечера */
.lp-flow ol { list-style: none; padding: 0; margin: 0; display: grid;
              grid-template-columns: repeat(4, 1fr); gap: 0; }
.lp-flow li { padding: 0 22px; border-left: 1px solid var(--line); }
.lp-flow li:first-child { padding-left: 0; border-left: 0; }
.lp-flow b { display: block; font-size: 17px; margin-bottom: 7px; }
.lp-flow span { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* возможности */
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-cell { background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 22px 24px; }
.lp-cell-wide { grid-column: span 2; }
.lp-cell h4 { margin: 0 0 9px; font-size: 17px; font-weight: 640; }
.lp-cell p { font-size: 14.5px; color: var(--muted); margin: 0; max-width: none; }
.lp-accent { background: linear-gradient(155deg, #1a1d26 0%, #12141a 70%);
             border-color: #2f3547; }
.lp-accent h4 { color: var(--accent); }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; gap: 30px; }
  .lp-hero-art { order: -1; }
  #lp-wheel { max-width: 240px; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .lp-flow ol { grid-template-columns: 1fr; gap: 20px; }
  .lp-flow li { padding: 0 0 0 16px; border-left: 1px solid var(--line); }
  .lp-flow li:first-child { padding-left: 16px; border-left: 1px solid var(--line); }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-cell-wide { grid-column: span 1; }
  .lp section { padding: 46px 0; }
}

/* сложность на странице вопроса: единственное, чего нет в исходной базе */
.q-stat { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
          padding: 16px 22px; background: var(--panel-2); border: 1px solid var(--line);
          border-left: 3px solid var(--accent); border-radius: 11px; }
.q-stat b { font-size: 30px; font-weight: 700; color: var(--accent);
            font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.q-stat span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* ---------- обзорные страницы и пакеты ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs span { margin: 0 7px; }
.pg-title { font-size: 30px; font-weight: 660; letter-spacing: -.02em; margin: 0 0 12px; }
.pg-lead { font-size: 16px; line-height: 1.6; color: #c4cad8; max-width: 62ch; margin: 0 0 28px; }
.pg-meta { font-size: 14.5px; color: var(--muted); margin: 0 0 26px; }
.pg-switch { margin-top: 30px; font-size: 15px; }

.q-list { margin: 0; padding: 0 0 0 2.2em; }
.q-list li { margin-bottom: 12px; line-height: 1.5; }
.q-list a { color: var(--ink); text-decoration: none; }
.q-list a:hover { color: var(--accent); }
.q-list-rate { margin-left: 8px; font-size: 13px; color: var(--muted);
               font-variant-numeric: tabular-nums; }

.ex-list { display: flex; flex-direction: column; }
.ex-item { display: grid; grid-template-columns: 108px 1fr; gap: 20px;
           padding: 20px 0; border-top: 1px solid var(--line); }
.ex-item:first-child { border-top: 0; }
.ex-rate { text-align: right; }
.ex-rate b { display: block; font-size: 26px; font-weight: 700; color: var(--accent);
             font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ex-rate span { font-size: 12.5px; color: var(--muted); }
.ex-text { display: block; font-size: 16px; line-height: 1.55; color: var(--ink);
           text-decoration: none; }
.ex-text:hover { color: var(--accent); }
.ex-pkg { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .ex-item { grid-template-columns: 1fr; gap: 8px; }
  .ex-rate { text-align: left; }
  .ex-rate b { display: inline; font-size: 20px; margin-right: 8px; }
}

.q-more { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.q-more h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em;
             color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.q-more ul { margin: 0; padding: 0 0 0 1.2em; }
.q-more li { margin-bottom: 9px; line-height: 1.5; font-size: 15px; }
.q-more a { color: var(--ink); text-decoration: none; }
.q-more a:hover { color: var(--accent); }
.q-more-all { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--link); }

/* ---------- страница датасета ---------- */
.ds-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
            margin: 28px 0; padding: 22px 0; border-top: 1px solid var(--line);
            border-bottom: 1px solid var(--line); }
.ds-facts b { display: block; font-size: 24px; font-weight: 700; color: var(--accent);
              font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ds-facts span { font-size: 13px; color: var(--muted); }
.ds-files { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.ds-files a { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px;
              background: var(--panel-2); border: 1px solid var(--line);
              border-radius: 10px; text-decoration: none; }
.ds-files a:hover { border-color: var(--accent); }
.ds-files b { font-family: ui-monospace, monospace; font-size: 13.5px; color: var(--ink); }
.ds-files span { font-size: 12.5px; color: var(--muted); }
.wrap h3 { font-size: 20px; font-weight: 640; margin: 32px 0 12px; }
.ds-table { margin: 14px 0 8px; font-size: 14.5px; }
.ds-table td:first-child { font-family: ui-monospace, monospace; font-size: 13px;
                           color: var(--accent); white-space: nowrap; }
.ds-limits { font-size: 15.5px; line-height: 1.6; color: #c4cad8; padding-left: 1.2em; }
.ds-limits li { margin-bottom: 9px; }
.ds-cite { font-family: ui-monospace, monospace; font-size: 13.5px; background: var(--panel);
           border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
           color: var(--ink); }
@media (max-width: 700px) { .ds-facts { grid-template-columns: repeat(2, 1fr); } }

/* ---------- вход ---------- */
.login-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center;
              padding: 40px 20px; }
.login { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line);
         border-radius: var(--radius); padding: 32px 34px; }
.login h2 { margin: 0 0 8px; font-size: 22px; font-weight: 660; letter-spacing: -.02em; }
.login-note { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 24px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.login input { width: 100%; margin-bottom: 18px; }
.login input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.login button { width: 100%; padding: 13px; font-size: 15px; }
.login-error { background: #3a1c19; border: 1px solid #6e332c; color: #ffb0a8;
               border-radius: 9px; padding: 12px 15px; font-size: 14px; margin-bottom: 20px; }
.topbar .who { color: var(--muted); font-size: 13.5px; }

/* ---------- одиночная игра ---------- */
.pl { max-width: 800px; margin: 0 auto; padding: 26px 22px 70px; }
.pl-bar { display: flex; align-items: center; justify-content: space-between;
          gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
          margin-bottom: 26px; flex-wrap: wrap; }
.pl-score b { font-size: 22px; font-weight: 700; color: var(--accent);
              font-variant-numeric: tabular-nums; }
.pl-score span { font-size: 14px; color: var(--muted); margin-left: 6px; }
.pl-score span b { font-size: 15px; color: var(--muted); }
.pl-level { font-size: 14px; color: var(--muted); }
.pl-timer { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums;
            letter-spacing: -.02em; min-width: 92px; text-align: right; }
.pl-timer.run { color: var(--accent); }
.pl-timer.over { color: var(--no); }
.pl-text { font-size: 21px; line-height: 1.55; white-space: pre-wrap;
           background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 26px 30px; }
.pl-answer { margin-top: 18px; background: #14261d; border: 1px solid #26543c;
             border-radius: var(--radius); padding: 22px 26px; }
.pl-actions { display: flex; gap: 11px; margin-top: 20px; flex-wrap: wrap; }
.pl-actions button { padding: 13px 24px; font-size: 15px; }
.pl-meta { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* ---------- статьи и вопросы-ответы ---------- */
.art { max-width: 720px; margin: 0 auto; padding: 30px 22px 80px; }
.art h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.18; letter-spacing: -.025em;
          font-weight: 680; margin: 0 0 18px; }
.art h3 { font-size: 20px; font-weight: 640; margin: 34px 0 12px; }
.art p { font-size: 17px; line-height: 1.68; color: #c8cede; margin: 0 0 16px; }
.art-lead { font-size: 19px !important; color: var(--ink) !important; }
.art-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
             margin: 28px 0; padding: 22px 0; border-top: 1px solid var(--line);
             border-bottom: 1px solid var(--line); }
.art-facts b { display: block; font-size: 21px; font-weight: 700; color: var(--accent);
               font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.art-facts span { font-size: 12.5px; color: var(--muted); }
.art-res { font-size: 17px; line-height: 1.68; color: #c8cede; padding-left: 1.2em; }
.art-res li { margin-bottom: 10px; }
.formula { font-family: ui-monospace, monospace; font-size: 15px !important;
           background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
           padding: 14px 18px; color: var(--ink) !important; }
.chart { margin: 24px 0 28px; }
.chart svg { width: 100%; background: var(--panel); border: 1px solid var(--line);
             border-radius: var(--radius); }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.take { stroke: var(--accent); }
.chart .ln.diff { stroke: var(--no); }
.chart .ln.field { stroke: var(--link); stroke-dasharray: 5 4; }
.chart .dot { fill: var(--accent); }
.chart figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.key { display: inline-block; width: 14px; height: 3px; border-radius: 2px;
       vertical-align: middle; margin: 0 5px 0 12px; }
.key.diff { background: var(--no); }
.key.field { background: var(--link); }
.faq section { padding: 22px 0; border-top: 1px solid var(--line); }
.faq h3 { margin-top: 0; }
.faq-more { font-size: 15px !important; }
@media (max-width: 700px) { .art-facts { grid-template-columns: repeat(2, 1fr); } }

.byline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
          margin: 0 0 22px; font-size: 14.5px; color: var(--muted); }
.byline a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.byline a:hover { color: var(--accent); border-color: var(--accent); }

.pl-opt { display: flex; align-items: center; gap: 7px; font-size: 13.5px;
          color: var(--muted); cursor: pointer; margin: 0; }
.pl-opt input { width: 15px; height: 15px; padding: 0; accent-color: var(--accent); }

/* ---------- регистрация ---------- */
.signup-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 22px 80px;
               display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px;
               align-items: start; }
.signup-why h2 { font-size: 27px; font-weight: 660; letter-spacing: -.02em; margin: 0 0 14px; }
.signup-lead { font-size: 16.5px; line-height: 1.6; color: #c4cad8; margin: 0 0 22px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.why-list li { font-size: 15px; line-height: 1.6; color: var(--muted);
               padding-left: 18px; border-left: 2px solid var(--line); }
.why-list b { color: var(--ink); font-weight: 620; }
.signup-note { margin-top: 24px; font-size: 13.5px; color: var(--muted); }
.login.signup { width: 100%; }
.login-alt { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .signup-wrap { grid-template-columns: 1fr; gap: 34px; }
  .signup-why { order: 2; }
}

/* ---------- игра с телефона: версии ---------- */
.pp { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.pp-toggle { width: 100%; padding: 13px; font-size: 15px; }
.pp-body { margin-top: 16px; background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 20px 22px; }
.pp-setup label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pp-setup input, .pp-setup select { width: 100%; margin-bottom: 16px; }
.pp-setup button { width: 100%; }
.pp-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pp-who { display: flex; align-items: baseline; gap: 10px; font-size: 14px;
          color: var(--muted); margin-bottom: 14px; }
.pp-who b { color: var(--ink); font-size: 15px; }
.pp-form { display: flex; gap: 10px; }
.pp-form input { flex: 1; font-size: 16px; }
.pp-list { margin-top: 16px; display: grid; gap: 8px; }
.pp-v { display: flex; align-items: center; gap: 10px; padding: 11px 14px;
        background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.pp-v.final { border-color: var(--ok); background: #14261d; }
.pp-v-text { flex: 1; font-size: 15px; line-height: 1.4; }
.pp-v-who { font-size: 12.5px; color: var(--muted); }
.pp-v-pick { font-size: 12.5px; padding: 6px 12px; }
.pp-v.final .pp-v-pick { background: var(--ok); color: #06231a; border-color: transparent; }
.pp-empty { font-size: 13.5px; color: var(--muted); }
.submitted { margin-top: 18px; background: var(--panel-2); border: 1px solid var(--line);
             border-left: 3px solid var(--link); border-radius: 11px; padding: 16px 20px; }
.sub-cap { font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
           color: var(--muted); margin-bottom: 10px; }
.sub-item { display: flex; gap: 12px; align-items: baseline; padding: 5px 0; font-size: 16px; }
.sub-item b { min-width: 130px; color: var(--link); font-size: 14px; }
button#btn-dispute.on { background: #4a3a12; border-color: var(--accent); color: var(--accent); }
.disp { margin-left: 8px; font-size: 12px; color: var(--accent); border: 1px solid #5d4a1a;
        border-radius: 5px; padding: 1px 6px; }

.ask-label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 8px;
             line-height: 1.5; }
.ask-input { width: 100%; font-size: 15px; }

/* ---------- пакет на печать ---------- */
.pr { max-width: 800px; margin: 0 auto; padding: 26px 22px 60px; }
.pr-head { background: var(--panel); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 20px 24px; margin-bottom: 30px; }
.pr-head h2 { margin: 0 0 8px; font-size: 20px; }
.pr-head p { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 16px; }
.pr-title { font-size: 26px; font-weight: 680; margin: 0 0 26px; }
.pr-q { padding: 18px 0; border-top: 1px solid var(--line); }
.pr-no { font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
         color: var(--muted); margin-bottom: 8px; }
.pr-note { font-size: 13.5px; color: var(--accent); margin-bottom: 8px; }
.pr-hand { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pr-text, .pr-part { font-size: 16px; line-height: 1.55; white-space: pre-wrap; margin-bottom: 10px; }
.pr-part { padding-left: 14px; }
.pr-ans { font-size: 16px; margin-top: 10px; }
.pr-zach, .pr-cm { font-size: 14.5px; line-height: 1.55; color: #c4cad8; margin-top: 6px; }
.pr-src { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.pr-foot { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line);
           font-size: 12px; color: var(--muted); }
.resume { color: var(--accent); font-weight: 600; }

@media print {
  .no-print, .topbar, .toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .pr { max-width: none; padding: 0; }
  .pr-q { break-inside: avoid; border-top: 1px solid #ccc; }
  .pr-text, .pr-part, .pr-ans { color: #000; }
  .pr-zach, .pr-cm { color: #333; }
  .pr-no, .pr-src, .pr-hand, .pr-foot { color: #666; }
  .pr-note { color: #000; font-weight: 600; }
  a { color: #000; text-decoration: none; }
}
