/* الخطوط مستضافة في الموقع نفسه (رخصة OFL)، فلا طلب إلى طرف ثالث، وتعمل بلا إنترنت.
   خط النص (Plex) بـ optional (الجولة 20): الخط البديل أعرض، فتبديله بعد الرسم الأول كان يقصّر الفقرات ويزيح الصفحة
   (CLS 0.32 في الطقس و0.11 في المواسم). إن لم يصل الخط في نحو 100 مث تبقى الزيارة بخط النظام بلا إزاحة، ويُستعمل الخط
   من الحفظ في الزيارات التالية. العناوين (Alexandria) تبقى swap لأن ارتفاعها لا يتغير. */
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/alexandria-arabic-600.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/alexandria-arabic-800.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/alexandria-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Alexandria"; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/alexandria-latin-800.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: optional; src: url('/assets/fonts/plex-arabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: optional; src: url('/assets/fonts/plex-arabic-600.woff2') format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: optional; src: url('/assets/fonts/plex-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: optional; src: url('/assets/fonts/plex-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+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* «بالضبط» — المتغيرات مولّدة من tokens.json في نظام الهوية. لا تُعدَّل باليد. */
:root, [data-theme="light"] {
  --bg: #F5F4F1;
  --surface: #FFFFFF;
  --surface-2: #E9E7E1;
  --well: #F5F4F1;
  --ink: #14161B;
  --muted: #5C5E66;
  --muted-on-bg: #5C5E66;
  --line: #DAD8D2;
  --field-line: #8A8D96;
  --brand: #FF5A1F;
  --on-brand: #14161B;
  --brand-text: #C23A05;
  --link: #2D3BC7;
  --link-hover: #1F2A99;
  --error: #B42318;
  --card: #14161B;
  --card-ink: #F3F3F0;
  --card-muted: #A4A7B0;
  --card-number: #FF6B33;
  --card-accent: #9AA6FF;
  --card-line: #2C3038;
  --card-outline: #6B7080;
  --pattern-key: #ECEAE5;
  --pattern-glyph: #CFCCC4;
  --pattern-key-brand: #F04E14;
  --pattern-glyph-brand: #D9430F;
  --glow-indigo: #4B5BFF;
  --glow-indigo-deep: #2D3BC7;
  --glow-orange: #FF6B33;
  --glow-soft: #C8C8E6;
}
[data-theme="night"] {
  --bg: #0B0C12;
  --surface: #15171E;
  --surface-2: #1C1F28;
  --well: #1C1F28;
  --ink: #F3F3F0;
  --muted: #A4A7B0;
  --muted-on-bg: #C9CBD3;
  --line: #FFFFFF12;
  --field-line: #6B7080;
  --brand: #FF6B33;
  --on-brand: #14161B;
  --brand-text: #FF6B33;
  --link: #9AA6FF;
  --link-hover: #C2C9FF;
  --error: #FF8A7A;
  --card: #15171E;
  --card-ink: #F3F3F0;
  --card-muted: #A4A7B0;
  --card-number: #FF6B33;
  --card-accent: #9AA6FF;
  --card-line: #FFFFFF12;
  --card-outline: #6B7080;
  --pattern-key: #15171E;
  --pattern-glyph: #2C3038;
  --pattern-key-brand: #F04E14;
  --pattern-glyph-brand: #D9430F;
  --glow-indigo: #4B5BFF;
  --glow-indigo-deep: #2D3BC7;
  --glow-orange: #FF6B33;
  --glow-soft: #C8C8E6;
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-14: 56px;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 24px;
  --radius-3xl: 28px;
  --radius-pill: 999px;
  --touch: 44px;
  --button-h: 46px;
  --field-h: 52px;
  --search-h: 54px;
  --icon-well: 46px;
  --key-min-h: 150px;
  --container: 1120px;
  --font-display: "Alexandria", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

/* «بالضبط» — component styles. Every value is a token from tokens.css; classes start with bd-. */
.bd-root { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.8; }
.bd-btn { height: var(--button-h); box-sizing: border-box; padding: 0 20px; border: 0; border-radius: var(--radius-md); background: var(--brand); color: var(--on-brand); font: 600 16px/1.2 var(--font-body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); text-decoration: none; }
.bd-btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--field-line); font-weight: 600; }
.bd-btn--on-card { background: transparent; color: var(--card-ink); border: 1px solid var(--card-outline); font-weight: 600; }
.bd-btn[disabled] { opacity: .45; cursor: not-allowed; }
.bd-icon-btn { width: var(--touch); height: var(--touch); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bd-chip { height: var(--touch); box-sizing: border-box; padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; }
.bd-field { display: flex; flex-direction: column; gap: var(--space-1); }
.bd-field label { font-size: 13px; line-height: 1.55; color: var(--muted-on-bg); }
.bd-field input { height: var(--field-h); box-sizing: border-box; width: 100%; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 600 20px/1.2 var(--font-display); text-align: center; }
.bd-field--error input { border: 2px solid var(--error); }
.bd-error { font-size: 14px; line-height: 1.6; color: var(--error); }
.bd-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: var(--radius-lg); background: var(--surface-2); }
.bd-seg button { height: var(--touch); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: 600 16px/1.2 var(--font-body); cursor: pointer; }
.bd-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.bd-search { position: relative; }
.bd-search input { width: 100%; height: var(--search-h); box-sizing: border-box; padding: 0 48px 0 16px; border: 1px solid var(--field-line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); font: 400 16px/1.2 var(--font-body); }
.bd-search input::placeholder { color: var(--muted); opacity: 1; }
.bd-search svg { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--muted); }
.bd-card { border-radius: var(--radius-2xl); background: var(--card); color: var(--card-ink); padding: var(--space-5) 22px; display: flex; flex-direction: column; gap: 10px; }
.bd-card__head { display: flex; align-items: center; justify-content: space-between; }
.bd-card__label { font-size: 14px; color: var(--card-muted); }
.bd-card__main { display: flex; align-items: baseline; gap: 10px; }
.bd-card__num { font: 800 68px/1.05 var(--font-display); color: var(--card-number); }
.bd-card__num[data-len="m"] { font-size: 54px; } .bd-card__num[data-len="l"] { font-size: 42px; } .bd-card__num[data-len="xl"] { font-size: 34px; }
.bd-card__main { flex-wrap: wrap; min-width: 0; } .bd-card__num { overflow-wrap: anywhere; min-width: 0; }
.bd-card__unit { font: 600 24px/1.3 var(--font-display); }
.bd-card__detail { font: 600 20px/1.4 var(--font-display); }
.bd-card__rule { height: 1px; background: var(--card-line); }
.bd-card__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: 15px; }
.bd-card__row > :first-child { color: var(--card-muted); }
.bd-card__row > :last-child { font-weight: 600; }
.bd-card__accent { color: var(--card-accent); }
.bd-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: var(--space-1); }
.bd-card .bd-btn:not(.bd-btn--on-card) { background: var(--card-number); }
.bd-key { min-height: var(--key-min-h); box-sizing: border-box; padding: var(--space-4); border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.bd-key__well { width: var(--icon-well); height: var(--icon-well); border-radius: var(--radius-md); background: var(--well); display: flex; align-items: center; justify-content: center; }
.bd-key__name { font: 600 17px/1.4 var(--font-display); }
.bd-key__desc { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.bd-key--featured { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.bd-key--featured .bd-key__well { background: rgba(20, 22, 27, .14); }
.bd-key--featured .bd-key__desc { color: var(--on-brand); }
.bd-next { height: 48px; box-sizing: border-box; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; text-decoration: none; display: flex; align-items: center; justify-content: space-between; }
.bd-lockup { display: inline-flex; align-items: center; gap: 10px; }
.bd-lockup__word { font: 800 22px/1.2 var(--font-display); color: var(--ink); }
[data-theme="night"] .bd-card { border: 1px solid var(--card-line); background: linear-gradient(170deg, rgba(255,255,255,.03), rgba(255,255,255,0) 55%), var(--card); }
[data-theme="night"] .bd-key:not(.bd-key--featured), [data-theme="night"] .bd-next, [data-theme="night"] .bd-icon-btn, [data-theme="night"] .bd-chip { background: linear-gradient(170deg, rgba(255,255,255,.03), rgba(255,255,255,0) 55%), var(--surface); }
.bd-btn:focus-visible, .bd-icon-btn:focus-visible, .bd-chip:focus-visible, .bd-key:focus-visible, .bd-next:focus-visible, .bd-seg button:focus-visible, .bd-field input:focus-visible, .bd-search input:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* الخلفية الليلية بالحبيبات: الطبقات داخل .bd-night__bg، والمحتوى فوقها. */
.bd-night { position: relative; overflow: hidden; isolation: isolate; background: #0B0C12; color: #F3F3F0; }
.bd-night__bg { position: absolute; z-index: -1; top: -10%; left: -10%; width: 120%; height: 120%; animation: bd-light-drift 40s ease-in-out infinite alternate; will-change: transform; }
.bd-night__bg > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.bd-night__grain { mix-blend-mode: soft-light; }
@keyframes bd-light-drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-3%,2%,0) scale(1.06) rotate(2deg); } 100% { transform: translate3d(2%,-2%,0) scale(1.02) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .bd-night__bg { animation: none; } }

/* «بالضبط» — تخطيط الصفحات. الأصناف تبدأ بـ st- وتقرأ من المتغيرات. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.8; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
[hidden] { display: none !important; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-skip { position: absolute; top: -60px; inset-inline-start: 8px; z-index: 10; padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--bg); text-decoration: none; }
.st-skip:focus { top: 8px; color: var(--bg); }

.st-wrap { max-width: var(--container); margin: 0 auto; padding: 16px var(--space-5) 28px; display: flex; flex-direction: column; gap: var(--space-6); }
.st-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.st-header nav { display: flex; align-items: center; gap: var(--space-2); }
.st-navlink { height: var(--touch); padding: 0 10px; display: inline-flex; align-items: center; color: var(--ink); font-size: 16px; text-decoration: none; }
.bd-lockup { text-decoration: none; }
/* مبدّل المظهر: فاتح / داكن. الافتراضي يتبع الجهاز بلا زر ظاهر. */
.st-theme { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.st-theme button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.st-theme button:hover { color: var(--ink); }
.st-theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.st-theme button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
[data-theme="night"] .st-theme { background: linear-gradient(170deg, rgba(255,255,255,.03), rgba(255,255,255,0) 55%), var(--surface); }
@media (max-width: 380px) { .st-navlink { display: none; } }

.st-hero { display: grid; gap: var(--space-6); }
.st-hero__text { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.st-h1 { margin: 0; font: 800 46px/1.22 var(--font-display); }
.st-h1 span { color: var(--brand); }
.st-lead { margin: 0; max-width: 460px; font-size: 16px; line-height: 1.8; color: var(--muted-on-bg); }
.st-title { margin: 0; font: 800 30px/1.3 var(--font-display); }
.st-sub { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted-on-bg); }
.st-answer { margin: 6px 0 0; font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--ink); }
.st-h2 { margin: 0; font: 800 22px/1.4 var(--font-display); }
.st-section { display: flex; flex-direction: column; gap: var(--space-3); }
.st-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.st-soon { align-self: flex-start; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: 13px; line-height: 1.55; }
.bd-key--soon { cursor: default; }
.bd-key--soon .bd-key__name { color: var(--muted); }
.st-key-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }

.st-tool { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.st-tool__head { display: flex; flex-direction: column; gap: 2px; }
.st-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-empty { margin: 0; font-size: 15px; color: var(--card-muted); }
.bd-card__num { font-variant-numeric: tabular-nums; }
.st-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* أول خانة نصها طويل (مثل الرتبة في سلم الرواتب): تأخذ سطرًا كاملًا، والباقيتان تحتها. عمود الأداة 560 بكسل على كل الشاشات. */
.st-fields--lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-fields--lead > :first-child { grid-column: 1 / -1; }
.bd-card__num--word { font-size: 52px; line-height: 1.3; }
.st-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-on-bg); }
.st-crumb a { min-height: var(--touch); display: inline-flex; align-items: center; color: var(--muted-on-bg); }
.st-copybox { padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.st-copybox p { margin: 0; font-size: 14px; line-height: 1.6; }
.st-copybox textarea { width: 100%; resize: none; border: 1px solid var(--field-line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); padding: 8px 10px; font: 400 15px/1.7 var(--font-body); }
.st-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.st-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.st-table th, .st-table td { padding: 10px 12px; text-align: start; white-space: nowrap; border-bottom: 1px solid var(--line); }
.st-table thead th { font-size: 13px; font-weight: 600; color: var(--muted); }
.st-table tbody th { font-weight: 600; }
.st-table tbody tr:last-child > * { border-bottom: 0; }
.st-table td:first-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.st-table .st-now > * { background: var(--surface-2); }
.st-table .st-now th::after { content: ' ‹ الحالي'; font-size: 12px; font-weight: 600; color: var(--brand-text); }
@media (max-width: 480px) { .st-table--tight { font-size: 14px; } .st-table--tight th, .st-table--tight td { padding: 10px 8px; } .st-table--tight .st-now th::after { content: none; } }
.st-prose h2 { margin-top: var(--space-2); }
.st-prose ul { margin: 0; padding-inline-start: 20px; line-height: 1.9; }
.st-promise { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-promise li { padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; }
.st-fact { position: relative; padding: 14px 16px; padding-inline-end: 52px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.st-fact__label { font-size: 13px; font-weight: 600; color: var(--brand-text); }
.st-fact__text { margin: 0; line-height: 1.85; }
.st-fact__more { min-height: var(--touch); padding: 0; border: 0; background: transparent; color: var(--link); font: 600 14px/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.st-fact__close { position: absolute; top: 4px; inset-inline-end: 4px; width: var(--touch); height: var(--touch); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.st-fact__more:focus-visible, .st-fact__close:focus-visible, .st-cal__day:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-cal__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.st-cal__title { text-align: center; font: 800 22px/1.4 var(--font-display); }
.st-cal__span { font: 400 14px/1.5 var(--font-body); color: var(--muted-on-bg); }
.st-flip svg { transform: scaleX(-1); }
.bd-icon-btn:disabled { opacity: .35; cursor: default; }
.st-cal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: 0 -4px; width: calc(100% + 8px); }
.st-cal th { padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--muted-on-bg); }
.st-cal td { padding: 0; }
.st-cal__day { width: 100%; min-height: 54px; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-variant-numeric: tabular-nums; }
.st-cal__n { font: 600 18px/1.25 var(--font-display); }
.st-cal__alt { font-size: 12px; line-height: 1.3; color: var(--muted); }
.st-cal__alt--first { font-weight: 700; color: var(--brand-text); }
.st-cal__day.is-friday { background: var(--surface-2); }
.st-cal__day.is-today { background: var(--brand); border-color: var(--brand); color: #14161B; }
.st-cal__day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.st-cal__day.is-today .st-cal__alt, .st-cal__day[aria-pressed="true"] .st-cal__alt { color: inherit; }
.st-cal__day.is-today[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--brand); }
.st-cal__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted-on-bg); }
.st-cal__views { display: flex; gap: 6px; }
.st-cal__views .bd-chip, .st-cal__foot > .bd-chip { cursor: pointer; font-family: var(--font-body); }
.st-cal__views .bd-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.st-cal-list th, .st-cal-list td { text-align: center; padding: 0 8px; height: 46px; }
.st-cal-list td { font-variant-numeric: tabular-nums; }
.st-cal-list td:first-child { color: inherit; }
.st-cal-list tbody tr { cursor: pointer; }
.st-cal-list tbody th button { width: 100%; height: 46px; border: 0; background: transparent; color: inherit; font: 600 15px/1.2 var(--font-body); cursor: pointer; }
.st-cal-list tbody th button:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
/* الجمعة: نص بلون الهوية وخط أثقل وشريط جانبي، ليظهر من أول نظرة. */
.st-cal-list .is-friday > * { color: var(--brand-text); font-weight: 700; }
.st-cal-list .is-friday > th { box-shadow: inset -4px 0 0 var(--brand); }
.st-cal-list .is-today > * { background: var(--brand); color: #14161B; }
.st-cal-list .is-selected > * { background: var(--ink); color: var(--bg); }
/* اليوم الحالي يبقى برتقاليًا حتى وهو محدد، ليُرى من أول نظرة. */
.st-cal-list .is-today.is-selected > * { background: var(--brand); color: #14161B; font-weight: 700; }
.st-cal__tools { display: flex; justify-content: flex-end; }
.st-cal__copy { gap: 6px; cursor: pointer; font-family: var(--font-body); height: 40px; padding: 0 14px; font-size: 14px; }
.st-soonrow { cursor: default; color: var(--muted-on-bg); }
.st-tool__cols, .st-tool__main, .st-tool__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-quiz { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.st-quiz__bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.st-quiz__bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.st-quiz__count, .st-quiz__prompt { margin: 0; font-size: 14px; color: var(--muted-on-bg); }
.st-quiz__q { margin: 0; min-height: 72px; font: 600 22px/1.6 var(--font-display); }
.st-quiz__opts { display: grid; gap: 8px; }
.st-quiz__opts button { height: 52px; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--bg); color: var(--ink); font: 600 16px/1.2 var(--font-body); cursor: pointer; }
.st-quiz__opts button:hover { border-color: var(--ink); }
.st-quiz__opts button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-bars { display: flex; flex-direction: column; gap: 10px; }
.st-bar { display: grid; grid-template-columns: 118px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 15px; }
.st-bar__en { display: block; font-size: 12px; line-height: 1.3; color: var(--muted-on-bg); }
.st-bar__track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.st-bar__fill { height: 100%; border-radius: 999px; background: var(--ink); }
.st-bar--top .st-bar__fill { background: var(--brand); }
.st-bar__n { text-align: end; font-variant-numeric: tabular-nums; color: var(--muted-on-bg); }
@media (prefers-reduced-motion: reduce) { .st-quiz__bar span { transition: none; } }
.st-next { display: flex; flex-direction: column; gap: var(--space-2); }
.st-next__title { font-size: 15px; font-weight: 600; }
.st-prose { display: flex; flex-direction: column; gap: var(--space-2); }
.st-prose p { margin: 0; line-height: 1.9; }
.st-faq details { border-top: 1px solid var(--line); }
.st-faq details:last-child { border-bottom: 1px solid var(--line); }
.st-faq summary { min-height: 52px; padding: 10px 0; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.st-faq p { margin: 0 0 14px; color: var(--muted-on-bg); line-height: 1.9; }

.st-resume { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 6px; }
.st-resume__label { font-size: 13.5px; color: var(--muted); }
.st-resume__text { font: 600 18px/1.6 var(--font-display); }
.st-resume__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.st-resume__note { font-size: 13px; color: var(--muted); }
.st-resume__link { height: var(--touch); display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
[data-theme="night"] .st-resume { background: linear-gradient(170deg, rgba(255,255,255,.03), rgba(255,255,255,0) 55%), var(--surface); }

.st-method { display: flex; flex-direction: column; gap: 14px; }
.st-method__row { display: flex; align-items: center; gap: 14px; }
.st-method__icon { flex: none; width: var(--icon-well); height: var(--icon-well); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; }
.st-method__title { font-size: 16px; font-weight: 600; line-height: 1.5; }
.st-method__desc { font-size: 14.5px; line-height: 1.6; color: var(--muted-on-bg); }

.st-band { height: 150px; border-radius: var(--radius-2xl); overflow: hidden; background: var(--brand) url('/keys-brand.svg') center / 456px 456px; display: flex; align-items: center; justify-content: center; }
.st-band__pill { padding: 10px 20px; border-radius: var(--radius-pill); background: #14161B; color: #F3F3F0; font: 800 22px/1.5 var(--font-display); }
.st-footer { padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-2); }
.st-footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.st-footer a:not(.bd-lockup) { height: var(--touch); display: inline-flex; align-items: center; color: var(--ink); font-size: 15px; text-decoration: none; }

/* الخلفية الليلية: طبقة ثابتة خلف المحتوى، لا تظهر في الفاتح. */
.st-bg { display: none; }
[data-theme="night"] .st-bg { display: block; position: fixed; z-index: -1; top: -10%; left: -10%; width: 120%; height: 120%; pointer-events: none; animation: bd-light-drift 40s ease-in-out infinite alternate; will-change: transform; }
.st-bg > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.st-bg__light { background:
  radial-gradient(40vmax 32vmax at 86% 9%, rgba(75, 91, 255, .5), rgba(75, 91, 255, 0) 70%),
  radial-gradient(37vmax 28vmax at 8% 84%, rgba(255, 107, 51, .3), rgba(255, 107, 51, 0) 70%),
  radial-gradient(28vmax 21vmax at 34% 44%, rgba(200, 200, 230, .07), rgba(200, 200, 230, 0) 72%),
  radial-gradient(33vmax 26vmax at 90% 92%, rgba(45, 59, 199, .3), rgba(45, 59, 199, 0) 72%),
  #0B0C12; /* أساس معتم داخل الطبقة حتى يعمل خلط soft-light للحبيبات */ }
.st-bg__grain { mix-blend-mode: soft-light; }
@media (prefers-reduced-motion: reduce) { [data-theme="night"] .st-bg { animation: none; } }

@media (min-width: 760px) {
  .st-wrap { padding: 22px var(--space-8) 40px; gap: var(--space-14); }
  .st-hero { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
  .st-h1 { font-size: 84px; line-height: 1.18; }
  .st-lead { font-size: 19px; }
  .st-h2 { font-size: 32px; }
  .st-section { gap: var(--space-5); }
  .st-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
  .st-band { height: 210px; border-radius: var(--radius-3xl); }
  .st-band__pill { padding: 14px 30px; font-size: 34px; }
  .st-footer { flex-direction: row; align-items: center; justify-content: space-between; }
  .st-title { font-size: 40px; }
}
@media (max-width: 759px) { .st-two { display: contents; } }
/* الشاشات العريضة: صفحات الأدوات على عمودين، الأداة في عمود والشرح في عمود. */
@media (min-width: 980px) {
  .st-tool { max-width: 720px; }
  .st-tool--wide { max-width: 1060px; }
  .st-tool--wide .st-tool__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .st-tool__main, .st-tool__side { gap: var(--space-4); }
}

/* ——— لوحة المشاركة، خطوات الحساب، سطر الثقة ——— */
.st-share { display: flex; flex-wrap: wrap; gap: 8px; }
.st-share .bd-chip { height: 40px; padding: 0 14px; font: 600 14px/1.2 var(--font-body); cursor: pointer; }
.st-share .bd-chip:disabled { opacity: .5; }
.bd-card__how { border-top: 1px solid var(--card-line); padding-top: 4px; }
.bd-card__how summary { min-height: var(--touch); display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--card-accent); }
.bd-card__how summary:focus-visible { outline: 3px solid var(--card-accent); outline-offset: 2px; border-radius: 6px; }
.bd-card__how ol { margin: 0 0 6px; padding-inline-start: 22px; font-size: 15px; line-height: 1.9; color: var(--card-ink); }
.bd-card__how li::marker { color: var(--card-number); font-weight: 600; }
.bd-card__trust { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--card-muted); }
.st-hint { margin: -6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted-on-bg); }
.st-reviewed { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.8; color: var(--muted-on-bg); }
.st-navlink--wide { display: none; }
@media (min-width: 600px) { .st-navlink--wide { display: inline-flex; } }

/* ——— أقسام الأدوات في الرئيسية ——— */
.st-cat { display: flex; flex-direction: column; gap: var(--space-3); }
.st-cat__name { margin: 0; font: 600 17px/1.5 var(--font-display); color: var(--muted-on-bg); }
.st-cat__name a { color: inherit; text-decoration: none; } .st-cat__name a:hover { text-decoration: underline; }
.st-cats { display: flex; flex-direction: column; gap: var(--space-6); }
.bd-key { min-height: 132px; }

/* ——— حقول عامة: نص، قائمة، منطقة نص ——— */
.st-input, .st-select, .st-textarea { width: 100%; min-height: var(--field-h); padding: 0 14px; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 400 16px/1.4 var(--font-body); }
.st-textarea { padding: 12px 14px; resize: vertical; min-height: 96px; }
.st-input--num { font: 600 20px/1.2 var(--font-display); text-align: center; direction: ltr; }
.st-input:focus-visible, .st-select:focus-visible, .st-textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 13px; line-height: 1.55; color: var(--muted-on-bg); }
.st-group { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.st-group__title { font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-group .bd-field input, .st-group .st-input, .st-group .st-select { background: var(--bg); }
.st-linkbtn { min-height: var(--touch); padding: 0; border: 0; background: transparent; color: var(--link); font: 600 14px/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.st-linkbtn:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-size: 15px; cursor: pointer; }
.st-check input { width: 22px; height: 22px; accent-color: var(--brand); }
/* السطر الشارح تحت اسم الصف في الجدول يبقى بخط عادي. */
.st-table th .st-sub { font-weight: 400; }
/* مجموعة اختيارات (مثل الوالدين والأجداد في حاسبة المواريث): عمودان، وثلاثة على الشاشة الأعرض. */
.st-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (min-width: 560px) { .st-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chips .bd-chip { height: 40px; padding: 0 14px; font: 600 14px/1.2 var(--font-body); cursor: pointer; }
.st-chips .bd-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.st-notice { padding: 12px 14px; border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); border-radius: var(--radius-md); background: var(--surface); font-size: 14.5px; line-height: 1.8; }
.st-notice p { margin: 0; }

/* ——— تفاصيل أكثر تحت الناتج ——— */
.st-more { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.st-more > summary { min-height: 52px; padding: 0 16px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.st-more > summary:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: var(--radius-lg); }
.st-more__body { padding: 4px 16px 16px; display: grid; gap: 12px; }
.st-more__body .st-hint { margin: 0; }
.st-more .st-table { border-top: 1px solid var(--line); }
.st-more .st-table { table-layout: fixed; }
.st-more .st-table td { white-space: normal; overflow-wrap: anywhere; }
.st-more .st-table td:first-child { width: 38%; color: var(--muted); }
.st-more .st-table td:last-child { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }

/* ——— القوائم: تواريخي، المناسبات، السنوات ——— */
.st-items { display: flex; flex-direction: column; gap: 10px; }
.st-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; color: var(--ink); text-decoration: none; }
a.st-item:hover { border-color: var(--ink); color: var(--ink); }
.st-item__name { font: 600 17px/1.5 var(--font-display); }
.st-item__sub { font-size: 14px; line-height: 1.6; color: var(--muted-on-bg); grid-column: 1; }
.st-item__count { grid-row: 1 / span 2; grid-column: 2; text-align: end; font: 800 22px/1.3 var(--font-display); color: var(--brand-text); font-variant-numeric: tabular-nums; }
.st-item__count small { display: block; font: 400 12.5px/1.4 var(--font-body); color: var(--muted-on-bg); }
.st-item__actions { grid-column: 1 / -1; display: flex; gap: 14px; }
.st-item.is-past .st-item__count { color: var(--muted-on-bg); }
.st-grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .st-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-mcard { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
a.st-mcard:hover { border-color: var(--ink); color: var(--ink); }
.st-mcard__n { font-size: 12.5px; color: var(--muted-on-bg); }
.st-mcard__name { font: 600 17px/1.5 var(--font-display); }
.st-mcard__sub { font-size: 13px; line-height: 1.6; color: var(--muted-on-bg); }
.st-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-pager a { min-height: var(--touch); display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; text-decoration: none; }
.st-pager a:hover { color: var(--link); }
.st-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.st-toolbar .bd-chip { height: 40px; padding: 0 14px; gap: 6px; font: 600 14px/1.2 var(--font-body); cursor: pointer; }
.st-table .is-friday > * { color: var(--brand-text); font-weight: 700; }
.st-table .is-friday > th { box-shadow: inset -4px 0 0 var(--brand); }
.st-table .is-today > * { background: var(--brand); color: #14161B; }
.st-table--center th, .st-table--center td { text-align: center; }
.st-table--center td:first-child { color: inherit; }
.st-table--wrap td, .st-table--wrap th { white-space: normal; }
/* أول عمود ثابت والجدول العريض يتمرر داخل إطاره (الجولة 17): يبقى اسم الشهر أو الليلة ظاهرًا على الجوال. */
.st-table--sticky tr > :first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.st-table--sticky .st-now > :first-child { background: var(--surface-2); }
/* صف «اليوم» في جدول ثابت العمود الأول: الخلية الأولى تأخذ لون الصف نفسه، وإلا بقي نصها الداكن على خلفية داكنة (الجولة 29). */
.st-table--sticky .is-today > :first-child { background: var(--brand); color: #14161B; }
[dir="rtl"] .st-table--sticky tr > :first-child { box-shadow: inset 1px 0 0 var(--line); }
.st-ok { color: #0B7A3B; font-weight: 700; }
[data-theme="night"] .st-ok { color: #5BD68C; }
.st-bad { color: var(--error); font-weight: 700; }
.st-stat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-stat > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.st-stat b { display: block; font: 800 26px/1.3 var(--font-display); font-variant-numeric: tabular-nums; }
.st-stat span { font-size: 13.5px; color: var(--muted-on-bg); }
.st-code { direction: ltr; text-align: left; font: 400 13px/1.7 ui-monospace, Consolas, monospace; }
.st-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.st-rows { display: flex; flex-direction: column; gap: 8px; }
.st-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; align-items: end; }
.st-row .bd-field input { font-size: 17px; height: 46px; }
.st-row__del { width: 40px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 20px; cursor: pointer; }
.st-row__del:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* ——— الطباعة: ورقة نظيفة بالأبيض والأسود، بلا أزرار ولا تنقل ——— */
@media print {
  :root, [data-theme="night"], [data-theme="light"] { --bg: #fff; --surface: #fff; --surface-2: #eee; --ink: #000; --muted: #333; --muted-on-bg: #333; --line: #999; --brand-text: #000; --card: #fff; --card-ink: #000; --card-muted: #333; --card-number: #000; --card-accent: #000; --card-line: #999; --link: #000; }
  .st-sitenote, .st-bg, .st-skip, .st-header nav, .st-footer nav, .st-crumb, .bd-seg, .bd-card__actions, .st-share, .st-copybox, .st-fact, .st-next, .st-faq, .st-cal__nav button, .st-cal__tools, .st-cal__foot, .st-toolbar, .st-pager, .st-hint, .st-chips, .st-more > summary, .st-fields, .st-group, .st-band, .st-print-hide, .st-reviewed a, noscript { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .st-wrap { padding: 0; gap: 12px; max-width: none; }
  .st-tool, .st-tool--wide { max-width: none; }
  .st-tool--wide .st-tool__cols { display: block; }
  .bd-card { border: 1px solid #000; background: #fff !important; }
  .st-table .is-friday > th { box-shadow: none; }
  .st-table .is-today > *, .st-cal-list .is-today > *, .st-cal-list .is-selected > * { background: #fff; color: #000; }
  .st-table th, .st-table td, .st-cal-list th, .st-cal-list td { padding: 3px 8px; height: auto; }
  .st-tablewrap { overflow: visible; border-color: #000; }
  .st-prose, .st-section { break-inside: avoid; }
  .st-footer { border-top: 1px solid #000; }
  a { text-decoration: none; color: #000; }
}

/* جدول مواقيت الشهر: سبعة أعمدة تتسع لشاشة الجوال بلا تمرير أفقي. */
.st-tablewrap:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-table--times td { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .st-table--times { font-size: 12.5px; } .st-table--times th, .st-table--times td { padding: 8px 3px; } .st-table--times tbody th { font-weight: 600; white-space: normal; } }

/* الجداول الطويلة: أعمدة ثانوية تختفي على الجوال وتعود في الطباعة */
.st-only-narrow { display: none; }
@media (max-width: 480px) {
  .st-table .is-wide { display: none; }
  .st-only-narrow { display: block; }
}
@media print { .st-table .is-wide { display: table-cell !important; } .st-only-narrow { display: none !important; } }

/* صيغ التاريخ الجاهزة للنسخ */
.st-formats { margin-block: 16px; }
.st-formats .st-h3 { font-size: 1rem; margin: 0 0 8px; }
.st-formats__list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.st-formats__list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 14px; }
.st-formats__list li + li { border-top: 1px solid var(--line); }
.st-formats__list li > span { color: var(--muted-on-bg); font-size: 14px; }
.st-formats__list bdi { font-variant-numeric: tabular-nums; font-weight: 600; }

/* سؤال «هل أفادتك هذه الأداة؟» */
.st-helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: 15px; }
.st-helpful__btns { display: inline-flex; gap: 8px; }
.st-helpful [hidden] { display: none; }
.st-fieldtools { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
@media print { .st-fieldtools { display: none !important; } }

/* شريط التنبيه الذي يكتبه صاحب الموقع من اللوحة: عائم أسفل الشاشة حتى لا يزحزح المحتوى. */
.st-sitenote { position: fixed; z-index: 30; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); margin-inline: auto; max-width: 640px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 12px 14px; padding-inline-end: 6px; border-radius: var(--radius-lg); background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); box-shadow: 0 10px 30px rgba(10, 11, 16, .22); }
.st-sitenote p { margin: 0; flex: 1; font-size: 15px; line-height: 1.7; }
.st-sitenote a { color: var(--card-accent); font-weight: 600; }
.st-sitenote--alert { border-color: var(--card-number); box-shadow: 0 10px 30px rgba(10, 11, 16, .22), inset -4px 0 0 var(--card-number); }
.st-sitenote__close { flex: none; width: var(--touch); height: var(--touch); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--card-muted); font-size: 24px; line-height: 1; cursor: pointer; }
.st-sitenote__close:hover { color: var(--card-ink); }
.st-sitenote__close:focus-visible, .st-sitenote a:focus-visible { outline: 3px solid var(--card-accent); outline-offset: 2px; }
body.has-notice { padding-bottom: 96px; }
.st-cms h3 { font-size: 18px; margin: 18px 0 6px; }
.st-cms ul, .st-cms ol { padding-inline-start: 22px; }

/* لوحة الإدارة */
.own-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.own-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.own-tabs .bd-chip { height: 40px; padding: 0 14px; font: 600 14px/1.2 var(--font-body); cursor: pointer; }
.own-tabs .bd-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.own-tabs__n:not(:empty) { margin-inline-start: 6px; min-width: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--brand); color: var(--on-brand); font-size: 12px; line-height: 20px; text-align: center; }
.own-panel { display: flex; flex-direction: column; gap: 14px; }
.own-h3 { margin: 10px 0 0; font-size: 17px; }
.own-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.own-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.own-stat__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.own-stat__value { font: 800 30px/1.2 var(--font-display, var(--font-body)); color: var(--ink); font-variant-numeric: tabular-nums; }
.own-stat__note { font-size: 13px; color: var(--muted); }
.own-chart { position: relative; padding: 14px 16px 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.own-chart__max { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.own-chart__plot { position: relative; height: 160px; display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line); }
.own-chart__col { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-end; cursor: pointer; border-radius: 4px 4px 0 0; }
.own-chart__col:hover, .own-chart__col:focus-visible { background: var(--well); }
.own-chart__col:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.own-chart__bar { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.own-chart__col.is-today .own-chart__bar { background: var(--brand-text); }
.own-chart__tip { position: absolute; top: 4px; transform: translateX(-50%); padding: 6px 10px; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); box-shadow: 0 4px 14px rgba(10, 11, 16, .18); font-size: 13px; white-space: nowrap; pointer-events: none; direction: rtl; z-index: 2; }
.own-chart__axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.own-more > summary { cursor: pointer; color: var(--link); font-size: 15px; min-height: var(--touch); display: flex; align-items: center; }
.own-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.own-link { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.own-link:hover { border-color: var(--ink); }
.own-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.own-link__name { font-weight: 600; }
.own-link__note { font-size: 13px; color: var(--muted); }
.own-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.own-check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); font-size: 15px; cursor: pointer; }
.own-check input { width: 20px; height: 20px; accent-color: var(--brand); }
.own-textarea { min-height: 0; padding: 12px 14px; line-height: 1.7; resize: vertical; }
textarea.own-textarea[rows="12"] { min-height: 260px; }
.own-preview { border: 1px dashed var(--field-line); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.own-preview__label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.own-notice-sample { position: static; max-width: none; box-shadow: none; }
.own-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.own-actions .st-linkbtn { display: inline-flex; align-items: center; }
#own-data:not([hidden]) { display: flex; flex-direction: column; gap: 22px; }
.own-preview .st-hint { margin: 0; }
.own-notice-sample .st-sitenote__close { display: inline-flex; align-items: center; justify-content: center; }
.own-in .own-msg { position: fixed; z-index: 40; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); margin-inline: auto; max-width: 560px; box-sizing: border-box; box-shadow: 0 10px 30px rgba(10, 11, 16, .22); cursor: pointer; }
.own-in .own-ok { background: var(--ink); color: var(--bg); }
.own-in .bd-error.own-msg { background: var(--surface); padding: 12px 14px; border: 1px solid var(--error); border-radius: var(--radius-md); }
.own-danger { color: var(--error); }
.own-slug { font-size: 13px; color: var(--muted); direction: ltr; text-align: end; }
.own-help { margin: 0; padding-inline-start: 20px; font-size: 14px; line-height: 1.9; }
.own-help code { direction: ltr; unicode-bidi: isolate; padding: 1px 6px; border-radius: 6px; background: var(--well); }
.own-ok { margin: 0; padding: 10px 14px; border-radius: var(--radius-md); background: var(--well); color: var(--ink); font-size: 15px; }
.own-h4 { margin: 6px 0 0; font-size: 15.5px; }
.own-top td, .own-top th { vertical-align: middle; }
.own-rank { color: var(--muted); width: 36px; }
.own-pagebtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 0; border: 0; background: none; color: var(--link); font: 600 15px/1.5 var(--font-body); text-align: start; cursor: pointer; }
.own-pagebtn:hover .own-pagebtn__title { text-decoration: underline; }
.own-pagebtn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.own-pagebtn .own-slug { font-weight: 400; text-align: start; }
.own-sources { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.own-source { display: grid; grid-template-columns: minmax(110px, 2fr) minmax(60px, 3fr) 96px; align-items: center; gap: 12px; font-size: 14px; }
.own-source__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-source__name[dir="ltr"] { text-align: end; }
.own-source__track { height: 10px; border-radius: 4px; background: var(--well); overflow: hidden; }
.own-source__fill { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.own-source__n { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.own-detail { display: flex; flex-direction: column; gap: 14px; }
.own-detail__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.own-detail__head .own-h4 { font-size: 18px; margin: 0; }
.own-range-custom .bd-btn { min-height: 48px; }
#own-views:not([hidden]) { display: flex; flex-direction: column; gap: 14px; }

/* الطقس: بطاقة على طريقة جوجل */
.wx-page { max-width: 980px; }
.wx-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.wx-pick .st-label { flex: 1 1 220px; }
.wx-pick .bd-btn { flex: 0 0 auto; }
.wx { container-type: inline-size; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 16px; border-radius: var(--radius-xl, 24px); background: var(--card); color: var(--card-ink); border: 1px solid var(--card-line); }
.wx__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; }
.wx__now { display: flex; align-items: center; gap: 14px; }
/* مكان الأيقونة محجوز قبل وصول البيانات: كانت بعرض 0 فيتسع السطر ثم يلتف حين تظهر (إزاحة 0.08، الجولة 30). */
.wx__icon { color: var(--card-number); display: flex; flex: none; width: 64px; height: 64px; align-items: center; justify-content: center; }
.wx__icon .wx-ic--moon, .wx__icon .wx-ic--moon-cloud { color: #8AB4F8; }
.wx__temp { display: flex; align-items: flex-start; font: 800 64px/1 var(--font-display, var(--font-body)); color: var(--card-ink); font-variant-numeric: tabular-nums; }
.wx__deg { font-size: 22px; font-weight: 600; margin-top: 6px; color: var(--card-muted); }
.wx__facts { margin: 0; display: grid; gap: 2px; font-size: 14px; color: var(--card-muted); }
.wx__facts div { display: flex; gap: 6px; }
.wx__facts dt { font-weight: 400; }
.wx__facts dd { margin: 0; color: var(--card-ink); }
.wx__place { text-align: end; }
.wx__place h2 { margin: 0; font-size: 20px; color: var(--card-ink); }
.wx__place p { margin: 2px 0 0; color: var(--card-muted); font-size: 15px; }
.wx__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--card-line); }
.wx__tabs button { padding: 10px 12px; min-height: 44px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--card-muted); font: 600 15px/1.2 var(--font-body); cursor: pointer; }
.wx__tabs button[aria-selected="true"] { color: var(--card-ink); border-bottom-color: var(--card-number); }
.wx__tabs button:focus-visible { outline: 2px solid var(--card-accent); outline-offset: -2px; }
.wx-plot { position: relative; padding-bottom: 26px; }
.wx-plot__stage { position: relative; height: 150px; touch-action: pan-y; cursor: crosshair; }
.wx-plot__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wx-plot__line { fill: none; stroke: var(--card-number); stroke-width: 2; }
.wx-plot__area { fill: var(--card-number); opacity: .18; }
.wx-plot__bars { position: absolute; inset: 0; }
.wx-plot__bar { position: absolute; bottom: 0; width: 2.8%; background: #6BA6FF; border-radius: 4px 4px 0 0; }
.wx-plot__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--card-muted); font-size: 14px; }
.wx-plot__val { position: absolute; transform: translate(-50%, -130%); display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--card-ink); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.wx-plot__time { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 12.5px; color: var(--card-muted); white-space: nowrap; }
.wx-plot__cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--card-muted); pointer-events: none; }
.wx-plot__tip { position: absolute; top: -6px; transform: translateX(-50%); padding: 4px 10px; border-radius: var(--radius-sm); background: var(--card-ink); color: var(--card); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 2; }
.wx-arrow { flex: none; }
.wx__days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 0; border-radius: var(--radius-lg); background: none; color: var(--card-ink); font: 400 14px/1.3 var(--font-body); cursor: pointer; min-width: 0; }
.wx-day[aria-pressed="true"] { background: rgba(255, 255, 255, .08); }
.wx-day:hover { background: rgba(255, 255, 255, .05); }
.wx-day:focus-visible { outline: 2px solid var(--card-accent); outline-offset: 1px; }
.wx-day svg { color: var(--card-number); }
.wx-day .wx-ic--moon, .wx-day .wx-ic--rain, .wx-day .wx-ic--storm { color: #8AB4F8; }
.wx-day__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wx-day__t { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.wx-day__t span { color: var(--card-muted); }
.wx__note { margin: 0; padding-top: 10px; border-top: 1px solid var(--card-line); color: var(--card-muted); font-size: 14.5px; line-height: 1.7; }
/* مساحات محجوزة قبل وصول البيانات (الجولة 20): كانت البطاقة تكبر من 313 إلى 671 بكسل على الجوال فتزيح ما تحتها (CLS).
   الارتفاعات مقيسة بعد التحميل: الرسم 176، والأيام 106، والملخص سطر واحد (سطران على الجوال)، وسطر الحالة، وسطر «جُلبت». */
.wx__chart { min-height: 176px; }
.wx__days { min-height: 106px; }
.wx__note { min-height: calc(10px + 1.7em); }
/* سطر حالة السماء فارغ حتى تصل البيانات: مسافة غير منكسرة تحجز سطرًا كاملًا بارتفاعه الفعلي (كان min-height أقل منه بأربع بكسلات). */
#wx-sky:empty::before { content: '\00a0'; }
.wx-credit { min-height: 1.6em; }
@container (max-width: 620px) {
  .wx { padding: 16px; }
  .wx__temp { font-size: 52px; }
  .wx__days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72px; overflow-x: auto; padding-bottom: 4px; }
  .wx__place { text-align: start; }
  /* الحقائق (المطر والرطوبة والرياح) في سطر كامل تحت الحرارة، وكل واحدة في سطر واحد: كانت «الرياح 48 كم/س شمالية غربية» تلتف
     لسطرين حين تصل البيانات فتنزاح الصفحة (الجولة 30). */
  .wx__now { flex-wrap: wrap; }
  .wx__facts { flex-basis: 100%; min-width: 0; }
  .wx__facts dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .wx__days { min-height: 110px; }
  .wx__note { min-height: calc(10px + 3.4em); }
}
.wx-credit { margin-top: -4px; }
.wx-map { position: relative; height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--well); }
.wx-map iframe { width: 100%; height: 100%; border: 0; display: block; }
/* الإطار يأخذ التركيز حين ينتقل الكيبورد إلى داخل الخريطة، ولا يطابق :focus هناك في Chrome، فالحلقة على الحاوية (is-focused من weather-ui.js، الجولة 29). */
.wx-map iframe:focus-visible, .wx-map.is-focused { outline: 3px solid var(--link); outline-offset: 2px; }
.wx-map__cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; color: var(--muted); background: radial-gradient(circle at 30% 30%, rgba(107, 166, 255, .18), transparent 55%), radial-gradient(circle at 70% 70%, rgba(255, 90, 31, .12), transparent 50%), var(--well); }
.wx-map__cover p { margin: 0; }
.wx-maplinks { margin-top: 10px; }
.wx-extra { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 0 16px; }
.wx-extra + .wx-extra { margin-top: 10px; }
.wx-extra > summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font-weight: 600; font-size: 16px; }
.wx-extra[open] { padding-bottom: 16px; }
.wx-clim { display: flex; flex-direction: column; gap: 10px; }
.wx-past { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.wx-past__head { font-weight: 600; }
.wx-past__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.wx-past__item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.wx-past__k { font-size: 13px; color: var(--muted); }
.wx-past__v { font: 800 19px/1.35 var(--font-display, var(--font-body)); }

/* الصفحات الإنجليزية */
.st-navlink { white-space: nowrap; }
[lang="en"] .bd-card__num--word { font-size: clamp(30px, 7vw, 44px); line-height: 1.15; }
.en-ar a { unicode-bidi: isolate; }

/* شريط الموافقة على أدوات القياس: نفس الشريط العائم، وزرّان بحجم واحد */
.st-consent { flex-wrap: wrap; padding-inline-end: 14px; }
.st-consent p { flex: 1 1 260px; }
.st-consent__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.st-consent__btn { min-width: 104px; }
.st-footbtn { height: var(--touch); display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--ink); font: 400 15px/1.4 var(--font-body); text-decoration: none; cursor: pointer; }
.st-footbtn[hidden] { display: none; }
.own-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.own-fieldset + .own-fieldset { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }

/* لوحة الإدارة: التطبيقات */
.own-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.own-app { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.own-app.is-on { border-color: var(--brand); }
.own-app.is-soon { opacity: .72; }
.own-app__head { display: flex; align-items: center; gap: 10px; }
.own-app__mark { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--well); color: var(--ink); font: 800 14px/1 var(--font-body); direction: ltr; }
.own-app.is-on .own-app__mark { background: var(--brand); color: var(--on-brand); }
.own-app__names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.own-app__name { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.own-app__kind { font-size: 12.5px; color: var(--muted); }
.own-app__state { flex: none; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.own-app__state.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.own-app__about { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.own-app__form { display: flex; flex-direction: column; gap: 10px; }
.own-app__hint { margin: 0; }
.own-app__saved { margin: 0; font-size: 13px; color: var(--ink); }
.own-flag td { background: var(--well); }
.own-raw { max-height: 320px; overflow: auto; padding: 10px; border-radius: var(--radius-sm); background: var(--well); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.own-cl-bar { align-items: flex-end; }

/* ——— منشئ السيرة الذاتية: النموذج بجانب ورقة المعاينة ——— */
.st-tool:has(> .st-cv) { max-width: 1060px; }
.st-cv { display: flex; flex-direction: column; gap: 18px; }
.st-cv__form, .st-cv__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-cv__lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.st-cv__group { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-cv__group > legend { padding: 0 6px; font-weight: 700; }
.st-cv__item { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-cv__item + .st-cv__item { margin-top: 10px; }
.st-cv__item > legend { padding: 0 4px; font-size: 13px; color: var(--muted-on-bg); }
.st-cv__del { align-self: flex-start; }
.st-cv__pair { display: grid; grid-template-columns: 1fr; gap: 10px; }
.st-cv__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-cv__field label { font-size: 13px; color: var(--muted-on-bg); }
.st-cv__field input, .st-cv__field textarea { width: 100%; box-sizing: border-box; min-height: var(--touch); padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius-md); background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); }
.st-cv__field textarea { resize: vertical; }
.st-cv__field input:focus-visible, .st-cv__field textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
.st-cv__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-cv__status { margin: 0; min-height: 1.6em; font-size: 13px; color: var(--muted-on-bg); }
/* الورقة بيضاء دائمًا مثل الملف المحمّل، بخط Arial كما في Word. */
.st-cv__sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px 24px; min-height: 320px; font: 14px/1.55 Arial, "Helvetica Neue", sans-serif; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.st-cv__sheet h2, .st-cv__sheet h3, .st-cv__sheet p, .st-cv__sheet ul { margin: 0; }
.st-cv__name { font-size: 22px; font-weight: 700; }
.st-cv__title { font-size: 15px; }
.st-cv__contact { font-size: 12px; color: #333; margin-bottom: 4px !important; overflow-wrap: anywhere; }
.st-cv__heading { font-size: 14px; font-weight: 700; margin-top: 14px !important; padding-bottom: 2px; border-bottom: 1px solid #111; }
.st-cv__line { margin-top: 4px !important; }
.st-cv__line.is-strong { font-weight: 700; }
.st-cv__sheet ul { padding-inline-start: 18px; }
.st-cv__empty { color: #666; text-align: center; padding-top: 110px; }
@media (min-width: 760px) {
  .st-cv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .st-cv__side { position: sticky; top: 16px; }
  .st-cv__pair { grid-template-columns: 1fr 1fr; }
}
/* «حفظ PDF»: الطباعة تُظهر ورقة السيرة وحدها، بلا شيء من الموقع. */
@media print {
  /* نسخة من الورقة مباشرة تحت body، والباقي display: none: الإخفاء بـvisibility كان يترك مكان الصفحة فتطلع صفحتان فاضيتان. */
  html.cv-print body > :not(.cv-print-root) { display: none !important; }
  html.cv-print .cv-print-root .st-cv__sheet { position: static; border: 0; box-shadow: none; padding: 0; margin: 0; min-height: 0; font-size: 11pt; }
  @page { margin: 16mm; }
}

/* ——— فهرس «مواليد كل سنة» ——— */
.st-born { display: flex; flex-direction: column; gap: 10px; }
.st-born__row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: start; }
.st-born__row > span { font-weight: 700; padding-top: 8px; color: var(--muted-on-bg); }
.st-born__row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.st-born__row .bd-chip { height: 38px; padding: 0 12px; font-variant-numeric: tabular-nums; }
/* جواب صفحة السنة: العمر بخط كبير، ومن وُلد في أي مدة، ثم يوم الميلاد وشهره للعمر بالضبط. */
.st-yearans { margin-top: var(--space-4); }
.st-yearans h2.bd-card__label { margin: 0; font-weight: 400; }
.st-yearans__big { margin: 2px 0 6px; white-space: nowrap; font: 800 40px/1.15 var(--font-display); color: var(--card-number); font-variant-numeric: tabular-nums; }
.st-yearans__line { margin: 0; font: 600 17px/1.6 var(--font-display); color: var(--card-ink); }
.st-yearans__q { margin: 0 0 8px; font: 700 18px/1.4 var(--font-display); }
.st-yearans__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.st-yearans__fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--card-muted); min-width: 0; }
.st-yearans .st-select { background: var(--card); color: var(--card-ink); border-color: var(--card-line); }
.st-yearans .st-select:focus-visible { outline-color: var(--card-number); }
.st-yearans__out { margin: 10px 0 0; min-height: 28px; font: 700 19px/1.5 var(--font-display); }
@media (min-width: 761px) { .st-yearans__big { font-size: 56px; } }
.st-bornans { margin-top: var(--space-4); }
.st-bornans h2.bd-card__label { margin: 0; font-weight: 400; }
.st-bornans__rows { display: flex; flex-direction: column; gap: 14px; }
.st-bornans__row { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.st-bornans__age { font: 800 44px/1.1 var(--font-display); color: var(--card-number); font-variant-numeric: tabular-nums; }
.st-bornans__row + .st-bornans__row .st-bornans__age { font-size: 34px; color: var(--card-ink); }
.st-bornans__who { font: 600 17px/1.5 var(--font-display); color: var(--card-ink); }
.st-bornans__q { margin: 0 0 8px; font: 700 18px/1.4 var(--font-display); }
.st-bornans__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.st-bornans__fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--card-muted); min-width: 0; }
.st-bornans .st-select { background: var(--card); color: var(--card-ink); border-color: var(--card-line); }
.st-bornans .st-select:focus-visible { outline-color: var(--card-number); }
.st-bornans__out { margin-top: 10px; min-height: 28px; }
.st-bornans__out > p { margin: 0; }
.st-bornans__out [data-b="out"] { font: 700 20px/1.5 var(--font-display); }
.st-bornans__more { display: flex; flex-direction: column; gap: 4px; margin-top: 6px !important; font-size: 15px; line-height: 1.6; color: var(--card-muted); }
.st-bornans__more a { color: var(--card-number); font-weight: 600; }
.st-bornans[data-cal="h"] .st-bornans__age { font-size: 36px; } .st-bornans[data-cal="h"] .st-bornans__row + .st-bornans__row .st-bornans__age { font-size: 30px; }
@media (min-width: 761px) { .st-bornans__age, .st-bornans[data-cal="h"] .st-bornans__age { font-size: 56px; } .st-bornans__row + .st-bornans__row .st-bornans__age, .st-bornans[data-cal="h"] .st-bornans__row + .st-bornans__row .st-bornans__age { font-size: 40px; } }

/* ——— مساحة محجوزة لما يرسمه السكربت بعد التحميل، حتى لا تنزاح الصفحة (CLS) ——— */
/* التقويم: جدول الشهر (29 يومًا × 47 بكسل مع الرأس) يُملأ بعد التحميل. قيست 1411 بكسل بكل العروض. */
[data-cal="views"]:has(> [data-view-el="list"]:not([hidden])) { min-height: 1411px; }
/* تحويل التاريخ: البطاقة تمتلئ بتاريخ اليوم فور الفتح، وارتفاعها ممتلئة 407 بكسل بكل العروض. */
#dc-card { min-height: 407px; }

/* ——— تحويل الوحدات: من ⇄ إلى ——— */
.st-units__pick { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.st-units__pick label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-units__pick .bd-icon-btn { font-size: 20px; }
.st-h3 { font-size: 16px; margin: 14px 0 6px; }
/* نص الأذان في شرح المواقيت: سطور مرقمة أكبر قليلًا من نص الشرح. */
.st-adhan { margin: 8px 0 12px; padding-inline-start: 26px; line-height: 2; font-size: 17px; font-weight: 600; color: var(--ink); }
.st-adhan .st-sub { font-weight: 400; }

/* ——— «كم الساعة الآن في…»: الساعة الكبيرة. الارتفاع محجوز في HTML نفسه، فلا تنزاح الصفحة حين تمشي ——— */
.st-wclock { border-radius: var(--radius-2xl); background: var(--card); color: var(--card-ink); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.st-wclock__time { font: 800 54px/1.1 var(--font-display); color: var(--card-number); font-variant-numeric: tabular-nums; min-height: 1.1em; }
.st-wclock__date { font: 600 18px/1.4 var(--font-display); min-height: 1.4em; }
.st-wclock__rows { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--card-line); }
.st-wclock__rows > div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.st-wclock__rows span { color: var(--card-muted); }
.st-wclock__time { white-space: nowrap; }
@media (max-width: 440px) { .st-wclock__time { font-size: 44px; } }
@media (max-width: 360px) { .st-wclock__time { font-size: 38px; } }

/* ——— «أدوات قريبة» تحت كل أداة ——— */
.st-near { display: flex; flex-wrap: wrap; gap: 8px; }
.st-near .bd-chip { height: 40px; }
.st-facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.st-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.st-facts > div:first-child { border-top: 0; }
.st-facts dt { color: var(--muted); font-size: 14px; }
.st-facts dd { margin: 0; font-weight: 600; text-align: end; }
@media (min-width: 760px) { .st-facts { grid-template-columns: 1fr 1fr; } .st-facts > div:nth-child(2) { border-top: 0; } .st-facts > div:nth-child(odd) { border-inline-end: 1px solid var(--line); } }
.st-near__all { font-weight: 700; color: var(--link); }

/* ——— صفحة التطبيق ——— */
.st-table tr.is-best > * { background: color-mix(in srgb, var(--brand) 13%, transparent); }
/* البحث داخل الموقع: مربع في الرأس على الشاشات العريضة، وأيقونة تفتح صفحة البحث على الجوال. */
.st-hsearch { position: relative; flex: 1; max-width: 380px; display: none; }
.st-hsearch__input { width: 100%; height: 42px; padding: 0 16px; border: 1px solid var(--field-line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 400 15px/1 var(--font-body); }
.st-hsearch__input:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.st-hsearch__list { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgb(0 0 0 / 0.14); max-height: 70vh; overflow-y: auto; }
.st-hsearch__list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.st-hsearch__list a:hover, .st-hsearch__list a:focus-visible { background: var(--well); outline: none; }
/* صفحة 404: أقرب الصفحات للرابط الغلط. */
.st-nf { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.st-nf a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.st-nf a:hover, .st-nf a:focus-visible { background: var(--well); }
.st-hsearch__list a:focus-visible { box-shadow: inset 0 0 0 2px var(--link); }
.st-hsearch__kind { flex: none; color: var(--muted); font-size: 13px; }
.st-hsearch__none { padding: 10px 12px; color: var(--muted); }
.st-navsearch { padding: 0 8px; }
@media (min-width: 900px) { .st-hsearch { display: block; } .st-navsearch { display: none; } }
.st-search-page .st-hsearch { display: block; max-width: none; }
.st-search-page .st-hsearch__list { position: static; box-shadow: none; margin-top: 10px; max-height: none; }
@media (max-width: 380px) { .st-navlink.st-navsearch { display: inline-flex; } }
.st-cases li { margin-bottom: 6px; }
