/* ================================================================ qy-guides-1 (2026-09-30): /guides and /guides/{slug}.
   Step-by-step guides built from the channel's tutorials. Loaded after qy-models/models-1.css and built on its #qmd
   tokens (studio black, lime accent, Space Grotesk for display). Everything here is .qgd-*, scoped to #qmd. The video
   poster is ours: the site's CSP allows the www.youtube.com player but not YouTube's thumbnails. */

/* ---------------------------------------------------------------- the hero: the promise and the tutorial */
#qmd .qgd-hero { align-items: start; }
#qmd .qgd-updated { margin-top: 18px; color: var(--md-faint); font-size: 13px; }
#qmd .qgd-video-wrap { position: relative; padding-top: 34px; }
#qmd .qgd-video {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--md-line-2); border-radius: 22px;
  background: #000; box-shadow: 0 30px 80px -40px rgba(209, 254, 23, .35), 0 20px 50px -30px rgba(0, 0, 0, .9);
}
#qmd .qgd-video-btn {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
  color: inherit; cursor: pointer;
}
#qmd .qgd-video-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; }
#qmd .qgd-video-btn::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .45) 100%);
}
#qmd .qgd-video-btn:hover img { transform: scale(1.02); filter: brightness(1.08); }
#qmd .qgd-play {
  position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 84px; height: 84px;
  margin: -42px 0 0 -42px; border-radius: 50%; background: var(--md-lime); color: var(--md-ink);
  box-shadow: 0 0 0 10px rgba(209, 254, 23, .18), 0 18px 40px -10px rgba(0, 0, 0, .8); transition: transform .2s ease;
}
#qmd .qgd-play svg { width: 34px; height: 34px; margin-left: 5px; }
#qmd .qgd-video-btn:hover .qgd-play { transform: scale(1.07); }
#qmd .qgd-dur {
  position: absolute; z-index: 1; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .78); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
#qmd .qgd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#qmd .qgd-video-cap { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--md-faint); font-size: 13px; }
#qmd .qgd-video-cap svg { width: 14px; height: 14px; color: var(--md-lime); }
#qmd .qgd-video-cap b { color: var(--md-dim); font-weight: 600; }
#qmd .qgd-video-note { margin-top: 6px; color: var(--md-faint); font-size: 12px; }

/* ---------------------------------------------------------------- the short version */
#qmd .qgd-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 56px; }
#qmd .qgd-fact { padding: 20px 22px; border: 1px solid var(--md-line); border-radius: 18px; background: var(--md-card); }
#qmd .qgd-fact h2 {
  color: var(--md-lime); font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase;
}
#qmd .qgd-fact p { margin-top: 10px; color: var(--md-dim); font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------- the steps, with the page's contents beside them */
#qmd .qgd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; margin-top: 64px; }
#qmd .qgd-article { max-width: 780px; }
#qmd .qgd-step { position: relative; padding: 0 0 48px 64px; }
#qmd .qgd-step + .qgd-step { padding-top: 48px; border-top: 1px solid var(--md-line); }
#qmd .qgd-n {
  position: absolute; left: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--md-lime-soft); border: 1px solid rgba(209, 254, 23, .35); color: var(--md-lime);
  font-family: var(--md-display); font-size: 18px; font-weight: 700;
}
#qmd .qgd-step + .qgd-step .qgd-n { top: 48px; }
#qmd .qgd-step h2, #qmd .qgd-more h2 {
  color: #fff; font-family: var(--md-display); font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em; text-wrap: balance;
}
#qmd .qgd-step h2 { padding-top: 6px; }
#qmd .qgd-step p, #qmd .qgd-more p { margin-top: 16px; color: var(--md-dim); font-size: 16px; line-height: 1.7; }
#qmd .qgd-step p b, #qmd .qgd-more p b, #qmd .qgd-list b { color: #fff; font-weight: 600; }
#qmd .qgd-step p a, #qmd .qgd-more p a, #qmd .qgd-list a { color: var(--md-lime); text-decoration: underline; text-underline-offset: 3px; }
#qmd .qgd-list { display: grid; gap: 12px; margin-top: 18px; }
#qmd .qgd-list li { display: flex; gap: 12px; color: var(--md-dim); font-size: 16px; line-height: 1.6; }
#qmd .qgd-list li svg { width: 18px; height: 18px; margin-top: 4px; color: var(--md-lime); }
#qmd .qgd-tip {
  padding: 16px 18px; border: 1px solid rgba(209, 254, 23, .3); border-radius: 14px; background: var(--md-lime-soft);
  color: var(--md-text) !important;
}
#qmd .qgd-shot {
  overflow: hidden; margin-top: 24px; border: 1px solid var(--md-line-2); border-radius: 16px; background: var(--md-card-2);
}
#qmd .qgd-shot img { width: 100%; height: auto; }
#qmd .qgd-shot.is-tall { max-width: 300px; }
#qmd .qgd-table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--md-line); border-radius: 14px; background: var(--md-card); }
#qmd .qgd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
#qmd .qgd-table th, #qmd .qgd-table td { padding: 12px 16px; border-bottom: 1px solid var(--md-line); text-align: left; vertical-align: top; }
#qmd .qgd-table thead th, #qmd .qgd-table tbody th { white-space: nowrap; }
#qmd .qgd-table tbody tr:last-child th, #qmd .qgd-table tbody tr:last-child td { border-bottom: 0; }
#qmd .qgd-table thead th { color: var(--md-faint); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
#qmd .qgd-table tbody th { color: #fff; font-weight: 600; }
#qmd .qgd-table td { color: var(--md-dim); }
#qmd .qgd-table a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(209, 254, 23, .5); text-underline-offset: 3px; }
#qmd .qgd-table a:hover { color: var(--md-lime); }
#qmd .qgd-table td b { color: #fff; }
#qmd .qgd-table small { display: block; color: var(--md-faint); font-size: 12px; }

