/* =====================================================================
   نشرة — رادار أبحاث الذكاء الاصطناعي
   نظام التصميم (2026) — RTL أولاً · Light + Dark · Glass · Motion
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
    --accent-1: #7c5cff;
    --accent-2: #b14bd8;
    --accent-grad: linear-gradient(120deg, #7c5cff, #b14bd8);
    --accent-soft: rgba(124, 92, 255, .12);
    --accent-ring: rgba(124, 92, 255, .38);
    --gold:       #d9b46a;
    --gold-soft:  rgba(217, 180, 106, .12);
    --brand-grad: linear-gradient(100deg, #cabdff 6%, #e9cd92 94%);

    --bg:        #f7f8fc;
    --bg-tint:   #eef1f9;
    --surface:   #ffffff;
    --surface-2: #fbfcfe;
    --ink:       #13161f;
    --muted:     #5d6675;
    --faint:     #8b93a3;
    --line:      #e7eaf1;
    --line-soft: #eef0f6;

    --ok:    #0f9d63;
    --ok-soft: rgba(15, 157, 99, .10);
    --hf:    #ff8a00;
    --arxiv: #b31b1b;

    --radius:   18px;
    --radius-sm:12px;
    --shadow-1: 0 1px 2px rgba(17, 22, 38, .04), 0 4px 14px rgba(17, 22, 38, .05);
    --shadow-2: 0 8px 30px rgba(17, 22, 38, .10), 0 2px 8px rgba(17, 22, 38, .06);
    --glass-bg: rgba(255, 255, 255, .72);

    --font:         'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;  /* النص — راحة القراءة */
    --font-head:    'Tajawal', 'Almarai', system-ui, sans-serif;                  /* العناوين المتوسطة */
    --font-display: 'Reem Kufi', 'Tajawal', serif;                                /* العنوان الكبير — فخامة */
    --mono:         'Almarai', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
    --accent-soft: rgba(124, 92, 255, .16);
    --accent-ring: rgba(124, 92, 255, .45);
    --gold-soft:  rgba(217, 180, 106, .13);
    --bg:        #08070e;
    --bg-tint:   #110f1b;
    --surface:   #15131f;
    --surface-2: #18151f;
    --ink:       #f1eff8;
    --muted:     #a7a2ba;
    --faint:     #6f6a82;
    --line:      rgba(217, 180, 106, .13);   /* خطوط شعرية بلمسة ذهبية */
    --line-soft: rgba(255, 255, 255, .05);
    --ok-soft:   rgba(15, 157, 99, .16);
    --shadow-1:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4);
    --shadow-2:  0 18px 50px rgba(0,0,0,.55);
    --glass-bg:  rgba(12, 11, 18, .72);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --accent-soft: rgba(139, 124, 255, .14);
        --accent-ring: rgba(139, 124, 255, .45);
        --bg:#0a0c13; --bg-tint:#11141e; --surface:#14182399; --surface-2:#161b27;
        --ink:#e9ebf2; --muted:#9aa3b4; --faint:#6b7385;
        --line:rgba(255,255,255,.09); --line-soft:rgba(255,255,255,.06);
        --ok-soft:rgba(15,157,99,.16);
        --shadow-1:0 1px 2px rgba(0,0,0,.3),0 6px 18px rgba(0,0,0,.35);
        --shadow-2:0 12px 40px rgba(0,0,0,.5);
        --glass-bg:rgba(16,19,28,.72);
    }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    margin: 0;
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-image:
        radial-gradient(70rem 34rem at 100% -12rem, rgba(124, 92, 255, .18), transparent 58%),
        radial-gradient(60rem 30rem at -8% 2rem, rgba(177, 75, 216, .10), transparent 58%),
        radial-gradient(46rem 26rem at 50% 122%, rgba(217, 180, 106, .07), transparent 60%);
    background-attachment: fixed;
}

/* العنوان الكبير بخط العرض الفخم */
.hero-brand, .issue-hero h1 { font-family: var(--font-display); }

/* العناوين بخط Tajawal لإعطاء شخصية، والنص بـ Almarai للراحة */
h1, h2, h3, h4, h5,
.brand .name, .issue-hero h1, .item h2, .card-box h1, .issue-kicker {
    font-family: var(--font-head);
}

