/* صفحة «مد العضوية». نفس شكل أسئلة المد السابقة (فارما)، وتعتمد على متغيرات lab.css (--ink, --paper, --yellow, --blue). */
.mt-intro {
  font-size: 0.875rem;
  line-height: 1.9;
  max-width: 820px;
  color: #3a414b;
}
.mt-demo {
  background: #fbe2d8;
  border: 2px dashed #9c4739;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin: 0 0 16px;
}
.mt-tabs {
  display: flex;
  gap: 0;
  margin: 6px 0 14px;
  border-bottom: 2px solid var(--ink);
}
.mt-tabs button {
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  background: #fffdf7;
  color: var(--ink);
  cursor: pointer;
  margin-inline-end: -2px;
}
.mt-tabs button[aria-selected="true"] {
  background: var(--yellow);
}
.mt-tabs button:focus-visible,
.mt-chip:focus-visible,
.mt-hint-btn:focus-visible,
.mt-retry:focus-visible,
.mt-near-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.mt-toolbar {
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px var(--ink);
  padding: 16px;
  margin: 10px 0 28px;
  display: grid;
  gap: 12px;
}
.mt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mt-sub {
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--yellow);
}
.mt-views {
  padding-top: 10px;
  border-top: 1px dashed #19212b75;
}
.mt-chip {
  border: 2px solid var(--ink);
  background: #fffdf7;
  color: var(--ink);
  padding: 7px 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.mt-chip small {
  font-weight: 400;
  opacity: 0.7;
}
.mt-chip[aria-pressed="true"] {
  background: var(--yellow);
  box-shadow: 3px 3px var(--ink);
}
.mt-views .mt-chip[aria-pressed="true"] {
  background: #d9d1f1;
  color: #19212b;
}
.mt-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 0.8125rem;
}
.mt-controls select {
  font: inherit;
  border: 2px solid var(--ink);
  background: #fffdf7;
  color: var(--ink);
  padding: 6px 10px;
  margin-inline-start: 6px;
}
.mt-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.mt-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.mt-reset {
  padding: 7px 12px;
  font-size: 0.75rem;
}
.mt-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 0.8125rem;
}
.mt-score progress {
  flex: 1 1 160px;
  height: 10px;
  accent-color: var(--blue);
}
.mt-list {
  display: grid;
  gap: 22px;
}
.mt-group {
  margin-bottom: 34px;
}
.mt-group-title {
  font-size: 1rem;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #d9d1f1;
  color: #19212b;
  border: 2px solid var(--ink);
  display: inline-block;
}
.mt-group-title small {
  font-weight: 400;
  font-size: 0.75rem;
  margin-inline-start: 6px;
}
.mt-card {
  background: #fffdf7;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
  padding: 18px 20px;
  scroll-margin-top: 120px;
  transition: box-shadow 0.3s;
}
.mt-card.is-flash {
  box-shadow: 0 0 0 4px var(--yellow), 4px 4px var(--ink);
}
.mt-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.mt-num {
  font: 900 1.25rem "AWAPHs Arabic", Arial;
  background: var(--ink);
  color: var(--paper);
  min-width: 34px;
  text-align: center;
  padding: 2px 6px;
}
.mt-tag {
  font-size: 0.6875rem;
  border: 1px solid #19212b75;
  padding: 2px 8px;
  background: var(--paper);
}
.mt-dup-tag {
  background: #d9d1f1;
  border-color: #4a3c7a;
  font-weight: 700;
}
.mt-note-tag {
  background: #fbe2d8;
  border-color: #9c4739;
}
.mt-own {
  background: #dce6f6;
  border-color: #284dbb;
  font-weight: 700;
}
.mt-long {
  background: #dcebdc;
  border-color: #306649;
  font-weight: 700;
}
.mt-svg {
  margin: 0 0 14px;
  padding: 12px;
  border: 1.5px dashed #19212b75;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  justify-content: center;
}
.mt-svg svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}
.mt-dup {
  border: 2px solid #4a3c7a;
  background: #f1edfa;
  padding: 12px;
  display: grid;
  gap: 12px;
}
.mt-dup-title {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.8;
}
.mt-dup-title b {
  background: #4a3c7a;
  color: #fff;
  padding: 1px 8px;
  margin-inline-end: 6px;
}
.mt-version.is-multi {
  background: #fffdf7;
  border: 1.5px solid #19212b75;
  padding: 12px 14px;
}
.mt-version-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a3c7a;
}
.mt-stem {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  margin: 0 0 14px;
}
.mt-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.mt-options.mt-tf {
  grid-template-columns: 1fr 1fr;
}
.mt-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.55;
  border: 2px solid #19212b75;
  background: var(--paper);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
}
.mt-option b {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  font-size: 0.75rem;
}
.mt-option:not(:disabled):hover {
  border-color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px var(--ink);
}
.mt-option:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.mt-option:disabled {
  cursor: default;
  opacity: 1;
  color: #545b64;
}
.mt-option.is-answer:disabled,
.mt-option.is-picked-wrong:disabled {
  color: var(--ink);
}
.mt-option.is-answer {
  background: #dcebdc;
  border-color: #306649;
}
.mt-option.is-answer b {
  background: #306649;
  color: #fff;
  border-color: #306649;
}
.mt-option.is-picked-wrong {
  background: #fbe2d8;
  border-color: #9c4739;
}
.mt-option.is-picked-wrong b {
  background: #9c4739;
  color: #fff;
  border-color: #9c4739;
}
.mt-src {
  margin: 8px 0 0;
  font-size: 0.6875rem;
  color: #545b64;
}
.mt-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #19212b75;
  font-size: 0.8125rem;
  line-height: 1.9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  animation: reveal-answer 0.25s ease-out;
}
.mt-verdict {
  font-size: 0.9375rem;
}
.mt-verdict.ok {
  color: #306649;
}
.mt-verdict.no {
  color: #9c4739;
}
.mt-retry {
  font: inherit;
  font-size: 0.75rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.mt-near {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  background: #dce6f6;
  padding: 6px 10px;
  line-height: 1.8;
}
.mt-near-link {
  font-weight: 700;
  color: var(--blue);
}
.mt-after {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.85;
}
.mt-after:empty {
  display: none;
}
.mt-after p {
  margin: 0;
  padding: 6px 10px;
}
.mt-hint-btn {
  justify-self: start;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #fff6c9;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 5px 12px;
  cursor: pointer;
}
.mt-hint-btn[aria-expanded="true"] {
  background: var(--yellow);
}
.mt-hint {
  background: #fff6c9;
  border-inline-start: 4px solid var(--yellow);
}
.mt-trap {
  background: #fdeccb;
  border-inline-start: 4px solid #b4690e;
}
.mt-note {
  background: #fbe2d8;
  border-inline-start: 4px solid #9c4739;
}
.mt-why {
  background: #e3eefa;
  border-inline-start: 4px solid #2f5f9e;
}
.mt-why span {
  display: block;
  margin-top: 4px;
  text-align: left;
}
/* بوكس الشكر بنهاية الأسئلة */
.mt-thanks {
  margin: 28px 0 8px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
  background: var(--yellow);
  color: #19212b;
  font-weight: 700;
  font-size: 1.0625rem;
  text-align: center;
}
.mt-summary {
  margin-bottom: 30px;
}
.mt-summary h3 {
  font-size: 1.0625rem;
  margin: 0 0 10px;
}
.mt-table-scroll {
  overflow-x: auto;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
  background: #fffdf7;
}
.mt-table-scroll:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.mt-summary table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.65;
  min-width: 520px;
}
.mt-summary th,
.mt-summary td {
  border: 1px solid #19212b40;
  padding: 8px 10px;
  text-align: start;
  vertical-align: top;
}
.mt-summary thead th {
  background: var(--ink);
  color: var(--paper);
}
.mt-summary tbody th {
  background: #f1edfa;
}
.mt-tips {
  margin-top: 12px;
  background: #fff6c9;
  border-inline-start: 4px solid var(--yellow);
  padding: 8px 12px;
  font-size: 0.8125rem;
  line-height: 1.85;
}
.mt-tips ul {
  margin: 4px 0 0;
  padding-inline-start: 20px;
}
@media (max-width: 640px) {
  .mt-toolbar {
    padding: 12px;
  }
  .mt-card {
    padding: 14px;
  }
  .mt-dup {
    padding: 8px;
  }
  .mt-version.is-multi {
    padding: 10px;
  }
  .mt-options.mt-tf {
    grid-template-columns: 1fr;
  }
  .mt-chip {
    padding: 6px 10px;
  }
}

