/* ==========================================================
   حقيبة التاجر الإلكتروني — الهوية البصرية
   ألوان: زمرّدي عميق + زعفراني دافئ على أرضية ورقية
   ========================================================== */
:root {
  --brand-900: #062E2A;
  --brand-800: #0A3F39;
  --brand-700: #0B4F47;
  --brand-600: #0F6A5E;
  --brand-500: #138574;
  --brand-100: #DCEFEA;
  --brand-50:  #EEF7F4;
  --accent:    #F2A541;
  --accent-600:#D98A1F;
  --accent-100:#FDF0DC;

  --bg:      #F7F5EF;
  --bg-2:    #EFECE3;
  --surface: #FFFFFF;
  --ink:     #13201E;
  --ink-2:   #3D4B48;
  --muted:   #6B7774;
  --line:    #E4DFD3;
  --line-2:  #D6D0C2;
  --tile:    #FFFFFF;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(19, 32, 30, .06);
  --shadow:    0 1px 2px rgba(19, 32, 30, .05), 0 8px 24px -12px rgba(19, 32, 30, .18);
  --shadow-lg: 0 24px 60px -24px rgba(6, 46, 42, .35);

  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --wrap: 1200px;
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.35; margin: 0; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }
kbd { font-family: var(--font); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--brand-700); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main { outline: none; min-height: 60vh; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid transparent; border-radius: 999px; padding: .7em 1.35em;
  font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .5em 1em; font-size: .88rem; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #2A1A04; }
.btn-accent:hover { background: #F6B45C; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand-600); color: var(--brand-600); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; height: 42px; min-width: 42px; padding: 0 10px; }
.icon-btn:hover { border-color: var(--line-2); }

/* ---------- الشريط العلوي ---------- */
.preview-bar { position: sticky; top: 0; z-index: 60; background: var(--accent); color: #2A1A04; text-align: center; font-size: .9rem; font-weight: 600; padding: 8px 16px; }
.preview-bar a { text-decoration: underline; }
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { display: inline-flex; }
.logo-mark { width: 42px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; }
.brand-text strong span { color: var(--brand-600); }
.brand-text small { margin-top: 3px; font-size: .66rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; direction: ltr; text-align: right; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; }
.nav a, .nav-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); background: none; border: 0; font-size: .95rem; }
.nav a:hover, .nav-btn:hover, .nav a.active, .nav-btn[aria-expanded="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-btn .ic { width: 16px; height: 16px; transition: transform .2s; }
.nav-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger { padding: 0 8px 0 14px; color: var(--muted); min-width: 240px; justify-content: flex-start; }
.search-trigger .search-hint { font-size: .9rem; }
.search-trigger kbd { margin-inline-start: auto; border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font-size: .78rem; background: var(--bg); }
.menu-btn { display: none; }

.mega { border-top: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-block: 18px 22px; }
.mega-link { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; }
.mega-link:hover { background: var(--brand-50); }
.mega-link .cat-ic { width: 36px; height: 36px; border-radius: 10px; }
.mega-link .cat-ic .ic { width: 19px; height: 19px; }
.mega-link strong { display: block; font-size: .93rem; font-weight: 600; line-height: 1.4; }
.mega-link small { color: var(--muted); font-size: .8rem; }

.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(6, 20, 18, .45); }
.drawer-panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(360px, 88vw); background: var(--surface); display: flex; flex-direction: column; animation: slideIn .22s ease; }
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-nav { overflow-y: auto; padding: 10px; display: grid; gap: 2px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 500; }
.drawer-nav a:hover, .drawer-nav a.active { background: var(--brand-50); }
.drawer-nav .cat-ic { width: 34px; height: 34px; border-radius: 10px; }
.drawer-nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }

