/* Guides (/guides/*) and the free 3D preview tool (/tools/photo-to-3d/).
   Builds on /style.css (tokens, header, footer, .doc, tables) and /shopify/shopify.css (gradient, buttons,
   .p3d-tile, .faq, .contact). Light and dark follow prefers-color-scheme. */

.guide-hero { padding: 3rem 0 0.5rem; }
.guide-hero .eyebrow { color: var(--accent); }
.guide-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.6rem); line-height: 1.15; margin: 0 0 0.85rem; max-width: 24ch; }
.guide-hero .lead { font-size: 1.12rem; color: var(--text-muted); margin: 0 0 1rem; max-width: 44rem; }
.crumbs { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--border); }
.crumbs a { color: var(--text-muted); }

.guide { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1rem 3.5rem; }
.guide .doc { max-width: var(--readw); margin: 0; padding: 0; }
.guide .doc h2 { scroll-margin-top: 1rem; }
.guide .doc ol, .guide .doc ul { padding-left: 1.3rem; }
.guide .doc .table-wrap { max-width: none; margin: 1rem 0 1.5rem; }
.guide .doc table { font-size: 0.92rem; }
.guide .doc td, .guide .doc th { vertical-align: top; }
.guide .updated { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1.25rem; }
.guide .src { color: var(--text-muted); font-size: 0.88rem; }
.tag-est { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.tag-meas { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }

/* Demo model inside a guide */
.demo-3d { margin: 1.75rem 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.demo-3d .p3d-stage { aspect-ratio: auto; height: 320px; }
.demo-3d .p3d-stage > img { object-fit: contain; background: #fff; }
.demo-3d .p3d-stage.model { background: radial-gradient(circle at 50% 40%, #ffffff 0%, #eceef2 100%); }
.demo-3d .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #5e6c84; font-size: 0.9rem; pointer-events: none; }
.demo-3d .is-loaded .ph { display: none; }
.demo-3d figcaption a { color: var(--accent); }
.ar-btn {
  position: absolute; right: 0.75rem; bottom: 0.75rem; border: 0; border-radius: 999px; padding: 0.55rem 0.95rem;
  background: var(--accent); color: var(--accent-contrast); font: 600 0.86rem/1.2 inherit; cursor: pointer;
}

/* Call to action box */
.cta-box { margin: 2.25rem 0; padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--bg-soft); display: grid; gap: 0.75rem; }
.cta-box h2, .cta-box h3 { margin: 0 !important; padding: 0 !important; border: 0 !important; font-size: 1.25rem; }
.cta-box p { margin: 0; color: var(--text-muted); }
.cta-box .actions { margin-top: 0.25rem; }
.soon { color: var(--text-muted); font-size: 0.9rem; }

/* Related guides */
.related { margin: 2.5rem 0 0; }
.related h2 { font-size: 1.2rem !important; }
.related ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0.6rem; }
.related a { display: block; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; }
.related a span { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.9rem; }
.related a:hover { border-color: var(--accent); }

/* Guides index */
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.guide-list a { display: flex; flex-direction: column; gap: 0.4rem; height: 100%; padding: 1.25rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; }
.guide-list a:hover { border-color: var(--accent); }
.guide-list strong { font-size: 1.1rem; line-height: 1.3; }
.guide-list span { color: var(--text-muted); font-size: 0.95rem; }
.guide-list .kicker { margin: 0; }

@media (max-width: 56rem) {
  .demo-3d { grid-template-columns: minmax(0, 1fr); }
  .demo-3d .p3d-stage { height: 280px; }
}
@media (max-width: 40rem) {
  .guide-hero { padding-top: 2rem; }
  .site-nav ul { gap: 0.25rem 0.8rem; }
}

/* Screenshots in the theme compatibility guide */
.theme-shots { display: grid; gap: 1.25rem; margin: 1.5rem 0; }
.theme-shots figure { margin: 0; }
.theme-shots img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; }
.theme-shots figcaption { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.4rem; }
