/* الرئيسية v11-final (web/js/modules/home_v2.js) — تصميم المالك: لوحة مشروع داكنة، ترويسة لاصقة، سطح «اليوم» الواحد، بلاطات بحسب الحالة.
 * ألوانها محلية للوحة (لا تلوّن بقية الصفحات). الأرقام لاتينية من الخادم. هدف اللمس 48. لا حركة جديدة تحت تقليل الحركة. */
/* `:is(html, html[data-ui])`: خلفية الجسم في الثيمات (copper…) كانت أقوى فتظهر فاتحة تحت حشوة main فوق الشريط السفلي وعند الإقلاع */
:is(html, html[data-ui]) body[data-page="dashboard"]:has(.home2) { background: var(--c-forest-900); } /* data-page=dashboard احتياطي لصفحات أخرى (الدردشة والمهام): الداكنة للرئيسية الفعلية فقط */body[data-page="dashboard"] .topbar { display: none; }
body[data-page="dashboard"] main { padding: 0 0 calc(var(--bar, 64px) + 28px + env(safe-area-inset-bottom)); max-width: none; }
/* AUD-11 (T-61): المحادثات تُظهر ترويسة القشرة من 768 (كانت بلا عنوان ولا رجوع عند 834)؛ الجوال كما هو */
@media (min-width: 768px) { :is(html, html[data-ui]) body[data-page="dashboard"]:has(.chat-shell) .topbar { display: flex; } }
/* تخطيط متجاوب: الحاوية تتبع المساحة المتاحة بسقف --page-max (الإطار، frame.css). الأقسام عمود واحد بترتيب DOM نفسه في كل العروض
 * (T-60 / DP-5: «اليوم» أولاً ثم «المشروع» ثم «قادم خلال 14 يوماً»، بلا عمودين من 720). */
.dashboard-workspace:has(> .home2) { display: block; max-width: min(100%, var(--page-max, 1120px)); margin-inline: auto; }
/* الشاشة الواسعة (≥900px، عتبة القطيع نفسها): تبقى ترويسة القشرة وتبويباتها (قواعدها المشتركة في herd_v2.css) ويُخفى من صف الرئيسية
 * الحساب والمحادثات والإشعارات لأنها في ترويسة القشرة (كانت تتكرر معها)؛ يبقى البحث وكبسولة الطوارئ. دونها يبقى صف الرئيسية وحده. */
@media (min-width: 900px) {
  .h2-bar .h2-round { display: none; }
}
/* 861–899px: التبويبات ظاهرة وترويسة القشرة مخفية (صف الرئيسية يؤدي دورها)، فتأخذ التبويبات لوحة الرئيسية الداكنة. */
@media (min-width: 861px) and (max-width: 899px) {
  :is(html, html[data-ui]) body[data-page="dashboard"] .tabs { background: var(--c-forest-900); border-bottom: .5px solid var(--c-paper-a60); }
  :is(html, html[data-ui]) body[data-page="dashboard"] .tabs button { background: transparent; color: var(--c-muted); border-color: var(--c-paper-a60); box-shadow: none; }
  :is(html, html[data-ui]) body[data-page="dashboard"] .tabs button:is([aria-selected="true"], [aria-current="page"]) {
    background: linear-gradient(180deg, var(--c-paper), var(--c-sand-hi)); border-color: transparent; color: var(--c-sand-ink); font-weight: 800;
  }
}
/* الشريط اللاصق والسفلي لا يحجبان عنصراً مركَّزاً (WCAG 2.4.11) — والرئيسية معروضة فقط */
html:has(.home2) { scroll-padding-top: 68px; scroll-padding-bottom: 104px; }

