/* ==========================================================================
   Shared styles for the Guides section.
   Matches index.html brand (fig / berry / rose, Inter + Playfair Display).
   Used by guides.html (index) and every guides/<slug>.html page.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fig:        #4B1528;
  --berry:      #993556;
  --dusty-rose: #ED93B1;
  --blush:      #FDF5F8;
  --light-rose: #F4C0D1;
  --fig-mid:    #72243E;
  --deep-text:  #2C0F1A;
  --max: 1100px;
  --read: 720px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--blush); color: var(--deep-text); font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* NAV (matches index.html) */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253,245,248,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-rose);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 2rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--deep-text); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.875rem; color: var(--fig-mid); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--berry); }
.nav-links a.active { color: var(--berry); }

.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--berry); margin-bottom: 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem;
}

/* ==========================================================================
   GUIDES INDEX (guides.html)
   ========================================================================== */
.guides-hero { background: var(--fig); padding: 140px 2rem 80px; }
.guides-hero .inner { max-width: var(--max); margin: 0 auto; }
.guides-hero .section-label { color: var(--dusty-rose); }
.guides-hero .section-title { color: var(--blush); margin-bottom: 0.75rem; }
.guides-hero .lede { color: rgba(253,245,248,0.7); font-size: 1.05rem; max-width: 560px; line-height: 1.7; }

.guides-wrap { max-width: var(--max); margin: 0 auto; padding: 64px 2rem 100px; }

/* Featured "Latest" card — always the newest guide, set automatically by the manifest sort */
.guide-featured {
  display: block; background: white; border: 1px solid var(--light-rose);
  border-left: 4px solid var(--dusty-rose); border-radius: 12px;
  padding: 2rem 2.25rem; margin-bottom: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.guide-featured:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(75,21,40,0.10); }
.guide-featured .latest-badge {
  display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fig); background: var(--dusty-rose);
  padding: 0.32rem 0.8rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.guide-featured .date { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dusty-rose); margin-bottom: 0.55rem; }
.guide-featured h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--deep-text); margin-bottom: 0.7rem; line-height: 1.2; }
.guide-featured p { font-size: 1rem; color: var(--fig-mid); line-height: 1.7; margin-bottom: 1.1rem; max-width: 640px; }
.guide-featured .read-link { font-size: 0.9rem; font-weight: 600; color: var(--berry); }

.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.guide-card {
  background: white; border: 1px solid var(--light-rose); border-radius: 12px;
  padding: 1.75rem; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(75,21,40,0.08); }
.guide-card .date { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dusty-rose); margin-bottom: 0.6rem; }
.guide-card h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--deep-text); margin-bottom: 0.6rem; line-height: 1.25; }
.guide-card p { font-size: 0.9rem; color: var(--fig-mid); line-height: 1.7; margin-bottom: 1.25rem; flex-grow: 1; }
.guide-card .read-link { font-size: 0.85rem; font-weight: 600; color: var(--berry); }
.guides-empty { color: var(--fig-mid); font-size: 0.95rem; grid-column: 1 / -1; }

/* ==========================================================================
   SINGLE GUIDE PAGE (guides/<slug>.html)
   ========================================================================== */
.guide-header { background: var(--fig); padding: 130px 2rem 64px; }
.guide-header .inner { max-width: var(--read); margin: 0 auto; }
.guide-header .back { font-size: 0.8rem; color: var(--dusty-rose); font-weight: 600; display: inline-block; margin-bottom: 1.25rem; }
.guide-header .back:hover { color: var(--blush); }
.guide-header .date { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dusty-rose); margin-bottom: 0.75rem; }
.guide-header h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--blush); }
/* "Skip to the prompt" fast-lane link — injected into the header by script when a guide has a prompt/steps */
.guide-header .skip-to-prompt {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--fig); background: var(--dusty-rose);
  padding: 0.55rem 1.15rem; border-radius: 999px; transition: background 0.2s, transform 0.2s;
}
.guide-header .skip-to-prompt:hover { background: var(--blush); transform: translateY(-1px); }

.guide-body { max-width: var(--read); margin: 0 auto; padding: 56px 2rem 100px; }
.guide-body h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: var(--deep-text); margin: 2.25rem 0 1rem; line-height: 1.25; }
.guide-body h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: var(--fig); margin: 1.75rem 0 0.75rem; }
.guide-body p { font-size: 1.05rem; color: var(--fig-mid); line-height: 1.8; margin-bottom: 1.25rem; }
.guide-body strong { color: var(--deep-text); font-weight: 600; }
.guide-body a { color: var(--berry); font-weight: 500; border-bottom: 1px solid var(--light-rose); }
.guide-body a:hover { border-color: var(--berry); }
.guide-body ul, .guide-body ol { margin: 0 0 1.25rem 1.4rem; }
.guide-body li { font-size: 1.05rem; color: var(--fig-mid); line-height: 1.8; margin-bottom: 0.5rem; }
.guide-body blockquote {
  border-left: 3px solid var(--dusty-rose); padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.5rem 0; color: var(--fig); font-style: italic; font-size: 1.1rem;
}
.guide-body code {
  background: white; border: 1px solid var(--light-rose); border-radius: 4px;
  padding: 0.1rem 0.4rem; font-size: 0.9rem; font-family: ui-monospace, Menlo, monospace; color: var(--berry);
}
.guide-body pre {
  background: var(--fig); color: var(--blush); border-radius: 8px; padding: 1.25rem 1.5rem;
  overflow-x: auto; margin: 0 0 1.5rem; font-size: 0.9rem; line-height: 1.6;
}
.guide-body pre code { background: none; border: none; padding: 0; color: inherit; }
.guide-body img { border-radius: 10px; margin: 1.5rem 0; }
.guide-body hr { border: none; border-top: 1px solid var(--light-rose); margin: 2.5rem 0; }
.guide-footer { max-width: var(--read); margin: 0 auto; padding: 0 2rem 80px; }
.guide-footer a { font-size: 0.9rem; font-weight: 600; color: var(--berry); }

