/* The primer and what every page's texts fold-outs and item cards share: chapters, items, what the texts say, kārakatva, the item card,
   Methods, the written explanation, glossary terms' related rows, the pādas. */

/* the primer */
.mh.jy .jy-lcs { display: flex; flex-direction: column; }
.mh.jy .jy-lc { padding: 12px 0; border-top: 1px solid var(--mh-rule-2); }
.mh.jy .jy-lc .l { font-family: var(--mh-serif); font-size: 1.125rem; margin-left: 8px; }
.mh.jy .jy-lc .cap { margin: 4px 0 0 32px; }
.mh.jy .jy-its { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; }
.mh.jy .jy-it { padding: 6px 0; border-top: 1px solid var(--mh-rule-2); font-size: .875rem; }
.mh.jy .jy-it:hover { color: var(--mh-accent); }
.mh.jy .jy-lede { font-family: var(--mh-serif); font-size: 1.0625rem; line-height: 1.5; }
.mh.jy table.jy-facts td:first-child { width: 110px; }
.mh.jy .jy-yours { background: var(--mh-paper-2); padding: 14px 16px; border-radius: var(--mh-r); border: 0; }
.mh.jy .jy-pn { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0; font-size: .875rem; }
.mh.jy .jy-gate { text-align: center; padding: 28px 0; }
.mh.jy.jy-learn .blk p { line-height: 1.65; }

.mh.jy .jy-more-link { display: inline-block; margin: 2px 0 8px; font-size: .7812rem; color: var(--mh-accent); }
.mh.jy a.jy-pg { display: block; margin: 4px 0 6px; cursor: pointer; }
.mh.jy .jy-yfam { margin: 18px 0 6px; }
.mh.jy .jy-yfam .cap { margin: 2px 0 8px; }

/* what the texts say: a fold-out, full width, verse rows with their reference, first line and translation */
.mh.jy details.jy-txd { margin: 6px 0; }
.mh.jy details.jy-txd > summary { font-size: .7812rem; color: var(--mh-accent); cursor: pointer; list-style: none; padding: 2px 0; }
.mh.jy details.jy-txd > summary::before { content: '▸ '; }
.mh.jy details.jy-txd[open] > summary::before { content: '▾ '; }
.mh.jy .jy-tx-body { padding: 6px 0 4px 10px; border-left: 2px solid var(--mh-rule-2); }
.mh.jy .jy-tw { margin: 10px 0 2px; }
.mh.jy .jy-vr { padding: 6px 0; border-top: 1px solid var(--mh-rule-2); }
.mh.jy .jy-vh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mh.jy .jy-vl { font-family: var(--font-serif); font-size: .875rem; overflow-wrap: anywhere; }   /* a long unspaced verse line breaks inside a phone's column */
.mh.jy .jy-vm { margin: 3px 0 0; font-size: .8125rem; color: var(--mh-ink-2); line-height: 1.5; }
.mh.jy .jy-gtx { margin-top: 12px; }
.mh.jy .jy-gtr { border-top: 1px solid var(--mh-rule-2); padding: 5px 0 6px; }
.mh.jy .jy-gtr .jy-gn { font-family: var(--font-serif); font-size: .875rem; }
.mh.jy .jy-gtr .cap { margin: 2px 0 0; }
.mh.jy .jy-gtr .jy-gt { display: inline-block; margin-top: 2px; font-size: .7812rem; }

/* kārakatva: what a house or graha signifies, a labelled row per category */
.mh.jy .jy-karaka { display: flex; flex-direction: column; }
.mh.jy .jy-kr { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 2px 12px; padding: 6px 0; border-top: 1px solid var(--mh-rule-2); font-size: .8438rem; line-height: 1.5; }
.mh.jy .jy-kr:first-child { border-top: 0; }
.mh.jy .jy-kk { color: var(--mh-muted); font-size: .75rem; }
@media (max-width: 700px) { .mh.jy .jy-kr { grid-template-columns: 1fr; } .mh.jy .jy-kk { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; } }

