/* review.css — revision cards (see js/review.js). Uses the MCQ tool's own tokens from mcq.css. */
.rv-home{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px 22px;margin:0 0 18px;position:relative;overflow:hidden}
.rv-home.has-due{background:linear-gradient(135deg,var(--navy-deep),var(--navy) 60%,#355d96);color:#fff;border-color:transparent}
.rv-home.has-due::after{content:"";position:absolute;right:-40px;top:-40px;width:150px;height:150px;border-radius:50%;background:rgba(245,166,35,.16);pointer-events:none}
.rv-home-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;position:relative}
.rv-home h2{font-size:17px;font-weight:700;margin:0 0 2px}
.rv-home p{margin:0;font-size:13px;color:var(--text-secondary)}
.rv-home.has-due p{color:rgba(255,255,255,.85)}
.rv-flame{font-size:26px;line-height:1}
.rv-weak{display:flex;flex-direction:column;gap:8px;margin:14px 0 14px;position:relative}
.rv-weak div{display:grid;grid-template-columns:1fr auto;gap:2px 10px;font-size:13px;align-items:center;position:relative;padding-bottom:8px;background:linear-gradient(rgba(127,127,127,.25),rgba(127,127,127,.25)) left bottom/100% 5px no-repeat}
.rv-weak div b{font-variant-numeric:tabular-nums;font-weight:600}
.rv-weak div i{grid-column:1/-1;display:block;height:5px;border-radius:999px;background:var(--gold);position:absolute;left:0;bottom:0;max-width:100%}
.rv-home-acts{display:flex;gap:8px;flex-wrap:wrap;position:relative}
.rv-btn{font-family:inherit;font-weight:700;font-size:13.5px;padding:11px 16px;border-radius:11px;border:1.5px solid var(--border);background:var(--surface);color:var(--text-primary);cursor:pointer;transition:transform .12s,box-shadow .12s}
.rv-btn:hover{transform:translateY(-1px)}
.rv-btn:disabled{opacity:.5;cursor:default;transform:none}
.rv-btn.gold{background:var(--gold);color:var(--navy-deep);border-color:var(--gold)}
.rv-btn.pri{background:var(--navy);color:#fff;border-color:var(--navy)}
:root[data-theme="dark"] .rv-btn.pri{background:var(--gold);color:var(--navy-deep);border-color:var(--gold)}
.rv-home.has-due .rv-btn:not(.gold){background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.25)}
.rv-hint{margin:12px 0 0!important;font-size:12px!important;color:var(--text-tertiary)!important;position:relative}
.rv-home.has-due .rv-hint{color:rgba(255,255,255,.65)!important}
.rv-ph{display:none}

/* session chrome */
.rv{max-width:720px;margin:0 auto}
.rv-prog{display:flex;align-items:center;gap:10px;margin:4px 0 14px;font-size:13px;color:var(--text-secondary)}
.rv-n{font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}
.rv-n small{font-weight:500;color:var(--text-tertiary)}
.rv-track{flex:1;height:6px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);overflow:hidden}
.rv-track i{display:block;height:100%;background:var(--green);transition:width .3s}
.rv-right{font-weight:600;font-variant-numeric:tabular-nums}
.rv-exit,.rv-deckbtn{width:32px;height:32px;border-radius:9px;border:1px solid var(--border);background:var(--surface);color:var(--text-secondary);cursor:pointer;font-size:14px;display:grid;place-items:center;font-family:inherit}
.rv-exit:hover,.rv-deckbtn:hover{color:var(--text-primary);border-color:var(--border-strong)}

