/* الحاسبات الطبية وبرامج التخسيس (1.1): the lab report and the meal schedule. */
.vpmt-wrap, .vpmt-dir, .vpmt-diet, .vpmt-diets {
  --vc: #035dcd; --ink: #10233f; --ink2: #51617a; --ink3: #8593a8;
  --ground: #f3f6f9; --line: #dce3eb; --paper: #fff;
  --ok: #0e8f7e; --warn: #a86400; --bad: #c23a2b;
  font-family: "IBM Plex Sans Arabic", inherit; color: var(--ink); direction: rtl; text-align: right;
  line-height: 1.75; font-size: 15.5px; font-variant-numeric: tabular-nums;
}
.vpmt-wrap *, .vpmt-dir *, .vpmt-diet *, .vpmt-diets * { box-sizing: border-box; }
.vpmt-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vpmt-wrap :focus-visible, .vpmt-dir :focus-visible, .vpmt-diet :focus-visible, .vpmt-diets :focus-visible { outline: 2px solid var(--vc); outline-offset: 2px; }
.vpmt-wrap a, .vpmt-dir a, .vpmt-diet a, .vpmt-diets a { text-decoration: none; }

/* ---------- One calculator ---------- */
.vpmt-wrap { max-width: 1040px; margin: 0 auto 28px; }
.vpmt { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.vpmt-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }
.vpmt-head.slim { padding: 14px 26px; }
.vpmt-grp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--vc); }
.vpmt-grp .vpmt-i { width: 17px; height: 17px; }
.vpmt-head h2 { margin: 6px 0 2px; font-size: 26px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.vpmt-head p { margin: 0; color: var(--ink2); max-width: 60ch; }

.vm-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.vm-form { padding: 22px 26px 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-content: start; }
.vm-f { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.vm-f[hidden], .vm-chk[hidden] { display: none; }
.vm-f:has(.vm-seg), .vm-f:has(select) { grid-column: 1 / -1; }
.vm-l { font-weight: 600; font-size: 14px; color: var(--ink); }
.vm-l i { font-style: normal; font-weight: 400; color: var(--ink3); font-size: 12.5px; }
.vm-in { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.vm-in:focus-within, .vm-f select:focus { border-color: var(--vc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--vc) 15%, transparent); outline: none; }
.vm-in input { flex: 1; min-width: 0; border: 0 !important; outline: none !important; padding: 12px 14px; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); background: transparent; box-shadow: none !important; margin: 0; height: auto; }
.vm-in input[type="date"], .vm-in input[type="time"] { font-size: 15px; }
.vm-in em { font-style: normal; display: flex; align-items: center; padding: 0 12px; background: var(--ground); color: var(--ink2); font-size: 13px; white-space: nowrap; border-inline-start: 1px solid var(--line); }
.vm-f select { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; font-size: 15px; background: #fff; width: 100%; color: var(--ink); height: auto; }
.vm-seg { display: flex; gap: 4px; padding: 4px; background: var(--ground); border-radius: 12px; }
.vm-seg label { flex: 1; margin: 0; position: relative; }
.vm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.vm-seg span { display: block; text-align: center; padding: 9px 8px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2); }
.vm-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 35, 63, .14); }
.vm-seg input:focus-visible + span { outline: 2px solid var(--vc); }
.vm-chk { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; font-size: 14.5px; }
.vm-chk:has(input:checked) { border-color: var(--vc); background: color-mix(in srgb, var(--vc) 5%, #fff); }
.vm-chk input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--vc); flex: none; }
.vm-chk b { color: var(--vc); font-weight: 700; margin-inline-start: 4px; }
.vm-acts { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 4px; }
.vm-go, .vm-reset, .vm-print, .vm-links a { border: 0; cursor: pointer; font: inherit; font-weight: 700; border-radius: 12px; padding: 13px 22px; display: inline-flex; align-items: center; justify-content: center; }
.vm-go { background: var(--vc); color: #fff; flex: 1; font-size: 16px; }
.vm-go:hover { filter: brightness(1.08); }
.vm-reset { background: transparent; color: var(--ink2); font-weight: 600; }
.vm-reset:hover { color: var(--ink); }

/* The result: a lab-report slip. */
.vm-out { background: var(--ground); border-inline-start: 1px solid var(--line); padding: 22px; }
.vm-slip { position: sticky; top: 20px; background: #fff; border-radius: 16px; padding: 18px 18px 16px; border: 1px solid var(--line); border-top: 5px solid var(--vc); }
.vm-slip.ok { border-top-color: var(--ok); } .vm-slip.warn { border-top-color: var(--warn); } .vm-slip.bad, .vm-slip.vm-err { border-top-color: var(--bad); }
.vm-slip-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vm-slip-h { font-size: 13px; font-weight: 600; color: var(--ink3); }
.vm-tag { font-weight: 700; font-size: 13.5px; padding: 3px 12px; border-radius: 99px; background: color-mix(in srgb, var(--vc) 10%, #fff); color: var(--vc); }
.vm-slip.ok .vm-tag { background: #e6f5f2; color: var(--ok); } .vm-slip.warn .vm-tag { background: #fbf1e1; color: var(--warn); } .vm-slip.bad .vm-tag { background: #fbe9e7; color: var(--bad); }
.vm-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.vm-big b { font-size: 46px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.vm-big span { color: var(--ink2); font-size: 14px; }
.vm-slip p { margin: 10px 0 0; font-size: 14.5px; color: #24364f; }
.vm-empty p, .vm-err p { color: var(--ink2); }
.vm-ghost { display: grid; gap: 8px; margin-top: 16px; }
.vm-ghost i { display: block; height: 10px; border-radius: 99px; background: var(--ground); }
.vm-ghost i:nth-child(1) { width: 55%; height: 30px; border-radius: 8px; } .vm-ghost i:nth-child(3) { width: 75%; }
.vm-scale { position: relative; margin: 14px 0 22px; direction: ltr; }
.vm-bands { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.vm-bands i { display: block; height: 100%; }
.vm-bands .ok { background: var(--ok); } .vm-bands .warn { background: #e2a43b; } .vm-bands .bad { background: var(--bad); }
.vm-scale > b { position: absolute; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); transform: translateX(-50%); box-shadow: 0 1px 4px rgba(16, 35, 63, .3); }
.vm-ticks span { position: absolute; top: 13px; transform: translateX(-50%); font-size: 11.5px; color: var(--ink3); }
.vm-slip dl { margin: 12px 0 0; display: grid; }
.vm-slip dl div { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.vm-slip dl div:last-child { border-bottom: 0; }
.vm-slip dt { color: var(--ink2); }
.vm-slip dt::after { content: ""; }
.vm-slip dd { margin: 0 auto 0 0; font-weight: 700; text-align: left; }
.vm-note { font-size: 13px !important; color: var(--ink3) !important; }
.vm-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.vm-links a { background: #fff; color: var(--vc); border: 1.5px solid color-mix(in srgb, var(--vc) 40%, #fff); padding: 9px 14px; font-size: 14px; }
.vm-links a.pri { background: var(--vc); color: #fff; border-color: var(--vc); }
.vm-print { background: transparent; color: var(--ink3); padding: 8px 4px; font-weight: 600; font-size: 13.5px; margin-inline-start: auto; }
.vm-print:hover { color: var(--ink); }
.vpmt-disc { margin: 12px 4px 0; font-size: 13px; color: var(--ink3); max-width: 80ch; }

/* ---------- Heads of the lists ---------- */
.vpmt-hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 28px 26px 22px; margin: 0 0 18px; position: relative; overflow: hidden; }
.vpmt-hero::after { content: ""; position: absolute; inset-inline-end: 30px; top: 26px; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--vc) 0 62%, rgba(255,255,255,.14) 62% 100%); -webkit-mask: radial-gradient(circle, transparent 35px, #000 36px); mask: radial-gradient(circle, transparent 35px, #000 36px); pointer-events: none; }
.vpmt-hero.diet::after { background: conic-gradient(#3fbf9f 0 50%, #f0b44c 50% 75%, var(--vc) 75% 100%); }
.vpmt-hero h2 { margin: 0; font-size: 28px; line-height: 1.3; font-weight: 700; color: #fff; padding-inline-end: 130px; }
.vpmt-hero p { margin: 6px 0 0; color: #b9c6d8; max-width: 58ch; padding-inline-end: 130px; }
.vpmt-hero p a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.vpmt-find { position: relative; display: flex; align-items: center; margin: 18px 0 0; z-index: 1; }
.vpmt-find .vpmt-i { position: absolute; right: 16px; color: var(--ink3); }
.vpmt-search { width: 100%; border: 0; border-radius: 14px; padding: 15px 48px 15px 16px; font: inherit; font-size: 16px; color: var(--ink); margin: 0; height: auto; }
.vpmt-search:focus { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--vc) 40%, transparent); }
.vpmt-filter { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.vpmt-filter button { flex: none; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #c9d4e3; border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 13.5px; cursor: pointer; }
.vpmt-filter button:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.vpmt-filter button.on { background: #fff; color: var(--ink); border-color: #fff; font-weight: 600; }
.vpmt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vpmt-chips em { font-style: normal; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 6px; background: var(--ground); color: var(--ink2); }
.vpmt-hero .vpmt-chips { margin-top: 14px; }
.vpmt-hero .vpmt-chips em { background: rgba(255,255,255,.1); color: #dfe7f1; }

/* ---------- The list of calculators: a reference index ---------- */
.vpmt-dir { max-width: 1040px; margin: 0 auto; }
.vpmt-dir section { margin: 0 0 22px; }
.vpmt-dir section[hidden] { display: none; }
.vpmt-dir section > h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 2px 10px; color: var(--ink); }
.vpmt-dir section > h2 .vpmt-i { color: var(--vc); }
.vpmt-dir section > h2 small { font-size: 13px; color: var(--ink3); font-weight: 500; }
.vpmt-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.vpmt-card { display: grid; gap: 1px; padding: 14px 18px; color: var(--ink); border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line); margin-inline-start: -1px; position: relative; }
.vpmt-card:hover { background: color-mix(in srgb, var(--vc) 4%, #fff); }
.vpmt-card:hover b { color: var(--vc); }
.vpmt-card b { font-size: 15.5px; font-weight: 700; }
.vpmt-card span { color: var(--ink2); font-size: 13.5px; }
.vpmt-card[hidden] { display: none; }
.vpmt-none { text-align: center; color: var(--ink2); padding: 30px; background: #fff; border: 1px dashed var(--line); border-radius: 18px; }
.vpmt-back { display: inline-block; margin: 0 0 12px; color: var(--vc); font-weight: 600; }

/* ---------- Programs ---------- */
.vpmt-diets, .vpmt-diet { max-width: 1000px; margin: 0 auto; }
.vpmt-safe { background: #fff; border: 1px solid var(--line); border-inline-start: 5px solid var(--warn); border-radius: 16px; padding: 16px 20px; margin: 0 0 18px; }
.vpmt-safe h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.vpmt-safe ul { margin: 0; padding-inline-start: 20px; color: #24364f; font-size: 14.5px; }
.vpmt-safe li { margin: 3px 0; }
.vpmt-programs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.vpmt-diet-card { display: grid; gap: 4px; padding: 18px 20px; color: var(--ink); border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line); margin-inline-start: -1px; }
.vpmt-diet-card:hover { background: color-mix(in srgb, var(--vc) 4%, #fff); }
.vpmt-diet-card:hover b { color: var(--vc); }
.vpmt-diet-card b { font-size: 17px; font-weight: 700; }
.vpmt-diet-card > span:not(.vpmt-chips) { color: var(--ink2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vpmt-diet-card .vpmt-chips { margin-top: 6px; }

.vpmt-hero.one h2 { font-size: 30px; }
.vpmt-diet section { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin: 0 0 14px; }
.vpmt-diet section h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.vpmt-diet section ul { margin: 0; padding: 0; list-style: none; }
.vpmt-diet section li { position: relative; padding: 5px 26px 5px 0; color: #24364f; }
.vpmt-diet section li::before { content: ""; position: absolute; right: 2px; top: 13px; width: 12px; height: 7px; border: solid var(--vc); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.vpmt-diet .good li::before { border-color: var(--ok); }
.vpmt-diet .avoid li::before { width: 10px; height: 10px; border: 0; top: 12px; background: linear-gradient(45deg, transparent 43%, var(--bad) 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--bad) 43% 57%, transparent 57%); transform: none; }
.vpmt-diet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vpmt-diet .two section { margin: 0 0 14px; }
.vpmt-diet .good { border-top: 4px solid var(--ok); }
.vpmt-diet .avoid { border-top: 4px solid var(--bad); }
.vpmt-diet .limit { border-top: 4px solid var(--warn); }
.vpmt-foods { display: flex; flex-wrap: wrap; gap: 6px; }
.vpmt-foods span { padding: 5px 12px; border-radius: 8px; font-size: 14px; background: #e6f5f2; color: #0a6b5f; }
.vpmt-diet .limit .vpmt-foods span { background: #fbf1e1; color: #7d4b00; }
.vpmt-menu-wrap { overflow-x: auto; margin: 0 -4px; }
.vpmt-menu { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.vpmt-menu th, .vpmt-menu td { padding: 10px 12px; vertical-align: top; text-align: right; border-bottom: 1px solid var(--line); }
.vpmt-menu thead th { font-size: 13px; color: var(--ink3); font-weight: 600; background: none; white-space: nowrap; }
.vpmt-menu tbody th { white-space: nowrap; font-weight: 700; color: var(--vc); background: none; }
.vpmt-menu tbody tr:last-child > * { border-bottom: 0; }
.vpmt-menu td:nth-child(3), .vpmt-menu td:nth-child(5) { color: var(--ink2); font-size: 13px; }
.vpmt-diet .vm-note { margin: 10px 0 0; font-size: 13px; color: var(--ink3); }
.vpmt-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.vpmt-tools a { border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 14px; background: #fff; }
.vpmt-tools a:hover { border-color: var(--vc); color: var(--vc); }
.vpmt-tools a.pri { background: var(--vc); color: #fff; border-color: var(--vc); }

/* ---------- Phones ---------- */
@media (max-width: 820px) {
  .vm-split { grid-template-columns: 1fr; }
  .vm-out { border-inline-start: 0; border-top: 1px solid var(--line); padding: 16px; }
  .vm-slip { position: static; }
}
@media (max-width: 640px) {
  .vpmt-head, .vpmt-head.slim { padding-inline: 16px; }
  .vpmt-head h2 { font-size: 22px; }
  .vm-form { grid-template-columns: 1fr; padding: 16px; }
  .vm-big b { font-size: 38px; }
  .vpmt-hero { padding: 22px 18px 18px; border-radius: 18px; }
  .vpmt-hero::after { width: 64px; height: 64px; inset-inline-end: 16px; top: 18px; -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px); }
  .vpmt-hero h2, .vpmt-hero p { padding-inline-end: 76px; }
  .vpmt-hero h2 { font-size: 23px; }
  .vpmt-index, .vpmt-programs, .vpmt-diet .two { grid-template-columns: 1fr; }
  .vpmt-diet section { padding: 16px; }
  .vpmt-menu thead { display: none; }
  .vpmt-menu, .vpmt-menu tbody, .vpmt-menu tr, .vpmt-menu th, .vpmt-menu td { display: block; width: 100%; }
  .vpmt-menu tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .vpmt-menu tbody tr:last-child { border-bottom: 0; }
  .vpmt-menu th, .vpmt-menu td { border: 0; padding: 3px 0; }
  .vpmt-menu td::before { content: attr(data-l) ": "; color: var(--ink3); font-size: 12.5px; }
}
@media print { .vm-form, .vm-links, .vpmt-back, .vpmt-tools, .vpmt-filter, .vpmt-find { display: none !important; } .vm-split { grid-template-columns: 1fr; } .vpmt { border: 0; } .vpmt-hero { background: none; color: var(--ink); } .vpmt-hero h2 { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .vm-in { transition: none; } }
