/* ==========================================================================
   Anwar Kamal — editorial poetry theme
   Motif: the mihrab arch. Paper + ink palette, maroon accent, gold detail.
   Urdu in Noto Nastaliq Urdu, Hindi in Noto Serif Devanagari.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
    --paper: #f7f2e9;
    --paper-2: #efe7d9;
    --surface: #fffcf6;
    --ink: #1d1a16;
    --ink-2: #4a443b;
    --muted: #7a7064;
    --rule: #e4d9c7;
    --rule-strong: #cdbfa8;
    --accent: #8b2c35;
    --accent-hover: #74222a;
    --accent-ink: #fff8f0;
    --accent-soft: rgba(139, 44, 53, 0.08);
    --gold: #9a6f22;
    --gold-soft: rgba(169, 124, 47, 0.13);
    --green: #2f6b4f;
    --green-soft: rgba(47, 107, 79, 0.11);
    --saffron: #b0571c;
    --saffron-soft: rgba(176, 87, 28, 0.11);
    --success: #2f6b4f;
    --warning: #9a6f22;
    --danger: #a3343a;
    --band: #1f1a16;
    --band-2: #2a231d;
    --band-ink: #f3ecdf;
    --band-muted: #b5aa98;
    --band-gold: #dcb26a;
    --shadow-sm: 0 1px 2px rgba(29, 26, 22, 0.05);
    --shadow: 0 18px 40px -20px rgba(29, 26, 22, 0.28);
    --radius: 20px;
    --radius-sm: 12px;
    --container: 1220px;
    --masthead-h: 96px;

    --font-display: 'Fraunces', 'Noto Serif Devanagari', Georgia, serif;
    --font-body: 'Figtree', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --paper: #14110e;
    --paper-2: #1d1915;
    --surface: #1a1612;
    --ink: #f1eadd;
    --ink-2: #d3c9b9;
    --muted: #9d9282;
    --rule: #312b24;
    --rule-strong: #4a4238;
    --accent: #e08a92;
    --accent-hover: #eaa0a7;
    --accent-ink: #1d1214;
    --accent-soft: rgba(224, 138, 146, 0.12);
    --gold: #dcb26a;
    --gold-soft: rgba(220, 178, 106, 0.14);
    --green: #86c9a6;
    --green-soft: rgba(134, 201, 166, 0.12);
    --saffron: #ecaa74;
    --saffron-soft: rgba(236, 170, 116, 0.13);
    --success: #86c9a6;
    --warning: #dcb26a;
    --danger: #f0959a;
    --band: #0c0a08;
    --band-2: #17130f;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #14110e;
        --paper-2: #1d1915;
        --surface: #1a1612;
        --ink: #f1eadd;
        --ink-2: #d3c9b9;
        --muted: #9d9282;
        --rule: #312b24;
        --rule-strong: #4a4238;
        --accent: #e08a92;
        --accent-hover: #eaa0a7;
        --accent-ink: #1d1214;
        --accent-soft: rgba(224, 138, 146, 0.12);
        --gold: #dcb26a;
        --gold-soft: rgba(220, 178, 106, 0.14);
        --green: #86c9a6;
        --green-soft: rgba(134, 201, 166, 0.12);
        --saffron: #ecaa74;
        --saffron-soft: rgba(236, 170, 116, 0.13);
        --success: #86c9a6;
        --warning: #dcb26a;
        --danger: #f0959a;
        --band: #0c0a08;
        --band-2: #17130f;
        --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

html.menu-open body {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0;
}

img,
svg {
    display: block;
    max-width: 100%;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--ink);
    font-weight: 400;
}

ul, ol, dl, dd, figure, fieldset {
    margin: 0;
    padding: 0;
}

fieldset {
    border: 0;
    min-width: 0;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.container-narrow {
    max-width: 840px;
}

.section {
    padding: 48px 0;
}

.urdu,
.rtl {
    font-family: var(--font-urdu);
    font-style: normal;
    letter-spacing: 0;
}

.rtl {
    direction: rtl;
    text-align: right;
}

.muted {
    color: var(--muted);
}

/* ---------- Typography ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: currentColor;
}

.display {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6.4vw, 5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variation-settings: 'opsz' 144;
}

.display em,
.heading-xl em,
.heading-lg em {
    font-style: italic;
    color: var(--accent);
}

.heading-xl {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.heading-lg {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.heading-md {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.lede {
    margin-top: 20px;
    max-width: 560px;
    color: var(--ink-2);
    font-size: 1.12rem;
    line-height: 1.7;
}

.body-text {
    margin-top: 14px;
    max-width: 560px;
    color: var(--muted);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.section-head .eyebrow {
    margin-bottom: 10px;
}

.section-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.94rem;
}

.text-link {
    display: inline-flex;
    gap: 6px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.text-link:hover {
    gap: 10px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: none;
}

.btn-accent {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.btn-ink {
    background: var(--ink);
    color: var(--paper);
}

.btn-ink:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-outline {
    background: transparent;
    border-color: var(--rule-strong);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--ink);
}

.btn-light {
    background: var(--band-ink);
    color: var(--band);
}

.btn-light:hover {
    background: #fff;
}

.btn-ghost-light {
    background: transparent;
    border-color: rgba(243, 236, 223, 0.3);
    color: var(--band-ink);
}

.btn-ghost-light:hover {
    border-color: var(--band-ink);
}

.btn-sm {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* ---------- Topbar ---------- */