/* ---------- أيقونة القسم ---------- */
.cat-ic { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.cat-ic .ic { width: 24px; height: 24px; }

/* ---------- الواجهة الرئيسية ---------- */
.hero { position: relative; overflow: hidden; padding-block: 56px 64px; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
  radial-gradient(700px 400px at 10% 20%, color-mix(in srgb, var(--brand-500) 12%, transparent), transparent 70%);
  pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.eyebrow b { background: var(--brand-700); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: .78rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; margin-top: 18px; line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--brand-600); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; inset-inline: 0; bottom: .08em; height: .22em; background: var(--accent); opacity: .45; border-radius: 4px; z-index: -1; }
.hero-intro { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; max-width: 56ch; }
.hero-intro p + p { margin-top: 6px; }
.hero-search { margin-top: 28px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 8px 8px 8px 8px; box-shadow: var(--shadow); max-width: 560px; cursor: text; }
.hero-search .ic { color: var(--muted); margin-inline-start: 10px; width: 22px; height: 22px; }
.hero-search span.ph { flex: 1; color: var(--muted); font-size: 1rem; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; color: var(--ink-2); }
.chip:hover { border-color: var(--brand-600); color: var(--brand-600); }
.chip .ic { width: 15px; height: 15px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--brand-700); line-height: 1.1; }
.stat span { font-size: .86rem; color: var(--muted); }

.logo-wall { position: relative; height: 500px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); }
.lw-col { overflow: hidden; }
.lw-track { display: grid; gap: 14px; animation: lwUp 48s linear infinite; }
.lw-col:nth-child(2) .lw-track { animation-duration: 58s; animation-direction: reverse; }
.lw-col:nth-child(3) .lw-track { animation-duration: 52s; }
.logo-wall:hover .lw-track { animation-play-state: paused; }
@keyframes lwUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.lw-tile { display: grid; place-items: center; height: 124px; background: var(--tile); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 18px; transition: transform .2s, box-shadow .2s; }
.lw-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lw-tile img { max-height: 84px; width: auto; max-width: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .lw-track { animation: none; } }

.section { padding-block: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 6px; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent-600); letter-spacing: .02em; margin-bottom: 6px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.cat-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.cat-card:hover .cat-ic { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.cat-card .cat-ic { transition: background-color .2s, color .2s; }
.cat-card h3 { font-size: 1.12rem; font-weight: 600; }
.cat-card p { color: var(--muted); font-size: .92rem; line-height: 1.7; flex: 1; }
.cat-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--ink-2); }
.cat-foot .go { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); transition: background-color .2s, color .2s; }
.cat-card:hover .go { background: var(--accent); color: #2A1A04; }
.cat-foot .go .ic { width: 16px; height: 16px; }
.cat-faces { display: flex; }
.cat-faces img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: var(--tile); border: 2px solid var(--surface); margin-inline-start: -8px; padding: 2px; box-shadow: 0 0 0 1px var(--line); }
.cat-faces img:first-child { margin-inline-start: 0; }
.soon { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--accent-100); color: var(--accent-600); font-size: .78rem; font-weight: 600; }

.band { position: relative; overflow: hidden; border-radius: 28px; background: var(--brand-800); color: #fff; padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(circle at 15% 50%, #000, transparent 70%); mask-image: radial-gradient(circle at 15% 50%, #000, transparent 70%); }
.band::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--accent); opacity: .16; filter: blur(10px); inset-inline-end: -120px; top: -140px; }
.band > * { position: relative; z-index: 1; }
.band h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; }
.band p { color: rgba(255,255,255,.78); margin-top: 8px; }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.author { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; }
.monogram { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(140deg, var(--brand-600), var(--brand-800)); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 2rem; position: relative; }
.monogram::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 6px; background: var(--accent); inset-block-end: -4px; inset-inline-start: -4px; border: 3px solid var(--surface); }
.author small { color: var(--accent-600); font-weight: 600; font-size: .85rem; }
.author h3 { font-size: 1.35rem; font-weight: 700; }
.author p { color: var(--ink-2); margin-top: 4px; max-width: 70ch; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); transition: all .15s; }
.socials a:hover { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }

