/**
 * Reference-guide pages (/guides/*).
 *
 * These are documents, not landing pages: long-form, text-forward, built to be
 * read and to be quoted. They reuse the brand tokens but deliberately drop the
 * marketing-page furniture (full-bleed heroes, bento grids, reveal animation)
 * because none of it helps someone reading an answer.
 *
 * Tokens are redeclared here because /guides pages don't inherit the :root
 * block that lives inline in each of the four original landing pages.
 */
:root {
    --color-rose-darbar:  #8B2E55;
    --color-sona-gold:    #C49A3C;
    --color-gold-ink:     #7E5F1B;
    --color-malai-cream:  #FAF7F2;
    --color-kesar-brown:  #3D2E26;
    --color-warm:         #F5EEE6;
    --color-warm-border:  #E4D9D0;
    --color-mocha:        #6B5B52;
    --color-muted:        #7A6657;
    --shadow-brand-md:    0 8px 28px rgba(139, 46, 85, .28);
    --shadow-brand-lg:    0 14px 36px rgba(139, 46, 85, .35);
    --shadow-gold:        0 0 24px rgba(196, 154, 60, .4);
    --font-display:       'Cormorant Garamond', Georgia, serif;
    --font-body:          'Inter', system-ui, sans-serif;
    --font-urdu:          'Noto Nastaliq Urdu', serif;
    --ease-default:       cubic-bezier(.4, 0, .2, 1);
    --ease-out-expo:      cubic-bezier(.22, 1, .36, 1);
    --wrap:               1152px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: inherit; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
html { scroll-behavior: smooth; }
body {
    background: var(--color-malai-cream);
    color: var(--color-kesar-brown);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav (mirrors the landing pages so the guides read as the same site) ── */
.nav-fixed {
    position: fixed; left: 0; right: 0; top: 0; z-index: 50;
    background: rgba(250, 247, 242, .88);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-warm-border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-link { font-size: .8125rem; letter-spacing: .06em; color: var(--color-mocha); }
.nav-link:hover { color: var(--color-rose-darbar); }
@media (max-width: 780px) { .nav-links .nav-link { display: none; } }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: .9rem 2rem; border-radius: 99px; border: 1px solid transparent;
    font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    cursor: pointer;
    transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease-out-expo);
}
.btn-primary { background: var(--color-rose-darbar); color: #fff; box-shadow: var(--shadow-brand-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-brand-lg), var(--shadow-gold); }
.btn-ghost { border-color: rgba(107, 91, 82, .38); background: rgba(255, 255, 255, .5); color: var(--color-kesar-brown); }
.btn-ghost:hover { background: var(--color-warm); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--color-rose-darbar); outline-offset: 3px; }

/* ── Article shell ──────────────────────────────────────────────────────── */
.guide-main { padding-top: 68px; }
.guide-head { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--color-warm-border); }
.guide-shell { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }

.crumbs { font-size: .75rem; letter-spacing: .06em; color: var(--color-muted); margin-bottom: 1.5rem; }
.crumbs a {
    display: inline-flex;
    align-items: center;
    /* Left-aligned rather than centred so the first crumb stays flush with the
       h1 below it; the box grows to the right to reach the 44px minimum. */
    justify-content: flex-start;
    min-height: 44px;
    min-width: 44px;
    color: var(--color-gold-ink);
}
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 .45rem; opacity: .6; }

.guide-h1 {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(2.15rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -.01em;
}
.guide-h1 em { color: var(--color-rose-darbar); font-style: italic; }
.guide-lede { margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.75; color: var(--color-mocha); }
.guide-meta { margin-top: 1.5rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }

/* ── Table of contents ──────────────────────────────────────────────────── */
.toc {
    margin: 2.5rem 0 0; padding: 1.5rem 1.75rem;
    background: var(--color-warm); border: 1px solid var(--color-warm-border); border-radius: 16px;
}
.toc h2 {
    font-size: .75rem; letter-spacing: .15em; text-transform: uppercase;
    color: var(--color-gold-ink); font-weight: 500; margin-bottom: .9rem;
}
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin: .4rem 0; font-size: .9375rem; line-height: 1.5; }
.toc a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-kesar-brown);
}
.toc a:hover { color: var(--color-rose-darbar); text-decoration: underline; }

/* ── Prose ──────────────────────────────────────────────────────────────── */
.prose { padding: 2.5rem 0 1rem; }
.prose h2 {
    margin: 3rem 0 1rem; font-family: var(--font-display); font-weight: 400;
    font-size: clamp(1.7rem, 3.2vw, 2.15rem); line-height: 1.2; scroll-margin-top: 90px;
}
.prose h3 {
    margin: 2rem 0 .65rem; font-size: 1.0625rem; font-weight: 600;
    line-height: 1.45; color: var(--color-kesar-brown); scroll-margin-top: 90px;
}
.prose p { margin: 0 0 1.1rem; font-size: 1rem; line-height: 1.8; color: var(--color-mocha); }
.prose strong { color: var(--color-kesar-brown); font-weight: 600; }
.prose a { color: var(--color-rose-darbar); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.35rem; }
.prose li { margin: .5rem 0; font-size: 1rem; line-height: 1.75; color: var(--color-mocha); }
.prose li strong { color: var(--color-kesar-brown); }
.prose > :first-child { margin-top: 0; }