.topbar {
    background: var(--band);
    color: var(--band-muted);
    font-size: 0.82rem;
}

.topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-note {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-note .urdu {
    color: var(--band-gold);
    font-size: 0.9rem;
    line-height: 1;
    padding-top: 4px;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-links a {
    color: var(--band-ink);
    transition: color 0.2s ease;
}

.topbar-links a:hover,
.topbar-links a.is-current {
    color: var(--band-gold);
}

.topbar-user strong {
    color: var(--band-ink);
    font-weight: 600;
}

/* ---------- Masthead ---------- */

.masthead {
    background: var(--paper);
}

.masthead-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    height: var(--masthead-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1;
}

.brand-urdu {
    color: var(--gold);
    font-family: var(--font-urdu);
    font-size: 0.95rem;
    line-height: 1.6;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    font-variation-settings: 'opsz' 144;
}

.brand-tag {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.masthead-search,
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 260px;
}

.masthead-search svg,
.nav-search svg {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--muted);
    pointer-events: none;
}

.masthead-search input,
.nav-search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 40px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.masthead-search input:focus,
.nav-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.masthead-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--ink);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun {
        display: block;
    }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon {
        display: none;
    }
}

.menu-toggle {
    display: none;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
    display: block;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, background 0.25s ease;
}

.menu-lines {
    position: relative;
}

.menu-lines::before,
.menu-lines::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-lines::before { top: -5px; }
.menu-lines::after { top: 5px; }

.menu-toggle[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-lines::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Main navigation ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    backdrop-filter: saturate(150%) blur(14px);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    transition: box-shadow 0.25s ease;
}

.site-nav.is-stuck {
    box-shadow: 0 8px 24px -18px rgba(29, 26, 22, 0.4);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: center;
}

.nav-search,
.nav-cta,
.nav-item.mobile-only,
.submenu-toggle,
.nav-scrim {
    display: none;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item {
    position: relative;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 16px 14px;
    color: var(--ink-2);
    font-size: 0.93rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-item.active > .nav-link {
    color: var(--ink);
}

.nav-link:hover::after,
.nav-item.active > .nav-link::after {
    transform: scaleX(1);
}

.nav-caret {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    opacity: 0.6;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 440px;
    padding: 18px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-label {
    margin: 0 8px 10px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-dropdown-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    max-height: 60vh;
    overflow-y: auto;
}

.nav-dropdown-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink-2);
    font-size: 0.93rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-grid a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-dropdown-grid .urdu {
    color: var(--gold);
    font-size: 0.85rem;
    line-height: 1.8;
}

.nav-empty {
    display: block;
    padding: 9px 12px;
    color: var(--muted);
}

/* ---------- Form controls ---------- */

.field label,
.form-section legend,
.form-optional summary {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-2);
    font-size: 0.84rem;
    font-weight: 600;
}

.field label small {
    margin-left: 6px;
    color: var(--muted);
    font-weight: 400;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: var(--muted);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7064' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.7;
}

.textarea-verse {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.9;
}

.input[dir="rtl"],
.textarea[dir="rtl"] {
    font-family: var(--font-urdu);
    line-height: 2.3;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.alert {
    margin: 0 0 22px;
    padding: 14px 18px;
    border-left: 3px solid;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
}

.alert.success {
    border-color: var(--success);
    background: var(--green-soft);
    color: var(--success);
}

.alert.error {
    border-color: var(--danger);
    background: var(--accent-soft);
    color: var(--danger);
}

/* ---------- Chips ---------- */

.lang-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: filter 0.2s ease;
}

.lang-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.lang-chip.lang-ur {
    background: var(--green-soft);
    color: var(--green);
}

.lang-chip.lang-hi {
    background: var(--saffron-soft);
    color: var(--saffron);
}

.lang-chip.lang-en_hi {
    background: var(--accent-soft);
    color: var(--accent);
}

a.lang-chip:hover {
    filter: brightness(0.9);
}

/* ---------- Home hero ---------- */

.home-hero {
    position: relative;
    padding: 72px 0 40px;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    right: -10%;
    top: -30%;
    width: 60%;
    height: 120%;
    background: radial-gradient(closest-side, var(--gold-soft), transparent);
    pointer-events: none;
}

.home-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
    align-items: center;
}