.home2 {
  /* ألوان v11-final المحلية (غير موجودة في tokens.css؛ مسجَّلة في التقرير كمقترحة) */
  --h2-font: -apple-system, BlinkMacSystemFont, "SF Arabic", "SF Pro Text", "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;
  position: relative; color: var(--c-paper); background: var(--c-forest-900); font-family: var(--h2-font); min-height: 100vh;
  display: flex; flex-direction: column; padding-bottom: 8px;
}
.home2 > :not(.h2-bg):not(.h2-col) { position: relative; margin-inline: 16px; margin-top: 16px; }
.home2 > .dashboard-ads-container { margin-top: 28px; }
.home2 .h2-i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.home2 .h2-sm { width: 18px; height: 18px; }
.home2 .h2-num { font-variant-numeric: tabular-nums; }
.home2 .h2-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(.home2 button) { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; text-align: start; }
.home2 button:focus-visible, .home2 input:focus-visible { outline: 2px solid var(--c-sand); outline-offset: 2px; border-radius: 12px; }

/* الصورة: تتبع ارتفاع الترويسة (--h2-hh من home_v2.js) وتتلاشى في الخلفية بلا حدود */
.h2-bg { position: absolute; inset: 0 0 auto 0; height: var(--h2-hh, 220px); pointer-events: none;
  background: var(--c-sand-ink) url("/app/img/hero-flock.jpg") 34% 30%/cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, var(--c-forest-900) 0%, var(--c-forest-900) calc(100% - 34px), transparent 100%); mask-image: linear-gradient(180deg, var(--c-forest-900) 0%, var(--c-forest-900) calc(100% - 34px), transparent 100%); }
@media (min-width: 1024px) {
  /* DP-6: داخل الإطار تتلاشى حافتا الصورة الجانبيتان على 72px بدل القطع الحاد (يحل محل القناع الرأسي) */
  .home2 > .h2-bg { -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--c-black) 72px, var(--c-black) calc(100% - 72px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, var(--c-black) 72px, var(--c-black) calc(100% - 72px), transparent 100%); }
}
.h2-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--c-black-a70) 0, var(--c-black-a20) 22%, var(--c-black-a45) 50%, var(--c-black-a70) calc(100% - 34px), var(--c-forest-900) 100%); }
.h2-col { position: relative; padding: 0 16px; }

.h2-glass { -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); background: var(--c-black-a70); border: .5px solid var(--c-paper-a60); }

/* (1) صف التحكم اللاصق */
.h2-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; margin-inline: -16px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px; transition: background-color .2s; }
.h2-bar.glassy { padding-block: calc(9px + env(safe-area-inset-top, 0px)) 4px; background: var(--c-black-a70); box-shadow: 0 .5px 0 var(--c-paper-a60);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.h2-round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.home2 .h2-avatar { font: 700 18px var(--h2-font); color: var(--c-sand-ink); background: linear-gradient(180deg, var(--c-sand-hi), var(--c-sand-2)); border: 0; text-align: center; }
.home2 .h2-avatar:has(.profile-avatar.is-default) { background: transparent; padding: 0; }   /* AUD-9 (T-61) */
.h2-badge { position: absolute; top: -7px; inset-inline-end: -10px; min-width: 22px; height: 20px; border-radius: 10px; padding-inline: 5px; background: var(--danger); color: var(--on-danger);
  font: 700 13px/17px var(--h2-font); unicode-bidi: isolate; direction: ltr; text-align: center; border: 1.5px solid var(--c-forest-900); }
.h2-sp { flex: 1; }
.h2-bar > .h2-edge { margin-inline-start: auto; }   /* HH1: المحادثات والجرس والحساب ثابتة عند الحافة اليسرى في كل الحالات */
.h2-find { position: relative; flex: 1; min-width: 0; height: 48px; border-radius: 24px; display: flex; align-items: center; gap: 6px; padding-inline: 12px; color: var(--c-paper); }
.h2-find .h2-i { width: 20px; height: 20px; }
.h2-search-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--c-paper); font: 400 16px var(--h2-font); outline: 0; }
.h2-search-input::placeholder { color: var(--c-paper-a80); opacity: 1; }
/* حقل البحث بلا صندوق داخلي: قاعدة input/textarea في الثيمات (copper/modern/wasm) كانت أقوى فتظهر خلفية فاتحة وإطاراً داخل الكبسولة الداكنة.
 * الكبسولة .h2-find هي الإطار الوحيد؛ `html[data-ui]` يرفع الأولوية فوق قواعد الثيم ويترك الكلاسيكي (لقطة الأساس المعتمدة) كما هو. */
