/* ============================================================
   سهم — هوية «دفتر المحلل» Field Notes (معتمدة)
   ورقة رسم بياني · بطاقات-ملاحظات بحدود حبر وظلال صلبة ·
   شريط لاصق أصفر · تحويط أحمر · تظليل قلم فسفوري · دبابيس 📌
   ============================================================ */

:root {
  --ink: #2b2b2b;
  --border: #2b2b2b;            /* حبر حدود الملاحظات */
  --soft: #6f6e66;
  --faint: #a09e92;
  --bg: #fbfaf5;                /* الورقة */
  --grid: #e9f0f4;              /* خطوط ورقة الرسم */
  --grid2: #f0f5f8;
  --card: #ffffff;
  --line: #e6e3d6;              /* مساطر داخلية خفيفة */
  --cell: #efece0;              /* حدود خلايا الجداول */
  --head: #f8f6ec;
  --brand: #2f7d5c;             /* أخضر قلم التحديد */
  --brand-deep: #235f46;
  --brand-soft: #dff1e8;
  --brand-line: #bfe0d0;
  --navy: #2f6f9e;              /* حبر أزرق */
  --navy-soft: #e3f1fb;
  --sticky-blue: #cdeffe;
  --gold: #8a6a14;              /* قلم رصاص ذهبي */
  --gold-soft: #fff3c4;         /* شريط لاصق */
  --tape: #fff48f;
  --red: #d2483e;               /* قلم التحويط الأحمر */
  --red-soft: #fbe9e7;
  --mark: #ffe28a;              /* تظليل فسفوري */
  --r: 12px;
  --r-sm: 9px;
  --sh: 4px 4px 0 rgba(43,43,43,.14);
  --sh-hover: 6px 6px 0 rgba(43,43,43,.18);
  --sh-soft: 2px 2px 0 rgba(43,43,43,.12);
  --topbar: rgba(255,255,255,.96);
  --hover: #fbfaf3;
  --invert-bg: #2b2b2b;
  --invert-fg: #fdfdfb;
  --chart-dim: #a09e92;
  --chart-line: #e7e4d6;
  --chart-tip-bg: #fffdf5;
  --chart-tip-ink: #2b2b2b;
  --chart-tip-line: #2b2b2b;
  --sans: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- الورقة ---------- */
html { -webkit-text-size-adjust: 100%; }
body.sahm-canvas { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 13.5px; line-height: 1.8;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 27px, var(--grid) 27px, var(--grid) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, var(--grid2) 27px, var(--grid2) 28px),
    var(--bg); }
.sahm-app { min-height: 100vh; display: flex; flex-direction: column; }
.sahm-app * { box-sizing: border-box; }
.sahm-app a { color: var(--brand-deep); text-decoration: none; }
.sahm-app a:hover { color: var(--brand); }
.sahm-mono { font-family: var(--mono); font-feature-settings: "tnum" 1; direction: ltr; unicode-bidi: embed; }
.sahm-up { color: var(--brand-deep); font-weight: 700; }
.sahm-down { color: var(--red); font-weight: 700; }
.sahm-dim { color: var(--soft); font-size: 12.5px; }
.sahm-free { color: var(--brand-deep); font-weight: 700; }
.sahm-main { width: 100%; max-width: 1220px; margin: 0 auto; padding: 22px 24px 60px; flex: 1; }

/* ---------- الشريط العلوي (معلومات الجلسة) ---------- */
.sahm-utility { background: #217346; color: #e9f3ec; font-size: 11px; display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgba(0,0,0,.18); }
.sahm-ucell { padding: 5px 13px; border-inline-start: 1px solid rgba(255,255,255,.16); }
.sahm-acct:hover { color: #ffffff; }
.sahm-ucell:first-child { border-inline-start: 0; }
.sahm-uleft { margin-inline-start: auto; display: flex; flex-wrap: wrap; }
.sahm-credits-pill { color: var(--tape); font-weight: 700; }
.sahm-username { color: #fff; }
.sahm-preview-badge { color: #4a3d08 !important; background: var(--tape); border-radius: 3px; margin: 3px 6px; padding: 2px 11px !important; border: 0 !important; font-weight: 700; transform: rotate(-1deg); box-shadow: 0 2px 5px rgba(0,0,0,.25); }

/* ---------- الترويسة ---------- */
.sahm-topbar { position: sticky; top: 0; z-index: 90; background: var(--topbar); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1.5px solid var(--line); }
.sahm-topbar .sahm-wrapbar { max-width: 1220px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 11px 24px 9px; flex-wrap: wrap; }
.sahm-brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 0 1 auto; }
.sahm-logo { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; transform: rotate(-2deg); filter: drop-shadow(2px 2px 0 rgba(43,43,43,.16)); }
.sahm-logo-g { width: 100%; height: 100%; display: block; }
.sahm-brand-text b { font-size: 18px; font-weight: 700; color: var(--ink); display: block; line-height: 1.25; }
.sahm-brand-sub { display: block; font-size: 10px; color: var(--soft); line-height: 1.3; max-width: 215px; white-space: normal; }
/* سطر الوصف يلتف تحت الشعار بدل أن يزاحم القائمة — فتبقى الألسنة سطرًا واحدًا */

/* تبويبات الدفتر — داخل صف الترويسة، متوسطة بين العلامة وأدوات الجلسة */
.sahm-sheets { flex: 1; min-width: 0; }
.sahm-sheets-in { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: thin; padding: 0 6px; }
.sahm-sheets-in > :first-child { margin-inline-start: auto; }
.sahm-sheets-in > :last-child { margin-inline-end: auto; }
/* سطر واحد دائمًا (لا التفاف ولا نزول عنصر) + توسيط آمن: يتوسط عند السعة ويصطف من البداية عند الضيق فلا يُقص طرف */
.sahm-sheets-in > * { flex: 0 0 auto; white-space: nowrap; }
/* safe center: تتوسط عند السعة، وتصطف من البداية عند الضيق — لا اقتطاع لا يُوصل إليه */
[data-lang="en"] .sahm-sheet-tab { padding: 6px clamp(8px, 0.9vw, 14px); letter-spacing: 0; }

.sahm-sheet-tab { position: relative; padding: 6px 18px; font-size: 13px; font-weight: 700; color: var(--soft) !important; border-radius: 8px; white-space: nowrap; border: 1.5px solid transparent; }
.sahm-sheet-tab:hover { color: var(--ink) !important; border-color: var(--line); }
.sahm-sheet-tab.is-active { background: var(--brand-soft); color: var(--brand-deep) !important; }
.sahm-sheet-tab.is-active::after { content: ""; position: absolute; inset-inline-end: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--brand); }
.sahm-nav { display: none; }
.sahm-double-rule { display: none; }

/* بقايا fx (الترميز محذوف) */
.sahm-fxbar, .sahm-fx-badge, .sahm-fx-ctx { display: none; }

/* بحث الترويسة */
.sahm-nav-search { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 8px 14px; color: var(--faint); position: relative; transition: .15s; flex: 0 1 200px; min-width: 120px; box-shadow: var(--sh-soft); }
.sahm-nav-search:focus-within { outline: 2px dashed var(--brand); outline-offset: 2px; }
.sahm-nav-search-ic { color: var(--faint); flex: 0 0 auto; }
.sahm-nav-search input { border: 0; background: none; outline: none; font-family: var(--sans); font-size: 12.5px; color: var(--ink); width: 100%; min-width: 0; padding: 0; }
.sahm-nav-search input::placeholder { color: var(--faint); }
.sahm-nav-search kbd { background: var(--head); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-size: 10px; color: var(--soft); flex: 0 0 auto; }
.sahm-nav-search .sahm-pick-results { top: calc(100% + 10px); min-width: 290px; right: 0; left: auto; }

/* أزرار الدخول */
.sahm-auth-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: var(--r-sm); font-family: var(--sans); font-size: 12.5px; font-weight: 700; padding: 8px 16px; cursor: pointer; transition: .13s; white-space: nowrap; flex: 0 0 auto; border: 1.5px solid var(--border); box-shadow: var(--sh-soft); }
.sahm-auth-primary { background: var(--brand); color: #fff !important; }
.sahm-auth-ghost { background: var(--card); color: var(--ink) !important; }
.sahm-auth-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(43,43,43,.18); }

/* مفتاح الوضع */
.sahm-theme-toggle { flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--card); color: var(--soft); display: grid; place-items: center; cursor: pointer; transition: .13s; box-shadow: var(--sh-soft); }
.sahm-theme-toggle:hover { color: var(--brand-deep); transform: translate(-1px, -1px); }
.sahm-theme-toggle svg { width: 16px; height: 16px; }
.sahm-theme-toggle .sahm-ic-moon { display: block; }
.sahm-theme-toggle .sahm-ic-sun { display: none; }
html[data-sahm-theme="dark"] .sahm-theme-toggle .sahm-ic-moon { display: none; }
html[data-sahm-theme="dark"] .sahm-theme-toggle .sahm-ic-sun { display: block; }

/* الشريط المتحرك */
.sahm-ticker-tape { background: var(--card); border-bottom: 1.5px solid var(--border); overflow: hidden; }
.sahm-ticker-tape:empty { display: none; }
.sahm-tape-track { display: flex; gap: 32px; padding: 6px 20px; font-family: var(--mono); font-size: 11px; color: var(--soft); white-space: nowrap; width: max-content; will-change: transform; animation: sahm-marquee 45s linear infinite; }
.sahm-tape-item b { color: var(--ink); }
.sahm-ticker-tape:hover .sahm-tape-track { animation-play-state: paused; }
@keyframes sahm-marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .sahm-tape-track { animation: none; } }

/* ---------- ملاحظة أساس (مشتركة) ---------- */
.sahm-panel, .sahm-table-wrap, .sahm-open, .sahm-rpanel, .sahm-idx-card, .sahm-acct-card,
.sahm-chart-box, .sahm-explain, .sahm-ai-answer, .sahm-fn, .sahm-uitem, .sahm-ws-card,
.sahm-kpi, .sahm-flag, .sahm-calc-big, .sahm-res-note, .sahm-res-item, .sahm-res-snap,
.sahm-moat, .sahm-recent-chip, .sahm-quote-item, .sahm-pulse-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); }

/* ---------- افتتاحية الرئيسية ---------- */
.sahm-hero { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.sahm-hero-card { position: relative; border-radius: var(--r); padding: 22px 24px; color: var(--ink); background: var(--card); border: 1.5px solid var(--border); box-shadow: var(--sh); }
.sahm-hero-card::after { content: "📌"; position: absolute; top: -13px; inset-inline-start: 18px; font-size: 19px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.sahm-hero-deco { display: none; }
.sahm-hero-date { position: relative; margin: 0 0 6px; font-size: 11.5px; color: var(--soft); }
.sahm-hero-greet { position: relative; margin: 0; font-size: 22px; font-weight: 700; line-height: 1.4; display: inline-block; border-bottom: 4px solid var(--brand); transform: rotate(-.5deg); padding-bottom: 2px; }
.sahm-hero-sub { position: relative; margin: 10px 0 14px; font-size: 12.5px; color: var(--soft); max-width: 52ch; }
.sahm-hero-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.sahm-hchip { background: var(--head); border: 1.5px solid var(--border); border-radius: 8px; padding: 4px 13px; font-size: 11.5px; color: var(--ink); box-shadow: var(--sh-soft); }
.sahm-hchip b { color: var(--brand-deep); font-size: 12.5px; }

.sahm-idx-card, .sahm-acct-card { position: relative; padding: 16px 18px; display: flex; flex-direction: column; }
.sahm-acct-card::after { content: "📌"; position: absolute; top: -13px; inset-inline-end: 16px; font-size: 17px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.sahm-idx-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sahm-idx-label { font-size: 11px; font-weight: 700; color: var(--soft); }
.sahm-idx-sym { font-size: 10.5px; color: var(--faint); }
.sahm-pulse-rows { display: flex; flex-direction: column; margin-top: 8px; }
.sahm-pulse-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--line); color: var(--ink) !important; transition: .12s; border-radius: 6px; }
.sahm-pulse-row:last-child { border-bottom: 0; }
.sahm-pulse-row:hover { background: var(--brand-soft); padding-inline: 8px; }
.sahm-pulse-tk { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 44px; height: 25px; border-radius: 7px; background: var(--brand-soft); color: var(--brand-deep); border: 1.5px solid var(--border); font-size: 10.5px; font-weight: 700; padding: 0 7px; font-family: var(--mono); }
.sahm-pulse-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sahm-pulse-px { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--brand-deep); }
.sahm-pulse-more { margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--brand-deep) !important; }
.sahm-acct-bal { font-family: var(--mono); font-feature-settings: "tnum" 1; font-size: 26px; font-weight: 600; color: var(--brand-deep); margin: 6px 0 3px; line-height: 1.1; }
.sahm-acct-bal small { font-size: 11.5px; color: var(--soft); font-family: var(--sans); font-weight: 400; }
.sahm-acct-rows { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--soft); margin-bottom: 12px; }
.sahm-acct-rows b { color: var(--ink); }
.sahm-acct-cta { margin-top: auto; text-align: center; padding: 10px; border-radius: var(--r-sm); background: var(--brand); color: #fff !important; font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--border); box-shadow: var(--sh-soft); transition: .13s; }
.sahm-acct-cta:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(43,43,43,.2); }

/* عناوين الأقسام */
.sahm-sec { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; flex-wrap: wrap; }
.sahm-sec-no { font-size: 10.5px; font-weight: 700; color: #4a3d08; background: var(--tape); border-radius: 3px; padding: 2px 12px; letter-spacing: 1px; transform: rotate(-1.5deg); box-shadow: 0 2px 5px rgba(0,0,0,.16); font-family: var(--mono); }
.sahm-sec h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); display: inline-block; border-bottom: 3px solid var(--brand); transform: rotate(-.4deg); padding-bottom: 1px; }
.sahm-sec::after { content: none; }
.sahm-sec-side { margin-inline-start: auto; font-size: 12px; color: var(--soft); }
.sahm-sec-side a { font-weight: 700; }

/* ---------- الجداول ---------- */
.sahm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sahm-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.sahm-table thead th { background: var(--head); border: 1px solid var(--cell); border-top: 0; text-align: right; font-size: 11px; color: var(--soft); font-weight: 700; padding: 8px 14px; white-space: nowrap; }
.sahm-table tbody td { border: 1px solid var(--cell); padding: 9px 14px; background: var(--card); }
.sahm-table tr th:first-child, .sahm-table tr td:first-child { border-inline-start: 0; }
.sahm-table tr th:last-child, .sahm-table tr td:last-child { border-inline-end: 0; }
.sahm-table tbody tr:last-child td { border-bottom: 0; }
.sahm-table tbody tr:hover td, .sahm-table-hover tbody tr:hover td { background: var(--hover); }
.sahm-table td small { display: block; color: var(--faint); font-size: 11px; }
.sahm-table .num, th.num, td.num { text-align: left; direction: ltr; font-family: var(--mono); font-feature-settings: "tnum" 1; }
.sahm-table-compact { font-size: 12.5px; }
.sahm-table-compact thead th, .sahm-table-compact tbody td { padding: 8px 12px; }
.sahm-table tr.row-total td, .sahm-table td.row-strong, .sahm-table .row-strong td, td.row-strong { font-weight: 700; color: var(--brand-deep); background: linear-gradient(transparent 52%, var(--mark) 52%, var(--mark) 88%, transparent 88%), var(--card); }
.sahm-upd { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.sahm-go { color: var(--brand-deep) !important; font-weight: 700; font-size: 12.5px; white-space: nowrap; }

/* ---------- العمود الجانبي ---------- */
.sahm-rail { display: flex; flex-direction: column; gap: 16px; }
.sahm-lead { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.sahm-lead-main { min-width: 0; }
.sahm-rpanel { overflow: hidden; }
.sahm-rpanel h3 { margin: 0; padding: 14px 18px 2px; font-size: 15px; font-weight: 700; color: var(--ink); border: 0; }
.sahm-rbody { padding: 8px 18px 14px; }
.sahm-rbalance { font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--brand-deep); line-height: 1.15; margin-bottom: 4px; }
.sahm-rbalance small { font-size: 12px; color: var(--soft); font-family: var(--sans); font-weight: 400; }
.sahm-rrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; color: var(--soft); }
.sahm-rrow:last-child { border-bottom: 0; }
.sahm-rrow b { color: var(--ink); font-feature-settings: "tnum" 1; }
.sahm-rlink { display: block; text-align: center; margin: 4px 14px 14px; padding: 9px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-deep) !important; font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--border); box-shadow: var(--sh-soft); transition: .13s; }
.sahm-rlink:hover { transform: translate(-1px, -1px); }

/* ---------- البحث الكبير + المنسدلة ---------- */
.sahm-open { padding: 18px 20px; margin-bottom: 16px; }
.sahm-open label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.sahm-open-row { display: flex; gap: 12px; position: relative; }
.sahm-open-row input.sahm-company-pick { flex: 1; max-width: none; }
.sahm-open-go { background: var(--brand); color: #fff; border: 1.5px solid var(--border); border-radius: var(--r-sm); font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 0 24px; cursor: pointer; box-shadow: var(--sh-soft); transition: .13s; }
.sahm-open-go:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(43,43,43,.2); }
.sahm-open-row .sahm-pick-results { top: calc(100% + 8px); }
.sahm-open-hint { margin: 9px 2px 0; font-size: 11px; color: var(--faint); }
.sahm-open-hint .sahm-mono { background: var(--head); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--soft); }

.sahm-picker { position: relative; }
.sahm-picker label { display: block; font-size: 12px; font-weight: 700; color: var(--soft); margin-bottom: 6px; }
.sahm-pick-results { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 50; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-hover); overflow: hidden; max-height: 290px; overflow-y: auto; }
.sahm-pick-results:empty { display: none; }
.sahm-pick-item { display: block; width: 100%; text-align: right; background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 10px 14px; font-family: var(--sans); font-size: 12.5px; color: var(--ink); cursor: pointer; }
.sahm-pick-item:last-child { border-bottom: 0; }
.sahm-pick-item:hover { background: var(--brand-soft); }
.sahm-pick-item small { display: block; color: var(--faint); font-size: 10.5px; }
.sahm-pick-item b { color: var(--brand-deep); }

/* ---------- فهرس الوحدات + التحديثات ---------- */
.sahm-fn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sahm-fn { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; padding: 14px 16px; transition: .13s; }
.sahm-fn:hover { transform: translate(-1px, -2px); box-shadow: var(--sh-hover); }
.sahm-fn-idx { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-size: 16px; font-weight: 700; border: 1.5px solid var(--border); }
.sahm-fn:hover .sahm-fn-idx { background: var(--brand-soft); color: var(--brand-deep); transform: rotate(-3deg); }
.sahm-fn-code { display: none; }
.sahm-fn-body { min-width: 0; }
.sahm-fn-body h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sahm-fn-body p { margin: 2px 0 0; font-size: 11.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sahm-fn-cost { font-size: 10px; font-weight: 700; border-radius: 3px; padding: 2px 10px; background: var(--gold-soft); color: var(--gold); white-space: nowrap; transform: rotate(-1.5deg); box-shadow: 0 2px 4px rgba(0,0,0,.12); }
.sahm-updates { display: flex; flex-wrap: wrap; gap: 10px; }
.sahm-uitem { display: inline-flex; align-items: baseline; gap: 9px; padding: 7px 14px; border-radius: var(--r-sm); font-size: 11.5px; box-shadow: var(--sh-soft); }
.sahm-ut { font-family: var(--mono); font-weight: 600; color: var(--brand-deep); }
.sahm-up2 { font-family: var(--mono); color: var(--ink); }
.sahm-uw { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }

/* ---------- عناصر عامة ---------- */
.sahm-panel { padding: 18px 20px; margin-bottom: 18px; }
.sahm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.sahm-panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); display: inline-block; border-bottom: 3px solid var(--brand); transform: rotate(-.4deg); }
.sahm-panel-inner { background: var(--head); border: 1px dashed var(--border); border-radius: var(--r-sm); padding: 14px 16px; margin-top: 12px; }
.sahm-h3 { font-size: 15px; font-weight: 700; margin: 16px 0 10px; color: var(--ink); }
.sahm-h4 { font-size: 13px; font-weight: 700; margin: 16px 0 10px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.sahm-h4::before { content: "✎"; color: var(--brand); flex: 0 0 auto; }
.sahm-empty { color: var(--soft); font-size: 12.5px; }
.sahm-loading { color: var(--soft); font-size: 12.5px; padding: 20px 4px; }
.sahm-loading::before { content: ""; display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin-inline-end: 8px; vertical-align: -2px; animation: sahmspin .8s linear infinite; }
@keyframes sahmspin { to { transform: rotate(360deg); } }
.sahm-msg-err { background: var(--red-soft); color: var(--red); border: 1.5px solid var(--red); border-radius: var(--r-sm); padding: 10px 15px; font-size: 12.5px; font-weight: 700; }
.sahm-msg-ok { background: var(--brand-soft); color: var(--brand-deep); border: 1.5px solid var(--brand); border-radius: var(--r-sm); padding: 10px 15px; font-size: 12.5px; font-weight: 700; }
.sahm-badge { display: inline-block; border-radius: 5px; padding: 2px 10px; font-size: 10.5px; font-weight: 700; background: var(--navy-soft); color: var(--navy); border: 1px solid var(--navy); }
.sahm-req { color: var(--red); }
.sahm-ico { vertical-align: -2px; }

.sahm-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--brand); color: #fff !important; font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 10px 22px; cursor: pointer; box-shadow: 3px 3px 0 rgba(43,43,43,.22); transition: .13s; }
.sahm-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(43,43,43,.25); }
.sahm-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(43,43,43,.25); }
.sahm-btn-amber { background: var(--brand); }
.sahm-btn-small { padding: 7px 14px; font-size: 12px; box-shadow: var(--sh-soft); }
/* Compact, semantic admin action buttons (v159) */
.sahm-btn.sahm-xs { font-size: 12px; font-weight: 600; padding: 6px 11px; gap: 6px; border-radius: 8px; border: 1px solid var(--border); box-shadow: none; background: var(--cell); color: var(--ink) !important; }
.sahm-btn.sahm-xs:hover { transform: none; box-shadow: none; filter: brightness(.97); }
.sahm-btn.sahm-xs:active { transform: translateY(1px); box-shadow: none; }
.sahm-btn.sahm-xs svg { width: 14px; height: 14px; flex: 0 0 auto; }
.sahm-btn.sahm-xs.is-grant  { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.sahm-btn.sahm-xs.is-trial  { background: var(--brand-soft); color: var(--brand-deep) !important; border-color: var(--brand-line); }
.sahm-btn.sahm-xs.is-admin  { background: var(--navy-soft); color: var(--navy) !important; border-color: var(--navy); }
.sahm-btn.sahm-xs.is-reset  { background: transparent; color: var(--ink) !important; border-color: var(--border); }
.sahm-btn.sahm-xs.is-unlock { background: var(--gold-soft); color: var(--gold) !important; border-color: var(--gold); }
.sahm-btn.sahm-xs.is-danger { background: var(--red-soft); color: var(--red) !important; border-color: var(--red); }
/* Social icon links on analyst profiles */
.sahm-soc-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--cell); color: var(--ink); text-decoration: none; transition: filter .12s, color .12s, border-color .12s; }
.sahm-soc-link:hover { filter: brightness(.97); color: var(--brand); border-color: var(--brand-line); }
.sahm-soc-link i { font-size: 18px; }
.sahm-input { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 9px 13px; font-family: var(--sans); font-size: 13px; color: var(--ink); max-width: 100%; transition: .13s; box-shadow: inset 1px 1px 0 rgba(43,43,43,.05); }
.sahm-input:focus { outline: 2px dashed var(--brand); outline-offset: 2px; }
select.sahm-input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(0% + 13px) 50%, calc(0% + 18px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 30px; }