/* ---------- صفحة القسم ---------- */
.page-hero { padding-block: 36px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand-600); }
.crumbs .ic { width: 14px; height: 14px; }
.page-title { display: flex; gap: 18px; align-items: center; }
.page-title .cat-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.page-title .cat-ic .ic { width: 30px; height: 30px; }
.page-title h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
.page-title p { color: var(--muted); margin-top: 4px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.page-meta .chip.count { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.page-intro { margin-top: 16px; color: var(--ink-2); max-width: 75ch; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; padding-block: 36px 24px; align-items: start; }
.side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; padding-inline-end: 4px; }
.side h4 { font-size: .8rem; color: var(--muted); font-weight: 600; margin: 0 10px 8px; font-family: var(--font); }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .9rem; color: var(--ink-2); }
.side a .ic { width: 18px; height: 18px; color: var(--muted); }
.side a:hover { background: var(--surface); }
.side a.active { background: var(--surface); color: var(--brand-700); font-weight: 600; box-shadow: var(--shadow-sm); }
.side a.active .ic { color: var(--brand-600); }
.side a .n { margin-inline-start: auto; font-size: .75rem; color: var(--muted); }

.group + .group { margin-top: 44px; }
.group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.group-head h2 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.group-head h2::before { content: ""; width: 8px; height: 22px; border-radius: 3px; background: var(--accent); }
.group-head .sub { color: var(--muted); font-size: .9rem; }
.group-note { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 14px 18px; color: var(--ink-2); margin-bottom: 16px; font-size: .95rem; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.tool { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, transform .2s; scroll-margin-top: 100px; }
.tool:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.tool.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: var(--shadow-sm); } }
.tool-logo { display: grid; place-items: center; height: 132px; background: var(--tile); border-bottom: 1px solid var(--line); padding: 22px 30px; }
.tool-logo img { max-height: 88px; width: auto; max-width: 100%; object-fit: contain; }
.tool-logo.noimg { background: var(--brand-50); color: var(--brand-600); font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.tool-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tool-body h3 { font-size: 1.12rem; font-weight: 600; }
.tool .sub { display: inline-flex; align-self: flex-start; font-size: .8rem; font-weight: 600; color: var(--brand-600); background: var(--brand-50); border-radius: 999px; padding: 2px 10px; }
.tool-desc { color: var(--ink-2); font-size: .93rem; line-height: 1.8; }
.tool-desc p + p { margin-top: 6px; }
.tool-desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.more { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--brand-600); font-weight: 600; font-size: .85rem; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.tool-links .btn .ic { width: 16px; height: 16px; }

.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color .2s, box-shadow .2s; scroll-margin-top: 100px; }
.row:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.row.flash { animation: flash 1.8s ease; }
.row-tag { display: inline-flex; font-size: .75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--accent-100); color: var(--accent-600); margin-bottom: 6px; }
.row-tag.press { background: var(--brand-50); color: var(--brand-600); }
.row h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.6; }
.row .desc { color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
.row .src { color: var(--muted); font-size: .85rem; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.row .src .ic { width: 15px; height: 15px; }
.row-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 380px; }

.gallery { columns: 3 240px; column-gap: 14px; }
.gallery button { display: block; width: 100%; margin-bottom: 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); break-inside: avoid; transition: transform .2s, box-shadow .2s; }
.gallery button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery img { width: 100%; height: auto; }

.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty .cat-ic { margin-inline: auto; width: 64px; height: 64px; border-radius: 20px; }
.empty h3 { margin-top: 16px; font-size: 1.2rem; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 46ch; }

.suggest { margin-top: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--accent-100); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.suggest strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pager a:hover { border-color: var(--brand-600); }
.pager small { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: 4px; }
.pager small .ic { width: 14px; height: 14px; }
.pager strong { font-weight: 600; }
.pager .next { text-align: left; }
.pager .next small { justify-content: flex-end; }

