/* Parapsychology instrument (14 Oct 2026): a 25-trial Zener card test kept as an evidence ledger, compared with the
   binomial chance distribution for n = 25, p = 0.2. One state colour; symbols are line masks drawn in currentColor. */
.zen-sym { display: inline-block; flex: none; width: 28px; height: 28px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; forced-color-adjust: none; }
.zen-sym[data-s="0"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='20' cy='20' r='13.5'/%3E%3C/svg%3E"); }
.zen-sym[data-s="1"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 5.5v29M5.5 20h29'/%3E%3C/svg%3E"); }
.zen-sym[data-s="2"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5q5.2-5 10.4 0t10.4 0t10.2 0M4.5 20q5.2-5 10.4 0t10.4 0t10.2 0M4.5 28.5q5.2-5 10.4 0t10.4 0t10.2 0'/%3E%3C/svg%3E"); }
.zen-sym[data-s="3"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8.2h24v23.8H8z'/%3E%3C/svg%3E"); }
.zen-sym[data-s="4"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L23.8 16.3L34.7 16.7L26.1 23.5L29.1 34L20 27.9L10.9 34L13.9 23.5L5.3 16.7L16.2 16.3Z'/%3E%3C/svg%3E"); }
.zen-choices .mmi-choice { min-height: 52px; }
.zen-choices .zen-sym { width: 26px; height: 26px; color: var(--text-2); }
.zen-choices .mmi-choice:hover .zen-sym, .zen-choices .mmi-choice:focus-visible .zen-sym { color: var(--text); }
.zen-legend { font: 500 1.125rem/1.3 var(--f-display) !important; color: var(--text) !important; }
.zen-legend b { font: 500 1rem/1 var(--f-mono); }
.zen-actions[hidden] { display: none; }
.zen-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.zen-actions .mm-btn { min-height: 48px; }

/* the ledger: a ruled 5 by 5 record sheet */
.zen-sheet { width: 100%; max-width: 540px; }
.zen-sheet-h { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; font: 400 12px/1.4 var(--f-mono); letter-spacing: .04em; color: var(--mmi-line-2); }
.zen-ledger { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--mmi-line-3); border-left: 1px solid var(--mmi-line-3); counter-reset: zt; }
.zen-ledger li { position: relative; aspect-ratio: 1; border-right: 1px solid var(--mmi-line-3); border-bottom: 1px solid var(--mmi-line-3); display: grid; place-items: center; counter-increment: zt; color: var(--mmi-line); }
.zen-ledger li::before { content: counter(zt, decimal-leading-zero); position: absolute; left: 7px; top: 6px; font: 400 12px/1 var(--f-mono); color: var(--mmi-line-2); }
.zen-ledger li.is-now { outline: 3px solid var(--mmi-sel); outline-offset: -2px; }
.zen-ledger li.is-now::before { color: var(--text); }
.zen-ledger .zg { width: 42%; height: 42%; }
.zen-ledger .zt { position: absolute; right: 7px; bottom: 7px; width: 22%; height: 22%; color: var(--mmi-line-2); }
.zen-ledger .zm { position: absolute; right: 7px; top: 6px; font: 400 12px/1 var(--f-mono); color: var(--text); }
.zen-ledger li.is-match { background: var(--mmi-sel-18); outline: 3px solid var(--mmi-sel); outline-offset: -2px; }
.zen-ledger li.is-match .zt { color: var(--text); }
.zen-key { margin: 12px 0 0; font: 400 13px/1.5 var(--f-text); color: var(--muted); }
@media (max-width: 519px) { .zen-ledger li::before { left: 4px; top: 4px; font-size: 10px; } .zen-ledger .zt { right: 4px; bottom: 4px; } .zen-ledger .zm { display: none; } }

/* result: text first, then the chance distribution */
.zen-out { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.zen-out[hidden] { display: none; }
.zen-out h3 { font: 500 1.375rem/1.25 var(--f-display); color: var(--text); margin: 0 0 8px; }
.zen-out h3:focus { outline: none; }
.zen-out h3:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.zen-score { font: 400 1.0625rem/1.6 var(--f-text); color: var(--text-2); max-width: 62ch; margin: 0 0 20px; }
.zen-score b { font: 500 1rem/1 var(--f-mono); color: var(--text); }
.zen-fig { margin: 0; background: var(--night, #1B1721); border-radius: 12px; padding: 20px 20px 16px; }
.zen-fig figcaption { font: 500 15px/1.4 var(--f-text); color: var(--text); margin: 0 0 4px; }
.zen-fig .zen-sub { font: 400 13px/1.45 var(--f-text); color: var(--muted); margin: 0 0 12px; }
.zen-chart { display: block; width: 100%; height: auto; overflow: visible; }
.zen-chart .ax { stroke: var(--mmi-line-3); stroke-width: 1; }
.zen-chart .gr { stroke: var(--mmi-line-3); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.zen-chart .tk { font: 400 12px/1 var(--f-mono); fill: var(--mmi-line-2); }
.zen-chart .ttl { font: 400 12px/1 var(--f-text); fill: var(--muted); }
.zen-chart .bar { fill: var(--mmi-line-2); }
.zen-chart .bar.is-hover { fill: var(--mmi-line); }
.zen-chart .you { fill: url(#zenHatch); stroke: var(--mmi-sel); stroke-width: 2; }
.zen-chart .youl { font: 500 13px/1 var(--f-mono); fill: var(--text); stroke: var(--night, #1B1721); stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; }
.zen-chart .lead { stroke: var(--mmi-sel); stroke-width: 1.25; }
.zen-chart .avg { stroke: var(--mmi-line); stroke-width: 1.25; stroke-dasharray: 4 4; }
.zen-chart .avgl { font: 400 12px/1 var(--f-mono); fill: var(--text-2); }
.zen-chart .hit { fill: transparent; cursor: crosshair; }
.zen-read { font: 400 13px/1.45 var(--f-mono); color: var(--text-2); min-height: 19px; margin: 8px 0 0; }
.zen-after { color: var(--text-2); max-width: 62ch; margin: 16px 0 0; }
.zen-nums { margin: 16px 0 0; color: var(--text-2); }
.zen-nums summary { cursor: pointer; min-height: 44px; display: list-item; padding: 12px 0; font: 500 15px/1.3 var(--f-text); color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.zen-nums table { border-collapse: collapse; margin-top: 8px; font: 400 13px/1.4 var(--f-mono); }
.zen-nums th, .zen-nums td { text-align: right; padding: 4px 14px 4px 0; border-bottom: 1px solid var(--line); }
.zen-nums th { font: 500 13px/1.3 var(--f-text); color: var(--muted); }
.zen-nums tr.is-you td { color: var(--text); font-weight: 600; }
.zen-out .zen-actions { margin-top: 20px; }
@media (forced-colors: active) { .zen-ledger li.is-now, .zen-ledger li.is-match { outline-color: Highlight; } .zen-sym { background: CanvasText; } }