/* ---------- محطة الشركة ---------- */
.sahm-terminal { min-width: 0; }
.sahm-terminal-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 20px; margin-bottom: 16px; position: relative; }
.sahm-terminal-head::after { content: "📌"; position: absolute; top: -13px; inset-inline-start: 20px; font-size: 18px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.sahm-terminal-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sahm-ticker-badge { width: 54px; height: 54px; border-radius: 11px; background: var(--brand-soft); border: 1.5px solid var(--border); color: var(--brand-deep); display: grid; place-items: center; font-family: var(--mono); font-size: 14px; font-weight: 700; flex: 0 0 auto; transform: rotate(-2deg); box-shadow: var(--sh-soft); }
.sahm-terminal-id h1 { margin: 0; font-family: var(--sans); font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.sahm-sub { margin: 2px 0 0; font-size: 12px; color: var(--soft); }
.sahm-quote-strip { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.sahm-quote-item { border-radius: var(--r-sm); padding: 8px 12px; min-width: 86px; box-shadow: var(--sh-soft); }
.sahm-quote-item span { display: block; font-size: 9.5px; color: var(--soft); font-weight: 700; }
.sahm-quote-item b { font-family: var(--mono); font-feature-settings: "tnum" 1; font-size: 14px; color: var(--ink); direction: ltr; unicode-bidi: embed; display: inline-block; }
.sahm-quote-item:first-child { background: linear-gradient(transparent 50%, var(--mark) 50%, var(--mark) 92%, transparent 92%), var(--card); }
.sahm-quote-item:first-child b { color: var(--brand-deep); font-size: 16px; }
.sahm-quote-item.q-note { background: none; border: 0; box-shadow: none; min-width: 0; }
.sahm-quote-item.q-note b { font-size: 10.5px; color: var(--faint); font-weight: 400; }

.sahm-watch-btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--border); background: var(--card); color: var(--soft); border-radius: var(--r-sm); padding: 8px 15px; font-family: var(--sans); font-size: 12px; font-weight: 700; cursor: pointer; transition: .13s; flex: 0 0 auto; box-shadow: var(--sh-soft); }
.sahm-watch-btn:hover { color: var(--brand-deep); transform: translate(-1px, -1px); }
.sahm-watch-btn.is-on { background: var(--brand-soft); color: var(--brand-deep); outline: 2px dashed var(--brand); outline-offset: -2px; }
.sahm-watch-toast { position: fixed; bottom: 22px; right: 50%; transform: translateX(50%); z-index: 998; background: var(--invert-bg); color: var(--invert-fg); border-radius: var(--r-sm); padding: 11px 22px; font-size: 12.5px; font-weight: 600; box-shadow: 0 14px 34px -10px rgba(0,0,0,.4); max-width: 90vw; text-align: center; }

/* تبويبات الوحدات */
.sahm-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); padding: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sahm-tab { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; border: 1.5px solid transparent; background: none; border-radius: var(--r-sm); padding: 9px 14px; font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--ink); cursor: pointer; transition: .13s; white-space: nowrap; min-width: 78px; }
.sahm-tab:hover { background: var(--brand-soft); }
.sahm-tab.is-active { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.sahm-tab .sahm-key { display: none; }
.sahm-tab .sahm-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-deep); padding: 6px; border: 1px solid var(--border); }
.sahm-tab .sahm-cost { font-style: normal; font-size: 9.5px; font-weight: 700; border-radius: 3px; padding: 1px 9px; background: var(--gold-soft); color: var(--gold); transform: rotate(-1.5deg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sahm-tab .sahm-free { background: var(--brand-soft); color: var(--brand-deep); border-radius: 5px; padding: 1px 8px; font-size: 9.5px; }
.sahm-stage, .sahm-module-stage { min-height: 100px; }

/* مؤشرات KPI */
.sahm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 13px; margin: 0 0 16px; }
.sahm-kpi { border-radius: var(--r-sm); padding: 12px 14px; position: relative; }
.sahm-kpi span { display: block; font-size: 10.5px; color: var(--soft); font-weight: 700; margin-bottom: 3px; }
.sahm-kpi b { font-size: 17px; font-weight: 600; color: var(--ink); font-family: var(--mono); }
.sahm-kpi.k-amber { background: #fff8d4; }
.sahm-kpi.k-amber::after { content: "📌"; position: absolute; top: -11px; inset-inline-end: 10px; font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.sahm-kpi.k-amber b { color: var(--brand-deep); }
.sahm-kpi.k-green { background: var(--brand-soft); }
.sahm-kpi.k-green b { color: var(--brand-deep); }
.sahm-kpi.k-red { background: var(--red-soft); }
.sahm-kpi.k-red b { color: var(--red); }

/* رسوم بيانية */
.sahm-chart-box { padding: 14px 16px; margin-top: 14px; }
.sahm-chart-host { position: relative; width: 100%; height: 300px; }
.sahm-chart-host canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.sahm-chart-box h4 { margin: 0 0 10px; }
.sahm-charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sahm-charts-2 .sahm-chart-box { margin-top: 14px; }
.sahm-matrix-box { padding: 14px; }

/* إشارات النماذج */
.sahm-signals { display: flex; flex-wrap: wrap; gap: 9px; margin: 6px 0 12px; }
.sahm-signal { border-radius: 6px; padding: 5px 15px; font-size: 12px; font-weight: 700; background: var(--navy-soft); color: var(--navy); border: 1.5px solid var(--navy); }
.sahm-signal.safe { background: var(--brand-soft); color: var(--brand-deep); border-color: var(--brand-deep); }
.sahm-signal.warn { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.sahm-signal.distress { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* ---------- مساحة عمل المحلل ---------- */
.sahm-ws-hero { display: flex; align-items: center; gap: 18px; background: var(--card); color: var(--ink); border: 1.5px solid var(--border); border-radius: var(--r); padding: 20px 24px; margin-bottom: 20px; box-shadow: var(--sh); position: relative; }
.sahm-ws-hero::after { content: "📌"; position: absolute; top: -13px; inset-inline-start: 22px; font-size: 18px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.sahm-ws-hero h1 { margin: 0; font-size: 19px; font-weight: 700; display: inline-block; border-bottom: 4px solid var(--brand); transform: rotate(-.5deg); }
.sahm-ws-hero p { margin: 8px 0 0; font-size: 12.5px; color: var(--soft); }
.sahm-ws-hero { padding-left: 116px !important; }
.sahm-ws-hero > div { position: relative; z-index: 1; }
.sahm-ws-count { position: absolute !important; z-index: 0; left: 30px !important; right: auto !important; inset-inline-end: auto; top: 50%; transform: translateY(-50%) rotate(-2deg); font-family: var(--mono); font-size: 44px; font-weight: 600; color: var(--brand-soft); -webkit-text-stroke: 1.5px var(--brand); line-height: 1; pointer-events: none; opacity: .9; margin: 0 !important; }
@media (max-width: 700px) { .sahm-ws-hero { padding-left: 24px !important; } .sahm-ws-count { display: none !important; } }

.sahm-ws-gtitle { margin: 22px 2px 12px; font-size: 12.5px; font-weight: 700; color: var(--soft); display: flex; align-items: center; gap: 12px; }
.sahm-ws-gtitle::after { content: ""; flex: 1; border-bottom: 1.5px dashed var(--line); }
.sahm-ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sahm-ws-card { display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "ic body" "ic foot"; gap: 4px 13px; align-items: start; text-align: right; padding: 14px 16px; cursor: pointer; font-family: var(--sans); transition: .13s; position: relative; }
.sahm-ws-card:hover { transform: translate(-1px, -2px); box-shadow: var(--sh-hover); }
.sahm-ws-ic { grid-area: ic; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; transition: .13s; border: 1.5px solid var(--border); }
.sahm-ws-card:hover .sahm-ws-ic { background: var(--brand-soft); color: var(--brand-deep); transform: rotate(-3deg); }
.sahm-ws-body { grid-area: body; min-width: 0; }
.sahm-ws-body b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.sahm-ws-body > span { display: block; font-size: 11.5px; line-height: 1.75; color: var(--soft); }
.sahm-ws-card .sahm-cost { grid-area: foot; width: fit-content; margin-top: 6px; border-radius: 3px; padding: 2px 10px; font-size: 10px; font-weight: 700; font-style: normal; background: var(--gold-soft); color: var(--gold); transform: rotate(-1.5deg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sahm-ws-card .sahm-cost.sahm-free { background: var(--brand-soft); color: var(--brand-deep); transform: none; box-shadow: none; border-radius: 5px; }
.sahm-ws-go { position: absolute; top: 14px; inset-inline-start: 13px; color: var(--faint); font-size: 16px; font-weight: 700; transition: .13s; }
.sahm-ws-card:hover .sahm-ws-go { color: var(--brand-deep); transform: translateX(-3px); }

.sahm-ws-bar { position: sticky; top: 8px; z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--topbar); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 7px 9px; margin-bottom: 18px; box-shadow: var(--sh); }
.sahm-ws-back { flex: 0 0 auto; border: 1.5px solid var(--border); border-radius: 8px; background: var(--brand-soft); color: var(--brand-deep); font-family: var(--sans); font-size: 12px; font-weight: 700; padding: 7px 14px; cursor: pointer; transition: .13s; white-space: nowrap; }
.sahm-ws-back:hover { transform: translate(-1px, -1px); box-shadow: var(--sh-soft); }
.sahm-ws-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sahm-ws-pills::-webkit-scrollbar { display: none; }
.sahm-ws-pill { flex: 0 0 auto; border: 1.5px solid transparent; border-radius: 8px; background: none; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--soft); padding: 6px 13px; cursor: pointer; transition: .13s; white-space: nowrap; }
.sahm-ws-pill:hover { color: var(--ink); border-color: var(--line); }
.sahm-ws-pill.is-on { background: var(--brand-soft); color: var(--brand-deep); outline: 2px dashed var(--brand); outline-offset: -2px; }
.sahm-tool-stage { display: none; }
.sahm-tool-stage.is-on { display: block; }

.sahm-compare-pickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 14px; }
.sahm-company-pick { width: 100%; }
.sahm-capm-pick { max-width: 420px; margin-bottom: 14px; }
.sahm-studio-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.sahm-studio-bar label { font-size: 12px; color: var(--soft); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.sahm-studio-bar select.sahm-input { max-width: 210px; }

.sahm-pf-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.sahm-pf-chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); background: var(--card); border-radius: var(--r-sm); padding: 6px 8px 6px 12px; font-size: 12px; box-shadow: var(--sh-soft); }
.sahm-pf-chip .sahm-pf-w { max-width: 60px; padding: 4px 7px; text-align: left; border-radius: 7px; }
.sahm-pf-x { border: 1.5px solid var(--border); background: var(--red-soft); color: var(--red); width: 22px; height: 22px; border-radius: 7px; font-size: 12px; cursor: pointer; line-height: 1; }
.sahm-pf-x:hover { background: var(--red); color: #fff; }

.sahm-calc { display: grid; grid-template-columns: 310px 1fr; gap: 16px; align-items: start; margin-bottom: 12px; }
.sahm-calc-in { background: var(--head); border: 1.5px dashed var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.sahm-calc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sahm-calc-row:last-of-type { border-bottom: 0; }
.sahm-calc-row label { font-size: 11.5px; color: var(--soft); flex: 1; }
.sahm-calc-row .sahm-input { max-width: 105px; padding: 6px 9px; text-align: left; }
.sahm-calc-out { min-width: 0; }
.sahm-calc-big { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 10px; box-shadow: var(--sh-soft); }
.sahm-calc-big span { font-size: 12px; color: var(--soft); font-weight: 700; }
.sahm-calc-big b { font-family: var(--mono); font-feature-settings: "tnum" 1; font-size: 19px; color: var(--ink); }
.sahm-calc-big.sahm-calc-main { background: #fff8d4; position: relative; }
.sahm-calc-big.sahm-calc-main::after { content: "📌"; position: absolute; top: -11px; inset-inline-end: 12px; font-size: 14px; }
.sahm-calc-big.sahm-calc-main b { color: var(--brand-deep); font-size: 23px; }
.sahm-growth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.sahm-growth-grid .sahm-calc-big { margin-top: 10px; }

.sahm-sld-row { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.sahm-sld-row:last-of-type { border-bottom: 0; }
.sahm-sld-row label { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--soft); font-weight: 700; margin-bottom: 6px; }
.sahm-sld-row label b { color: var(--brand-deep); font-size: 13px; }
.sahm-sld-row input[type="range"] { width: 100%; accent-color: var(--brand); }

/* الإشارات الحمراء */
.sahm-flags { display: flex; flex-direction: column; gap: 11px; margin-top: 8px; }
.sahm-flag { display: grid; grid-template-columns: 195px 1fr; gap: 13px; align-items: baseline; border-radius: var(--r-sm); padding: 12px 15px; font-size: 12.5px; position: relative; padding-inline-start: 20px; box-shadow: var(--sh-soft); }
.sahm-flag::before { content: ""; position: absolute; inset-inline-start: 6px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--line); }
.sahm-flag b { font-size: 12.5px; }
.sahm-flag span { color: var(--soft); font-size: 12px; }
.sahm-flag.is-ok::before { background: var(--brand); }
.sahm-flag.is-ok b { color: var(--brand-deep); }
.sahm-flag.is-warn::before { background: var(--gold); }
.sahm-flag.is-warn b { color: var(--gold); }
.sahm-flag.is-bad::before { background: var(--red); }
.sahm-flag.is-bad b { color: var(--red); }

/* الذكاء الاصطناعي + الشرح */
.sahm-ai-q { width: 100%; max-width: 760px; resize: vertical; font-family: var(--sans); line-height: 1.8; border-radius: var(--r-sm); }
.sahm-ai-bar { display: flex; align-items: center; gap: 14px; margin: 12px 0 6px; flex-wrap: wrap; }
.sahm-ai-answer { border-inline-start: 4px solid var(--brand); padding: 16px 20px; margin-top: 14px; max-width: 860px; }
.sahm-ai-answer p { margin: 0 0 12px; line-height: 1.95; font-size: 13.5px; }
.sahm-ai-answer p:last-child { margin-bottom: 0; }
.sahm-explain { padding: 16px 18px; margin: 4px 0 18px; }
.sahm-explain-item { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sahm-explain-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.sahm-explain-no { width: 25px; height: 25px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 700; margin-top: 2px; transform: rotate(-3deg); }
.sahm-explain-item b { font-size: 13px; color: var(--ink); }
.sahm-explain-item p { margin: 3px 0 0; font-size: 12.5px; line-height: 2; color: var(--soft); }

/* ---------- دليل الشركات + الحساب ---------- */
.sahm-companies-wrap { min-width: 0; }
.sahm-company-search { width: 100%; max-width: 420px; margin-bottom: 14px; padding: 12px 15px; border-radius: var(--r-sm); }
.sahm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sahm-serial-row { display: flex; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.sahm-serial-input { flex: 1; min-width: 200px; font-family: var(--mono); }
.sahm-serial-msg { margin-top: 8px; }
.sahm-status-cell { font-weight: 700; color: var(--brand-deep); }
.sahm-status-warn { color: var(--gold); }
.sahm-balance-big { font-family: var(--mono); font-feature-settings: "tnum" 1; font-size: 30px; font-weight: 600; color: var(--brand-deep); }
.sahm-balance-big small { font-size: 12px; color: var(--soft); font-family: var(--sans); }
.sahm-auth-link { background: none; border: 0; padding: 0; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--brand-deep); cursor: pointer; }
.sahm-auth-link:hover { text-decoration: underline; }

/* ---------- التذييل: حاشية الدفتر ---------- */
.sahm-footer { border-top: 1.5px solid var(--border); background: var(--card); margin-top: auto; }
.sahm-footer-in { max-width: 1220px; margin: 0 auto; padding: 9px 24px; display: flex; gap: 20px; align-items: center; font-size: 11.5px; color: var(--soft); flex-wrap: wrap; }
.sahm-ready { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-deep); font-weight: 700; }
.sahm-ready::before { content: "✓"; color: var(--brand); font-weight: 900; }
.sahm-footer .warn { color: var(--gold); }
.sahm-footer-side { margin-inline-start: auto; display: flex; gap: 16px; }

/* ---------- نافذة الدخول ---------- */
.sahm-auth-overlay { position: fixed; inset: 0; z-index: 999; background: rgba(43,43,38,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; overflow-y: auto; }
.sahm-auth-overlay[hidden] { display: none; }
.sahm-auth-modal { position: relative; width: 100%; max-width: 408px; background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; box-shadow: 8px 8px 0 rgba(43,43,43,.22); padding: 26px 24px 22px; animation: sahmpop .22s ease; }
.sahm-auth-modal::before { content: "📌"; position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(50%); font-size: 20px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
@keyframes sahmpop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.sahm-auth-x { position: absolute; top: 13px; inset-inline-start: auto; inset-inline-end: 13px; z-index: 5; width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); color: var(--soft); font-size: 15px; cursor: pointer; line-height: 1; }
.sahm-auth-x:hover { background: var(--red-soft); color: var(--red); }
.sahm-auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sahm-auth-head b { font-size: 18px; color: var(--ink); display: block; line-height: 1.3; }
.sahm-auth-head span { font-size: 10.5px; color: var(--soft); }
.sahm-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--head); border: 1.5px dashed var(--border); border-radius: var(--r-sm); padding: 4px; margin-bottom: 16px; }
.sahm-auth-tabs button { border: 1.5px solid transparent; border-radius: 7px; background: none; font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--soft); padding: 8px; cursor: pointer; transition: .13s; }
.sahm-auth-tabs button.is-on { background: var(--card); color: var(--brand-deep); border-color: var(--border); box-shadow: var(--sh-soft); }
.sahm-auth-form { display: none; }
.sahm-auth-form.is-on { display: block; }
.sahm-auth-form label { display: block; font-size: 12px; font-weight: 700; color: var(--soft); margin-bottom: 12px; }
.sahm-auth-form label input { display: block; width: 100%; margin-top: 5px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; font-family: var(--sans); font-size: 13.5px; color: var(--ink); transition: .13s; }
.sahm-auth-form label input:focus { outline: 2px dashed var(--brand); outline-offset: 2px; }
.sahm-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 13px; }
.sahm-auth-check { display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important; font-size: 11.5px !important; cursor: pointer; }
.sahm-auth-check input { width: auto !important; margin: 0 !important; accent-color: var(--brand); }
.sahm-auth-submit { width: 100%; justify-content: center; }
.sahm-auth-msg { margin: 11px 0 0; font-size: 12px; min-height: 1em; color: var(--soft); text-align: center; }
.sahm-auth-msg.is-err { color: var(--red); font-weight: 700; }
.sahm-auth-msg.is-ok { color: var(--brand-deep); font-weight: 700; }
.sahm-hp { position: absolute !important; opacity: 0; height: 0; width: 0; pointer-events: none; }

/* ---------- التنبيهات: ملاحظات لاصقة ---------- */
.sahm-toaster { position: fixed; bottom: 22px; right: 50%; transform: translateX(50%); z-index: 1200; display: flex; flex-direction: column-reverse; gap: 10px; align-items: center; pointer-events: none; max-width: min(560px, 92vw); }
.sahm-toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; background: var(--card); color: var(--ink); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 13px 22px; font-family: var(--sans); font-size: 13.5px; font-weight: 700; line-height: 1.9; box-shadow: 5px 5px 0 rgba(43,43,43,.2); animation: sahmpop .22s ease; cursor: pointer; max-width: 100%; text-align: center; transform: rotate(-.5deg); }
.sahm-toast::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); border: 1.5px solid var(--border); }
.sahm-toast.is-ok { background: #f2fbf4; }
.sahm-toast.is-ok::before { background: var(--brand); }
.sahm-toast.is-err { background: var(--red-soft); }
.sahm-toast.is-err::before { background: var(--red); }
.sahm-toast.is-info { background: var(--sticky-blue); }
.sahm-toast.is-info::before { background: var(--navy); }
.sahm-toast.is-out { opacity: 0; transform: translateY(8px) rotate(-.5deg); transition: .35s; }

/* مربع التأكيد */
.sahm-confirm-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(43,43,38,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; }
.sahm-confirm-overlay.is-out { opacity: 0; transition: .18s; }
.sahm-confirm { width: 100%; max-width: 360px; background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; box-shadow: 8px 8px 0 rgba(43,43,43,.22); padding: 24px 22px 20px; text-align: center; animation: sahmpop .2s ease; position: relative; }
.sahm-confirm-ic { width: 44px; height: 44px; border-radius: 3px; background: var(--tape); color: #4a3d08; display: grid; place-items: center; font-size: 19px; margin: 0 auto 12px; transform: rotate(-2deg); box-shadow: 0 2px 5px rgba(0,0,0,.16); }
.sahm-confirm p { margin: 0 0 16px; font-size: 13.5px; color: var(--ink); line-height: 1.95; }
.sahm-confirm-acts { display: flex; gap: 10px; justify-content: center; }
.sahm-confirm-cancel { border: 1.5px solid var(--border); background: var(--card); color: var(--soft); border-radius: var(--r-sm); font-family: var(--sans); font-size: 13px; font-weight: 700; padding: 10px 22px; cursor: pointer; transition: .13s; box-shadow: var(--sh-soft); }
.sahm-confirm-cancel:hover { color: var(--red); transform: translate(-1px, -1px); }

/* تنسيق الأرقام داخل القوائم */
.sahm-numfmt { flex: 0 0 auto; border: 1.5px solid var(--border); background: var(--card); color: var(--soft); border-radius: var(--r-sm); font-family: var(--sans); font-size: 11.5px; font-weight: 700; padding: 7px 10px; cursor: pointer; transition: .13s; box-shadow: var(--sh-soft); }
.sahm-numfmt:hover, .sahm-numfmt:focus { color: var(--brand-deep); outline: none; }
.sahm-numfmt-bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin: 0 0 10px; }
.sahm-numfmt-bar > span { font-size: 11px; color: var(--soft); font-weight: 700; }
.sahm-stmt-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 16px 0 10px; }
.sahm-stmt-head .sahm-h3 { margin: 0; }
.sahm-stmt-head .sahm-numfmt-bar { margin: 0; }

/* حارس الإيموجي */
.sahm-app img.emoji, .sahm-app img.wp-smiley { width: 1.1em !important; height: 1.1em !important; display: inline-block; vertical-align: -0.12em; margin: 0 2px; border: 0; box-shadow: none; }

/* ---------- سهم 2.0 ---------- */
.sahm-qs-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.sahm-qs-gauge { position: relative; flex: 0 0 auto; }
.sahm-qs-gauge svg { width: 100%; height: 100%; display: block; }
.sahm-qs-gauge-t { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; gap: 1px; }
.sahm-qs-gauge-t b { font-size: 24px; color: var(--brand-deep); line-height: 1; font-family: var(--mono); }
.sahm-qs-gauge-t span { font-size: 9.5px; color: var(--soft); }
.sahm-cv-w .sahm-qs-gauge-t b { font-size: 19px; }
html[data-sahm-theme="dark"] .sahm-qs-gauge-t b { color: var(--brand); }
.sahm-qs-pillars { display: flex; flex-direction: column; gap: 9px; margin: 6px 0 4px; }
.sahm-qs-p { display: grid; grid-template-columns: 200px 1fr 52px; align-items: center; gap: 12px; }
.sahm-qs-p > span { font-size: 12px; color: var(--soft); font-weight: 700; }
.sahm-qs-p > span i { font-style: normal; color: var(--faint); font-size: 10px; }
.sahm-qs-bar { height: 13px; border-radius: 7px; background: var(--head); border: 1.5px solid var(--border); overflow: hidden; }
.sahm-qs-bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--brand), var(--brand) 6px, #3f9670 6px, #3f9670 12px); }
.sahm-qs-p > b { font-size: 13px; color: var(--ink); text-align: left; font-family: var(--mono); }
.sahm-qs-trend { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding: 4px 2px 0; }
.sahm-qs-ty { flex: 1; max-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.sahm-qs-ty i { width: 100%; border: 1.5px solid var(--border); border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--brand-soft); min-height: 4px; }
.sahm-qs-ty span { font-size: 9.5px; color: var(--faint); }
.sahm-qs-ty b { font-size: 11px; color: var(--brand-deep); font-family: var(--mono); }

.sahm-sim { position: relative; display: inline-block; min-width: 110px; padding: 2px 8px; border-radius: 6px; background: var(--head); border: 1px solid var(--border); overflow: hidden; }
.sahm-sim i { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: var(--brand-soft); }
.sahm-sim b { position: relative; }
.sahm-prem { color: var(--red) !important; font-weight: 700; }
.sahm-disc { color: var(--brand-deep) !important; font-weight: 700; }
.sahm-gap { background: var(--gold-soft); border: 1.5px solid var(--border); border-inline-start: 4px solid var(--gold); border-radius: var(--r-sm); padding: 11px 15px; font-size: 12.5px; margin-bottom: 10px; line-height: 1.95; box-shadow: var(--sh-soft); }

.sahm-moat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 6px 0 12px; }
.sahm-moat { border-inline-start: 5px solid var(--faint); border-radius: var(--r-sm); padding: 13px 15px; display: flex; flex-direction: column; gap: 5px; }
.sahm-moat b { font-size: 13px; color: var(--ink); }
.sahm-moat-v { font-size: 14px; color: var(--ink); }
.sahm-moat span { font-size: 11.5px; color: var(--soft); line-height: 1.8; }
.sahm-moat em { font-style: normal; font-size: 10.5px; font-weight: 700; width: fit-content; border-radius: 5px; padding: 2px 10px; background: var(--head); color: var(--soft); border: 1px solid var(--border); }
.sahm-moat.is-strong { border-inline-start-color: var(--brand); }
.sahm-moat.is-strong em { background: var(--brand-soft); color: var(--brand-deep); }
.sahm-moat.is-mid { border-inline-start-color: var(--gold); }
.sahm-moat.is-mid em { background: var(--gold-soft); color: var(--gold); }

