/* بلوق عربي — الأنماط. مبنية على نظام التصميم: رموز الألوان والخطوط والمسافات */

/* ---------- الخطوط ---------- */
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlexSansArabic-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlexSansArabic-arabic-500.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlexSansArabic-arabic-600.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlexSansArabic-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlexSansArabic-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlexSansArabic-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlexSansArabic-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlexSansArabic-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 400; font-display: swap; src: url(../fonts/NotoNaskhArabic-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Noto Naskh Arabic"; font-weight: 700; font-display: swap; src: url(../fonts/NotoNaskhArabic-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }

/* ---------- الرموز ---------- */
:root {
  --brand: #FF5A3C; --brand-strong: #D63F22; --brand-hover: #C2361D; --brand-text: #C2361D;
  --brand-tint: #FFE7E1; --brand-tint-strong: #FFC9BC; --on-brand: #FFFFFF;
  --ink: #1A1A1A; --ink-muted: #5C5C5C; --ink-subtle: #6B6B6B;
  --surface: #FFFFFF; --surface-alt: #FAF8F5; --surface-raised: #FFFFFF; --surface-sunken: #F2EFEA;
  --surface-inverse: #141414; --ink-inverse: #FFFFFF;
  --line: #E6E2DC; --line-strong: #8C857C; --focus: #2F6FDE;
  --cat-tech: #2F6FDE; --cat-business: #A0672E; --cat-books: #7B4BC4; --cat-self: #A35A0C; --cat-travel: #0B7A6E;
  --success: #177A43; --warning: #9A6213; --danger: #C62F2F;
  --shadow-sm: 0 1px 2px rgba(26,26,26,.06); --shadow-md: 0 6px 20px rgba(26,26,26,.08); --shadow-lg: 0 16px 40px rgba(26,26,26,.12);
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-reading: "Noto Naskh Arabic", "IBM Plex Sans Arabic", "Traditional Arabic", serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 999px;
  --measure: 680px; --content: 1200px; --control: 44px;
  color-scheme: light;
}
[data-theme="dark"] {
  --brand-strong: #FF6A4D; --brand-hover: #FF8166; --brand-text: #FF7A60;
  --brand-tint: #3A1B14; --brand-tint-strong: #5A2618; --on-brand: #141414;
  --ink: #F5F3F0; --ink-muted: #B5B0A8; --ink-subtle: #9A958E;
  --surface: #141414; --surface-alt: #1C1C1C; --surface-raised: #222222; --surface-sunken: #0E0E0E;
  --surface-inverse: #FAF8F5; --ink-inverse: #1A1A1A;
  --line: #2E2E2E; --line-strong: #6E6861; --focus: #7FA8F5;
  --cat-tech: #7FA8F5; --cat-business: #E0A86E; --cat-books: #B79AF0; --cat-self: #F0B262; --cat-travel: #5CCFC0;
  --success: #5CC98A; --warning: #F0B262; --danger: #FF8A8A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5); --shadow-md: 0 6px 20px rgba(0,0,0,.55); --shadow-lg: 0 16px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.75; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-subtle); }
.danger { color: var(--danger) !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; top: -100px; right: 16px; background: var(--ink); color: var(--surface); padding: 8px 16px; border-radius: var(--radius-md); z-index: 100; }
.skip:focus { top: 8px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--space-6); }
.wrap.narrow { max-width: 760px; }
.logo-dark, [data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
.ic-sun, [data-theme="dark"] .ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: inline; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control); padding: 0 var(--space-6); border-radius: var(--radius-md); border: 1px solid transparent; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--brand-strong); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { opacity: .88; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-sunken); }
.btn-ghost { background: transparent; color: var(--brand-text); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-pill { border-radius: var(--radius-full); }
.btn-sm { min-height: 36px; padding: 0 var(--space-4); font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--surface-sunken); text-decoration: none; }
.iconbtn-sm { width: 34px; height: 34px; }
.iconbtn .dot { position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--radius-full); background: var(--brand-strong); color: var(--on-brand); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.iconbtn .ic-on, .iconbtn.on .ic-off, .act .ic-on, .act.on .ic-off { display: none; }
.iconbtn.on .ic-on, .act.on .ic-on { display: inline; color: var(--brand); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-subtle); font-size: 13px; cursor: pointer; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }
[data-follow] .when-on, [data-follow][aria-pressed="true"] .when-off { display: none; }
[data-follow][aria-pressed="true"] .when-on { display: inline; }
[data-follow] .when-off { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- الحقول ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.input { width: 100%; min-height: var(--control); padding: 10px var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; }
textarea.input { line-height: 1.8; resize: vertical; }
.input::placeholder { color: var(--ink-subtle); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.input-sm { min-height: 34px; padding: 4px 10px; font-size: 14px; }
select.input { appearance: auto; }
.help { font-size: 13px; color: var(--ink-subtle); font-weight: 400; }
.check { display: flex; gap: 6px; align-items: center; font-size: 14px; margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }

/* ---------- الشارات ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink); font-size: 13px; font-weight: 500; line-height: 24px; white-space: nowrap; text-decoration: none !important; }
.tag .ic { width: 15px; height: 15px; }
a.tag:hover { background: var(--line); }
.tag-tech { color: var(--cat-tech); } .tag-business { color: var(--cat-business); } .tag-books { color: var(--cat-books); } .tag-self { color: var(--cat-self); } .tag-travel { color: var(--cat-travel); }
.tag-new { background: var(--brand-tint); color: var(--brand-text); }
.tag-danger { background: var(--danger); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips-lg .tag { font-size: 15px; padding: 6px 14px; }

/* ---------- الصور الشخصية ---------- */
.avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--brand-tint); color: var(--brand-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: 11px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 112px; height: 112px; font-size: 42px; }
.byline { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none !important; min-width: 0; }
.byline span { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.byline small { color: var(--ink-subtle); font-size: 13px; }

/* ---------- الشريط العلوي ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: var(--content); margin: 0 auto; height: 68px; padding: 0 var(--space-6); display: flex; align-items: center; gap: var(--space-6); }
.brand img { height: 34px; width: auto; }
.topsearch { position: relative; flex: 1; max-width: 340px; }
.topsearch .ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-subtle); }
.topsearch input { width: 100%; height: 40px; border-radius: var(--radius-full); border: 1px solid transparent; background: var(--surface-sunken); color: var(--ink); padding: 0 44px 0 16px; font: inherit; font-size: 15px; }
.topsearch input:focus { outline: 2px solid var(--focus); background: var(--surface); }
.topnav { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
.navlink { color: var(--ink-muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: var(--radius-md); }
.navlink:hover { color: var(--ink); background: var(--surface-sunken); text-decoration: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: var(--radius-full); display: flex; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; left: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-2); z-index: 60; }
.menu-head { padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; line-height: 1.5; }
.menu-head span { color: var(--ink-subtle); font-size: 13px; text-align: right; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; font-size: 15px; cursor: pointer; text-align: right; text-decoration: none; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-sunken); }
.menu-pop .ic { color: var(--ink-subtle); }
.show-xs { display: none !important; }

/* ---------- الرسائل ---------- */
.flashes { max-width: var(--content); margin: var(--space-4) auto 0; padding: 0 var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: 12px var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-raised); font-size: 15px; line-height: 1.7; }
.alert strong { display: block; }
.alert .ic { margin-top: 3px; }
.alert-success .ic { color: var(--success); } .alert-warning .ic { color: var(--warning); } .alert-info .ic { color: var(--focus); }
.alert-danger { border-color: var(--danger); } .alert-danger .ic { color: var(--danger); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface-inverse); color: var(--ink-inverse); padding: 12px 20px; border-radius: var(--radius-full); box-shadow: var(--shadow-lg); font-size: 15px; z-index: 200; }

