/* MMO Maid /docs page — cinematic styling matching the rest of the site.
   Pulls design tokens (colors, fonts) from tokens.css and the nav/footer
   styles from home.css. This file scopes only the docs-specific layout
   (sidebar TOC, content typography, cards, FAQ accordions). */

.docs-host {
  position: relative;
  flex: 1 1 auto;
  /* Clear the fixed 64px single-row landing nav, plus breathing room. */
  padding: calc(var(--nav-height, 64px) + 24px) 1.5rem 3rem;
}

/* ── Drifting nebula background ─────────────────────────────────────── */
.docs-nebula {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}
.docs-nebula-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.docs-nebula-blob-1 {
  width: 60vw; height: 60vw;
  background: radial-gradient(circle,
    rgba(255, 198, 110, 0.18) 0%,
    rgba(201, 168, 76, 0.07) 40%,
    transparent 75%);
  top: -25vw; right: -10vw;
  animation: docsNebulaDrift1 50s ease-in-out infinite;
}
.docs-nebula-blob-2 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle,
    rgba(96, 156, 210, 0.07) 0%,
    rgba(96, 156, 210, 0.025) 40%,
    transparent 75%);
  top: 20vw; left: -25vw;
  animation: docsNebulaDrift2 56s ease-in-out infinite;
}
.docs-nebula-blob-3 {
  width: 50vw; height: 50vw;
  background: radial-gradient(circle,
    rgba(201, 168, 76, 0.10) 0%,
    rgba(150, 100, 40, 0.04) 45%,
    transparent 78%);
  bottom: -20vw; right: 20vw;
  animation: docsNebulaDrift3 48s ease-in-out infinite;
}
@keyframes docsNebulaDrift1 {
  0%, 100% { transform: translate(0, 0)        scale(1);    }
  35%      { transform: translate(-15vw, 12vh) scale(1.08); }
  70%      { transform: translate(8vw, 18vh)   scale(0.92); }
}
@keyframes docsNebulaDrift2 {
  0%, 100% { transform: translate(0, 0)       scale(1);    }
  45%      { transform: translate(20vw, -8vh) scale(1.15); }
  75%      { transform: translate(28vw, 14vh) scale(0.95); }
}
@keyframes docsNebulaDrift3 {
  0%, 100% { transform: translate(0, 0)         scale(1);    }
  30%      { transform: translate(-18vw, -16vh) scale(1.05); }
  65%      { transform: translate(-8vw, -24vh)  scale(0.88); }
}
@media (prefers-reduced-motion: reduce) {
  .docs-nebula-blob { animation: none; }
}

/* ── Layout shell — sidebar + main ──────────────────────────────────── */
.docs-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Sidebar TOC ───────────────────────────────────────────────────── */
.docs-toc {
  position: sticky;
  /* Clear the 64px fixed nav + breathing room. */
  top: calc(var(--nav-height, 64px) + 16px);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-height, 64px) - 32px);
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.docs-toc-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.docs-toc a {
  display: block;
  padding: 5px 10px 5px 14px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 0 4px 4px 0;
}
.docs-toc a:hover {
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.04);
}
.docs-toc a.section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-top: 1.1rem;
  margin-bottom: 0.25rem;
}
.docs-toc a.section:first-of-type { margin-top: 0; }
.docs-toc a.sub {
  font-size: 0.74rem;
  padding-left: 26px;
}
.docs-toc a.active {
  color: var(--gold-light);
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(201,168,76,0.08), transparent 80%);
}

/* ── Main content ──────────────────────────────────────────────────── */
.docs-content {
  min-width: 0;
  position: relative;
}

/* Mobile TOC */
.docs-toc-mobile {
  display: none;
  margin-bottom: 1.5rem;
  background: rgba(7, 8, 13, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.docs-toc-mobile[open] {
  border-color: var(--gold-dim);
}
.docs-toc-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text);
}
.docs-toc-mobile summary::-webkit-details-marker { display: none; }
.docs-toc-mobile summary svg {
  color: var(--gold);
  transition: transform 0.2s;
}
.docs-toc-mobile[open] summary svg { transform: rotate(180deg); }
.docs-toc-mobile a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border-top: 1px solid var(--border);
}
.docs-toc-mobile a:hover { color: var(--gold-light); background: rgba(201, 168, 76, 0.04); }

/* ── Header ────────────────────────────────────────────────────────── */
.docs-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.docs-header .eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}
.docs-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 0.65rem;
  color: var(--text);
  letter-spacing: -0.005em;
}
.docs-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold), var(--gold-light) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.docs-subtitle {
  margin: 0;
  font-family: var(--font-prose);
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.55;
}

