/* =====================================================================
   /learn/mahat.css — מבחני מה"ט פתורים (Ziv 28.11.2026)
   ---------------------------------------------------------------------
   One part of a question = one row: the explanation on one side (Hebrew, short), the calculation on the other
   (left to right, a formula never wraps). Airy: big gaps, faint hairlines, no boxes.
   ===================================================================== */
.mh .sheet-main { max-width: 1080px; }
.mh-title { margin: 6px 0 44px; font: 900 40px/1.15 'Heebo', system-ui, sans-serif; color: var(--ink); text-wrap: balance; }
.mh-title span { display: block; margin-top: 12px; font-size: 20px; font-weight: 500; color: var(--ink-2); }
.mh-lede { margin: 0 0 28px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }

/* the question's data */
.mh-given { margin: 0 0 32px; }
.mh-data { list-style: none; margin: 28px auto 0; padding: 0; max-width: 760px; display: grid; gap: 10px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.mh-data li { padding-inline-start: 18px; position: relative; }
.mh-data bdi { white-space: nowrap; }
.mh-data li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.85em; width: 7px; height: 2px; background: var(--ink-3); }

/* one part */
.mh-step { padding: 64px 0 60px; border-top: 1px solid rgba(11, 11, 12, 0.07); }
.mh-step__h { display: flex; align-items: center; gap: 14px; margin: 0 0 36px; font: 800 22px/1.3 'Heebo', system-ui, sans-serif; color: var(--ink); }
.mh-step__l { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 800; }
.mh-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); gap: 80px; align-items: start; }

/* a worked solution: each sentence (what I did) beside its own lines */
.mh-rows { display: grid; gap: 44px; }
.mh-row { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); gap: 80px; align-items: center; }
.mh-say { margin: 0; font-size: 16px; line-height: 1.8; color: var(--ink-2); }

/* the explanation (older list form) */
.mh-why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.mh-why li { position: relative; padding-inline-start: 20px; font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.mh-why li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.85em; width: 8px; height: 2px; background: var(--blue); }