/* ---------- عن الحقيبة ---------- */
.prose { max-width: 760px; }
.prose p { color: var(--ink-2); font-size: 1.05rem; }
.prose p + p { margin-top: 12px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.value .cat-ic { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px; }
.value strong { display: block; font-weight: 600; }
.value span { color: var(--muted); font-size: .9rem; }

/* ---------- البحث ---------- */
.palette { position: fixed; inset: 0; z-index: 90; background: rgba(6, 20, 18, .5); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.palette-box { width: 100%; max-width: 640px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input .ic { color: var(--muted); width: 22px; height: 22px; }
.palette-input input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); min-width: 0; }
.palette-input input::-webkit-search-cancel-button { display: none; }
.esc { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; font-size: .8rem; padding: 4px 10px; color: var(--muted); }
.palette-results { overflow-y: auto; padding: 8px; }
.pr-group { font-size: .78rem; color: var(--muted); font-weight: 600; padding: 10px 10px 4px; }
.pr { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.pr.on, .pr:hover { background: var(--brand-50); }
.pr-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--tile); border: 1px solid var(--line); display: grid; place-items: center; padding: 5px; flex: none; color: var(--brand-600); }
.pr-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pr-logo .ic { width: 20px; height: 20px; }
.pr strong { display: block; font-weight: 600; font-size: .95rem; }
.pr small { color: var(--muted); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pr-empty { padding: 28px; text-align: center; color: var(--muted); }
mark { background: var(--accent-100); color: inherit; border-radius: 3px; padding: 0 1px; }

.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(4, 12, 11, .92); display: grid; place-items: center; padding: 56px 72px; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 12px; }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 16px; top: 50%; }
.lb-next { inset-inline-end: 16px; top: 50%; }

/* ---------- التذييل ---------- */
.footer { margin-top: 64px; background: var(--brand-900); color: rgba(255,255,255,.75); padding-block: 48px 28px; }
.footer .brand-mark { --logo-body: #fff; --logo-rim: #DCEFEA; --logo-cursor: var(--brand-800); }
.footer .brand-text strong span { color: var(--accent); }
.footer .brand-text small { color: rgba(255,255,255,.5); }
.footer .brand-text strong { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 2fr; gap: 40px; }
.foot-about p { margin-top: 14px; font-size: .92rem; max-width: 42ch; }
.foot-links { columns: 3 160px; column-gap: 24px; }
.foot-links a { display: block; padding: 4px 0; font-size: .9rem; break-inside: avoid; }
.foot-links a:hover { color: var(--accent); }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.foot-bottom a:hover { color: #fff; }
.footer .socials a { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.footer .socials a:hover { background: var(--accent); border-color: var(--accent); color: #2A1A04; }

.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand-600); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal, .tool.flash, .row.flash { animation: none; } html { scroll-behavior: auto; } }

/* ---------- الاستجابة ---------- */
@media (max-width: 1080px) {
  .search-trigger { min-width: 0; }
  .search-trigger .search-hint, .search-trigger kbd { display: none; }
  .mega-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .logo-wall { height: 300px; grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 32px 26px; }
  .author { grid-template-columns: auto 1fr; }
  .author .socials { grid-column: 1 / -1; }
  .values { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .topbar-in { height: 64px; gap: 12px; }
  .logo-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: .98rem; }
  .hide-sm { display: none; }
  .hero { padding-block: 32px 40px; }
  .stats { gap: 20px; }
  .stat strong { font-size: 1.5rem; }
  .logo-wall { height: 230px; gap: 10px; }
  .lw-track { gap: 10px; }
  .lw-tile { padding: 12px; border-radius: 14px; height: 88px; }
  .lw-tile img { max-height: 58px; }
  .section { padding-block: 40px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cat-grid, .tool-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .row-links { justify-content: flex-start; }
  .page-title .cat-ic { width: 52px; height: 52px; }
  .author { grid-template-columns: 1fr; text-align: start; padding: 22px; }
  .pager { grid-template-columns: 1fr; }
  .lightbox { padding: 56px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; }
}
