/*! Portfolio Manager – free tools (v2.5.6). Loaded only on the /tools/ pages. */
.pmt-page { --pmt-ac: #4F4FB3; --pmt-ac2: #3d3d99; --pmt-ink: #1b1b33; --pmt-mut: #6b6b8a; --pmt-line: #e6e6f2; --pmt-bg: #f7f7fc;
  --pmt-ok: #159957; --pmt-bad: #c62828; --pmt-warn-bg: #fff6e0; --pmt-warn-line: #f3d48a;
  max-width: 900px; margin: 0 auto; color: var(--pmt-ink); font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif; line-height: 1.8; }
/* v2.5.9: the share window is added to <body>, outside .pmt-page, so it needs the same colours */
.pmt-modal { --pmt-ac: #4F4FB3; --pmt-ac2: #3d3d99; --pmt-ink: #1b1b33; --pmt-mut: #6b6b8a; --pmt-line: #e6e6f2; --pmt-bg: #f7f7fc; color: var(--pmt-ink); }
.pmt-modal .pmt-btn { min-height: 0; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pmt-btn:disabled { opacity: .6; cursor: progress; }
.pmt-page [hidden] { display: none !important; }
.pmt-intro { font-size: 17px; color: var(--pmt-mut); margin: 0 0 18px; }
.pmt { background: #fff; border: 1px solid var(--pmt-line); border-radius: 16px; padding: 22px; box-shadow: 0 6px 24px rgba(79, 79, 179, .06); }
.pmt-loading { color: var(--pmt-mut); }
.pmt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pmt-head h2 { margin: 0; font-size: 20px; color: var(--pmt-ink); }
.pmt-head small { display: block; font-size: 12px; color: var(--pmt-mut); font-weight: 500; }
.pmt-lang { background: none; border: 1px solid var(--pmt-line); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 13px; color: var(--pmt-mut); cursor: pointer; }
.pmt-form { align-items: end; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; }
.pmt-f { display: flex; flex-direction: column; gap: 4px; }
.pmt-in { position: relative; display: block; }
.pmt-f > span { font-size: 13px; color: var(--pmt-mut); font-weight: 500; }
.pmt-f > span i { font-style: normal; opacity: .75; }
.pmt input, .pmt select { font: inherit; font-size: 16px; width: 100%; padding: 9px 12px; border: 1px solid #cfd0e6; border-radius: 10px; background: #fff; color: var(--pmt-ink); box-sizing: border-box; margin: 0; }
.pmt input:focus, .pmt select:focus { outline: 2px solid rgba(79, 79, 179, .35); border-color: var(--pmt-ac); }
.pmt input.pmt-num { direction: ltr; text-align: right; padding-left: 34px; }
.pmt[dir=ltr] input.pmt-num { text-align: left; padding-left: 12px; padding-right: 34px; }
.pmt-stp { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 28px; display: flex; flex-direction: column; border-radius: 9px 0 0 9px; overflow: hidden; }
.pmt[dir=ltr] .pmt-stp { left: auto; right: 1px; border-radius: 0 9px 9px 0; }
.pmt-stp button { flex: 1; border: 0; margin: 0; padding: 0; background: transparent; color: var(--pmt-mut); font-size: 9px; line-height: 1; cursor: pointer; min-height: 0; }
.pmt-stp button:hover { background: rgba(79, 79, 179, .1); color: var(--pmt-ac); }
.pmt-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 10px; }
.pmt-check input { width: auto; }
.pmt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pmt-btn, .pmt-page a.pmt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 10px; border: 1.5px solid var(--pmt-ac);
  background: var(--pmt-ac); color: #fff !important; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none !important; cursor: pointer; line-height: 1.4; }
.pmt-btn:hover { background: var(--pmt-ac2); border-color: var(--pmt-ac2); }
.pmt-btn.alt { background: #fff; color: var(--pmt-ac) !important; }
.pmt-btn.alt:hover { background: rgba(79, 79, 179, .08); }
.pmt-btn.ghost { background: transparent; border-color: var(--pmt-line); color: var(--pmt-mut) !important; font-weight: 500; }
.pmt-btn.small { padding: 6px 12px; font-size: 13px; }
.pmt-err { margin-top: 14px; background: #fdecec; border: 1px solid #f3b7b7; color: var(--pmt-bad); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.pmt-warn { margin-top: 12px; background: var(--pmt-warn-bg); border: 1px solid var(--pmt-warn-line); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.pmt-note { margin-top: 10px; font-size: 13px; color: var(--pmt-mut); }
.pmt-res { margin-top: 18px; background: var(--pmt-bg); border-radius: 14px; padding: 16px; }
.pmt-res h3 { margin: 0 0 10px; font-size: 16px; color: var(--pmt-ink); }
.pmt-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.pmt-kv > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--pmt-line); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.pmt-kv > div b { direction: ltr; unicode-bidi: isolate; font-size: 16px; white-space: nowrap; }
.pmt-kv > div.hl { border-color: var(--pmt-ac); background: #f1f1fb; }
.pmt-kv > div.hl b { color: var(--pmt-ac); font-size: 20px; }
.pmt-kv > div.big { grid-column: 1 / -1; padding: 14px 16px; }
.pmt-kv > div.big b { font-size: 28px; }
.pmt-pos { color: var(--pmt-ok); } .pmt-neg { color: var(--pmt-bad); }
.pmt-promo { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed rgba(79, 79, 179, .45); border-radius: 12px; padding: 12px 14px; background: #fff; }
.pmt-promo p { margin: 0; font-size: 14px; font-weight: 500; }
.pmt-table-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
.pmt table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 0; }
.pmt th, .pmt td { border: 1px solid var(--pmt-line); padding: 6px 8px; text-align: center; white-space: nowrap; }
.pmt th { background: #f1f1fb; font-weight: 700; color: var(--pmt-ink); }
.pmt td.num { direction: ltr; unicode-bidi: isolate; }
.pmt tr.is-bad td { background: #fdecec; }
.pmt-ops td { padding: 4px; }
.pmt-ops input, .pmt-ops select { font-size: 15px; padding: 7px 8px; min-width: 84px; }
.pmt-ops input.pmt-num { padding-left: 8px; }
.pmt-ops .pmt-del { background: none; border: 0; color: var(--pmt-bad); font-size: 18px; cursor: pointer; padding: 4px 8px; }
.pmt-chart { margin: 14px auto 0; max-width: 640px; }
.pmt-chart svg { width: 100%; height: auto; display: block; }
.pmt-how { margin-top: 28px; }
.pmt-how h2 { font-size: 20px; margin: 0 0 10px; }
.pmt-how ul { margin: 0 0 12px; padding-inline-start: 1.3em; }
.pmt-how li { margin-bottom: 6px; }
.pmt-more { font-size: 15px; }
.pmt-more a { color: var(--pmt-ac); font-weight: 700; }
.pmt-disclaimer { font-size: 13px; color: var(--pmt-mut); border-top: 1px solid var(--pmt-line); padding-top: 12px; margin-top: 16px; }
/* hub */
.pmt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 6px 0 20px; }
.pmt-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 1px solid var(--pmt-line); border-radius: 16px; text-decoration: none !important;
  color: var(--pmt-ink) !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pmt-card:hover { transform: translateY(-2px); border-color: var(--pmt-ac); box-shadow: 0 10px 26px rgba(79, 79, 179, .12); }
.pmt-card strong { font-size: 17px; }
.pmt-card span { font-size: 14px; color: var(--pmt-mut); line-height: 1.7; }
.pmt-card em { font-style: normal; color: var(--pmt-ac); font-weight: 700; font-size: 14px; margin-top: auto; }
.pmt-ic { width: 42px; height: 42px; border-radius: 12px; background: #f1f1fb; color: var(--pmt-ac) !important; display: flex !important; align-items: center; justify-content: center; }
.pmt-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #f1f1fb; border-radius: 14px; padding: 14px 18px; }
.pmt-cta p { margin: 0; font-weight: 500; }
/* share preview */
.pmt-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(15, 18, 40, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pmt-modal > div { background: #fff; border-radius: 16px; max-width: 640px; width: 100%; max-height: 92vh; overflow: auto; padding: 16px; font-family: 'Tajawal', system-ui, sans-serif; }
.pmt-modal img { width: 100%; border-radius: 10px; display: block; }
.pmt-modal .pmt-actions { justify-content: center; }
@media (max-width: 600px) {
  .pmt { padding: 16px; border-radius: 14px; }
  .pmt-form { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pmt-form .pmt-f.wide { grid-column: 1 / -1; }
  .pmt-kv { grid-template-columns: 1fr; }
  .pmt-intro { font-size: 16px; }
}
@media (max-width: 380px) { .pmt-form { grid-template-columns: 1fr; } }
.pmt-how li b { color: var(--pmt-ink); }
.pmt-ex { background: #f1f1fb; border-radius: 12px; padding: 12px 16px; margin: 4px 0 12px; }

/* v2.6.3: public lessons (/lessons/) */
.pmt-lessons .pmt-h { font-size: 26px; margin: 0 0 8px; color: var(--pmt-ink); }
.pmt-lunit { margin: 22px 0 8px; }
.pmt-lunit h3 { font-size: 19px; margin: 0 0 10px; color: var(--pmt-ac); }
.pmt-lesson { margin: 0 0 22px; }
.pmt-lesson h4 { font-size: 16px; margin: 0 0 8px; color: var(--pmt-ink); }
.pmt-player { position: relative; width: 100%; max-width: 820px; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.pmt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pmt-hub-lessons { margin: 14px 0 0; }