html[data-ui] .home2 .h2-find .h2-search-input,
html[data-ui] .home2 .h2-find .h2-search-input:focus,
html[data-ui] .home2 .h2-find .h2-search-input:focus-visible {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: 0; margin: 0; padding: 0;
  color: var(--c-paper); -webkit-appearance: none; appearance: none;
}
html[data-ui] .home2 .h2-find:focus-within { border-color: var(--c-sand); box-shadow: 0 0 0 3px var(--c-sand-a12); }
.h2-find:focus-within { border-color: var(--c-sand); }
/* عند التمرير: يتحول البحث إلى أيقونة بهدف 48 (الحقل نفسه شفاف فوقها فيعمل بالنقر والتركيز ويتّسع عند التركيز) */
.h2-bar.glassy .h2-find { flex: none; width: 48px; padding: 0; justify-content: center; }
.h2-bar.glassy .h2-find .h2-search-input { position: absolute; inset: 0; width: 100%; opacity: 0; padding: 0; }
.h2-bar.glassy .h2-find:focus-within { flex: 1; width: auto; padding-inline: 12px; justify-content: flex-start; }
.h2-bar.glassy .h2-find:focus-within .h2-search-input { position: static; opacity: 1; }
.h2-sosmini { display: none; }
.h2-sosmini.on { display: flex; }
.h2-bar:has(.h2-find:focus-within) .h2-sosmini { display: none; }

/* (2) الهوية: التحية فقط (ارتفاع الترويسة يتبع المحتوى) */
.h2-title { padding-top: 6px; }
.home2 .h2-title h1 { margin: 0; font: 700 24px/1.3 var(--h2-font); color: var(--c-white); text-shadow: 0 1px 14px var(--c-black-a70); }

/* (3) صف السياق: الحرارة والموسم والطوارئ في الطرف الآخر؛ قابل للالتفاف */
.h2-ctx { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.h2-chip { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 24px; font: 500 14px var(--h2-font); color: var(--c-paper); }
.h2-chip .h2-i { width: 20px; height: 20px; }
.h2-chip .h2-sun { color: var(--c-amber); }
.h2-heat-txt { flex: 1 1 0; min-width: 0; height: 52px; padding: 0 12px; line-height: 1.25; border-radius: 26px; }
.home2 .season-peek-button { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--c-paper);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); background: var(--c-black-a70); border: .5px solid var(--c-paper-a60); }
.home2 .season-peek-button svg { width: 20px; height: 20px; }
html[data-ui] .home2 .on-photo .season-peek-button { color: var(--c-paper); }   /* copper.css يلوّنه --head فيصير داكناً نهاراً فوق الصورة */

/* الطوارئ: كبسولة بحد أحمر وتعبئة تقدّمية أثناء الضغط؛ الآلية في emergency.js دون تغيير */
.home2 .sos-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-width: 112px; height: 52px; min-height: 52px;
  padding: 0 10px; border-radius: 26px; margin: 0; margin-inline-start: auto; font: 700 15px var(--h2-font); touch-action: none; user-select: none;
  color: var(--c-sos) !important; background: var(--c-black-a45) !important; border: 1.5px solid var(--c-sos) !important; }
