/* The tutorial video: click-to-play embed, chapter list, pop-up, and the Home card (src/tutorial.ts, public/js/tutorial.js). Classes start with tut-. */
.tut { display: grid; gap: 12px; max-width: 860px; }
.tut-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--ink, #2a1d16); box-shadow: 0 10px 30px rgba(42, 29, 22, .18); }
.tut-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.tut-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--ink, #2a1d16); cursor: pointer; display: block; }
.tut-play img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .82; transition: opacity .15s; }
.tut-play:hover img, .tut-play:focus-visible img { opacity: 1; }
.tut-play:focus-visible { outline: 3px solid var(--tomato, #b4441f); outline-offset: -3px; }
.tut-btn { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--tomato, #b4441f); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); padding-left: 4px; }
.tut-len { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .72); color: #fff; font: 500 13px/1 var(--mono, monospace); padding: 5px 8px; border-radius: 6px; }
.tut-chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.tut-chapters a { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; color: var(--body, #3b2a20); text-decoration: none; font-size: 15px; }
.tut-chapters a:hover { color: var(--tomato, #b4441f); text-decoration: underline; }
.tut-t { font: 500 12.5px/1 var(--mono, monospace); color: var(--muted, #7a6a5c); min-width: 38px; }
/* The small link under "Try it free" */
.tut-link { display: inline-flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 600; color: var(--tomato, #b4441f); text-decoration: none; }
.tut-link:hover { text-decoration: underline; }
.tut-ic { font-size: 11px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-grid; place-items: center; padding-left: 1px; }
.tut-line { margin: 4px 0 0; }
/* The pop-up */
.tut-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(30, 20, 14, .7); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.tut-modal-box { background: var(--paper, #f6eedb); border-radius: 18px; width: min(920px, 100%); padding: 14px 16px 16px; display: grid; gap: 12px; max-height: 100%; overflow-y: auto; }
.tut-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tut-modal-head h2 { margin: 0; font-size: clamp(18px, 3vw, 24px); }
.tut-x { appearance: none; border: 0; background: transparent; color: var(--ink, #2a1d16); font-size: 30px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex: none; }
.tut-x:hover { background: rgba(42, 29, 22, .08); }
.tut-x:focus-visible, .tut-modal a:focus-visible { outline: 3px solid var(--tomato, #b4441f); outline-offset: 2px; }
body.tut-lock { overflow: hidden; }
/* The Home card */
.tut-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; background: var(--card, #fffaf0); border: 1px solid var(--line, #e6d9bd); border-left: 5px solid var(--tomato, #b4441f); border-radius: 12px; padding: 10px 6px 10px 16px; margin: 0 0 14px; }
.tut-card-main { display: grid; gap: 4px; min-width: 0; }
.tut-card-h { font-size: 16px; }
.tut-card-h a, .tut-jump a { color: var(--tomato, #b4441f); }
.tut-len-note { font-size: 12.5px; font-weight: 500; color: var(--muted, #6b5a4e); white-space: nowrap; }
.tut-jump { margin: 0; font-size: 14.5px; color: var(--body, #3b2a20); }
.tut-card-x { width: 40px; height: 40px; font-size: 26px; margin-top: -4px; }
@media (max-width: 640px) {
  .tut-btn { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .tut-chapters { grid-template-columns: 1fr 1fr; }
  .tut-chapters a { font-size: 14px; }
  .tut-modal { padding: 8px; align-items: start; }
}
.tut-modal > .tut { width: min(920px, 100%); max-width: none; display: block; }
