/* ═══════════════════════════════════════════
   LyraMaker — Guides / editorial pages
   Built on top of main.css variables (.gd-*)
═══════════════════════════════════════════ */

/* ── Shared hero for guides index & info pages ── */
.gd-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 7.5rem 1.5rem 1rem;
  text-align: center;
}
.gd-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.gd-hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin-bottom: .9rem;
}
.gd-hero-sub {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Guides index grid ── */
.gd-grid-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
}
.gd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}
.gd-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem 1.35rem;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.gd-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -18px var(--glow);
}
.gd-card-tag {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(130, 46, 245, .12);
  border-radius: 999px;
  padding: .3rem .65rem;
  margin-bottom: .9rem;
}
.gd-card h2,
.gd-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  margin-bottom: .55rem;
}
.gd-card p {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.gd-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--muted2);
}
.gd-card-meta .gd-dot { opacity: .6; }

/* ── Article layout ── */
.gd-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 7.5rem 1.5rem 4rem;
}
.gd-breadcrumb {
  font-size: .82rem;
  color: var(--muted2);
  margin-bottom: 1.4rem;
}
.gd-breadcrumb a { color: var(--muted); }
.gd-breadcrumb a:hover { color: var(--accent); }
.gd-breadcrumb span { opacity: .55; margin: 0 .35rem; }

.gd-article h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: .85rem;
}
.gd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  color: var(--muted2);
  padding-bottom: 1.6rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}
.gd-lede {
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--text);
  margin-bottom: 1.6rem;
}

.gd-article h2 {
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 2.6rem 0 .85rem;
  scroll-margin-top: calc(var(--appbar-h) + 1.5rem);
}
.gd-article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.9rem 0 .6rem;
  scroll-margin-top: calc(var(--appbar-h) + 1.5rem);
}
.gd-article p,
.gd-article li {
  font-size: .98rem;
  line-height: 1.75;
  color: var(--muted);
}
.gd-article p { margin-bottom: 1.05rem; }
.gd-article ul,
.gd-article ol {
  margin: 0 0 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.gd-article strong { color: var(--text); font-weight: 600; }
.gd-article a { color: var(--accent); text-decoration: none; }
.gd-article a:hover { text-decoration: underline; }
.gd-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .87em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1rem .35rem;
  color: var(--text);
}

/* ── Table of contents ── */
.gd-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2rem;
}
.gd-toc h2 {
  font-size: .74rem !important;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2);
  margin: 0 0 .7rem !important;
}
.gd-toc ol {
  margin: 0 0 0 1.1rem;
  gap: .4rem;
}
.gd-toc li { font-size: .9rem; }
.gd-toc a { color: var(--muted); }
.gd-toc a:hover { color: var(--accent); text-decoration: underline; }

/* ── Callout boxes ── */
.gd-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.gd-note.warn { border-left-color: var(--gold); }
.gd-note-title {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}
.gd-note.warn .gd-note-title { color: var(--gold); }
.gd-note p:last-child,
.gd-note ul:last-child { margin-bottom: 0; }

/* ── Tables ── */
.gd-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gd-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 440px;
}
.gd-article th,
.gd-article td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.gd-article th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .01em;
}
.gd-article tbody tr:last-child td { border-bottom: none; }

/* ── In-article generator CTA ── */
.gd-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(130, 46, 245, .13), rgba(130, 46, 245, .04));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin: 2.2rem 0;
}
.gd-cta-text { flex: 1 1 260px; }
.gd-cta-text strong {
  display: block;
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: .3rem;
}
.gd-cta-text span {
  font-size: .89rem;
  color: var(--muted);
  line-height: 1.55;
}
.gd-cta-btn {
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff !important;
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 1.25rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
.gd-cta-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* ── Next reads ── */
.gd-next {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.gd-next h2 { margin-top: 0 !important; font-size: 1.2rem !important; }
.gd-next-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
  margin: 0;
  list-style: none;
}
.gd-next-list li { margin: 0; }
.gd-next-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.05rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text) !important;
  line-height: 1.45;
  transition: border-color .18s ease, transform .18s ease;
}
.gd-next-list a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none !important;
}

/* ── Contact / info cards ── */
.gd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0 2rem;
}
.gd-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
}
.gd-info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.gd-info-card p {
  font-size: .91rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.gd-info-card p:last-child { margin-bottom: 0; }
.gd-info-card a { color: var(--accent); }
.gd-info-card a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .gd-hero { padding-top: 6rem; }
  .gd-article { padding-top: 6rem; }
  .gd-cta { flex-direction: column; align-items: flex-start; }
}

/* ── FAQ (native details, no JS) ── */
.gd-faq { margin-top: 1rem; }
.gd-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  overflow: hidden;
}
.gd-faq-item > summary {
  cursor: pointer;
  list-style: none;
  padding: .95rem 1.2rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.gd-faq-item > summary::-webkit-details-marker { display: none; }
.gd-faq-item > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s ease;
}
.gd-faq-item[open] > summary::after { transform: rotate(45deg); }
.gd-faq-item > summary:hover { color: var(--accent); }
.gd-faq-item > div { padding: 0 1.2rem 1.05rem; }
.gd-faq-item > div p {
  font-size: .93rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ── h3 support for the older .legal-page layout (privacy, terms) ── */
.legal-page h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.7rem 0 .55rem;
  letter-spacing: -.005em;
}
.legal-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .87em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1rem .35rem;
  color: var(--text);
}
