html { scroll-behavior: smooth; scroll-padding-top: 28px; }

.tutorial-shell { max-width: 1120px; }
.header-cta { padding: 9px 14px; color: #11160d; background: var(--accent); border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 750; }
.header-cta:hover { background: #c7ff7d; }

.tutorial-main { display: block; min-height: auto; padding: 0 0 70px; }
.tutorial-hero { max-width: 760px; padding: 92px 0 78px; }
.tutorial-hero h1 { margin: 21px 0 24px; font-size: clamp(58px, 8vw, 96px); line-height: .95; letter-spacing: -.065em; font-weight: 680; }
.tutorial-hero h1 em { color: var(--accent); font-style: normal; }
.tutorial-hero > p { max-width: 630px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.tutorial-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tutorial-primary, .tutorial-secondary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; border-radius: 11px; text-decoration: none; font-size: 13px; font-weight: 750; transition: 160ms ease; }
.tutorial-primary { color: #11160d; background: var(--accent); }
.tutorial-primary:hover { transform: translateY(-1px); background: #c7ff7d; }
.tutorial-primary span { font-size: 17px; }
.tutorial-secondary { color: #d7dde6; border: 1px solid #374052; }
.tutorial-secondary:hover { color: var(--accent); border-color: #596476; }

.flow-overview, .tutorial-section { margin-bottom: 72px; }
.section-kicker { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.flow-overview > h2, .section-heading > h2 { margin: 10px 0 12px; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.045em; line-height: 1.12; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.overview-card { position: relative; min-height: 245px; padding: 28px; overflow: hidden; background: linear-gradient(155deg, rgba(25,31,43,.94), rgba(13,17,25,.98)); border: 1px solid var(--line); border-radius: 18px; }
.overview-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -65px; bottom: -70px; background: var(--accent); border-radius: 50%; filter: blur(55px); opacity: .06; }
.card-index { position: absolute; right: 24px; top: 22px; color: #4f596a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.overview-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 38px; color: var(--accent); background: rgba(185,255,90,.06); border: 1px solid rgba(185,255,90,.16); border-radius: 12px; }
.overview-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.overview-card h3 { margin: 0 0 10px; font-size: 20px; }
.overview-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.quick-nav { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; gap: 8px; margin-bottom: 88px; padding: 11px; overflow-x: auto; background: rgba(13,17,25,.88); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.quick-nav span { padding: 0 12px; color: #687386; font-size: 11px; white-space: nowrap; }
.quick-nav a { padding: 9px 13px; color: #c5ccd6; border-radius: 8px; text-decoration: none; font-size: 12px; white-space: nowrap; }
.quick-nav a:hover { color: var(--accent); background: rgba(185,255,90,.055); }

.section-heading { max-width: 720px; margin-bottom: 32px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.section-number { color: #626d7e; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.section-heading > p { margin: 0; color: var(--muted); line-height: 1.75; }
.instruction-list { display: grid; gap: 12px; }
.instruction-item { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 22px 24px; background: rgba(17,22,32,.78); border: 1px solid var(--line); border-radius: 15px; }
.instruction-item > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(185,255,90,.23); border-radius: 50%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.instruction-item h3 { margin: 2px 0 8px; font-size: 16px; }
.instruction-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.instruction-item a { color: var(--accent); text-decoration: none; }
.instruction-item .session-direct-link { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 10px; margin-top: 13px; padding: 10px 12px; color: var(--accent); background: rgba(185,255,90,.045); border: 1px dashed rgba(185,255,90,.25); border-radius: 9px; font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.session-direct-link:hover { background: rgba(185,255,90,.08); border-color: rgba(185,255,90,.45); }
.session-direct-link svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.session-layout { display: grid; grid-template-columns: 1.12fr .88fr; gap: 22px; align-items: start; }
.instruction-list.compact .instruction-item { padding: 18px 20px; }
.json-demo { position: sticky; top: 88px; overflow: hidden; background: #090d14; border: 1px solid var(--line); border-radius: 17px; }
.demo-toolbar { height: 46px; display: flex; align-items: center; gap: 7px; padding: 0 16px; background: #131925; border-bottom: 1px solid var(--line-soft); }
.demo-toolbar > span { width: 8px; height: 8px; background: #4b5567; border-radius: 50%; }
.demo-toolbar > span:first-child { background: #ff6b76; }
.demo-toolbar > span:nth-child(2) { background: #ffc65c; }
.demo-toolbar > span:nth-child(3) { background: #5cf2b2; }
.demo-toolbar small { margin-left: auto; color: #6f7989; font-size: 10px; }
.json-demo pre { min-height: 210px; margin: 0; padding: 26px 24px; color: #b9ff5a; white-space: pre-wrap; font: 12px/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; }
.demo-note { display: flex; gap: 11px; margin: 0 18px 18px; padding: 14px; color: #8e98a8; background: rgba(92,242,178,.05); border: 1px solid rgba(92,242,178,.13); border-radius: 11px; }
.demo-note svg { flex: 0 0 auto; width: 19px; height: 19px; fill: none; stroke: var(--success); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.demo-note p { margin: 0; font-size: 11px; line-height: 1.6; }
.demo-note strong { color: #d9e0e8; }

.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.status-grid article { padding: 24px; background: rgba(17,22,32,.7); border: 1px solid var(--line); border-radius: 15px; }
.status-dot { width: 9px; height: 9px; display: block; margin-bottom: 27px; border-radius: 50%; }
.status-dot.waiting { background: var(--warning); box-shadow: 0 0 0 6px rgba(255,198,92,.08); }
.status-dot.running { background: var(--accent); box-shadow: 0 0 0 6px rgba(185,255,90,.08); }
.status-dot.done { background: var(--success); box-shadow: 0 0 0 6px rgba(92,242,178,.08); }
.status-grid h3 { margin: 0 0 9px; font-size: 16px; }
.status-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.safety-section { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 30px; background: linear-gradient(135deg, rgba(19,31,28,.9), rgba(15,21,29,.95)); border: 1px solid rgba(92,242,178,.17); border-radius: 18px; }
.safety-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--success); background: rgba(92,242,178,.07); border-radius: 14px; }
.safety-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.safety-section h2 { margin: 8px 0 10px; font-size: 25px; letter-spacing: -.035em; }
.safety-section p { max-width: 830px; margin: 0; color: #9aa7b2; line-height: 1.75; font-size: 13px; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #e4e9ef; cursor: pointer; list-style: none; font-size: 15px; font-weight: 650; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--accent); font-size: 23px; font-weight: 350; transition: transform 180ms ease; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { max-width: 850px; margin: -5px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.75; }

.tutorial-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 82px; padding: 36px; background: linear-gradient(135deg, rgba(185,255,90,.09), rgba(17,22,32,.95)); border: 1px solid rgba(185,255,90,.18); border-radius: 20px; }
.tutorial-cta h2 { margin: 8px 0; font-size: 28px; letter-spacing: -.04em; }
.tutorial-cta p { margin: 0; color: var(--muted); font-size: 13px; }
.tutorial-cta .tutorial-primary { flex: 0 0 auto; }

@media (max-width: 820px) {
  .tutorial-hero { padding: 70px 0 58px; }
  .overview-grid, .status-grid { grid-template-columns: 1fr; }
  .overview-card { min-height: 210px; }
  .session-layout { grid-template-columns: 1fr; }
  .json-demo { position: static; }
  .quick-nav { margin-bottom: 68px; }
}

@media (max-width: 560px) {
  .tutorial-hero { padding: 52px 0 48px; }
  .tutorial-hero h1 { font-size: 50px; }
  .tutorial-hero > p { font-size: 14px; }
  .tutorial-actions { display: grid; grid-template-columns: 1fr; }
  .flow-overview, .tutorial-section { margin-bottom: 56px; }
  .overview-card { padding: 22px; }
  .quick-nav { top: 6px; margin-left: -4px; margin-right: -4px; }
  .quick-nav span { display: none; }
  .instruction-item { grid-template-columns: 34px 1fr; gap: 12px; padding: 18px 16px; }
  .instruction-item > span { width: 30px; height: 30px; }
  .safety-section { grid-template-columns: 1fr; padding: 24px 20px; }
  .tutorial-cta { align-items: stretch; flex-direction: column; padding: 26px 21px; }
  .tutorial-cta .tutorial-primary { width: 100%; }
  .header-actions .header-link { display: none; }
}