a { color: var(--accent-1); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

::selection { background: var(--accent-ring); color: #fff; }

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

.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- Sticky footer + dock spacing ---------- */
body { padding-bottom: 100px; display: flex; flex-direction: column; min-height: 100vh; }
.page-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* ---------- Floating dock nav ---------- */
.dock {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90;
    display: flex; align-items: center; gap: 2px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 10px; box-shadow: var(--shadow-2), 0 0 0 1px rgba(217,180,106,.08);
    max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none;
}
.dock::-webkit-scrollbar { display: none; }
.dock > * { flex-shrink: 0; }
.dock-brand {
    font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; padding: 9px 14px; border-radius: 999px;
    margin-inline-end: 2px; white-space: nowrap;
    background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dock-brand:hover { filter: brightness(1.12); text-decoration: none; }
.dock a:not(.dock-brand), .dock .theme-toggle {
    color: var(--muted); padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: .95rem;
    white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.dock a:not(.dock-brand):hover { background: var(--accent-soft); color: var(--accent-1); text-decoration: none; }
.dock .theme-toggle { width: auto; height: auto; background: transparent; border: none; cursor: pointer; }
.dock .theme-toggle:hover { background: var(--accent-soft); color: var(--accent-1); }
.dock .dock-cta {
    background: var(--accent-grad); color: #fff !important; padding: 9px 18px !important;
    border-radius: 999px; box-shadow: 0 6px 16px var(--accent-ring); margin-inline-start: 4px; font-weight: 700;
}
.dock .dock-cta:hover { filter: brightness(1.06); }
@media (max-width: 560px) {
    .dock { bottom: 12px; padding: 6px 8px; gap: 0; }
    .dock a:not(.dock-logo), .dock .theme-toggle { padding: 8px 11px; font-size: .9rem; }
    .dock .dock-cta { padding: 8px 14px !important; }
}

/* ---------- Header (glass) — (legacy, غير مستخدم بعد الـ dock) ---------- */
.site-header {
    position: static;                      /* كاجوال — مش مثبّت فوق */
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
}
.site-header .bar {
    max-width: 760px; margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo {
    width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
    filter: drop-shadow(0 4px 14px rgba(124, 92, 255, .35));
}
.hero-logo {
    width: 58px; height: 58px; margin-bottom: 16px;
    filter: drop-shadow(0 6px 22px rgba(124, 92, 255, .4));
}
.brand .name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.2; }
.brand .tagline { font-size: .72rem; color: var(--muted); font-weight: 500; display: block; }

.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a {
    color: var(--muted); padding: 8px 13px; border-radius: 10px; font-weight: 500; font-size: .94rem;
    transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-1); }
.btn-sub {
    background: var(--accent-grad); color: #fff !important; padding: 9px 18px !important;
    border-radius: 11px; font-weight: 600; box-shadow: 0 6px 16px var(--accent-ring);
}
.btn-sub:hover { transform: translateY(-1px); filter: brightness(1.05); }
.theme-toggle {
    width: 38px; height: 38px; border-radius: 10px; border: none;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem;
    display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent-1); }

/* ---------- Hero (homepage) — Luxury ---------- */
.hero {
    margin: 32px 0 18px; padding: 54px 46px; border-radius: 30px; position: relative; overflow: hidden;
    border: 1px solid var(--line); box-shadow: var(--shadow-2);
    background:
        radial-gradient(120% 130% at 100% -10%, rgba(124, 92, 255, .24), transparent 52%),
        radial-gradient(110% 130% at -5% 110%, rgba(217, 180, 106, .12), transparent 55%),
        var(--surface-2);
}
/* إطار شعري متدرّج بنفسجي↔ذهبي */
.hero::after {
    content: ""; position: absolute; inset: 0; border-radius: 30px; padding: 1px; pointer-events: none;
    background: linear-gradient(120deg, rgba(124, 92, 255, .55), rgba(217, 180, 106, .45) 70%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700;
    color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(217, 180, 106, .32);
    border-radius: 30px; padding: 7px 20px; line-height: 1.7; white-space: nowrap;
}
.hero-brand {
    font-family: var(--font-display); font-size: clamp(2.7rem, 8.5vw, 4.4rem); font-weight: 700;
    line-height: 1.04; margin: 22px 0 0; width: fit-content;
    background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 26px rgba(124, 92, 255, .28));
}
.hero-rule { width: 70px; height: 2px; margin: 20px 0 0; border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), transparent); }
.hero-greet { margin: 24px 0 0; max-width: 62ch; }
.hero-greet p { color: rgba(241, 239, 248, .85); font-size: 1.08rem; line-height: 1.95; margin: 0; }
.greet-sign {
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
    font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.08rem;
}
.greet-sign .sign-dash { color: var(--gold); }
.greet-sign .sign-role {
    display: block; font-family: var(--font); font-weight: 500; font-size: .82rem;
    color: var(--muted); margin-top: 3px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 12px; font-weight: 600;
    border: 1px solid rgba(217, 180, 106, .3); color: var(--ink); background: transparent;
    transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease;
}
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); transform: translateY(-1px); text-decoration: none; }
@media (max-width: 640px) { .hero { padding: 34px 24px; border-radius: 24px; } }