/* an item's reference card: the fact, and under it the verses it comes from */
.mh.jy .jy-card td:first-child { width: 32%; vertical-align: top; }
.mh.jy .jy-card td { vertical-align: top; }
.mh.jy .jy-src { margin-top: 2px; font-size: .6875rem; color: var(--mh-muted); }
.mh.jy .jy-src .jy-cite { font-size: .6875rem; }
.mh.jy .jy-card .jy-vm { margin: 0 0 2px; }

.mh.jy .jy-msteps { margin: 4px 0 0; padding-left: 1.4em; }
.mh.jy .jy-msteps li { padding: 8px 0; border-top: 1px solid var(--mh-rule-2); }
.mh.jy .jy-msteps li p { margin: 4px 0; line-height: 1.6; }
.mh.jy .jy-mst { font-size: 1rem; }
.mh.jy .jy-mlinks { font-size: .7812rem; }
.mh.jy .jy-mlinks a { color: var(--mh-accent); }
.mh.jy .jy-muses { margin-top: 8px; }
.mh.jy .jy-muses td { padding: 5px 10px 5px 0; vertical-align: top; }
.mh.jy .jy-mblk { margin-bottom: 8px; }

/* the written explanation on an item page and in the pane (explain.py) */
.mh.jy .jy-explain .jy-xs { margin: 14px 0 6px; }
.mh.jy .jy-explain .jy-xp { max-width: 70ch; line-height: 1.6; margin: 6px 0 10px; }
.mh.jy .jy-explain .jy-xc { font-size: .7188rem; color: var(--mh-muted); }
.mh.jy .jy-explain .jy-xc .jy-cite { font-size: .7188rem; }
.mh.jy .jy-explain .jy-xmine { font-size: .875rem; border-left: 2px solid var(--mh-accent-soft); padding-left: 10px; }

.mh.jy .jy-trel { padding: 7px 0; border-top: 1px solid var(--mh-rule-2); font-size: .875rem; }
.mh.jy .jy-trel a { color: var(--mh-accent); }
.mh.jy .jy-trel .dim { font-size: .7812rem; margin-top: 1px; }
.mh.jy .jy-padas { margin-top: 22px; }
.mh.jy .jy-explain .jy-pf { font-size: .875rem; margin-bottom: 4px; }   /* a pāda's facts line, above its passage (pada.py) */
.mh.jy .jy-pada:target { background: var(--mh-accent-soft); }

/* a chapter taught in the primer's shape (primer/chapters.py): headings, lookup tables, worked examples, the in-short line */
.mh.jy .blk h3.jy-sub { font-size: 1.1875rem; margin: 26px 0 6px; }
.mh.jy .jy-short { font-family: var(--mh-serif); font-size: 1.0625rem; line-height: 1.5; }
.mh.jy .jy-pt { margin: 10px 0 14px; max-width: 100%; overflow-x: auto; }
.mh.jy .jy-pt table.tab td { vertical-align: top; }
.mh.jy .jy-eg { border-left: 2px solid var(--mh-accent-soft); padding: 2px 0 2px 12px; margin: 10px 0 16px; }
.mh.jy .jy-eg .lbl { margin-bottom: 2px; }
.mh.jy .jy-eg p { margin: 4px 0; }
.mh.jy .jy-steps p { margin: 4px 0; }
.mh.jy p.jy-src { margin: 6px 0 4px; }
.mh.jy .jy-tmore { margin: 8px 0 12px; }

