/* Guides pages (/guides) and the guide editor preview. Builds on styles.css tokens. */

.gd-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }
.gd-main { min-height: 60vh; padding-bottom: 4rem; }
.gd-skip { position: absolute; left: 1rem; top: -100px; z-index: 300; background: var(--mint); color: var(--on-accent); padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-weight: 700; }
.gd-skip:focus { top: 0.75rem; }
.gd-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.75rem; }
.gd-lede { font-size: clamp(1.05rem, 2.6vw, 1.2rem); line-height: 1.6; color: var(--ink-soft); max-width: 40rem; margin-top: 0.9rem; }

/* Nav and brand mark */
.gd-nav .inner { max-width: 1120px; min-height: 48px; }
.gd-nav .navbar-actions { gap: 0.4rem; }
.gd-nav-link { color: var(--ink-soft); font-weight: 600; min-height: 44px; }
.gd-nav-link[aria-current="page"] { color: var(--ink); }
.gd-nav .btn-primary { min-height: 44px; }
@media (max-width: 459px) { .gd-nav .btn-primary { padding-left: 0.8rem; padding-right: 0.8rem; } .gd-nav-link { display: none; } }
.gd-brand { display: inline-flex; align-items: center; min-height: 44px; border-radius: 8px; }
.gd-mark { position: relative; display: block; width: 120px; aspect-ratio: 1820 / 296; }
@media (max-width: 420px) { .gd-mark { width: 100px; } }
.gd-mark-letters { position: absolute; inset: 0; background: var(--ink);
  -webkit-mask: url('/gallery/brand/mask-letters.svg') center / contain no-repeat;
          mask: url('/gallery/brand/mask-letters.svg') center / contain no-repeat; }
.gd-mark-bars { position: absolute; inset: 0; width: 100%; height: 100%; }
.gd-mark-bars polygon { fill: var(--accent-text); }

/* Pro label (also produced by {{pro}} in Markdown) */
.md-pro { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: 100px; font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 0.15em; background: rgba(245,200,66,0.14); color: var(--gold); border: 1px solid rgba(245,200,66,0.4); line-height: 1.5; }
.md-pro-lg { font-size: 0.85rem; vertical-align: 0.5em; }
body.light-mode .md-pro { background: #fff6dc; border-color: rgba(138,97,0,0.35); }

/* Index */
.gd-head { padding: clamp(2.25rem, 7vw, 4.5rem) 0 2rem; }
.gd-head h1 { font-size: clamp(3rem, 11vw, 5.5rem); line-height: 0.9; }
.gd-start { margin-bottom: 2.5rem; }
.gd-feature, .gd-card { display: flex; flex-direction: column; gap: 0.45rem; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--cream-darker); transition: border-color 0.2s ease, transform 0.2s ease; }
.gd-feature:hover, .gd-card:hover { border-color: var(--mint-ring); }
.gd-feature { padding: clamp(1.4rem, 4vw, 2.2rem); background: linear-gradient(135deg, var(--mint-tint), transparent 60%), var(--white); }
.gd-feature-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 0.95; color: var(--ink); letter-spacing: 0.02em; }
.gd-card { padding: 1.25rem 1.3rem 1.2rem; }
.gd-card-top { display: flex; align-items: center; gap: 0.5rem; }
.gd-card-top:empty { display: none; }
.gd-cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.gd-card-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.65rem; line-height: 1; color: var(--ink); letter-spacing: 0.02em; }
.gd-card-sum { color: var(--ink-soft); line-height: 1.5; font-size: 0.95rem; }
.gd-card-more { margin-top: auto; padding-top: 0.5rem; font-size: 0.88rem; font-weight: 650; color: var(--ink); }
.gd-card-more::after { content: ' \2192'; color: var(--accent-text); }
.gd-group { margin-top: 2.5rem; }
.gd-group-title { font-size: clamp(1.6rem, 4vw, 2rem); margin-bottom: 1rem; }
.gd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { .gd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .gd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gd-empty { color: var(--ink-soft); padding: 2rem 0; }
body.light-mode .gd-card, body.light-mode .gd-feature, body.light-mode .gd-cta { box-shadow: var(--shadow); }

/* Call to action */
.gd-cta { margin-top: 4rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--cream-darker); }
.gd-cta h2 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 0.95; }
.gd-cta p:not(.gd-kicker) { margin-top: 0.6rem; max-width: 34rem; line-height: 1.55; }

