/* Mentalism instrument (14 Oct 2026): the 21-card trick, performed and then fully explained.
   Plain demonstration surface: line-drawn cards on the Night plate, one state colour, no stagecraft. */
.mc-s { display: inline-block; flex: none; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; forced-color-adjust: none; }
.mc-s[data-s="s"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.4C7.2 5.6 1.6 8.4 1.6 12.3c0 2.4 1.9 4 4.1 4 1.5 0 2.8-.7 3.5-1.9-.2 1.9-1 3.3-2.5 4.2h6.6c-1.5-.9-2.3-2.3-2.5-4.2.7 1.2 2 1.9 3.5 1.9 2.2 0 4.1-1.6 4.1-4 0-3.9-5.6-6.7-8.4-10.9z'/%3E%3C/svg%3E"); }
.mc-s[data-s="h"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 18.2C4.6 13.6 1.4 10.4 1.4 6.4c0-2.7 2-4.7 4.4-4.7 1.9 0 3.3 1.1 4.2 2.8.9-1.7 2.3-2.8 4.2-2.8 2.4 0 4.4 2 4.4 4.7 0 4-3.2 7.2-8.6 11.8z'/%3E%3C/svg%3E"); }
.mc-s[data-s="d"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.2Q13.4 5.8 17 10Q13.4 14.2 10 18.8Q6.6 14.2 3 10Q6.6 5.8 10 1.2z'/%3E%3C/svg%3E"); }
.mc-s[data-s="c"] { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='5.4' r='3.7'/%3E%3Ccircle cx='5.3' cy='11.3' r='3.7'/%3E%3Ccircle cx='14.7' cy='11.3' r='3.7'/%3E%3Ccircle cx='10' cy='10' r='2.4'/%3E%3Cpath d='M9.2 10.5c0 3.6-.9 6-2.7 8h7c-1.8-2-2.7-4.4-2.7-8z'/%3E%3C/svg%3E"); }
.mc-stage { width: 100%; }
.mc-table { --cw: 84px; --ch: 118px; --step: 36px; display: grid; grid-template-columns: repeat(3, var(--cw)); justify-content: center; column-gap: clamp(16px, 6vw, 56px); }
@media (max-width: 519px) { .mc-table { --cw: 62px; --ch: 87px; --step: 30px; column-gap: 14px; } }
.mc-col { list-style: none; margin: 0; padding: 0; min-height: calc(6 * var(--step) + var(--ch)); }
.mc-col.is-empty { border: 1.25px dashed var(--mmi-line-3); border-radius: 8px; }
.mc-card { position: relative; height: var(--ch); background: var(--ink, #0E1312); border: 1.5px solid var(--mmi-line); border-radius: 7px; color: var(--mmi-line); }
.mc-card + .mc-card { margin-top: calc(var(--step) - var(--ch)); }
.mc-ix { display: flex; align-items: center; gap: 3px; padding: 6px 7px; font: 500 16px/1 var(--f-display); letter-spacing: -.01em; }
.mc-pip { position: absolute; left: 50%; top: 58%; width: 34%; height: 26%; transform: translate(-50%, -50%); }
.mc-lbls { --cw: 84px; display: grid; grid-template-columns: repeat(3, var(--cw)); justify-content: center; column-gap: clamp(16px, 6vw, 56px); margin: 14px 0 0; font: 400 12px/1.2 var(--f-mono); color: var(--mmi-line-2); text-align: center; }
@media (max-width: 519px) { .mc-lbls { --cw: 62px; column-gap: 14px; } }
.mc-note { margin: 18px auto 0; max-width: 46ch; text-align: center; font: 400 13px/1.5 var(--f-text); color: var(--muted); }

/* the reveal: one card, large */
.mc-big { --cw: 200px; position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); margin: 0 auto; background: var(--ink, #0E1312); border: 2px solid var(--mmi-line); border-radius: 14px; color: var(--text); }
.mc-big .mc-ix { position: absolute; padding: 0; font-size: 30px; gap: 5px; }
.mc-big .mc-ix .mc-s { width: 24px; height: 24px; }
.mc-big .mc-ix.a { left: 16px; top: 16px; }
.mc-big .mc-ix.b { right: 16px; bottom: 16px; transform: rotate(180deg); }
.mc-big .mc-pip { width: 38%; height: 30%; top: 50%; }
@media (max-width: 519px) { .mc-big { --cw: 150px; } .mc-big .mc-ix { font-size: 24px; } }
.mc-cap { margin: 16px 0 0; text-align: center; font: 400 12px/1.4 var(--f-mono); color: var(--mmi-line-2); }

/* how it worked: four rows narrowing 21 to 1 */
.mc-how { width: 100%; max-width: 640px; margin: 0 auto; }
.mc-how > h3 { font: 500 1.375rem/1.25 var(--f-display); color: var(--text); margin: 0 0 4px; }
.mc-how > h3:focus { outline: none; }
.mc-how > h3:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.mc-how > p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.mc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: mcr; }
.mc-rows li { counter-increment: mcr; }
.mc-rows h4 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; font: 500 15px/1.35 var(--f-text); color: var(--text); }
.mc-rows h4::before { content: counter(mcr); flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-right: 2px; border-radius: 50%; border: 1px solid var(--line-strong, #5C6261); font: 400 12px/1 var(--f-mono); color: var(--muted); }
.mc-rows h4 span { flex: 1; }
.mc-rows h4 b { font: 400 12px/22px var(--f-mono); color: var(--mmi-line-2); white-space: nowrap; }
.mc-rows p { margin: 0 0 8px; padding-left: 32px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.mc-strip { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 2px; margin-left: 32px; }
.mc-strip i { height: 22px; border: 1px solid var(--mmi-line-3); border-radius: 2px; }
.mc-strip i.c { background: var(--mmi-sel-18); border: 2px solid var(--mmi-sel); }
.mc-strip i.y { background: var(--mmi-sel); border-color: var(--mmi-sel); }
.mc-ruler { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); gap: 2px; margin: 4px 0 0 32px; font: 400 12px/1 var(--f-mono); color: var(--mmi-line-2); text-align: center; }
.mc-ruler span:empty { visibility: hidden; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0 32px; font: 400 13px/1.4 var(--f-text); color: var(--mmi-line-2); }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 2px; border: 2px solid var(--mmi-sel); background: var(--mmi-sel-18); }
.mc-legend i.y { background: var(--mmi-sel); }
@media (max-width: 519px) { .mc-rows p, .mc-strip, .mc-ruler, .mc-legend { margin-left: 0; padding-left: 0; } .mc-strip i { height: 18px; } }

/* controls */
.mc-n { font: 500 1rem/1 var(--f-mono); }
.mc-panel h3 { font: 400 12px/16px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.mc-panel p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.mc-panel p.mc-lead { font: 500 1.125rem/1.45 var(--f-display); color: var(--text); }
.mc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.mc-acts .mm-btn { min-height: 48px; }
@media (forced-colors: active) { .mc-strip i.c, .mc-strip i.y { border-color: Highlight; } .mc-strip i.y { background: Highlight; } .mc-s { background: CanvasText; } }