#qmd .qgd-more { padding: 44px 0 8px; border-top: 1px solid var(--md-line); }
#qmd .qgd-more h2 { margin-top: 12px; }

#qmd .qgd-training {
  display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 20px 22px; border: 1px solid var(--md-line-2);
  border-radius: 18px; background: var(--md-card); transition: border-color .2s ease, background .2s ease;
}
#qmd .qgd-training:hover { border-color: rgba(209, 254, 23, .55); background: var(--md-lime-soft); }
#qmd .qgd-training-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--md-lime-soft); color: var(--md-lime); }
#qmd .qgd-training-ic svg { width: 22px; height: 22px; }
#qmd .qgd-training > span:nth-child(2) { flex: 1; }
#qmd .qgd-training b { display: block; color: #fff; font-size: 16px; }
#qmd .qgd-training small { display: block; margin-top: 2px; color: var(--md-faint); font-size: 13px; }
#qmd .qgd-training > svg { width: 20px; height: 20px; color: var(--md-lime); }

#qmd .qgd-aside { position: sticky; top: 96px; }
#qmd .qgd-side { padding: 20px; border: 1px solid var(--md-line); border-radius: 18px; background: var(--md-card); }
#qmd .qgd-side-h { color: var(--md-faint); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
#qmd .qgd-toc { display: grid; gap: 2px; margin-top: 12px; }
#qmd .qgd-toc a {
  display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--md-dim); font-size: 14px; line-height: 1.35;
}
#qmd .qgd-toc a:hover { background: rgba(255, 255, 255, .04); color: #fff; }
#qmd .qgd-toc a span { flex: 0 0 18px; color: var(--md-lime); font-weight: 700; text-align: center; }
#qmd .qgd-side-btn { width: 100%; margin-top: 16px; }

/* ---------------------------------------------------------------- guide cards (/guides and "More guides") */
#qmd .qgd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#qmd .qgd-card {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--md-line); border-radius: 20px;
  background: var(--md-card); transition: transform .2s ease, border-color .2s ease;
}
#qmd .qgd-card:hover { transform: translateY(-2px); border-color: rgba(209, 254, 23, .45); }
#qmd .qgd-card-pic { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
#qmd .qgd-card-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#qmd .qgd-card-dur {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, .78);
  color: #fff; font-size: 12px; font-weight: 700;
}
#qmd .qgd-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
#qmd .qgd-card-kind { color: var(--md-faint); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
#qmd .qgd-card-name { color: #fff; font-family: var(--md-display); font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
#qmd .qgd-card-line { color: var(--md-dim); font-size: 14px; line-height: 1.5; }
#qmd .qgd-card-go { margin-top: auto; padding-top: 10px; color: var(--md-lime); font-size: 14px; font-weight: 700; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1024px) {
  #qmd .qgd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #qmd .qgd-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #qmd .qgd-aside { display: none; }
  #qmd .qgd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #qmd .qgd-video-wrap { padding-top: 0; }
}
@media (max-width: 560px) {
  #qmd .qgd-facts { grid-template-columns: 1fr; margin-top: 40px; }
  #qmd .qgd-layout { margin-top: 48px; }
  #qmd .qgd-step { padding-left: 0; }
  #qmd .qgd-n { position: static; width: 36px; height: 36px; margin-bottom: 14px; font-size: 16px; }
  #qmd .qgd-step + .qgd-step .qgd-n { top: auto; }
  #qmd .qgd-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  #qmd .qgd-play svg { width: 28px; height: 28px; }
  #qmd .qgd-cards { grid-template-columns: 1fr; }
  #qmd .qgd-training { align-items: flex-start; }
  /* the table fits a phone instead of scrolling sideways */
  #qmd .qgd-table { font-size: 13px; }
  #qmd .qgd-table th, #qmd .qgd-table td { padding: 10px 8px; }
  #qmd .qgd-table thead th, #qmd .qgd-table tbody th { white-space: normal; }
  #qmd .qgd-table thead th { font-size: 10px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  #qmd .qgd-video-btn img, #qmd .qgd-play, #qmd .qgd-card { transition: none; }
}
