@font-face {
  font-family: Unbounded;
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Unbounded;
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --primary: hsl(223, 95%, 58%);
  --primary-hover: hsl(223, 95%, 46%);
  --page: hsl(223, 45%, 6%);
  --surface: hsl(223, 35%, 10%);
  --elevated: hsl(223, 30%, 13%);
  --border: hsla(223, 40%, 70%, 0.12);
  --text: hsl(223, 30%, 95%);
  --muted: hsl(223, 20%, 68%);
  --success: #22c55e;
  --error: #ef4444;
  --on-primary: #fff;
  --shadow: 0 18px 40px hsla(223, 45%, 2%, 0.45);
  --radius: 12px;
  --ctrl: 10px;
  --nav-h: 64px;
  --font: Onest, "Segoe UI", sans-serif;
  --display: Unbounded, Onest, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --measure: 1120px;
  --run: 300px;
}

html[data-theme="light"] {
  color-scheme: light;
  --page: hsl(223, 33%, 96%);
  --surface: hsl(223, 40%, 99%);
  --elevated: hsl(0, 0%, 100%);
  --border: hsla(223, 28%, 20%, 0.12);
  --text: hsl(223, 30%, 12%);
  --muted: hsl(223, 16%, 38%);
  --shadow: 0 18px 40px hsla(223, 30%, 20%, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

::selection {
  background: hsla(223, 95%, 58%, 0.35);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html {
  scrollbar-color: hsl(223, 20%, 40%) var(--page);
}

h1, h2, p { margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.35rem, 3.5vw, 3.25rem);
  max-width: none;
}

h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  max-width: 22ch;
  text-wrap: balance;
}

a { color: inherit; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--elevated);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--ctrl);
  z-index: 5;
}

.skip:focus { top: 12px; }

.measure {
  width: min(var(--measure), calc(100% - 32px));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  height: var(--nav-h);
  background: var(--page);
  border-bottom: 1px solid var(--border);
}

.hero,
.band,
.close { scroll-margin-top: var(--nav-h); }

.nav-bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 560;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.brand img { display: block; border-radius: 7px; }

.nav-fold { display: contents; }

.nav-fold > summary { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--ctrl);
}

.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font: 600 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  border: 0;
}

.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }

.text-btn {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--ctrl);
  background: transparent;
  color: var(--muted);
  font: 600 15px/1 var(--font);
  cursor: pointer;
}

.text-btn:hover { color: var(--text); background: var(--surface); }
.text-btn:active { transform: translateY(1px); }

.hero {
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: flex-start;
  padding: 36px 0 56px;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero-copy p {
  max-width: 38ch;
  color: var(--muted);
}

.board {
  position: relative;
  background:
    radial-gradient(80% 90% at 50% 0%, hsla(223, 95%, 58%, 0.2), transparent 60%),
    var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 22px 24px;
}

.board ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.board li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.glyph {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--page);
  box-shadow: inset 0 0 0 1px var(--border);
}

.glyph-logo img { display: block; border-radius: 8px; }

.role { font-weight: 650; letter-spacing: -0.01em; }
.hint, .board code { color: var(--muted); }
.board code { font-size: 12px; overflow-wrap: anywhere; }

.board-rail {
  position: absolute;
  left: 54px;
  right: 54px;
  top: 59px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.bead {
  position: absolute;
  left: 0;
  top: -6px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--primary);
  animation: run-x 3.4s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.bead-late { animation-delay: -1.7s; }

@keyframes run-x {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(var(--run)); opacity: 0; }
}

@keyframes run-y {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(var(--run)); opacity: 0; }
}

.band { padding: 64px 0; }

.lede {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--muted);
}

.access-stage {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segment-opt { position: relative; flex: 1; }

.segment-opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segment-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.segment-opt:has(input:checked) span {
  background: var(--elevated);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.segment-opt:has(input:focus-visible) span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--elevated);
}

.dots {
  width: 42px;
  height: 10px;
  flex: none;
  background:
    radial-gradient(circle at 5px 50%, hsl(0, 70%, 58%) 4px, transparent 4.5px),
    radial-gradient(circle at 21px 50%, hsl(40, 90%, 52%) 4px, transparent 4.5px),
    radial-gradient(circle at 37px 50%, hsl(140, 55%, 46%) 4px, transparent 4.5px);
}

.frame-bar code { color: var(--muted); font-size: 13px; }

.frame-body { padding: 22px 20px 24px; min-height: 240px; }

.page-art { display: grid; gap: 10px; margin-bottom: 18px; max-width: 420px; }
.art-hero {
  height: 92px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, hsla(223, 95%, 58%, 0.55), hsla(253, 70%, 55%, 0.25) 55%, transparent),
    var(--page);
  box-shadow: inset 0 0 0 1px var(--border);
}
.art-line, .art-line.short {
  height: 10px;
  border-radius: 999px;
  background: var(--border);
}
.art-line.short { width: 58%; }

.login-card {
  max-width: 360px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--elevated);
  box-shadow: inset 0 0 0 1px var(--border);
}

.scene { display: none; }
.frame[data-access="open"] .scene-open,
.frame[data-access="auth"] .scene-auth,
.frame[data-access="guest"] .scene-guest { display: block; }

.scene-title {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  font-weight: 560;
}

.scene-line {
  margin-top: 10px;
  color: var(--muted);
  max-width: 42ch;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  height: 40px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--page);
  color: var(--text);
  font: 15px/1 var(--font);
  padding: 0 12px;
}

.guest-url {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--page);
  border: 1px solid var(--border);
  color: var(--text);
  overflow-wrap: anywhere;
}