/* Article */
.gd-article-wrap { max-width: 760px; }
.gd-banner { margin-top: 1.5rem; }
.gd-banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.gd-welcome { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.5rem; padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--mint-tint); border: 1px solid var(--mint-ring); color: var(--ink); line-height: 1.5; }
.gd-crumbs { display: flex; gap: 0.5rem; align-items: center; padding-top: clamp(1.75rem, 5vw, 3rem); font-size: 0.9rem; color: var(--ink-muted); }
.gd-crumbs a { color: var(--accent-text); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.gd-article header h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); line-height: 0.92; margin-top: 0.25rem; }
.gd-meta { margin-top: 1rem; font-size: 0.85rem; color: var(--ink-muted); }
.gd-cover { margin-top: 1.75rem; }
.gd-next { margin-top: 2.5rem; }
.gd-more { margin-top: 3.5rem; }
.gd-article-wrap .gd-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .gd-article-wrap .gd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Article body (Markdown output). Also used by the editor preview. */
.gd-body { margin-top: 2rem; font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); }
.gd-body > * + * { margin-top: 1.1rem; }
.gd-body h2 { font-size: clamp(1.8rem, 5vw, 2.3rem); line-height: 1; margin-top: 2.6rem; color: var(--ink); scroll-margin-top: 80px; }
.gd-body h3 { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: 0; line-height: 1.35; margin-top: 2rem; color: var(--ink); scroll-margin-top: 80px; }
.gd-body p { color: var(--ink-soft); }
.gd-body strong { color: var(--ink); font-weight: 650; }
.gd-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mint-ring); text-underline-offset: 3px; font-weight: 600; }
.gd-body a:hover { text-decoration-color: var(--accent-text); }
.gd-body ul, .gd-body ol { padding-left: 1.4rem; }
.gd-body li + li { margin-top: 0.45rem; }
.gd-body li::marker { color: var(--accent-text); }
.gd-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; padding: 0.1em 0.4em; border-radius: 6px; background: var(--raised); color: var(--ink); }
.gd-body pre.md-code { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--cream-dark); border: 1px solid var(--cream-darker); overflow-x: auto; }
.gd-body pre.md-code code { padding: 0; background: none; font-size: 0.9rem; line-height: 1.55; }
.gd-body blockquote { padding: 0.25rem 0 0.25rem 1.1rem; border-left: 3px solid var(--cream-darker); }
.gd-body hr { border: 0; border-top: 1px solid var(--cream-darker); margin: 2.25rem 0; }
.md-figure { margin: 1.75rem 0; }
.md-figure img { display: block; width: auto; max-width: 100%; max-height: 760px; margin: 0 auto; height: auto; border-radius: var(--radius); border: 1px solid var(--cream-darker); background: var(--cream-dark); }
.md-figure figcaption { margin-top: 0.6rem; font-size: 0.88rem; color: var(--ink-muted); line-height: 1.5; }
.md-callout { padding: 1rem 1.15rem; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--cream-darker); border-left: 4px solid var(--accent-text); }
.md-callout > * + * { margin-top: 0.6rem; }
.md-callout-label { font-size: 0.75rem !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text) !important; }
.md-callout-pro { border-color: rgba(245,200,66,0.4); border-left-color: var(--gold); background: rgba(245,200,66,0.08); }
.md-callout-pro .md-callout-label { color: var(--gold) !important; }
.md-callout-note { border-left-color: var(--purple); }
.md-callout-note .md-callout-label { color: #b9a2ff !important; }
body.light-mode .md-callout-note .md-callout-label { color: #5b21b6 !important; }

/* Footer */
.gd-foot { border-top: 1px solid var(--cream-darker); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); position: relative; z-index: 1; }
.gd-foot-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.gd-foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.gd-foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); font-size: 0.95rem; }
.gd-foot-links a:hover { color: var(--ink); }
.gd-legal { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-muted); }
