
/* ── تنويه النطاق: ما هذه الصفحة وما ليست ── */
.scope-note {
  margin: 26px 0 0; padding: 16px 20px;
  background: var(--surface-1); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--brand);
  border-radius: 14px; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft);
}
.scope-note strong { color: var(--ink); font-weight: 600; }

/* ── صندوق ملاحظة/إفصاح ── */
.note-box {
  margin: 18px 0 0; padding: 20px 22px;
  background: var(--surface-1); border: 1px solid var(--line-2);
  border-radius: 16px;
}
.note-box p { margin: 0 0 12px; font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.note-box p:last-child { margin: 0; }
.note-box strong { color: var(--ink); font-weight: 600; }
.note-box .fine {
  font-size: 13.5px; color: var(--ink-faint);
  padding-top: 12px; border-top: 1px solid var(--line);
}
.disclaimer-box { margin-top: 48px; border-color: var(--line); }
.disclaimer-box p { font-size: 14px; color: var(--ink-faint); }

/* ── شارة لون الفئة في الجداول ── */
.chip {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-inline-end: 10px; vertical-align: baseline; background: var(--line-2);
}
.bp-optimal .chip { background: var(--good-deep); }
.bp-normal  .chip { background: var(--good); }
.bp-pre     .chip { background: var(--warm); }
.bp-s1      .chip { background: var(--watch); }
.bp-s2      .chip,
.bp-s3      .chip { background: var(--critical); }
.bp-low     .chip { background: var(--info); }
.bmi-under  .chip { background: var(--info); }
.bmi-normal .chip { background: var(--good); }
.bmi-over   .chip { background: var(--warm); }
.bmi-obese  .chip { background: var(--watch); }

/* ── الأداة ── */
.tool-card {
  margin: 32px 0 0; padding: 30px 28px;
  background: var(--surface-1); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
}
.tool-form .fields {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end;
}
@media (max-width: 700px) { .tool-form .fields { grid-template-columns: 1fr; align-items: stretch; } }

.tool-form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 14.5px; color: var(--ink-soft); position: relative;
}
.tool-form input {
  font-family: inherit; font-size: 22px; font-weight: 600;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 14px;
  padding: 13px 16px; padding-inline-end: 78px; width: 100%;
  direction: ltr; text-align: start;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.tool-form input::-webkit-outer-spin-button,
.tool-form input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tool-form input:focus { outline: none; border-color: var(--brand); }
.tool-form input::placeholder { color: var(--ink-faint); font-weight: 400; }
.tool-form .hint {
  position: absolute; inset-inline-end: 16px; bottom: 18px;
  font-size: 13px; color: var(--ink-faint); pointer-events: none;
  direction: ltr; unicode-bidi: isolate;
}
.tool-form button {
  font-family: inherit; font-size: 16.5px; font-weight: 600;
  color: var(--on-brand); background: var(--brand-soft);
  border: 0; border-radius: 14px; padding: 15px 28px;
  cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.tool-form button:hover { background: var(--brand-hover); transform: translateY(-1px); }
.tool-form button:active { transform: none; }

/* ── نتيجة الأداة ── */
/* الإظهار ببوّابة صريحة `.shown` لا بمطابقة بادئة: `[class*="bp-"]` كان
   يطابق الصنف الأساس `bp-out` نفسه، فيظهر الصندوق فارغاً قبل أي إدخال. */
.tool-out { display: none; }
.tool-out.shown {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 22px; padding: 22px 24px;
  border-radius: 18px; border: 1px solid var(--line-2);
  background: var(--surface-2);
}
.tool-out.err {
  border-color: var(--critical-edge); color: var(--critical-text);
  font-size: 15.5px; display: block;
}
.bp-reading {
  font-size: 34px; font-weight: 700; line-height: 1.1;
  direction: ltr; unicode-bidi: isolate; text-align: start;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.bp-reading small { font-size: 15px; font-weight: 500; color: var(--ink-faint); }
.bp-label { font-size: 20px; font-weight: 700; }
.bp-note { font-size: 13.5px; color: var(--ink-faint); line-height: 1.7; }

.tool-out.bp-optimal .bp-label { color: var(--good-deep); }
.tool-out.bp-normal  .bp-label { color: var(--good); }
.tool-out.bp-pre     .bp-label { color: var(--warm); }
.tool-out.bp-s1      .bp-label { color: var(--watch); }
.tool-out.bp-s2      .bp-label,
.tool-out.bp-s3      .bp-label { color: var(--critical); }
.tool-out.bp-low     .bp-label { color: var(--info); }
.tool-out.bmi-under  .bp-label { color: var(--info); }
.tool-out.bmi-normal .bp-label { color: var(--good); }
.tool-out.bmi-over   .bp-label { color: var(--warm); }
.tool-out.bmi-obese  .bp-label { color: var(--watch); }

/* الحالات ترث شبكة .more من feature.css؛ هذا اتّساعٌ فقط */
main > section { padding: 62px 0 0; }
main > section > p { color: var(--ink-soft); margin: 0 0 20px; font-size: 16.5px; }

/* صندوق الحدود في صفحة المنهج — يُميَّز عمداً: الاعتراف بالحدّ جزء من الرسالة */
.limits-box { border-inline-start: 3px solid var(--warm); }
.limits-box p strong { color: var(--warm); }
.src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.src-list li { padding-inline-start: 20px; position: relative; font-size: 15.5px; }
.src-list li::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-dim); border: 1.5px solid var(--brand);
}
.article h3 { font-size: 19px; font-weight: 600; margin: 40px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.article h3 .count {
  font-size: 12.5px; font-weight: 500; color: var(--brand-text);
  background: var(--brand-dim); border: 1px solid var(--brand-edge);
  border-radius: var(--radius-pill); padding: 2px 10px;
}
.article .cards, .article .steps { margin-top: 4px; }

/* ── جدول التصنيف: الشارة واللفظ صفّاً واحداً مرتّباً ── */
main tbody th { white-space: nowrap; }
main tbody th .chip { vertical-align: middle; position: relative; top: -1px; }
main td.num { color: var(--ink); }        /* المدى نصّ لا قيمة مرجعية */
.bp-optimal td.num, .bp-normal td.num { color: var(--good); }
.bp-pre td.num  { color: var(--warm); }
.bp-s1 td.num   { color: var(--watch); }
.bp-s2 td.num, .bp-s3 td.num { color: var(--critical); }
.bp-low td.num  { color: var(--info); }
.bmi-under td.num { color: var(--info); }
.bmi-normal td.num { color: var(--good); }
.bmi-over td.num  { color: var(--warm); }
.bmi-obese td.num { color: var(--watch); }
