/* Watch-order guide content — shared by the static /guides/<id>/ pages (with css/styles.css,
   so they look like the app) and the app's own guide screen (#<id>/guide, js/guide.js).
   Uses the app's theme variables from css/styles.css. */

/* The round button next to a collection's name: "?" opens its guide, "<" goes back. */
.guide-nav-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
}
.guide-nav-btn:hover { color: var(--primary-blue); border-color: var(--primary-blue); }
.guide-nav-btn svg { width: 18px; height: 18px; }
.guide-nav-btn .guide-q { font-size: 1rem; font-weight: 700; line-height: 1; }

.guide-meta { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin: -8px 0 22px; }

.guide-body { max-width: 900px; color: var(--text-dark); font-size: 0.95rem; line-height: 1.6; }
.guide-body p { margin: 0 0 12px; }
.guide-body a { color: var(--link-blue); }
/* Each section is a <details>: its heading toggles it open/closed, with a chevron. */
.guide-section > summary {
    display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
    margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color);
    border-radius: 4px; -webkit-tap-highlight-color: transparent;
}
.guide-body > .guide-section:first-child > summary { margin-top: 0; }
.guide-section > summary::-webkit-details-marker { display: none; }
.guide-section > summary::after {
    content: ''; flex-shrink: 0; width: 8px; height: 8px; margin: 0 6px 4px 0;
    border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg); transition: transform 0.15s;
}
.guide-section:not([open]) > summary::after { transform: rotate(-45deg); margin-bottom: 0; }
.guide-section > summary:hover::after { border-color: var(--primary-blue); }
.guide-section > summary:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 3px; }
.guide-body h2 { flex: 1; font-size: 1.1rem; font-weight: 600; margin: 0; }
.guide-body h3 {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-muted); margin: 22px 0 8px;
}
.guide-body ul:not(.rail):not(.guide-facts) { padding-left: 20px; margin: 0 0 12px; }
.guide-body ul:not(.rail):not(.guide-facts) li + li { margin-top: 6px; }
.guide-body dt { font-weight: 600; margin-top: 14px; }
.guide-body dd { margin: 4px 0 0; color: var(--text-dark); }

.guide-quick {
    background: var(--bg-white); border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-blue); border-radius: 10px; padding: 12px 16px; margin: 16px 0;
}
.guide-quick p { margin: 0; }
.guide-facts { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.guide-facts li {
    background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 999px;
    padding: 4px 12px; font-size: 0.8rem; color: var(--text-muted);
}
.guide-cta {
    display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--primary-blue);
    color: #fff !important; text-decoration: none; font-weight: 600; font-size: 0.9rem;
}

/* Title lists styled like the app's timeline: year rail, line and dots, title + sub-line. */
.rail { list-style: none; padding: 0; margin: 8px 0 4px; }
.rail li {
    display: grid; grid-template-columns: 72px 16px 1fr; column-gap: 12px;
    position: relative; padding: 7px 0;
}
.rail li::before {
    content: ''; position: absolute; left: 91px; top: 0; bottom: 0; width: 2px;
    background: var(--text-dark); opacity: 0.85;
}
.rail li:first-child::before { top: 16px; }
.rail li:last-child::before { bottom: calc(100% - 16px); }
.rail li:only-child::before { display: none; }
.rail-year { text-align: right; font-size: 0.78rem; color: var(--text-muted); padding-top: 3px; line-height: 1.3; }
.rail-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--text-dark);
    margin: 6px auto 0; position: relative; z-index: 1;
}
.rail-title strong { display: block; font-weight: 600; line-height: 1.35; }
.rail-sub { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; }
.rail.no-years li { grid-template-columns: 16px 1fr; }
.rail.no-years li::before { left: 7px; }
.rail.no-years .rail-year { display: none; }

/* Static guide pages: the page around the content. */
.guide-page .brand { color: #fff; text-decoration: none; }
.guide-page-main { max-width: 900px; margin: 0 auto; padding: 24px 32px 40px; }

/* The app's guide screen. */
#guideView { max-width: 900px; }
#guideView.hidden-view { display: none; }
/* In the app, the parts meant for visitors from search engines are left out. */
#guideView .web-only { display: none; }

@media (max-width: 480px) {
    .rail li { grid-template-columns: 50px 16px 1fr; column-gap: 8px; }
    .rail li::before { left: 65px; }
    .rail-year { font-size: 0.7rem; }
    .guide-page-main { padding: 18px 16px 32px; }
}
