.tutorial-main { padding-top: 64px; padding-bottom: 72px; }
.tutorial-intro { max-width: 880px; margin-bottom: 64px; }
.tutorial-intro h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.12; letter-spacing: -.04em; margin: 20px 0; text-wrap: balance; }
.tutorial-lead { font-size: 21px; color: var(--muted); max-width: 740px; }
.tutorial-meta { color: var(--muted); font-size: 14px; margin: 24px 0; }
.tutorial-meta time { white-space: nowrap; }
.tutorial-nav { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.tutorial-nav > a:hover { color: var(--ice); }
.tutorial-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.tutorial-toc { position: sticky; top: 100px; border-top: 1px solid var(--line); padding-top: 24px; }
.tutorial-toc ol { list-style: none; padding: 0; margin: 16px 0; }
.tutorial-toc li { margin: 0 0 16px; font-size: 14px; }
.tutorial-toc a { color: var(--muted); }
.tutorial-toc a:hover { color: var(--ice); }
.tutorial-article { min-width: 0; }
.tutorial-article section { scroll-margin-top: 100px; margin-bottom: 64px; }
.tutorial-article h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.3; margin: 0 0 24px; }
.tutorial-article p, .tutorial-article li { color: var(--muted); line-height: 1.85; }
.tutorial-article strong { color: var(--text); font-weight: 600; }
.tutorial-article li { padding-left: 4px; margin-bottom: 12px; }
.tutorial-article ol, .tutorial-article ul { padding-left: 24px; }
.tutorial-article a { color: var(--ice); text-decoration: underline; text-underline-offset: 4px; }
.tutorial-article pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tutorial-article code { font-size: .9em; overflow-wrap: anywhere; }
.tutorial-article kbd { font-family: inherit; font-size: .9em; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; color: var(--text); background: var(--surface); }
.tutorial-article figure { margin: 28px 0; }
.tutorial-article figure a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tutorial-article img { display: block; width: 100%; height: auto; }
.tutorial-article figcaption { color: var(--muted); margin-top: 12px; font-size: 13px; line-height: 1.6; }
.tutorial-source { border-top: 1px solid var(--line); padding-top: 24px; font-size: 13px; }
@media (max-width: 900px) {
  .tutorial-layout { grid-template-columns: 1fr; gap: 24px; }
  .tutorial-toc { position: static; }
  .tutorial-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
}
@media (max-width: 640px) {
  .tutorial-main { padding-top: 36px; }
  .tutorial-intro { margin-bottom: 40px; }
  .tutorial-lead { font-size: 18px; }
  .tutorial-nav { gap: 16px; font-size: 14px; }
  .tutorial-nav .language-options { position: absolute; width: 184px; margin-top: 0; box-shadow: 0 12px 32px var(--shadow); }
  .header-inner:has(.tutorial-nav) { height: auto; min-height: 68px; flex-wrap: wrap; padding-block: 12px; gap: 8px 16px; }
  .header .tutorial-nav { margin-left: auto; }
  .tutorial-toc ol { grid-template-columns: 1fr; }
  .tutorial-article section { margin-bottom: 44px; }
}

/* Tips are page text over unchanged screenshots, readable without JavaScript. */
.shot-stage { position: relative; container-type: inline-size; }
.shot-arrows { position: absolute; inset: 0; width: 100%; height: auto; pointer-events: none; overflow: visible; color: var(--ice); }
.shot-arrows path { fill: none; stroke: currentColor; stroke-width: 3; }
.shot-arrows circle { fill: var(--ice); stroke: var(--bg); stroke-width: 2; }
.shot-arrows text { fill: var(--bg); font-size: 20px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.shot-tip { position: absolute; width: max-content; max-width: 31%; padding: 7px 10px; border-radius: 7px; background: var(--ice); color: var(--bg); pointer-events: none; font-size: 13px; line-height: 1.4; }
.shot-tip b, .shot-tip > span { display: block; position: relative; }
.shot-tip b { margin-bottom: 2px; font-size: 14px; }
.tip-number { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; }
.shot-1 .shot-tip { top: 64%; }
.shot-1 .shot-tip-1 { left: 29%; }
.shot-1 .shot-tip-2 { left: 66%; }
.shot-2 .shot-tip { top: 78%; }
.shot-2 .shot-tip-1 { top: 10%; }
.shot-2 .shot-tip-1, .shot-3 .shot-tip-1 { left: 9%; }
.shot-2 .shot-tip-2, .shot-3 .shot-tip-2 { left: 53%; }
.shot-3 .shot-tip { top: 49%; }
.shot-4 .shot-tip { top: 42%; }
.shot-4 .shot-tip-1 { left: 28%; }
.shot-4 .shot-tip-2 { left: 66%; }
@media (max-width: 640px) {
  /* Scale the complete annotation with the screenshot, including its connectors. */
  .shot-tip { padding: .65cqw .9cqw; border-radius: .7cqw; font-size: 1.8cqw; }
  .shot-tip b { margin-bottom: .2cqw; font-size: 1.9cqw; }
  .tip-number { width: 2.5cqw; height: 2.5cqw; font-size: 1.7cqw; }
}

/* Keep the close button on the image without a separate toolbar. */
html.tutorial-viewer-open { overflow: hidden; }
.tutorial-viewer { position: fixed; inset: 0; width: fit-content; max-width: 94vw; max-height: 90vh; max-height: 90dvh; margin: auto; padding: 0; border: 0; background: var(--bg); color: var(--text); }
.tutorial-viewer:focus { outline: none; }
.tutorial-viewer::backdrop { background: var(--veil); }
.tutorial-viewer img { display: block; max-width: 94vw; max-height: 90vh; max-height: 90dvh; width: auto; height: auto; }
.tutorial-viewer-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--veil); color: var(--text); font: 32px/1 sans-serif; cursor: pointer; }
.tutorial-viewer-close:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; }
