/* The tutorial (tutorial.js): its own screen, apart from the game. A chapter's text beside a working example, the chapters along the bottom. */
body.tutoring .sidenav { display: none; }
body.tutoring main, body.tutoring #sky-canvas { grid-row: main-start / nav-end; grid-column: nav-start / main-end; }

#tutorial { max-width: 1120px; gap: 16px; }
.tut-top { display: flex; align-items: center; gap: 12px; }
.tut-top .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; }
.tut-top small { margin-right: auto; }
.tut-progress { height: 3px; margin-top: -6px; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.tut-progress i { display: block; width: var(--v); height: 100%; background: var(--accent); transition: width .3s; }

.tut-lesson { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; padding: 28px; border: 1px solid #ffffff1a; border-radius: 18px; background: #080a0ee0; box-shadow: 0 18px 50px #0008; }
.tut-lesson.wide { grid-template-columns: minmax(0, 1fr); gap: 18px; }
@container (max-width: 820px) { .tut-lesson { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px; } }
.tut-text { display: grid; gap: 12px; align-content: start; }
.tut-text .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; }
.tut-text h1 { font: 700 clamp(1.7rem, 4.2cqi, 2.5rem)/1.08 var(--display); letter-spacing: .01em; outline: none; }
.tut-text p { max-width: 62ch; color: #c9d0dc; line-height: 1.6; }
.tut-ico { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); color: var(--c, var(--accent)); }
.tut-rows { display: grid; gap: 12px; }
.tut-rows li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; color: #c9d0dc; line-height: 1.5; }
.tut-rows b { color: var(--text); }

/* the example: framed and labelled, so it never reads as the real thing */
.tut-demo { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; padding: 20px 16px 16px; border: 1px dashed #ffffff2e; border-radius: 14px; background: #06080ca6; }
.tut-demo > .btn { justify-self: start; }
.tut-demo::before { content: attr(data-label); position: absolute; top: -10px; left: 14px; padding: 0 8px; border-radius: 4px; background: #080a0e; font: 600 .62rem/20px var(--display); letter-spacing: .2em; text-transform: uppercase; color: #e3b36f; }

.tut-foot { display: flex; align-items: center; gap: 12px; }
.tut-dots { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tut-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: #ffffff2e; cursor: pointer; transition: width .2s, background .2s; }
.tut-dots button:hover { background: #ffffff66; }
.tut-dots button[aria-current] { width: 26px; background: var(--accent); }
@media (max-width: 479px) { .tut-dots { display: none; } .tut-foot { justify-content: space-between; } }

/* the chapters' examples */
.tut-who { display: flex; align-items: center; gap: 14px; }
.tut-who .avatar { width: 64px; height: 64px; font-size: 1.2rem; }
.tut-who span, .tut-power > span:last-child, .tut-later span, .tut-shop span { display: grid; gap: 2px; min-width: 0; }
.tut-who b { font: 700 1.3rem var(--display); }
.tut-power { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; background: var(--panel); }
.tut-power .tut-ico { width: 46px; height: 46px; border-radius: 12px; }
.tut-power .tut-ico .i { width: 24px; height: 24px; }
.tut-power b { font: 700 1.25rem var(--display); }
.tut-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.tut-topbar .avatar { width: 36px; height: 36px; }
.tut-lv { display: grid; flex: 1 1 120px; gap: 4px; min-width: 0; }
.tut-wx { display: grid; gap: 8px; }
.tut-wx .eyebrow, .tut-wx .capital { margin: 0; }
.tut-wx .country-name { font-size: clamp(1.8rem, 6cqi, 3rem); }
.tut-acts .act, .tut-demo > .act { max-width: 260px; }
.act.tut-going { position: relative; overflow: hidden; }
.act.tut-going::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); animation: tut-fill var(--ms, 2s) linear forwards; }
@keyframes tut-fill { from { width: 0; } to { width: 100%; } }
.tut-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tut-stat { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tut-stat b { font: 700 1.6rem/1 var(--display); }
.tut-stat > span { font-size: .78rem; color: var(--muted); }
.tut-stat .btn { justify-self: start; }
.tut-stat.best { border-color: #a2d7cf66; } .tut-stat.best small { color: var(--accent); }
.tut-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.tut-slot { display: grid; gap: 4px; justify-items: start; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.tut-slot b { font-size: .85rem; color: var(--muted); } .tut-slot.on { border-style: solid; background: var(--panel); } .tut-slot.on b { color: var(--text); }
.tut-shop { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tut-dest li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tut-dest .grow { flex: 1; min-width: 0; }
.tut-say { min-height: 3em; color: #c9d0dc; }
.tut-later { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tut-later > div { display: flex; align-items: flex-start; gap: 10px; }
.tut-later small { color: var(--muted); line-height: 1.35; }

/* the practice fight: the battle screen's own parts, with a guiding bar */
.tut-demo .hud { position: static; margin: 0; }
.tut-demo .prompt { gap: 10px; }
.tut-demo .prompt.tut-say-foe { background: var(--panel2); color: var(--muted); }
.tut-demo .prompt.tut-say-won { background: var(--good); color: #052e14; }
.tut-why { color: #c9d0dc; line-height: 1.55; }
.tile.tut-go { border-color: var(--accent); animation: dialpulse .8s ease-in-out infinite alternate; }
.tut-hit .ring { animation: tut-shake .45s ease-out; }
@keyframes tut-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.tut-dmg { position: absolute; top: 18%; left: 50%; z-index: 3; transform: translateX(-50%); font: 800 1.2rem var(--display); color: #fff; text-shadow: 0 2px 6px #000; pointer-events: none; animation: tut-float 1s ease-out forwards; }
@keyframes tut-float { from { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -28px); } }
@media (prefers-reduced-motion: reduce) { .tut-hit .ring, .tut-dmg, .tile.tut-go, .act.tut-going::after { animation: none; } }