.band-bots { padding-top: 24px; }

.gate {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--elevated);
  overflow: hidden;
}

.gate-file {
  padding: 20px 22px 22px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.file-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.file-body {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  min-height: 6.2em;
}

.file-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.lanes {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.lane {
  position: relative;
  height: 48px;
  border-radius: 999px;
  background: var(--page);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
}

.lane-end {
  position: absolute;
  right: 14px;
  top: 10px;
  height: 28px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.lane { --pass: 180px; --halt: 80px; }

.mover {
  position: absolute;
  left: 10px;
  top: 10px;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--on-primary);
  background: hsl(223, 90%, 46%);
  animation: pass 3.6s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.bot { animation-name: halt; background: hsl(0, 72%, 42%); }

.gate[data-robots="allow"] .bot,
.gate[data-robots="pass"] .bot {
  animation-name: pass;
  background: var(--success);
  color: #052e16;
}

.stop {
  position: absolute;
  left: calc(10px + var(--halt) + 40px);
  top: 10px;
  height: 28px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--error);
  opacity: 1;
}

.gate[data-robots="allow"] .stop,
.gate[data-robots="pass"] .stop { opacity: 0; }

@keyframes pass {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  78% { transform: translateX(var(--pass)); opacity: 1; }
  100% { transform: translateX(var(--pass)); opacity: 0; }
}

@keyframes halt {
  0% { transform: translateX(0); opacity: 0; }
  14% { opacity: 1; }
  46% { transform: translateX(var(--halt)); opacity: 1; }
  72% { transform: translateX(var(--halt)); opacity: 0; }
  100% { transform: translateX(var(--halt)); opacity: 0; }
}

.picks {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

.pick {
  position: relative;
  display: flex;
  min-height: 72px;
  padding: 14px 16px;
  background: transparent;
  cursor: pointer;
}

.pick + .pick { border-top: 1px solid var(--border); }

.pick input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.pick-copy { display: flex; flex-direction: column; gap: 4px; }
.pick-title { font-weight: 650; }
.pick-detail { color: var(--muted); font-size: 14px; }

.pick:has(input:checked) { background: hsla(223, 95%, 58%, 0.16); }
.pick:has(input:checked) .pick-title { color: var(--primary-hover); }

.pick:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.domain-card {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 22px;
  border-radius: 16px;
  background:
    linear-gradient(120deg, hsla(223, 95%, 58%, 0.16), transparent 42%),
    var(--elevated);
  box-shadow: inset 0 0 0 1px var(--border);
}

.domain-sample {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.dns {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.dns span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 13px;
  vertical-align: middle;
}

.dns code { color: var(--text); }

.domain-sample code {
  font-family: var(--display);
  font-size: 1em;
  color: var(--text);
}

.places {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}

.places li {
  font-weight: 600;
  padding: 8px 0;
}

.places li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 14px -0.1em;
  background: var(--border);
  vertical-align: middle;
}

.band-tight { padding-top: 12px; }

.close { padding: 24px 0 96px; }
.close h2 { max-width: 14ch; }
.close .btn { margin-top: 22px; }

.foot {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.foot-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.foot a { color: var(--text); font-weight: 600; text-decoration: none; }
.foot a:hover { color: var(--primary); }

@media (max-width: 1040px) {
  .hero-grid,
  .gate,
  .domain-card { grid-template-columns: 1fr; gap: 28px; }
  h1 { max-width: none; }
  .gate-file { border-right: 0; border-bottom: 1px solid var(--border); }
  .board ol { grid-template-columns: 1fr; gap: 22px; }
  .board { padding-left: 22px; }
  .board-rail {
    left: 53px;
    right: auto;
    top: 52px;
    bottom: 52px;
    width: 2px;
    height: auto;
  }
  .bead { animation-name: run-y; left: -6px; top: 0; }
}

.theme-in-menu { display: none; }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .nav-bar { gap: 10px; }
  .segment { grid-template-columns: 1fr; }
  .segment-opt span { justify-content: flex-start; text-align: left; }
  .nav-end .theme-toggle { display: none; }
  .theme-in-menu { display: flex; width: 100%; justify-content: flex-start; }
}

@media (max-width: 860px) {
  .measure { width: min(var(--measure), calc(100% - 28px)); }
  .nav-fold { display: block; position: relative; }
  .nav-fold > summary {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    list-style: none;
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
    border-radius: var(--ctrl);
  }
  .nav-fold > summary::-webkit-details-marker { display: none; }
  .nav-fold[open] > summary { color: var(--text); background: var(--surface); }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    flex-direction: column;
    align-items: stretch;
    padding: 6px;
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .nav-fold[open] .nav-links { display: flex; }
  .hero { align-items: flex-start; min-height: 0; padding-top: 20px; }
  .hero-grid,
  .access-stage,
  .gate { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  .gate-file { border-right: 0; border-bottom: 1px solid var(--border); }
  .segment { width: 100%; }
  .segment-opt { flex: 1 1 auto; }
  .segment-opt span { justify-content: center; }
  h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bead, .mover { animation: none; }
  .bead { opacity: 1; transform: translateX(40%); }
  .board-rail[data-axis="y"] .bead { transform: translateY(40%); }
  .mover.human { transform: translateX(var(--pass)); opacity: 1; }
  .gate[data-robots="deny"] .mover.bot { transform: translateX(var(--halt)); opacity: 1; }
  .gate[data-robots="allow"] .mover.bot,
  .gate[data-robots="pass"] .mover.bot { transform: translateX(var(--pass)); opacity: 1; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--page); }
}