/* ---------- Issue hero ---------- */
.issue-hero { padding: 30px 0 12px; position: relative; }
.issue-kicker {
    font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
    background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    display: inline-flex; gap: 7px; align-items: center;
}
.issue-hero h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: 12px 0 14px; line-height: 1.25;
    letter-spacing: -.02em; font-weight: 700;
}
.issue-meta { color: var(--muted); font-size: .92rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badge-type {
    background: var(--accent-soft); color: var(--accent-1); border-radius: 30px;
    padding: 4px 14px; font-size: .78rem; font-weight: 700;
}
.badge-type.weekly { background: rgba(255, 138, 0, .12); color: #d97706; }
.issue-intro {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 20px; margin: 22px 0 4px;
    color: var(--ink); position: relative; box-shadow: var(--shadow-1); font-size: 1.02rem;
}
.issue-intro::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 14px; bottom: 14px;
    width: 4px; border-radius: 4px; background: var(--accent-grad);
}

/* ---------- Item cards ---------- */
.items { padding: 18px 0 50px; }
.item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow-1);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative; overflow: hidden;
}
.item::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-grad); opacity: 0; transition: opacity .18s ease;
}
.item:hover { transform: translateY(-3px);
    box-shadow: 0 14px 44px rgba(124, 92, 255, .14), var(--shadow-2);
    border-color: rgba(217, 180, 106, .38); }
.item:hover::before { opacity: 1; }
.item .num {
    display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 10px;
    background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: .8rem;
    border: 1px solid rgba(217, 180, 106, .3); border-radius: 30px; margin-bottom: 8px;
}
.item h2 { font-size: 1.3rem; margin: 6px 0; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; }
.item .orig {
    font-family: var(--mono); font-size: .78rem; color: var(--faint);
    direction: ltr; text-align: start; margin-bottom: 12px; line-height: 1.5;
}
.item .summary { margin: 10px 0; color: var(--ink); }
.item .why {
    background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 16px;
    margin: 14px 0 4px; font-size: .96rem;
}
.item .why b { color: var(--accent-1); }

/* مصطلح قابل للنقر داخل النص + popover فوري */
.term {
    border-bottom: 1.5px dashed var(--accent-1); cursor: help; font-weight: 600;
    color: inherit; text-underline-offset: 3px; transition: background .12s ease;
}
.term:hover, .term:focus { background: var(--accent-soft); border-radius: 4px; outline: none; }
.popover {
    --bs-popover-bg: var(--surface-2);
    --bs-popover-border-color: var(--accent-ring);
    --bs-popover-body-color: var(--ink);
    --bs-popover-header-color: var(--accent-1);
    --bs-popover-header-bg: transparent;
    --bs-popover-max-width: 300px;
    box-shadow: var(--shadow-2); font-family: var(--font);
}
.popover-header { font-family: var(--font-head); direction: ltr; text-align: start; }
.popover-body { font-size: .92rem; line-height: 1.7; }
.popover-body a { font-weight: 700; }