/* Key-fact callout — the sentence most worth quoting from a section. */
.keynote {
    margin: 1.75rem 0; padding: 1.25rem 1.5rem;
    background: #fff; border-left: 3px solid var(--color-rose-darbar); border-radius: 0 12px 12px 0;
    font-size: 1rem; line-height: 1.7; color: var(--color-kesar-brown);
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 1.5rem 0 1.75rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 480px; }
caption {
    caption-side: top; text-align: left; padding-bottom: .75rem;
    font-size: .8125rem; color: var(--color-muted); font-style: italic;
}
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--color-warm-border); }
th { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--color-gold-ink); font-weight: 600; }
td { color: var(--color-mocha); line-height: 1.6; }
tbody tr:last-child td { border-bottom: 0; }

/* ── Works / doesn't work columns ───────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 1.75rem 0; }
@media (max-width: 620px) { .split { grid-template-columns: 1fr; } }
.split-card { padding: 1.35rem 1.5rem; border-radius: 16px; border: 1px solid var(--color-warm-border); background: #fff; }
.split-card h3 { margin: 0 0 .8rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.split-yes h3 { color: #2F6B4F; }
.split-no  h3 { color: #9A4A2F; }
.split-card ul { margin: 0; padding-left: 1.1rem; }
.split-card li { font-size: .9375rem; line-height: 1.6; margin: .45rem 0; color: var(--color-mocha); }

/* ── Glossary ───────────────────────────────────────────────────────────── */
.glossary { margin: 2rem 0; }
.glossary dt {
    margin-top: 1.5rem; font-size: 1.0625rem; font-weight: 600;
    color: var(--color-kesar-brown); scroll-margin-top: 90px;
}
.glossary dt .term-urdu {
    font-family: var(--font-urdu); font-size: .95rem; font-weight: 400;
    color: var(--color-gold-ink); margin-left: .6rem;
}
.glossary dd { margin: .4rem 0 0; font-size: .9375rem; line-height: 1.75; color: var(--color-mocha); }

/* ── End CTA and related links ──────────────────────────────────────────── */
.guide-cta {
    margin: 3.5rem 0 0; padding: 2.25rem; border-radius: 20px;
    background: var(--color-warm); border: 1px solid var(--color-warm-border); text-align: center;
}
.guide-cta h2 {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin-bottom: .75rem;
}
.guide-cta p { max-width: 46ch; margin: 0 auto 1.5rem; font-size: .9375rem; line-height: 1.7; color: var(--color-mocha); }

.related { margin: 3rem 0 5rem; padding-top: 2rem; border-top: 1px solid var(--color-warm-border); }
.related h2 { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--color-gold-ink); font-weight: 500; margin-bottom: 1.1rem; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { margin: .7rem 0; }
.related a { font-size: 1rem; line-height: 1.5; color: var(--color-kesar-brown); }
.related a:hover { color: var(--color-rose-darbar); text-decoration: underline; }
.related .rel-note { display: block; font-size: .875rem; color: var(--color-muted); margin-top: .15rem; }

/* ── Guides index ───────────────────────────────────────────────────────── */
.guide-grid { display: grid; gap: 1.25rem; margin: 2.5rem 0 5rem; }
.guide-card {
    display: block; padding: 1.6rem 1.75rem; border-radius: 18px;
    border: 1px solid var(--color-warm-border); background: #fff;
    transition: transform .25s var(--ease-out-expo), box-shadow .25s var(--ease-out-expo);
}
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(61, 46, 38, .08); }

/* The index's card grid sits inside .prose, whose `.prose a` rule underlines
   anchors — and text-decoration propagates to every descendant, so the whole
   card (title, blurb, tag) came out underlined. `.guide-card` alone loses on
   specificity to `.prose a`, hence the qualified selector. */
.prose a.guide-card,
.prose a.guide-card:hover {
    text-decoration: none;
}
.guide-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.25; margin-bottom: .5rem; }
.guide-card p { font-size: .9375rem; line-height: 1.7; color: var(--color-mocha); }
.guide-card .card-tag { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--color-gold-ink); margin-bottom: .6rem; }

/* ── Footer (matches the landing pages) ─────────────────────────────────── */
footer { background: var(--color-kesar-brown); padding: 2.25rem 0; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(196, 154, 60, .35);
    color: var(--color-sona-gold);
    transition: border-color .25s, background-color .25s;
}
.social:hover { border-color: var(--color-sona-gold); background: rgba(196, 154, 60, .08); }
.foot-link { font-size: .8125rem; }
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(250, 247, 242, .12); }
.foot-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .35rem;
    font-size: .8125rem;
    color: rgba(250, 247, 242, .75);
}
.foot-legal a:hover { color: #fff; }