.hero-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 560px;
    margin-top: 34px;
    padding: 6px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-search svg {
    width: 20px;
    height: 20px;
    margin-left: 14px;
    flex-shrink: 0;
    color: var(--muted);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.hero-search input::placeholder {
    color: var(--muted);
}

.lang-quick {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.88rem;
}

.lang-quick > span {
    margin-right: 4px;
}

.lang-quick .lang-chip {
    padding: 6px 13px;
    font-size: 0.74rem;
}

/* Arch feature card */

.home-hero-feature {
    display: flex;
    justify-content: flex-end;
}

.arch-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    min-height: 520px;
    padding: 150px 44px 40px;
    border-radius: 50% 50% 24px 24px / 30% 30% 24px 24px;
    background:
        radial-gradient(120% 60% at 50% 0%, var(--band-2), transparent 70%),
        var(--band);
    color: var(--band-ink);
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 80px -40px rgba(29, 26, 22, 0.55);
}

.arch-card::before {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(220, 178, 106, 0.32);
    border-radius: 50% 50% 14px 14px / 29% 29% 14px 14px;
    pointer-events: none;
}

.arch-card::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 62px;
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg);
    border: 1px solid var(--band-gold);
}

.arch-label {
    color: var(--band-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.arch-verse {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 22px 0;
    color: var(--band-ink);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.75;
    white-space: pre-line;
}

.arch-verse.rtl {
    text-align: center;
    font-family: var(--font-urdu);
    font-style: normal;
    font-size: 1.3rem;
    line-height: 2.5;
}

.arch-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 20px;
    border-top: 1px solid rgba(243, 236, 223, 0.12);
}

.arch-title {
    color: var(--band-ink);
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.arch-author {
    color: var(--band-muted);
    font-size: 0.9rem;
}

.arch-link {
    align-self: center;
    margin-top: 18px;
    color: var(--band-gold);
    font-size: 0.9rem;
    font-weight: 600;
}

.arch-link:hover {
    color: #fff;
}

/* Stat row */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-top: 64px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.stat-row > div {
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    padding: 24px 28px;
}

.stat-row > div + div {
    border-left: 1px solid var(--rule);
}

.stat-row dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stat-row dd {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-row-compact {
    max-width: 620px;
    margin-top: 32px;
}

.stat-row-compact > div {
    padding: 18px 22px;
}

.stat-row-compact > div:first-child {
    padding-left: 0;
}

.stat-row-compact dd {
    font-size: 2rem;
}

/* ---------- Poet section ---------- */

.poet-section {
    padding: 72px 0;
}

.poet-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 72px;
    align-items: center;
}

.poet-portrait {
    position: relative;
    max-width: 400px;
}

.arch-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 50% 50% 22px 22px / 38% 38% 22px 22px;
    background: var(--paper-2);
    box-shadow: var(--shadow);
}

.arch-frame::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 248, 240, 0.5);
    border-radius: 50% 50% 12px 12px / 37% 37% 12px 12px;
    pointer-events: none;
}

.arch-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poet-portrait figcaption {
    position: absolute;
    right: -18px;
    bottom: 32px;
    padding: 6px 20px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 1.15rem;
    line-height: 2;
    box-shadow: var(--shadow);
}

.poet-points {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.poet-points li {
    position: relative;
    padding-left: 26px;
    color: var(--ink-2);
}

.poet-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    border: 1.5px solid var(--gold);
}

.poet-points strong {
    color: var(--ink);
    font-weight: 600;
}

/* ---------- Mood tiles ---------- */

.mood-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.mood-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 220px;
    padding: 24px 16px 22px;
    border: 1px solid var(--rule);
    border-radius: 999px 999px 18px 18px;
    background: var(--surface);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.mood-tile::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed transparent;
    border-radius: 999px 999px 12px 12px;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.mood-tile:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.mood-tile:hover::before {
    border-color: var(--rule-strong);
}