/* تحديد نص → شو يعني؟ */
.seek-btn {
    position: fixed; z-index: 200; background: var(--accent-grad); color: #fff; border: none;
    padding: 8px 15px; border-radius: 999px; font-family: var(--font); font-weight: 700; font-size: .9rem;
    box-shadow: 0 8px 22px var(--accent-ring); cursor: pointer; white-space: nowrap;
}
.seek-pop {
    position: fixed; z-index: 200; bottom: 100px; left: 50%; transform: translateX(-50%);
    width: min(380px, calc(100vw - 32px));
    background: var(--surface-2); border: 1px solid var(--accent-ring); border-radius: 18px;
    padding: 18px 20px 16px; box-shadow: var(--shadow-2); color: var(--ink);
}
.seek-x { position: absolute; top: 8px; inset-inline-start: 12px; background: none; border: none;
    color: var(--muted); cursor: pointer; font-size: .95rem; }
.seek-term { font-weight: 700; color: var(--gold); margin-bottom: 5px; font-family: var(--font-head); }
.seek-def { font-size: .96rem; line-height: 1.75; }
.seek-refs { margin-top: 10px; font-size: .85rem; }
.seek-refs a { color: var(--gold); font-weight: 600; }
.seek-load { color: var(--muted); }
.item-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.tag {
    background: var(--bg-tint); color: var(--muted); border-radius: 30px; padding: 3px 12px;
    font-size: .76rem; direction: ltr; font-family: var(--mono); transition: background .15s ease, color .15s ease;
}
.tag:hover { background: var(--accent-soft); color: var(--accent-1); }
.src-link { margin-inline-start: auto; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.src-pill {
    font-size: .68rem; color: #fff; background: var(--faint); border-radius: 6px; padding: 2px 8px;
    direction: ltr; text-transform: uppercase; font-weight: 700; letter-spacing: .03em;
}
.src-pill.hf { background: var(--hf); } .src-pill.arxiv { background: var(--arxiv); }

/* ---------- Expert notes ---------- */
.notes { margin-top: 16px; }
.notes-title { font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: 9px; }
.note {
    background: var(--ok-soft); border-radius: var(--radius-sm); padding: 11px 15px; margin-bottom: 9px;
    position: relative; padding-inline-start: 18px;
}
.note::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--ok); }
.note .who { font-weight: 700; font-size: .85rem; color: var(--ok); }
.note .who a { color: var(--ok); }
.note .body { font-size: .93rem; color: var(--ink); }

/* ---------- Glossary box (in issue) ---------- */
.gloss-box {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 6px 20px; margin: 4px 0 30px; box-shadow: var(--shadow-1);
}
.gloss-box summary {
    cursor: pointer; font-weight: 700; font-family: var(--font-head); padding: 12px 0;
    display: flex; align-items: center; gap: 10px; list-style: none;
}
.gloss-box summary::-webkit-details-marker { display: none; }
.gloss-count { background: var(--accent-soft); color: var(--accent-1); border-radius: 20px;
    padding: 1px 10px; font-size: .8rem; }
