:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-soft: #021208;
  --panel: rgba(5, 46, 22, 0.22);
  --panel-strong: rgba(20, 83, 45, 0.38);
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-strong: #d1d5db;
  --line: rgba(34, 197, 94, 0.22);
  --line-strong: rgba(34, 197, 94, 0.44);
  --accent: #22c55e;
  --accent-strong: #4ade80;
  --yellow: #fef08a;
  --warning: rgba(113, 63, 18, 0.34);
  --warning-line: rgba(250, 204, 21, 0.42);
  --danger: rgba(127, 29, 29, 0.28);
  --danger-line: rgba(248, 113, 113, 0.45);
  --code-bg: rgba(2, 6, 23, 0.86);
  --code-text: #d1fae5;
  --shadow: 0 0 0 1px rgba(34, 197, 94, 0.06), 0 24px 70px rgba(0, 0, 0, 0.45);
  --glow: 0 0 22px rgba(34, 197, 94, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at top, rgba(34, 197, 94, 0.13), transparent 42rem),
    linear-gradient(rgba(34, 197, 94, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 50px 50px, 50px 50px, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent-strong);
  text-decoration-color: rgba(74, 222, 128, 0.42);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #bbf7d0;
  text-decoration-color: var(--accent-strong);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar-picker {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 12px;
}

.topbar-picker label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: rgba(74, 222, 128, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-picker select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 46, 22, 0.82);
  color: var(--text);
  font: 800 14px/1 Inter, ui-sans-serif, system-ui, sans-serif;
}

.topbar-picker select:focus {
  outline: 3px solid rgba(34, 197, 94, 0.16);
  border-color: var(--line-strong);
}

.brand {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: default;
}

.brand-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: var(--glow);
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

.topbar-links a {
  color: rgba(187, 247, 208, 0.82);
  text-decoration: none;
}

.topbar-links a:hover {
  color: var(--accent);
}

.side-nav {
  position: sticky;
  top: 78px;
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.side-nav h2 {
  margin: 0 0 12px;
  color: rgba(74, 222, 128, 0.7);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.side-nav a {
  display: block;
  padding: 8px 0;
  color: var(--muted-strong);
  font-size: 15px;
  text-decoration: none;
}

.side-nav .nav-parent {
  display: block;
  padding: 8px 0 4px;
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 800;
}

.side-nav a:hover {
  color: var(--accent);
}

.side-nav a.nav-child {
  position: relative;
  margin-left: 14px;
  padding-left: 16px;
  font-size: 14px;
  color: rgba(209, 213, 219, 0.82);
}

.side-nav a.nav-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 1px;
  background: rgba(74, 222, 128, 0.5);
}

.content {
  min-width: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 44px;
  background: linear-gradient(180deg, rgba(5, 46, 22, 0.32), rgba(0, 0, 0, 0.62));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 30%;
  height: 240px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.16), transparent 65%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(74, 222, 128, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  margin: 0 0 18px;
  max-width: 920px;
  color: var(--accent);
  font-size: clamp(42px, 7vw, 76px);
  text-shadow: var(--glow);
}

h2 {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: clamp(28px, 4vw, 42px);
  text-shadow: 0 0 18px rgba(34, 197, 94, 0.32);
}

h3 {
  margin: 22px 0 10px;
  color: var(--text);
  font-size: 22px;
}

p {
  margin: 0 0 14px;
}

ol,
ul {
  color: var(--muted-strong);
}

.lead {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 21px;
}

.card {
  margin-top: 22px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.card.highlight {
  background: var(--warning);
  border-color: var(--warning-line);
}

.card.problem {
  background: var(--danger);
  border-color: var(--danger-line);
}

.secret-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.2);
}

.secret-card h2 {
  color: #020617;
}

.secret-image {
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
}

.goose-demo {
  position: relative;
  min-height: 220px;
  margin-top: 18px;
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    rgba(0, 0, 0, 0.42);
  background-size: 42px 42px;
}

.goose-demo::after {
  content: "кликните по пустому месту";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: rgba(209, 213, 219, 0.52);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

[data-goose-playground] {
  overflow: hidden;
}

.goose-sprite {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.38));
  line-height: 1;
  transform-origin: center;
  will-change: transform;
}

.goose-sprite:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.peek-goose {
  position: fixed;
  z-index: 9999;
  width: 120px;
  height: 132px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 180ms ease;
}

