/* The preview floats above its original card without moving the grid. */
.guide-preview {
  position: fixed;
  z-index: 9999;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28), 0 4px 16px rgba(15, 23, 42, .12);
}
.guide-preview[hidden] { display: none; }
.guide-preview-heading {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 500;
}
.guide-preview-indicator { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.guide-preview-dismiss { margin-left: auto; color: #94a3b8; }
.guide-preview-dismiss kbd { margin-left: 8px; padding: 2px 4px; border: 1px solid #475569; border-radius: 4px; font: inherit; }
.guide-preview video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f1f5f9; }
.guide-preview video::cue { background: rgba(15, 23, 42, .9); color: white; font-size: 16px; }
.guide-preview-footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; }
.guide-preview-footer h3 { font-size: 15px; line-height: 20px; font-weight: 650; color: #0f172a; }
.guide-preview-open { flex-shrink: 0; padding: 10px 14px; border-radius: 9px; background: #2563eb; color: white; font-size: 13px; font-weight: 600; }
.guide-preview-open:hover { background: #1d4ed8; }
.guide-preview-open:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.guide-preview-hint { display: none; font-size: 11px; color: #64748b; margin-top: 10px; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { .guide-preview-hint { display: block; } }
@media (prefers-reduced-motion: reduce) { .guide-preview { transition: none !important; transform: none !important; } }

/* Read the contents or jump to one guide without opening its category first. */
.guide-category-card { display: flex; flex-direction: column; align-self: start; border: 1px solid #e2e8f0; border-radius: 16px; background: white; overflow: hidden; }
.guide-category-heading { display: block; padding: 24px 24px 20px; }
.guide-category-heading:hover h3 { color: #1d4ed8; }
.guide-category-heading:focus-visible { outline: 2px solid #2563eb; outline-offset: -3px; border-radius: 16px; }
.guide-category-contents { margin: 0 24px; padding: 18px 0; border-top: 1px solid #f1f5f9; }
.guide-category-label { margin-bottom: 10px; color: #64748b; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.guide-category-titles { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.guide-category-titles li { position: relative; padding-left: 13px; }
.guide-category-titles li::before { content: ''; position: absolute; top: 8px; left: 0; width: 4px; height: 4px; background: #94a3b8; border-radius: 50%; }
.guide-category-titles a { display: block; color: #334155; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.guide-category-titles a:hover { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
.guide-category-titles a:focus-visible, .guide-category-more summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 2px; }
.guide-category-more { margin-top: 14px; }
.guide-category-more summary { cursor: pointer; color: #2563eb; font-size: 12px; line-height: 20px; font-weight: 600; }
.guide-category-more .guide-category-titles { padding-top: 14px; }
.guide-category-collapse, .guide-category-more[open] .guide-category-expand { display: none; }
.guide-category-more[open] .guide-category-collapse { display: inline; }
.guide-category-more[open] .guide-category-titles { animation: guide-contents-reveal 160ms ease-out; }
.guide-category-browse { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding: 14px 24px; border-top: 1px solid #f1f5f9; color: #2563eb; background: #f8fafc; font-size: 13px; font-weight: 600; }
.guide-category-browse:hover { background: #eff6ff; }
.guide-category-browse:focus-visible { outline: 2px solid #2563eb; outline-offset: -3px; }
@keyframes guide-contents-reveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .guide-category-more[open] .guide-category-titles { animation: none; } }