.mood-urdu {
    color: var(--accent);
    font-size: 1.7rem;
    line-height: 2.1;
}

.mood-name {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.mood-count {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.8rem;
}

/* ---------- Library (filters + grid + aside) ---------- */

.library {
    padding-top: 64px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.toolbar-compact {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) auto;
}

.toolbar .field label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.toolbar .input,
.toolbar .select {
    background-color: var(--paper);
    min-height: 46px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.85rem;
    font-weight: 500;
}

.filter-chip span {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.9rem;
    line-height: 1;
}

.filter-chip:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.library-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
    margin-top: 32px;
}

.results-note {
    margin: 0 0 16px;
}

.poem-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.poem-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.load-more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* ---------- Poem card ---------- */

.poem-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 26px 26px 20px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.poem-card.is-hidden {
    display: none;
}

.poem-card::before {
    content: '\201C';
    position: absolute;
    top: 6px;
    right: 22px;
    font-family: var(--font-display);
    font-size: 5.5rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.22;
    pointer-events: none;
}

.poem-card:hover {
    transform: translateY(-4px);
    border-color: var(--rule-strong);
    box-shadow: var(--shadow);
}

.poem-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 40px;
}

.poem-card-cat {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.poem-card-cat:hover {
    color: var(--accent);
}

.poem-card-title {
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.poem-card-title a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.35s ease, color 0.2s ease;
}

.poem-card-title a:hover {
    color: var(--accent);
    background-size: 100% 1px;
}

.poem-card-title.rtl {
    font-family: var(--font-urdu);
    font-size: 1.35rem;
    line-height: 2;
}

.poem-card-title.rtl a {
    background: none;
}

.poem-card-verse {
    flex: 1;
    display: block;
    margin-top: 14px;
    color: var(--ink-2);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.85;
    white-space: pre-line;
}

.poem-card-verse.rtl {
    font-family: var(--font-urdu);
    font-style: normal;
    font-weight: 400;
    font-size: 1.08rem;
    line-height: 2.55;
}

.verse-more {
    color: var(--gold);
    font-style: normal;
}

.poem-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}

.byline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.byline a:hover {
    color: var(--accent);
}

.avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    font-style: italic;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
}