/* ===== قراءة مريحة (2026-11-22): الأسئلة والخيارات 16px، والملصقات ما تنزل عن 13px. ===== */
.mt-intro,
.mt-option,
.mt-after,
.mt-near,
.mt-tips,
.mt-result {
  font-size: 1rem;
  line-height: 1.8;
}
.mt-demo,
.mt-tabs button,
.mt-chip,
.mt-controls,
.mt-reset,
.mt-score,
.mt-group-title small,
.mt-dup-title,
.mt-version-label,
.mt-retry,
.mt-hint-btn,
.mt-summary table {
  font-size: 0.875rem;
}
.mt-tag,
.mt-src,
.mt-option b {
  font-size: 0.8125rem;
}
.mt-intro {
  max-width: 75ch;
}

/* ===== الوضع الليلي (مولّد تلقائياً بـ npm run build:dark، لا تعدله يدوياً) ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --dark-line: #3d4757;
  --dark-hard: #030508;
}
html[data-theme="dark"] .mt-intro {
  color: #d5d8dc;
}
html[data-theme="dark"] .mt-demo {
  background: #391f14;
  border: 2px dashed #dd8271;
}
html[data-theme="dark"] .mt-tabs {
  border-bottom: 2px solid var(--dark-line);
}
html[data-theme="dark"] .mt-tabs button {
  border: 2px solid var(--dark-line);
  background: #11171f;
  color: var(--ink);
}
html[data-theme="dark"] .mt-tabs button[aria-selected="true"] {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .mt-tabs button:focus-visible,
html[data-theme="dark"] .mt-chip:focus-visible,
html[data-theme="dark"] .mt-hint-btn:focus-visible,
html[data-theme="dark"] .mt-retry:focus-visible,
html[data-theme="dark"] .mt-near-link:focus-visible {
  outline: 3px solid var(--blue);
}
html[data-theme="dark"] .mt-toolbar {
  background: var(--paper);
  border: 2px solid var(--dark-line);
  box-shadow: 5px 5px var(--dark-hard);
}
html[data-theme="dark"] .mt-sub {
  border-inline-start: 3px solid var(--yellow);
}
html[data-theme="dark"] .mt-views {
  border-top: 1px dashed #464e5875;
}
html[data-theme="dark"] .mt-chip {
  border: 2px solid var(--dark-line);
  background: #11171f;
  color: var(--ink);
}
html[data-theme="dark"] .mt-chip[aria-pressed="true"] {
  color: #19212b;
  background: var(--yellow);
  box-shadow: 3px 3px var(--dark-hard);
}
html[data-theme="dark"] .mt-views .mt-chip[aria-pressed="true"] {
  background: #29223a;
  color: #e6e9ed;
}
html[data-theme="dark"] .mt-controls select {
  border: 2px solid var(--dark-line);
  background: #11171f;
  color: var(--ink);
}
html[data-theme="dark"] .mt-switch input {
  accent-color: var(--blue);
}
html[data-theme="dark"] .mt-score progress {
  accent-color: var(--blue);
}
html[data-theme="dark"] .mt-group-title {
  background: #29223a;
  color: #e6e9ed;
  border: 2px solid var(--dark-line);
}
html[data-theme="dark"] .mt-card {
  background: #11171f;
  border: 2px solid var(--dark-line);
  box-shadow: 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .mt-card.is-flash {
  box-shadow: 0 0 0 4px var(--yellow), 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .mt-num {
  background: var(--ink);
  color: var(--paper);
}
html[data-theme="dark"] .mt-tag {
  border: 1px solid #464e5875;
  background: var(--paper);
}
html[data-theme="dark"] .mt-dup-tag {
  background: #29223a;
  border-color: #9f93d9;
}
html[data-theme="dark"] .mt-note-tag {
  background: #391f14;
  border-color: #dd8271;
}
html[data-theme="dark"] .mt-own {
  background: #19273c;
  border-color: #6897ff;
}
html[data-theme="dark"] .mt-long {
  background: #172c18;
  border-color: #90c8a7;
}
html[data-theme="dark"] .mt-svg {
  border: 1.5px dashed #464e5875;
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] .mt-dup {
  border: 2px solid #9f93d9;
  background: #080c1a;
}
html[data-theme="dark"] .mt-dup-title b {
  background: #645798;
}
html[data-theme="dark"] .mt-version.is-multi {
  background: #11171f;
  border: 1.5px solid #464e5875;
}
html[data-theme="dark"] .mt-version-label {
  color: #9f93d9;
}
html[data-theme="dark"] .mt-option {
  border: 2px solid #464e5875;
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] .mt-option b {
  border: 1.5px solid var(--dark-line);
}
html[data-theme="dark"] .mt-option:not(:disabled):hover {
  border-color: var(--dark-line);
  box-shadow: 2px 2px var(--dark-hard);
}
html[data-theme="dark"] .mt-option:focus-visible {
  outline: 3px solid var(--blue);
}
html[data-theme="dark"] .mt-option:disabled {
  color: #aeb6c0;
}
html[data-theme="dark"] .mt-option.is-answer:disabled,
html[data-theme="dark"] .mt-option.is-picked-wrong:disabled {
  color: var(--ink);
}
html[data-theme="dark"] .mt-option.is-answer {
  background: #172c18;
  border-color: #90c8a7;
}
html[data-theme="dark"] .mt-option.is-answer b {
  background: #90c8a7;
  color: #121923;
  border-color: #90c8a7;
}
html[data-theme="dark"] .mt-option.is-picked-wrong {
  background: #391f14;
  border-color: #dd8271;
}
html[data-theme="dark"] .mt-option.is-picked-wrong b {
  background: #9c4739;
  border-color: #dd8271;
}
html[data-theme="dark"] .mt-src {
  color: #aeb6c0;
}
html[data-theme="dark"] .mt-result {
  border-top: 1px dashed #464e5875;
}
html[data-theme="dark"] .mt-verdict.ok {
  color: #90c8a7;
}
html[data-theme="dark"] .mt-verdict.no {
  color: #dd8271;
}
html[data-theme="dark"] .mt-retry {
  color: var(--blue);
}
html[data-theme="dark"] .mt-near {
  background: #19273c;
}
html[data-theme="dark"] .mt-near-link {
  color: var(--blue);
}
html[data-theme="dark"] .mt-hint-btn {
  background: #2e2600;
  color: var(--ink);
  border: 2px solid var(--dark-line);
}
html[data-theme="dark"] .mt-hint-btn[aria-expanded="true"] {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .mt-hint {
  background: #2e2600;
  border-inline-start: 4px solid var(--yellow);
}
html[data-theme="dark"] .mt-trap {
  background: #312407;
  border-inline-start: 4px solid #d88a3c;
}
html[data-theme="dark"] .mt-note {
  background: #391f14;
  border-inline-start: 4px solid #dd8271;
}
html[data-theme="dark"] .mt-why {
  background: #14283c;
  border-inline-start: 4px solid #6ea1e5;
}
html[data-theme="dark"] .mt-thanks {
  color: #19212b;
  border: 2px solid var(--dark-line);
  box-shadow: 4px 4px var(--dark-hard);
  background: var(--yellow);
}
html[data-theme="dark"] .mt-table-scroll {
  border: 2px solid var(--dark-line);
  box-shadow: 4px 4px var(--dark-hard);
  background: #11171f;
}
html[data-theme="dark"] .mt-table-scroll:focus-visible {
  outline: 3px solid var(--blue);
}
html[data-theme="dark"] .mt-summary th,
html[data-theme="dark"] .mt-summary td {
  border: 1px solid #464e5840;
}
html[data-theme="dark"] .mt-summary thead th {
  background: var(--ink);
  color: var(--paper);
}
html[data-theme="dark"] .mt-summary tbody th {
  background: #080c1a;
}
html[data-theme="dark"] .mt-tips {
  background: #2e2600;
  border-inline-start: 4px solid var(--yellow);
}
