:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16191f;
  --muted: #5b6472;
  --line: #e3e6eb;
  --accent: #2b6cb0;
  --accent-text: #ffffff;
  --accent-soft: #e8f0fa;
  --ok: #2f855a;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1a1e24;
    --text: #e8eaee;
    --muted: #9aa3b0;
    --line: #2a3039;
    --accent: #5b9bdc;
    --accent-text: #0d1117;
    --accent-soft: #1d2a3a;
    --ok: #5fbf8a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }

header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
nav.menu { display: flex; gap: 18px; flex-wrap: wrap; font-size: .95rem; }
nav.menu a { color: var(--muted); text-decoration: none; }
nav.menu a:hover { color: var(--text); }
nav.menu a.enter { color: var(--accent); font-weight: 600; }

main { padding: 48px 0 64px; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 1.3rem; margin: 0 0 10px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.hero { padding: 24px 0 40px; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }
.card p:last-child { margin-bottom: 0; }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 600; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.actions .btn { width: auto; display: inline-block; }
.hint { font-size: .85rem; color: var(--muted); text-align: center; margin: 6px 0 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-left: 48px; margin-bottom: 22px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=url], input[type=password] {
  width: 100%; font: inherit; font-size: .9rem; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); margin-bottom: 10px;
}
.qr { background: #fff; border-radius: 12px; padding: 12px; width: 240px; max-width: 100%; margin: 0 auto 10px; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-card:has(.qr:empty) { display: none; }
.files-card:has(.files-list:empty) { display: none; }
.files-list { display: grid; gap: 10px; }
.spaced { margin-top: 14px; }
.ok { color: var(--ok); font-weight: 600; text-align: center; margin: 8px 0 0; }
.notice { border-color: var(--accent); background: var(--accent-soft); }
.note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 12px; }
#err { display: none; color: #c53030; font-weight: 600; }
#err:target { display: block; }
ul.plain { padding-left: 18px; margin: 0; }
ul.plain li { margin-bottom: 6px; }

footer.bottom { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: .9rem; color: var(--muted); }
footer.bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.bottom a { color: var(--muted); }

@media (max-width: 560px) {
  h1 { font-size: 1.7rem; }
  main { padding: 32px 0 48px; }
  .actions .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
}