/* card */
.rv-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;animation:slideIn .25s ease}
.rv-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 16px;background:var(--surface-2);border-bottom:1px solid var(--border)}
.rv-topic{font-size:12px;font-weight:600;color:var(--green);background:rgba(34,197,94,.1);border-radius:999px;padding:3px 10px}
.rv-tabs{display:flex;gap:4px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-tertiary)}
.rv-tabs span{padding:3px 9px;border-radius:999px;border:1px solid transparent}
.rv-tabs span.on{background:var(--surface);border-color:var(--border);color:var(--text-primary)}
.rv-lesson{padding:18px 18px 14px}
.rv-rule{font-size:17px;font-weight:700;line-height:1.4;color:var(--text-primary);margin:0 0 8px;text-wrap:balance}
.rv-how{font-size:14px;line-height:1.6;color:var(--text-primary);margin:0 0 14px}
.rv-hub{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--surface-2)}
.rv-cap{display:flex;justify-content:space-between;gap:8px;padding:6px 12px;border-bottom:1px solid var(--border);font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-tertiary)}
.rv-cap b{color:var(--gold);text-transform:none;letter-spacing:0;font-size:11px}
.rv-step{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);border-bottom:1px solid var(--border)}
.rv-step:last-child{border-bottom:0}
.rv-step .m{padding:8px 12px;font-size:15px;overflow-x:auto;min-width:0}
.rv-step .r{padding:8px 12px;font-size:12px;color:var(--text-secondary);border-left:1px dashed var(--border);display:flex;align-items:center;min-width:0;line-height:1.35}
.rv-step.final .m{font-weight:600;background:rgba(245,166,35,.14)}
.rv-step.final .r{color:var(--text-primary);font-weight:600}
.rv-trap{margin:14px 0 0;font-size:13px;line-height:1.5;background:rgba(239,68,68,.07);border-left:3px solid var(--red);border-radius:0 10px 10px 0;padding:9px 12px;color:var(--text-primary)}
.rv-trap b{color:var(--red)}
.rv-why{font-size:12px;color:var(--text-tertiary);padding:0 18px 12px;line-height:1.5}
.rv-why a{color:var(--navy);text-decoration:underline}
:root[data-theme="dark"] .rv-why a{color:var(--gold-soft)}
.rv-orig{margin-top:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px 12px;color:var(--text-primary);font-size:13px}
.rv-orig-stem{margin-bottom:6px}
.rv-orig div b{display:inline-block;width:18px;color:var(--text-tertiary)}
.rv-cardacts{display:grid;grid-template-columns:1fr auto;gap:8px;padding:0 18px 18px}
.rv-burn{font-family:inherit;font-weight:700;font-size:13px;border-radius:11px;padding:0 14px;border:1.5px solid rgba(255,106,61,.5);background:transparent;color:#e2531f;cursor:pointer;white-space:nowrap}
.rv-burn:hover{background:rgba(255,106,61,.1)}
:root[data-theme="dark"] .rv-burn{color:#ff8a62}
.rv-burned{margin:0 18px 18px;background:rgba(245,166,35,.12);border:1px solid rgba(245,166,35,.4);border-radius:11px;padding:10px 12px;font-size:13px}
.rv-burned button{background:none;border:0;color:var(--navy);font:700 13px inherit;font-family:inherit;cursor:pointer;margin-left:8px;text-decoration:underline}
:root[data-theme="dark"] .rv-burned button{color:var(--gold-soft)}

/* check */
.rv-check{padding:16px 18px 18px}
.rv-stem{font-size:16px;font-weight:500;line-height:1.55;margin:0 0 14px;color:var(--text-primary)}
.rv-opts .opt-btn.dimmed{opacity:.55}
.rv-expl.ok{border-color:rgba(34,197,94,.4)}
.rv-expl.no{border-color:rgba(239,68,68,.4)}
.rv-howfeel{margin:12px 0 6px;font-size:12.5px;color:var(--text-tertiary)}
.rv-rate{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.rv-rate button{font-family:inherit;border:1.5px solid var(--border);background:var(--surface);border-radius:10px;padding:9px 4px;font-weight:700;font-size:12.5px;color:var(--text-primary);cursor:pointer;transition:border-color .12s,transform .12s}
.rv-rate button small{display:block;font-weight:500;font-size:10.5px;color:var(--text-tertiary);margin-top:2px;font-variant-numeric:tabular-nums}
.rv-rate button kbd{display:inline-block;font:500 9.5px ui-monospace,Menlo,monospace;color:var(--text-tertiary);opacity:.8;margin-top:3px;padding:0 5px;border:1px solid var(--border);border-radius:4px;background:var(--surface-2);line-height:1.5}
.rv-rate .again{color:var(--red)}.rv-rate .hard{color:#b7791f}.rv-rate .good{color:var(--green)}.rv-rate .easy{color:var(--blue)}
.rv-rate button:hover,.rv-rate button.hint{border-color:currentColor;transform:translateY(-1px)}

/* nav */
.rv-nav{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;margin-top:12px}
.rv-keys{text-align:center;font-size:11.5px;color:var(--text-tertiary)}
.rv-keys kbd{font:500 10.5px ui-monospace,Menlo,monospace;background:var(--surface-2);border:1px solid var(--border);border-radius:4px;padding:1px 5px;margin:0 1px}
@media(max-width:600px){.rv-keys{display:none}.rv-nav{grid-template-columns:1fr 1fr}.rv-cardacts{grid-template-columns:1fr}.rv-burn{padding:11px}}

/* deck */
.rv-deck{display:flex;flex-direction:column;gap:10px}
.rv-deck input{font-family:inherit;font-size:14px;padding:11px 14px;border:1.5px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text-primary);width:100%}
.rv-deck h4{margin:10px 0 2px;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-tertiary);display:flex;justify-content:space-between}
.rv-deck h4 span{font-weight:500;text-transform:none;letter-spacing:0}
.rv-tiles-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.rv-tile{font-family:inherit;text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:11px;padding:10px 12px;cursor:pointer;display:flex;flex-direction:column;gap:3px;min-width:0;transition:border-color .12s,transform .12s}
.rv-tile:hover{border-color:var(--border-strong);transform:translateY(-1px)}
.rv-tile b{font-size:13px;color:var(--text-primary);line-height:1.3}
.rv-tile small{font:500 11px ui-monospace,Menlo,monospace;color:var(--text-tertiary)}
.rv-tile .st{font-size:10.5px;font-weight:600;border-radius:999px;padding:1px 8px;align-self:flex-start;margin-top:2px}
.rv-tile.burned{opacity:.6}
.st.due{background:rgba(239,68,68,.1);color:var(--red)}.st.soon{background:rgba(34,197,94,.1);color:var(--green)}.st.new{background:var(--surface-2);color:var(--text-tertiary);border:1px solid var(--border)}.st.burned{background:rgba(245,166,35,.15);color:#b7791f}
.rv-empty{text-align:center;padding:30px 16px;color:var(--text-secondary)}
.rv-empty b{display:block;color:var(--text-primary);font-size:15px;margin-bottom:4px}
.rv-deckacts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* summary */
.rv-done h2{font-size:20px;margin:0 0 14px}
.rv-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 14px}
.rv-tiles div{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:12px 8px}
.rv-tiles b{display:block;font-size:22px;line-height:1;color:var(--text-primary)}
.rv-tiles span{font-size:11px;color:var(--text-tertiary)}
@media(max-width:480px){.rv-tiles{grid-template-columns:repeat(2,1fr)}}
.rv-xp{font-weight:700;color:var(--navy);margin:0 0 14px}
:root[data-theme="dark"] .rv-xp{color:var(--gold-soft)}
.rv-done h3{font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-tertiary);margin:10px 0 6px;text-align:left}
.rv-next{text-align:left;display:flex;flex-direction:column;gap:2px}
.rv-next div{display:flex;justify-content:space-between;gap:10px;font-size:13px;border-bottom:1px dashed var(--border);padding:5px 0}
.rv-next div span:last-child{font-variant-numeric:tabular-nums;color:var(--text-secondary);white-space:nowrap}
.rv-doneacts{margin-top:18px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}

.rv-toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,16px);background:var(--navy-deep);color:#fff;font-size:13px;font-weight:600;padding:10px 16px;border-radius:999px;opacity:0;pointer-events:none;transition:.25s;z-index:60;box-shadow:0 10px 30px -10px rgba(0,0,0,.5)}
.rv-toast.show{opacity:1;transform:translate(-50%,0)}
@media(prefers-reduced-motion:reduce){.rv-card{animation:none}}