.poem-card-stats {
    display: inline-flex;
    gap: 14px;
    color: var(--muted);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.poem-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.poem-card-stats svg {
    width: 15px;
    height: 15px;
}

/* ---------- Aside ---------- */

.library-aside,
.compose-aside {
    position: sticky;
    top: 80px;
    display: grid;
    gap: 22px;
}

.aside-block {
    padding: 24px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.aside-title {
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
}

.rank-list {
    list-style: none;
    counter-reset: rank;
}

.rank-list li + li {
    border-top: 1px solid var(--rule);
}

.rank-list a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 0 13px 40px;
    counter-increment: rank;
}

.rank-list a::before {
    content: counter(rank);
    position: absolute;
    left: 0;
    top: 8px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-style: italic;
    font-weight: 300;
    color: var(--gold);
}

.rank-title {
    color: var(--ink);
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.rank-title.urdu {
    line-height: 2;
}

.rank-list a:hover .rank-title {
    color: var(--accent);
}

.rank-meta {
    color: var(--muted);
    font-size: 0.8rem;
}

.author-list {
    list-style: none;
    display: grid;
    gap: 2px;
}

.author-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    margin: 0 -10px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.author-list a:hover,
.author-list a.is-active {
    background: var(--paper-2);
}

.author-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.author-count {
    color: var(--muted);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.mini-moods {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mini-moods a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px 6px;
    border: 1px solid var(--rule);
    border-radius: 999px 999px 10px 10px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.mini-moods .urdu {
    color: var(--gold);
    font-size: 0.85rem;
    line-height: 2;
}

.mini-moods a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.aside-cta {
    background: var(--accent-soft);
    border-color: transparent;
}

.aside-cta .muted {
    margin-bottom: 16px;
}

/* ---------- Empty states ---------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 24px;
    border: 1px dashed var(--rule-strong);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.empty-state .btn {
    margin-top: 12px;
}

.empty-title {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.empty-state-sm {
    padding: 32px 20px;
}

/* ---------- CTA band ---------- */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: 80px 40px;
    border-radius: 32px;
    background:
        radial-gradient(60% 80% at 50% 0%, var(--band-2), transparent 70%),
        var(--band);
    color: var(--band-ink);
    text-align: center;
}

.cta-band::before,
.cta-band::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(220, 178, 106, 0.2);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    pointer-events: none;
}

.cta-band::before {
    top: 28px;
    bottom: 0;
    width: min(560px, 80%);
}

.cta-band::after {
    top: 52px;
    bottom: 0;
    width: min(500px, 70%);
    border-color: rgba(220, 178, 106, 0.1);
}

.cta-band > * {
    position: relative;
}

.cta-band .eyebrow {
    color: var(--band-gold);
}

.cta-band .heading-xl {
    color: var(--band-ink);
}

.cta-band .heading-xl em {
    color: var(--band-gold);
}

.cta-band p:not(.eyebrow) {
    max-width: 480px;
    margin: 18px auto 0;
    color: var(--band-muted);
    font-size: 1.05rem;
}

.cta-band .btn-row {
    justify-content: center;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 56px;
    border-bottom: 1px solid var(--rule);
}

.page-hero-compact {
    padding: 64px 0 48px;
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
    align-items: end;
    margin-top: 32px;
}

.hero-watermark {
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: clamp(7rem, 18vw, 15rem);
    line-height: 1.6;
    opacity: 0.09;
    pointer-events: none;
    white-space: nowrap;
}

.hero-urdu {
    margin-top: 6px;
    color: var(--gold);
    font-size: 1.8rem;
    line-height: 2;
}

.stat-stack {
    display: flex;
    gap: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.stat-stack > div {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    padding: 18px 26px;
}

.stat-stack > div + div {
    border-left: 1px solid var(--rule);
}

.stat-stack dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stat-stack dd {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.86rem;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb a:last-child {
    color: var(--ink-2);
}

/* ---------- Single shayari ---------- */

.reading {
    padding: 40px 0 24px;
}

.reading-head {
    margin-top: 40px;
    text-align: center;
}

.reading-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.reading-title {
    margin-top: 22px;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-variation-settings: 'opsz' 144;
}

.reading-title.rtl {
    text-align: center;
    font-family: var(--font-urdu);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0;
}

.reading-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.reading-meta > span + span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 20px;
    vertical-align: middle;
    border-radius: 50%;
    background: var(--rule-strong);
}

.verse-sheet {
    position: relative;
    margin-top: 48px;
    padding: 24px 48px 40px;
    border-radius: 50% 50% var(--radius) var(--radius) / 90px 90px var(--radius) var(--radius);
    background: var(--surface);
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 32px auto;
    color: var(--gold);
}

.ornament::before,
.ornament::after {
    content: '';
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor);
}

.ornament::after {
    transform: scaleX(-1);
}

.ornament span {
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    border: 1px solid currentColor;
}

.verse {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.9;
    text-align: center;
    white-space: pre-line;
}

.verse.rtl {
    text-align: center;
    font-family: var(--font-urdu);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.95rem);
    line-height: 2.7;
}

.alt-titles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.alt-titles > div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--paper-2);
}

.alt-titles dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.alt-titles dd {
    color: var(--ink-2);
    font-weight: 500;
}

.alt-titles dd.urdu {
    line-height: 2;
}

.share-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

.share-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.share-btn.copied {
    border-color: var(--success);
    background: var(--green-soft);
    color: var(--success);
}

.share-btn[hidden] {
    display: none;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 48px;
    padding: 24px 28px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.author-card > div {
    flex: 1;
    min-width: 0;
}

.author-card .eyebrow {
    margin-bottom: 4px;
}

.author-card-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
}

/* ---------- About ---------- */

.about-hero {
    padding-top: 64px;
}

.about-hero .display {
    font-size: clamp(2.4rem, 5.4vw, 4.2rem);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.value-card {
    padding: 32px 28px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.value-num {
    display: block;
    margin-bottom: 18px;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 2rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1;
}

.value-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
}

.value-card p {
    margin-top: 10px;
    color: var(--ink-2);
    line-height: 1.7;
}

/* ---------- Contact ---------- */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 56px;
    align-items: start;
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 28px;
    padding-top: 8px;
}