.sahm-heat { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.sahm-heat-cell { display: flex; flex-direction: column; justify-content: center; gap: 1px; border-radius: 8px; padding: 8px 12px; color: #fff !important; min-width: 72px; text-align: center; transition: .13s; border: 1.5px solid var(--border); box-shadow: var(--sh-soft); }
.sahm-heat-cell:hover { transform: translate(-1px, -2px); }
.sahm-heat-cell b { font-size: 13px; font-weight: 600; }
.sahm-heat-cell span { font-size: 10px; opacity: .92; }
.sahm-heat-cell.hs-1 { min-width: 104px; padding: 13px 14px; }
.sahm-heat-cell.hs-3 { min-width: 60px; padding: 6px 9px; }
.sahm-heat-cell.hu-2 { background: var(--brand-deep); }
.sahm-heat-cell.hu-1 { background: #4a9e78; }
.sahm-heat-cell.hf-0 { background: #98968a; }
.sahm-heat-cell.hd-1 { background: #dd7a70; }
.sahm-heat-cell.hd-2 { background: var(--red); }

.sahm-recent { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.sahm-recent-chip { display: inline-flex; align-items: baseline; gap: 8px; border-radius: var(--r-sm); padding: 8px 14px; transition: .13s; color: var(--ink) !important; box-shadow: var(--sh-soft); }
.sahm-recent-chip:hover { transform: translate(-1px, -1px); box-shadow: var(--sh); }
.sahm-recent-chip b { color: var(--brand-deep); font-weight: 600; font-size: 12.5px; }
.sahm-recent-chip span { font-size: 11.5px; color: var(--soft); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sahm-res-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin-bottom: 10px; }
.sahm-res-form { display: flex; flex-direction: column; gap: 8px; background: var(--head); border: 1.5px dashed var(--border); border-radius: var(--r-sm); padding: 12px; margin-bottom: 14px; }
.sahm-res-form-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
.sahm-res-form-row .sahm-input { flex: 1; min-width: 120px; }
.sahm-res-form-row select.sahm-input, .sahm-res-form-row input[type="date"] { flex: 0 0 auto; min-width: 0; }
.sahm-res-note { border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 11px; position: relative; }
.sahm-res-note::before { content: "📌"; position: absolute; top: -11px; inset-inline-start: 12px; font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.sahm-res-note-h { display: flex; align-items: center; gap: 9px; }
.sahm-res-note-h b { flex: 1; font-size: 13px; }
.sahm-res-note p { margin: 7px 0 4px; font-size: 12.5px; color: var(--soft); line-height: 1.95; white-space: pre-line; }
.sahm-res-note small { color: var(--faint); font-size: 9.5px; }
.sahm-res-item { display: flex; align-items: center; gap: 10px; border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 8px; font-size: 12.5px; box-shadow: var(--sh-soft); }
.sahm-res-item > span { flex: 1; }
.sahm-res-item.is-done > span { text-decoration: line-through; color: var(--faint); }
.sahm-res-toggle { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; cursor: pointer; line-height: 1; flex: 0 0 auto; }
.sahm-res-snap { display: flex; align-items: center; gap: 9px; border-style: dashed; border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 8px; font-size: 12px; box-shadow: none; }
.sahm-res-snap span { flex: 1; color: var(--soft); }
.sahm-res-snap small { color: var(--faint); }
.sahm-snap-btn { background: var(--navy); }

/* ============================================================
   باقات الاشتراك — بطاقات الأسعار
   ============================================================ */
.sahm-plan-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: stretch; padding-top: 6px; }
.sahm-plan-card {
  position: relative; flex: 1 1 250px; max-width: 320px; min-width: 240px;
  display: flex; flex-direction: column;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 24px 22px 20px; box-shadow: var(--sh-soft); cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.sahm-plan-card:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); border-color: var(--brand-line); }
.sahm-plan-card.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--sh); }
.sahm-plan-card.is-best { border-color: var(--brand-line); }
.sahm-plan-name { font-size: 12.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--soft); }
.sahm-plan-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.sahm-plan-price { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--ink); margin: 10px 0 0; line-height: 1.1; }
.sahm-plan-price .cur { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--soft); margin-inline-start: 6px; }
.sahm-plan-per { font-size: 12.5px; color: var(--soft); margin-top: 6px; }
.sahm-plan-save { align-self: flex-start; margin-top: 10px; font-size: 11.5px; font-weight: 800; color: var(--brand-deep); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 7px; padding: 2px 9px; }
.sahm-plan-cta {
  margin-top: 16px; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .2px;
  color: var(--brand-deep); background: var(--brand-soft); border: 1.5px solid var(--brand-line);
  border-radius: 10px; padding: 10px; transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.sahm-plan-card:hover .sahm-plan-cta,
.sahm-plan-card.sel .sahm-plan-cta { background: var(--brand); color: #fff; border-color: var(--brand); }
.sahm-plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 4px 14px; border-radius: 999px; white-space: nowrap; box-shadow: var(--sh-soft); z-index: 3;
}
@media (max-width: 560px) { .sahm-plan-card { max-width: 100%; flex-basis: 100%; } }

/* ============================================================
   طريقتا الاشتراك — وسم الطريقة + فاصل «أو»
   ============================================================ */
.sahm-method-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 3px 11px; border-radius: 999px; margin-bottom: 11px; }
.sahm-method-tag .n { font-family: var(--mono); font-weight: 700; }
.sahm-method-tag.is-pay { color: var(--brand-deep); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.sahm-method-tag.is-code { color: var(--gold); background: var(--gold-soft); border: 1px solid #e7d9a6; }
.sahm-or { display: flex; align-items: center; gap: 14px; margin: -4px 0 14px; color: var(--soft); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.sahm-or::before, .sahm-or::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }

/* ============================================================
   الوضع الداكن — «دفتر ليلي»
   ============================================================ */
html[data-sahm-theme="dark"] body.sahm-canvas,
html[data-sahm-theme="dark"] .sahm-app {
  --ink: #e9eae2;
  --border: #707a6f;
  --soft: #a6ab9d;
  --faint: #6e7468;
  --bg: #15191c;
  --grid: #1d2429;
  --grid2: #1a2126;
  --card: #1d2226;
  --line: #333a36;
  --cell: #2a312d;
  --head: #232927;
  --brand: #4fc08d;
  --brand-deep: #7cd9ad;
  --brand-soft: rgba(79,192,141,.14);
  --brand-line: rgba(79,192,141,.35);
  --navy: #6fb1de;
  --navy-soft: rgba(111,177,222,.14);
  --sticky-blue: #2a4356;
  --gold: #d9bc54;
  --gold-soft: rgba(217,188,84,.16);
  --tape: #d9c054;
  --red: #ef7f74;
  --red-soft: rgba(210,72,62,.18);
  --mark: rgba(255,210,80,.28);
  --sh: 4px 4px 0 rgba(0,0,0,.45);
  --sh-hover: 6px 6px 0 rgba(0,0,0,.5);
  --sh-soft: 2px 2px 0 rgba(0,0,0,.4);
  --topbar: rgba(21,25,28,.94);
  --hover: #232a2e;
  --invert-bg: #e9eae2;
  --invert-fg: #15191c;
  --chart-dim: #8d937f;
  --chart-line: #2b322e;
  --chart-tip-bg: #23221c;
  --chart-tip-ink: #e9e6da;
  --chart-tip-line: #4a4a3c;
}
html[data-sahm-theme="dark"] body.sahm-canvas { background:
  repeating-linear-gradient(180deg, transparent, transparent 27px, var(--grid) 27px, var(--grid) 28px),
  repeating-linear-gradient(90deg, transparent, transparent 27px, var(--grid2) 27px, var(--grid2) 28px),
  var(--bg); color: var(--ink); }
html[data-sahm-theme="dark"] .sahm-brand-text b { color: var(--ink); }
html[data-sahm-theme="dark"] .sahm-utility { background: #1d6f42; }
html[data-sahm-theme="dark"] .sahm-preview-badge { color: #2a230a !important; }
html[data-sahm-theme="dark"] .sahm-sec-no { color: #2a230a; }
html[data-sahm-theme="dark"] .sahm-confirm-ic { color: #2a230a; }
html[data-sahm-theme="dark"] .sahm-kpi.k-amber { background: rgba(217,188,84,.14); }
html[data-sahm-theme="dark"] .sahm-calc-big.sahm-calc-main { background: rgba(217,188,84,.14); }
html[data-sahm-theme="dark"] .sahm-toast.is-ok { background: #1e2b24; }
html[data-sahm-theme="dark"] .sahm-logo { filter: drop-shadow(2px 2px 0 rgba(0,0,0,.45)); }

/* ============================================================
   الاستجابة
   ============================================================ */
/* (أزيل إخفاء الوصف — له مكانه الدائم في الجانبية) */
@media (max-width: 1024px) {
  .sahm-main { padding: 18px 18px 52px; }
  .sahm-hero { grid-template-columns: 1fr 1fr; }
  .sahm-hero-card { grid-column: 1 / -1; }
  .sahm-lead { grid-template-columns: 1fr; }
  .sahm-rail { flex-direction: row; flex-wrap: wrap; }
  .sahm-rail .sahm-rpanel { flex: 1; min-width: 280px; }
  .sahm-compare-pickers { grid-template-columns: 1fr 1fr; }
  .sahm-calc { grid-template-columns: 1fr; }
  .sahm-charts-2 { grid-template-columns: 1fr; }
  .sahm-chart-host { height: 260px; }
  .sahm-chart-box { padding: 12px 10px; }
  .sahm-fn-grid { grid-template-columns: 1fr 1fr; }
  .sahm-ws-grid { grid-template-columns: 1fr 1fr; }
  .sahm-quote-strip { margin-inline-start: 0; justify-content: flex-start; width: 100%; }
  .sahm-res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  /* (أزيلت قاعدة صف-التنقل القديمة — التنقل صار في الجانبية) */
}
@media (max-width: 768px) {
  body.sahm-canvas { font-size: 13px; }
  .sahm-main { padding: 14px 12px 46px; }
  .sahm-topbar .sahm-wrapbar { gap: 10px; padding: 10px 14px 7px; }
  .sahm-sheets-in { padding: 5px 14px 8px; }
  .sahm-sheet-tab { padding: 5px 14px; font-size: 12.5px; }
  .sahm-utility { font-size: 10px; }
  .sahm-ucell { padding: 4px 9px; }
  .sahm-hero { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sahm-fn-grid { grid-template-columns: 1fr; }
  .sahm-ws-grid { grid-template-columns: 1fr; }
  .sahm-open-row { flex-direction: column; }
  .sahm-open-go { padding: 12px; }
  .sahm-sec-side { margin-inline-start: 0; width: 100%; }
  .sahm-terminal-head { padding: 14px; gap: 12px; }
  .sahm-ticker-badge { width: 46px; height: 46px; font-size: 12px; }
  .sahm-terminal-id h1 { font-size: 16.5px; }
  .sahm-quote-item { flex: 1; min-width: 96px; }
  .sahm-tabs { flex-wrap: nowrap; }
  .sahm-tab { min-width: 70px; padding: 8px 10px; }
  .sahm-kpis { grid-template-columns: 1fr 1fr; }
  .sahm-compare-pickers { grid-template-columns: 1fr; }
  .sahm-panel { padding: 14px; }
  .sahm-flag { grid-template-columns: 1fr; gap: 4px; }
  .sahm-table { min-width: 640px; }
  .sahm-grid-2 { grid-template-columns: 1fr; }
  .sahm-rail { flex-direction: column; }
  .sahm-studio-bar select.sahm-input { max-width: none; flex: 1; }
  .sahm-calc-big b { font-size: 17px; }
  .sahm-calc-big.sahm-calc-main b { font-size: 20px; }
  .sahm-auth-btn { padding: 8px 13px; font-size: 12px; }
  .sahm-qs-p { grid-template-columns: 130px 1fr 46px; }
  .sahm-heat-cell.hs-1 { min-width: 86px; }
}
@media (max-width: 480px) {
  .sahm-hero { grid-template-columns: 1fr; }
  .sahm-kpis { grid-template-columns: 1fr; }
  .sahm-quote-item { min-width: calc(50% - 5px); }
  .sahm-logo { width: 36px; height: 36px; }
  .sahm-brand-text b { font-size: 16px; }
  .sahm-btn { width: 100%; justify-content: center; }
  .sahm-btn-small, .sahm-ai-bar .sahm-btn { width: auto; }
  .sahm-auth-modal { padding: 22px 16px 18px; }
  .sahm-toaster { bottom: 14px; }
  .sahm-toast { font-size: 12px; padding: 10px 16px; }
}

/* ============================================================
   ملاحظاتي — زر عائم منتصف يمين + لوحة منزلقة كنافذة دردشة
   ============================================================ */
.sahm-notes-fab { position: fixed; inset-inline-end: 0; top: 50%; transform: translateY(-50%); z-index: 980;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--tape); color: #4a3d08; border: 1.5px solid var(--border); border-inline-end: 0;
  border-start-start-radius: 12px; border-end-start-radius: 12px; border-start-end-radius: 0; border-end-end-radius: 0; padding: 13px 10px;  cursor: pointer; font-family: var(--sans);
  box-shadow: -4px 4px 0 rgba(43,43,43,.18); transition: .15s; }
.sahm-notes-fab:hover { padding-inline-end: 14px; box-shadow: -5px 5px 0 rgba(43,43,43,.22); }
.sahm-notes-fab-ic { font-size: 17px; line-height: 1; }
.sahm-notes-fab-tx { writing-mode: vertical-rl; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.sahm-notes-fab.is-open { display: none; } /* يختفي عند فتح اللوحة؛ يعود بزرّ الإغلاق (5.32.79) */
.sahm-notes-fab.is-open .sahm-notes-fab-ic::before { content: ""; }

.sahm-notes-drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 970;
  width: min(380px, 92vw); display: flex; flex-direction: column;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 27px, var(--grid) 27px, var(--grid) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, var(--grid2) 27px, var(--grid2) 28px),
    var(--bg);
  border-inline-start: 1.5px solid var(--border); box-shadow: -10px 0 30px -12px rgba(43,43,43,.35);
  transform: translateX(105%); transition: transform .25s ease; }
.sahm-notes-drawer.is-open { transform: translateX(0); }
.sahm-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.sahm-notes-tape { background: var(--tape); color: #4a3d08; font-size: 13px; font-weight: 800; padding: 4px 16px; border-radius: 3px; transform: rotate(-1.5deg); box-shadow: 0 2px 5px rgba(0,0,0,.18); }
.sahm-notes-x { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); color: var(--soft); font-size: 15px; cursor: pointer; line-height: 1; box-shadow: var(--sh-soft); }
.sahm-notes-x:hover { background: var(--red-soft); color: var(--red); }
.sahm-notes-scope { display: flex; gap: 7px; padding: 0 16px 10px; flex-wrap: wrap; }
.sahm-notes-chip { border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); color: var(--soft); font-family: var(--sans); font-size: 11.5px; font-weight: 700; padding: 4px 14px; cursor: pointer; box-shadow: var(--sh-soft); transition: .13s; }
.sahm-notes-chip.is-on { background: var(--brand-soft); color: var(--brand-deep); outline: 2px dashed var(--brand); outline-offset: -2px; }
.sahm-notes-list { flex: 1; overflow-y: auto; padding: 6px 16px 10px; }
.sahm-notes-list .sahm-res-note { margin-top: 13px; margin-bottom: 0; }
.sahm-notes-compose { border-top: 1.5px dashed var(--border); padding: 12px 16px 14px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.sahm-notes-row { display: flex; gap: 8px; }
.sahm-notes-row select.sahm-input { flex: 0 0 auto; }
.sahm-notes-row input.sahm-input { flex: 1; min-width: 0; }
.sahm-notes-compose textarea.sahm-input { resize: vertical; font-family: var(--sans); }
.sahm-notes-save { justify-content: center; }

@media (max-width: 600px) {
  .sahm-notes-drawer { width: 100vw; }
  .sahm-notes-fab.is-open { right: auto; left: 8px; top: 12px; transform: none; border: 1.5px solid var(--border); border-radius: 10px; display: none; }
  .sahm-notes-fab-tx { font-size: 10px; }
}

/* ============================================================
   سهم 3.0 — لوحاتي: الشبكة، إطارات الودجتات، الأدراج
   ============================================================ */
.sahm-cv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.sahm-cv-list { display: flex; flex-direction: column; gap: 10px; }
.sahm-cv-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-soft); padding: 11px 15px; }
.sahm-cv-item b { flex: 1; font-size: 13.5px; }
.sahm-cv-item small { color: var(--faint); font-size: 10px; }
.sahm-cv-item-acts { display: flex; gap: 8px; align-items: center; }
.sahm-cv-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.sahm-cv-bar { flex-wrap: wrap; }
.sahm-cv-name { max-width: 220px; font-weight: 700; }
.sahm-cv-ctx { flex: 1; min-width: 180px; max-width: 320px; }
.sahm-cv-ctx .sahm-pick-results { top: calc(100% + 8px); }

.sahm-cv-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: stretch; }
.sahm-cv-empty { grid-column: 1 / -1; background: var(--head); border: 1.5px dashed var(--border); border-radius: var(--r); padding: 40px; text-align: center; color: var(--soft); }
.sahm-cv-w { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); display: flex; flex-direction: column; min-width: 0; position: relative; overflow: hidden; }
.sahm-cv-w.is-drag { opacity: .85; z-index: 5; box-shadow: var(--sh-hover); }
.sahm-cv-w-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px dashed var(--line); flex: 0 0 auto; }
.is-edit .sahm-cv-w-head { cursor: grab; background: var(--head); }
.sahm-cv-w-head b { flex: 1; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sahm-cv-w-acts { display: flex; gap: 5px; }
.sahm-cv-w-btn { width: 24px; height: 24px; border: 1.5px solid var(--border); border-radius: 7px; background: var(--card); color: var(--soft); cursor: pointer; font-size: 12px; line-height: 1; }
.sahm-cv-w-btn:hover { color: var(--brand-deep); }
.sahm-cv-w-body { flex: 1; padding: 10px 12px; overflow: auto; min-height: 0; font-size: 12.5px; }
.sahm-cv-w-rsz { position: absolute; bottom: 2px; inset-inline-start: 4px; cursor: nwse-resize; color: var(--faint); font-size: 13px; user-select: none; }
.sahm-cv-lock { text-align: center; padding: 18px 10px; color: var(--soft); }
.sahm-cv-lock span { font-size: 22px; display: block; margin-bottom: 6px; }

.sahm-wq { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; }
.sahm-wq-i span { display: block; font-size: 9.5px; color: var(--soft); font-weight: 700; }
.sahm-wq-i b { font-size: 14px; color: var(--ink); }
.sahm-wq-i:first-child b { color: var(--brand-deep); }

.sahm-cv-drawer { position: fixed; top: 0; bottom: 0; right: 0; z-index: 975; width: min(400px, 94vw); display: flex; flex-direction: column;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 27px, var(--grid) 27px, var(--grid) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, var(--grid2) 27px, var(--grid2) 28px),
    var(--bg);
  border-inline-start: 1.5px solid var(--border); box-shadow: -10px 0 30px -12px rgba(43,43,43,.35);
  transform: translateX(105%); transition: transform .25s ease; }
.sahm-cv-drawer.is-open { transform: translateX(0); }
.sahm-cv-drawer-body { flex: 1; overflow-y: auto; padding: 6px 16px 16px; }
.sahm-cv-gal-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; text-align: right; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--sh-soft); padding: 10px 14px; margin-bottom: 8px; cursor: pointer; font-family: var(--sans); transition: .13s; }
.sahm-cv-gal-item:hover { transform: translate(-1px, -1px); box-shadow: var(--sh); }
.sahm-cv-gal-item b { font-size: 12.5px; color: var(--ink); }
.sahm-cv-gal-item span { font-size: 10px; color: var(--faint); font-family: var(--mono); }
.sahm-s-frow .sahm-input { min-width: 0; }
.sahm-s-frow select.s-op { flex: 0 0 64px; }
.sahm-s-cols { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.sahm-s-col { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); padding: 3px 11px; font-size: 11px; cursor: pointer; box-shadow: var(--sh-soft); }
.sahm-s-col input { accent-color: var(--brand); margin: 0; }

@media (max-width: 900px) {
  .sahm-cv-grid { grid-template-columns: 1fr; }
  .sahm-cv-w { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 140px; }
  .sahm-cv-grid { grid-template-rows: none !important; }
  .sahm-cv-tpls { grid-template-columns: 1fr; }
  .sahm-cv-name { max-width: none; flex: 1; }
}

/* إنفاذ سمة hidden مهما علت خصوصية display للمكونات */
.sahm-app [hidden], .sahm-cv-drawer[hidden], .sahm-notes-drawer[hidden], [hidden].sahm-btn, [hidden].sahm-ws-back { display: none !important; }
/* أدراج اللوحات فوق لسان «ملاحظاتي» العائم كي لا يتراكب عليها */
.sahm-cv-drawer { z-index: 990; }

/* ===== لوحاتي: سحب سلس + تحجيم من كل الحواف والأركان ===== */
.sahm-cv-w { transition: box-shadow .13s; }
.sahm-cv-w.is-drag { transition: none; will-change: transform; z-index: 8; opacity: .92; box-shadow: var(--sh-hover); cursor: grabbing; }
.sahm-cv-w.is-rsz { transition: none; z-index: 7; }
.is-edit .sahm-cv-w-head { touch-action: none; }
.sahm-cv-ghost { border: 2px dashed var(--brand); background: var(--brand-soft); border-radius: var(--r); opacity: .65; pointer-events: none; z-index: 2; }
.sahm-cv-h { position: absolute; z-index: 4; touch-action: none; }
.sahm-cv-h.h-n { top: -4px; right: 12px; left: 12px; height: 9px; cursor: ns-resize; }
.sahm-cv-h.h-s { bottom: -4px; right: 12px; left: 12px; height: 9px; cursor: ns-resize; }
.sahm-cv-h.h-e { right: -4px; top: 12px; bottom: 12px; width: 9px; cursor: ew-resize; }
.sahm-cv-h.h-w { left: -4px; top: 12px; bottom: 12px; width: 9px; cursor: ew-resize; }
.sahm-cv-h.h-ne { top: -5px; right: -5px; width: 15px; height: 15px; cursor: nesw-resize; }
.sahm-cv-h.h-nw { top: -5px; left: -5px; width: 15px; height: 15px; cursor: nwse-resize; }
.sahm-cv-h.h-se { bottom: -5px; right: -5px; width: 15px; height: 15px; cursor: nwse-resize; }
.sahm-cv-h.h-sw { bottom: -5px; left: -5px; width: 15px; height: 15px; cursor: nesw-resize; }
.sahm-cv-h.h-ne::after, .sahm-cv-h.h-nw::after, .sahm-cv-h.h-se::after, .sahm-cv-h.h-sw::after {
  content: ""; position: absolute; inset: 4px; border-radius: 3px; background: var(--brand); border: 1px solid var(--border); opacity: 0; transition: opacity .12s; }
.sahm-cv-w:hover .sahm-cv-h::after { opacity: .85; }
.sahm-cv-w-rsz { display: none; }

/* ===== نموذج الاشتراك ===== */
.sahm-prem { color: var(--gold); font-weight: 700; }
a.sahm-credits-pill { text-decoration: none; cursor: pointer; }
a.sahm-credits-pill:hover { border-color: var(--brand); color: var(--brand-deep); }

/* الشريط العلوي المدمج: العلامة تفسح بدل أن تتراكب على التبويبات */
.sahm-brand { flex: 0 1 auto; min-width: 0; }
.sahm-brand-text { min-width: 0; }
/* (أزيلت قاعدة القصاصة القديمة — الوصف يلتف داخل الجانبية) */
@media (max-width: 1366px) { .sahm-brand-sub { display: none; } }

/* لقطات الأدوات داخل درج ملاحظاتي */
.sahm-notes-snaps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line); }

/* فتح اللقطة داخل الدرج */
.sahm-snap-head { cursor: pointer; user-select: none; }
.sahm-snap-head:hover { border-color: var(--brand); }
.sahm-snap-caret { font-style: normal; color: var(--gold); display: inline-block; width: 12px; }
.sahm-snap-body { background: var(--cell); border: 1.5px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 12px; font-size: 12px; margin-top: -6px; }
.sahm-snap-body .sahm-qs-gauge { margin-inline: auto; }