.home2 .sos-button .sos-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; position: relative; }
.home2 .sos-button .sos-text { position: relative; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; white-space: nowrap; }
.home2 .sos-button .sos-text small { font: 500 13px/1.15 var(--h2-font); color: var(--c-paper); }
.home2 .sos-button.holding { outline: 0; }
.home2 .sos-button.holding::after { content: ""; position: absolute; inset: 0; background: var(--c-sos-a40); transform-origin: right; animation: h2-hold .9s linear forwards; pointer-events: none; }
@keyframes h2-hold { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.home2 .sos-button.sos-compact { min-width: 96px; height: 48px; min-height: 48px; padding-inline: 14px; margin-inline-start: 0; border-radius: 24px; font-size: 14px; }

.home2 .capacity-slot:empty { display: none; }
.h2-col > .capacity-slot:not(:empty) { margin-top: 12px; }

/* «ابدأ قطيعك»: مضغوطة تحت الهوية بالمحتوى والزر نفسيهما */
.home2 .empty-state.h2-start { margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--c-forest-800); border: 1px dashed var(--c-sand-a45); text-align: start;
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; }
.home2 .empty-state.h2-start .mark { display: none; }
.home2 .empty-state.h2-start h3 { margin: 0; font: 700 18px/1.3 var(--h2-font); color: var(--c-paper); }
.home2 .empty-state.h2-start p { margin: 2px 0 0; max-width: none; font-size: 15px; line-height: 1.4; color: var(--c-paper-a80); grid-column: 1; }
.home2 .empty-state.h2-start button { grid-column: 2; grid-row: 1 / span 2; width: auto; max-width: none; white-space: nowrap; min-height: 48px; padding: 0 14px; border-radius: 24px; border: 0;
  background: linear-gradient(180deg, var(--c-sand), var(--c-sand-2)); color: var(--c-sand-ink); font: 700 15px/1.3 var(--h2-font); box-shadow: none; }
.home2 .empty-state.h2-start button::before { content: "+" / ""; margin-inline-end: 6px; font-size: 20px; line-height: 1; }
.h2-col > .h2-field { margin-top: 20px; }
/* «سجّل ميدانياً» (للعامل بلا صلاحية التشغيل): الأفعال الحقيقية نفسها بسطح داكن معتمد بدل البطاقة البيضاء القديمة */
.home2 .h2-field.card { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.home2 .h2-field .card-heading h2 { margin: 0 0 10px; padding-inline: 4px; font: 700 19px/1.3 var(--h2-font); color: var(--c-paper); }
.home2 .h2-field .context-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home2 .h2-field .context-action { min-height: 56px; justify-content: flex-start; gap: 10px; padding: 0 14px; border-radius: 18px; background: var(--c-white-a06); border: 1px solid var(--c-paper-a60); color: var(--c-paper); font: 600 15px/1.3 var(--h2-font); }
.home2 .h2-field .context-action > span:first-child { color: var(--c-sand); font-size: 22px; line-height: 1; }
.home2 .h2-field .context-action:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* أقسام */
.h2-sec { margin-top: 20px; }
.h2-sec > h2 { margin: 0 0 10px; padding-inline: 4px; font: 700 19px/1.3 var(--h2-font); color: var(--c-paper); }
.h2-group { background: transparent; }
.h2-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 0; color: var(--c-paper); border-top: .5px solid var(--c-paper-a60); }
.h2-tx { flex: 1; min-width: 0; }
.h2-tx b { display: block; font: 600 17px/1.35 var(--h2-font); }
.h2-tx small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 1px; padding-block: 3px; font: 400 15px/1.5 var(--h2-font); color: var(--c-paper-a80); }
.h2-chev { color: var(--c-paper-a80); display: grid; margin-inline-start: auto; }
.h2-empty { margin: 0; padding: 6px 0 12px; font-size: 15px; color: var(--c-paper-a80); }
.h2-ic { display: grid; place-items: center; flex: none; color: var(--c-sand); background: var(--c-sand-a12); }