/* figures on lesson cards (js/card-figures.js) */
.rv-fig{margin:0 0 14px}
.ksfig-wrap{margin:0;position:relative;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:10px 8px 6px}
.ksfig-wrap svg text{font-family:Poppins,system-ui,sans-serif}
.ksfig-foot{display:flex;justify-content:flex-end;padding:4px 2px 0}
.ksfig-replay{padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text-secondary);cursor:pointer;font-size:12px;line-height:1.2;font-weight:500;font-family:inherit}
.ksfig-replay:hover{color:var(--text-primary);border-color:var(--border-strong)}
:root[data-theme="dark"] .ksfig-wrap{background:#111a28}

/* header shortcut to the Revision Cards home, with a due badge */
.mcq-cards{position:relative;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-secondary);flex:0 0 auto}
.mcq-cards svg{width:18px;height:18px}
.mcq-cards:hover{color:var(--text-primary);border-color:var(--border-strong)}
.mcq-cards b{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--gold);color:var(--navy-deep);font-size:10.5px;font-weight:800;display:grid;place-items:center;line-height:1;box-shadow:0 0 0 2px var(--header-bg,#fff)}
.mcq-cards + .mcq-theme{margin-left:0}

/* deck scope toggle */
.rv-scope{display:inline-flex;border:1px solid var(--border);border-radius:999px;padding:3px;margin:0 0 12px;background:var(--surface-2)}
.rv-scope button{font-family:inherit;font-weight:700;font-size:12.5px;padding:7px 14px;border-radius:999px;border:0;background:transparent;color:var(--text-secondary);cursor:pointer}
.rv-scope button.on{background:var(--navy);color:#fff}
:root[data-theme="dark"] .rv-scope button.on{background:var(--gold);color:var(--navy-deep)}
/* peek overlay (card opened from inside a quiz) */
.expl-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.rv-peek{position:fixed;inset:0;z-index:200;display:flex;align-items:flex-end;justify-content:center;padding:16px}
.rv-peek-back{position:absolute;inset:0;background:rgba(10,15,26,.55);backdrop-filter:blur(2px)}
.rv-peek-card{position:relative;width:min(640px,100%);max-height:88vh;overflow:auto;box-shadow:0 24px 60px rgba(0,0,0,.35);animation:rvpeek .28s cubic-bezier(.2,.8,.2,1)}
@keyframes rvpeek{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media(min-width:720px){.rv-peek{align-items:center}}
.rv-peek-open{overflow:hidden}
.rv-peek .rv-head .rv-exit{margin-left:auto}
.rv-indeck{font-size:13px;font-weight:600;color:var(--text-secondary);align-self:center}
@media(prefers-reduced-motion:reduce){.rv-peek-card{animation:none}}
