/* ============================================================
   GREEN BADGER — GUIDE
   Design-locked editorial manual (approved prototype, 2026-08-23).
   Consumes HOME/SHOP's ratified tokens (--dm-text, --dm-primary,
   --gb-font-en, --gb-font-ja) instead of a private palette/type scale.
   Green Badger scope only.
   ============================================================ */

body.dm-gb-guide {
  --gb-guide-bg: #0a0b0c;
  --gb-guide-line: #1c1f22;
  --gb-guide-gold: var(--dm-primary, #b89a5b);
  --gb-guide-fg: var(--dm-text, #f4f1e8);
  --gb-guide-fg-2: #9a948b;
  --gb-guide-fg-3: #55524c;
  --gb-guide-serif: var(--gb-font-en, "Cormorant Garamond", Georgia, serif);
  --gb-guide-sans: var(--gb-font-ja, "Noto Sans JP", "Hiragino Kaku Gothic ProN", system-ui, sans-serif);
  --gb-guide-ease: cubic-bezier(.37,0,.63,1);
  --gb-guide-pad: clamp(22px, 4.2vw, 60px);
  background: var(--gb-guide-bg);
  color: var(--gb-guide-fg);
}

/* neutralise theme container so the manual can run full-bleed, same discipline as SHOP */
body.dm-gb-guide .site-content,
body.dm-gb-guide #content,
body.dm-gb-guide .content-area,
body.dm-gb-guide main.site-main {
  background: var(--gb-guide-bg);
}
body.dm-gb-guide .site-content > .ast-container {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
/* Astra's own `#primary{margin:4em 0}` (main.min.css) still wins the top
   edge over this rule's plain `margin:0` shorthand even though this
   selector is more specific — same shorthand-vs-shorthand fight already
   fixed the same way in slider.css (`body.home #primary{margin-top:0!important}`)
   and documented in site-shell.css. Forcing margin-top here is what
   actually closes the stray 60px gap SHOP doesn't have. */
body.dm-gb-guide #primary { width: 100%; margin: 0; margin-top: 0 !important; padding: 0; border: 0; }
body.dm-gb-guide #secondary { display: none; }

/* Astra auto page title duplicates the manual's own opening title — suppress it */
body.dm-gb-guide .entry-header { display: none; }

/* breadcrumb — same top-left position/type treatment as SHOP's woocommerce-breadcrumb,
   rebuilt in plain markup since GUIDE isn't a WooCommerce page. */
body.dm-gb-guide .gb-guide-crumb {
  padding: 22px var(--gb-guide-pad) 0;
  font-family: var(--gb-guide-sans);
  font-weight: 300;
  font-size: 13px;
  color: var(--gb-guide-fg-3);
}
body.dm-gb-guide .gb-guide-crumb a {
  color: var(--gb-guide-fg-3);
  text-decoration: none;
  transition: color .3s var(--gb-guide-ease);
}
body.dm-gb-guide .gb-guide-crumb a:hover { color: var(--gb-guide-gold); }

/* neutralise foreign brand nav accent (Fruitera pink) leaking via global unscoped !important rule */
body.dm-gb-guide .main-header-menu > .current-menu-item > .menu-link,
body.dm-gb-guide .main-header-menu > .current_page_item > .menu-link {
  color: var(--gb-guide-gold) !important;
}
body.dm-gb-guide .main-header-menu > .current-menu-item > .menu-link::after,
body.dm-gb-guide .main-header-menu > .current_page_item > .menu-link::after {
  background: var(--gb-guide-gold) !important;
}

body.dm-gb-guide .gb-guide {
  max-width: 1360px;
  margin-inline: auto;
  font-family: var(--gb-guide-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
body.dm-gb-guide .gb-guide a { color: inherit; }

/* reveal — quiet and continuous, never pop */
body.dm-gb-guide .gb-guide-rv {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .7s var(--gb-guide-ease), transform .7s var(--gb-guide-ease);
}
body.dm-gb-guide .gb-guide-rv.is-in { opacity: 1; transform: none; }
body.dm-gb-guide .gb-guide-rv--section {
  transform: translateY(4px);
  transition-duration: .7s;
}

/* opening */
body.dm-gb-guide .gb-guide-open {
  min-height: 360px;
  padding: clamp(64px, 9vw, 110px) var(--gb-guide-pad) clamp(48px, 6vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
body.dm-gb-guide .gb-guide-kicker,
body.dm-gb-guide .gb-guide-chapter-no {
  margin: 0 0 20px;
  color: var(--gb-guide-gold);
  font: 400 12px/1.4 var(--gb-guide-sans);
  letter-spacing: .22em;
}
body.dm-gb-guide .gb-guide-open__title {
  font-family: var(--gb-guide-serif);
  font-weight: 500;
  font-size: clamp(64px, 8vw, 128px);
  line-height: .82;
  letter-spacing: -.03em;
  margin: 0;
  color: var(--gb-guide-fg);
}
body.dm-gb-guide .gb-guide-lead {
  max-width: 520px;
  margin: 34px 0 0;
  color: var(--gb-guide-fg-2);
  font-size: 15px;
  line-height: 1.9;
}

/* two-column shell — sidebar spans every content row via CSS Grid auto-placement */
body.dm-gb-guide .gb-guide-shell {
  display: grid;
  grid-template-columns: minmax(220px, 26vw) 1fr;
  border-top: 1px solid var(--gb-guide-line);
}
body.dm-gb-guide .gb-guide-index {
  grid-column: 1;
  grid-row: 1 / -1;
  border-right: 1px solid var(--gb-guide-line);
}
body.dm-gb-guide .gb-guide-index-list {
  position: sticky;
  top: 0;
  padding: 50px var(--gb-guide-pad);
  display: flex;
  flex-direction: column;
}
body.dm-gb-guide .gb-guide-index-list a {
  padding: 14px 0;
  color: var(--gb-guide-fg-2);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .04em;
  display: grid;
  grid-template-columns: 38px 1fr;
  transition: color .45s var(--gb-guide-ease);
}
body.dm-gb-guide .gb-guide-index-list a span { color: var(--gb-guide-fg-3); }
body.dm-gb-guide .gb-guide-index-list a.is-active { color: var(--gb-guide-fg); }
body.dm-gb-guide .gb-guide-index-list a.is-active span { color: var(--gb-guide-gold); }
body.dm-gb-guide .gb-guide-mobile-index { display: none; }

body.dm-gb-guide .gb-guide-copy { grid-column: 2; min-width: 0; }
body.dm-gb-guide .gb-guide-chapter {
  padding: 84px clamp(36px, 7vw, 110px) 96px;
  max-width: 1000px;
}
body.dm-gb-guide .gb-guide-chapter + .gb-guide-chapter { border-top: 1px solid var(--gb-guide-line); }
body.dm-gb-guide .gb-guide-chapter h2 {
  font-family: var(--gb-guide-serif);
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0 0 42px;
  color: var(--gb-guide-fg);
}
body.dm-gb-guide .gb-guide-chapter h2 em { font-style: normal; color: var(--gb-guide-gold); }
body.dm-gb-guide .gb-guide-body {
  max-width: 660px;
  color: var(--gb-guide-fg-2);
  font-size: 16px;
  line-height: 2;
  margin: 0;
}

/* note — restrained gold hairline, no card chrome */
body.dm-gb-guide .gb-guide-note {
  margin-top: 48px;
  max-width: 660px;
  border-left: 1px solid var(--gb-guide-gold);
  padding: 2px 0 2px 22px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
}
body.dm-gb-guide .gb-guide-note span { color: var(--gb-guide-gold); font-size: 11px; letter-spacing: .16em; }
body.dm-gb-guide .gb-guide-note p { margin: 0; color: var(--gb-guide-fg-2); font-size: 13px; line-height: 1.8; }

/* steps */
body.dm-gb-guide .gb-guide-steps { max-width: 720px; }
body.dm-gb-guide .gb-guide-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--gb-guide-line);
}
body.dm-gb-guide .gb-guide-step:last-child { border-bottom: 1px solid var(--gb-guide-line); }
body.dm-gb-guide .gb-guide-step > span { font-family: var(--gb-guide-serif); font-size: 22px; color: var(--gb-guide-gold); }
body.dm-gb-guide .gb-guide-step h3 { font-family: var(--gb-guide-serif); font-weight: 500; font-size: 23px; margin: 0 0 8px; color: var(--gb-guide-fg); }
body.dm-gb-guide .gb-guide-step p { color: var(--gb-guide-fg-2); margin: 0; line-height: 1.8; font-size: 14px; }

/* visual block — media-less placeholder mark, no gradient/glow */
body.dm-gb-guide .gb-guide-visual {
  margin: 64px 0 0;
  max-width: 720px;
  aspect-ratio: 16/9;
  background: #111214;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
body.dm-gb-guide .gb-guide-visual__mark { font-family: var(--gb-guide-serif); font-size: 74px; color: #232420; }
body.dm-gb-guide .gb-guide-visual figcaption {
  position: absolute; left: 18px; bottom: 14px;
  color: var(--gb-guide-fg-2); font-size: 10px; letter-spacing: .18em;
}

/* rule list */
body.dm-gb-guide .gb-guide-rules { max-width: 720px; }
body.dm-gb-guide .gb-guide-rules > div {
  display: grid; grid-template-columns: 140px 1fr;
  border-top: 1px solid var(--gb-guide-line);
  padding: 20px 0; font-size: 14px;
}
body.dm-gb-guide .gb-guide-rules > div:last-child { border-bottom: 1px solid var(--gb-guide-line); }
body.dm-gb-guide .gb-guide-rules strong { color: var(--gb-guide-gold); font-size: 11px; letter-spacing: .16em; font-weight: 500; }
body.dm-gb-guide .gb-guide-rules span { color: var(--gb-guide-fg-2); }

/* faq — quiet accordion, no icon-card styling */
body.dm-gb-guide .gb-guide-faq { max-width: 720px; }
body.dm-gb-guide .gb-guide-faq button {
  width: 100%; border: 0; border-top: 1px solid var(--gb-guide-line);
  background: none; color: var(--gb-guide-fg); padding: 22px 0;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; text-align: left;
  font-family: var(--gb-guide-serif); font-size: 20px; cursor: pointer;
}
body.dm-gb-guide .gb-guide-faq button b {
  flex: none; color: var(--gb-guide-gold); font-weight: 400;
  transition: transform .45s var(--gb-guide-ease);
}
body.dm-gb-guide .gb-guide-faq__answer {
  max-height: 0; overflow: hidden;
  border-bottom: 0 solid var(--gb-guide-line);
  transition: max-height .55s var(--gb-guide-ease);
}
body.dm-gb-guide .gb-guide-faq__answer p { color: var(--gb-guide-fg-2); margin: 0; padding: 0 0 22px; font-size: 14px; line-height: 1.7; }
body.dm-gb-guide .gb-guide-faq button.is-open + .gb-guide-faq__answer { max-height: 200px; border-bottom-width: 1px; }
body.dm-gb-guide .gb-guide-faq button.is-open b { transform: rotate(45deg); }

@media (max-width: 780px) {
  body.dm-gb-guide .gb-guide-open { min-height: 280px; padding-top: 70px; }
  body.dm-gb-guide .gb-guide-open__title { font-size: 62px; }
  body.dm-gb-guide .gb-guide-lead { margin-top: 26px; font-size: 14px; }

  body.dm-gb-guide .gb-guide-shell { display: block; }
  body.dm-gb-guide .gb-guide-index {
    border-right: 0; border-bottom: 1px solid var(--gb-guide-line);
    position: sticky; top: 0; background: rgba(10,11,12,.96); z-index: 10;
  }
  body.dm-gb-guide .gb-guide-mobile-index {
    display: flex; width: 100%; height: 52px; align-items: center; justify-content: space-between;
    border: 0; background: none; color: var(--gb-guide-fg);
    padding: 0 var(--gb-guide-pad); font-family: var(--gb-guide-sans); font-size: 12px; letter-spacing: .06em;
  }
  body.dm-gb-guide .gb-guide-mobile-index span { color: var(--gb-guide-gold); }
  body.dm-gb-guide .gb-guide-index-list { display: none; position: static; padding: 0 var(--gb-guide-pad) 14px; }
  body.dm-gb-guide .gb-guide-index.is-open .gb-guide-index-list { display: flex; }

  body.dm-gb-guide .gb-guide-chapter { padding: 60px var(--gb-guide-pad) 74px; }
  body.dm-gb-guide .gb-guide-chapter h2 { font-size: 40px; margin-bottom: 32px; }
  body.dm-gb-guide .gb-guide-body { font-size: 15px; }
  body.dm-gb-guide .gb-guide-note { grid-template-columns: 1fr; gap: 8px; margin-top: 38px; }
  body.dm-gb-guide .gb-guide-step { grid-template-columns: 48px 1fr; }
  body.dm-gb-guide .gb-guide-visual { margin-top: 42px; }
  body.dm-gb-guide .gb-guide-rules > div { grid-template-columns: 96px 1fr; }
  body.dm-gb-guide .gb-guide-faq button { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  body.dm-gb-guide .gb-guide-rv,
  body.dm-gb-guide .gb-guide-index-list a,
  body.dm-gb-guide .gb-guide-faq button b,
  body.dm-gb-guide .gb-guide-faq__answer { transition: none !important; }
}
