/* ==========================================================================
   Guides (articles + hub). Loads after styles.css
   ========================================================================== */
.g { font-variant-numeric: lining-nums; }
.g-nav { display: flex; align-items: center; gap: 26px; }
.g-nav a { font: 500 15px/1 var(--font-body); color: var(--ink); text-decoration: none; }
.g-nav a:hover, .g-nav a[aria-current] { color: var(--gold-text); }
.g-head-right { display: flex; align-items: center; gap: 22px; }
.g-short { display: none; }

/* hero */
.g-hero { padding: calc(var(--header-h) + 56px) 0 40px; background: radial-gradient(60% 80% at 85% 0%, rgba(233,217,183,.55), transparent 60%), var(--ivory); }
.g-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-muted); list-style: none; padding: 0; margin: 0 0 22px; }
.g-crumbs a { color: var(--ink-muted); text-decoration: none; }
.g-crumbs a:hover { color: var(--forest); text-decoration: underline; }
.g-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--sandstone); }
.g-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
.g-hero h1 { font-size: clamp(38px, 4.8vw, 62px); line-height: 1.04; margin-top: 14px; max-width: 900px; letter-spacing: -.015em; }
.g-lead { margin-top: 22px; font-size: 19.5px; line-height: 1.6; color: #4A463D; max-width: 760px; }
.g-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 14px; color: var(--ink-muted); }
.g-byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--gold-pale); }
.g-byline strong { display: block; color: var(--ink); font-size: 15px; }
.g-byline a { color: inherit; }