/* a part worked on the chart (primer/workings.py), the charts (kit/plot.py, after lego's dash tokens) and the explainer (primer/live.py) */
.mh.jy .jy-wk { margin: 10px 0 18px; padding: 10px 12px; background: var(--mh-paper-2); border-radius: var(--mh-r); }
.mh.jy .jy-wk .jy-pt { margin: 4px 0 0; }
.mh.jy table.jy-calc td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mh.jy table.jy-calc td:nth-last-child(2) { font-family: var(--font-mono, ui-monospace, monospace); font-size: .75rem; }
.mh.jy table.jy-sum td:nth-last-child(2) { font-family: inherit; font-size: inherit; }
.mh.jy table.jy-calc .tot { font-weight: 600; }
.mh.jy svg.jy-plot { display: block; width: 100%; max-width: 460px; height: auto; margin: 6px 0;
  --plot-1: light-dark(#2a78d6, #3987e5); --plot-2: light-dark(#eb6834, #d95926); --plot-3: light-dark(#1baf7a, #199e70);
  --plot-4: light-dark(#eda100, #c98500); --plot-5: light-dark(#e87ba4, #d55181); --plot-6: light-dark(#4a3aa7, #9085e9); }
.mh.jy svg.jy-plot.wheel { max-width: 300px; }
.mh.jy .jy-plot text { font-size: 10px; fill: var(--mh-ink); font-family: var(--mh-sans, inherit); }
.mh.jy .jy-plot .tick, .mh.jy .jy-plot .axl { fill: var(--mh-muted); }
.mh.jy .jy-plot .grid { stroke: var(--mh-rule-2); }
.mh.jy .jy-plot .ln { fill: none; stroke: var(--plot-1); stroke-width: 2; }
.mh.jy .jy-plot .mk { fill: var(--plot-1); stroke: var(--mh-paper); stroke-width: 1.5; }
.mh.jy .jy-plot .lead { stroke: var(--mh-rule); stroke-dasharray: 2 2; }
.mh.jy .jy-plot .cell { fill: transparent; stroke: var(--mh-rule); }
.mh.jy .jy-plot .cell.strong { fill: color-mix(in srgb, var(--mh-accent) 22%, transparent); }
.mh.jy .jy-plot .cell.weak { fill: color-mix(in srgb, var(--mh-muted) 14%, transparent); }
.mh.jy .jy-plot .s1 { fill: var(--plot-1); } .mh.jy .jy-plot .s2 { fill: var(--plot-2); } .mh.jy .jy-plot .s3 { fill: var(--plot-3); }
.mh.jy .jy-plot .s4 { fill: var(--plot-4); } .mh.jy .jy-plot .s5 { fill: var(--plot-5); } .mh.jy .jy-plot .s6 { fill: var(--plot-6); }
.mh.jy .jy-plot .need { stroke: var(--mh-ink); stroke-width: 2; }
.mh.jy .jy-plot .hc { fill: color-mix(in srgb, var(--plot-1) calc(var(--t) * 80%), var(--mh-paper)); }
.mh.jy .jy-plot .hv { font-size: 9px; }
/* an explainer's controls (primer/live.py): a row a control, its name at the left; options are words with a rule under the one chosen */
.mh.jy .jy-ex { overflow-anchor: none; }   /* a redraw replaces it whole; the page keeps its place by what is round it */
.mh.jy .jy-ex .jy-exf { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; }
.mh.jy .jy-ex .jy-exf > button[hidden] { display: none; }
.mh.jy .jy-ex .jy-exc { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; font-size: .8125rem; }
.mh.jy .jy-ex .jy-exl { flex: 0 0 9.5em; }
.mh.jy .jy-ex .jy-exlon { display: flex; flex-direction: column; gap: 4px; }
.mh.jy .jy-ex .jy-seg { display: flex; flex-wrap: wrap; gap: 0 12px; flex: 1 1 0; min-width: 0; }
.mh.jy .jy-ex .jy-seg label { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.mh.jy .jy-ex .jy-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mh.jy .jy-ex .jy-seg label > span { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 30px; padding: 3px 0 1px;
  border-bottom: 2px solid transparent; color: var(--mh-muted); white-space: nowrap; }
.mh.jy .jy-ex .jy-seg label:hover > span { color: var(--mh-accent); }
.mh.jy .jy-ex .jy-seg input:checked + span { color: var(--mh-ink); border-bottom-color: var(--mh-accent); }
.mh.jy .jy-ex .jy-seg input:focus-visible + span, .mh.jy .jy-ex .jy-step:focus-visible, .mh.jy .jy-ex .jy-pre button:focus-visible {
  outline: 2px solid var(--mh-accent); outline-offset: 2px; border-radius: 2px; }
.mh.jy .jy-ex .jy-seg .g { font-size: .9rem; }
.mh.jy .jy-ex .jy-num { display: inline-flex; align-items: center; gap: 2px; }
.mh.jy .jy-ex .jy-num input { width: 5.5em; min-height: 30px; padding: 2px 6px; text-align: center; font-size: .8125rem; font-variant-numeric: tabular-nums;
  border: 0; border-bottom: 1px solid var(--mh-rule); border-radius: 0; background: none; box-shadow: none; }
.mh.jy .jy-ex .jy-step, .mh.jy .jy-ex .jy-pre button { background: none; border: 0; box-shadow: none; margin: 0; cursor: pointer; font: inherit; }
.mh.jy .jy-ex .jy-step { min-width: 30px; min-height: 30px; padding: 0; color: var(--mh-muted); font-size: 1rem; }
.mh.jy .jy-ex .jy-step:hover, .mh.jy .jy-ex .jy-pre button:hover { color: var(--mh-accent); }
.mh.jy .jy-ex .jy-pre button { min-height: 30px; padding: 3px 0 1px; color: var(--mh-ink); border-bottom: 1px dotted var(--mh-rule); border-radius: 0; }
.mh.jy .jy-ex .jy-pre { gap: 2px 14px; }
/* a figure's cells and segments that are controls (`kit.plot.hit`): a plain fill on hover, a ring on focus and on the one chosen */
.mh.jy .jy-exfig .hit { cursor: pointer; outline: none; }
.mh.jy .jy-exfig .hit:not(.cell) { fill: transparent; stroke: none; }
.mh.jy .jy-exfig .hit:hover { fill: color-mix(in srgb, var(--foreground) 10%, transparent); }
.mh.jy .jy-exfig .hit[aria-pressed=true] { stroke: var(--mh-accent); stroke-width: 1.5; }
.mh.jy .jy-exfig .hit:focus-visible { stroke: var(--mh-accent); stroke-width: 3; }
.mh.jy .jy-exfig svg[role=group] text { pointer-events: none; }
@media (max-width: 640px) {
  .mh.jy .jy-ex .jy-exl { flex-basis: 100%; }
  .mh.jy .jy-ex .jy-seg { gap: 0 4px; }
  .mh.jy .jy-ex .jy-seg.w12 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); flex-basis: 100%; }
  .mh.jy .jy-ex .jy-seg label > span { min-height: 40px; min-width: 40px; padding: 0 2px; }
  .mh.jy .jy-ex .jy-seg.w12 label > span { flex-direction: column; gap: 0; width: 100%; line-height: 1.15; font-size: .75rem; }
  .mh.jy .jy-ex .jy-seg.w12 .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mh.jy .jy-ex .jy-step, .mh.jy .jy-ex .jy-num input, .mh.jy .jy-ex .jy-pre button { min-height: 40px; min-width: 40px; }
}
.mh.jy .jy-ex2 { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.mh.jy .jy-ex2 svg.jy-plot { flex: 1 1 260px; }
/* a figure of the houses: the board's chakra (kit/chakra.py `houses`), South or North, its strong and weak houses tinted */
.mh.jy .chart.jy-fig { max-width: 320px; margin: 6px 0; }
.mh.jy .jy-ex2 .chart.jy-fig { flex: 1 1 260px; }
.mh.jy .chart.jy-fig .tint.strong { fill: color-mix(in srgb, var(--mh-accent) 22%, transparent); }
.mh.jy .chart.jy-fig .tint.weak { fill: color-mix(in srgb, var(--mh-muted) 16%, transparent); }
.mh.jy .chart.jy-fig .hn { fill: var(--mh-muted); font-size: 11px; }
.mh.jy .jy-exout { font-size: .8125rem; line-height: 1.55; min-height: 4.65em; }   /* three lines, so a redraw whose readout is shorter does not pull the page up */