.peek-goose::before {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.peek-goose.is-visible {
  opacity: 1;
}

.peek-goose-window {
  position: absolute;
  left: 35px;
  bottom: 0;
  width: 50px;
  height: 55px;
  overflow: hidden;
}

.peek-goose-body {
  transform: translateY(58px);
}

.peek-goose.is-visible .peek-goose-body {
  animation: peek-goose-rise 820ms ease-out forwards;
}

.peek-goose:not(.is-visible) .peek-goose-body {
  animation: peek-goose-descend 620ms ease-in forwards;
}

.peek-goose-head {
  transform-origin: 25px 14px;
  transition: transform 300ms ease-in-out;
}

.peek-goose.is-looking-left .peek-goose-head {
  transform: scaleX(-1) rotate(-5deg);
}

.peek-goose.is-looking-right .peek-goose-head {
  transform: rotate(5deg);
}

.peek-goose.is-speaking .peek-goose-head {
  transform: rotate(3deg);
}

.peek-goose-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  width: 120px;
  height: 78px;
  padding-top: 17px;
  color: #000000;
  font-family: "Bangers", "Arial Black", Impact, sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  text-align: center;
  transform: rotate(-4deg) scale(0.9);
  transform-origin: 50% 70%;
}

.peek-goose.is-speaking .peek-goose-bubble {
  display: block;
  animation: bubble-pop 300ms ease-out forwards;
}

.peek-goose-bubble::before {
  content: "";
  position: absolute;
  inset: 5px 6px 23px;
  z-index: -1;
  border: 3px solid #000000;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 6px #ffffff;
}

.peek-goose-bubble::after {
  content: "";
  position: absolute;
  left: 48px;
  bottom: 9px;
  z-index: -2;
  width: 22px;
  height: 28px;
  border: 3px solid #000000;
  border-top: 0;
  background: #ffffff;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

@keyframes peek-goose-rise {
  to {
    transform: translateY(0);
  }
}

@keyframes peek-goose-descend {
  to {
    transform: translateY(58px);
  }
}

@keyframes bubble-pop {
  to {
    transform: rotate(-4deg) scale(1);
  }
}

.step-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 4px 11px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: rgba(20, 83, 45, 0.28);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mini-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 46, 22, 0.22);
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}

.file-list a {
  display: block;
  padding: 12px 14px;
  background: rgba(20, 83, 45, 0.22);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent-strong);
  text-decoration: none;
}

.file-list a:hover {
  background: rgba(20, 83, 45, 0.42);
  border-color: var(--line-strong);
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 46, 22, 0.18);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.14);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--muted-strong);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.glossary-list {
  display: grid;
  gap: 12px;
}

.glossary-list dt {
  color: var(--accent-strong);
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  font-weight: 800;
}

.glossary-list dd {
  margin: -8px 0 4px;
  color: var(--muted-strong);
}

.is-hidden {
  display: none !important;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 14px 0;
  padding: 19px 54px 19px 18px;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.48;
  box-shadow: inset 0 0 30px rgba(34, 197, 94, 0.04);
}

.output-block {
  background: rgba(9, 9, 11, 0.62);
  border-color: rgba(163, 163, 163, 0.18);
  color: #d4d4d8;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.025);
}

.output-block::before {
  content: "output";
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(163, 163, 163, 0.22);
  border-radius: 999px;
  color: #a3a3a3;
  font: 700 11px/1 "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

:not(pre) > code {
  padding: 0.12em 0.32em;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 6px;
  color: #bbf7d0;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 36px;
  min-height: 34px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background: rgba(20, 83, 45, 0.42);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 12px;
}

.copy-button:hover {
  background: rgba(20, 83, 45, 0.66);
}

.callout {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: rgba(20, 83, 45, 0.24);
}

.compact-callout {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
}

.footer {
  padding: 34px 28px 48px;
  color: rgba(74, 222, 128, 0.72);
  text-align: center;
}

.footer span {
  display: block;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  margin: 0 8px;
  color: var(--accent-strong);
}

/* Slides */
.slides-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(34, 197, 94, 0.16), transparent 46rem),
    linear-gradient(rgba(34, 197, 94, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.035) 1px, transparent 1px),
    #000;
  background-size: auto, 50px 50px, 50px 50px, auto;
}