/* layout */
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; padding-block: 40px 80px; }
.g-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.g-toc { padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ivory-light); }
.g-toc h2 { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.g-toc ol { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 9px; }
.g-toc a { font-size: 14.5px; color: var(--ink-muted); text-decoration: none; line-height: 1.35; display: block; }
.g-toc a:hover { color: var(--forest); }
.g-side-cta { padding: 22px; border-radius: var(--radius-lg); background: var(--forest); color: var(--cream-text); }
.g-side-cta img { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.g-side-cta strong { display: block; font-family: var(--font-display); font-size: 23px; font-weight: 600; color: var(--white); margin-top: 14px; line-height: 1.15; }
.g-side-cta p { font-size: 14px; color: rgba(240,231,214,.8); margin-top: 6px; }
.g-side-cta .btn { margin-top: 16px; width: 100%; }

/* prose */
.g-prose { font-size: 18px; line-height: 1.75; color: #34312A; max-width: 740px; }
.g-prose > * + * { margin-top: 20px; }
.g-prose h2 { font-size: clamp(30px, 3vw, 38px); color: var(--forest); margin-top: 52px; line-height: 1.1; scroll-margin-top: calc(var(--header-h) + 20px); }
.g-prose h2:first-child { margin-top: 0; }
.g-prose h3 { font-size: 25px; margin-top: 32px; }
.g-prose a { color: var(--forest); font-weight: 500; text-decoration-color: rgba(36,61,50,.35); text-underline-offset: 3px; }
.g-prose a:hover { text-decoration-color: var(--forest); }
.g-prose ul, .g-prose ol { padding-left: 24px; }
.g-prose li + li { margin-top: 8px; }
.g-prose ol.steps { list-style: none; padding: 0; counter-reset: st; display: grid; gap: 12px; }
.g-prose ol.steps li { counter-increment: st; position: relative; padding: 16px 18px 16px 62px; background: var(--ivory-light); border: 1px solid var(--line); border-radius: var(--radius-md); margin: 0; }
.g-prose ol.steps li::before { content: counter(st); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--gold-light); font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.g-prose em { font-style: italic; }
.g-prose .small { font-size: 14px; color: var(--ink-muted); margin-top: 8px; }
.g-prose .big-eq { padding: 22px 24px; border-radius: var(--radius-md); background: linear-gradient(135deg, #FBF6EC, #F1E5CC); border: 1px solid #DCC79D; font-size: 20px; text-align: center; color: var(--forest); }
.g-prose .callout { padding: 18px 22px; border-left: 3px solid var(--gold); background: rgba(233,217,183,.3); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.g-prose blockquote.note { margin: 28px 0 0; padding: 24px 26px; border-radius: var(--radius-lg); background: var(--forest); color: var(--cream-text); }
.g-prose blockquote.note p { font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.45; color: var(--white); }
.g-prose blockquote.note cite { display: block; margin-top: 10px; font-style: normal; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }
.g-prose blockquote.note cite::before { content: "— "; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--ivory-light); }
.g-prose table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.g-prose th, .g-prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-prose th { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); background: rgba(233,217,183,.25); }
.g-prose tr:last-child td { border-bottom: 0; }
.g-prose td:first-child { white-space: nowrap; font-weight: 500; }

/* in-article CTA */
.g-cta { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; margin: 40px 0 !important; padding: 24px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #FBF6EC, #F1E5CC); border: 1px solid #DCC79D; }
.g-cta img { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-soft); }
.g-cta-kicker { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.g-cta strong { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 600; line-height: 1.15; color: var(--ink); margin-top: 4px; }
.g-cta p { font-size: 15.5px; line-height: 1.55; color: #4A463D; margin-top: 6px !important; }
.g-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.g-cta-actions .btn { text-decoration: none; color: var(--white); font-weight: 600; }
.g-cta-actions .g-direct { font-size: 14px; color: var(--ink-muted); font-weight: 500; }

/* FAQ, author, end CTA, related */
.g-faq { margin-top: 56px; }
.g-faq h2 { font-size: clamp(30px, 3vw, 38px); color: var(--forest); }
.g-faq details { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--ivory-light); }
.g-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 600; font-size: 17px; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--gold-text); flex: none; transition: transform .25s var(--ease); }
.g-faq details[open] summary::after { transform: rotate(45deg); }
.g-faq details p { padding: 0 22px 20px; font-size: 16px; line-height: 1.65; color: #4A463D; }
.g-author { display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: center; margin-top: 48px; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--ivory-light); }
.g-author img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.g-author strong { font-family: var(--font-display); font-size: 23px; font-weight: 600; }
.g-author p { font-size: 15px; line-height: 1.6; color: #4A463D; margin-top: 4px; }
.g-author a { color: var(--forest); font-weight: 600; }
.g-end { background: var(--forest-deep); color: var(--cream-text); text-align: center; padding-block: 88px; position: relative; overflow: hidden; }
.g-end h2 { color: var(--white); font-size: clamp(34px, 4.4vw, 54px); max-width: 820px; margin-inline: auto; }
.g-end h2 em { color: var(--gold-light); }
.g-end p { margin: 18px auto 0; max-width: 600px; color: rgba(240,231,214,.8); font-size: 17.5px; }
.g-end .hero-ctas { justify-content: center; }
.g-end .g-direct { display: inline-block; margin-top: 18px; font-size: 14px; color: rgba(240,231,214,.65); }
.g-related { padding-block: 80px; }
.g-related h2 { font-size: clamp(30px, 3vw, 40px); text-align: center; }
.g-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.g-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--ivory-light); border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.g-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.g-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.g-card div { padding: 20px 22px 24px; }
.g-card span { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.g-card h3 { font-size: 23px; line-height: 1.15; margin-top: 8px; }
.g-card p { font-size: 15px; color: var(--ink-muted); margin-top: 8px; }

/* hub */
.g-hub-grid { padding-block: 24px 88px; }
.g-hub-grid .g-cards { margin-top: 0; }

/* footer (shared with product page look) */
.g-footer { padding-top: 48px; padding-bottom: 48px; }
.g-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.g-footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.g-footer nav a { color: rgba(240,231,214,.8); text-decoration: none; font-size: 15px; }
.g-footer nav a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.g-footer .footer-bottom { margin-top: 32px; }

@media (max-width: 1100px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-aside { position: static; order: -1; margin-bottom: 28px; }
  .g-side-cta { display: none; }
  .g-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .g-nav { display: none; }
}
@media (max-width: 640px) {
  .g .brand-name { font-size: 18px; white-space: nowrap; }
  .g .brand-tag { display: none; }
  .g .brand { gap: 8px; }
  .g-head-right .btn { padding-inline: 14px; font-size: 13px; min-height: 40px; }
  .g-long { display: none; }
  .g-short { display: inline; }
  .g-prose td:first-child { white-space: normal; }
  .g-hero { padding-top: calc(var(--header-h) + 32px); }
  .g-hero h1 { font-size: 36px; }
  .g-lead { font-size: 17.5px; }
  .g-prose { font-size: 17px; }
  .g-prose h2 { font-size: 29px; }
  .g-prose ol.steps li { padding: 14px 14px 14px 54px; }
  .g-prose ol.steps li::before { left: 12px; }
  .g-cta { grid-template-columns: 1fr; text-align: left; }
  .g-cta img { width: 88px; height: 88px; }
  .g-cta-actions .btn { width: 100%; }
  .g-author { grid-template-columns: 64px 1fr; padding: 18px; }
  .g-author img { width: 64px; height: 64px; }
  .g-cards { grid-template-columns: 1fr; }
  .g-end .btn { width: 100%; white-space: normal; }
}

/* ==========================================================================
   v3: conversion pass (byline link, mid product card, proof, richer end)
   ========================================================================== */
.g-stars { display: inline-flex; gap: 2px; color: var(--gold); }
.g-stars svg { width: 14px; height: 14px; }

/* "Drawn from my 101-page Hifz system" line under the byline */
.g-from { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 9px 16px; border-radius: 999px; background: rgba(252,250,245,.8); border: 1px solid #DCC79D; font-size: 14px; color: var(--ink-muted); }
.g-from svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.g-from a { color: var(--forest); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(36,61,50,.35); text-underline-offset: 3px; }

/* Mid-article product card */
.g-prose .g-offer { margin: 44px 0 !important; padding: 26px 26px 24px; border-radius: var(--radius-lg); background: linear-gradient(140deg, #FBF6EC, #F1E5CC); border: 1px solid #DCC79D; box-shadow: 0 18px 40px rgba(45,35,22,.08); }
.g-offer-top { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.g-offer-top img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-soft); }
.g-offer-title { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.05; color: var(--ink); margin-top: 4px; }
.g-offer-proof { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--forest); }
.g-prose .g-offer-hook { margin-top: 18px !important; font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.35; color: var(--forest); }
.g-prose .g-offer-list { list-style: none; padding: 0; margin-top: 14px !important; display: grid; gap: 9px; }
.g-prose .g-offer-list li { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.g-offer-list svg { width: 20px; height: 20px; color: var(--forest); flex: none; margin-top: 2px; }
.g-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.g-prose .g-offer-actions .btn { color: var(--white); text-decoration: none; font-weight: 600; min-height: 56px; padding-inline: 30px; font-size: 16px; }
.g-prose .g-offer-free { font-size: 14.5px; font-weight: 500; color: var(--ink-muted); }

/* Sidebar proof */
.g-side-proof { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--gold-light); }
.g-side-proof .g-stars { color: var(--gold-light); }

/* Richer end section */
.g-end--offer { text-align: left; }
.g-end-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.g-end-art img { width: 100%; max-width: 440px; border-radius: var(--radius-lg); box-shadow: 0 30px 60px rgba(0,0,0,.35); display: block; margin-inline: auto; }
.g-end-proof { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(213,183,121,.35); font-size: 13px; font-weight: 600; color: var(--cream-text); }
.g-end-proof .g-stars { color: var(--gold-light); }
.g-end--offer h2 { margin: 18px 0 0; text-align: left; }
.g-end--offer p { margin: 16px 0 0; }
.g-end-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 15px; color: var(--white); }
.g-end-list li { display: flex; align-items: center; gap: 10px; }
.g-end-list svg { width: 20px; height: 20px; color: var(--gold-light); flex: none; }
.g-end--offer .hero-ctas { justify-content: flex-start; margin-top: 28px; }
.g-end-review { margin: 30px 0 0; padding: 18px 20px; border-left: 3px solid var(--gold-light); background: rgba(255,255,255,.04); border-radius: 0 12px 12px 0; }
.g-end-review blockquote { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 19px; line-height: 1.45; color: var(--white); }
.g-end-review figcaption { margin-top: 8px; font-size: 13px; color: rgba(240,231,214,.7); }
.g-end-review strong { color: var(--gold-light); }
.g-end .g-end-proof + h2 { margin-top: 18px; }

@media (max-width: 960px) {
  .g-end-grid { grid-template-columns: 1fr; gap: 36px; }
  .g-end-art img { max-width: 320px; }
}
@media (max-width: 640px) {
  .g .brand-name { font-size: 17px; }
  .g-from { border-radius: 14px; align-items: flex-start; font-size: 13.5px; padding: 9px 13px; }
  .g-prose .g-offer { padding: 20px 18px; }
  .g-offer-top { grid-template-columns: 72px 1fr; gap: 14px; }
  .g-offer-top img { width: 72px; height: 72px; }
  .g-offer-title { font-size: 25px; }
  .g-prose .g-offer-hook { font-size: 19px; }
  .g-prose .g-offer-list li { font-size: 15.5px; }
  .g-offer-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .g-prose .g-offer-actions .btn { width: 100%; }
  .g-end-list { grid-template-columns: 1fr; }
  .g-end-art img { max-width: 220px; }
  .g-end--offer { padding-block: 64px; }
  .g-offer .g-cta-kicker { font-size: 10.5px; letter-spacing: .12em; }
  .g-end-review blockquote { font-size: 17.5px; }
}

/* v5 · AskHafiz-first articles: real conversation screenshots + alt link */
.g-prose .g-shot { margin: 30px 0 34px; }
.g-shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.g-shot-pair img { width: 100%; height: auto; border-radius: 14px; background: #0d0d0d; border: 1px solid #2a2a2a; box-shadow: 0 18px 40px rgba(20,15,8,.18); }
.g-prose .g-shot figcaption { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--ink-muted); text-align: center; }
.g-end-alt { margin-top: 16px; font-size: 14.5px; color: rgba(240,231,214,.75); }
.g-end-alt a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.g-end--ah .g-end-art img { max-width: 400px; background: #0d0d0d; border: 1px solid rgba(213,183,121,.35); }
@media (max-width: 640px) { .g-shot-pair { grid-template-columns: 1fr; } }