.contact-list li {
    display: flex;
    gap: 18px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 999px 999px 12px 12px;
    background: var(--accent-soft);
    color: var(--accent);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-value {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.45;
}

a.contact-value:hover {
    color: var(--accent);
}

.form-card {
    padding: 40px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.form-card > .heading-md {
    margin-bottom: 24px;
}

/* ---------- Auth ---------- */

.auth-section {
    padding: 56px 0 72px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    max-width: 1060px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 28px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 56px 44px;
    background:
        radial-gradient(90% 60% at 50% 0%, var(--band-2), transparent 70%),
        var(--band);
    color: var(--band-muted);
    overflow: hidden;
}

.auth-aside::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 72%;
    height: 78%;
    transform: translateX(-50%);
    border: 1px solid rgba(220, 178, 106, 0.18);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    pointer-events: none;
}

.auth-aside > * {
    position: relative;
}

.auth-aside .eyebrow {
    color: var(--band-gold);
}

.auth-verse {
    margin-top: 36px;
    color: var(--band-ink);
    font-size: 1.9rem;
    line-height: 2.2;
    text-align: right;
}

.auth-verse-en {
    color: var(--band-gold);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
}

.auth-points,
.auth-steps {
    list-style: none;
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 48px;
}

.auth-points li {
    position: relative;
    padding-left: 24px;
}

.auth-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    border: 1.5px solid var(--band-gold);
}

.auth-steps {
    counter-reset: step;
}

.auth-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 44px;
    counter-increment: step;
}

.auth-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(220, 178, 106, 0.5);
    border-radius: 50%;
    color: var(--band-gold);
    font-family: var(--font-display);
    font-style: italic;
}

.auth-steps strong {
    color: var(--band-ink);
    font-weight: 600;
}

.auth-steps span {
    font-size: 0.9rem;
}

.auth-card {
    padding: 56px 52px;
}

.auth-card > .muted {
    margin: 10px 0 30px;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form .form-grid {
    gap: 18px;
}

.auth-form .btn-block {
    margin-top: 6px;
}

.auth-switch {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.94rem;
    text-align: center;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Submit ---------- */

.status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    color: var(--ink-2);
}

.status-line strong {
    color: var(--ink);
}

.status-role {
    color: var(--muted);
    font-size: 0.88rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill.is-ok {
    background: var(--green-soft);
    color: var(--success);
}

.status-pill.is-wait {
    background: var(--gold-soft);
    color: var(--warning);
}

.status-pill.is-bad {
    background: var(--accent-soft);
    color: var(--danger);
}

.notice-card {
    max-width: 640px;
    padding: 40px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
}

.notice-card p {
    margin: 10px 0 24px;
    color: var(--ink-2);
}

.notice-card a:not(.btn) {
    color: var(--accent);
    text-decoration: underline;
}

.compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    align-items: start;
}

.form-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}

.form-section legend,
.form-optional summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
}

.form-section legend span,
.form-optional summary span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.95rem;
    font-style: italic;
}

.form-optional summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
}

.form-optional summary::-webkit-details-marker {
    display: none;
}

.form-optional summary::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.form-optional[open] summary {
    margin-bottom: 20px;
}

.form-optional[open] summary::after {
    transform: rotate(-135deg);
}

.form-optional summary small {
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
}

.check-list {
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--ink-2);
    font-size: 0.94rem;
}

.check-list li {
    position: relative;
    padding-left: 26px;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 6px;
    width: 10px;
    height: 6px;
    border-left: 1.8px solid var(--success);
    border-bottom: 1.8px solid var(--success);
    transform: rotate(-45deg);
}

/* ---------- Admin tables ---------- */

.panel {
    margin-bottom: 28px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--rule);
}

.panel .empty-state {
    margin: 22px;
}

.count-pill {
    min-width: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th {
    padding: 12px 18px;
    background: var(--paper);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-top: 1px solid var(--rule);
    color: var(--ink-2);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: var(--paper);
}

.data-table td strong {
    display: block;
    color: var(--ink);
    font-weight: 600;
}

.cell-sub {
    color: var(--muted);
    font-size: 0.78rem;
}

.cell-empty {
    padding: 32px !important;
    text-align: center;
    color: var(--muted) !important;
}

.col-actions {
    width: 1%;
    white-space: nowrap;
}

.action-row {
    display: flex;
    gap: 6px;
}

/* ---------- Prose (privacy) ---------- */

.prose {
    color: var(--ink-2);
    font-size: 1.05rem;
    line-height: 1.8;
}

.prose p,
.prose ul {
    margin: 0 0 18px;
}

.prose ul {
    padding-left: 22px;
}

.prose li + li {
    margin-top: 6px;
}

.prose h2 {
    margin: 40px 0 12px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 48px;
    padding: 0 0 32px;
    background: var(--band);
    color: var(--band-muted);
}

.footer-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding: 64px 0 56px;
    border-bottom: 1px solid rgba(243, 236, 223, 0.1);
}