footer { background: var(--fig); border-top: 1px solid rgba(237,147,177,0.15); padding: 2rem; text-align: center; }
footer p { color: rgba(253,245,248,0.3); font-size: 0.8rem; }

/* ==========================================================================
   RICH GUIDE COMPONENTS (structured how-to guides)
   Additive. Used by guides that opt in. Existing guides are unaffected.
   ========================================================================== */

/* category chip in the header */
.guide-header .guide-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fig); background: var(--dusty-rose);
  padding: 0.32rem 0.75rem; border-radius: 999px; margin-bottom: 1.1rem;
}

/* opening lede paragraph */
.guide-body .lede { font-size: 1.2rem; color: var(--deep-text); line-height: 1.7; margin-bottom: 1.6rem; font-weight: 500; }

/* numbered step block */
.step { border-top: 1px solid var(--light-rose); padding-top: 1.5rem; margin-top: 2.25rem; }
.step-num { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--berry); margin-bottom: 0.35rem; }
.step h2 { margin-top: 0.1rem; }

/* callout / highlight box */
.callout { background: white; border: 1px solid var(--light-rose); border-left: 4px solid var(--dusty-rose); border-radius: 10px; padding: 1.3rem 1.5rem; margin: 1.6rem 0; }
.callout-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--berry); margin-bottom: 0.5rem; }
.callout p { margin-bottom: 0.7rem; font-size: 1rem; }
.callout p:last-child { margin-bottom: 0; }

/* code card with label + copy button */
.code-card { background: var(--fig); border-radius: 8px; margin: 0 0 1.5rem; overflow: hidden; }
.code-card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem 0.55rem 1rem; border-bottom: 1px solid rgba(237,147,177,0.25); }
.code-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dusty-rose); }
.copy-btn { font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blush); background: var(--berry); border: none; border-radius: 5px; padding: 0.32rem 0.7rem; cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.copy-btn:hover { background: var(--dusty-rose); color: var(--fig); }
.code-card pre { margin: 0; border-radius: 0; }

/* folded-in cheat sheet */
.cheat-sheet { background: white; border: 1px solid var(--light-rose); border-radius: 12px; padding: 0.5rem 1.6rem; margin: 1.6rem 0; }
.cheat-row { padding: 1.1rem 0; border-bottom: 1px solid var(--blush); }
.cheat-row:last-child { border-bottom: none; }
.cheat-row .what { font-size: 0.95rem; font-weight: 600; color: var(--deep-text); margin-bottom: 0.6rem; }
.cheat-sheet .code-card { margin-bottom: 0; }

/* routing / lookup table */
.guide-table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.95rem; background: white; border: 1px solid var(--light-rose); border-radius: 12px; overflow: hidden; }
.guide-table thead th { text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--berry); background: var(--blush); padding: 0.85rem 1.1rem; }
.guide-table td { padding: 0.85rem 1.1rem; border-top: 1px solid var(--blush); color: var(--deep-text); vertical-align: top; }
.guide-table td:first-child { font-weight: 600; }

/* tall scrollable code block (full scripts) + download button */
.code-card.tall pre { max-height: 460px; overflow: auto; }
.dl-btn { display: inline-block; background: var(--berry); color: var(--blush); font-weight: 600; font-size: 0.9rem; padding: 0.65rem 1.3rem; border-radius: 8px; margin: 0 0 1.4rem; transition: background 0.2s; }
.dl-btn:hover { background: var(--fig); color: var(--blush); }

/* end-of-guide CTA block */
.cta-block { background: var(--fig); border-radius: 14px; padding: 2.4rem 2rem; margin: 2.75rem 0 0; text-align: center; }
.cta-block .cta-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dusty-rose); margin-bottom: 0.75rem; }
.cta-block h2 { font-family: 'Playfair Display', serif; color: var(--blush); font-size: 1.55rem; line-height: 1.25; margin: 0 0 0.75rem; border: none; }
.cta-block p { color: rgba(253,245,248,0.75); font-size: 1rem; line-height: 1.7; max-width: 480px; margin: 0 auto 1.5rem; }
.cta-btn { display: inline-block; background: var(--dusty-rose); color: var(--fig); font-weight: 700; font-size: 0.95rem; padding: 0.85rem 1.8rem; border-radius: 999px; transition: background 0.2s; }
.cta-btn:hover { background: var(--blush); color: var(--fig); }

@media (max-width: 900px) {
  .guides-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .cta-block { padding: 2rem 1.4rem; }
  .cheat-sheet { padding: 0.5rem 1.1rem; }
}

/* Mobile nav (hamburger) */
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--fig-mid); cursor: pointer; padding: 0.25rem; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--blush); box-shadow: 0 12px 24px rgba(75,21,40,0.08); flex-direction: column; gap: 0; padding: 0.5rem 2rem 1rem; border-bottom: 1px solid var(--light-rose); list-style: none; }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.55rem 0; }
}
