/* ==========================================================================
   مجلة اللسان العربي — site stylesheet
   Light, simplified variant of the arabization-site 2025 prototype
   (Cairo / Amiri, ink-green & gold, maroon accent for the journal)
   ========================================================================== */
:root {
    --ink: #0C1F0E;
    --forest: #14532D;
    --emerald: #166534;
    --leaf: #16A34A;
    --gold: #B8860B;
    --gold-light: #F0C040;
    --maroon: #5C1A1A;
    --maroon-2: #8B2A2A;
    --cream: #FDFBF5;
    --parchment: #F5F0E8;
    --border: rgba(212, 160, 23, .19);
    --line: rgba(0, 0, 0, .07);
    --text: #1C1008;
    --muted: #5C5040;
    --danger: #B42318;
    --radius: .9rem;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Cairo', sans-serif; background: var(--cream); color: var(--text); direction: rtl; line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }

/* ══════ TOP STRIP + HEADER ══════ */
.strip { background: #07140a; color: rgba(255,255,255,.6); font-size: .72rem; }
.strip .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2rem; }
.strip a { color: var(--gold-light); text-decoration: none; }
.strip a:hover { color: #fff; }
.strip-links { display: flex; gap: 1rem; }

.site-header { background: var(--ink); position: sticky; top: 0; z-index: 1000; border-bottom: 2px solid var(--gold); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; flex-shrink: 0; }
.brand img { height: 36px; width: auto; }
.brand-name { border-right: 1px solid rgba(212,160,23,.35); padding-right: .9rem; line-height: 1.2; }
.brand-name b { display: block; font-family: 'Amiri', serif; font-size: 1.2rem; color: var(--gold-light); }
.brand-name span { display: block; font-size: .62rem; color: rgba(255,255,255,.55); }

.main-nav { flex: 1; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.nav-list { display: flex; list-style: none; gap: .1rem; }
.nav-item { position: relative; }
.nav-link { display: block; padding: .5rem .6rem; color: rgba(255,255,255,.8); font-size: .82rem; font-weight: 600; text-decoration: none; border-radius: .35rem; white-space: nowrap; transition: color .2s, background .2s; }
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link.active { background: rgba(212,160,23,.12); }
.nav-link .caret { font-size: .55rem; opacity: .6; }
.dropdown { position: absolute; top: 100%; right: 0; min-width: 220px; background: #fff; border-radius: .6rem; box-shadow: 0 18px 50px rgba(0,0,0,.18); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s; z-index: 1100; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: block; padding: .5rem .8rem; border-radius: .4rem; color: var(--text); font-size: .82rem; text-decoration: none; }
.dropdown a:hover { background: var(--parchment); color: var(--emerald); }

.header-search { margin-right: auto; display: flex; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 2rem; padding: .15rem .3rem .15rem .9rem; }
.header-search input { background: none; border: none; color: #fff; width: 160px; padding: .35rem .2rem; font-size: .8rem; outline: none; }
.header-search input::placeholder { color: rgba(255,255,255,.45); }
.header-search button { background: var(--gold); border: none; border-radius: 50%; width: 1.9rem; height: 1.9rem; cursor: pointer; font-size: .8rem; }

.hamburger { display: none; margin-right: auto; background: none; border: none; cursor: pointer; padding: .5rem; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 1px; }

/* ══════ BUTTONS ══════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.3rem; border-radius: .45rem; font-size: .85rem; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: all .2s; white-space: nowrap; line-height: 1.4; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); }
.btn-green { background: var(--emerald); color: #fff; }
.btn-green:hover { background: var(--forest); }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-2); }
.btn-line { background: #fff; color: var(--text); border-color: rgba(0,0,0,.14); }
.btn-line:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .35rem .75rem; font-size: .75rem; }
.btn-icon { padding: .35rem .55rem; font-size: .9rem; }
.btn-block { width: 100%; }
.link { color: var(--emerald); font-weight: 600; text-decoration: none; font-size: .82rem; }
.link:hover { text-decoration: underline; }

/* ══════ LAYOUT BLOCKS ══════ */
.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.section-alt { background: var(--parchment); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section-title { font-family: 'Amiri', serif; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ink); line-height: 1.35; display: flex; align-items: center; gap: .7rem; }
.section-title::before { content: ''; width: 4px; height: 1.5rem; border-radius: 2px; background: var(--gold); }
.section-sub { color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.tag { display: inline-block; background: rgba(22,101,52,.1); color: var(--emerald); border: 1px solid rgba(22,101,52,.2); padding: .15rem .7rem; border-radius: 2rem; font-size: .7rem; font-weight: 700; }
.tag-gold { background: rgba(184,134,11,.12); color: #7a5a07; border-color: rgba(184,134,11,.3); }

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.split > *, .split-even > *, .grid > * { min-width: 0; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.panel + .panel { margin-top: 1.2rem; }
.panel-title { font-family: 'Amiri', serif; font-size: 1.25rem; color: var(--ink); margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.empty-state { padding: 2.2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed rgba(0,0,0,.15); border-radius: var(--radius); background: #fff; }

/* ══════ PAGE HERO ══════ */
.page-hero { background: linear-gradient(135deg, var(--ink), var(--forest)); color: #fff; padding: 2.6rem 0 2.2rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; opacity: .05; background-image: repeating-linear-gradient(45deg, var(--gold) 0, var(--gold) 1px, transparent 0, transparent 50%); background-size: 28px 28px; }
.page-hero.is-maroon { background: linear-gradient(135deg, var(--maroon), var(--maroon-2)); }
.page-hero .container { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; font-size: .72rem; color: rgba(255,255,255,.45); margin-bottom: .8rem; }
.crumbs a { color: rgba(255,255,255,.65); text-decoration: none; }
.crumbs a:hover { color: var(--gold-light); }
.crumbs .current { color: var(--gold-light); }
.page-hero h1 { font-family: 'Amiri', serif; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.35; }
.page-hero p { color: rgba(255,255,255,.7); font-size: .9rem; max-width: 680px; margin-top: .4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }

/* ══════ HOME HERO ══════ */
.home-hero { background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-2) 55%, #6B1515 100%); color: #fff; position: relative; overflow: hidden; }
.home-hero::before { content: ''; position: absolute; inset: 0; opacity: .06; background-image: repeating-linear-gradient(45deg, #D4A017 0, #D4A017 1px, transparent 0, transparent 22px); background-size: 22px 22px; }
.home-hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.home-hero .kicker { color: var(--gold-light); font-size: .78rem; font-weight: 700; letter-spacing: .05em; }
.home-hero h1 { font-family: 'Amiri', serif; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.25; margin: .3rem 0 .6rem; }
.home-hero p { color: rgba(255,255,255,.75); max-width: 560px; font-size: .95rem; }
.hero-cover { display: block; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: .8rem; text-decoration: none; color: #fff; text-align: center; transition: transform .3s; }
.hero-cover:hover { transform: translateY(-4px); }
.hero-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: .5rem; display: block; background: rgba(0,0,0,.2); }
.hero-cover span { display: block; font-size: .8rem; margin-top: .6rem; color: var(--gold-light); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: -2rem; position: relative; z-index: 2; box-shadow: 0 12px 40px rgba(0,0,0,.06); }
.stat { text-align: center; padding: 1.2rem .5rem; }
.stat + .stat { border-right: 1px solid var(--line); }
.stat b { display: block; font-family: 'Amiri', serif; font-size: 2rem; color: var(--maroon); line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); }

/* ══════ CARDS ══════ */
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s, border-color .25s; }
a.card:hover, .card.hover:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.08); border-color: rgba(212,160,23,.35); }
.card-media { position: relative; height: 170px; overflow: hidden; }
.card-media > img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; }
.card-body { padding: 1.1rem 1.2rem; flex: 1; }
.card-kicker { font-size: .7rem; font-weight: 700; color: var(--gold); margin-bottom: .25rem; }
.card-title { font-weight: 700; font-size: .95rem; color: var(--ink); line-height: 1.55; }
.card-text { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.card-foot { padding: .7rem 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .75rem; color: var(--muted); flex-wrap: wrap; }

/* gradient placeholder behind images (missing / broken image) */
.img-ph { position: relative; background: radial-gradient(circle at 20% 15%, rgba(240,192,64,.25), transparent 55%), linear-gradient(135deg, var(--ink) 0%, var(--forest) 60%, #1f6b3a 100%); }
.img-ph.is-maroon { background: radial-gradient(circle at 20% 15%, rgba(240,192,64,.25), transparent 55%), linear-gradient(135deg, var(--maroon), var(--maroon-2)); }
.img-ph::before { content: 'ع'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Amiri', serif; font-size: 3.5rem; color: rgba(240,192,64,.25); pointer-events: none; }

/* issue (number) card */
.issue { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.issue:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.08); }
.issue-cover { display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.issue-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; }
.issue-body { padding: .9rem 1rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.issue-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.issue-title:hover { color: var(--emerald); }
.issue-meta { display: flex; gap: .8rem; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }
.issue-desc { font-size: .78rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.issue-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .6rem; flex-wrap: wrap; }
.issue-actions .btn { flex: 1; }

/* author card */
.author { text-align: center; padding: 1.4rem 1rem; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--parchment); box-shadow: 0 0 0 2px var(--gold); background: var(--parchment); margin: 0 auto .7rem; display: block; }
.avatar.is-lg { width: 130px; height: 130px; }
.author-name { font-weight: 700; color: var(--ink); }
.author-count { font-size: .75rem; color: var(--muted); }

/* memory / article list */
.article-card { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-right: 3px solid var(--gold); border-radius: .7rem; padding: 1rem 1.2rem; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
a.article-card:hover { transform: translateX(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.article-icon { width: 2.4rem; height: 2.4rem; border-radius: .5rem; background: rgba(92,26,26,.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.article-title { font-weight: 700; color: var(--ink); line-height: 1.55; }
.article-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .74rem; color: var(--muted); margin-top: .25rem; }

/* quotes */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; padding-top: 2rem; position: relative; }
.quote::before { content: '”'; position: absolute; top: -.2rem; left: .8rem; font-family: 'Amiri', serif; font-size: 4.5rem; line-height: 1; color: rgba(212,160,23,.25); }
.quote-person { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.quote-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: var(--parchment); }
.quote-name { font-family: 'Amiri', serif; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.quote-role { font-size: .74rem; color: var(--emerald); font-weight: 600; }
.quote p { font-size: .86rem; color: var(--muted); line-height: 1.95; text-align: justify; }
.quote-author { margin-top: .8rem; font-size: .8rem; font-weight: 700; color: var(--ink); }
.quote-author span { font-weight: 400; color: var(--muted); }

/* link tiles */
.tile { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.tile-icon { font-size: 1.7rem; width: 3rem; height: 3rem; border-radius: .6rem; background: var(--parchment); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile b { display: block; color: var(--ink); }
.tile span { font-size: .75rem; color: var(--muted); }

/* ══════ TABLES ══════ */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 560px; }
.table th { background: var(--parchment); color: var(--ink); font-weight: 700; text-align: right; padding: .7rem 1rem; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: #fffdf6; }
.table .c { text-align: center; white-space: nowrap; }
.table .num { color: var(--muted); width: 70px; }
.names { list-style: none; font-size: .8rem; color: var(--muted); }
.row-actions { display: inline-flex; gap: .3rem; }

/* ══════ TABS / FILTERS ══════ */
.tabs { display: inline-flex; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: .6rem; padding: .3rem; flex-wrap: wrap; }
.tab { padding: .45rem 1rem; border-radius: .45rem; font-size: .82rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tab:hover { color: var(--emerald); }
.tab.active { background: var(--emerald); color: #fff; }
.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.5rem; }
.filters .field { flex: 1; min-width: 200px; }
.filters .field.is-date { flex: 0 1 180px; min-width: 150px; }
.loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; list-style: none; margin-top: 2rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; border-radius: .45rem; border: 1px solid rgba(0,0,0,.1); background: #fff; color: var(--muted); font-size: .8rem; font-weight: 600; text-decoration: none; }
.pagination a:hover { border-color: var(--emerald); color: var(--emerald); }
.pagination .active span { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.pagination .disabled span { opacity: .45; }

/* ══════ ARTICLE / PROSE ══════ */
.prose { font-size: .93rem; line-height: 2; color: #3b3222; }
.prose p { margin-bottom: 1rem; text-align: justify; }
.prose h2, .prose h3, .prose h4 { font-family: 'Amiri', serif; color: var(--ink); line-height: 1.4; margin: 1.5rem 0 .7rem; }
.prose h2 { font-size: 1.5rem; } .prose h3 { font-size: 1.25rem; } .prose h4 { font-size: 1.08rem; }
.prose ul, .prose ol { padding-right: 1.4rem; margin: .5rem 0 1.1rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--gold); }
.prose img { height: auto; border-radius: .6rem; }
.prose a { color: var(--emerald); }
.prose table { width: 100%; border-collapse: collapse; }
.prose table td, .prose table th { border: 1px solid var(--line); padding: .4rem .6rem; }
.prose > :first-child { margin-top: 0; }
.detail-media { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; min-height: 220px; }
.detail-media > img { width: 100%; max-height: 460px; object-fit: contain; display: block; position: relative; background: #fff; }
.detail-media.img-ph::before { font-size: 6rem; }
.side-news { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; text-decoration: none; }
.side-news + .side-news { border-top: 1px solid var(--line); }
.side-news .thumb { width: 64px; height: 52px; border-radius: .4rem; overflow: hidden; flex-shrink: 0; }
.side-news .thumb::before { font-size: 1.4rem; }
.side-news .thumb > img { width: 100%; height: 100%; object-fit: cover; position: relative; display: block; }
.side-news b { display: block; font-size: .8rem; color: var(--ink); line-height: 1.5; }
.side-news small { font-size: .7rem; color: var(--muted); }
.side-news:hover b { color: var(--emerald); }
.check-list { list-style: none; padding: 0 !important; }
.check-list li { position: relative; padding-right: 1.5rem; }
.check-list li::before { content: '✓'; position: absolute; right: 0; color: var(--leaf); font-weight: 700; }
.figure { text-align: center; margin: 1.2rem 0; }
.figure img { border-radius: .6rem; max-height: 480px; width: auto; }
.figure figcaption { font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.video { width: 100%; border-radius: var(--radius); background: #000; display: block; }
.info-row { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem 0; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-icon { width: 2rem; height: 2rem; border-radius: .45rem; background: rgba(22,101,52,.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-row small { display: block; font-size: .7rem; color: var(--muted); font-weight: 700; }
.info-row div > span, .info-row div > a { font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; word-break: break-word; }

/* ══════ FORMS ══════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label, .field .label { font-size: .78rem; font-weight: 700; color: var(--ink); }
.field .req { color: var(--danger); }
.field .hint { font-size: .72rem; color: var(--muted); }
.input, .field input:not([type=file]):not([type=checkbox]), .field select, .field textarea { width: 100%; padding: .6rem .9rem; border: 1px solid rgba(0,0,0,.14); border-radius: .45rem; background: #fff; color: var(--text); font-size: .86rem; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(22,101,52,.12); }
.field input[disabled], .field textarea[disabled] { background: var(--parchment); color: var(--text); }
.field .is-invalid, .file.is-invalid { border-color: var(--danger) !important; }
.file { position: relative; display: flex; align-items: center; gap: .6rem; border: 1px dashed rgba(0,0,0,.2); border-radius: .5rem; padding: .7rem .9rem; background: #fff; cursor: pointer; transition: border-color .2s, background .2s; min-height: 3rem; }
.file:hover { border-color: var(--emerald); background: #fbfff9; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-icon { font-size: 1.2rem; }
.file-name { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file.has-file { border-style: solid; border-color: var(--emerald); }
.file.has-file .file-name { color: var(--emerald); font-weight: 600; }
.form-box { border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; background: #fffdf6; }
.form-note { font-size: .78rem; color: var(--danger); }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* alerts & badges */
.alert { padding: .8rem 1rem; border-radius: .5rem; font-size: .84rem; border: 1px solid transparent; display: flex; gap: .8rem; justify-content: space-between; align-items: flex-start; }
.alert ul { list-style: none; }
.alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert-danger { background: #fef3f2; border-color: #fecdca; color: var(--danger); }
.alert-close { background: none; border: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.flash-wrap { max-width: 1200px; margin: 1rem auto 0; padding: 0 1.25rem; display: grid; gap: .5rem; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 2rem; font-size: .7rem; font-weight: 700; font-family: 'Cairo', sans-serif; vertical-align: middle; }
.badge-success { background: #ecfdf3; color: #067647; }
.badge-danger { background: #fef3f2; color: var(--danger); }
.badge-warning { background: #fffaeb; color: #b54708; }
.badge-info { background: #eff8ff; color: #175cd3; }

/* file chips (attachments) */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.file-chip { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .7rem; text-decoration: none; color: inherit; background: #fff; min-width: 0; }
.file-chip:hover { border-color: var(--emerald); }
.file-chip img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.file-chip b { display: block; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { display: block; font-size: .68rem; color: var(--muted); }
.file-chip > div { min-width: 0; }

/* ══════ MODAL ══════ */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(6,14,7,.7); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal-box.is-xl { max-width: 1200px; height: calc(100vh - 2rem); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: 'Amiri', serif; font-size: 1.15rem; }
.modal-close { background: var(--parchment); border: none; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.modal-body { padding: 1.2rem; overflow: auto; flex: 1; }
.modal-body.is-frame { padding: 0; }
.modal-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-foot { display: flex; gap: .5rem; justify-content: flex-start; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }

/* ══════ AUTH ══════ */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: linear-gradient(135deg, var(--ink), var(--forest)); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.auth-card .logo { display: block; margin: 0 auto 1rem; height: 70px; }
.auth-card h1 { font-family: 'Amiri', serif; font-size: 1.5rem; text-align: center; color: var(--ink); }
.auth-card p { text-align: center; color: var(--muted); font-size: .82rem; margin-bottom: 1.4rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; }

/* ══════ ERROR ══════ */
.error-page { text-align: center; padding: 4.5rem 1rem; }
.error-code { font-family: 'Amiri', serif; font-size: clamp(5rem, 14vw, 8rem); color: var(--gold); line-height: 1; }
.error-page h1 { font-family: 'Amiri', serif; font-size: 1.6rem; margin: .8rem 0 .4rem; }
.error-page p { color: var(--muted); max-width: 520px; margin: 0 auto 1.5rem; }

/* ══════ FOOTER ══════ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.55); margin-top: 0; }
.site-footer .container { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-top: 2.8rem; padding-bottom: 2rem; }
.site-footer h4 { color: var(--gold); font-size: .82rem; margin-bottom: .8rem; }
.site-footer p, .site-footer li { font-size: .8rem; line-height: 1.9; }
.site-footer ul { list-style: none; }
.site-footer a { color: rgba(255,255,255,.6); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.footer-brand img { height: 42px; margin-bottom: .8rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1rem; padding-bottom: 1rem; font-size: .72rem; color: rgba(255,255,255,.35); }

/* ══════ RESPONSIVE ══════ */
@media (max-width: 1100px) {
    .hamburger { display: flex; }
    .main-nav { position: fixed; inset: 0 auto 0 0; right: 0; left: auto; width: 82vw; max-width: 330px; background: var(--ink); flex-direction: column; align-items: stretch; padding: 4.5rem 1.2rem 2rem; overflow-y: auto; transform: translateX(100%); transition: transform .3s; z-index: 1200; }
    .main-nav.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.4); }
    .nav-list { flex-direction: column; }
    .nav-link { font-size: .95rem; padding: .7rem .6rem; }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; background: rgba(255,255,255,.05); box-shadow: none; margin: 0 .6rem .4rem 0; }
    .dropdown a { color: rgba(255,255,255,.7); }
    .dropdown a:hover { background: rgba(255,255,255,.06); color: var(--gold-light); }
    .header-search { margin: 1rem 0 0; }
    .header-search input { width: 100%; flex: 1; }
    .nav-close { display: flex !important; }
    .nav-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1150; }
}
.nav-close { display: none; position: absolute; top: 1rem; left: 1rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid rgba(212,160,23,.35); background: none; color: #fff; font-size: 1.2rem; align-items: center; justify-content: center; cursor: pointer; }
.nav-backdrop { display: none; }

@media (max-width: 900px) {
    .split, .split-even, .home-hero .container { grid-template-columns: 1fr; }
    .home-hero .container { padding-top: 2.5rem; padding-bottom: 3.5rem; }
    .hero-cover { max-width: 240px; }
    .site-footer .container { grid-template-columns: 1fr; gap: 1.5rem; }
    .form-grid, .form-grid.is-3 { grid-template-columns: 1fr; }
    .strip-links { display: none; }
}
@media (max-width: 640px) {
    .section { padding: 2.5rem 0; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3) { border-right: none; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
    .brand-name span { display: none; }
    .brand img { height: 30px; }
    .panel { padding: 1.1rem; }
    .prose p, .quote p { text-align: right; }
    .issue-actions .btn { font-size: .7rem; padding: .35rem .4rem; }
}
