/* Modern Monks answer renderer (lane ANS1). Loads after /reader-assets/reader.css and uses its tokens
   (--bg, --panel, --ink, --muted, --accent, --accent2, --line) and its word-card styles (.wcard, .kv, .lexs, .occ).
   Original text is set in the site's blue: Night's --accent; Lamp keeps a blue of its own for the same role. */

:root,[data-theme="night"]{--mm-orig:var(--accent);--mm-orig-bg:rgba(106,169,255,.10)}
[data-theme="lamp"]{--mm-orig:#8fb8f2;--mm-orig-bg:rgba(143,184,242,.10)}

.mm-page{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start;padding-bottom:40px}
@media (min-width:1000px){
  .mm-page.with-panel{grid-template-columns:minmax(0,1fr) 380px}
}
.mm-answer{max-width:760px;font-size:1.06rem;line-height:1.6}
.mm-head{margin:18px 0 6px}
.mm-q{font-family:'Cinzel',serif;font-weight:500;font-size:1.55rem;line-height:1.3;color:var(--ink);margin:0;letter-spacing:.02em}
.mm-note{color:var(--muted);font-style:italic;font-size:.92rem;margin:6px 0 0}
.mm-h{font-family:'Cinzel',serif;font-weight:500;font-size:.85rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--accent2);margin:22px 0 4px}
.mm-p{margin:.55em 0}
.mm-list{margin:.4em 0 .6em;padding-left:1.3em}
h3.mm-h.mm-lead{font-size:.8rem;margin:18px 0 4px}
strong.mm-lead{font-weight:500}
.mm-prose-link{color:var(--accent2);text-underline-offset:2px;overflow-wrap:anywhere;margin-right:.35em}

/* original text, wherever it stands: the site's blue, set in its own script and direction */
.mm-orig{color:var(--mm-orig);unicode-bidi:isolate}
.mm-orig.hbo{font-family:'Noto Serif Hebrew','SBL Hebrew',serif;font-size:1.18em;line-height:1.2}
.mm-orig.grc{font-family:'Gentium Book Plus','EB Garamond',serif}
.mm-run{unicode-bidi:isolate}
.mm-cite{background:none;border:0;padding:0 1px;margin:0;color:inherit;font:inherit;cursor:pointer;border-radius:4px;
  border-bottom:1px dotted var(--mm-orig)}
.mm-cite:hover,.mm-cite:focus-visible{background:var(--mm-orig-bg);outline:none}
.mm-cite.sel{background:var(--mm-orig-bg);box-shadow:0 0 0 1px var(--mm-orig)}

/* the set-apart citation: one row per word, the same every time */
.mm-original{margin:.5em 0 .9em;padding:8px 12px;border-left:3px solid var(--mm-orig);background:var(--bg2);
  border-radius:0 8px 8px 0;display:flex;flex-direction:column;gap:6px}
.mm-word{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.mm-word .mm-cite{border-bottom:0;min-height:40px;min-width:40px;display:inline-flex;align-items:center;justify-content:center}
.mm-word .mm-orig{font-size:1.45rem}
.mm-word .mm-orig.hbo{font-size:1.7rem}
.mm-word-what{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;font-size:.95rem}
.mm-tl{font-family:'Gentium Book Plus','EB Garamond',serif;font-style:italic;color:var(--muted)}
.mm-gl{color:var(--ink)}
.mm-ref{color:var(--accent2);font-size:.9rem}

.mm-quote{margin:.6em 0 .9em;padding:6px 14px;border-left:3px solid var(--line);color:var(--ink)}
.mm-quote p{margin:.2em 0;font-style:italic}
.mm-quote footer{border:0;padding:0;margin:0;color:var(--muted);font-size:.85rem;line-height:1.4}
.mm-lex p{font-style:normal}
.mm-lex footer{font-family:'Cinzel',serif;letter-spacing:.08em;font-size:.75rem;color:var(--accent2)}
.mm-lex footer .mm-orig{font-family:'Noto Serif Hebrew','Gentium Book Plus',serif;letter-spacing:0;font-size:1.05rem}

.mm-b-open{margin-top:10px;padding:2px 14px 6px;border:1px dashed var(--line);border-radius:10px}
.mm-b-open .mm-h{color:var(--accent2)}

.mm-foot{margin-top:26px;padding-top:12px;border-top:1px solid var(--line);color:var(--muted);font-size:.85rem;line-height:1.5}
.mm-foot h3{font-family:'Cinzel',serif;font-weight:500;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);margin:12px 0 2px}
.mm-verify b{color:var(--accent2);font-weight:500}
.mm-verify.bad b{color:#ff8a80}
.mm-sources{margin:2px 0;padding-left:18px}
.mm-lic{color:var(--muted)}
.mm-meta{margin-top:8px;font-size:.78rem;overflow-wrap:anywhere}

/* the word box: a side card on wide screens, a bottom sheet on phones (as in the reader) */
.mm-panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px 18px;box-shadow:var(--shadow);
  overflow:auto;overscroll-behavior:contain}
.mm-panel[hidden]{display:none}
.mm-panel .mm-close{float:right;margin:-6px -8px 0 8px;min-width:40px;min-height:40px}
@media (min-width:1000px){
  .mm-panel{position:sticky;top:18px;max-height:calc(100vh - 36px)}
}
@media (max-width:999px){
  .mm-panel{position:fixed;left:0;right:0;bottom:0;z-index:40;max-height:72vh;border-radius:14px 14px 0 0;
    transform:translateY(105%);transition:transform .2s ease;padding-top:26px}
  .mm-panel.open{transform:translateY(0)}
}

/* the list of saved answers */
.mm-items{list-style:none;padding:0;margin:14px 0}
.mm-item{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 14px;padding:10px 0;border-bottom:1px solid var(--line)}
.mm-item a{font-size:1.05rem;min-height:40px;display:inline-flex;align-items:center}
.mm-date{color:var(--muted);font-size:.85rem;align-self:center}

/* page head for the local page */
.mm-bar{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.mm-bar .site{font-family:'Cinzel',serif;font-size:1.2rem;color:var(--ink)}
.mm-bar .grow{flex:1}
.mm-bar .btn{min-height:40px}
@media (max-width:480px){
  .mm-q{font-size:1.3rem}
  .mm-word .mm-orig.hbo{font-size:1.5rem}
}
.mm-listing .mm-q{margin-top:22px}
