/* 77tools — фиолетовый бренд-цвет и лаймовый акцент, тёмная и светлая темы */
:root {
  --bg: #f5f4fb; --card: #ffffff; --fg: #14121f; --dim: #625e78; --line: #e4e1f2;
  --brand: #5b3df5; --brand-fg: #ffffff; --lime: #d4ff3a; --soft: #efebff;
  --ok: #0f9d58; --bad: #c62828; --shadow: 0 18px 50px -24px rgba(56, 34, 170, .35);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0b16; --card: #16132a; --fg: #efedf8; --dim: #a39fc0; --line: #2a2546;
          --brand: #7c63ff; --soft: #1f1a3d; --ok: #34d399; --bad: #f87171;
          --shadow: 0 18px 50px -24px rgba(0, 0, 0, .7); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* шапка */
header { padding: 18px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 5px; color: var(--fg); text-decoration: none;
        font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.logo i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
          background: var(--brand); color: var(--lime); font-style: normal; font-size: 17px; font-weight: 900;
          letter-spacing: -.04em; }
.logo b { color: var(--brand); font-weight: 800; }
nav { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
nav a { text-decoration: none; color: var(--dim); padding: 7px 12px; border-radius: 9px; font-size: 15px; font-weight: 600; }
nav a.on { background: var(--brand); color: var(--brand-fg); }

/* первый экран */
.hero { padding: 26px 0 8px; }
.kicker { display: inline-block; background: var(--lime); color: #14121f; font-weight: 800; font-size: 13px;
          padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.08; margin: 14px 0 10px; letter-spacing: -.035em; }
h1 em { font-style: normal; color: var(--brand); }
.lead { color: var(--dim); margin: 0 0 22px; font-size: 18px; max-width: 640px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 18px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 15px 16px; border-radius: 13px;
             border: 2px solid var(--line); background: var(--bg); color: var(--fg); }
.row input:focus { outline: none; border-color: var(--brand); }
button { font: inherit; font-weight: 700; border: 0; border-radius: 13px; padding: 15px 22px;
         background: var(--brand); color: var(--brand-fg); cursor: pointer; white-space: nowrap; transition: transform .08s; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: default; }
.hint { color: var(--dim); font-size: 14px; margin: 10px 2px 0; }
@media (max-width: 540px) { .row { flex-direction: column; } button { width: 100%; } }

.perks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 2px 0; padding: 0; list-style: none;
         color: var(--dim); font-size: 14px; font-weight: 600; }
.perks li::before { content: "✓"; color: var(--brand); font-weight: 900; margin-right: 6px; }

.msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.msg.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* карточка найденного ролика */
.video { display: grid; grid-template-columns: 200px 1fr; gap: 18px; margin-top: 18px; padding-top: 18px;
         border-top: 1px dashed var(--line); align-items: start; }
.video img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: var(--line); }
.video h2 { font-size: 18px; margin: 0 0 4px; line-height: 1.3; word-break: break-word; }
.meta { color: var(--dim); font-size: 14px; margin-bottom: 12px; }
@media (max-width: 580px) { .video { grid-template-columns: 1fr; } }

.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.opts label { border: 2px solid var(--line); border-radius: 10px; padding: 6px 12px; cursor: pointer;
              font-size: 15px; font-weight: 600; }
.opts input { display: none; }
.opts label:has(input:checked) { border-color: var(--brand); background: var(--soft); color: var(--brand); }

.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #9f7bff); transition: width .4s; }
.status { font-size: 14px; color: var(--dim); }
.done a.btn { display: inline-block; margin-top: 12px; text-decoration: none; background: var(--lime); color: #14121f;
              padding: 13px 20px; border-radius: 13px; font-weight: 800; }

/* текст под формой */
section.text { margin: 40px 0; }
section.text h2 { font-size: 24px; margin: 34px 0 14px; letter-spacing: -.02em; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px;
         grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
            padding: 14px 14px 14px 54px; position: relative; font-size: 15px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px;
                    border-radius: 9px; background: var(--soft); color: var(--brand); font-weight: 800;
                    display: grid; place-items: center; }
section.text ul { padding-left: 22px; }
section.text li { margin: 4px 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 8px 0 2px; color: var(--dim); }

footer { color: var(--dim); font-size: 14px; padding: 26px 0 40px; border-top: 1px solid var(--line); margin-top: 30px; }
footer a { color: var(--dim); }
footer .logo { font-size: 16px; margin-bottom: 8px; }
footer .logo i { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
/* генератор штрихкодов */
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.bc-form { display: grid; gap: 12px; }
.bc-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--dim); }
.bc-form select, .bc-form input:not([type=checkbox]), .bc-form textarea {
  font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 2px solid var(--line);
  border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
.bc-form textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 15px; word-break: break-all; }
.bc-form select:focus, .bc-form input:focus, .bc-form textarea:focus { outline: none; border-color: var(--brand); }
.bc-form .hint { margin: -4px 2px 0; }
.bc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bc-form label.chk { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 500; }
.bc-form label.chk input { width: 18px; height: 18px; accent-color: var(--brand); }
.bc-preview { position: sticky; top: 16px; display: grid; gap: 10px; }
.bc-label { background: repeating-linear-gradient(45deg, var(--soft) 0 10px, transparent 10px 20px);
            border-radius: 14px; padding: 18px; display: grid; place-items: center; min-height: 200px; }
.bc-label canvas { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; background: #fff;
                   border-radius: 6px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); image-rendering: pixelated; }
.bc-preview .hint { margin: 0; text-align: center; }
.bc-btns { display: flex; gap: 8px; }
.bc-btns button { flex: 1; }
@media (max-width: 720px) { .bc-grid { grid-template-columns: 1fr; } .bc-preview { position: static; } }

/* плашка согласия на cookie и Метрику */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto;
           display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line);
           border-radius: 16px; padding: 14px 16px; box-shadow: 0 20px 60px -20px rgba(20, 10, 80, .45); font-size: 14px; }
.consent p { margin: 0; color: var(--dim); }
.consent-btns { display: flex; gap: 8px; flex-shrink: 0; }
.consent button { padding: 10px 16px; border-radius: 11px; font-size: 14px; }
button.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); }
@media (max-width: 600px) { .consent { flex-direction: column; align-items: stretch; }
                            .consent-btns button { flex: 1; width: auto; } }

[hidden] { display: none !important; }