/* ---------- البطل ---------- */
.hero { background: var(--surface-alt); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in { max-width: var(--content); margin: 0 auto; padding: var(--space-16) var(--space-6); display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-12); align-items: center; }
.eyebrow { color: var(--brand-text); font-weight: 600; font-size: 15px; }
.hero h1 { font-size: clamp(36px, 5.5vw, 60px); line-height: 1.25; margin: 12px 0 16px; letter-spacing: -.5px; }
.hero p { font-size: 19px; color: var(--ink-muted); max-width: 520px; line-height: 1.9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero-art { aspect-ratio: 1; max-width: 360px; justify-self: center; width: 100%; border-radius: 25%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 30px 60px -20px rgba(255,90,60,.5); }
.hero-art svg { width: 62%; }

/* ---------- العناوين والأقسام ---------- */
.section-title { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: var(--space-8) 0 var(--space-4); }
.section-title .ic { color: var(--brand); }
.page-head { background: var(--surface-alt); border-bottom: 1px solid var(--line); padding: var(--space-12) 0 var(--space-8); margin-bottom: var(--space-6); }
.page-head h1 { font-size: 36px; margin: 6px 0; }
.page-head p { color: var(--ink-muted); font-size: 17px; max-width: 640px; }
.page-head-ic { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: currentColor; }
.page-head-ic .ic { color: #fff; width: 28px; height: 28px; }
.page-head-cat.cat-tech .page-head-ic { color: var(--cat-tech); } .page-head-cat.cat-business .page-head-ic { color: var(--cat-business); } .page-head-cat.cat-books .page-head-ic { color: var(--cat-books); } .page-head-cat.cat-self .page-head-ic { color: var(--cat-self); } .page-head-cat.cat-travel .page-head-ic { color: var(--cat-travel); }

/* ---------- المختارات ---------- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }
.feat { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 260px; color: #fff; text-decoration: none !important; background: var(--surface-inverse); }
.feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.feat:hover img { transform: scale(1.04); }
.feat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.05) 65%); }
.feat-body { position: absolute; inset: auto 0 0 0; padding: var(--space-6); z-index: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.feat-body h3 { font-size: 21px; line-height: 1.5; }
.feat-body .meta { color: rgba(255,255,255,.85); font-size: 13px; }
.feat .tag { background: rgba(255,255,255,.92); }

/* ---------- الصفحة الرئيسية ---------- */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-12); margin-top: var(--space-6); }
.tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--line); margin-bottom: var(--space-2); overflow-x: auto; }
.tab { padding: 12px 0; color: var(--ink-subtle); font-weight: 500; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.tabs-row .tabs { margin: 0; flex: 1; }
.cards { display: flex; flex-direction: column; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: var(--space-6); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card .byline { font-size: 14px; font-weight: 500; gap: 8px; }
.card-title { font-size: 21px; line-height: 1.55; }
.card-title a { color: var(--ink); }
.card-excerpt { color: var(--ink-muted); font-size: 15.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.card-cover { align-self: center; }
.card-cover img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius-md); background: var(--brand-tint); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-subtle); }
.meta-ic { display: inline-flex; align-items: center; gap: 4px; }
.meta-ic .ic { width: 15px; height: 15px; }
.sep { opacity: .6; }
.aside { display: flex; flex-direction: column; gap: var(--space-6); }
.box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.box-title { font-size: 16px; margin-bottom: var(--space-4); }
.box-brand { background: var(--brand); color: #1A1A1A; border: 0; display: flex; flex-direction: column; gap: 10px; }
.box-brand p { line-height: 1.7; }
.box-brand .btn-dark { background: #1A1A1A; color: #fff; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.people li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.people strong { font-size: 15px; }
.people-lg li { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: var(--space-8) 0; }

/* ---------- الاستكشاف ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-4); }
.cat-tile { display: flex; flex-direction: column; gap: 6px; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface-alt); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-tile-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 6px; }
.cat-tile small { color: var(--ink-muted); line-height: 1.6; }
.cat-tile-n { font-size: 13px; color: var(--ink-subtle); margin-top: auto; }
.cat-tech .cat-tile-ic { background: var(--cat-tech); } .cat-business .cat-tile-ic { background: var(--cat-business); } .cat-books .cat-tile-ic { background: var(--cat-books); } .cat-self .cat-tile-ic { background: var(--cat-self); } .cat-travel .cat-tile-ic { background: var(--cat-travel); }
[data-theme="dark"] .cat-tile-ic .ic { color: #141414; }
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.author-card a { color: var(--ink); }
.author-card p { color: var(--ink-muted); font-size: 14px; line-height: 1.7; min-height: 1em; }
.author-card small { color: var(--ink-subtle); }
.people-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 120px; text-align: center; color: var(--ink); }
.person small { color: var(--ink-subtle); }
.bigsearch { position: relative; display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.bigsearch .ic { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-subtle); }
.bigsearch input { flex: 1; height: 52px; border-radius: var(--radius-full); border: 1px solid var(--line-strong); padding: 0 48px 0 16px; font: inherit; font-size: 17px; background: var(--surface); color: var(--ink); }
.bigsearch .btn { height: 52px; border-radius: var(--radius-full); }

/* ---------- المقال ---------- */
.progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.article { max-width: var(--measure); margin: 0 auto; padding: var(--space-12) var(--space-6) 0; }
.article-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.article-title { font-size: clamp(30px, 4.6vw, 42px); line-height: 1.4; letter-spacing: -.3px; }
.article-lead { font-family: var(--font-reading); font-size: 22px; line-height: 1.8; color: var(--ink-muted); }
.article-by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); width: 100%; padding: var(--space-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: var(--space-4); }
.owner-tools { display: flex; gap: var(--space-2); margin-inline-start: auto; }
.owner-tools form { display: contents; }
.article-cover { margin: var(--space-8) calc(var(--space-6) * -1) 0; }
.article-cover img { width: 100%; border-radius: var(--radius-lg); max-height: 520px; object-fit: cover; }
.prose { font-family: var(--font-reading); font-size: 20px; line-height: 2; color: var(--ink); margin-top: var(--space-8); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--font-sans); font-size: 28px; line-height: 1.5; margin-top: 1.6em; }
.prose h3 { font-family: var(--font-sans); font-size: 22px; line-height: 1.5; margin-top: 1.4em; }
.prose a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.5em 0; padding: var(--space-6) var(--space-8); background: var(--brand-tint); border-radius: var(--radius-lg); font-size: 24px; line-height: 1.9; font-weight: 700; position: relative; }
.prose blockquote::before { content: "«"; position: absolute; top: -18px; right: 20px; font-size: 64px; line-height: 1; color: var(--brand); font-family: var(--font-sans); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--brand); }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: "« » «"; color: var(--brand); letter-spacing: 12px; font-size: 22px; font-family: var(--font-sans); }
.prose img { border-radius: var(--radius-md); margin: 1.5em auto; height: auto; }
.prose figure { margin: 1.5em 0; } .prose figcaption { text-align: center; font-size: 14px; color: var(--ink-subtle); font-family: var(--font-sans); }
.prose pre { direction: ltr; text-align: left; background: var(--surface-inverse); color: var(--ink-inverse); padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; font-size: 15px; line-height: 1.7; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
.prose :not(pre) > code { background: var(--surface-sunken); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.article-tags { margin-top: var(--space-8); }
.actionbar { position: sticky; bottom: 16px; display: flex; justify-content: space-between; gap: var(--space-2); margin: var(--space-8) 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--surface-raised); box-shadow: var(--shadow-md); z-index: 10; }
.actionbar-group { display: flex; gap: 2px; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--radius-full); border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: 14px; text-decoration: none !important; }
.act:hover { background: var(--surface-sunken); color: var(--ink); }
.act.on, .act.on .ic { color: var(--brand); }
.act.on .ic { fill: var(--brand); }
.act.bump .ic { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.35); } }
.act-static { cursor: default; }
.act-static:hover { background: none; color: var(--ink-muted); }
.author-box { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface-alt); }
.author-box > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.author-box h3 a { color: var(--ink); }
.author-box p { margin-top: 8px; color: var(--ink-muted); font-size: 15px; line-height: 1.8; }
.comments { margin: var(--space-12) 0; }
.comments h2 { font-size: 22px; margin-bottom: var(--space-6); }
.comment-form { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-6); }
.comment-form-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-end; }
.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.comment.reply { border-top: 0; padding-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.comment-head a { color: var(--ink); }
.comment-body > p { margin-top: 4px; line-height: 1.9; overflow-wrap: break-word; }
.comment-tools { display: flex; gap: var(--space-4); margin-top: 4px; }
.comment-tools form { display: inline; }
.reply-form { margin: var(--space-3) 0 0; }
.comment:target { background: var(--brand-tint); border-radius: var(--radius-md); }
.more { margin-bottom: var(--space-12); border-top: 1px solid var(--line); }
.more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.mini { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none !important; }
.mini img { aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-md); background: var(--brand-tint); width: 100%; }
.mini strong { line-height: 1.6; }
.mini small { color: var(--ink-subtle); }

