/* =====================================================================
   HoodValley - Docs / Game Guide
   Builds on styles.css. Reuses the same tokens, panels, buttons, fonts.
   Layout: sticky left sidebar nav + long scrollable content column.
   ===================================================================== */

/* ---------- docs header extras (back-to-home link) ---------- */
.header-nav a.is-active { color:var(--ink); }
.header-nav a.is-active::after { right:0; }

.back-home {
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--font-display); font-weight:500; font-size:15px;
  color:var(--ink-soft); margin-left:auto;
}
.back-home:hover { color:var(--ink); }
.back-home .back-arrow {
  width:18px; height:18px; flex:none; border-radius:5px;
  background:linear-gradient(180deg,var(--leaf),var(--leaf-dark)); position:relative;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.28);
}
.back-home .back-arrow::after {
  content:""; position:absolute; left:7px; top:5px; width:6px; height:6px;
  border:solid #fff; border-width:0 0 2px 2px; transform:rotate(45deg);
}

/* =====================================================================
   Docs hero strip
   ===================================================================== */
.docs-hero { padding:46px 0 16px; text-align:center; }
.docs-hero .eyebrow { margin-bottom:12px; }
.docs-hero h1 {
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(32px,5vw,52px); line-height:1.06; color:var(--wood-dark);
  letter-spacing:.2px;
}
.docs-hero p {
  color:var(--ink-soft); font-size:18px; font-weight:600;
  max-width:42em; margin:14px auto 0;
}

/* =====================================================================
   Docs layout - sidebar + content
   ===================================================================== */
.docs-layout {
  display:grid; grid-template-columns:248px minmax(0,1fr);
  gap:40px; align-items:start;
  padding:18px 0 80px;
}

/* ---------- sticky sidebar ---------- */
.docs-sidebar {
  position:sticky; top:78px; align-self:start;
  max-height:calc(100vh - 96px); overflow-y:auto;
  scrollbar-width:thin; scrollbar-color:var(--parch-edge) transparent;
}
.docs-sidebar::-webkit-scrollbar { width:8px; }
.docs-sidebar::-webkit-scrollbar-thumb {
  background:var(--parch-edge); border-radius:99px;
}
.docs-toc { padding:14px 12px; }
.docs-toc-title {
  font-family:var(--font-hand); font-size:20px; color:var(--leaf-dark);
  padding:2px 10px 8px; letter-spacing:.3px;
}
.docs-nav { list-style:none; display:flex; flex-direction:column; gap:2px; }
.docs-nav a {
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:500; font-size:14.5px;
  color:var(--ink-soft); padding:8px 10px; border-radius:10px;
  position:relative; transition:background .14s ease, color .14s ease;
}
.docs-nav a .toc-ico { width:20px; height:20px; flex:none; object-fit:contain; opacity:.78; }
.docs-nav a:hover { background:rgba(168,122,74,.14); color:var(--ink); }
.docs-nav a.active {
  background:linear-gradient(180deg,rgba(98,165,68,.22),rgba(98,165,68,.12));
  color:var(--wood-dark); font-weight:600;
  box-shadow:inset 0 0 0 2px rgba(98,165,68,.32);
}
.docs-nav a.active .toc-ico { opacity:1; }

/* =====================================================================
   Content column
   ===================================================================== */
.docs-content { max-width:none; }
.docs-section { scroll-margin-top:84px; margin-bottom:14px; }
.docs-section + .docs-section { margin-top:30px; }

.docs-section-head { display:flex; align-items:center; gap:14px; margin-bottom:6px; }
.docs-section-head .sec-ico {
  width:42px; height:42px; flex:none; object-fit:contain;
  filter:drop-shadow(0 5px 7px rgba(60,40,18,.25));
}
.docs-section h2 {
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(24px,3vw,32px); color:var(--wood-dark); letter-spacing:.2px;
  line-height:1.1;
}
.docs-section h3 {
  font-family:var(--font-display); font-weight:600; font-size:19px;
  color:var(--wood-dark); margin:20px 0 6px;
}
.docs-section p { color:var(--ink-soft); font-weight:600; font-size:16px; margin:10px 0; }
.docs-section p:first-of-type { margin-top:8px; }
.docs-section a.inline-link { color:var(--leaf-dark); font-weight:800;
  border-bottom:2px solid rgba(98,165,68,.4); }
.docs-section a.inline-link:hover { border-bottom-color:var(--leaf-dark); }
.docs-section strong { color:var(--wood-dark); font-weight:800; }