/* «اليوم»: السطح المميز الوحيد */
.h2-today { background: var(--c-forest-800); border: 1px solid var(--c-paper-a60); border-top: 2px solid var(--c-sand-a45); border-radius: 18px; padding: 4px 14px 6px; }
.h2-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.h2-sh.sep { border-top: .5px solid var(--c-paper-a60); }
.h2-sh h3 { margin: 0; font: 600 15px/1.3 var(--h2-font); color: var(--c-sand); }
.h2-shl { display: flex; flex-wrap: nowrap; flex: none; justify-content: flex-end; }
.h2-sh h3 { flex: 1 1 auto; min-width: 0; }
.h2-id { white-space: nowrap; }
.h2-link { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding-inline: 6px; color: var(--accent-ink); font: 600 15px var(--h2-font); white-space: nowrap; }   /* FX2-14: رابط نص: --accent-ink (≥4.5:1 نهاراً وليلاً) لا --c-sand (1.99:1 نهاراً) */
.on-photo .h2-link { color: var(--c-sand); }
.h2-link.crit { color: var(--c-sos); }
.h2-sh + .h2-row { border-top: 0; }
.h2-alert { position: relative; padding-inline-start: 12px; min-height: 64px; }
.h2-alert::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 0; width: 4px; border-radius: 2px; background: var(--c-amber); }
.h2-alert.crit::before { background: var(--c-sos); }

/* المهام: دائرة مرئية 26 بهدف لمس 48 */
.h2-chk { position: relative; width: 48px; height: 48px; display: grid; place-items: center; flex: none; }
.h2-chk::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c-sand); }
.h2-chk[aria-pressed="true"]::before { background: var(--c-ok); border-color: var(--c-ok); }
.h2-chk .h2-i { position: absolute; width: 17px; height: 17px; stroke: var(--c-forest-900); stroke-width: 2.4; opacity: 0; }
.h2-chk[aria-pressed="true"] .h2-i { opacity: 1; }
.h2-state { width: 26px; height: 26px; margin-inline: 11px; border-radius: 50%; border: 2px solid var(--c-paper-a80); display: grid; place-items: center; flex: none; color: var(--c-paper-a80); }
.h2-state.on { background: var(--c-ok); border-color: var(--c-ok); color: var(--c-forest-900); }
.h2-state .h2-i { width: 15px; height: 15px; stroke-width: 2.6; }
.h2-state:not(.on) .h2-i { opacity: 0; }
.h2-task.on .h2-tx b { color: var(--c-paper-a80); text-decoration: line-through; }
.h2-task.urgent .h2-tx b { color: var(--c-sos); }
.h2-ev { width: 48px; height: 48px; display: grid; place-items: center; flex: none; color: var(--c-sand); }
.h2-ev .h2-i { width: 22px; height: 22px; }

/* «المشروع»: شبكة عمودين بارتفاع أدنى 128؛ التمييز بالحالة لا بلون الأيقونة */
.h2-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h2-tile { width: 100%; min-width: 0; min-height: 128px; padding: 12px 14px; border-radius: 18px; background: var(--c-white-a06); border: 1px solid var(--c-paper-a60); display: flex; flex-direction: column; justify-content: space-between; }
.h2-tile.lead { background: linear-gradient(180deg, var(--c-forest-700), var(--c-forest-800)); border-color: var(--c-sand-a45); }
.h2-tile.attn { border-color: var(--c-amber-a40); background: linear-gradient(180deg, var(--c-amber-a14), var(--c-amber-a14)); }
.h2-tile.span { grid-column: 1 / -1; min-height: 72px; flex-direction: row; align-items: center; gap: 12px; }
.h2-tile.span .h2-vals { margin-inline-start: auto; text-align: end; }
.h2-th { display: flex; align-items: center; gap: 8px; font: 600 15px/1.3 var(--h2-font); color: var(--c-paper-a80); }
.h2-th .h2-ic { width: 32px; height: 32px; border-radius: 10px; }
.h2-th .h2-ic .h2-i { width: 20px; height: 20px; }
.h2-vals { display: block; }
.h2-tv { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font: 700 32px/1.15 var(--h2-font); }
.h2-tv.long { font-size: 25px; }
.h2-tv.xlong { font-size: 19px; }
.h2-tx small.h2-sub2 { display: flex; flex-wrap: wrap; column-gap: 8px; -webkit-line-clamp: unset; overflow: visible; }
/* العروض الضيقة (≤380px): نصوص ثانوية أوضح دون تغيير التخطيط */
@media (max-width: 380px) {
  .home2 { }
  .h2-tc, .h2-when { font-size: 15px; }
  .home2 .sos-button .sos-text small, .h2-badge { font-size: 14px; }
}
.h2-tv.warn { color: var(--c-amber); }
.h2-tv.h2-nil { color: var(--c-paper-a80); font-weight: 500; }
.h2-tv small { font: 500 15px/1.2 var(--h2-font); color: var(--c-paper-a80); }
.h2-nw { white-space: nowrap; unicode-bidi: isolate; }
.h2-tc { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--c-paper-a80); }
.h2-navrow { width: 100%; min-height: 64px; margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 18px;
  background: linear-gradient(270deg, var(--c-sand-a22), var(--c-sand-a12) 70%); border: 1px solid var(--c-sand-a45); }
