.tut-panel { flex: none; width: 320px; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-inline-start: 1px solid var(--border); }
.tut-panel[hidden] { display: none; }
.tut-panel[data-state=collapsed] { width: 36px; }
.tut-edge { display: flex; align-items: center; gap: 6px; writing-mode: vertical-rl; width: 100%; height: 100%; padding: 12px 0; border: 0; background: var(--surface-2); color: var(--text-2); font: 600 var(--fs-xs)/1 var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; }
.tut-edge:hover { background: var(--hover-bg); color: var(--text); }
.tut-edge svg { transform: rotate(180deg); }
.tut-head { display: flex; align-items: flex-start; gap: 2px; padding-block: 10px 8px; padding-inline: 14px 8px; border-bottom: 1px solid var(--border); flex: none; }
.tut-titles { flex: 1; min-width: 0; }
.tut-kicker { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.tut-title { margin: 2px 0 0; font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.tut-progress { height: 4px; background: var(--surface-3); flex: none; }
.tut-progress > span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.tut-finished { margin: 10px 14px 0; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--ok-bg); color: var(--text); font-size: var(--fs-sm); }
.tut-steps { list-style: none; margin: 0; padding: 6px 8px; overflow: auto; flex: 1; min-height: 0; }
.tut-step { border-radius: var(--r-ctl); margin: 2px 0; }
.tut-step.current { background: var(--surface-2); }
.tut-step-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 6px; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: start; cursor: pointer; border-radius: var(--r-ctl); }
.tut-step-head:hover { background: var(--hover-bg); }
.tut-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.tut-step.done .tut-mark { background: var(--ok); border-color: var(--ok); color: var(--on-status); }
.tut-step.current .tut-mark { border-color: var(--sel-edge); color: var(--text); }
.tut-step.done .tut-step-title { color: var(--text-2); }
.tut-step.current .tut-step-title { font-weight: 600; }
.tut-step-body { padding-block: 0 10px; padding-inline: 38px 8px; font-size: var(--fs-sm); color: var(--text); }
.tut-step-body p { margin: 4px 0 8px; line-height: 1.45; }
.tut-step-body code { font-size: .92em; background: var(--surface-3); padding: 0 3px; border-radius: 3px; overflow-wrap: anywhere; }
.tut-step-body kbd { font: 600 var(--fs-xs)/1 var(--font); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 4px; background: var(--surface); }
.tut-list { margin: 0 0 8px; padding-inline-start: 16px; }
.tut-list li { margin: 3px 0; }
.tut-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tut-note { margin: 0 0 8px; }
.tut-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); flex: none; }
.tut-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tut-spot { position: fixed; z-index: 900; pointer-events: none; border: 3px solid var(--sel-edge); border-radius: 8px; box-shadow: 0 0 0 4px var(--sel-bg); animation: tut-pulse 1.2s ease-in-out 3; }
@keyframes tut-pulse { 50% { box-shadow: 0 0 0 9px var(--sel-bg); } }
@media (prefers-reduced-motion: reduce) { .tut-spot { animation: none; } .tut-progress > span { transition: none; } }
:root[data-focus="1"] .tut-panel { display: none !important; }
@media (max-width: 900px) { .tut-panel[data-state=open] { width: 280px; } }
@media print { .tut-panel, .tut-spot { display: none !important; } }
:root[data-tutorial=open]:not([data-focus="1"]) #toasts { inset-inline-end: calc(320px + 18px); }
@media (max-width: 900px) { :root[data-tutorial=open]:not([data-focus="1"]) #toasts { inset-inline-end: calc(280px + 18px); } }
.tut-page { max-width: 980px; }
.tut-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tut-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tut-card h3, .tut-card .tut-card-title { margin: 0; font-size: var(--fs-lg); }
.tut-card p { margin: 0; color: var(--text-2); }
.tut-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.tut-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.tut-pill.started { background: var(--info-bg); color: var(--info); }
.tut-pill.done { background: var(--ok-bg); color: var(--ok); }
.projects-table .tut-pill { margin-inline-start: 6px; font-size: var(--fs-xs); }

.tut-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #24335f; cursor: pointer; }
.tut-video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tut-video-play { position: absolute; inset-inline-start: 50%; top: 50%; width: 56px; height: 40px; margin-block: -20px 0; margin-inline: -28px 0; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 18px; transition: background .15s; }
.tut-video:hover .tut-video-play, .tut-video:focus-visible .tut-video-play { background: #f2a93b; color: #16213a; }
.tut-video:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tut-video.vid-soon { cursor: default; }
.vid-soon img { opacity: .55; }
.vid-soon-tag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tut-video-modal { display: flex; flex-direction: column; gap: 8px; }
.tut-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.modal.wide:has(.tut-video-modal) { width: min(1280px, calc(100vw - 32px), calc((84vh - 220px) * 16 / 9 + 32px)); max-width: none; }
.tut-video-frame iframe, .tut-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 10px 0 18px; }
.vid-item { display: flex; flex-direction: column; gap: 4px; }
.vid-item strong { margin-top: 4px; }
.help-tour-row { margin: 6px 0 10px; }
.help-watch { display: flex; flex-wrap: wrap; gap: 6px; }
.home-tour { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--accent-2); }
.home-tour .grow { flex: 1; }
.vid-jump { position: sticky; top: 0; z-index: 3; background: var(--bg); margin: 10px -4px 6px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.vid-jump-row { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.vid-jump-row + .vid-jump-row { margin-top: 6px; }
.vid-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap; }
.vid-chip.sub { padding: 2px 9px; font-size: var(--fs-xs); font-weight: 500; border-color: var(--line); }
.vid-chip:hover { border-color: var(--accent); }
.vid-chip[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.vid-chip[aria-current] .vid-count { background: var(--surface); color: var(--accent); }
.vid-count { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--accent-2); color: var(--text); font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; text-align: center; vertical-align: middle; }
.vid-sec { display: flow-root; scroll-margin-top: 8px; }
.vid-sec:focus, .vid-area:focus { outline: none; }
.vid-sec-head { margin: 26px 0 12px; padding: 12px 16px; border-inline-start: 4px solid var(--accent); border-start-start-radius: 0; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); border-end-start-radius: 0; background: var(--panel-2); }
.help-article .vid-sec-head h2 { margin: 0; padding: 0; border: 0; font-size: var(--fs-2xl, 22px); font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 10px; }
.vid-sec-head h2 .vid-count { font-size: var(--fs-sm); }
.vid-sec-head p { margin: 4px 0 0; color: var(--text-2); }
.help-article h3.vid-area { margin: 22px 0 4px; padding-bottom: 3px; border-bottom: 1px solid var(--line); font-size: var(--fs-lg, 16px); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.vid-top { margin: 4px 0 0; text-align: end; }
.vid-top-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.vid-top-btn:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .vid-jump-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .vid-sec-head { padding: 10px 12px; }
}
