:root {
  --bg: #0e141b;
  --panel: #161b22;
  --header: #12161c;
  --card: #1b2838;
  --row: #22272e;
  --row-on: #323842;
  --accent: #1a9fff;
  --text: #dcdedf;
  --muted: #8b929a;
  --ok: #59bf40;
  --danger: #e8594f;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font: "Inter", system-ui, sans-serif;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(1200px 480px at 80% -10%, rgba(26, 159, 255, 0.08), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(26, 159, 255, 0.04), transparent 55%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent);
  font-size: 0.95em;
}
.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--accent);
  color: var(--header);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 40;
}
.skip:focus { top: 12px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--header) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand:hover { text-decoration: none; }
.mark { width: 32px; height: 21px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--row);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.pill:hover { background: var(--row-on); color: var(--white); text-decoration: none; }
.pill.on { background: var(--white); color: var(--header); }
main { flex: 1; }

h1 {
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  color: var(--white);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lede {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 38em;
  margin: 0;
  line-height: 1.65;
}
.actions-center { justify-content: center; margin-top: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--header); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: var(--row); color: var(--white); }
.btn-ghost:hover { background: var(--row-on); text-decoration: none; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: rgba(232, 89, 79, 0.12); text-decoration: none; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  padding: 72px 0 48px;
  align-items: center;
}

.device {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.lib {
  background: #0c1218;
  border-radius: 14px;
  overflow: hidden;
}
.lib-top, .lib-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.lib-top { background: var(--header); }
.lib-brand { color: var(--white); letter-spacing: 0.06em; }
.lib-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 4px;
}
.lib-tabs span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--row);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.lib-tabs span.on { background: var(--white); color: var(--header); }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 14px 16px 18px;
}
.cap {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 40%),
    var(--cap, var(--card));
}
.cap:nth-child(1) { --cap: #1b4d73; }
.cap:nth-child(2) { --cap: #2a3d55; }
.cap:nth-child(3) { --cap: #16324a; }
.cap:nth-child(4) { --cap: #243044; }
.cap:nth-child(5) { --cap: #1a3850; }
.cap.focus {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 22px rgba(26, 159, 255, 0.45);
}
.lib-note {
  display: none;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 8px 0 40px;
}
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  border-top: 3px solid var(--accent);
  min-height: 148px;
}
.card h2, .card h3 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 650;
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

.note {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--muted);
  margin: 0 0 72px;
  border: 1px solid var(--line);
}
.note a { font-weight: 600; }

.page { padding: 56px 0 80px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.page .lede { margin-bottom: 8px; }

.req {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 32px 0 8px;
}
.req div {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
}
.req b { display: block; color: var(--white); margin-bottom: 4px; }
.req span { color: var(--muted); font-size: 14px; }

.steps { display: grid; gap: 10px; margin-top: 28px; counter-reset: step; }
.step {
  background: var(--row);
  border-radius: var(--radius);
  padding: 18px 22px 18px 64px;
  position: relative;
  color: var(--text);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--header);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.step b { color: var(--white); font-weight: 600; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 36px;
}
.split h2 {
  color: var(--white);
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.split p, .split li { color: var(--muted); }
.split ul { margin: 0; padding-left: 1.15em; }

.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 8px;
}
.howto article {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
}
.howto .n {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.howto h2 { color: var(--white); font-size: 1.05rem; margin: 8px 0; }
.howto p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.sheet-wrap { max-width: 520px; margin: 36px auto 0; }
.sheet {
  background: var(--panel);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
input[type="text"], input[type="password"] {
  width: 100%;
  background: var(--row);
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26, 159, 255, 0.2); }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.pin {
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin: 8px 0 4px 8px;
}
.timer {
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.bar {
  height: 4px;
  background: var(--row);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 20px;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 100%;
  transform-origin: left;
}
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 10px 0; }
.status {
  text-align: center;
  margin: 16px 0 0;
  min-height: 1.4em;
  color: var(--muted);
}
.status.ok { color: var(--ok); font-weight: 600; }
.status.danger { color: var(--danger); }
.live-hint {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
}
.success-block { text-align: center; padding: 8px 0 4px; }
.success-block h2 {
  color: var(--white);
  margin: 0 0 8px;
  font-size: 1.4rem;
}
.success-block p { color: var(--muted); margin: 0 0 20px; }

.credits { display: grid; gap: 12px; padding: 0; margin: 28px 0 0; }
.credits li {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  list-style: none;
  border: 1px solid var(--line);
}
.credits b { color: var(--white); }
.legal {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--white); }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .hero, .features, .req, .split, .howto { grid-template-columns: 1fr; }
  .lib-grid { grid-template-columns: repeat(4, 1fr); }
  .lib-grid .cap:nth-child(5) { display: none; }
  .hero { padding: 40px 0 28px; gap: 28px; }
  .page { padding: 36px 0 64px; }
  .wrap { width: min(1120px, calc(100% - 28px)); }
}