.gloss-list { display: grid; gap: 12px; padding: 6px 0 14px; }
.gloss-item { border-inline-start: 3px solid var(--accent-ring); padding-inline-start: 12px; }
.gloss-term { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.g-name { font-weight: 700; direction: ltr; }
.g-type { font-size: .68rem; border-radius: 20px; padding: 1px 9px; font-weight: 700;
    background: var(--bg-tint); color: var(--muted); }
.g-type.t-model { background: rgba(255,138,0,.14); color: #d97706; }
.g-type.t-metric { background: rgba(14,165,233,.14); color: #0ea5e9; }
.g-type.t-dataset { background: rgba(16,185,129,.14); color: #10b981; }
.gloss-def { color: var(--ink); font-size: .96rem; }
.gloss-all { display: inline-block; margin-top: 6px; font-weight: 600; font-size: .9rem; }
.gloss-refs { margin-top: 6px; font-size: .85rem; color: var(--muted); }
.gloss-refs a { color: var(--gold); font-weight: 600; }
.gloss-refs a:hover { color: var(--accent-2); text-decoration: underline; }

/* ---------- Glossary page ---------- */
.gloss-search { width: 100%; margin: 18px 0; }
.gloss-group-title { font-family: var(--font-head); font-size: 1.15rem; margin: 26px 0 12px;
    display: flex; align-items: center; gap: 8px; }
.gloss-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-1);
    transition: transform .15s ease, border-color .15s ease;
}
.gloss-card:hover { transform: translateY(-2px); border-color: var(--accent-ring); }
.gloss-h { font-family: var(--font-head); font-size: 1.2rem; margin: 28px 0 12px; }
.muted { color: var(--muted); font-weight: 400; }
.gloss-section .gloss-row {
    background: var(--surface); border: 1px solid var(--line); border-inline-start-width: 3px;
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 11px; box-shadow: var(--shadow-1);
}

/* ---------- Archive ---------- */
.arch-item {
    display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow-1);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.arch-item:hover { transform: translateY(-2px); border-color: var(--accent-ring); box-shadow: var(--shadow-2); }
.arch-date { font-weight: 700; color: var(--ink); }
.arch-count { margin-inline-start: auto; color: var(--muted); font-size: .9rem; }

/* ---------- Subscribe / cards / forms ---------- */
.card-box {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; box-shadow: var(--shadow-2); margin: 44px auto; max-width: 500px;
    position: relative; overflow: hidden;
}
.card-box::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px; background: var(--accent-grad); }
.card-box h1 { font-size: 1.6rem; margin-top: 6px; letter-spacing: -.01em; }
.form-control, .form-select {
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); border-radius: 12px;
}
.form-control:focus, .form-select:focus {
    background: var(--surface-2); color: var(--ink);
    border-color: var(--accent-1); box-shadow: 0 0 0 .22rem var(--accent-ring);
}
.form-control::placeholder { color: var(--faint); }
.btn-brand {
    background: var(--accent-grad); border: none; color: #fff; font-weight: 600; border-radius: 12px;
    box-shadow: 0 6px 16px var(--accent-ring); transition: transform .15s ease, filter .15s ease;
}
.btn-brand:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); }
.btn-outline-primary { color: var(--accent-1); border-color: var(--accent-ring); border-radius: 12px; }
.btn-outline-primary:hover { background: var(--accent-1); border-color: var(--accent-1); }

/* ---------- Glossary box (per issue) ---------- */
.gloss-box {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 6px 20px; margin: 8px 0 30px; box-shadow: var(--shadow-1);
}
.gloss-box > summary {
    cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none;
    display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-family: var(--font-head);
}
.gloss-box > summary::-webkit-details-marker { display: none; }
.gloss-count { background: var(--accent-soft); color: var(--accent-1); border-radius: 30px; padding: 1px 11px; font-size: .8rem; }
.gloss-list { padding: 4px 0 12px; }
.gloss-item { padding: 12px 0; border-top: 1px dashed var(--line-soft); }
.gloss-item:first-child { border-top: 0; }
.gloss-term { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; flex-wrap: wrap; }
.g-name { font-weight: 700; font-family: var(--mono); }
.g-type { font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 1px 8px; }
.g-type.t-concept { background: var(--accent-soft); color: var(--accent-1); }
.g-type.t-model   { background: rgba(16,185,129,.14); color: #10b981; }
.g-type.t-metric  { background: rgba(245,158,11,.14); color: #f59e0b; }
.g-type.t-dataset { background: rgba(14,165,233,.14); color: #0ea5e9; }
.g-type.t-other   { background: var(--bg-tint); color: var(--muted); }
.gloss-def { color: var(--ink); font-size: .96rem; }
.gloss-all { display: inline-block; margin: 6px 0 12px; font-weight: 700; font-size: .9rem; }

/* ---------- Glossary page ---------- */
#gloss-search { font-size: 1rem; padding: 12px 16px; }
.gloss-section { margin-bottom: 26px; }
.gloss-h { font-size: 1.15rem; margin: 18px 0 10px; }
.gloss-h .muted { color: var(--faint); font-weight: 400; font-size: .9rem; }
.gloss-row {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-1);
    scroll-margin-top: 80px; transition: border-color .15s ease;
}
.gloss-row:hover { border-color: var(--accent-ring); }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line); background: var(--surface); padding: 30px 0; margin-top: 40px;
    color: var(--muted); font-size: .9rem; text-align: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-1); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 90px 20px; color: var(--muted); }
.empty-state .big {
    font-size: 3.4rem; margin-bottom: 10px;
    filter: drop-shadow(0 8px 20px var(--accent-ring));
}

/* ---------- Motion / responsive ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
    .issue-hero { padding-top: 32px; }
    .site-nav a:not(.btn-sub):not(.theme-toggle) { display: none; }
    .item { padding: 18px; }
    .card-box { padding: 24px; margin: 24px auto; }
}