.docs-divider {
  height:6px; margin:34px 0; border:none; border-radius:3px;
  background:repeating-linear-gradient(90deg,var(--parch-edge) 0 8px,transparent 8px 16px);
  opacity:.7;
}

/* lists */
.docs-list { list-style:none; margin:12px 0; display:flex; flex-direction:column; gap:9px; }
.docs-list li {
  position:relative; padding-left:26px;
  color:var(--ink-soft); font-weight:600; font-size:16px;
}
.docs-list li::before {
  content:""; position:absolute; left:4px; top:8px; width:11px; height:11px;
  border-radius:4px; transform:rotate(45deg);
  background:linear-gradient(135deg,var(--gold-2),var(--gold));
  box-shadow:inset 0 0 0 1.5px rgba(74,47,6,.3);
}
.docs-list li strong { color:var(--wood-dark); }

/* a parchment sub-panel block, reuses .panel look */
.docs-block { margin:16px 0; }
.docs-block .panel-inner { padding:18px 20px; }
.docs-block .panel-inner > *:first-child { margin-top:0; }
.docs-block .panel-inner > *:last-child { margin-bottom:0; }

/* callout / tip box */
.callout {
  display:flex; gap:14px; align-items:flex-start; margin:18px 0;
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(255,255,255,.4), transparent 55%),
    linear-gradient(180deg,#fbf2dc,#f0e1bd);
  border:2px solid var(--parch-edge); border-left:6px solid var(--leaf);
  border-radius:var(--radius-sm); padding:14px 18px;
  box-shadow:var(--shadow-soft);
}
.callout.tip   { border-left-color:var(--leaf); }
.callout.note  { border-left-color:var(--water); }
.callout.warn  { border-left-color:var(--gold); }
.callout-mark {
  font-family:var(--font-hand); font-size:17px; line-height:1.1; color:#fff;
  flex:none; padding:4px 11px; border-radius:var(--radius-pill);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.25);
  background:linear-gradient(180deg,var(--leaf),var(--leaf-dark));
}
.callout.note .callout-mark { background:linear-gradient(180deg,var(--water),var(--water-dark)); }
.callout.warn .callout-mark { background:linear-gradient(180deg,var(--gold-2),var(--gold)); color:#4a2f06; }
.callout-body { color:var(--ink); font-weight:600; font-size:15.5px; }
.callout-body p { color:var(--ink); margin:0; font-size:15.5px; }
.callout-body p + p { margin-top:8px; }

/* key chips (controls) */
.kbd {
  display:inline-block; font-family:var(--font-display); font-weight:600;
  font-size:13px; color:var(--parch); padding:2px 9px; border-radius:7px;
  background:linear-gradient(180deg,var(--wood-2),var(--wood-dark));
  box-shadow:0 2px 0 #241608, inset 0 0 0 1.5px var(--wood-edge);
  white-space:nowrap;
}

/* currency / mini fact pills */
.pill-row { display:flex; flex-wrap:wrap; gap:9px; margin:14px 0; }
.pill {
  font-family:var(--font-display); font-weight:600; font-size:13px;
  padding:5px 13px; border-radius:var(--radius-pill); color:#fff;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.22);
}
.pill.gold { background:linear-gradient(180deg,var(--gold-2),var(--gold)); color:#4a2f06; }
.pill.eth  { background:linear-gradient(180deg,#9b6cff,#5a32c4); }
.pill.vxl  { background:linear-gradient(180deg,var(--leaf),var(--leaf-dark)); }

/* small fish strip inside fishing section */
.docs-fish-strip {
  display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:18px 0 6px;
}
.docs-fish {
  background:linear-gradient(180deg,var(--wood-2),var(--wood)); padding:6px;
  border-radius:var(--radius-sm); box-shadow:var(--shadow-soft), inset 0 0 0 2px var(--wood-edge);
  transition:transform .2s ease;
}
.docs-fish:hover { transform:translateY(-4px); }
.docs-fish .df-frame {
  border-radius:9px; border:2px solid var(--parch-edge); overflow:hidden;
  display:grid; place-items:center; padding:10px; aspect-ratio:1/1;
  background:
    radial-gradient(120% 100% at 50% 18%, rgba(255,255,255,.5), transparent 55%),
    linear-gradient(180deg,#fbf2dc,#efe0bd);
}
.docs-fish .df-frame img { width:84%; filter:drop-shadow(0 6px 10px rgba(60,40,18,.3)); }
.docs-fish .df-meta {
  display:flex; align-items:center; justify-content:space-between; gap:6px;
  padding:7px 6px 3px;
}
.docs-fish .df-name { font-family:var(--font-display); font-weight:600; font-size:12px; color:var(--parch); }

/* a compact 2-col fact grid (e.g. crafting stations, world areas) */
.fact-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin:16px 0; }
.fact-card { /* uses .panel */ }
.fact-card .panel-inner { padding:16px 18px; }
.fact-card h4 {
  font-family:var(--font-display); font-weight:600; font-size:16.5px;
  color:var(--wood-dark); margin-bottom:5px; display:flex; align-items:center; gap:9px;
}
.fact-card h4 img { width:26px; height:26px; object-fit:contain; }
.fact-card p { font-size:14.5px; margin:0; }

/* FAQ */
.faq-item { margin:0 0 12px; }
.faq-item .panel-inner { padding:16px 20px; }
.faq-q {
  font-family:var(--font-display); font-weight:700; font-size:17px;
  color:var(--wood-dark); margin-bottom:4px; display:flex; align-items:flex-start; gap:9px;
}
.faq-q::before {
  content:"Q"; flex:none; width:24px; height:24px; display:grid; place-items:center;
  font-size:14px; color:#fff; border-radius:8px;
  background:linear-gradient(180deg,var(--water),var(--water-dark));
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.25);
}
.faq-a { color:var(--ink-soft); font-weight:600; font-size:15.5px; padding-left:33px; }
.faq-a a.inline-link { color:var(--leaf-dark); font-weight:800; }

/* back-to-top bottom CTA reused from index .cta-banner */

/* =====================================================================
   Mobile TOC (hamburger / horizontal scroller)
   ===================================================================== */
.docs-toc-mobile { display:none; }

@media (max-width:920px) {
  .docs-layout { grid-template-columns:1fr; gap:18px; }

  /* hide the desktop sidebar, show a sticky horizontal scroller pinned
     under the header */
  .docs-sidebar { display:none; }

  .docs-toc-mobile {
    display:block; position:sticky; top:60px; z-index:40;
    margin:0 -22px 8px; padding:0;
    background:linear-gradient(180deg, rgba(245,231,198,.96), rgba(236,215,164,.92));
    backdrop-filter:blur(8px);
    border-top:2px solid var(--parch-edge);
    border-bottom:2px solid var(--parch-edge);
    box-shadow:0 6px 16px rgba(60,40,18,.14);
  }
  .docs-toc-mobile-bar {
    display:flex; align-items:center; gap:10px; padding:9px 16px;
  }
  .docs-toc-mobile-label {
    font-family:var(--font-hand); font-size:18px; color:var(--leaf-dark); flex:none;
  }
  .docs-toc-mobile-toggle {
    margin-left:auto; flex:none;
    font-family:var(--font-display); font-weight:600; font-size:13px;
  }
  /* horizontal scroller of section chips */
  .docs-nav-scroller {
    display:flex; gap:8px; overflow-x:auto; padding:0 16px 11px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch;
  }
  .docs-nav-scroller::-webkit-scrollbar { display:none; }
  .docs-nav-scroller a {
    flex:none; display:inline-flex; align-items:center; gap:7px;
    font-family:var(--font-display); font-weight:500; font-size:13.5px;
    color:var(--ink-soft); padding:7px 13px; border-radius:var(--radius-pill);
    border:2px solid var(--parch-edge);
    background:linear-gradient(180deg,#fbf2dc,#efe0bd);
    white-space:nowrap;
  }
  .docs-nav-scroller a .toc-ico { width:18px; height:18px; }
  .docs-nav-scroller a.active {
    color:var(--wood-dark); border-color:var(--leaf);
    background:linear-gradient(180deg,rgba(98,165,68,.28),rgba(98,165,68,.14));
    box-shadow:inset 0 0 0 1px rgba(98,165,68,.4);
  }
  /* collapsed/expanded vertical menu (hamburger) */
  .docs-nav-scroller.as-list {
    flex-direction:column; overflow:visible; padding:0 16px 12px;
  }
  .docs-nav-scroller.as-list a { width:100%; border-radius:10px; }

  .docs-fish-strip { grid-template-columns:repeat(4,1fr); }
  .fact-grid { grid-template-columns:1fr; }
}

@media (max-width:560px) {
  .docs-hero { padding:30px 0 8px; }
  .docs-fish-strip { grid-template-columns:repeat(2,1fr); }
  .docs-section-head .sec-ico { width:34px; height:34px; }
  .callout { flex-direction:column; gap:8px; }
}