.deck {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.slide {
  position: relative;
  overflow: hidden;
  display: grid;
  width: min(100%, 850px);
  min-height: min(calc(100vh - 36px), 1000px);
  padding: 30px;
  background: linear-gradient(180deg, rgba(5, 46, 22, 0.26), rgba(0, 0, 0, 0.82));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  grid-area: 1 / 1;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(24px, 0, 0) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 520ms ease;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  z-index: 2;
}

.slide.leaving-left {
  transform: translate3d(-22px, 0, 0) scale(0.99);
}

.slide.leaving-right {
  transform: translate3d(22px, 0, 0) scale(0.99);
}

.slide.enter-from-left {
  transform: translate3d(-24px, 0, 0) scale(0.985);
}

.slide.enter-from-right {
  transform: translate3d(24px, 0, 0) scale(0.985);
}

.slide-header,
.slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.slide-step {
  padding: 8px 12px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: rgba(20, 83, 45, 0.32);
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 800;
}

.slide-count {
  color: rgba(74, 222, 128, 0.72);
  font-size: 16px;
  font-weight: 700;
}

.slide-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.thanks-slide .slide-header,
.thanks-slide .slide-footer {
  position: relative;
  z-index: 3;
}

.thanks-slide .slide-main {
  align-items: flex-start;
}

.slide-goose-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: crosshair;
  z-index: 1;
  opacity: 0.95;
}

.slide h1 {
  font-size: clamp(48px, 8vw, 76px);
}

.slide h2 {
  font-size: clamp(40px, 6vw, 60px);
}

.slide .big-quote {
  margin: 0;
  color: var(--accent);
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 850;
  line-height: 1.08;
  text-shadow: var(--glow);
}

.slide .subtitle {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 28px;
}

.slide .social-links {
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 800;
}

.slide ul,
.slide ol {
  margin: 18px 0 0;
  padding-left: 32px;
  color: var(--muted-strong);
  font-size: 29px;
  line-height: 1.32;
}

.slide li + li {
  margin-top: 12px;
}

.slide pre {
  padding: 12px;
  font-size: 22px;
  white-space: pre-wrap;
}

.slide pre code {
  display: grid;
  gap: 6px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 8px 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.copy-line:hover {
  background: rgba(20, 83, 45, 0.32);
  border-color: rgba(34, 197, 94, 0.22);
}

.copy-line-text {
  overflow-wrap: anywhere;
}

.copy-line-button {
  min-width: 54px;
  min-height: 30px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 7px;
  background: rgba(20, 83, 45, 0.42);
  color: var(--accent-strong);
  cursor: pointer;
  font: 700 12px/1 "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

.copy-line-button:hover {
  background: rgba(20, 83, 45, 0.72);
}

.instruction-link {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.instruction-link img {
  width: 86px;
  height: 86px;
}

.slide .instruction-link {
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 22px;
}

.slide .instruction-link img {
  width: 172px;
  height: 172px;
}

.title-slide .instruction-link {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
}

.title-slide .instruction-link img {
  width: 260px;
  height: 260px;
}

.instruction-link span {
  display: block;
  color: rgba(74, 222, 128, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.instruction-link strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
}

.slide-controls {
  position: fixed;
  right: 34px;
  bottom: 40px;
  z-index: 20;
  display: flex;
  gap: 14px;
}

.slide-controls button {
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 46, 22, 0.94);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 26px;
  box-shadow: var(--shadow);
}

.slide-controls button:hover {
  border-color: var(--line-strong);
  color: #bbf7d0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slide {
    filter: none;
    transition: none;
  }

  .goose-sprite {
    animation: none;
  }
}

@media (max-width: 820px) {
  .page-shell {
    display: block;
    padding: 16px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .topbar-picker {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-picker label {
    flex: 1;
    min-width: 0;
  }

  .side-nav {
    position: static;
    margin-bottom: 18px;
  }

  .hero,
  .card {
    padding: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  pre {
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .slide {
    min-height: calc(100vh - 20px);
    padding: 22px;
  }

  .slide-header,
  .slide-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .slide .instruction-link {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .slide .instruction-link img {
    width: 132px;
    height: 132px;
  }

  .title-slide .instruction-link {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .title-slide .instruction-link img {
    width: 180px;
    height: 180px;
  }

  .slide ul,
  .slide ol {
    font-size: 23px;
  }

  .slide pre {
    font-size: 17px;
  }
}