/* بوابة الاشتراك لصفحة كاملة */
.sahm-sub-gate { max-width: 640px; margin: 40px auto; text-align: center; padding: 34px 30px; }
.sahm-sub-gate-star { width: 58px; height: 58px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 30px; color: var(--gold); background: var(--cell); border: 1.5px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 rgba(43,43,43,.14); transform: rotate(-6deg); }
.sahm-sub-gate h2 { margin: 0 0 6px; }
.sahm-sub-gate-list { list-style: none; padding: 0; margin: 16px auto 20px; max-width: 460px; text-align: right; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sahm-sub-gate-list li { padding-inline-start: 4px; }
.sahm-sub-gate-list li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* دعوة الاشتراك مكان وسم المميز */
.sahm-prem-cta { color: var(--gold); font-weight: 700; font-size: 11.5px; text-decoration: none; border-bottom: 1.5px dashed var(--gold); padding-bottom: 1px; }
.sahm-prem-cta:hover { color: var(--brand-deep); border-color: var(--brand); }

/* ===== سهم 4.0 — طبقة ذكاء البحث ===== */
.sahm-intel-banner { border: 1.5px solid var(--gold); background: color-mix(in srgb, var(--tape) 26%, var(--card)); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; box-shadow: 3px 3px 0 rgba(43,43,43,.12); }
.sahm-intel-head { display: flex; align-items: center; gap: 10px; }
.sahm-intel-head b { color: var(--gold); }
.sahm-intel-head .sahm-pf-x { margin-inline-start: auto; }
.sahm-intel-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sahm-intel-row { font-size: 12.5px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sahm-intel-row small { flex-basis: 100%; }
.sahm-intel-hint { font-size: 11px; border: 1px dashed var(--gold); border-radius: 8px; padding: 5px 12px; margin-bottom: 12px; }
.sahm-story-head { font-size: 15px; margin-bottom: 10px; }
.sahm-story-ch { border-inline-start: 3px solid var(--brand); padding: 4px 14px 4px 0; margin: 14px 0; }
.sahm-story-ch h4 { margin: 0 0 6px; color: var(--brand-deep); }
.sahm-story-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-family: var(--mono); }
.sahm-story-ch p { margin: 4px 0; line-height: 1.95; font-size: 13.5px; }
.sahm-story-ref { font-size: 11px; color: var(--gold); margin-top: 4px; }
.sahm-story-basis { border-top: 1.5px dashed var(--line); padding-top: 10px; margin-top: 16px; font-size: 11.5px; }
.sahm-replay-day { position: sticky; top: 0; background: var(--cell); border: 1.5px solid var(--line); display: inline-block; padding: 2px 12px; border-radius: 99px; font-size: 11px; margin: 14px 0 6px; }
.sahm-replay-ev { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sahm-replay-ic { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--card); font-size: 13px; color: var(--brand-deep); }
.sahm-replay-bd { min-width: 0; flex: 1; }
.sahm-replay-bd p { margin: 3px 0 0; font-size: 12.5px; }
.sahm-btn-mini { font-size: 11px; padding: 2px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--cell); cursor: pointer; margin-top: 5px; font-family: inherit; }
.sahm-xpl-val { font-size: 26px; margin-bottom: 6px; }
.sahm-xpl-val b { color: var(--brand-deep); }
.sahm-xpl-f { background: var(--cell); border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.sahm-xpl-steps ol { margin: 10px 0 0; padding: 0; list-style-position: inside; }
.sahm-xpl-steps li { margin: 6px 0; font-size: 13px; text-align: center; direction: ltr; background: var(--cell); border: 1px dashed var(--line); border-radius: 8px; padding: 7px 12px; }
.sahm-ai-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sahm-chip { border: 1.5px solid var(--ink); background: var(--card); border-radius: 99px; padding: 4px 14px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink); }
.sahm-chip.is-on { background: var(--brand); color: #fff; border-color: var(--brand-deep, var(--brand)); box-shadow: 2px 2px 0 rgba(43,43,43,.18); }

/* ===== سهم 4.1 — الشريط العائم للأدوات (عمودي على يسار الصفحة) ===== */
.sahm-dock-wrap { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 980; pointer-events: none; }
.sahm-dock { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 rgba(43,43,43,.18); padding: 10px 8px; max-height: 88vh; }
html[data-sahm-theme="dark"] .sahm-dock { box-shadow: 4px 4px 0 rgba(0,0,0,.5); }
.sahm-dock-scroll { display: none; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; max-height: 62vh; padding-inline: 1px; }
.sahm-dock-open-only { display: none; }
.sahm-dock.open .sahm-dock-scroll { display: flex; }
.sahm-dock.open .sahm-dock-open-only { display: block; }
.sahm-dock.open .sahm-dock .arrow { transition: .2s; display: inline-block; font-style: normal; }
.sahm-dock.open .arrow { transform: rotate(180deg); }
.sahm-dock-sep { height: 1.5px; width: 26px; background: var(--line); margin: 5px 0; flex: 0 0 auto; }
.sahm-dock-it { position: relative; flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid transparent; border-radius: 11px; color: var(--ink); transition: .15s; text-decoration: none; }
.sahm-dock-it:hover { background: var(--cell); border-color: var(--ink); transform: translateX(3px); }
.sahm-dock-it svg { width: 21px; height: 21px; }
.sahm-dock-it.is-intel { color: var(--gold); }
.sahm-dock-tipbox { position: fixed; transform: translate(0, -50%) rotate(-1.5deg); background: var(--tape); color: #2b2b2b; border: 1.5px solid #2b2b2b; font-size: 11.5px; font-weight: 700; padding: 4px 12px; white-space: nowrap; border-radius: 3px; box-shadow: 2px 2px 0 rgba(43,43,43,.22); pointer-events: none; z-index: 1200; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.sahm-dock-tipbox[hidden] { display: none; }
.sahm-dock-handle { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: transparent; cursor: pointer; font-family: inherit; color: var(--brand-deep); font-weight: 700; font-size: 11px; padding: 2px; }
.sahm-dock-handle .grip { width: 32px; height: 32px; border: 1.5px solid var(--ink); border-radius: 9px; display: grid; place-items: center; background: var(--cell); box-shadow: 2px 2px 0 rgba(43,43,43,.14); transform: rotate(-3deg); font-size: 16px; }
@media (max-width: 640px) { .sahm-dock-wrap { left: 8px; } .sahm-dock-scroll { max-height: 52vh; } .sahm-dock-it { width: 38px; height: 38px; } .sahm-dock-handle .lbl { display: none; } }
@media print { .sahm-dock-wrap { display: none !important; } }
/* الصفحات القانونية + روابط التذييل */
.sahm-legal { max-width: 840px; margin-inline: auto; }
.sahm-legal h3 { color: var(--brand-deep); margin: 22px 0 6px; font-size: 15.5px; }
.sahm-legal p { line-height: 2.05; font-size: 13.5px; margin: 0; }
.sahm-footer-legal { display: flex; gap: 6px; flex-wrap: wrap; }
.sahm-footer-legal a { color: var(--soft); text-decoration: none; border-bottom: 1px dashed var(--line); }
.sahm-footer-legal a:hover { color: var(--brand-deep); border-color: var(--brand); }

/* مصفوفة الافتراضات السنوية (وحدة التوقعات) */
.sahm-amx-wrap { margin: 18px 0; }
.sahm-amx-scroll { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--sh-soft, 3px 3px 0 rgba(43,43,43,.12)); }
.sahm-amx { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 860px; }
.sahm-amx th, .sahm-amx td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.sahm-amx thead th { background: var(--cell); border-bottom: 1.5px solid var(--ink); }
.sahm-amx th:first-child, .sahm-amx td:first-child { position: sticky; right: 0; background: var(--card); text-align: right; border-inline-start: 1px solid var(--line); min-width: 180px; z-index: 1; }
.sahm-amx thead th:first-child { background: var(--cell); }
.sahm-amx-g td { background: color-mix(in srgb, var(--tape) 22%, var(--card)) !important; color: var(--gold); font-weight: 700; text-align: right !important; font-size: 11.5px; }
.sahm-amx tbody tr:hover td { background: var(--cell); }
.sahm-amx tbody tr:hover td:first-child { background: var(--cell); }

/* ===== سهم 5.1 — استوديو النمذجة بواجهة Excel ===== */
.sahm-xlstudio { padding: 0; overflow: hidden; }
.sahm-xlstudio > .sahm-panel-head { padding: 16px 18px 10px; }
.sahm-xl-title { display: flex; align-items: center; gap: 8px; padding: 5px 14px; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); background: var(--cell); }
.sahm-xl-logo { width: 21px; height: 21px; border: 1.5px solid var(--ink); border-radius: 7px; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: 'Amiri', serif; font-weight: 700; transform: rotate(-3deg); }
.sahm-xl-name { font-size: 12.5px; border: 1px dashed transparent; border-radius: 6px; padding: 2px 8px; cursor: text; }
.sahm-xl-name:hover { border-color: var(--gold); }
.sahm-xl-title .sahm-st-status { margin-inline-start: auto; font-size: 11.5px; }
.sahm-xl-rtabs { display: flex; gap: 2px; padding: 6px 14px 0; border-bottom: 1.5px solid var(--ink); }
.sahm-xl-rtab { border: 1.5px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 4px 13px; font-size: 11.5px; cursor: pointer; background: transparent; font-family: inherit; color: var(--ink); }
.sahm-xl-rtab.is-on { border-color: var(--ink); background: var(--cell); font-weight: 700; color: var(--brand-deep); position: relative; top: 1.5px; }
.sahm-xl-ribbon { display: none; padding: 7px 10px; border-bottom: 1.5px solid var(--line); background: var(--cell); overflow-x: auto; }
.sahm-xl-ribbon.is-on { display: flex; }
.sahm-xl-rg { display: flex; flex-direction: column; gap: 4px; padding: 0 9px; border-inline-end: 1.5px dashed var(--line); min-width: max-content; }
.sahm-xl-rg:last-child { border-inline-end: 0; }
.sahm-xl-rg .rrow { display: flex; gap: 5px; align-items: center; }
.sahm-xl-rg .glabel { font-size: 9px; color: var(--soft); text-align: center; margin-top: 2px; }
.sahm-xl-rbtn { display: flex; align-items: center; gap: 5px; border: 1.5px solid var(--ink); background: var(--card); border-radius: 7px; padding: 3px 8px; font-size: 10.5px; cursor: pointer; font-family: inherit; color: var(--ink); box-shadow: 1.5px 1.5px 0 rgba(43,43,43,.12); white-space: nowrap; }
.sahm-xl-rbtn:hover { background: var(--tape); color: #2b2b2b; transform: translateY(-1px); }
.sahm-xl-rbtn.amber { background: var(--gold); color: #fff; }
.sahm-xl-rbtn.amber:hover { color: #2b2b2b; }
.sahm-xl-rbtn.big { flex-direction: column; padding: 4px 9px; font-size: 10px; gap: 2px; }
.sahm-xl-rbtn .i { font-size: 12px; line-height: 1; }
.sahm-xl-rbtn.sq { padding: 3px 7px; font-family: var(--mono); }
.sahm-xl-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.sahm-xl-fxbar { display: flex; align-items: stretch; border-bottom: 1.5px solid var(--ink); background: var(--card); }
.sahm-xl-namebox { width: 78px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; border-inline-end: 1.5px solid var(--line); color: var(--brand-deep); font-weight: 600; }
.sahm-xl-fxsym { display: flex; align-items: center; padding: 0 10px; color: var(--gold); font-style: italic; font-weight: 700; border-inline-end: 1.5px solid var(--line); }
.sahm-xl-fx { flex: 1; border: 0; background: transparent; padding: 6px 12px; font-size: 12px; color: var(--ink); min-height: 30px; outline: none; text-align: left; }
.sahm-xl-work { display: flex; height: 540px; }
.sahm-xl-gridwrap { flex: 1; overflow: auto; height: 100%; background: var(--card); }
.sahm-xl-table { border-collapse: collapse; direction: rtl; }
.sahm-xl-table th, .sahm-xl-table td { border: 1px solid var(--line); font-size: 12px; height: 25px; position: relative; }
.sahm-xl-table thead th { position: sticky; top: 0; background: var(--cell); z-index: 3; font-family: var(--mono); font-size: 10.5px; color: var(--soft); min-width: 86px; font-weight: 600; padding: 2px; }
.sahm-xl-table thead th.corner { position: sticky; right: 0; z-index: 5; min-width: 36px; }
.sahm-xl-table tbody th { position: sticky; right: 0; background: var(--cell); z-index: 2; font-family: var(--mono); font-size: 10.5px; color: var(--soft); min-width: 36px; font-weight: 600; }
.sahm-xl-table thead th.hsel { background: color-mix(in srgb, var(--brand) 14%, var(--cell)); color: var(--brand-deep); box-shadow: inset 0 -2.5px 0 var(--brand); }
.sahm-xl-table tbody th.hsel { background: color-mix(in srgb, var(--brand) 14%, var(--cell)); color: var(--brand-deep); box-shadow: inset -2.5px 0 0 var(--brand); }
.sahm-xl-table td { font-family: var(--mono); padding: 2px 8px; text-align: left; direction: ltr; cursor: cell; min-width: 86px; white-space: nowrap; background: var(--card); }
.sahm-xl-table td.is-txt { direction: rtl; text-align: right; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.sahm-xl-table td.is-b { font-weight: 700; }
.sahm-xl-table td.is-f { color: var(--brand-deep); }
.sahm-xl-table td.is-in { background: color-mix(in srgb, var(--tape) 26%, var(--card)); }
.sahm-xl-table td.is-trace { outline: 2px dashed var(--gold); outline-offset: -2px; }
.sahm-xl-table td.is-prec { outline: 2px solid #158040; outline-offset:-2px; background: rgba(21,128,61,.10) !important; }
.sahm-xl-table td.is-dep { outline: 2px solid #b8860b; outline-offset:-2px; background: rgba(184,134,11,.12) !important; }
.sahm-xl-rbtn.is-on { background: var(--brand,#0e5c43); color:#f3efe2; }
.sahm-xl-table td.is-sel { outline: 2.5px solid var(--brand); outline-offset: -2px; }
.sahm-xl-table td.is-sel:not(.is-in):not(.lk-live):not(.lk-disc) { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.sahm-xl-table td.is-editing { padding: 0; overflow: visible; }
.sahm-xl-celled { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; outline: none; background: var(--card); color: var(--ink); font-family: var(--mono); font-size: 12px; padding: 2px 8px; text-align: left; box-shadow: inset 0 0 0 2.5px var(--brand); z-index: 4; }
.sahm-xl-table td.is-sel::after { content: ''; position: absolute; left: -3px; bottom: -3px; width: 7px; height: 7px; background: var(--brand); border: 1.5px solid var(--card); cursor: crosshair; z-index: 1; }
.sahm-xl-table td .lk-dot { position: absolute; top: 2px; left: 2px; width: 7px; height: 7px; border-radius: 50%; }
.sahm-xl-table td.lk-live { background: color-mix(in srgb, #2f7d5c 7%, var(--card)); }
.sahm-xl-table td.lk-live .lk-dot { background: #2f7d5c; }
.sahm-xl-table td.lk-stale .lk-dot { background: var(--gold); }
.sahm-xl-table td.lk-disc { background: color-mix(in srgb, #d2483e 8%, var(--card)); }
.sahm-xl-table td.lk-disc .lk-dot { background: #d2483e; }
.sahm-xl-pane { width: 228px; height: 100%; border-inline-start: 1.5px solid var(--ink); background: var(--cell); display: flex; flex-direction: column; }
.sahm-xl-pane[hidden] { display: none; }
.sahm-xl-pane-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1.5px solid var(--line); font-weight: 700; font-size: 12.5px; color: var(--brand-deep); }
.sahm-xl-pane-h .sahm-pf-x { margin-inline-start: auto; }
.sahm-xl-pane-b { padding: 10px 12px; overflow-y: auto; flex: 1; }
.sahm-st-pg { margin-bottom: 10px; }
.sahm-st-pg b { display: block; font-size: 11px; color: var(--gold); margin-bottom: 5px; }
.sahm-st-pi { display: inline-block; border: 1.5px solid var(--ink); background: var(--card); border-radius: 8px; padding: 3px 9px; font-size: 11px; margin: 0 0 5px 5px; cursor: grab; }
.sahm-st-pi:hover { background: var(--tape); color: #2b2b2b; transform: rotate(-1deg); }
.sahm-xl-pane-tip { border-top: 1.5px dashed var(--line); padding: 9px 12px; font-size: 10.5px; color: var(--soft); line-height: 1.8; }
.sahm-xl-sheetbar { display: flex; align-items: center; gap: 3px; padding: 5px 14px; border-top: 1.5px solid var(--ink); background: var(--card); flex-wrap: wrap; }
.sahm-xl-stab { border: 1.5px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: 3px 13px; font-size: 11.5px; cursor: pointer; background: var(--cell); font-family: inherit; color: var(--ink); }
.sahm-xl-stab.is-on { background: var(--card); border-color: var(--ink); font-weight: 700; color: var(--brand-deep); }
.sahm-xl-stab.add { border-style: dashed; color: var(--soft); }
.sahm-xl-status { display: flex; align-items: center; gap: 16px; padding: 7px 16px; border-top: 1.5px solid var(--line); background: var(--cell); font-size: 11px; color: var(--soft); flex-wrap: wrap; }
.sahm-xl-status .s b { color: var(--brand-deep); }
.sahm-xl-cellinfo { flex: 1; min-width: 200px; }
.sahm-xl-cellinfo .lk-live { color: #2f7d5c; } .sahm-xl-cellinfo .lk-stale { color: var(--gold); } .sahm-xl-cellinfo .lk-disc { color: #d2483e; }
.sahm-st-side { margin: 14px 16px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px; background: var(--card); box-shadow: 3px 3px 0 rgba(43,43,43,.14); }
.sahm-st-diff { font-size: 11.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.sahm-xlstudio > p.sahm-dim { padding: 0 16px 14px; }
@media (max-width: 860px) { .sahm-xl-work { flex-direction: column; height: auto; } .sahm-xl-gridwrap { height: 420px; } .sahm-xl-pane { width: 100%; height: auto; max-height: 260px; border-inline-start: 0; border-top: 1.5px solid var(--ink); } }
/* ===== حوارات وتوست الاستوديو (سهم 5.1.4) ===== */
.sahm-dlg-ov { position: fixed; inset: 0; background: rgba(43,43,43,.42); z-index: 1300; display: grid; place-items: center; opacity: 0; transition: .18s; padding: 18px; }
.sahm-dlg-ov.show { opacity: 1; }
.sahm-dlg { background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 rgba(43,43,43,.25); width: min(440px, 94vw); max-height: 86vh; overflow-y: auto; padding: 16px 18px; transform: translateY(8px) scale(.98); transition: .18s; }
.sahm-dlg-ov.show .sahm-dlg { transform: none; }
.sahm-dlg-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sahm-dlg-h b { font-size: 15.5px; color: var(--brand-deep); }
.sahm-dlg-h .sahm-pf-x { margin-inline-start: auto; }
.sahm-dlg-b { font-size: 13px; line-height: 1.95; }
.sahm-dlg-lbl { display: block; font-size: 12.5px; margin: 6px 0; color: var(--soft); }
.sahm-dlg-in { width: 100%; }
.sahm-dlg-f { display: flex; gap: 8px; justify-content: flex-start; margin-top: 14px; }
.sahm-dlg-sec { display: block; color: var(--gold); font-size: 12px; margin: 12px 0 6px; }
.sahm-dlg-code { display: block; direction: ltr; text-align: left; font-family: var(--mono); font-size: 12px; background: var(--cell); border: 1px dashed var(--line); border-radius: 7px; padding: 5px 10px; margin: 4px 0; color: var(--brand-deep); }
.sahm-dlg-p { font-size: 12.5px; margin: 2px 0; }
.sahm-dlg-list { display: flex; flex-direction: column; gap: 6px; }
.sahm-dlg-list .sahm-chip { justify-content: flex-start; text-align: right; }
.sahm-sttoast { position: fixed; bottom: 24px; right: 50%; transform: translate(50%, 16px); background: var(--tape); color: #2b2b2b; border: 1.5px solid #2b2b2b; border-radius: 9px; padding: 12px 22px; font-size: 13.5px; line-height: 1.85; cursor: pointer; font-weight: 600; box-shadow: 3px 3px 0 rgba(43,43,43,.22); z-index: 1400; opacity: 0; transition: .22s; font-family: 'IBM Plex Sans Arabic', sans-serif; max-width: min(480px, 92vw); }
.sahm-sttoast.show { opacity: 1; transform: translate(50%, 0); }
.sahm-sttoast.is-warn { background: #f6d6d3; border-color: #b3261e; }
/* سهم 5.3 — خصائص خلايا إكسل الكاملة */
.sahm-xl-table td.is-i { font-style: italic; }
.sahm-xl-table td.is-u { text-decoration: underline; }
.sahm-xl-table td.al-l { text-align: left; }
.sahm-xl-table td.al-c { text-align: center; }
.sahm-xl-table td.al-r { text-align: right; }
.sahm-xl-table td.bg-1 { background: color-mix(in srgb, var(--tape) 30%, var(--card)); }
.sahm-xl-table td.bg-2 { background: color-mix(in srgb, #2f7d5c 14%, var(--card)); }
.sahm-xl-table td.bg-3 { background: color-mix(in srgb, #d2483e 13%, var(--card)); }
.sahm-xl-table td.bg-4 { background: color-mix(in srgb, var(--soft) 16%, var(--card)); }
#sahm-st-grid.no-grid .sahm-xl-table td { border-color: transparent; }
#sahm-st-grid.no-grid .sahm-xl-table td.is-sel { outline: 2.5px solid var(--brand); }
.sahm-xl-fills { gap: 4px; }
.sahm-xl-fill { width: 17px; height: 17px; border: 1.5px solid var(--ink); border-radius: 6px; cursor: pointer; padding: 0; font-size: 11px; line-height: 1; color: var(--soft); background: var(--card); }
.sahm-xl-fill.f1 { background: color-mix(in srgb, var(--tape) 55%, var(--card)); }
.sahm-xl-fill.f2 { background: color-mix(in srgb, #2f7d5c 30%, var(--card)); }
.sahm-xl-fill.f3 { background: color-mix(in srgb, #d2483e 28%, var(--card)); }
.sahm-xl-fill.f4 { background: color-mix(in srgb, var(--soft) 32%, var(--card)); }
.sahm-xl-rbtn.is-on { background: var(--brand); color: #fff; }
.sahm-dlg-nrow { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.sahm-dlg-nrow span { margin-inline-start: auto; }
/* سهم 5.4 — ألفة إكسل: نطاق/مقبض/قائمة يمنى */
.sahm-xl-table td.in-rng { background: color-mix(in srgb, var(--brand) 9%, var(--card)) !important; }
.sahm-xl-table td.is-sel::after { content: none; }
.sahm-xl-fillh { position: absolute; left: -4px; bottom: -4px; width: 9px; height: 9px; background: var(--brand); border: 1.5px solid var(--card); cursor: crosshair; z-index: 3; }
.sahm-xl-ctx { position: fixed; z-index: 1350; background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 rgba(43,43,43,.22); padding: 5px; min-width: 175px; display: flex; flex-direction: column; }
.sahm-xl-ctx[hidden] { display: none; }
.sahm-xl-ctx button { border: 0; background: transparent; font-family: inherit; font-size: 12.5px; color: var(--ink); text-align: right; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.sahm-xl-ctx button:hover { background: var(--tape); color: #2b2b2b; }
.sahm-xl-ctx .sep { height: 1px; background: var(--line); margin: 4px 8px; }
/* سهم 5.4.2 — أيقونات الريبون SVG منضبطة */
.sahm-xl-rbtn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.sahm-xl-rbtn.big svg { width: 15px; height: 15px; }
.sahm-xl-rbtn .sw-in { display: inline-block; width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: color-mix(in srgb, var(--tape) 55%, var(--card)); }
.sahm-xl-title #sahm-st-help svg { width: 12px; height: 12px; }
#sahm-st-grid:focus { outline: none; }
/* سهم 5.6 — مقاسات وإدراج */
.sahm-xl-table thead th, .sahm-xl-table tbody th { position: sticky; overflow: visible; }
.sahm-xl-cgrip { position: absolute; top: 0; left: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 6; }
.sahm-xl-rgrip { position: absolute; right: 0; bottom: -3px; height: 7px; width: 100%; cursor: row-resize; z-index: 6; }
.sahm-xl-cgrip:hover, .sahm-xl-rgrip:hover { background: color-mix(in srgb, var(--brand) 35%, transparent); }
.sahm-xl-table { width: max-content; }
.sahm-xl-table td { overflow: hidden; text-overflow: clip; }
/* مساحة العمل: مبدل اللوحات/الاستوديو */
.sahm-cv-modes { display: flex; gap: 6px; margin-bottom: 16px; }
.sahm-cv-mode { border: 1.5px solid var(--line); background: var(--cell); border-radius: 99px; padding: 7px 22px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink); }
.sahm-cv-mode.is-on { border-color: var(--ink); background: var(--brand); color: #fff; font-weight: 700; box-shadow: 2px 2px 0 rgba(43,43,43,.18); }
#sahm-cv-studio .sahm-xlstudio { margin-top: 0; }
/* الاستوديو داخل مساحة العمل: تنفس جانبي */
#sahm-cv-studio { padding: 0 30px 30px; }
#sahm-cv-studio .sahm-xlstudio { max-width: 1480px; margin-inline: auto; }
@media (max-width: 900px) { #sahm-cv-studio { padding: 0 12px 18px; } }
/* اتصل بنا */
.sahm-contact-form { position: relative; }
.sahm-cf-row { margin-bottom: 12px; }
.sahm-cf-row label { display: block; font-size: 12.5px; color: var(--soft); margin-bottom: 5px; }
.sahm-cf-row .sahm-input { width: 100%; }
/* أخبار الشركة */
.sahm-news-list { display: flex; flex-direction: column; gap: 8px; }
.sahm-news-item { border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); transition: .15s; overflow: hidden; }
.sahm-news-item:hover, .sahm-news-item.is-open { border-color: var(--ink); box-shadow: 2px 2px 0 rgba(43,43,43,.12); }
.sahm-news-head { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: right; border: 0; background: transparent; color: var(--ink); font-family: inherit; padding: 10px 14px; cursor: pointer; }
.sahm-news-head b { font-size: 13.5px; line-height: 1.8; }
.sahm-news-head .sahm-dim { font-size: 11px; }
.sahm-news-detail { padding: 0 14px 12px; border-top: 1px dashed var(--line); }
.sahm-news-detail p { font-size: 13px; line-height: 2; margin: 10px 0 0; }
.sahm-news-ai { border: 1.5px dashed var(--gold); border-radius: 12px; padding: 14px; background: color-mix(in srgb, var(--tape) 10%, var(--card)); }
.sahm-news-ai-badge { color: var(--gold); font-size: 12.5px; }
.sahm-news-aiexp { border: 1.5px dashed var(--gold); border-radius: 10px; padding: 10px 14px; margin-top: 10px; background: color-mix(in srgb, var(--tape) 10%, var(--card)); }
.sahm-news-aiexp p { margin: 6px 0 0; }
/* مسارا الاشتراك في حسابي — أزرار ذاتية التنسيق محكمة الأبعاد */
.sahm-sub-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sahm-sub-cta-lbl { font-size: 12px; color: var(--soft); font-weight: 700; }
.sahm-cta-btn { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; width: auto; padding: 10px 18px; border-radius: 10px; border: 1.5px solid transparent; font-family: var(--sans); font-size: 13px; font-weight: 800; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: var(--sh-soft); transition: .13s; }
.sahm-cta-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(43,43,43,.18); }
.sahm-cta-sub { background: var(--amber, #f0b429); color: #2b2b2b !important; border-color: var(--ink); }
.sahm-cta-wa { background: #1fa855; color: #fff !important; border-color: #15803d; }
.sahm-cta-wa:hover { background: #22b75d; }

/* محرك الأقران — الطبقات الثلاث */
.sahm-peer-tier { margin-top: 16px; }
.sahm-peer-tier h5 { margin: 0 0 10px; font-size: 13px; font-weight: 800; border-inline-start: 4px solid var(--brand); padding-inline-start: 10px; display: flex; flex-direction: column; gap: 1px; }
.sahm-peer-tier h5 small { color: var(--soft); font-weight: 400; font-size: 11px; }
.sahm-peer-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.sahm-peer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sahm-peer-head b { font-size: 13.5px; }
.sahm-peer-head .sahm-sim { margin-inline-start: auto; }
.sahm-peer-mix { display: flex; gap: 10px; flex-wrap: wrap; margin: 9px 0 7px; }
.sahm-mix-seg { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--soft); }
.sahm-mix-seg label { font-weight: 700; }
.sahm-mix-seg i { display: inline-block; width: 52px; height: 7px; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.sahm-mix-seg b { display: block; height: 100%; background: var(--brand); }
.sahm-mix-seg em { font-style: normal; font-weight: 800; color: var(--ink); }
.sahm-peer-why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sahm-peer-why li { font-size: 11.5px; color: var(--soft); display: flex; gap: 7px; align-items: baseline; }
.sahm-peer-why li i { font-style: normal; font-size: 10px; font-weight: 800; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--soft); background: var(--paper); flex: 0 0 auto; }
.sahm-peer-why li.on i { border-color: var(--brand); color: var(--brand-deep, #0e7a56); background: rgba(14,163,114,.07); }
.sahm-peer-nums { margin-top: 8px; font-size: 11px; color: var(--soft); border-top: 1px dashed var(--line); padding-top: 7px; }
.sahm-imatch { font-size: 10px; font-weight: 800; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--soft); background: var(--paper); }
.sahm-imatch.good { border-color: var(--brand); color: var(--brand-deep, #0e7a56); }
.sahm-imatch.bad { border-color: var(--red, #c25450); color: var(--red, #c25450); }
/* لافتة مراجعة الذكاء للأقران */
.sahm-aireview { border: 1.5px dashed var(--line); border-radius: 10px; padding: 8px 14px; margin: 4px 0 12px; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.sahm-aireview span { color: var(--soft); font-size: 11.5px; }
.sahm-aireview.ok { border-color: var(--brand); }
.sahm-aireview.ok b { color: var(--brand-deep, #0e7a56); }
.sahm-aireview.adj { border-color: var(--amber); }
.sahm-aireview.na { opacity: .85; }
.sahm-ai-adj { font-size: 11px; color: #9c7508; background: #fff8e6; border: 1px dashed var(--amber); border-radius: 8px; padding: 4px 10px; margin: 6px 0; }
/* مراجعة المحلل الذكي */
.sahm-analyst { background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; padding: 16px 18px; margin: 14px 0; box-shadow: 4px 4px 0 rgba(43,43,43,.12); }
.sahm-analyst h5 { margin: 0 0 12px; font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 8px; color: var(--brand-deep, #0e7a56); }
.sahm-analyst h5 small { color: var(--soft); font-weight: 400; font-size: 11px; }
.sahm-an-block { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.sahm-an-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.sahm-an-block > b { font-size: 13px; }
.sahm-an-list { margin: 6px 0; padding-inline-start: 20px; font-size: 12.5px; }
.sahm-an-list li { margin-bottom: 3px; }
.sahm-an-list span { color: var(--soft); font-size: 11.5px; }
.sahm-an-why { margin: 4px 0 8px; font-size: 11.5px; color: var(--soft); }
.sahm-an-uses { display: flex; gap: 7px; flex-wrap: wrap; }
.sahm-an-uses i { font-style: normal; font-size: 10.5px; font-weight: 800; border-radius: 7px; padding: 3px 10px; border: 1px solid; }
.sahm-an-uses i.ok { color: var(--brand-deep, #0e7a56); border-color: var(--brand); background: rgba(14,163,114,.07); }
.sahm-an-uses i.ok::before { content: "✓ "; }
.sahm-an-uses i.no { color: var(--red, #c25450); border-color: var(--red, #c25450); background: rgba(194,84,80,.06); }
.sahm-an-uses i.no::before { content: "✗ "; }
.sahm-an-warn { margin-top: 12px; border: 1.5px dashed var(--amber); border-radius: 10px; padding: 10px 14px; font-size: 12px; color: var(--soft); }
.sahm-an-warn b { color: #9c7508; }
.sahm-an-prio { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.sahm-an-prio span { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 2px 9px; font-weight: 700; color: var(--ink); }
/* مختبر المحفظة — إثراءات المحلل */
.sahm-rc-bar { height: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.sahm-rc-bar i { display: block; height: 100%; background: var(--brand); }
.sahm-pf-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.sahm-pf-pair { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--card); display: flex; flex-direction: column; gap: 4px; box-shadow: 3px 3px 0 rgba(43,43,43,.08); }
.sahm-pf-pair b { font-size: 12.5px; }
.sahm-pf-pair span { font-size: 16px; font-weight: 800; }
.sahm-pf-pair i { font-style: normal; font-size: 11px; color: var(--soft); }
.sahm-pf-pair.good { border-color: var(--brand); }
.sahm-pf-pair.good b { color: var(--brand-deep, #0e7a56); }
.sahm-pf-pair.bad { border-color: var(--red, #c25450); }
.sahm-pf-pair.bad b { color: var(--red, #c25450); }
.sahm-pf-read { border: 1.5px dashed var(--ink); border-radius: 12px; padding: 12px 18px; margin: 14px 0; background: var(--card); }
.sahm-pf-read b { font-size: 12.5px; }
.sahm-pf-read ul { margin: 8px 0 2px; padding-inline-start: 20px; font-size: 12.5px; }
.sahm-pf-read li { margin-bottom: 5px; }
/* مبدّل اللغة */
.sahm-langsw a { font-weight: 800; color: #c8e6d6; text-decoration: none; padding: 1px 5px; border-radius: 5px; }
.sahm-langsw a:hover { color: #ffffff; }
.sahm-langsw a.on { color: #ffffff; background: rgba(255,255,255,.18); }
.sahm-langsw i { color: rgba(255,255,255,.4); font-style: normal; }
.sahm-app[dir="ltr"] { font-feature-settings: normal; }
.sahm-app[dir="ltr"] .sahm-mono { direction: ltr; }

/* الجانبية 5.29: البنية كلها سمات مضمنة على العناصر — لا قواعد هيكلية هنا كي لا تنازعها */
@media (min-width:981px){.sahm-utility .sahm-burger{display:none !important}}
/* تثبيت الشريط العلوي الداكن أعلى الشاشة عند التمرير — جوال ولوحي (5.32.4) */
@media (max-width:980px){.sahm-utility{position:sticky;position:-webkit-sticky;top:0;z-index:900}}
/* تثبيت شريط العنوان أسفل الأسود مباشرة — جوال ولوحي (5.32.10) */
@media (max-width:980px){.sahm-utility{min-height:38px;box-sizing:border-box}.sahm-topbar{position:sticky;position:-webkit-sticky;top:38px;z-index:80}}
/* السكة المطوية (نمط Claude) — 5.29.21 */
#sahm-side.sahm-rail{width:64px !important;min-width:64px !important;max-width:64px !important;padding:12px 8px 12px !important}
#sahm-side.sahm-rail .sahm-brand{justify-content:center}
#sahm-side.sahm-rail .sahm-side-title{display:none !important}
#sahm-side.sahm-rail .sahm-brand-sub{display:none !important}
#sahm-side.sahm-rail .sahm-side-head{flex-direction:column !important;gap:8px !important}
#sahm-side.sahm-rail .sahm-side-burger{align-self:center !important}
#sahm-side.sahm-rail .sahm-sheet-tab{display:flex !important;justify-content:center !important;padding:10px 6px !important}
#sahm-side.sahm-rail .sahm-sheet-tab .tab-ic{margin-inline-end:0 !important}
#sahm-side.sahm-rail .sahm-sheet-tab .lbl{display:none !important}
#sahm-side.sahm-rail .sahm-side-user{justify-content:center !important;padding:6px !important;border-color:transparent !important;background:none !important}
#sahm-side.sahm-rail .sahm-su-name,#sahm-side.sahm-rail .sahm-su-arrow{display:none !important}
#sahm-side.sahm-rail .sahm-side-foot{align-items:center}
#sahm-side.sahm-rail .sahm-theme-toggle{align-self:center !important}
#sahm-side.sahm-rail .sahm-auth-btn{justify-content:center !important;padding:8px !important}
#sahm-side.sahm-rail .sahm-auth-btn .lbl2{display:none !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent:not([hidden]){display:block !important;margin-top:8px !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-h{display:none !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-list{align-items:center !important;gap:5px !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-it{width:44px !important;justify-content:center !important;gap:0 !important;padding:6px 4px !important;border:1.5px solid var(--line) !important;background:var(--card) !important;border-radius:8px !important;margin:0 auto !important;box-shadow:var(--sh-soft);transition:.12s}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-it:hover{border-color:var(--brand-line) !important;transform:translate(-1px,-1px)}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-it span:last-child{display:none !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-it span:first-child{font-size:11px !important;color:var(--ink) !important}
#sahm-side.sahm-rail:not(.sahm-open) .sahm-side-recent-it:nth-child(n+6){display:none !important}
/* ===== Sidebar vertical fit: full viewport height, head+foot pinned, middle scrolls only if needed ===== */
#sahm-side .sahm-brand,#sahm-side .sahm-side-foot{flex:0 0 auto}
#sahm-side .sahm-side-scroll{scrollbar-width:thin;scrollbar-color:var(--faint) transparent}
#sahm-side .sahm-side-scroll::-webkit-scrollbar{width:6px}
#sahm-side .sahm-side-scroll::-webkit-scrollbar-track{background:transparent}
#sahm-side .sahm-side-scroll::-webkit-scrollbar-thumb{background:var(--faint);border-radius:999px}
#sahm-side .sahm-side-scroll::-webkit-scrollbar-thumb:hover{background:var(--brand)}
/* Compact spacing as the viewport gets shorter so all items fit without scrolling */
@media (max-height:760px){
  #sahm-side{gap:9px !important;padding-top:12px !important;padding-bottom:10px !important}
  #sahm-side .sahm-side-scroll{gap:9px !important}
  #sahm-side .sahm-brand{padding-bottom:8px !important;gap:4px !important}
  #sahm-side .sahm-brand-sub{display:none !important}
  #sahm-side .sahm-sheet-tab{padding:7px 12px !important}
  #sahm-side .sahm-sheets-in{gap:3px !important}
  #sahm-side .sahm-side-foot{gap:6px !important;padding-top:9px !important}
}
@media (max-height:620px){
  #sahm-side{gap:6px !important;padding-top:10px !important}
  #sahm-side .sahm-side-scroll{gap:6px !important}
  #sahm-side .sahm-side-head{min-height:0 !important}
  #sahm-side .sahm-sheet-tab{padding:5px 12px !important;font-size:12.5px !important}
  #sahm-side .sahm-side-recent{display:none !important}
  #sahm-side .sahm-side-foot{padding-top:7px !important}
  #sahm-side .sahm-theme-toggle{padding:5px !important}
  #sahm-side .sahm-auth-btn{padding:7px 10px !important}
}
@media (max-width:980px){
#sahm-side[data-mode="d"]{display:none !important}
#sahm-side[data-mode="d"].sahm-open{display:flex !important;z-index:2000 !important;box-shadow:6px 0 24px rgba(0,0,0,.25) !important}
/* درج الشاشات الضيّقة: عند الفتح يظهر كاملًا لا مصغّرًا (5.32.70) */
#sahm-side[data-mode="d"].sahm-open.sahm-rail{width:248px !important;min-width:248px !important;max-width:248px !important;padding:16px 12px 14px !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-side-head{flex-direction:row !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-side-title{display:inline !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-brand-sub{display:block !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-sheet-tab{justify-content:flex-start !important;padding:9px 12px !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-sheet-tab .lbl{display:inline !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-su-name{display:block !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-side-recent{display:block !important}
#sahm-side[data-mode="d"].sahm-open.sahm-rail .sahm-auth-btn .lbl2{display:inline !important}
.sahm-app .sahm-body{margin-inline-start:0 !important}
.sahm-side-scrim.sahm-on{display:block !important;z-index:1990 !important}
.sahm-hide-sm{display:none !important}
.sahm-topchip.sahm-tb-d{display:none !important}
.sahm-utility{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.sahm-utility::-webkit-scrollbar{display:none}
.sahm-topbar .sahm-nav-search{flex:1 1 auto;min-width:0}
.sahm-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.sahm-app table{max-width:none}
.sahm-app .sahm-table{min-width:560px}
.sahm-panel-head{flex-wrap:wrap;gap:8px}
.sahm-panel-head input[type="search"]{flex:1 1 100%;min-width:0}
.sahm-app .sahm-panel,.sahm-app .sahm-card{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.sahm-hero,.sahm-lead,.sahm-fn-grid,.sahm-charts-2,.sahm-ws-grid,.sahm-compare-pickers,.sahm-calc,.sahm-grid-2,.sahm-res-grid,.sahm-cv-tpls{grid-template-columns:1fr}
}

/* ===== تصدير PDF من الاستوديو (5.30.0) ===== */

/* ===== مستند الطباعة الكامل للنموذج (5.32.11) ===== */
#sahm-print-doc { display: none; }
@media print {
  body.sahm-printing-doc > *:not(#sahm-print-doc) { display: none !important; }
  body.sahm-printing-doc #sahm-print-doc { display: block !important; }
  body.sahm-printing-doc { background: #fff !important; margin: 0 !important; }
  @page { size: A4 landscape; margin: 12mm 10mm; }
  #sahm-print-doc { font-family: 'IBM Plex Sans Arabic', sans-serif; color: #1a1a17; direction: rtl; }
  #sahm-print-doc .pd-head { border-bottom: 2px solid #0e5c43; padding-bottom: 6px; margin-bottom: 12px; }
  #sahm-print-doc .pd-brand { color: #0e5c43; font-weight: 700; font-size: 11px; }
  #sahm-print-doc .pd-head h1 { font-size: 18px; margin: 2px 0; color: #1a1a17; }
  #sahm-print-doc .pd-date { font-size: 10px; color: #6b6a60; }
  #sahm-print-doc .pd-sheet { page-break-inside: auto; margin-bottom: 16px; }
  #sahm-print-doc .pd-sheet h2 { font-size: 13px; color: #0e5c43; border-right: 3px solid #b8860b; padding-right: 6px; margin: 10px 0 5px; page-break-after: avoid; }
  #sahm-print-doc .pd-empty { font-size: 10px; color: #9a988e; }
  #sahm-print-doc table.pd-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8.5px; }
  #sahm-print-doc table.pd-table td { border: 0.5px solid #d8d5cb; padding: 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #sahm-print-doc table.pd-table td.b { font-weight: 700; }
  #sahm-print-doc table.pd-table td.lbl { text-align: right; width: 22%; color: #23221c; background: #faf8f0; }
  #sahm-print-doc table.pd-table td.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
  #sahm-print-doc table.pd-table tr { page-break-inside: avoid; }
  #sahm-print-doc .pd-foot { margin-top: 14px; border-top: 1px solid #d8d5cb; padding-top: 5px; font-size: 8px; color: #6b6a60; }
}

@media print {
	body.sahm-printing-model .sahm-side, body.sahm-printing-model .sahm-utility,
	body.sahm-printing-model .sahm-topbar, body.sahm-printing-model .sahm-xl-toolbar,
	body.sahm-printing-model .sahm-xl-fxbar, body.sahm-printing-model .sahm-xl-pane,
	body.sahm-printing-model .sahm-st-side, body.sahm-printing-model .sahm-xl-sheetbar,
	body.sahm-printing-model .sahm-xl-status, body.sahm-printing-model .sahm-dock-wrap,
	body.sahm-printing-model .sahm-footer, body.sahm-printing-model .sahm-scrim { display: none !important; }
	body.sahm-printing-model .sahm-body { margin: 0 !important; padding: 0 !important; }
	body.sahm-printing-model .sahm-xl-gridwrap { max-height: none !important; overflow: visible !important; border: none !important; }
	body.sahm-printing-model { background: #fff !important; }
}

/* ===== ريبون A: كبسولة الحالة + قائمة القوالب (5.30.1) ===== */
.sahm-xl-lkcap{display:inline-flex;align-items:center;border:1.5px solid var(--ink);border-radius:999px;overflow:hidden;background:var(--card)}
.sahm-xl-lkcap button{border:none;background:transparent;font-family:inherit;color:var(--ink);font-size:11px;font-weight:700;padding:5px 11px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.sahm-xl-lkcap button:hover{background:rgba(14,92,67,.08)}
.sahm-xl-lkcap button + button{border-inline-start:1.5px solid var(--line)}
.lkdot{width:7px;height:7px;border-radius:50%;display:inline-block}
.lk-live{background:var(--brand,#0e5c43)}
.lk-stale{background:#b8860b}
.lk-disc{background:#b3261e}
.sahm-xl-dd{position:relative;display:inline-flex}
.sahm-xl-dd .car{font-size:9px;opacity:.7;margin-inline-start:2px}
.sahm-xl-menu{position:absolute;top:calc(100% + 6px);inset-inline-start:0;background:var(--card);border:1.5px solid var(--ink);border-radius:12px;box-shadow:5px 6px 0 rgba(35,34,28,.14);min-width:300px;z-index:80;display:none;flex-direction:column;overflow:hidden;padding-bottom:4px}
.sahm-xl-dd.is-open .sahm-xl-menu{display:flex}
.sahm-xl-menu .mhead{font-size:10px;font-weight:700;color:var(--soft);padding:9px 13px 3px;letter-spacing:.4px;text-align:start}
.sahm-xl-mi{display:flex;gap:10px;padding:9px 13px;cursor:pointer;align-items:flex-start;border:none;background:transparent;font-family:inherit;text-align:start;width:100%}
.sahm-xl-mi:hover{background:rgba(14,92,67,.08)}
.sahm-xl-mi + .sahm-xl-mi{border-top:1px solid var(--line)}
.sahm-xl-mi .mic{width:30px;height:30px;border-radius:9px;background:var(--brand,#0e5c43);color:#f3efe2;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.sahm-xl-mi .mtx{display:flex;flex-direction:column;gap:1px}
.sahm-xl-mi .t{font-size:12.5px;font-weight:700;color:var(--ink)}
.sahm-xl-mi .d{font-size:10.5px;color:var(--soft);line-height:1.5}

/* ===== نموذج رفع شركة (5.32.19) ===== */
.sahm-upload-co .sahm-upload-intro { color: var(--soft, #6b6a60); font-size: 13px; margin-bottom: 14px; line-height: 1.7; }
.sahm-uc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 14px; }
.sahm-uc-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink, #23221c); }
.sahm-uc-grid .sahm-input { font-weight: 400; }
.sahm-uc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 6px; border-top: 1.5px dashed var(--line, #e0ddd2); }
.sahm-uc-fname { font-size: 12px; color: var(--brand, #0e5c43); font-weight: 600; }
.sahm-uc-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.sahm-uc-result.is-ok  { background: #eef5f1; border: 1.5px solid #c4ddd0; }
.sahm-uc-result.is-err { background: #f7eeee; border: 1.5px solid #e6cfcf; }
.sahm-uc-result.is-warn{ background: #fbf6e9; border: 1.5px solid #e8d9b0; }
.sahm-uc-ok { color: var(--brand, #0e5c43); font-weight: 600; }
.sahm-uc-err b { color: #a64b4b; }
.sahm-uc-result ul { margin: 8px 0 0; padding-inline-start: 20px; }
.sahm-uc-result li { margin-bottom: 4px; }
.sahm-uc-warn { margin-top: 10px; color: #7a5a1e; }
@media (max-width: 680px) { .sahm-uc-grid { grid-template-columns: 1fr; } }

/* ===== آخر الشركات في الجانبية (5.32.26) ===== */
.sahm-side-recent-it:hover { background: var(--head, #f0ede3); color: var(--brand-deep, #0a3d2d) !important; }


/* ===== عناصر الرئيسية — متناسقة مع ثيم سهم «ورق وحبر» (5.32.38) ===== */

/* ١) البطل: أكمل من حيث توقّفت + خطوات الزائر */
.sahm-hero-continue { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 2px; }
.sahm-cont-lbl { font-size: 12px; color: var(--soft); }
.sahm-cont-go { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 15px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-deep); border: 1.5px solid var(--border); box-shadow: var(--sh-soft); text-decoration: none; font-size: 13px; transition: box-shadow .12s, transform .12s; }
.sahm-cont-go:hover { box-shadow: var(--sh); transform: translate(-1px,-1px); }
.sahm-cont-go b { font-weight: 700; }
.sahm-cont-go span { font-size: 11px; color: var(--brand); }
.sahm-hero-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.sahm-hstep { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: var(--r-sm); background: var(--head); color: var(--ink); border: 1.5px solid var(--border); box-shadow: var(--sh-soft); text-decoration: none; font-size: 12.5px; font-weight: 600; transition: box-shadow .12s, transform .12s; }
.sahm-hstep:hover { box-shadow: var(--sh); transform: translate(-1px,-1px); background: var(--brand-soft); }
.sahm-hstep-n { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; }

/* ٢) قفزة البحث السريعة */
.sahm-quickjump { position: relative; margin: 0 0 18px; }
.sahm-qj-box { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); padding: 12px 16px; }
.sahm-qj-ic { color: var(--soft); flex: 0 0 auto; }
#sahm-qj-input { flex: 1; border: 0; background: transparent; font-size: 15px; color: var(--ink); outline: none; font-family: inherit; }
#sahm-qj-input::placeholder { color: var(--faint); }
.sahm-qj-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); z-index: 50; overflow: hidden; }
.sahm-qj-it { display: flex; align-items: baseline; gap: 12px; padding: 10px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px dashed var(--line); }
.sahm-qj-it:last-child { border-bottom: 0; }
.sahm-qj-it:hover { background: var(--head); }
.sahm-qj-tk { font-family: var(--mono); font-size: 12px; color: var(--brand); font-weight: 700; flex: 0 0 auto; min-width: 52px; }
.sahm-qj-nm { font-size: 13.5px; }

/* ٣) خريطة تغطية القطاعات */
.sahm-sectors { margin-top: 12px; }
.sahm-secgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.sahm-seccell { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; border: 1.5px solid var(--border); box-shadow: var(--sh-soft); transition: box-shadow .12s, transform .12s; }
.sahm-seccell:hover { box-shadow: var(--sh); transform: translate(-1px,-1px); }
.sahm-seccell-n { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--brand-deep); }
.sahm-seccell-l { font-size: 11.5px; color: var(--ink); min-width: 0; white-space: normal; overflow-wrap: break-word; word-break: break-word; line-height: 1.25; }
.sahm-seccell.i1 { background: #f2faf6; }
.sahm-seccell.i2 { background: #e9f6f0; }
.sahm-seccell.i3 { background: var(--brand-soft); }
.sahm-seccell.i4 { background: var(--brand-line); }
@media (max-width: 980px) { .sahm-secgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ٤) قائمة المتابعة */
.sahm-watch { margin: 0 0 18px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); background: var(--card); }
.sahm-watch-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sahm-watch-h h3 { margin: 0; font-size: 15px; color: var(--ink); }
.sahm-watch-note { font-size: 10.5px; color: var(--soft); background: var(--head); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.sahm-watch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sahm-watch-it { display: flex; flex-direction: column; gap: 6px; padding: 11px 13px; border-radius: var(--r-sm); border: 1.5px solid var(--border); box-shadow: var(--sh-soft); text-decoration: none; color: var(--ink); background: var(--card); transition: box-shadow .12s, transform .12s; }
.sahm-watch-it:hover { box-shadow: var(--sh); transform: translate(-1px,-1px); }
.sahm-watch-top { display: flex; align-items: baseline; gap: 8px; }
.sahm-watch-tk { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--brand); }
.sahm-watch-nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sahm-watch-fx { display: flex; gap: 14px; font-size: 11.5px; color: var(--soft); }
.sahm-watch-fx b { color: var(--ink); font-family: var(--mono); }
.sahm-watch-upd { font-size: 10px; color: var(--faint); }

/* سطر التاريخ + آخر تحديث في صفّ واحد (5.32.41) */
.sahm-hero-dateline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
.sahm-hero-dateline .sahm-hero-date { margin: 0; }
.sahm-hero-upd { font-size: 11px; color: var(--soft); }
.sahm-hero-upd b { color: var(--ink); }

/* الملاحظات تتبع اللغة: إنجليزي→يمين، عربي→يسار (5.32.43) */
html[dir="rtl"] .sahm-notes-fab { box-shadow: 4px 4px 0 rgba(43,43,43,.18); }
html[dir="rtl"] .sahm-notes-drawer { transform: translateX(-105%); box-shadow: 10px 0 30px -12px rgba(43,43,43,.35); }
html[dir="rtl"] .sahm-notes-drawer.is-open { transform: translateX(0); }

/* حدود خلايا الاستوديو (5.32.52) */
.sahm-xl-table td.bd-all { box-shadow: inset 0 0 0 1.5px var(--ink, #2b2b2b); }
.sahm-xl-table td.bd-b { box-shadow: inset 0 -2px 0 var(--ink, #2b2b2b); }
.sahm-xl-table td.bd-t { box-shadow: inset 0 2px 0 var(--ink, #2b2b2b); }
.sahm-xl-table td.bd-tb { box-shadow: inset 0 2px 0 var(--ink, #2b2b2b), inset 0 -2px 0 var(--ink, #2b2b2b); }

/* تنسيق شرطي حسب الإشارة (5.32.54) */
.sahm-xl-table td.cf-neg { color: #c0392b; }
.sahm-xl-table td.cf-pos { color: var(--brand, #2f7d5c); }

.sahm-xl-rbtn.is-on { background: var(--brand-soft, #dff1e8); border-color: var(--brand-line, #bfe0d0); }

/* طيّ شريط الأدوات (5.32.58/59) */
#sahm-studio.is-ribbon-collapsed .sahm-xl-ribbon { display: none !important; }
.sahm-xl-rbcollapse { margin-inline-start: auto; font-weight: 700; cursor: pointer; background: transparent; border: 1px solid var(--line, #e6e3d6); border-radius: var(--r-sm, 9px); padding: 2px 10px; line-height: 1.6; color: var(--soft, #6f6e66); }
.sahm-xl-rbcollapse:hover { background: var(--head, #f8f6ec); }
.sahm-xl-rbcollapse.is-on { background: var(--brand-soft, #dff1e8); border-color: var(--brand-line, #bfe0d0); color: var(--brand-deep, #235f46); }

/* شاشة بداية الاستوديو (5.32.65) */
#sahm-studio { position: relative; }
.sahm-st-launch { position: absolute; inset: 0; z-index: 50; background: var(--bg, #fbfaf5); display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.sahm-st-launch[hidden] { display: none !important; }
.sahm-st-launch-card { width: 100%; max-width: 860px; background: var(--card, #fff); border: 1.5px solid var(--ink, #2b2b2b); border-radius: var(--r, 12px); box-shadow: var(--sh, 4px 4px 0 rgba(43,43,43,.14)); padding: 26px 26px 30px; }
.sahm-st-launch-head { text-align: center; margin-bottom: 22px; }
.sahm-st-launch-logo { display: inline-block; font-weight: 800; color: var(--brand, #2f7d5c); border: 1.5px solid var(--brand-line, #bfe0d0); background: var(--brand-soft, #dff1e8); border-radius: 99px; padding: 3px 14px; font-size: 13px; margin-bottom: 10px; }
.sahm-st-launch-head h2 { margin: 6px 0 4px; font-size: 21px; color: var(--ink, #2b2b2b); }
.sahm-st-launch-head p { margin: 0; color: var(--soft, #6f6e66); font-size: 13px; }
.sahm-st-launch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .sahm-st-launch-cols { grid-template-columns: 1fr; } }
.sahm-st-launch-col h3 { font-size: 13px; color: var(--ink, #2b2b2b); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1.5px dashed var(--line, #e6e3d6); }
.sahm-st-launch-col .sahm-input { width: 100%; box-sizing: border-box; }
.sahm-st-launch-res, .sahm-st-launch-saved { margin-top: 10px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.sahm-st-launch-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; padding: 9px 12px; border: 1.5px solid var(--line, #e6e3d6); border-radius: var(--r-sm, 9px); background: var(--card, #fff); cursor: pointer; font-size: 12.5px; font-family: inherit; color: var(--ink, #2b2b2b); transition: transform .12s, box-shadow .12s; }
.sahm-st-launch-item:hover { transform: translate(-1px,-1px); box-shadow: var(--sh-soft, 2px 2px 0 rgba(43,43,43,.14)); border-color: var(--ink, #2b2b2b); }
.sahm-st-launch-item .tk { font-family: var(--mono, monospace); color: var(--soft, #6f6e66); font-size: 11px; }
.sahm-st-launch-sub { margin-top: 12px; padding: 12px; border: 1.5px dashed var(--brand-line, #bfe0d0); border-radius: var(--r-sm, 9px); background: var(--brand-soft, #dff1e8); }
.sahm-st-launch-sub b { display: block; margin-bottom: 8px; font-size: 12.5px; }
.sahm-st-launch-sub .row { display: flex; gap: 8px; flex-wrap: wrap; }
.sahm-st-launch-choice { flex: 1; min-width: 120px; padding: 10px; border: 1.5px solid var(--ink, #2b2b2b); border-radius: var(--r-sm, 9px); background: var(--card, #fff); cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink, #2b2b2b); }
.sahm-st-launch-choice:hover { background: var(--head, #f8f6ec); }
.sahm-st-launch-back { background: transparent; border: 0; color: var(--soft, #6f6e66); cursor: pointer; font-family: inherit; font-size: 11.5px; margin-top: 8px; text-decoration: underline; }
.sahm-st-launch-empty { color: var(--faint, #a09e92); font-size: 12px; padding: 8px 2px; }

/* ============================================================
   تحديث الهوية — «مذكّرة البحث» (5.32.71)
   طبقة تجاوزات آمنة: مسطرة دفترية لعناوين الأقسام + علامة افتتاحية.
   لا تعدّل أي HTML؛ تتبنّاها كل الصفحات عبر .sahm-panel-head.
   ============================================================ */
:root{ --line-strong:#d6d2c2; --zebra:#fcfbf6; }

/* مسطرة دفترية أسفل عنوان كل قسم + علامة خضراء افتتاحية للعنوان */
.sahm-app .sahm-panel-head{ padding-bottom:11px; border-bottom:1.5px dashed var(--line-strong); }
.sahm-app .sahm-panel-head > h2{ position:relative; padding-inline-start:13px; letter-spacing:.2px; }
.sahm-app .sahm-panel-head > h2::before{
  content:''; position:absolute; inset-inline-start:0; top:50%; transform:translateY(-50%);
  width:4px; height:1.05em; border-radius:2px; background:var(--brand);
}

/* المسطرة الدفترية كأداة مستقلّة (للاستعمال الصريح في الأقسام لاحقًا) */
.sahm-app .sahm-led{ display:flex; align-items:center; gap:12px; margin:26px 0 13px; }
.sahm-app .sahm-led .lbl{ font-family:var(--mono); font-size:10.5px; letter-spacing:2.5px; color:var(--soft); text-transform:uppercase; white-space:nowrap; }
.sahm-app .sahm-led .rule{ flex:1 1 auto; height:0; border-top:1.5px dashed var(--line-strong); }
.sahm-app .sahm-led .tag{ font-family:var(--mono); font-size:10.5px; color:var(--faint); white-space:nowrap; }

/* رقاقة المصدر/الحالة بهوية موحّدة (اختيارية الاستعمال) */
.sahm-app .sahm-srcchip{ display:inline-flex; align-items:center; gap:6px; background:var(--card); border:1.5px solid var(--line); border-radius:99px; padding:3px 11px; font-size:11.5px; color:var(--soft); }
.sahm-app .sahm-freshdot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; display:inline-block; }
.sahm-app .sahm-freshdot.is-live{ background:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.sahm-app .sahm-freshdot.is-stale{ background:var(--gold,#a9781f); box-shadow:0 0 0 3px var(--gold-soft,#f4ecd9); }
.sahm-app .sahm-freshdot.is-disc{ background:var(--faint); box-shadow:0 0 0 3px #ece9df; }

/* ============================================================
   تحديث الهوية — جداول «مذكّرة البحث» (5.32.72)
   صفوف هيرلاين + تخطيط متناوب + تمرير أخضر، بدل شبكة الخلايا.
   لا يمسّ جدول الاستوديو (.sahm-xl-table صنف مستقلّ).
   ============================================================ */
.sahm-app .sahm-table{ background:var(--card); }
.sahm-app .sahm-table thead th{ border:0; border-bottom:1.5px solid var(--line-strong); background:var(--head); color:var(--soft); font-size:11px; letter-spacing:.3px; }
.sahm-app .sahm-table tbody td{ border:0; border-bottom:1px solid var(--line); }
.sahm-app .sahm-table tbody tr:nth-child(even) td{ background:var(--zebra); }
.sahm-app .sahm-table tbody tr:hover td{ background:var(--brand-soft) !important; }
.sahm-app .sahm-table tbody tr:last-child td{ border-bottom:0; }
/* احفظ صفوف المجاميع/المُبرَزة فوق التخطيط المتناوب */
.sahm-app .sahm-table tr.row-total td,
.sahm-app .sahm-table td.row-strong,
.sahm-app .sahm-table .row-strong td{ background:var(--head); font-weight:600; }

/* ============================================================
   تحديث الهوية — مسطرة الأقسام المرقّمة (5.32.73)
   تمديد توقيع «مذكّرة البحث» إلى عناوين .sahm-sec (الرئيسية وغيرها)
   عبر ::after المرن — لا تعديل HTML.
   ============================================================ */
.sahm-app .sahm-sec::after{
  content:''; flex:1 1 auto; height:0; align-self:center;
  border-top:1.5px dashed var(--line-strong); order:5; min-width:24px;
}
.sahm-app .sahm-sec .sahm-sec-side{ order:6; margin-inline-start:0; }

/* خلية خطّ الاتجاه في جداول القوائم (5.32.74) */
.sahm-app .sahm-table th.sahm-spk-h{ width:84px; }
.sahm-app .sahm-table td.sahm-spk{ width:84px; padding-block:5px; text-align:center; }
.sahm-app .sahm-table td.sahm-spk svg{ margin-inline:auto; }

/* حاشية القوائم الوصفية (5.32.75) */
.sahm-app .sahm-stmt-note{ margin:11px 0 4px; padding-top:10px; border-top:1.5px dashed var(--line-strong); font-size:11.5px; color:var(--faint); }

/* إزالة خطوط شبكة خلفية الصفحات — خلفية صلبة بلا شبكة (5.32.76) */
body.sahm-canvas,
html[data-sahm-theme="dark"] body.sahm-canvas{ background: var(--bg) !important; }

/* ============================================================
   قائمة المتابعة — إعادة تصميم البطاقات + شريط مدى ٥٢ أسبوعًا (5.32.77)
   ============================================================ */
.sahm-app .sahm-watch-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
@media (max-width:820px){ .sahm-app .sahm-watch-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .sahm-app .sahm-watch-grid{ grid-template-columns:1fr; } }
.sahm-app .sahm-watch-it{ display:block; text-decoration:none; color:inherit; background:var(--card); border:1.5px solid var(--ink); border-radius:var(--r); box-shadow:var(--sh-soft); padding:15px 16px 14px; transition:transform .13s, box-shadow .13s; }
.sahm-app .sahm-watch-it:hover{ transform:translate(-2px,-2px); box-shadow:var(--sh); }
.sahm-app .sahm-watch-top{ display:flex; align-items:center; gap:8px; margin-bottom:9px; }
.sahm-app .sahm-watch-tk{ font-family:var(--mono); font-size:12px; color:var(--brand-deep); background:var(--brand-soft); border:1.5px solid var(--brand-line); border-radius:7px; padding:2px 9px; letter-spacing:1px; }
.sahm-app .sahm-watch-fresh{ margin-inline-start:auto; display:inline-flex; align-items:center; gap:5px; font-size:10.5px; color:var(--soft); white-space:nowrap; }
.sahm-app .sahm-watch-dot{ width:7px; height:7px; border-radius:50%; display:inline-block; flex:0 0 auto; }
.sahm-app .sahm-watch-dot.is-live{ background:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.sahm-app .sahm-watch-dot.is-stale{ background:var(--gold,#a9781f); box-shadow:0 0 0 3px var(--gold-soft,#f4ecd9); }
.sahm-app .sahm-watch-nm{ font-size:14.5px; font-weight:600; line-height:1.35; margin-bottom:11px; }
.sahm-app .sahm-watch-price{ display:flex; align-items:baseline; gap:6px; margin-bottom:13px; }
.sahm-app .sahm-watch-p{ font-family:var(--mono); font-size:24px; font-weight:600; line-height:1; }
.sahm-app .sahm-watch-cur{ font-size:11px; color:var(--soft); font-family:var(--mono); }
.sahm-app .sahm-watch-range{ margin-bottom:13px; }
.sahm-app .sahm-watch-rlbl{ display:flex; justify-content:space-between; font-family:var(--mono); font-size:9.5px; color:var(--faint); margin-bottom:4px; }
.sahm-app .sahm-watch-rbar{ position:relative; height:6px; background:var(--head); border:1.5px solid var(--line); border-radius:99px; }
.sahm-app .sahm-watch-fill{ position:absolute; top:50%; transform:translateY(-50%); height:3px; background:var(--brand-line); border-radius:99px; }
.sahm-app .sahm-watch-mk{ position:absolute; top:50%; transform:translate(50%,-50%); width:11px; height:11px; border-radius:50%; background:var(--brand-deep); border:2px solid var(--card); box-shadow:0 0 0 1.5px var(--brand-deep); }
.sahm-app .sahm-watch-rcap{ font-size:10px; color:var(--faint); margin-top:5px; text-align:center; }
.sahm-app .sahm-watch-mets{ display:grid; grid-template-columns:repeat(3,1fr); border-top:1.5px dashed var(--line); padding-top:11px; }
.sahm-app .sahm-watch-met{ text-align:center; border-inline-start:1px solid var(--line); display:flex; flex-direction:column; }
.sahm-app .sahm-watch-met:first-child{ border-inline-start:0; }
.sahm-app .sahm-watch-met .k{ font-size:9.5px; color:var(--soft); margin-bottom:3px; }
.sahm-app .sahm-watch-met .v{ font-family:var(--mono); font-size:13.5px; font-weight:600; }

/* إصلاح الوضع الداكن لطبقات التصميم 71-79 (5.32.80) */
html[data-sahm-theme="dark"] .sahm-app,
html[data-sahm-theme="dark"] body.sahm-canvas{ --line-strong:#3f4742; --zebra:rgba(255,255,255,.028); }
html[data-sahm-theme="dark"] .sahm-app .sahm-freshdot.is-disc,
html[data-sahm-theme="dark"] .sahm-app .sahm-watch-dot.is-disc{ box-shadow:0 0 0 3px rgba(255,255,255,.06); }

/* إصلاح heatmap «تغطية القطاعات» في الوضع الداكن — طبقات i1/i2 كانت فاتحة ثابتة (5.32.81) */
html[data-sahm-theme="dark"] .sahm-seccell.i1{ background: rgba(79,192,141,.06); }
html[data-sahm-theme="dark"] .sahm-seccell.i2{ background: rgba(79,192,141,.11); }

/* ============================================================
   «زُرتها مؤخرًا» — إعادة تصميم: صفّ بطاقات أفقيّ + ترويسة ↺ + مسح (5.32.82)
   توكنز فقط → آمن للوضع الداكن.
   ============================================================ */
.sahm-app .sahm-rv-head{ display:flex; align-items:center; gap:12px; margin:26px 0 14px; }
.sahm-app .sahm-rv-ic{ width:26px; height:26px; flex:0 0 auto; display:grid; place-items:center; border:1.5px solid var(--ink); border-radius:7px; background:var(--card); color:var(--brand); }
.sahm-app .sahm-rv-head h3{ margin:0; font-size:16px; font-weight:700; white-space:nowrap; }
.sahm-app .sahm-rv-rule{ flex:1 1 auto; height:0; border-top:1.5px dashed var(--line-strong); }
.sahm-app .sahm-rv-clear{ font-family:var(--mono); font-size:11px; color:var(--soft); background:none; border:1.5px solid var(--line); border-radius:99px; padding:3px 11px; cursor:pointer; white-space:nowrap; display:inline-flex; gap:5px; align-items:center; }
.sahm-app .sahm-rv-clear:hover{ border-color:var(--ink); color:var(--ink); }
.sahm-app .sahm-rv-row{ display:flex; gap:11px; overflow-x:auto; padding:3px 1px 12px; scroll-snap-type:x proximity; }
.sahm-app .sahm-rv-row::-webkit-scrollbar{ height:7px; }
.sahm-app .sahm-rv-row::-webkit-scrollbar-thumb{ background:var(--faint); border-radius:99px; }
.sahm-app .sahm-rv{ flex:0 0 auto; width:180px; scroll-snap-align:start; display:flex; flex-direction:column; gap:9px; text-decoration:none; color:inherit; background:var(--card); border:1.5px solid var(--ink); border-radius:var(--r); box-shadow:var(--sh-soft); padding:13px 14px; transition:transform .13s, box-shadow .13s; position:relative; }
.sahm-app .sahm-rv:hover{ transform:translate(-2px,-2px); box-shadow:var(--sh); }
.sahm-app .sahm-rv-tk{ font-family:var(--mono); font-size:13px; font-weight:600; color:var(--brand-deep); background:var(--brand-soft); border:1.5px solid var(--brand-line); border-radius:7px; padding:2px 10px; letter-spacing:1px; align-self:flex-start; }
.sahm-app .sahm-rv-nm{ font-size:12.5px; font-weight:500; line-height:1.4; color:var(--ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.5em; }
.sahm-app .sahm-rv-go{ position:absolute; inset-inline-end:11px; bottom:11px; color:var(--faint); opacity:0; transform:translateX(4px); transition:transform .13s, opacity .13s; }
.sahm-app .sahm-rv:hover .sahm-rv-go{ opacity:1; transform:translateX(0); }
@media (prefers-reduced-motion:reduce){ .sahm-app .sahm-rv, .sahm-app .sahm-rv-go{ transition:none; } }

/* ============================================================
   «أحدث تحديثات البيانات» — بطاقات شبكة (شارة + نقطة حداثة + سعر + وقت) (5.32.83)
   توكنز فقط → آمن للوضع الداكن.
   ============================================================ */
.sahm-app .sahm-updates{ display:grid; grid-template-columns:repeat(4,1fr); gap:11px; }
@media (max-width:760px){ .sahm-app .sahm-updates{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:430px){ .sahm-app .sahm-updates{ grid-template-columns:1fr; } }
.sahm-app .sahm-uitem{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; text-decoration:none; color:inherit; background:var(--card); border:1.5px solid var(--ink); border-radius:var(--r-sm); box-shadow:var(--sh-soft); padding:11px 13px; transition:transform .13s, box-shadow .13s; }
.sahm-app .sahm-uitem:hover{ transform:translate(-2px,-2px); box-shadow:var(--sh); }
.sahm-app .sahm-uitem-top{ display:flex; align-items:center; gap:7px; width:100%; }
.sahm-app .sahm-uitem .sahm-ut{ font-size:12px; font-weight:600; color:var(--brand-deep); background:var(--brand-soft); border:1.5px solid var(--brand-line); border-radius:6px; padding:1px 8px; letter-spacing:.5px; }
.sahm-app .sahm-udot{ width:7px; height:7px; border-radius:50%; margin-inline-start:auto; flex:0 0 auto; }
.sahm-app .sahm-udot.is-live{ background:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.sahm-app .sahm-udot.is-stale{ background:var(--gold,#a9781f); box-shadow:0 0 0 3px var(--gold-soft,#f4ecd9); }
.sahm-app .sahm-uitem .sahm-up2{ font-size:18px; font-weight:600; color:var(--ink); line-height:1; }
.sahm-app .sahm-uitem .sahm-uw{ font-size:10px; color:var(--faint); }

/* ============================================================
   (5.32.85) لوحة الشركات + تغطية القطاعات في صفّ واحد · و«زُرتها مؤخرًا» كشبكة بطاقات
   ============================================================ */
/* أبقِ عمود الجدول + rail القطاعات جنبًا لجنب من 760px فأعلى (بدل التكدّس ≤1024px) */
@media (min-width:760px){
  .sahm-app .sahm-lead{ grid-template-columns: minmax(0,1fr) 300px; }
  .sahm-app .sahm-lead .sahm-rail{ flex-direction:column; }
}
/* «زُرتها مؤخرًا»: شبكة بطاقات مثل «أحدث تحديثات البيانات» بدل الصفّ الأفقيّ */
.sahm-app .sahm-rv-row{ display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:11px; overflow:visible; padding:3px 1px 4px; scroll-snap-type:none; }
.sahm-app .sahm-rv{ width:auto; }

/* ============================================================
   تحسين الشريط العلويّ (5.32.86) — بحث دائريّ بارز + رقائق تفاعلية + كبسة /
   CSS فقط · توكنز → آمن للوضع الداكن · لا يمسّ الوظائف/المعرّفات.
   ============================================================ */
.sahm-app .sahm-topbar .sahm-nav-search{ border-radius:99px; border-color:var(--ink); box-shadow:var(--sh-soft); transition:box-shadow .13s, transform .13s; }
.sahm-app .sahm-topbar .sahm-nav-search:focus-within{ box-shadow:var(--sh); transform:translate(-1px,-1px); }
.sahm-app .sahm-topbar .sahm-nav-search kbd{ border-bottom-width:2.5px; border-radius:6px; padding:1px 7px; }
.sahm-app .sahm-topchip{ transition:transform .12s, box-shadow .12s; }
.sahm-app .sahm-topchip:hover{ box-shadow:var(--sh-soft); transform:translate(-1px,-1px); }
.sahm-app .sahm-topchip svg{ color:var(--brand); }
@media (prefers-reduced-motion:reduce){ .sahm-app .sahm-topbar .sahm-nav-search, .sahm-app .sahm-topchip{ transition:none; } }


/* ============================================================
   طبقة المكوّنات — نظام تصميم سهم (5.32.x)
   إضافية بالكامل: أصناف جديدة لا تستعملها أي صفحة بعد، فلا تغيّر أي
   مظهر قائم. تُهاجَر إليها الصفحات تباعًا (الأنماط السطرية ← أصناف).
   ============================================================ */

/* البطاقة القانونية (كانت غير مُعرّفة) — نفس أساس الورق في اللوحات */
.sahm-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); padding: 16px 18px; }
.sahm-card--flush { padding: 0; }
.sahm-card--soft { box-shadow: var(--sh-soft); }
.sahm-card--pin { position: relative; }
.sahm-card--pin::after { content: "\1F4CC"; position: absolute; top: -13px; inset-inline-start: 18px; font-size: 18px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }

/* تحويرات الرقاقة القانونية — على .sahm-chip القائمة دون مسّ أساسها */
.sahm-chip--soft { border-color: var(--line); color: var(--soft); }
.sahm-chip--brand { color: var(--brand-deep); border-color: var(--brand-line); background: var(--brand-soft); }
.sahm-chip--mono { font-family: var(--mono); }
.sahm-chip--row { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sahm-fineprint { font-size: 11.5px; color: var(--soft); line-height: 1.6; }

/* خاتم الشريط اللاصق المدوّر — الأساس المشترك لاحقًا لـ sec-no / preview-badge */
.sahm-stamp { display: inline-block; background: var(--tape); color: #4a3d08; border-radius: 3px; padding: 2px 11px; font-size: 10.5px; font-weight: 700; font-family: var(--mono); letter-spacing: .5px; transform: rotate(-1.5deg); box-shadow: 0 2px 5px rgba(0,0,0,.16); }
.sahm-stamp--brand { background: var(--brand-soft); color: var(--brand-deep); }
html[data-sahm-theme="dark"] .sahm-stamp { color: #2a230a; }

/* هيكل التحميل الوامض */
.sahm-skeleton { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--head) 25%, var(--line) 37%, var(--head) 63%); background-size: 400% 100%; animation: sahm-shimmer 1.3s ease infinite; min-height: 14px; }
.sahm-skeleton + .sahm-skeleton { margin-top: 8px; }
@keyframes sahm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sahm-skeleton { animation: none; } }

/* حالة فارغة موحّدة (أيقونة + عنوان + سطر + إجراء) */
.sahm-empty-state { text-align: center; color: var(--soft); padding: 28px 16px; }
.sahm-empty-state .es-ic { color: var(--faint); margin-bottom: 8px; display: inline-flex; }
.sahm-empty-state h4 { margin: 0 0 4px; font-size: 13.5px; color: var(--ink); font-weight: 700; }
.sahm-empty-state p { margin: 0 0 12px; font-size: 12px; }

/* ===== توقيع الحركة الموحّد — ضغطة النقر داخل الورق (5.32.x، إضافية بالكامل) ===== */
:root { --press-t: .13s ease; }
.sahm-pressable { transition: transform var(--press-t), box-shadow var(--press-t); }
.sahm-pressable:hover { transform: translate(-1px, -1px); box-shadow: var(--sh); }
.sahm-pressable:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(43, 43, 43, .2); transition-duration: .05s; }
/* إكمال الإحساس اللمسي: العناصر المرتفعة عند المرور تنضغط داخل الورق عند النقر */
.sahm-auth-btn:active, .sahm-acct-cta:active, .sahm-open-go:active, .sahm-fn:active,
.sahm-ws-card:active, .sahm-ws-back:active, .sahm-recent-chip:active, .sahm-cv-gal-item:active,
.sahm-cta-btn:active, .sahm-cont-go:active, .sahm-hstep:active, .sahm-seccell:active, .sahm-topchip:active {
	transform: translate(1px, 1px) !important;
	box-shadow: 1px 1px 0 rgba(43, 43, 43, .2) !important;
	transition-duration: .05s;
}
.sahm-theme-toggle:active, .sahm-rlink:active, .sahm-watch-btn:active, .sahm-confirm-cancel:active,
.sahm-heat-cell:active, #sahm-side.sahm-rail .sahm-side-recent-it:active {
	transform: translate(1px, 1px) !important;
	transition-duration: .05s;
}

/* Computed-from-financials marker (≈) on KPIs/quote chips */
.sahm-est{font-size:.7em;color:var(--brand,#1f7a4d);margin-inline-start:2px;cursor:help;font-weight:700;opacity:.85}

/* =================================================================
   Community — research-note editorial redesign (token-based; dark-safe)
   ================================================================= */
.sahm-comm .comm-eyebrow{display:flex;align-items:center;gap:10px;margin:0 0 14px}
.sahm-comm .comm-eyebrow .tick{width:9px;height:9px;background:var(--brand);border-radius:2px;flex:0 0 auto;transform:rotate(45deg)}
.sahm-comm .comm-eyebrow .lbl{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11px;font-weight:600;letter-spacing:2px;color:var(--brand-deep);text-transform:uppercase;white-space:nowrap}
.sahm-comm .comm-eyebrow .rule{height:1px;background:var(--line-strong);flex:1 1 auto}

.comm-masthead{padding:26px 0 18px;border-bottom:2px solid var(--ink);margin-bottom:2px}
.comm-masthead .comm-mast-top{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap}
.comm-masthead h1{font-size:33px;font-weight:700;margin:0;letter-spacing:-.5px;line-height:1.12}
.comm-masthead p{margin:8px 0 0;font-size:14px;max-width:560px}
.comm-issue{text-align:end;flex:0 0 auto}
.comm-issue .q{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:13px;font-weight:600;color:var(--ink)}
.comm-issue .fresh{margin-top:4px;font-size:12px;color:var(--faint);display:inline-flex;align-items:center;gap:6px}
.comm-issue .dot{width:7px;height:7px;border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);display:inline-block}

.comm-grid{display:grid;grid-template-columns:1fr 330px;gap:26px;align-items:start;padding:22px 0 50px}
@media(max-width:900px){.comm-grid{grid-template-columns:1fr}}
.comm-shadow{box-shadow:0 1px 2px rgba(20,25,15,.05),0 10px 26px -20px rgba(20,25,15,.4)}

.comm-spotlight{background:linear-gradient(180deg,var(--brand-soft),var(--card));border:1px solid var(--brand-line);border-radius:16px;padding:18px 20px;position:relative;overflow:hidden}
.comm-spotlight::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:var(--brand)}
.comm-spotlight .sp-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.comm-spotlight .sp-name{font-size:19px;font-weight:700}
.comm-spotlight .sp-meta{color:var(--brand-deep);font-size:12.5px;margin-top:2px}
.comm-spotlight .sp-stats{margin-inline-start:auto;display:flex;gap:22px;text-align:center}
.comm-spotlight .sp-stats b{display:block;font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:20px;line-height:1}
.comm-spotlight .sp-stats span{font-size:11.5px;color:var(--faint)}

.comm-toolbar{display:flex;align-items:center;gap:10px;margin:20px 0 16px;flex-wrap:wrap}
.comm-tabs{display:inline-flex;background:var(--cell);border:1px solid var(--line);border-radius:11px;padding:3px;gap:2px}
.comm-tabs button{border:0;background:transparent;color:var(--faint);font-family:inherit;font-size:13px;font-weight:600;padding:7px 13px;border-radius:8px;cursor:pointer}
.comm-tabs button.on{background:var(--card);color:var(--ink)}
.comm-search{flex:1 1 150px;display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:11px;padding:0 12px;min-width:140px}
.comm-search input{border:0;background:transparent;color:var(--ink);font-family:inherit;font-size:13.5px;padding:10px 0;width:100%;outline:none}
.comm-search svg{color:var(--faint);flex:0 0 auto}
.comm-cta{display:inline-flex;align-items:center;gap:7px;background:var(--brand);color:#fff;border:0;font-family:inherit;font-weight:600;font-size:13.5px;padding:11px 16px;border-radius:11px;cursor:pointer}
.comm-cta:hover{background:var(--brand-deep)}

.comm-card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px 18px;margin-bottom:14px;transition:border-color .15s}
.comm-card:hover{border-color:var(--brand-line)}
.comm-card .cc-head{display:flex;gap:11px;align-items:center}
.comm-card .cc-auth{min-width:0}
.comm-card .cc-nm{font-weight:700;font-size:13.5px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.comm-card .cc-sub{font-size:11.5px;color:var(--faint)}
.comm-card .cc-rate{margin-inline-start:auto;text-align:end;flex:0 0 auto}
.comm-card .cc-rate .num{font-size:11.5px;color:var(--faint);font-family:"IBM Plex Mono",ui-monospace,monospace}
.comm-card h3{margin:13px 0 4px;font-size:18px;font-weight:700;letter-spacing:-.2px}
.comm-card .cc-desc{font-size:13.5px;opacity:.85;margin:6px 0 0}
.comm-ticker{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12px;font-weight:600;color:var(--brand-deep);background:var(--brand-soft);border:1px solid var(--brand-line);padding:1px 7px;border-radius:6px;vertical-align:middle}
.comm-metabar{display:flex;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);flex-wrap:wrap}
.comm-chip{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--faint);font-family:"IBM Plex Mono",ui-monospace,monospace}
.comm-stars{color:var(--gold);font-size:15px;letter-spacing:1px}
.comm-stars .e{color:var(--line-strong)}
.comm-spacer{margin-inline-start:auto}

.comm-panel{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:15px 16px;margin-bottom:18px}
.comm-lead{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line)}
.comm-lead:first-of-type{border-top:0}
.comm-lead .rk{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:13px;color:var(--faint);width:18px;text-align:center;flex:0 0 auto}
.comm-lead .rk.top{color:var(--gold);font-weight:700}
.comm-lead .nm{font-size:13px;font-weight:600;flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.comm-lead .nm a{display:flex;align-items:center;gap:6px;color:inherit;text-decoration:none;min-width:0;white-space:normal;overflow-wrap:anywhere}
.comm-lead .sc{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12.5px;color:var(--brand-deep);flex:0 0 auto}
.comm-chal{padding:11px;border:1px solid var(--brand-line);border-radius:11px;background:var(--brand-soft);margin-bottom:8px}
.comm-chal .t{font-weight:700;font-size:13.5px}
.comm-chal .d{font-size:12px;color:var(--brand-deep);margin-top:2px}
.comm-win{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px solid var(--line);font-size:12.5px}
.comm-how{list-style:none;padding:0;margin:4px 0 0}
.comm-how li{font-size:12.5px;color:var(--faint);margin:7px 0}
.comm-how b{color:var(--ink)}

/* =================================================================
   Responsive hardening (mobile / tablet) — global safety nets
   ================================================================= */
img, canvas, svg, video { max-width: 100%; }
.sahm-table-wrap { max-width: 100%; }
/* the redesigned community toolbar: keep search usable when it wraps */
@media (max-width: 560px){
  .comm-toolbar .comm-tabs{ width:100%; justify-content:space-between; }
  .comm-toolbar .comm-search{ order:3; flex:1 1 100%; }
  .comm-toolbar .comm-cta{ order:2; }
  .comm-spotlight .sp-stats{ margin-inline-start:0; gap:18px; }
  .comm-masthead h1{ font-size:27px; }
}
@media (max-width: 600px){
  /* iOS auto-zooms inputs whose font-size < 16px on focus — prevent it */
  .sahm-input, input.sahm-input, select.sahm-input, textarea.sahm-input,
  .sahm-company-search, .sahm-ai-q, .comm-search input,
  .sahm-nav-search input, .sahm-search input { font-size: 16px; }
  /* comfortable tap targets for primary/standard buttons */
  .sahm-btn:not(.sahm-xs){ min-height: 40px; }
}
@media (max-width: 520px){
  .sahm-secgrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Quote-strip / KPI value cards: never let a long mono number (e.g. market cap
   80,623,411,200) overflow. Flex children shrink by default, squeezing the card
   narrower than the non-wrapping number; pin their size and allow wrapping. */
.sahm-quote-item { flex: 0 0 auto; max-width: 100%; }
.sahm-quote-item b { overflow-wrap: anywhere; max-width: 100%; }
.sahm-kpi { min-width: 0; }
.sahm-kpi b { overflow-wrap: anywhere; }
@media (max-width: 560px){
  .sahm-quote-item b { font-size: 13px; }
  .sahm-quote-item:first-child b { font-size: 15px; }
  .sahm-kpi b { font-size: 15px; }
}

/* =================================================================
   Pricing — research-note editorial redesign (token-based; dark-safe)
   ================================================================= */
.sahm-pricing .pr-eyebrow{display:flex;align-items:center;gap:10px;margin:0 0 16px}
.sahm-pricing .pr-eyebrow.center{justify-content:center}
.sahm-pricing .pr-eyebrow .tick{width:9px;height:9px;background:var(--brand);border-radius:2px;flex:0 0 auto;transform:rotate(45deg)}
.sahm-pricing .pr-eyebrow .lbl{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:11px;font-weight:600;letter-spacing:2px;color:var(--brand-deep);text-transform:uppercase;white-space:nowrap}
.sahm-pricing .pr-eyebrow .rule{height:1px;background:var(--line-strong);flex:1 1 auto}
.sahm-pricing .pr-eyebrow.center .rule{display:none}

.pr-hero{text-align:center;padding:30px 0 24px}
.pr-hero h1{font-size:34px;font-weight:700;letter-spacing:-.5px;margin:0 0 12px;line-height:1.12}
.pr-hero p{font-size:14.5px;color:var(--faint);max-width:620px;margin:0 auto}
.pr-trust{margin-top:18px;display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pr-tpill{font-size:12px;color:var(--brand-deep);background:var(--brand-soft);border:1px solid var(--brand-line);padding:4px 12px;border-radius:20px}
.pr-active{margin-top:16px;font-weight:600;color:var(--brand-deep);font-size:14px}

/* plans */
.sahm-pricing #pr-plans{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:760px;margin:0 auto;align-items:stretch}
@media(max-width:640px){.sahm-pricing #pr-plans{grid-template-columns:1fr}}
.sahm-pricing .pr-plan{position:relative;display:flex;flex-direction:column;background:var(--card);border:1.5px solid var(--line);border-radius:18px;padding:26px 24px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04),0 12px 30px -24px rgba(0,0,0,.5);transition:border-color .15s,transform .15s}
.sahm-pricing .pr-plan:hover{transform:translateY(-2px);border-color:var(--brand-line)}
.sahm-pricing .pr-plan.pr-best{border-color:var(--brand)}
.sahm-pricing .pr-plan.sel{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand) inset}
.sahm-pricing .pr-ribbon{position:absolute;top:-13px;inset-inline-start:50%;transform:translateX(50%);background:var(--brand);color:#fff;font-size:12px;font-weight:700;padding:4px 14px;border-radius:20px;white-space:nowrap}
.sahm-pricing .pr-cycle{font-size:14px;font-weight:700;color:var(--faint)}
.sahm-pricing .pr-price{display:flex;align-items:baseline;gap:6px;margin:12px 0 2px}
.sahm-pricing .pr-price b{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:40px;font-weight:600;letter-spacing:-1px;line-height:1;color:var(--ink)}
.sahm-pricing .pr-cur{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:15px;color:var(--faint);font-weight:600}
.sahm-pricing .pr-per{font-size:13px;color:var(--faint)}
.sahm-pricing .pr-equiv{margin-top:8px;font-size:12.5px;color:var(--brand-deep);font-weight:600}
.sahm-pricing .pr-save{margin-top:10px;align-self:flex-start;font-size:12px;font-weight:700;color:var(--brand-deep);background:var(--brand-soft);border:1px solid var(--brand-line);padding:3px 10px;border-radius:8px}
.sahm-pricing .pr-feats{list-style:none;padding:0;margin:18px 0 18px;display:flex;flex-direction:column;gap:9px}
.sahm-pricing .pr-feats li{display:flex;gap:9px;align-items:flex-start;font-size:13.5px}
.sahm-pricing .pr-feats svg{flex:0 0 auto;margin-top:3px;color:var(--brand)}
.sahm-pricing .pr-cta-btn{margin-top:auto;text-align:center;font-weight:700;font-size:14.5px;padding:13px;border-radius:12px;border:1.5px solid var(--brand);background:var(--brand);color:#fff}
.sahm-pricing .pr-plan:not(.pr-best) .pr-cta-btn{background:transparent;color:var(--brand-deep);border-color:var(--brand-line)}
.pr-allnote{text-align:center;font-size:13px;color:var(--faint);margin:18px auto 0;max-width:620px}
.pr-allnote b{color:var(--ink)}

/* sections */
.pr-section{padding:46px 0 6px}
.pr-section h2{font-size:25px;font-weight:700;letter-spacing:-.3px;margin:0 0 6px}
.pr-section .pr-lead{color:var(--faint);font-size:14px;margin:0 0 24px;max-width:620px}

.pr-vgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:820px){.pr-vgrid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.pr-vgrid{grid-template-columns:1fr}}
.pr-vcard{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;transition:border-color .15s,transform .15s}
.pr-vcard:hover{border-color:var(--brand-line);transform:translateY(-2px)}
.pr-vicon{width:38px;height:38px;border-radius:10px;background:var(--brand-soft);border:1px solid var(--brand-line);color:var(--brand-deep);display:inline-flex;align-items:center;justify-content:center;margin-bottom:12px}
.pr-vcard h3{font-size:15px;font-weight:700;margin:0 0 5px}
.pr-vcard p{font-size:13px;color:var(--faint);margin:0}

.pr-checkwrap{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:24px}
.pr-checkcols{display:grid;grid-template-columns:repeat(4,1fr);gap:22px}
@media(max-width:820px){.pr-checkcols{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.pr-checkcols{grid-template-columns:1fr}}
.pr-ccol h4{font-size:12px;font-family:"IBM Plex Mono",ui-monospace,monospace;letter-spacing:1px;color:var(--brand-deep);text-transform:uppercase;margin:0 0 10px;font-weight:600}
.pr-ccol ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.pr-ccol li{display:flex;gap:8px;align-items:flex-start;font-size:13px}
.pr-ccol svg{flex:0 0 auto;margin-top:3px;color:var(--brand)}

.pr-truststrip{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media(max-width:680px){.pr-truststrip{grid-template-columns:1fr}}
.pr-tcard{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;gap:12px;align-items:flex-start}
.pr-tcard svg{flex:0 0 auto;color:var(--brand);margin-top:2px}
.pr-tcard b{font-size:13.5px;display:block;margin-bottom:2px}
.pr-tcard span{font-size:12.5px;color:var(--faint)}

.pr-faq{display:flex;flex-direction:column;gap:10px;max-width:760px;margin:0 auto}
.pr-qa{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.pr-qa .q{font-size:14px;font-weight:700}
.pr-qa .a{font-size:13px;color:var(--faint);margin:7px 0 0}

.pr-ctaband{margin:50px 0 30px;background:linear-gradient(180deg,var(--brand-soft),var(--card));border:1px solid var(--brand-line);border-radius:18px;padding:34px;text-align:center}
.pr-ctaband h2{font-size:23px;margin:0 0 8px}
.pr-ctaband p{color:var(--brand-deep);font-size:14px;margin:0 0 18px}

/* ===== Account page — membership dashboard (sahm 5.33) ===== */
.sahm-account > section,
.sahm-account > .sahm-acct-stats { margin-block-end: 14px; }
.sahm-acct-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: #16553f; border: 1px solid #0f4634; border-radius: 16px; padding: 18px 20px; color: #f3efe2; }
.sahm-acct-hero-id { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; }
.sahm-acct-av { flex: 0 0 auto; inline-size: 60px; block-size: 60px; border-radius: 50%; background: #0f4634; color: #f3efe2; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; overflow: hidden; box-shadow: 0 0 0 3px #d7a93f; }
.sahm-acct-hero-meta { min-width: 0; }
.sahm-acct-hero-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sahm-acct-hero-name b { font-size: 19px; font-weight: 800; line-height: 1.3; }
.sahm-acct-hero .sahm-grade-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.sahm-acct-hero-mail { font-size: 12.5px; color: #a9c6ba; margin-block-start: 2px; }
.sahm-acct-hero-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: 6px; }
.sahm-acct-hero-badges .sahm-badge { background: rgba(215,169,63,.18); color: #f0d9a0; border: 1px solid rgba(215,169,63,.5); font-weight: 700; }
.sahm-acct-plan-pill { display: inline-block; margin-block-start: 8px; background: #d7a93f; color: #3a2c08; font-size: 11.5px; font-weight: 700; padding: 3px 11px; border-radius: 7px; }
.sahm-acct-hero-sub { flex: 1 1 220px; min-width: 200px; background: #0f4634; border-radius: 12px; padding: 13px 15px; }
.sahm-acct-meter-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #a9c6ba; margin-block-end: 7px; }
.sahm-acct-meter-row b { color: #f3efe2; }
.sahm-acct-meter { block-size: 8px; border-radius: 5px; background: #0c3e2d; overflow: hidden; }
.sahm-acct-meter span { display: block; block-size: 100%; background: #d7a93f; border-radius: 5px; }
.sahm-acct-meter-foot { display: flex; justify-content: space-between; align-items: center; margin-block-start: 11px; font-size: 11.5px; color: #a9c6ba; gap: 8px; }
.sahm-acct-meter-foot b { color: #f3efe2; }
.sahm-acct-sub-note { font-size: 12px; color: #a9c6ba; margin: 8px 0 10px; line-height: 1.6; }
.sahm-acct-renew { display: inline-block; background: #d7a93f; color: #3a2c08; font-weight: 700; font-size: 12.5px; padding: 6px 15px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.sahm-acct-renew:hover { background: #e3ba55; }
.sahm-acct-avedit { flex: 1 1 100%; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; padding-block-start: 12px; border-block-start: 1px solid rgba(255,255,255,.12); }
.sahm-acct-avedit .sahm-input { inline-size: auto; font-size: 12px; }
.sahm-acct-avedit #acct-avatar-msg { font-size: 12px; }
.sahm-acct-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sahm-acct-stat { background: var(--head); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.sahm-acct-stat .l { display: block; font-size: 11.5px; color: var(--ink); opacity: .6; margin-block-end: 4px; }
.sahm-acct-stat .v { font-size: 15px; font-weight: 700; color: var(--ink); }
.sahm-acct-stat .v.ok { color: var(--brand); }
.sahm-acct-rows { margin-block-start: 10px; }
.sahm-acct-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 8px 14px; padding-block: 11px; border-block-end: 1px solid var(--line); }
.sahm-acct-row:last-child { border-block-end: 0; }
.sahm-acct-row-l { font-size: 12.5px; color: var(--ink); opacity: .6; }
.sahm-acct-row-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sahm-acct-row-f .sahm-input { flex: 1 1 180px; max-inline-size: 340px; }
.sahm-acct-row-ro { font-size: 13px; color: var(--ink); justify-content: space-between; }
.sahm-acct-lock { font-size: 11px; color: var(--ink); opacity: .55; display: inline-flex; align-items: center; gap: 3px; }
.sahm-acct-pwfields .sahm-input { flex: 1 1 120px; }
.sahm-acct-row-msg { grid-column: 1 / -1; font-size: 12px; }
.sahm-acct-row-msg:empty { display: none; }
@media (max-width: 760px) {
  .sahm-acct-stats { grid-template-columns: repeat(2, 1fr); }
  .sahm-acct-row { grid-template-columns: 1fr; gap: 5px; }
  .sahm-acct-hero-sub { flex-basis: 100%; }
}

/* ===== Account checkout — plan cards + payment-method tiles (sahm 5.33) ===== */
.sahm-account #sahm-checkout .sahm-plan-row { justify-content: flex-start; }
.sahm-co-label { font-size: 12.5px; font-weight: 700; color: var(--ink); opacity: .7; margin: 4px 0 9px; }
.sahm-account .sahm-method-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.sahm-pay-method { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: inherit; font-size: 14px; font-weight: 700; color: #f3efe2; background: #16553f; border: 1px solid #0f4634; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.sahm-pay-method:hover { transform: translateY(-2px); box-shadow: var(--sh-soft); background: #1c6b50; }
.sahm-pay-method svg { flex: 0 0 auto; color: #d7a93f; }

/* Account checkout — align plan CTAs to card bottom (same line regardless of save badge) */
.sahm-account #sahm-checkout .sahm-plan-cta { margin-top: auto; }
.sahm-account #sahm-checkout .sahm-plan-per { margin-bottom: 4px; }
.sahm-account #sahm-checkout .sahm-plan-save { margin-bottom: 4px; }

/* ===== Pricing checkout — payment-method tiles + manual box (sahm 5.33) ===== */
.sahm-pricing #pr-checkout #pr-methods { display: grid; gap: 10px; }
.sahm-pricing .pr-method { position: relative; display: flex; align-items: center; gap: 11px; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; cursor: pointer; background: var(--card); transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.sahm-pricing .pr-method:hover { border-color: var(--brand-line); background: var(--head); }
.sahm-pricing .pr-method.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.sahm-pricing .pr-method input { position: absolute; opacity: 0; pointer-events: none; }
.sahm-pricing .pr-method svg { flex: 0 0 auto; color: var(--brand-deep); }
.sahm-pricing .pr-method-lbl { flex: 1 1 auto; font-weight: 700; font-size: 14px; color: var(--ink); }
.sahm-pricing .pr-method-dot { flex: 0 0 auto; inline-size: 18px; block-size: 18px; border-radius: 50%; border: 2px solid var(--line-strong); position: relative; }
.sahm-pricing .pr-method.sel .pr-method-dot { border-color: var(--brand); }
.sahm-pricing .pr-method.sel .pr-method-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.sahm-pricing #pr-checkout #pr-pay { inline-size: 100%; }
.sahm-pricing .pr-manual-box { border: 1.5px solid var(--brand-line); background: var(--brand-soft); border-radius: 14px; padding: 16px 18px; margin-top: 6px; }
.sahm-pricing .pr-manual-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.sahm-pricing .pr-manual-badge { background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 11px; border-radius: 7px; }
.sahm-pricing .pr-manual-ref { font-size: 13px; color: var(--ink); }
.sahm-pricing .pr-manual-note { font-size: 13px; color: var(--ink); opacity: .8; margin: 0 0 11px; line-height: 1.6; }
.sahm-pricing .pr-manual-pay { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; }
.sahm-pricing .pr-manual-pay .k { font-size: 11.5px; color: var(--ink); opacity: .6; }
.sahm-pricing .pr-manual-pay b { font-size: 14px; color: var(--ink); }
.sahm-pricing .pr-manual-inst { font-size: 12.5px; color: var(--ink); opacity: .7; margin: 4px 0 0; line-height: 1.6; }

/* ===== Admin console — side rail + KPI cards + table polish (sahm 5.33) ===== */
.sahm-admin .sahm-adm { display: flex; gap: 16px; align-items: flex-start; }
.sahm-adm-rail { flex: 0 0 158px; position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sahm-adm-rail-h { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--ink); opacity: .55; padding: 7px 9px 5px; text-transform: uppercase; }
.sahm-admin .sahm-adm-rail .sahm-admin-tab { display: flex; align-items: center; gap: 9px; inline-size: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 9px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: start; transition: background .14s ease, color .14s ease; }
.sahm-admin .sahm-adm-rail .sahm-admin-tab svg { flex: 0 0 auto; opacity: .7; }
.sahm-admin .sahm-adm-rail .sahm-admin-tab:hover { background: var(--head); }
.sahm-admin .sahm-adm-rail .sahm-admin-tab.is-on { background: #16553f; color: #f3efe2; }
.sahm-admin .sahm-adm-rail .sahm-admin-tab.is-on svg { color: #d7a93f; opacity: 1; }
.sahm-adm-body { flex: 1 1 auto; min-width: 0; }
.sahm-adm-kpi { background: var(--head); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.sahm-adm-kpi-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.sahm-adm-kpi-h .l { font-size: 11.5px; color: var(--ink); opacity: .6; }
.sahm-adm-kpi-h .ic { color: var(--brand); display: inline-flex; }
.sahm-adm-kpi .v { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--ink); }
.sahm-adm-kpi .v.is-on { color: var(--brand); }
.sahm-adm-kpi .v.is-off { color: var(--ink); opacity: .5; }
.sahm-adm-body .sahm-table thead th { background: var(--head); font-size: 11.5px; color: var(--ink); opacity: .8; font-weight: 700; }
.sahm-adm-body .sahm-table tbody tr:nth-child(even) { background: var(--head); }
.sahm-adm-body .sahm-table tbody tr:hover { background: var(--brand-soft); }
.sahm-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.sahm-pill-paid { background: var(--brand-soft); color: var(--brand-deep); }
.sahm-pill-pending, .sahm-pill-review { background: var(--gold-soft); color: var(--gold); }
.sahm-pill-failed, .sahm-pill-rejected { background: rgba(210,72,62,.14); color: var(--red); }
.sahm-pill-used { background: var(--head); color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 820px) {
  .sahm-admin .sahm-adm { flex-direction: column; }
  .sahm-adm-rail { position: static; inline-size: 100%; flex-direction: row; flex-wrap: wrap; }
  .sahm-adm-rail-h { display: none; }
  .sahm-admin .sahm-adm-rail .sahm-admin-tab { inline-size: auto; }
}

/* ===== Community comments — facebook-style threads (sahm 5.34) ===== */
.comm-thread { margin: 6px 0 0; }
.comm-empty { font-size: 12.5px; color: var(--ink); opacity: .55; margin: 0 0 10px; }
.comm-c { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.comm-c.is-reply { padding: 6px 0; }
.comm-avlink { flex: 0 0 auto; text-decoration: none; line-height: 0; }
.comm-col { flex: 1 1 auto; min-width: 0; }
.comm-bubble { display: inline-block; max-width: 100%; background: var(--cell); border-radius: 16px; padding: 8px 14px; box-sizing: border-box; }
.comm-bhead { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 2px; }
.comm-bhead .comm-name { font-weight: 700; font-size: 13.5px; color: var(--ink); text-decoration: none; }
.comm-bhead .comm-name:hover { text-decoration: underline; }
.comm-body { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.comm-actions { display: flex; align-items: center; gap: 14px; margin: 5px 14px 0; font-size: 12px; color: var(--ink); }
.comm-act { font-weight: 700; cursor: pointer; opacity: .7; }
.comm-act:hover { opacity: 1; text-decoration: underline; }
.comm-act-reply:hover { color: var(--brand); }
.comm-act-del:hover { color: var(--red); }
.comm-time { opacity: .5; font-size: 12px; }
/* reply thread connector */
.comm-replies { position: relative; margin-inline-start: 19px; margin-top: 2px; }
.comm-replies:not(:empty)::before { content: ""; position: absolute; inset-inline-start: 0; top: -4px; bottom: 20px; width: 2px; background: var(--line); }
.comm-replies .comm-c.is-reply { position: relative; padding-inline-start: 22px; }
.comm-replies .comm-c.is-reply::before { content: ""; position: absolute; inset-inline-start: 0; top: 20px; width: 20px; height: 2px; background: var(--line); border-end-start-radius: 8px; }
/* pill inputs + circular send buttons */
.comm-pill { display: flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding-block: 2px; padding-inline-start: 14px; padding-inline-end: 3px; }
.comm-pill input { flex: 1 1 auto; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); padding: 9px 0; min-width: 0; }
.comm-pill input::placeholder { color: var(--ink); opacity: .45; }
.comm-pill-sm { margin-top: 8px; }
.comm-pill-sm input { font-size: 13px; padding: 7px 0; }
.comm-send { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #16553f; color: #f3efe2; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: filter .15s ease; }
.comm-send:hover { filter: brightness(1.12); }
.comm-send:disabled { opacity: .5; cursor: default; }
.comm-pill-sm .comm-send { width: 30px; height: 30px; }
.comm-composer { margin-top: 14px; }
html[dir="rtl"] .comm-send svg { transform: scaleX(-1); }

/* ===== Community card footer buttons (sahm 5.34) ===== */
.sahm-app .comm-btn, a.comm-btn { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px; cursor: pointer; text-decoration: none; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.sahm-app .comm-btn svg, a.comm-btn svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: .75; }
.sahm-app .comm-btn:hover, a.comm-btn:hover { background: var(--head); border-color: var(--line-strong); }
.sahm-app a.comm-btn-primary, .sahm-app .comm-btn-primary { background: #16553f; border-color: #16553f; color: #f3efe2; }
.sahm-app .comm-btn-primary svg { opacity: 1; }
.sahm-app a.comm-btn-primary:hover, .sahm-app .comm-btn-primary:hover { background: #0f4634; border-color: #0f4634; }
.sahm-app .comm-btn-danger { color: var(--red); border-color: rgba(210,72,62,.35); }
.sahm-app .comm-btn-danger svg { opacity: .9; }
.sahm-app .comm-btn-danger:hover { background: rgba(210,72,62,.1); border-color: var(--red); }

/* ===== Center every column in data tables (sahm 5.36) ===== */
.sahm-table:not(.sahm-amx) thead th,
.sahm-table:not(.sahm-amx) tbody td { text-align: center; }
.sahm-table:not(.sahm-amx) .num,
.sahm-table:not(.sahm-amx) th.num,
.sahm-table:not(.sahm-amx) td.num { text-align: center; }

/* ---------------- notifications ---------------- */
.sahm-notif-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;color:#f3f8f5;cursor:pointer;padding:4px 6px;line-height:0}
.sahm-notif-badge{position:absolute;top:-2px;inset-inline-end:-2px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#e5484d;color:#fff;font:700 10px/16px system-ui;text-align:center;box-sizing:border-box}
.sahm-notif-panel{position:absolute;top:calc(100% + 8px);inset-inline-end:0;width:320px;max-width:86vw;max-height:420px;overflow:hidden auto;background:var(--card,#fff);border:1.5px solid var(--line,#e6e3d6);border-radius:14px;box-shadow:0 12px 34px rgba(20,20,18,.18);z-index:2200;color:var(--ink,#2b2b2b)}
.sahm-notif-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 14px;border-bottom:1.5px solid var(--line,#e6e3d6);position:sticky;top:0;background:var(--head,#f8f6ec)}
.sahm-notif-head b{font-size:14px}
.sahm-notif-readall{background:transparent;border:0;color:var(--brand,#0e5c43);font:600 12px system-ui;cursor:pointer;padding:2px 4px}
.sahm-notif-list{display:flex;flex-direction:column}
.sahm-notif-item{display:flex;gap:10px;align-items:flex-start;padding:11px 14px;border-bottom:1px solid var(--line,#e6e3d6);text-decoration:none;color:var(--ink,#2b2b2b);cursor:pointer;background:transparent}
.sahm-notif-item:hover{background:var(--head,rgba(0,0,0,.03))}
.sahm-notif-item.is-unread{background:rgba(14,92,67,.07)}
.sahm-notif-item.is-unread{background:color-mix(in srgb,var(--brand,#0e5c43) 9%,transparent)}
.sahm-notif-ic{flex:0 0 auto;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--head,#f1efe6);color:var(--brand,#0e5c43)}
.sahm-notif-tx{flex:1 1 auto;min-width:0}
.sahm-notif-tx .t{font-weight:700;font-size:13px}
.sahm-notif-tx .s{font-size:12.5px;color:var(--ink,#2b2b2b);opacity:.85;word-break:break-word}
.sahm-notif-tx .a{display:block;font-size:11px;color:var(--dim,#8a8676);margin-top:2px}
.sahm-notif-empty{padding:26px 14px;text-align:center;color:var(--dim,#8a8676);font-size:13px}

/* ---------------- webinars ---------------- */
.sahm-webinars{display:flex;flex-direction:column;gap:22px}
.sahm-wb-sec{display:flex;flex-direction:column;gap:12px}
.sahm-wb-sechead{font-weight:700;font-size:14px;color:var(--ink,#2b2b2b);padding-bottom:6px;border-bottom:1.5px solid var(--line,#e6e3d6)}
.sahm-wb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.sahm-wb-card{border:1.5px solid var(--line,#e6e3d6);border-radius:14px;padding:15px 16px;background:var(--card,#fff);display:flex;flex-direction:column;gap:9px}
.sahm-wb-card.is-live{border-color:#e5484d;box-shadow:0 0 0 3px rgba(229,72,77,.10)}
.sahm-wb-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sahm-wb-badge{font:700 10.5px/1 system-ui;letter-spacing:.04em;padding:4px 8px;border-radius:999px;text-transform:uppercase}
.sahm-wb-badge.live{background:#e5484d;color:#fff}
.sahm-wb-badge.up{background:rgba(14,92,67,.12);color:var(--brand,#0e5c43)}
.sahm-wb-badge.past{background:var(--head,#f1efe6);color:var(--dim,#8a8676)}
.sahm-wb-when{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--dim,#8a8676)}
.sahm-wb-title{margin:0;font-size:16px;line-height:1.35;color:var(--ink,#2b2b2b)}
.sahm-wb-desc{margin:0;font-size:13px;line-height:1.7;color:var(--ink,#2b2b2b);opacity:.85;white-space:pre-line}
.sahm-wb-action{margin-top:4px}
.sahm-video{position:relative;width:100%;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#000;border:1.5px solid var(--line,#e6e3d6)}
.sahm-video iframe,.sahm-video video{position:absolute;inset:0;width:100%;height:100%;border:0}
.sahm-wb-subhead{margin:-4px 0 2px;font-size:12.5px;color:var(--dim,#8a8676)}
.sahm-wb-grid.sahm-rec-grid{grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:18px}
.sahm-rec-card{gap:8px}
@media (max-width:560px){.sahm-wb-grid.sahm-rec-grid{grid-template-columns:1fr}}

/* ---------------- messages / friends ---------------- */
.sahm-msg-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.sahm-msg-head h2{margin:0;font-family:var(--sans);font-size:22px;font-weight:800;color:var(--ink);letter-spacing:-.01em}
.sahm-msg-note{font-size:12px;color:var(--faint);display:inline-flex;align-items:center;gap:6px;max-width:420px}
.sahm-msg-wrap{display:grid;grid-template-columns:330px 1fr;gap:16px;align-items:stretch;min-height:600px}
.sahm-msg-side{background:var(--card);border:1.5px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-soft);overflow:hidden;display:flex;flex-direction:column}
.sahm-msg-tabs{display:flex;gap:5px;padding:8px;background:var(--head);border-bottom:1.5px solid var(--line)}
.sahm-msg-tab{flex:1;padding:9px 8px;border-radius:var(--r-sm);background:transparent;border:1.5px solid transparent;font-family:var(--sans);font-size:13px;font-weight:700;color:var(--faint);cursor:pointer;transition:.13s}
.sahm-msg-tab:hover{color:var(--ink)}
.sahm-msg-tab.is-on{background:var(--card);color:var(--brand-deep);box-shadow:var(--sh-soft);border-color:var(--border)}
.sahm-msg-list{overflow-y:auto;flex:1;padding:7px}
.sahm-msg-subhead{padding:10px 8px 5px;font-size:10.5px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.07em}
.sahm-msg-item{display:flex;gap:11px;align-items:center;width:100%;text-align:start;padding:9px 10px;border:1.5px solid transparent;border-radius:var(--r-sm);background:none;cursor:pointer;font:inherit;margin-bottom:2px;transition:.12s}
.sahm-msg-item:hover{background:var(--head)}
.sahm-msg-item.is-active{background:var(--brand-soft);border-color:var(--brand-line)}
.sahm-msg-av{flex:0 0 auto;width:42px;height:42px;border-radius:50%;background:var(--brand);color:#f3efe2;display:inline-flex;align-items:center;justify-content:center;font-weight:700;overflow:hidden;border:1.5px solid var(--border)}
.sahm-msg-av img{width:100%;height:100%;object-fit:cover}
.sahm-msg-itxt{min-width:0;flex:1}
.sahm-msg-irow{display:flex;align-items:baseline;gap:6px}
.sahm-msg-iname{font-weight:700;font-size:13.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.sahm-msg-itime{font-size:10.5px;color:var(--faint);flex:0 0 auto}
.sahm-msg-ilast{font-size:12px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;margin-top:1px}
.sahm-msg-badge{flex:0 0 auto;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--brand);color:#fff;font-size:10.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.sahm-msg-main{background:var(--card);border:1.5px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-soft);display:flex;flex-direction:column;overflow:hidden;min-height:600px}
.sahm-msg-thread-head{display:flex;align-items:center;gap:11px;padding:12px 16px;border-bottom:1.5px solid var(--line);background:var(--head);min-height:44px}
.sahm-msg-thread-head .nm{font-weight:800;font-size:15px;color:var(--ink)}
.sahm-msg-thread-head a{color:inherit;text-decoration:none}
.sahm-msg-thread-head a:hover .nm{color:var(--brand-deep)}
.sahm-msg-thread{flex:1;overflow-y:auto;padding:18px 16px;display:flex;flex-direction:column;gap:4px;background:var(--bg);max-height:56vh}
.sahm-bubble{max-width:74%;padding:9px 13px;border-radius:16px;font-size:13.5px;line-height:1.55;box-shadow:var(--sh-soft);align-self:flex-start}
.sahm-bubble .bt{white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.sahm-bubble time{display:block;font-size:10px;opacity:.7;margin-top:3px;text-align:end}
.sahm-bubble.theirs{background:var(--card);color:var(--ink);border:1.5px solid var(--line);border-end-start-radius:5px}
.sahm-bubble.mine{align-self:flex-end;background:var(--brand);color:#fff;border:1.5px solid var(--brand-deep);border-end-end-radius:5px}
.sahm-msg-compose{display:flex;gap:9px;padding:12px 14px;border-top:1.5px solid var(--line);background:var(--head)}
.sahm-msg-compose .sahm-input{flex:1;border-radius:999px}
.sahm-msg-sendbtn{flex:0 0 auto;width:42px;height:42px;border-radius:50%;border:1.5px solid var(--border);background:var(--brand);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-shadow:var(--sh-soft);transition:.13s}
.sahm-msg-sendbtn:hover{box-shadow:var(--sh-hover);transform:translate(-1px,-1px)}
.sahm-msg-sendbtn:active{transform:none;box-shadow:none}
.sahm-msg-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:48px 24px;text-align:center;color:var(--faint);font-size:13.5px}
.sahm-msg-empty .ic{width:68px;height:68px;border-radius:50%;background:var(--brand-soft);border:1.5px solid var(--brand-line);display:inline-flex;align-items:center;justify-content:center;color:var(--brand-deep)}
.sahm-msg-reqcard{display:flex;gap:10px;align-items:center;padding:9px 10px;border:1.5px solid var(--brand-line);background:var(--brand-soft);border-radius:var(--r-sm);margin:0 3px 8px}
.sahm-msg-reqcard .nm{flex:1;min-width:0;font-weight:700;font-size:13px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sahm-msg-reqcard .acts{display:flex;gap:6px;flex:0 0 auto}
@media(max-width:760px){.sahm-msg-wrap{grid-template-columns:1fr}.sahm-msg-main{min-height:500px}}

/* ---------------- chat bubble actions + quoted replies ---------------- */
.sahm-bubble-wrap{display:flex;align-items:center;gap:6px;max-width:80%;align-self:flex-start}
.sahm-bubble-wrap.mine{align-self:flex-end;flex-direction:row-reverse}
.sahm-bubble-wrap .sahm-bubble{max-width:100%}
.sahm-bubble-acts{display:inline-flex;gap:3px;opacity:0;transition:.12s;flex:0 0 auto}
.sahm-bubble-wrap:hover .sahm-bubble-acts{opacity:1}
@media(hover:none){.sahm-bubble-acts{opacity:.6}}
.sahm-bubble-acts button{width:27px;height:27px;border-radius:50%;border:1.5px solid var(--line);background:var(--card);color:var(--faint);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-size:13px;line-height:1;transition:.12s}
.sahm-bubble-acts button:hover{color:var(--brand-deep);border-color:var(--brand-line);background:var(--head)}
.sahm-quote{padding:4px 9px;margin-bottom:5px;border-radius:7px;border-inline-start:3px solid currentColor;background:rgba(0,0,0,.06);font-size:11.5px;line-height:1.4}
.sahm-bubble.mine .sahm-quote{background:rgba(255,255,255,.18)}
.sahm-quote b{display:block;font-size:10.5px;opacity:.85;margin-bottom:1px}
.sahm-quote span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px;opacity:.92}
.sahm-msg-replybar{display:flex;align-items:center;gap:10px;padding:9px 14px;border-top:1.5px solid var(--line);background:var(--brand-soft)}
.sahm-msg-replybar .rb-txt{flex:1;min-width:0;border-inline-start:3px solid var(--brand);padding-inline-start:9px}
.sahm-msg-replybar .rb-txt b{display:block;font-size:11px;color:var(--brand-deep);font-weight:700}
.sahm-msg-replybar .rb-txt span{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--faint)}
.sahm-msg-replybar .rb-x{flex:0 0 auto;width:26px;height:26px;border-radius:50%;border:1.5px solid var(--border);background:var(--card);color:var(--ink);cursor:pointer;font-size:15px;line-height:1;display:inline-flex;align-items:center;justify-content:center}

/* ---------------- community contribute composer ---------------- */
.comm-contrib-head{margin-bottom:14px}
.comm-contrib-head h3{margin:0 0 3px;font-family:var(--sans);font-size:18px;font-weight:800;color:var(--ink);letter-spacing:-.01em}
.comm-contrib-head p{margin:0;font-size:12.5px;color:var(--faint);line-height:1.5}
.comm-seg{display:inline-flex;gap:4px;padding:5px;background:var(--head);border:1.5px solid var(--line);border-radius:999px;margin-bottom:18px;max-width:100%;flex-wrap:wrap}
.comm-seg-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 18px;border-radius:999px;border:1.5px solid transparent;background:transparent;font-family:var(--sans);font-size:13px;font-weight:700;color:var(--faint);cursor:pointer;transition:.13s}
.comm-seg-btn:hover{color:var(--ink)}
.comm-seg-btn.is-on{background:var(--card);color:var(--brand-deep);border-color:var(--border);box-shadow:var(--sh-soft)}
.comm-seg-btn svg{flex:0 0 auto}
.comm-form{max-width:580px;display:flex;flex-direction:column;gap:11px}
.comm-form .sahm-input{width:100%}
.comm-form textarea.sahm-input{resize:vertical;min-height:120px;line-height:1.6}
.comm-form-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:3px}
.comm-form-foot .hint{font-size:11.5px;color:var(--faint);display:inline-flex;align-items:center;gap:5px}
.comm-form-foot .sahm-btn{flex:0 0 auto;min-width:130px;justify-content:center}
.comm-drop{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;border:1.5px dashed var(--brand-line);border-radius:var(--r-sm);background:var(--brand-soft);padding:22px 16px;text-align:center;font-size:13px;font-weight:600;color:var(--brand-deep);cursor:pointer;transition:.13s}
.comm-drop:hover{background:var(--head);border-color:var(--brand)}
.comm-drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.comm-drop .fn{font-size:11.5px;color:var(--ink);font-weight:700;word-break:break-all}
.comm-drop .fn:empty{display:none}

/* ---------------- professional analyst profile ---------------- */
.sahm-prof-headline{font-size:14.5px;color:var(--brand-deep);font-weight:700;margin-top:4px;line-height:1.4}
.sahm-prof-meta{font-size:12.5px;color:var(--faint);margin-top:6px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sahm-prof-meta .dot{opacity:.45}
.sahm-prof-meta .ti{font-size:13px;vertical-align:-1px}
.sahm-prof-sec h2{font-family:var(--sans);font-size:16px;font-weight:800;color:var(--ink);margin:0 0 13px;padding-bottom:9px;border-bottom:1.5px solid var(--line)}
.sahm-prof-about{font-size:14px;line-height:1.75;color:var(--ink);margin:0;white-space:normal}
.sahm-prof-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.sahm-prof-list li{position:relative;padding-inline-start:22px;font-size:13.5px;line-height:1.6;color:var(--ink)}
.sahm-prof-list li::before{content:'';position:absolute;inset-inline-start:2px;top:6px;width:8px;height:8px;border-radius:50%;background:var(--brand);border:1.5px solid var(--brand-deep)}
.sahm-prof-certs li{padding-inline-start:25px}
.sahm-prof-certs li::before{content:'\2713';background:none;border:0;color:var(--brand-deep);font-weight:800;font-size:14px;top:-1px;inset-inline-start:0;width:auto;height:auto;border-radius:0}
.sahm-prof-chips{display:flex;flex-wrap:wrap;gap:8px}
.sahm-prof-chip{display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;background:var(--brand-soft);border:1.5px solid var(--brand-line);color:var(--brand-deep);font-size:12.5px;font-weight:700}

/* account: full-width (textarea) rows */
.sahm-acct-row-full{display:block}
.sahm-acct-row-full .sahm-acct-row-l{display:block;margin-bottom:7px}
.sahm-acct-row-full .sahm-acct-row-f{display:block}
.sahm-acct-row-full textarea.sahm-input{width:100%;resize:vertical;line-height:1.6;min-height:84px}

/* social icons now inline SVG (no icon font) */
.sahm-soc-link svg{display:block}
.sahm-acct-row-l svg{vertical-align:-3px;margin-inline-end:3px;opacity:.8}

/* community — Facebook-style always-visible composer */
.comm-composer-card{margin-bottom:18px}
.comm-composer-top{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.comm-composer-av{flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:var(--brand);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;overflow:hidden;border:1.5px solid var(--border)}
.comm-composer-av img{width:100%;height:100%;object-fit:cover}
.comm-composer-hint{display:flex;flex-direction:column;gap:2px;min-width:0}
.comm-composer-hint b{font-size:15px;color:var(--ink);font-weight:800;line-height:1.3}
.comm-composer-hint span{font-size:12.5px;color:var(--faint)}

/* account — blocked users list */
.acct-blk-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.acct-blk-row:last-child{border-bottom:0}
.acct-blk-row a{font-size:13.5px;color:var(--ink);text-decoration:none;font-weight:600}
.acct-blk-row a:hover{color:var(--brand)}

/* community — posting-policy note in composer */
.comm-policy-note{font-size:11.5px;color:var(--faint);margin:0 0 12px}
.comm-policy-note a{color:var(--brand);font-weight:600}

/* ===== desktop chat dock (Facebook-style); hidden on mobile ===== */
#sahm-chatdock{position:fixed;bottom:0;inset-inline-end:18px;z-index:1200;display:flex;align-items:flex-end;gap:12px;pointer-events:none}
#sahm-chatdock>*{pointer-events:auto}
@media (max-width:900px){#sahm-chatdock{display:none!important}}
.scd-launcher{position:relative;width:52px;height:52px;border-radius:50%;border:1.5px solid var(--border);background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:var(--sh-hover);transition:transform .12s ease,background .12s ease;margin-bottom:14px}
.scd-launcher:hover{background:var(--brand-deep)}
.scd-launcher:active{transform:scale(.94)}
.scd-launcher.is-open{background:var(--brand-deep)}
.scd-badge{position:absolute;top:-3px;inset-inline-end:-3px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font:700 11px/18px var(--sans);text-align:center;border:2px solid var(--card)}
.scd-panel{position:absolute;bottom:74px;inset-inline-end:0;width:300px;max-height:60vh;background:var(--card);border:1.5px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-hover);display:flex;flex-direction:column;overflow:hidden}
.scd-panel[hidden]{display:none}
.scd-badge[hidden]{display:none}
.scd-panel-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--line);font:800 14px var(--sans);color:var(--ink);background:var(--head)}
.scd-panel-list{overflow-y:auto}
.scd-panel-empty{padding:26px 18px;text-align:center;color:var(--faint);font-size:12.5px;line-height:1.7}
.scd-thread{display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;background:none;border:0;border-bottom:1px solid var(--line);cursor:pointer;text-align:start;font:inherit}
.scd-thread:last-child{border-bottom:0}
.scd-thread:hover{background:var(--brand-soft)}
.scd-th-main{flex:1;min-width:0;display:flex;flex-direction:column}
.scd-th-name{font-weight:700;font-size:13px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scd-th-last{font-size:11.5px;color:var(--faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scd-thread.is-unread .scd-th-name{color:var(--ink);font-weight:800}
.scd-th-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.scd-th-time{font-size:10.5px;color:var(--faint);white-space:nowrap}
.scd-th-unread{min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--brand);color:#fff;font:700 10px/16px var(--sans);text-align:center}
.scd-win{width:316px;height:418px;background:var(--card);border:1.5px solid var(--border);border-radius:var(--r) var(--r) 0 0;box-shadow:var(--sh-hover);display:flex;flex-direction:column;overflow:hidden}
.scd-win.is-min{height:auto}
.scd-win.is-min .scd-win-body,.scd-win.is-min .scd-win-foot{display:none}
.scd-win-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--head);cursor:pointer}
.scd-win-name{flex:1;min-width:0;font-weight:800;font-size:13px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.scd-win-acts{display:flex;align-items:center;gap:2px}
.scd-ico{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:7px;border:0;background:none;color:var(--faint);cursor:pointer;text-decoration:none}
.scd-ico:hover{background:var(--brand-soft);color:var(--brand)}
.scd-win-body{flex:1;overflow-y:auto;padding:12px 12px 6px;background:var(--bg);display:flex;flex-direction:column;gap:2px}
.scd-empty{margin:auto;text-align:center;color:var(--faint);font-size:12px;padding:20px}
.scd-win-foot{display:flex;align-items:center;gap:7px;padding:8px 10px;border-top:1px solid var(--line);background:var(--card)}
.scd-input{flex:1;min-width:0;border:1.5px solid var(--border);border-radius:999px;padding:7px 13px;font:inherit;font-size:13px;background:var(--bg);color:var(--ink)}
.scd-input:focus{outline:none;border-color:var(--brand)}
.scd-send{flex:none;width:34px;height:34px;border-radius:50%;border:1.5px solid var(--border);background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}
.scd-send:hover{background:var(--brand-deep)}

/* message delivery / seen ticks (✓ sent, ✓✓ seen) */
.sahm-seen{font-size:10px;margin-inline-start:5px;opacity:.55;font-weight:700}
.sahm-seen.is-seen{opacity:1}

/* top-bar friends panel (reuses .sahm-notif-panel container) */
.sahm-fr-sec{font-size:11px;font-weight:700;color:var(--faint);padding:9px 13px 3px}
.sahm-fr-item{display:flex;align-items:center;gap:9px;padding:7px 13px;border-bottom:1px solid var(--line);text-decoration:none}
.sahm-fr-item:last-child{border-bottom:0}
.sahm-fr-link:hover{background:var(--brand-soft)}
.sahm-fr-main{display:flex;align-items:center;gap:9px;flex:1;min-width:0;text-decoration:none}
.sahm-fr-name{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sahm-fr-acts{display:flex;gap:5px;flex:none}

/* keep the top green utility bar pinned on desktop too (mobile already pins it) */
@media (min-width:981px){
  .sahm-utility{position:sticky;position:-webkit-sticky;top:0;z-index:95;flex-wrap:nowrap;min-height:34px;box-sizing:border-box}
  .sahm-topbar{top:34px}
}

/* admin Users-tab pagination */
.sahm-users-pager{display:flex;gap:5px;align-items:center;flex-wrap:wrap;justify-content:center;margin-top:14px}
.sahm-users-pager button{min-width:32px;height:30px;padding:0 9px;border:1.5px solid var(--border);background:var(--card);color:var(--ink);border-radius:var(--r-sm);font:600 13px/1 var(--sans);cursor:pointer}
.sahm-users-pager button:hover:not(:disabled):not(.is-current){background:var(--head)}
.sahm-users-pager button.is-current{background:var(--brand);border-color:var(--brand);color:#fff;cursor:default}
.sahm-users-pager button:disabled{opacity:.4;cursor:default}
.sahm-users-pager .pg-gap{padding:0 2px;color:var(--faint)}

/* shared community post — brief highlight on deep-link open */
.comm-card.comm-card-hl{box-shadow:0 0 0 2px var(--brand), var(--sh-hover);transition:box-shadow .3s ease}

/* verified-member seal (active subscriber / staff) */
.sahm-verified{vertical-align:middle;margin-inline-start:4px;flex:0 0 auto}

/* friends-panel search */
.sahm-fr-search-wrap{padding:6px 10px 8px}
.sahm-fr-search.sahm-input{width:100%;height:32px;font-size:13px;box-sizing:border-box}
.sahm-fr-none{padding:12px 14px;color:var(--faint);font-size:12.5px;text-align:center}

/* rendered markdown (community text posts + challenge descriptions) */
.cc-md{font-size:13.5px;line-height:1.7;color:var(--ink)}
.cc-md>*:first-child{margin-top:0}
.cc-md>*:last-child{margin-bottom:0}
.cc-md p{margin:7px 0}
.cc-md .cc-md-h{font-weight:700;line-height:1.4;margin:13px 0 6px;color:var(--ink)}
.cc-md .cc-md-h1{font-size:17px}
.cc-md .cc-md-h2{font-size:15.5px}
.cc-md .cc-md-h3{font-size:14px}
.cc-md .cc-md-h4{font-size:13px;color:var(--brand-deep)}
.cc-md .cc-md-list{margin:6px 0;padding-inline-start:22px}
.cc-md .cc-md-list li{margin:3px 0}
.cc-md strong{font-weight:700}
.cc-md code{font-family:var(--mono);font-size:.92em;background:var(--head);padding:1px 5px;border-radius:5px}
.cc-md a{color:var(--brand);text-decoration:underline}
.comm-chal .d.cc-md{color:var(--ink)}

/* community: keep the right sidebar (leaderboard / challenges / how-it-works) in view while scrolling the feed */
@media (min-width:901px){
  .comm-aside{position:sticky;position:-webkit-sticky;top:90px;align-self:start;max-height:calc(100vh - 104px);overflow-y:auto;overflow-x:hidden;padding-inline-end:4px}
}

/* App-wide refined scrollbars — consistent floating-pill style across every scroll area.
   Low-specificity (*) so components that intentionally hide their scrollbar
   (e.g. .sahm-utility, .sahm-ws-pills) keep their own higher-specificity rules. */
* { scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: var(--faint); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; transition: background-color .2s ease; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--brand); }
*::-webkit-scrollbar-thumb:active { background-color: var(--brand-deep); }
*::-webkit-scrollbar-corner { background: transparent; }

/* Home: active community-challenge banner */
.sahm-chal-banner{display:flex;align-items:center;gap:14px;margin-bottom:18px;padding:13px 16px;border:1.5px solid var(--brand-line);border-radius:14px;background:linear-gradient(180deg,var(--brand-soft),var(--card,#fff));text-decoration:none;transition:border-color .15s,transform .15s,box-shadow .15s}
.sahm-chal-banner:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(35,95,70,.10);transform:translateY(-1px)}
.sahm-chal-ic{flex:0 0 auto;width:44px;height:44px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:24px;background:rgba(138,106,20,.12)}
.sahm-chal-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.sahm-chal-eyebrow{font-size:11px;font-weight:800;letter-spacing:.06em;color:var(--gold);font-family:var(--mono)}
.sahm-chal-title{font-size:16px;font-weight:800;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sahm-chal-meta{display:flex;align-items:center;gap:8px;margin-top:3px}
.sahm-chal-date{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--faint)}
.sahm-chal-date svg{width:13px;height:13px;flex:0 0 auto;opacity:.85}
.sahm-chal-count{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:64px;padding:6px 12px;border-radius:12px;background:var(--brand-soft);border:1px solid var(--brand-line);line-height:1}
.sahm-chal-count b{font-size:22px;font-weight:800;color:var(--brand-deep)}
.sahm-chal-count i{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--brand);margin-top:3px}
.sahm-chal-count.is-soon{background:rgba(210,72,62,.10);border-color:rgba(210,72,62,.34)}
.sahm-chal-count.is-soon b,.sahm-chal-count.is-soon i{color:var(--red)}
.sahm-chal-cta{flex:0 0 auto;font-size:13.5px;font-weight:800;color:var(--brand);white-space:nowrap}
@media(max-width:560px){.sahm-chal-cta{display:none}.sahm-chal-title{white-space:normal}}

/* Challenges hub */
.sahm-ch-hero{margin-bottom:22px}
.sahm-ch-eyebrow{font-family:var(--mono);font-size:11.5px;font-weight:800;letter-spacing:.06em;color:var(--gold)}
.sahm-ch-h1{font-size:26px;font-weight:800;color:var(--brand-deep);margin:5px 0 6px}
.sahm-ch-lead{font-size:14.5px;color:var(--faint);max-width:760px;line-height:1.5;margin:0}
.sahm-ch-sec{margin-bottom:28px}
.sahm-ch-sech{font-size:18px;font-weight:800;color:var(--brand-deep);margin:0 0 12px;padding-bottom:8px;border-bottom:1.5px solid var(--line)}
.sahm-ch-subhead{margin:-4px 0 14px;font-size:13px;color:var(--faint)}
.sahm-ch-active{border:1.5px solid var(--brand-line);border-radius:16px;background:linear-gradient(180deg,var(--brand-soft),var(--card));padding:16px 18px;margin-bottom:16px}
.sahm-ch-acthead{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.sahm-ch-actmain{flex:1 1 320px;min-width:0}
.sahm-ch-actbadge{font-family:var(--mono);font-size:10.5px;font-weight:800;letter-spacing:.07em;color:var(--brand);background:var(--card);border:1px solid var(--brand-line);border-radius:999px;padding:3px 9px}
.sahm-ch-acttitle{font-size:18px;font-weight:800;color:var(--ink);margin:9px 0 5px}
.sahm-ch-actdesc{font-size:13px;color:var(--ink);line-height:1.55;margin:0 0 9px;opacity:.85}
.sahm-ch-actmeta{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.sahm-ch-subcount{font-size:12.5px;font-weight:700;color:var(--brand-deep)}
.sahm-ch-actside{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.sahm-ch-gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:12px;margin-top:14px;padding-top:14px;border-top:1.5px dashed var(--line)}
.sahm-ch-empty{margin:12px 0 0;font-size:13px;color:var(--faint);font-style:italic}
.sahm-ch-card{border:1.5px solid var(--line);border-radius:12px;background:var(--card);padding:12px 13px;display:flex;flex-direction:column}
.sahm-ch-cardhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.sahm-ch-author{display:inline-flex;align-items:center;gap:7px;text-decoration:none;min-width:0}
.sahm-ch-av{width:26px;height:26px;border-radius:50%;flex:0 0 auto;background:var(--brand);color:#f3efe2;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;overflow:hidden}
.sahm-ch-aname{font-size:12.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-flex;align-items:center;gap:3px}
.sahm-ch-ctitle{font-size:14px;font-weight:700;color:var(--ink);line-height:1.3;margin-bottom:5px}
.sahm-ch-cmeta{font-size:11.5px;color:var(--faint);margin-bottom:6px}
.sahm-ch-crate{font-size:12px;color:var(--ink)}
.sahm-ch-stars{color:#caa53a;letter-spacing:1px}
.sahm-ch-wingrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.sahm-ch-win{border:1.5px solid var(--line);border-radius:14px;background:var(--card);padding:15px 16px;display:flex;flex-direction:column;gap:9px}
.sahm-ch-wintop{display:flex;gap:11px;align-items:center}
.sahm-ch-trophy{flex:0 0 auto;width:44px;height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:24px;background:var(--gold-soft)}
.sahm-ch-wintitle{font-size:15px;font-weight:800;color:var(--brand-deep);line-height:1.25}
.sahm-ch-winner{font-size:13px;color:var(--ink);text-decoration:none}
.sahm-ch-winner b{color:var(--brand-deep)}
.sahm-ch-award{align-self:flex-start;font-size:12px;font-weight:700;color:var(--gold);background:var(--gold-soft);border-radius:999px;padding:3px 10px}
.sahm-ch-winmodel{border-top:1.5px dashed var(--line);padding-top:9px;display:flex;flex-direction:column;gap:5px}
.sahm-ch-wmlabel{font-family:var(--mono);font-size:10px;font-weight:800;letter-spacing:.05em;color:var(--faint);text-transform:uppercase}
.sahm-ch-wmtitle{font-size:13px;font-weight:700;color:var(--ink)}
.sahm-tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.sahm-tpl-card{border:1.5px solid var(--line);border-radius:14px;background:var(--card);padding:18px;display:flex;flex-direction:column;align-items:flex-start;transition:border-color .15s,box-shadow .15s,transform .15s}
.sahm-tpl-card:hover{border-color:var(--brand-line);box-shadow:0 6px 18px rgba(35,95,70,.08);transform:translateY(-1px)}
.sahm-tpl-ic{width:48px;height:48px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:26px;background:var(--brand-soft);margin-bottom:11px}
.sahm-tpl-name{font-size:16px;font-weight:800;color:var(--brand-deep);margin-bottom:6px}
.sahm-tpl-desc{font-size:12.5px;color:var(--faint);line-height:1.5;margin:0 0 14px;flex:1 1 auto}
.sahm-tpl-dl{display:inline-flex;align-items:center;gap:8px}
.sahm-tpl-size{font-size:10.5px;opacity:.75;font-weight:600}
.sahm-ch-disclaimer{margin-top:12px;font-size:11.5px;font-style:italic;color:var(--faint)}
@media(max-width:560px){.sahm-ch-actside{align-items:flex-start;flex-direction:row;width:100%}}