.h2-navrow .h2-ic { width: 40px; height: 40px; border-radius: 14px; background: var(--c-sand-a22); }
.h2-navrow .h2-ic .h2-i { width: 22px; height: 22px; }
.h2-navrow .h2-tx b { font-size: 17px; font-weight: 700; }
.h2-navrow .h2-tx small { font-size: 14px; color: var(--c-paper-a80); }

/* قادم */
.h2-when { min-width: 76px; padding: 5px 8px; border-radius: 12px; text-align: center; white-space: nowrap; align-self: center; font: 600 14px/1.3 var(--h2-font); color: var(--c-paper-a80); background: var(--c-white-a06); font-variant-numeric: tabular-nums; }
.h2-when.hot { background: var(--c-amber-a14); color: var(--c-amber); }

/* إعلانات الرعاة (المكوّن الحقيقي كما هو): أهداف اللمس 48 وألوان داكنة تناسب اللوحة، بلا تغيير في السلوك */
.home2 .ads-carousel { background: var(--c-forest-800); border-color: var(--c-paper-a60); }
.home2 .ads-dots { min-height: 48px; background: transparent; }
.home2 .ads-dot { width: 48px; height: 48px; min-height: 48px; }
.home2 .ads-dot::after { background: var(--c-paper-a80); }
.home2 .ads-dot.active::after { background: var(--c-sand); }
.home2 .ads-nav, .home2 .ads-nav-prev, .home2 .ads-nav-next { width: 48px; height: 48px; }
.home2 .ad-caption { font-size: 14px; background: transparent; color: var(--c-paper-a80); }
.home2 .ads-slide .ad-banner { background: var(--c-forest-800); }
.home2 .ads-slide .ad-media { background: var(--c-forest-800); }
.home2 .ads-nav { background: var(--c-black-a70); color: var(--c-paper); border: .5px solid var(--c-paper-a60); }
/* تفصيل التنبيه سطر واحد (الكامل في ورقة الإشعارات) كي لا يتضخم صف «اليوم» بقوائم الوسوم الطويلة */
.h2-alert .h2-tx small { -webkit-line-clamp: 1; }

@media (prefers-reduced-motion: reduce) {
  .h2-bar { transition: none; }
  .home2 .sos-button.holding::after { animation: none; transform: none; }
}

/* الشريط السفلي بتصميم المالك: مادة زجاجية وحبة كريمية للباب الحالي (يغلب ثيمات الكلاسيكي والحديث والنحاس) */
@media (max-width: 860px) {
  :is(html, html[data-ui]) body .bottombar {
    background: var(--c-forest-900-a82); border-top: .5px solid var(--c-white-a12); box-shadow: none;
    height: auto; min-height: 68px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px;
    -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  }
  :is(html, html[data-ui]) body .bottombar button {
    color: var(--c-muted); background: none; border: 0; border-radius: 18px; min-height: 54px; padding: 4px 2px; gap: 2px; box-shadow: none;
  }
  :is(html, html[data-ui]) body .bottombar button svg { stroke: currentColor; }
  :is(html, html[data-ui]) body .bottombar button .nav-label {
    position: static; display: block; width: auto; height: auto; margin: 0; padding: 0; overflow: hidden; clip: auto; clip-path: none; opacity: 1;
    font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; color: inherit;
  }
  :is(html, html[data-ui]) body .bottombar button:is([aria-selected="true"], [aria-current="page"]) {
    background: linear-gradient(180deg, var(--c-paper), var(--c-sand-hi)); color: var(--c-sand-ink); font-weight: 800; border-top-color: transparent;
  }
  :is(html, html[data-ui]) body .bottombar button:is([aria-selected="true"], [aria-current="page"]) .nav-label { font-weight: 800; color: var(--c-sand-ink); }
  :is(html, html[data-ui]) body .bottombar .nav-icon-shell, :is(html, html[data-ui]) body .bottombar button:is([aria-selected="true"], [aria-current="page"]) .nav-icon-shell { background: transparent; }
}