/* ── Content typography ────────────────────────────────────────────── */
.docs-content h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--gold-light);
  margin: 3rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.005em;
  scroll-margin-top: calc(var(--nav-height, 64px) + 16px);
}
.docs-content h2:first-of-type { margin-top: 0; }
.docs-content h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.85rem 0 0.7rem;
  letter-spacing: 0.005em;
  scroll-margin-top: calc(var(--nav-height, 64px) + 16px);
}
.docs-content p {
  font-family: var(--font-prose);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.docs-content ul,
.docs-content ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
.docs-content li {
  font-family: var(--font-prose);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.docs-content strong { color: var(--text); font-weight: 700; }
.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid var(--gold-dim);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--gold-light);
}
.docs-content a {
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.docs-content a:hover { text-decoration-color: var(--gold); }

/* ── Cards ─────────────────────────────────────────────────────────── */
.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.docs-card {
  position: relative;
  background: rgba(7, 8, 13, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  transition: border-color 0.2s, background 0.2s;
}
.docs-card:hover { border-color: var(--gold-dim); background: rgba(7, 8, 13, 0.7); }
.docs-card-gold {
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.01)),
    rgba(7, 8, 13, 0.55);
  border-color: var(--gold-dim);
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.06);
}
.docs-card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid var(--gold-dim);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.docs-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.docs-card ul,
.docs-card ol { margin-bottom: 0; padding-left: 1.2rem; }

.docs-feature-list { padding-left: 1.4rem; }
.docs-feature-list li { margin-bottom: 0.45rem; }

/* ── Built-in plugin grid (replaces the flat list) ─────────────────── */
.docs-plug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}
.docs-plug {
  background: rgba(7, 8, 13, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.05rem;
  transition: border-color 0.2s, background 0.2s, transform 0.18s;
}
.docs-plug:hover {
  border-color: var(--gold-dim);
  background: rgba(7, 8, 13, 0.72);
  transform: translateY(-1px);
}
.docs-plug-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.18));
}
.docs-plug-name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}
.docs-plug-desc {
  font-family: var(--font-prose);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ── FAQ progressive disclosure ────────────────────────────────────── */
.docs-faq-list { display: flex; flex-direction: column; gap: 0; }
.docs-faq-item.docs-faq-hidden { display: none; }
.docs-faq-more-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.5rem;
}
.docs-faq-more {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.10), rgba(201, 168, 76, 0.02)),
    rgba(7, 8, 13, 0.55);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: background 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.docs-faq-more:hover {
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.18), rgba(201, 168, 76, 0.06)),
    rgba(7, 8, 13, 0.65);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.18);
}
.docs-faq-more:active { transform: translateY(1px); }
.docs-faq-more-count {
  font-weight: 400;
  color: var(--muted2, var(--muted));
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.74rem;
}

/* Numbered steps with gold counters */
.docs-steps {
  counter-reset: docs-step;
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 1rem;
}
.docs-steps li {
  counter-increment: docs-step;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.7rem;
}
.docs-steps li::before {
  content: counter(docs-step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
}

/* ── FAQ accordion items ───────────────────────────────────────────── */
.docs-faq-item {
  background: rgba(7, 8, 13, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.55rem;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.docs-faq-item:hover { border-color: var(--gold-dim); }
.docs-faq-item[open] {
  border-color: var(--gold-dim);
  background: rgba(15, 12, 6, 0.65);
}
.docs-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.docs-faq-item[open] summary { color: var(--gold-light); }
.docs-faq-item summary::-webkit-details-marker { display: none; }
.docs-faq-icon {
  flex-shrink: 0;
  color: var(--gold-dim);
  transition: transform 0.25s, color 0.2s;
}
.docs-faq-item:hover .docs-faq-icon { color: var(--gold); }
.docs-faq-item[open] .docs-faq-icon { transform: rotate(45deg); color: var(--gold); }
.docs-faq-answer {
  padding: 0 1.2rem 1.05rem;
}
.docs-faq-answer p {
  font-family: var(--font-prose);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.docs-faq-answer p:last-child { margin: 0; }

/* ── "Still have questions?" help card ─────────────────────────────── */
.docs-help {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.02)),
    rgba(7, 8, 13, 0.6);
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.08);
}
.docs-help-icon {
  flex-shrink: 0;
  font-size: 1.6rem;
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(255, 213, 79, 0.55);
}
.docs-help-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.docs-help-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
}
.docs-help-text span { font-family: var(--font-prose); font-size: 0.88rem; color: var(--muted); }
.docs-help-cta {
  flex-shrink: 0;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--abyss) !important;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.docs-help-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 213, 79, 0.5);
}

/* ── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .docs-shell { grid-template-columns: 1fr; gap: 0; }
  .docs-toc { display: none; }
  .docs-toc-mobile { display: block; }
  .docs-card-grid { grid-template-columns: 1fr; }
  .docs-help { flex-direction: column; text-align: center; gap: 0.85rem; padding: 1.25rem 1rem; }
  .docs-help-text { align-items: center; }
}