/* ---------- الملف الشخصي ---------- */
.profile-head { background: var(--surface-alt); border-bottom: 1px solid var(--line); padding: var(--space-12) 0; margin-bottom: var(--space-4); }
.profile-in { display: flex; gap: var(--space-8); align-items: flex-start; }
.profile-info { display: flex; flex-direction: column; gap: 6px; }
.profile-info h1 { font-size: 32px; }
.profile-info p { color: var(--ink-muted); font-size: 17px; line-height: 1.8; max-width: 520px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: var(--space-6); font-size: 15px; color: var(--ink-muted); margin: 6px 0; }
.profile-stats a { color: var(--ink-muted); }
.profile-stats strong { color: var(--ink); }
.profile-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 6px; }

/* ---------- لوحاتي والإحصاءات ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-4) var(--space-6); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.stat span { font-size: 14px; color: var(--ink-subtle); }
.stat strong { font-size: 28px; line-height: 1.3; }
.stat small { color: var(--success); font-size: 13px; }
.stat-alert { border-color: var(--danger); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: right; font-weight: 600; color: var(--ink-subtle); font-size: 13px; background: var(--surface-alt); }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.td-title { min-width: 220px; }
.td-title a { color: var(--ink); font-weight: 600; }
.td-actions { display: flex; gap: 2px; justify-content: flex-end; }
.td-actions form { display: inline; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-muted td { opacity: .55; }
.notes { list-style: none; padding: 0; margin: 0; }
.note { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-bottom: 1px solid var(--line); line-height: 1.8; }
.note.unread { background: var(--brand-tint); border-radius: var(--radius-md); }
.note small { display: block; }
.note a { color: var(--ink); }
.note-ic { width: 32px; height: 32px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; flex: none; background: var(--surface-sunken); }
.note-like .ic { color: var(--brand); } .note-follow .ic { color: var(--cat-tech); } .note-comment .ic, .note-reply .ic { color: var(--cat-travel); }
.settings { display: flex; flex-direction: column; gap: var(--space-6); padding-bottom: var(--space-12); }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); background: var(--surface-raised); }
.panel h2 { font-size: 19px; margin-bottom: var(--space-2); }
.panel-danger { border-color: var(--danger); }
.avatar-edit { display: flex; gap: var(--space-6); align-items: center; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); margin: var(--space-6) 0; border-radius: var(--radius-xl); background: var(--surface-alt); }
.empty-mark { width: 72px; height: 72px; border-radius: 18px; background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.empty-mark .ic { width: 32px; height: 32px; }
.empty h3 { font-size: 21px; }
.empty p { color: var(--ink-muted); max-width: 380px; line-height: 1.8; }
.notfound { text-align: center; padding: var(--space-24) var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.notfound-mark { width: 120px; color: var(--brand); margin-bottom: var(--space-4); }
.notfound .hero-cta { justify-content: center; margin-top: var(--space-4); }

/* ---------- التسجيل ---------- */
.auth-body { background: var(--surface-alt); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: var(--space-12) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.auth-card h1 { font-size: 30px; }
.auth-logo { height: 38px; width: auto; margin-bottom: var(--space-6); }
.auth-logo-link { align-self: flex-start; }
.auth-art { background: var(--brand) url(../img/pattern-quotes-coral.svg) repeat; background-size: 120px; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
.auth-alt { text-align: center; color: var(--ink-muted); font-size: 15px; }
.forgot { font-size: 14px; align-self: flex-start; margin-top: -6px; }
.form-section { font-size: 17px; margin-top: var(--space-4); }
.auth-card .flashes { padding: 0; margin: 0; }

/* ---------- المحرر ---------- */
.editor-body { background: var(--surface); }
.ed-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-4); height: 64px; padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); }
.ed-bar .brand img { height: 34px; width: 34px; }
.ed-status { font-size: 14px; color: var(--ink-subtle); }
.ed-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; max-width: 1180px; margin: 0 auto; gap: var(--space-8); padding: 0 var(--space-6); }
.ed-main { max-width: var(--measure); width: 100%; margin: 0 auto; padding-bottom: 30vh; }
.ed-tools { position: sticky; top: 72px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; margin: var(--space-4) 0 var(--space-6); border-radius: var(--radius-md); background: var(--surface-inverse); box-shadow: var(--shadow-md); width: fit-content; }
.ed-tools button { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-inverse); font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ed-tools button:hover, .ed-tools button.on { background: rgba(127,127,127,.25); }
.ed-tools button.on { color: var(--brand); }
.ed-tools .sep { width: 1px; height: 24px; background: rgba(127,127,127,.4); margin: 0 4px; }
.ed-title, .ed-subtitle { width: 100%; border: 0; resize: none; background: transparent; color: var(--ink); overflow: hidden; padding: 0; font-family: var(--font-sans); }
.ed-title { font-size: 38px; font-weight: 700; line-height: 1.45; }
.ed-subtitle { font-family: var(--font-reading); font-size: 21px; line-height: 1.8; color: var(--ink-muted); margin-top: var(--space-2); }
.ed-title:focus, .ed-subtitle:focus, .ed-body:focus { outline: none; }
.ed-title::placeholder, .ed-subtitle::placeholder { color: var(--ink-subtle); opacity: .7; }
.ed-body { min-height: 50vh; margin-top: var(--space-6); }
.ed-body:empty::before, .ed-body.is-empty::before { content: attr(data-placeholder); color: var(--ink-subtle); pointer-events: none; position: absolute; }
.ed-body img.uploading { opacity: .4; }
.ed-count { position: fixed; bottom: 16px; right: 24px; font-size: 13px; color: var(--ink-subtle); background: var(--surface-raised); padding: 4px 12px; border-radius: var(--radius-full); border: 1px solid var(--line); }
.ed-panel { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); margin-top: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-alt); }
.ed-panel h2 { font-size: 17px; }
.cover-drop { display: flex; align-items: center; justify-content: center; min-height: 140px; border: 2px dashed var(--line-strong); border-radius: var(--radius-md); cursor: pointer; overflow: hidden; background: var(--surface); }
.cover-drop img { width: 100%; height: 160px; object-fit: cover; }
.cover-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-subtle); font-size: 14px; font-weight: 400; padding: var(--space-4); text-align: center; }
.cover-drop.drag { border-color: var(--brand); background: var(--brand-tint); }
.tip { display: flex; gap: 10px; font-size: 14px; line-height: 1.8; color: var(--ink-muted); background: var(--brand-tint); padding: var(--space-4); border-radius: var(--radius-md); font-weight: 400; }
.tip .ic { color: var(--brand); margin-top: 4px; }