/* the calculation */
.mh-calc { direction: ltr; text-align: left; display: grid; gap: 16px; font-family: 'Cambria Math', Cambria, 'Times New Roman', serif; font-size: 19px; color: var(--ink); }
.mh-line { display: block; white-space: nowrap; overflow-x: auto; overflow-y: hidden; line-height: 2; scrollbar-width: thin; } /* one line: a formula never wraps */
.mh-line i { font-style: italic; }
.mh-line sub { font-size: 0.68em; font-style: normal; }
.mh-eq { margin-top: 12px; font: 800 14.5px 'Heebo', system-ui, sans-serif; color: var(--ink-3); letter-spacing: 0.02em; }
.mh-res { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 3px; font-weight: 700; color: var(--blue); border-bottom: 2px solid var(--blue); }
.mh-res small { font-size: 0.72em; font-weight: 500; }
.mh-at { margin-inline-start: 12px; font: 500 13.5px 'Heebo', system-ui, sans-serif; color: var(--ink-3); direction: rtl; unicode-bidi: isolate; }
.mh-ok { margin-inline-start: 8px; font: 800 15px 'Heebo', system-ui, sans-serif; color: #15803d; direction: rtl; unicode-bidi: isolate; }
.mh-no { color: #b91c1c; }
.mh-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; line-height: 1.25; }
.mh-frac > span:first-child { padding: 0 6px 3px; border-bottom: 1.4px solid currentColor; }
.mh-frac > span:last-child { padding: 3px 6px 0; }

/* drawings */
.mh-fig { margin: 52px auto 0; max-width: 640px; text-align: center; }
.mh-fig--wide { margin-top: 0; max-width: 760px; }
.mh-fig--sm { max-width: 240px; margin-top: 0; }
.mh-fig--stress { max-width: 320px; }
.mh-fig--sec { max-width: 330px; }
.mh-fig--tall { max-width: 340px; }
.mh-given .mh-fig--sec { margin-top: 0; }
.mh-figs { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 24px 64px; margin-top: 52px; }
.mh-step > .mh-fig--sm { margin-top: 52px; }
.mh-fig svg { display: block; width: 100%; height: auto; }
.mh-fig figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* a summary table (when the question asks for one): hairlines only, no boxes */
.mh-table { margin: 52px auto 0; border-collapse: collapse; min-width: 300px; font-size: 16px; }
.mh-table th { padding: 0 22px 12px; font: 800 14px 'Heebo', system-ui, sans-serif; color: var(--ink-3); text-align: center; }
.mh-table td { padding: 12px 22px; border-top: 1px solid rgba(11, 11, 12, 0.07); text-align: center; color: var(--ink); }
.mh-table td:first-child { font-weight: 800; }
.mh-table td:nth-child(2) { font-family: 'Cambria Math', Cambria, 'Times New Roman', serif; font-size: 18px; font-weight: 700; color: var(--blue); }

/* the source, the lists */
.mh-source { margin: 56px 0 0; padding-top: 24px; border-top: 1px solid rgba(11, 11, 12, 0.07); font-size: 13.5px; line-height: 1.75; color: var(--ink-3); }
/* every year folds open / closed — the summary is the year, an arrow at the far side */
.mh-yearbox { border-bottom: 1px solid rgba(11, 11, 12, 0.12); }
.mh-yearbox > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; cursor: pointer; list-style: none; }
.mh-yearbox > summary::-webkit-details-marker { display: none; }
.mh-yearbox > summary::after { content: ""; width: 10px; height: 10px; margin-inline-end: 6px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-3px) rotate(45deg); transition: transform 0.2s; }
.mh-yearbox[open] > summary::after { transform: translateY(3px) rotate(-135deg); }
.mh-yearbox .mh-list { margin: 0 0 12px; }
.mh-year { margin: 0; font: 900 28px 'Heebo', system-ui, sans-serif; color: var(--ink); }
.mh-list { list-style: none; margin: 8px 0 0; padding: 0; }
.mh-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 24px 0; border-top: 1px solid rgba(11, 11, 12, 0.07); }
.mh-list a { font: 800 20px 'Heebo', system-ui, sans-serif; color: var(--ink); text-decoration: none; }
.mh-list a b { margin-inline-end: 6px; }
.mh-list a:hover { color: var(--blue); }
.mh-list span { flex-basis: 100%; font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.mh-list span b { font-weight: 700; color: var(--ink-2); }

/* the root sign (as src/components/Radical.jsx) */
.bs-rad { --rad-w: 1.5px; display: inline-flex; align-items: stretch; vertical-align: middle; white-space: nowrap; direction: ltr; }
.bs-rad__sign { position: relative; flex: none; width: 0.9em; }
.bs-rad__sign svg { position: absolute; left: 0; right: 0; top: calc(var(--rad-w) / 2); bottom: 0; width: 100%; height: calc(100% - var(--rad-w) / 2); overflow: visible; fill: none; stroke: currentColor; stroke-width: var(--rad-w); stroke-linejoin: round; }
.bs-rad__idx { position: absolute; left: -0.05em; bottom: 52%; font-size: 0.58em; font-weight: 700; line-height: 1; }
.bs-rad__body { display: inline-flex; align-items: center; border-top: var(--rad-w) solid currentColor; padding: 0.2em 0.15em 0.05em; margin-inline-start: -0.5px; }

@media (max-width: 860px) {
  .mh-title { font-size: 30px; margin-bottom: 32px; }
  .mh-title span { font-size: 17px; }
  .mh-step { padding: 44px 0 40px; }
  .mh-step__h { margin-bottom: 24px; font-size: 20px; }
  .mh-grid { grid-template-columns: 1fr; gap: 28px; }
  .mh-rows { gap: 34px; }
  .mh-row { grid-template-columns: 1fr; gap: 12px; }
  .mh-calc { font-size: 17px; gap: 14px; }
  .mh-fig { margin-top: 36px; }
}
@media print {
  .mh-step { break-inside: avoid; padding: 28px 0; }
  .mh .sheet-cta { display: none; }
}

/* PRO only (Ziv 28.11): a visitor / free member sees the first half; the rest is blurred under the "PRO only" card.
   gate.js (shared with the binders) removes html.lr-gated for a PRO member or an admin. */
/* 3.12.2026: the rest is not in the page (tools/learn/lockParts.mjs) — only its part headings and empty lines;
   the block keeps a height, so the card that sits on it (top: 140px) never runs past it. */
.lr-gated .mh-locked[data-lr-part] { min-height: 520px; }
.mh-step.lr-outline .lr-skel { height: 14px; background: #aeb4bd; }
/* a signed-in subscriber, while the page asks the server for the rest (gate.js): no lock card yet */
.lr-wait .mh-gate { visibility: hidden; }
.mh-lockwrap { position: relative; }
.mh-gate { display: none; }
.lr-gated .mh-locked { max-height: 1100px; overflow: hidden; filter: blur(7px); opacity: 0.85; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.lr-gated .mh-gate { display: block; position: absolute; top: 140px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); padding: 32px 28px; background: #fff; box-shadow: 0 18px 48px rgba(11, 11, 12, 0.14); text-align: center; }
.mh-gate__title { margin: 0 0 8px; font: 800 21px/1.35 'Heebo', system-ui, sans-serif; color: var(--ink); }
.mh-gate__text { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.mh-gate .sheet-btn { display: inline-flex; }
.mh-gate__login { display: block; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--blue); }
.lr-gated .mh .sheet-cta { display: none; }
@media print { .lr-gated .mh-locked { display: none; } }