.footer-verse {
    display: flex;
    flex-direction: column;
}

.footer-verse .urdu {
    align-self: flex-start;
    color: var(--band-gold);
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    line-height: 2;
}

.footer-verse-en {
    color: var(--band-ink);
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-style: italic;
    font-weight: 300;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    padding-top: 56px;
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 14px;
    color: var(--band-ink);
    font-family: var(--font-display);
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}

.footer-logo .urdu {
    color: var(--band-gold);
    font-size: 1rem;
}

.footer-brand p {
    max-width: 380px;
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-stats {
    display: flex;
    gap: 36px;
    margin-top: 26px;
}

.footer-stat {
    display: flex;
    flex-direction: column-reverse;
}

.footer-stat dd {
    color: var(--band-ink);
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 300;
    line-height: 1;
}

.footer-stat dt {
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-title {
    color: var(--band-ink);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    margin-top: 18px;
}

.footer-links li + li {
    margin-top: 11px;
}

.footer-links a {
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--band-ink);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(243, 236, 223, 0.1);
    font-size: 0.86rem;
}

.back-to-top:hover {
    color: var(--band-ink);
}

/* ---------- Motion ---------- */

.fade-in {
    animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }

@keyframes fadeUp {
    from {
        opacity: 0.6;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .toolbar,
    .toolbar-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toolbar .field-search,
    .toolbar-actions {
        grid-column: 1 / -1;
    }

    .library-layout,
    .compose-layout {
        grid-template-columns: 1fr;
    }

    .library-aside,
    .compose-aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    :root {
        --masthead-h: 64px;
    }

    .container,
    .topbar-inner,
    .footer-wrap {
        padding: 0 20px;
    }

    .topbar {
        display: none;
    }

    /* Mobile header */
    .masthead {
        position: sticky;
        top: 0;
        z-index: 1001;
        border-bottom: 1px solid var(--rule);
        background: color-mix(in srgb, var(--paper) 92%, transparent);
        -webkit-backdrop-filter: saturate(150%) blur(14px);
        backdrop-filter: saturate(150%) blur(14px);
    }

    .masthead-inner {
        padding: 0 16px;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .menu-toggle {
        display: inline-grid;
    }

    .masthead-search,
    .header-cta,
    .brand-tag,
    .brand-urdu {
        display: none;
    }

    .brand-title {
        font-size: 1.55rem;
    }

    /* Drawer */
    .site-nav {
        position: fixed;
        top: var(--masthead-h);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        border: 0;
        background: var(--paper);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    .site-nav.open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .site-nav.is-stuck {
        box-shadow: none;
    }

    .nav-inner {
        flex-direction: column;
        padding: 20px 20px 40px;
    }

    .nav-search {
        display: flex;
        max-width: none;
        margin-bottom: 12px;
    }

    .nav-search input {
        height: 48px;
        font-size: 1rem;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        border-bottom: 1px solid var(--rule);
    }

    .nav-item.mobile-only {
        display: flex;
    }

    .nav-link {
        flex: 1;
        padding: 16px 2px;
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 400;
        color: var(--ink);
    }

    .nav-link::after,
    .nav-link .nav-caret {
        display: none;
    }

    .nav-item.active > .nav-link {
        color: var(--accent);
        font-style: italic;
    }

    .submenu-toggle {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
    }

    .submenu-toggle .nav-caret {
        width: 9px;
        height: 9px;
        transition: transform 0.2s ease;
    }

    .nav-item.open .submenu-toggle .nav-caret {
        transform: rotate(-135deg);
    }

    .nav-dropdown,
    .nav-item.has-dropdown:hover .nav-dropdown,
    .nav-item.has-dropdown:focus-within .nav-dropdown {
        position: static;
        display: none;
        width: 100%;
        padding: 0 0 16px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-item.has-dropdown.open .nav-dropdown,
    .nav-item.has-dropdown.open:hover .nav-dropdown,
    .nav-item.has-dropdown.open:focus-within .nav-dropdown {
        display: block;
    }

    .nav-dropdown-label {
        display: none;
    }

    .nav-dropdown-grid {
        max-height: none;
        gap: 6px;
    }

    .nav-dropdown-grid a {
        padding: 10px 14px;
        border: 1px solid var(--rule);
        background: var(--surface);
    }

    .nav-cta {
        display: inline-flex;
        margin-top: 28px;
        min-height: 52px;
    }

    /* Layouts */
    .home-hero {
        padding: 40px 0 24px;
    }

    .home-hero-grid,
    .poet-grid,
    .contact-layout,
    .page-hero-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .home-hero-grid {
        gap: 48px;
    }

    .home-hero-feature {
        justify-content: center;
    }

    .arch-card {
        min-height: 460px;
        padding-top: 130px;
    }

    .stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 48px;
    }

    .stat-row > div:nth-child(odd) {
        border-left: 0;
    }

    .stat-row > div:nth-child(n + 3) {
        border-top: 1px solid var(--rule);
    }

    .stat-row-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-row-compact > div:nth-child(n + 3) {
        border-top: 0;
    }

    .stat-row-compact > div:nth-child(3) {
        border-left: 1px solid var(--rule);
    }

    .poet-section {
        padding: 48px 0;
    }

    .poet-grid {
        gap: 48px;
    }

    .poet-portrait {
        max-width: 320px;
        margin: 0 auto;
    }

    .poem-grid-3,
    .value-grid {
        grid-template-columns: 1fr;
    }

    .page-hero-grid {
        gap: 28px;
    }

    .stat-stack {
        align-self: start;
    }

    .auth-aside {
        padding: 40px 32px;
    }

    .auth-points,
    .auth-steps {
        padding-top: 28px;
    }

    .auth-card {
        padding: 40px 32px;
    }

    .verse-sheet {
        padding: 16px 28px 32px;
        border-radius: 50% 50% var(--radius) var(--radius) / 60px 60px var(--radius) var(--radius);
    }
}

@media (max-width: 720px) {
    .section {
        padding: 36px 0;
    }

    .container,
    .footer-wrap {
        padding: 0 16px;
    }

    .poem-grid,
    .library-aside,
    .compose-aside,
    .form-grid,
    .toolbar,
    .toolbar-compact {
        grid-template-columns: 1fr;
    }

    .toolbar {
        padding: 16px;
    }

    .toolbar-actions > * {
        flex: 1;
    }

    .poem-card {
        padding: 22px 20px 18px;
    }

    .mood-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .mood-tile {
        min-height: 180px;
        padding: 18px 10px;
    }

    .mood-urdu {
        font-size: 1.4rem;
    }

    .cta-band {
        padding: 56px 22px;
        border-radius: 24px;
    }

    .form-card,
    .notice-card {
        padding: 26px 20px;
    }

    .auth-section {
        padding: 24px 0 48px;
    }

    .auth-layout {
        border-radius: 22px;
        margin: 0 16px;
        width: auto;
    }

    .auth-card {
        padding: 32px 22px;
    }

    .auth-aside {
        padding: 32px 22px;
    }

    .auth-verse {
        margin-top: 20px;
        font-size: 1.5rem;
    }

    .author-card {
        flex-wrap: wrap;
        padding: 22px;
    }

    .author-card .btn {
        width: 100%;
    }

    .verse-sheet {
        padding: 8px 18px 28px;
        border-radius: 50% 50% 16px 16px / 40px 40px 16px 16px;
    }

    .ornament {
        margin: 24px auto;
    }

    .ornament::before,
    .ornament::after {
        width: 48px;
    }

    .stat-stack {
        width: 100%;
    }

    .stat-stack > div {
        flex: 1;
        padding: 16px;
    }

    .stat-stack dd {
        font-size: 1.6rem;
    }

    .stat-row > div {
        padding: 20px 16px;
    }

    .stat-row-compact > div:first-child {
        padding-left: 0;
    }

    .hero-watermark {
        right: -10%;
        top: 30%;
    }

    .panel-head {
        padding: 18px 20px;
    }

    .footer-hero {
        padding: 48px 0 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px 24px;
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    .hero-search {
        flex-wrap: wrap;
        border-radius: 22px;
        padding: 6px 6px 6px 0;
    }

    .hero-search .btn {
        flex: 1 1 100%;
        margin-top: 6px;
    }

    .btn-row .btn {
        flex: 1 1 100%;
    }

    .arch-card {
        min-height: 420px;
        padding: 112px 26px 30px;
    }

    .arch-verse {
        font-size: 1.25rem;
    }

    .reading-meta > span + span::before {
        margin-right: 10px;
    }

    .reading-meta {
        gap: 8px 10px;
    }

    .poet-portrait figcaption {
        right: -6px;
    }
}