/* ---------- الإدارة ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--surface-alt); border-left: 1px solid var(--line); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-8); position: sticky; top: 0; height: 100vh; }
.admin-side nav { display: flex; flex-direction: column; gap: 2px; }
.admin-side nav a, .admin-back { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-muted); font-weight: 500; text-decoration: none !important; }
.admin-side nav a:hover { background: var(--surface-sunken); color: var(--ink); }
.admin-side nav a.active { background: var(--brand-tint); color: var(--brand-text); }
.admin-back { margin-top: auto; font-size: 14px; }
.admin-main { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.admin-main .flashes { padding: 0; margin: 0; max-width: none; }
.admin-main h1 { font-size: 28px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.admin-search { display: flex; gap: var(--space-2); align-items: center; }
.admin-search .input { min-height: 36px; padding: 4px 12px; width: 220px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; margin-top: var(--space-6); }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar span { display: block; width: 100%; min-height: 3px; background: var(--brand); border-radius: 6px 6px 2px 2px; }
.bar small { font-size: 11px; color: var(--ink-subtle); }
.rank { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-direction: column; gap: var(--space-3); }
.rank li { display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; font-size: 15px; }
.rank a { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 1000px) {
  .with-aside, .ed-layout { grid-template-columns: minmax(0, 1fr); }
  .aside { order: 2; }
  .ed-panel { position: static; margin-bottom: var(--space-12); }
  .ed-panel.collapsed { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-4); border-left: 0; border-bottom: 1px solid var(--line); }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .admin-back { margin: 0; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--space-4); }
  .topbar-in { gap: var(--space-3); padding: 0 var(--space-4); height: 60px; }
  .topsearch, .hide-sm { display: none; }
  .brand img { height: 30px; }
  .hero-in { grid-template-columns: 1fr; padding: var(--space-12) var(--space-4); }
  .hero-art { display: none; }
  .card { grid-template-columns: minmax(0, 1fr) 96px; gap: var(--space-4); }
  .card-cover img { width: 96px; height: 96px; }
  .card-title { font-size: 18px; }
  .card-excerpt { display: none; }
  .article { padding-top: var(--space-8); }
  .prose { font-size: 19px; }
  .article-cover { margin-inline: calc(var(--space-6) * -1); }
  .article-cover img { border-radius: 0; }
  .profile-in { flex-direction: column; gap: var(--space-4); }
  .avatar-xl { width: 88px; height: 88px; }
  .grid-2 { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .ed-bar { padding: 0 var(--space-4); gap: var(--space-2); }
  .ed-status { display: none; }
  .ed-title { font-size: 30px; }
  .ed-tools { top: 68px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .ed-tools button { flex: none; }
  .ed-count { display: none; }
  .admin-main { padding: var(--space-4); }
  .tabs-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .hide-xs { display: none !important; }
  .show-xs { display: flex !important; }
  .more-grid { grid-template-columns: 1fr; }
  .actionbar .act { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .footer, .actionbar, .comments, .more, .progress, .owner-tools { display: none !important; } }

/* ---------- الفوتر ---------- */
.footer { background: var(--surface-inverse); color: var(--ink-inverse); margin-top: var(--space-16); }
[data-theme="dark"] .footer { background: #0B0B0B; color: #F5F3F0; }
.footer-in { max-width: var(--content); margin: 0 auto; padding: var(--space-12) var(--space-6); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-8); }
.footer-brand img { height: 34px; width: auto; display: block !important; }
[data-theme="dark"] .footer-brand img { display: block !important; }
.footer-brand p { margin-top: var(--space-4); opacity: .7; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: inherit; opacity: .8; }
.footer-bottom { border-top: 1px solid rgba(127,127,127,.25); text-align: center; padding: var(--space-4); font-size: 13px; opacity: .6; }
@media (max-width: 720px) { .footer-in { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
[hidden] { display: none !important; }

/* ---------- الاستيراد ---------- */
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.import-preview { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface-alt); }
.import-preview .form-section { margin: 0 0 8px; font-size: 15px; }
.pv-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.pv-list .tag { margin-inline-start: 8px; }
.pw { display: inline-block; background: var(--surface-sunken); padding: 2px 10px; border-radius: 6px; font-size: 15px; user-select: all; margin-inline-start: 6px; }
.code-ex { margin-top: var(--space-4); }
.code-ex summary { cursor: pointer; color: var(--brand-text); font-weight: 500; }
.code-ex pre { direction: ltr; text-align: left; background: var(--surface-inverse); color: var(--ink-inverse); padding: var(--space-4); border-radius: var(--radius-md); overflow-x: auto; font-size: 13px; line-height: 1.7; }
.panel code { overflow-wrap: anywhere; }

/* ---------- النطاقات الفرعية ---------- */
.subfield { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.subfield:focus-within { outline: 2px solid var(--focus); border-color: transparent; }
.subfield .input { border: 0; border-radius: 0; min-width: 0; flex: 1; }
.subfield .input:focus { outline: none; }
.subfield-root { display: flex; align-items: center; padding: 0 14px; background: var(--surface-sunken); color: var(--ink-muted); font-size: 15px; white-space: nowrap; }
.subdomain { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text); font-weight: 500; font-size: 15px; }
.subdomain .ic { width: 16px; height: 16px; }

/* ---------- الجدولة ---------- */
.timeline { list-style: none; margin: var(--space-4) 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline li:last-child { border-bottom: 0; }
.tl-time { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; color: var(--ink); }
.tl-time small { color: var(--ink-subtle); font-weight: 400; }
.timeline a { color: var(--ink); font-weight: 500; }
.tag .ic { margin-inline-end: 2px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- مقالات بلا صورة ---------- */
.card.no-cover { grid-template-columns: minmax(0, 1fr); }
.card.no-cover .card-excerpt { -webkit-line-clamp: 3; }
@media (max-width: 720px) { .card.no-cover { grid-template-columns: minmax(0, 1fr); } .card.no-cover .card-excerpt { display: -webkit-box; } }
.feat-text { background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line); }
.feat-text::after { display: none; }
.feat-text .feat-body { inset: 0; justify-content: flex-end; }
.feat-text .feat-body .meta { color: var(--ink-subtle); }
.feat-text .tag { background: var(--surface-raised); }
.feat-text h3 { font-size: 23px; }
.mini-cat { align-self: flex-start; }

/* ---------- SEO و AEO ---------- */
.crumbs ol { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-subtle); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--ink-subtle); }
.crumbs a { color: var(--ink-muted); }
.crumbs [aria-current] { color: var(--ink-subtle); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.tldr { margin-top: var(--space-8); padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface-alt); border: 1px solid var(--line); }
.tldr h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.tldr h2 .ic { color: var(--brand); }
.tldr ul { margin: 0; padding-inline-start: 1.2em; font-size: 17px; line-height: 1.9; }
.tldr li::marker { color: var(--brand); }
.toc { margin-top: var(--space-6); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.toc ol { margin: 0 0 12px; padding-inline-start: 1.4em; line-height: 2; }
.toc .toc-h3 { margin-inline-start: 1.2em; font-size: 15px; }
.toc a { color: var(--ink-muted); }
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.faq { margin-top: var(--space-12); }
.faq h2 { font-size: 24px; margin-bottom: var(--space-4); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 14px; color: var(--ink-muted); line-height: 1.9; }
.seo-box { border-top: 1px solid var(--line); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.seo-box > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.seo-box > summary .ic { color: var(--brand); }
.seo-box[open] { display: flex; }
.serp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; font-family: Arial, var(--font-sans); }
.serp-url { font-size: 12px; color: var(--ink-subtle); text-align: right; }
.serp-title { color: #1a0dab; font-size: 18px; line-height: 1.4; margin: 2px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.faq-ed { display: flex; flex-direction: column; gap: 10px; }
.faq-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.faq-row .linkbtn { align-self: flex-start; }
.seo-checks { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--ink-subtle); display: flex; flex-direction: column; gap: 3px; font-weight: 400; }
.seo-checks .ok { color: var(--success); }
.seo-checks .score { font-weight: 700; color: var(--ink); margin-bottom: 4px; }

/* ---------- صفحة الكاتب ---------- */
.ph { border-bottom: 1px solid var(--line); background: var(--surface); }
.ph-cover { height: clamp(140px, 22vw, 260px); overflow: hidden; background: var(--surface-alt); }
.ph-cover img { width: 100%; height: 100%; object-fit: cover; }
.ph-in { max-width: 1100px; margin: 0 auto; padding: var(--space-12) var(--space-6) var(--space-6); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.has-cover .ph-in { padding-top: 0; }
.has-cover .ph-avatar { margin-top: -56px; }
.ph-avatar .avatar { width: 128px; height: 128px; font-size: 48px; box-shadow: 0 0 0 5px var(--surface); }
.ph-main { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.has-cover .ph-main { padding-top: var(--space-4); }
.ph-name { font-size: clamp(30px, 4vw, 42px); line-height: 1.25; letter-spacing: -.3px; }
.ph-handle { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 15px; }
.ph-handle .muted { display: inline-flex; align-items: center; gap: 4px; }
.ph-handle .ic { width: 16px; height: 16px; }
.ph-headline { font-size: 18px; font-weight: 600; color: var(--ink); }
.ph-bio { font-size: 17px; color: var(--ink-muted); line-height: 1.8; max-width: 640px; }
.ph-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; color: var(--ink-subtle); margin-top: 4px; }
.ph-stats a { color: var(--ink-subtle); }
.ph-stats strong { color: var(--ink); font-size: 16px; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ph-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ph-social a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; padding: 4px 12px; border-radius: var(--radius-full); border: 1px solid var(--line); color: var(--ink-muted); }
.ph-social a:hover { border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.ph-social .ic { width: 15px; height: 15px; }
.ph-tabs { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-6); display: flex; gap: var(--space-8); }
.ph-tabs a { padding: 14px 0; color: var(--ink-subtle); font-weight: 500; border-bottom: 2px solid transparent; text-decoration: none; }
.ph-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.pl { max-width: 1100px; margin: 0 auto; padding: var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-12); }
.pl-side { display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-6); }
.side-block h3 { font-size: 15px; margin-bottom: 10px; }
.side-block p { font-size: 15px; color: var(--ink-muted); line-height: 1.8; margin-bottom: 6px; }
.side-block > a { font-size: 14px; }
.side-sub { padding: var(--space-6); border-radius: var(--radius-lg); background: var(--surface-alt); }
.mini-people { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.pin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); margin: var(--space-6) 0 var(--space-2); border-radius: var(--radius-lg); background: var(--surface-alt); color: var(--ink); text-decoration: none !important; border: 1px solid var(--line); }
.pin:not(:has(img)) { grid-template-columns: 1fr; }
.pin img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-md); }
.pin h2 { font-size: 24px; line-height: 1.5; margin: 6px 0; }
.pin p { color: var(--ink-muted); line-height: 1.8; }
.pin-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-text); }
.pin-label .ic { width: 16px; height: 16px; }
.about { padding-top: var(--space-6); }
.about h2 { font-size: 26px; margin-bottom: var(--space-4); }
.about-text { margin-top: 0; font-size: 19px; }
.facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px 16px; margin: var(--space-8) 0; padding: var(--space-6) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--ink-subtle); }
.facts dd { margin: 0; }
.pop { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.pop li { display: flex; gap: 14px; align-items: flex-start; }
.pop-n { font-size: 28px; font-weight: 700; color: var(--line-strong); line-height: 1; min-width: 28px; }
.pop a { color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.pop small { color: var(--ink-subtle); }
.cover-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius-md); }
@media (max-width: 900px) { .pl { grid-template-columns: minmax(0, 1fr); } .pl-side { padding-top: 0; } }
@media (max-width: 600px) {
  .ph-in { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-8) var(--space-4) var(--space-4); }
  .ph-avatar .avatar { width: 96px; height: 96px; font-size: 36px; }
  .has-cover .ph-avatar { margin-top: -48px; }
  .pin { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 10px; }
}

/* ---------- صفحات المحتوى ---------- */
.page-article { padding-bottom: var(--space-8); }
.page-ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-6); align-items: start; }
.page-body { min-height: 360px; margin-top: 0; border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4) var(--space-6); font-size: 18px; }
.page-body:focus { outline: 2px solid var(--focus); }
@media (max-width: 1000px) { .page-ed { grid-template-columns: minmax(0, 1fr); } }

.cron-status { padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface-alt); border-inline-start: 4px solid var(--line-strong); }
.cron-status.ok { border-color: var(--success, #1f9d55); }