/* ── S1: «سجّل سريعاً» والخط الصغير و«جهّز مزرعتك» (رموز system.css وحدها) ── */
.h2-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.h2-qa { min-height: 72px; padding: 10px 6px; border-radius: 16px; background: var(--c-white-a06); border: 1px solid var(--c-paper-a60);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font: 600 14px/1.3 var(--h2-font); color: var(--c-paper); }
.h2-qa .h2-ic { width: 32px; height: 32px; border-radius: 10px; }
.h2-qa .h2-ic svg { width: 20px; height: 20px; }
.h2-qa:hover { border-color: var(--c-sand-a45); }
.h2-spark { display: block; margin-top: 6px; color: var(--c-paper-a80); }
.h2-spark .spark { height: 22px; }
.h2-spark .spark .spark-line { stroke: var(--c-paper-a80); }
.h2-spark .spark .spark-dot { fill: var(--c-sand); stroke: var(--c-forest-900); }
.home2 .welcome-setup, .home2 .h2-start.welcome-setup { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; color: var(--c-paper); }
.welcome-setup .welcome-head .answer-sentence { margin: 4px 0; font: 700 26px/1.35 var(--h2-font); color: var(--c-paper); }
.welcome-setup .eyebrow, .welcome-setup .evidence, .welcome-setup .muted { color: var(--c-paper-a80); font-size: 14px; }
.welcome-setup .welcome-skip { align-self: center; min-height: 48px; padding: 0 12px; background: none; border: 0; color: var(--c-sand); font: 700 15px/1.3 var(--h2-font); cursor: pointer; }
.welcome-setup .welcome-skip:focus-visible { outline: 2px solid var(--c-sand); outline-offset: 2px; border-radius: 8px; }
/* الحاسوب (d-home): عمودان؛ الأيمن جواب وإجراء ومؤشرات، والأيسر اليوم والقادم. الترتيب في DOM كما هو (الجوال عمود واحد) */
@media (min-width: 1100px) {
  .h2-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 24px; align-items: start; grid-auto-flow: row dense; }
  .h2-col > .h2-bar, .h2-col > .h2-title, .h2-col > .h2-find { grid-column: 1 / -1; }
  .h2-col > .h2-sec[aria-labelledby="h2t-today"], .h2-col > .h2-sec[aria-labelledby="h2t-ahead"] { grid-column: 2; }
  .h2-col > .h2-sec[aria-labelledby="h2t-quick"], .h2-col > .h2-sec[aria-labelledby="h2t-proj"] { grid-column: 1; }
  .h2-qa { min-height: 84px; }
}

