/* Tutorial page layout. Loaded after static.css, which supplies the palette,
   the reset and the base type; everything here is specific to this one page.

   It deliberately borrows the landing app's visual language rather than the
   blog's (mono kickers, numbered cards, hairline borders, a single accent)
   because this page is product surface, not an article. static.css is not
   changed for it: the blog and imprint keep rendering exactly as they did. */

:root {
  --measure: 940px;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Clears the sticky bar below when a heading anchor is jumped to. */
html {
  scroll-padding-top: 96px;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.78);
  backdrop-filter: blur(10px) saturate(130%);
}

.barInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 14px 32px;
}

/* static.css's .brand carries a 40px bottom margin for the blog's stacked
   header; inside a flex bar it must not. */
.bar .brand {
  margin-bottom: 0;
}

.barLinks {
  display: flex;
  align-items: center;
  gap: 24px;
}
.barLinks a {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 120ms ease;
}
.barLinks a:hover {
  color: var(--ink);
  text-decoration: none;
}

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 8px;
}

/* Decorative brand wash, same idea as the landing hero. */
.heroGlow {
  position: absolute;
  top: -180px;
  left: -80px;
  width: min(720px, 100%);
  height: 520px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(166, 255, 61, 0.13) 0%,
    rgba(166, 255, 61, 0.04) 40%,
    transparent 70%
  );
}
.hero > *:not(.heroGlow) {
  position: relative;
}

.kicker {
  margin: 0 0 12px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: 18px;
}

/* ---------- contents ---------- */

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.toc a:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  transform: translateY(-2px);
  text-decoration: none;
}

.num {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- sections ---------- */

.section {
  padding-top: 48px;
}

.section > .num {
  margin-bottom: 4px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 20px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section p,
.section ul {
  margin: 0 0 16px;
  max-width: 72ch;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.7;
}
.section ul {
  padding-left: 20px;
}
.section li + li {
  margin-top: 8px;
}
.section strong {
  color: var(--ink);
  font-weight: 600;
}
.section em {
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
}
.section code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- screenshots ---------- */

figure {
  margin: 24px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
figure img {
  display: block;
  width: 100%;
  border-radius: 4px;
}
/* Paragraphs carry only a bottom margin, so prose following a figure would
   otherwise sit flush against it. Needs `.section` in front to outrank
   `.section p`, which sets `margin: 0 0 16px`. */
.section figure + p {
  margin-top: 24px;
}
/* A shot of one small control, which the full measure would upscale into a
   blurry slab. */
figure.small {
  max-width: 460px;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 80px;
  padding-bottom: 64px;
}
.foot footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

@media (max-width: 640px) {
  .barInner,
  .shell {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero {
    padding-top: 48px;
  }
  .barLinks {
    gap: 16px;
  }
}