/* ── S1: الطبقة 0 (الجواب) و«يحتاجك الآن» و«المؤشرات» كدفتر ── */
.h2-need { color: var(--c-paper); }
/* بطاقة واحدة بفواصل: «يحتاجك الآن» داخل لوحة «اليوم» بلا بطاقة ثانية (إطار مزدوج يهدر العرض) */
.h2-need .card.need { border: 0; border-radius: 0; background: transparent; overflow: visible; padding-inline: 0; }
.h2-need .need-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.h2-need .need-row + .need-row { border-top: .5px solid var(--c-paper-a60); }
.h2-need .need-rank { flex: none; min-width: 24px; text-align: center; color: var(--c-paper-a80); font-weight: 700; }
.h2-need .need-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--c-amber-a14); color: var(--c-amber); }
.h2-need .need-row.is-danger .need-icon, .h2-need .need-row.crit .need-icon { background: var(--c-sos-a14); color: var(--c-sos); }
.h2-need .need-icon svg { width: 20px; height: 20px; }
.h2-need .need-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home2 .h2-need .need-row.need-tap { display: flex; align-self: stretch; width: 100%; max-width: none; box-sizing: border-box; min-height: 56px; margin: 0; padding: 12px 14px; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.h2-need .need-row.need-tap:focus-visible { outline: 2px solid var(--c-amber); outline-offset: -2px; }
.h2-need .need-row.need-tap > svg { flex: none; width: 18px; height: 18px; color: var(--c-paper-a80); }
.home2 .h2-need .need-row.need-tap { gap: 10px; padding-inline: 12px; }
.home2 .h2-need .need-row.need-tap .need-text small { white-space: pre-line; font-size: 13px; line-height: 1.5; }
.h2-need .need-text b { font: 700 16px/1.4 var(--h2-font); }
.h2-need .need-text small, .h2-need .need-text span { color: var(--c-paper-a80); font-size: 14px; }
.h2-need .btn { flex: none; min-height: 48px; padding: 0 16px; border-radius: 14px; font: 700 15px/1.2 var(--h2-font); }
.h2-need .btn-primary { background: var(--primary); color: var(--primary-ink); border: 0; }
.h2-need .btn-secondary { background: transparent; color: var(--c-paper); border: 1px solid var(--c-paper-a60); }
.h2-need .btn:focus-visible { outline: 2px solid var(--c-sand); outline-offset: 2px; }
/* الجوال: الأيقونة والترتيب والنص في صف، والزر تحت النص بعرضه الذاتي، فيأخذ النص العرض كله بعد العمودين الصغيرين */
@media (max-width: 480px) {
  .home2 .h2-need .need-row:not(.need-tap) { display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: 10px; row-gap: 8px; align-items: start; }
  .home2 .h2-need .need-row .btn { grid-column: 3; justify-self: start; }
}
/* المؤشرات: سطر دفتر لكل مقياس على الجوال والآيباد (تسمية وسياق يميناً، رقم يساراً)؛ الحاسوب شبكة من عمودين */
@media (max-width: 1099px) {
  .h2-tiles { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--c-paper-a60); border-radius: 18px; overflow: hidden; background: var(--c-forest-800); }
  .h2-tile, .h2-tile.lead, .h2-tile.attn, .h2-tile.span { min-height: 72px; border: 0; border-radius: 0; background: transparent; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; grid-column: auto; }
  .h2-tile + .h2-tile { border-top: .5px solid var(--c-paper-a60); }
  /* صف المؤشر: خلية العنوان بعرض واحد لكل الصفوف (تتسع لأطول تسمية «التغذية»)، وكتلة القيمة تأخذ الباقي وتبدأ من اليمين (بداية RTL) بحافة واحدة */
  .h2-tile > .h2-th { flex: 0 0 120px; min-width: 120px; }
  .h2-tile .h2-vals { flex: 1 1 0; min-width: 0; margin-inline-start: 0; text-align: start; }
}

/* WAVE2: ترويسة الرئيسية بنمط القشرة نفسه — المحادثات والإشعارات مربعان مستديران، الحساب آخراً عند الحافة؛ البحث صف مستقل بعرض كامل تحت الشريط */
.h2-round.h2-glass { border-radius: var(--r-md); }
.h2-bar:not(.glassy) > .h2-find { min-width: 96px; }   /* كبسولة البحث داخل الترويسة: مرنة ولا تضغط الأزرار (flex:none) */
.h2-allops { margin-top: 8px; min-height: 48px; }   /* WAVE2: «كل العمليات» تحت ثلاث بلاطات «تسجيل سريع» */
