:root{
  --history-ink:#17324d;
  --history-ink-2:#244c68;
  --history-paper:#fffdf7;
  --history-warm:#f4efe4;
  --history-gold:#e2b84c;
  --history-coral:#dc6b5f;
  --history-green:#2f8466;
  --history-green-soft:#e2f3eb;
  --history-blue-soft:#e8f1f6;
  --history-violet:#75569c;
  --history-violet-soft:#f0eaf8;
  --history-red:#a04444;
  --history-border:#d8d3c7;
  --history-text:#22313c;
  --history-muted:#68757d;
  --history-shadow:0 18px 48px rgba(23,50,77,.11);
  --history-radius:24px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body.history-body{margin:0;min-height:100vh;background:linear-gradient(180deg,#f8f5ee 0,#edf4f2 100%);color:var(--history-text);font-family:"Rubik",Arial,sans-serif;padding-bottom:82px}
button,input,textarea,select{font:inherit}
button,a{touch-action:manipulation}
button{color:inherit}
a{color:inherit}
.history-skip-link{position:fixed;right:12px;top:-60px;z-index:1000;background:#fff;padding:12px 18px;border-radius:12px}.history-skip-link:focus{top:12px}
.history-topbar{height:76px;position:sticky;top:0;z-index:80;display:flex;align-items:center;gap:22px;padding:0 clamp(16px,4vw,58px);background:rgba(255,253,247,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(23,50,77,.12)}
.history-brand{display:flex;align-items:center;gap:10px;text-decoration:none;min-width:max-content}
.history-brand-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:var(--history-ink);color:#fff;font-size:22px;box-shadow:0 8px 18px rgba(23,50,77,.18)}
.history-brand strong,.history-brand small{display:block}.history-brand strong{font-size:16px}.history-brand small{font-size:11px;color:var(--history-muted);margin-top:2px}
.history-desktop-nav{display:flex;align-items:center;gap:2px;overflow:auto;scrollbar-width:none}
.history-desktop-nav button{border:0;background:transparent;padding:10px 11px;border-radius:12px;font-weight:700;font-size:13px;white-space:nowrap;cursor:pointer}
.history-desktop-nav button:hover,.history-desktop-nav button.active{background:var(--history-blue-soft);color:var(--history-ink)}
.history-topbar-actions{margin-inline-start:auto;display:flex;gap:8px;align-items:center;min-width:max-content}
.history-subject-switch,.history-sync-pill{display:flex;align-items:center;gap:7px;border:1px solid rgba(23,50,77,.14);background:#fff;border-radius:14px;padding:9px 12px;font-weight:800;font-size:12px;text-decoration:none;cursor:pointer}
.history-subject-switch:hover,.history-sync-pill:hover{border-color:var(--history-green);box-shadow:0 6px 15px rgba(47,132,102,.12)}
.history-sync-pill[data-sync-state="synced"]{background:var(--history-green-soft);border-color:rgba(47,132,102,.34);color:#176249}
.history-offline-banner{position:sticky;top:76px;z-index:75;background:#fff0ca;color:#604b18;padding:10px 18px;text-align:center;font-weight:700;font-size:13px}
#historyMain{min-height:calc(100vh - 76px)}
.history-shell{width:min(1180px,calc(100% - 32px));margin-inline:auto}
.history-page{padding:42px 0 70px}
.history-eyebrow{margin:0 0 8px;color:var(--history-green);font-size:12px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.history-page-header{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:28px}
.history-page-header h1,.history-hero h1{color:var(--history-ink);margin:0;font-size:clamp(32px,5vw,60px);line-height:1.02;letter-spacing:-.035em}
.history-page-header h1{font-size:clamp(30px,4vw,46px)}
.history-page-header p,.history-hero p{line-height:1.65}.history-page-header>div>p:last-child{max-width:720px;color:var(--history-muted);margin:10px 0 0}
.history-hero-wrap{position:relative;overflow:hidden;background:var(--history-ink);color:#fff}
.history-hero-wrap:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 15% 20%,rgba(226,184,76,.24),transparent 26%),radial-gradient(circle at 86% 84%,rgba(47,132,102,.28),transparent 32%)}
.history-hero{position:relative;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.7fr);gap:42px;align-items:center;padding:54px 0 50px}
.history-hero h1{color:#fff}.history-hero-copy>p:not(.history-eyebrow){max-width:710px;color:#e7eef2;font-size:18px}
.history-hero .history-eyebrow{color:#ffd878}
.history-motivation-note{display:flex;gap:14px;align-items:flex-start;background:#fff;color:var(--history-text);border-radius:22px;padding:18px 20px;margin:24px 0;box-shadow:0 14px 35px rgba(0,0,0,.16);transform:rotate(-.5deg)}
.history-motivation-note>span{font-size:27px}.history-motivation-note strong{display:block;color:var(--history-ink);font-size:19px}.history-motivation-note p{margin:4px 0 0!important;color:var(--history-muted)!important;font-size:14px!important}
.history-button{border:0;border-radius:14px;padding:12px 18px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
.history-button.primary{background:var(--history-green);color:#fff;box-shadow:0 9px 20px rgba(47,132,102,.25)}
.history-button.primary:hover{background:#236f55;transform:translateY(-1px)}
.history-button.secondary{background:#fff;border:1px solid var(--history-border);color:var(--history-ink)}
.history-button.ghost{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.34);color:#fff}
.history-button.small{padding:9px 13px;font-size:12px}
.history-text-button{border:0;background:transparent;color:var(--history-green);font-weight:900;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.history-hero-actions{display:flex;flex-wrap:wrap;gap:10px}
.history-countdown-card{background:rgba(255,255,255,.98);color:var(--history-text);border-radius:28px;padding:26px;box-shadow:0 25px 65px rgba(0,0,0,.24)}
.history-countdown-card>small{color:var(--history-muted);font-weight:700}.history-countdown-card>strong{display:block;color:var(--history-ink);font-size:62px;line-height:1;margin:8px 0 4px}.history-countdown-card>span{font-weight:800;color:var(--history-ink-2)}
.history-progress-track{height:11px;border-radius:99px;background:#dfe6e6;overflow:hidden;margin-top:20px}.history-progress-track>span{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,var(--history-green),#5eb28f);transition:width .35s ease}
.history-progress-caption{display:flex;justify-content:space-between;gap:8px;margin-top:9px;font-size:12px;color:var(--history-muted);font-weight:800}
.history-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:-18px;position:relative;z-index:3}
.history-stat{background:#fff;border:1px solid rgba(23,50,77,.1);border-radius:20px;padding:17px;display:flex;align-items:center;gap:12px;box-shadow:0 9px 24px rgba(23,50,77,.08)}
.history-stat span{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--history-blue-soft);font-size:20px}.history-stat strong,.history-stat small{display:block}.history-stat strong{color:var(--history-ink);font-size:22px}.history-stat small{color:var(--history-muted);margin-top:2px}
.history-section{margin-top:42px}.history-section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:17px}.history-section-heading h2{margin:0;color:var(--history-ink);font-size:clamp(24px,3vw,34px)}.history-section-heading p{margin:5px 0 0;color:var(--history-muted)}
.history-quick-task{background:linear-gradient(135deg,#fff,#f4fbf7);border:1px solid rgba(47,132,102,.24);border-radius:var(--history-radius);padding:24px;display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;box-shadow:var(--history-shadow)}
.history-quick-task h2,.history-quick-task h3{margin:0 0 8px;color:var(--history-ink)}.history-quick-task p{margin:0;color:var(--history-muted);line-height:1.6}.history-quick-badge{display:inline-block;background:var(--history-green-soft);color:#176249;font-weight:900;font-size:11px;padding:6px 10px;border-radius:99px;margin-bottom:10px}
.history-topic-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.history-topic-card{position:relative;overflow:hidden;text-align:right;border:1px solid rgba(23,50,77,.12);background:#fff;border-radius:26px;padding:25px;cursor:pointer;box-shadow:0 10px 26px rgba(23,50,77,.07)}
.history-topic-card:after{content:"";position:absolute;left:-22px;bottom:-45px;width:150px;height:150px;border-radius:50%;background:var(--topic-soft,var(--history-blue-soft))}
.history-topic-card:hover{transform:translateY(-3px);box-shadow:var(--history-shadow)}
.history-topic-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:16px;background:var(--topic-soft,var(--history-blue-soft));font-size:25px;position:relative;z-index:1}.history-topic-card h3{font-size:24px;color:var(--history-ink);margin:15px 0 6px;position:relative;z-index:1}.history-topic-card p{color:var(--history-muted);line-height:1.55;margin:0 0 18px;position:relative;z-index:1}.history-topic-card-footer{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1;font-size:13px;font-weight:800}.history-topic-card-footer strong{color:var(--history-green)}
.history-mode-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.history-mode-card{border:2px solid transparent;background:#fff;border-radius:20px;padding:19px;text-align:right;cursor:pointer}.history-mode-card:hover,.history-mode-card.selected{border-color:var(--history-green);background:var(--history-green-soft)}.history-mode-card strong,.history-mode-card small{display:block}.history-mode-card strong{color:var(--history-ink);font-size:16px}.history-mode-card small{color:var(--history-muted);line-height:1.45;margin-top:6px}
.history-pattern-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.history-filter{border:1px solid var(--history-border);background:#fff;border-radius:99px;padding:9px 14px;font-weight:800;cursor:pointer}.history-filter.active{background:var(--history-ink);border-color:var(--history-ink);color:#fff}
.history-pattern-grid{display:grid;gap:16px}
.history-pattern-card{background:#fff;border:1px solid rgba(23,50,77,.13);border-radius:24px;padding:22px;box-shadow:0 8px 22px rgba(23,50,77,.06)}
.history-pattern-card header{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:start}.history-pattern-number{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--history-ink);color:#fff;font-weight:900}.history-pattern-card h2,.history-pattern-card h3{margin:0;color:var(--history-ink)}.history-pattern-card header p{margin:6px 0 0;color:var(--history-muted);line-height:1.55}.history-repeat-badge{background:#fff3c9;color:#6d5412;border-radius:99px;padding:7px 10px;font-size:11px;font-weight:900;white-space:nowrap}
.history-pattern-meta{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.history-mini-tag{background:var(--history-blue-soft);color:var(--history-ink-2);border-radius:9px;padding:6px 9px;font-size:11px;font-weight:800}.history-pattern-actions{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #ece9e0;padding-top:16px}
.history-exam-reference-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;margin:0;padding:0}
.history-exam-reference-list>li{display:grid;gap:11px;padding:14px;border:1px solid var(--history-border);border-radius:16px;background:#fff;color:inherit}
.history-exam-reference-list>li:hover{border-color:var(--history-green);box-shadow:0 6px 16px rgba(47,132,102,.12)}
.history-exam-reference-title{display:flex;align-items:flex-start;gap:11px}
.history-exam-reference-title span{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:var(--history-green-soft);color:var(--history-green);font-weight:900}
.history-exam-reference-title strong{font-size:.94rem;line-height:1.45}
.history-exam-reference-task{margin:7px 0 0;color:var(--history-muted);font-size:.92rem;line-height:1.55}.history-exam-reference-task b{color:var(--history-ink)}
.history-exam-reference-actions{display:flex;flex-wrap:wrap;gap:7px}.history-exam-reference-actions a,.history-exam-reference-actions button{border:1px solid var(--history-border);border-radius:10px;background:#f8faf8;color:var(--history-ink);padding:8px 10px;font:inherit;font-size:.82rem;font-weight:850;text-decoration:none;cursor:pointer}.history-exam-reference-actions a:hover,.history-exam-reference-actions a:focus-visible,.history-exam-reference-actions button:hover,.history-exam-reference-actions button:focus-visible{border-color:var(--history-green);background:var(--history-green-soft);outline:none}
.history-must-list{display:grid;gap:10px;margin:18px 0}.history-must-item{display:grid;grid-template-columns:34px 1fr;gap:10px;background:var(--history-paper);border:1px solid #e7e0cf;border-radius:16px;padding:13px}.history-must-item>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--history-green-soft);color:var(--history-green);font-weight:900}.history-must-item strong{display:block;color:var(--history-ink);margin-bottom:4px}.history-must-item p{margin:0;color:var(--history-muted);line-height:1.5;font-size:13px}
.history-keywords{display:flex;flex-wrap:wrap;gap:7px;list-style:none;margin:0;padding:0}.history-keywords mark{background:linear-gradient(transparent 25%,#ffe585 25%,#ffe585 88%,transparent 88%);padding:2px 5px;font-weight:900;color:#46380c}
.history-topic-header{position:relative;overflow:hidden;background:var(--history-ink);color:#fff;padding:42px 0}.history-topic-header:after{content:"";position:absolute;inset:auto -100px -160px auto;width:400px;height:400px;border-radius:50%;background:rgba(255,255,255,.06)}.history-topic-header-inner{position:relative;z-index:1}.history-topic-header a{display:inline-flex;gap:6px;color:#dbe9ef;font-weight:800;text-decoration:none;margin-bottom:20px}.history-topic-header h1{margin:0;font-size:clamp(34px,5vw,56px)}.history-topic-header p{max-width:730px;color:#dbe9ef;line-height:1.6;font-size:17px}.history-topic-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.history-topic-tabs button{border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.08);color:#fff;border-radius:99px;padding:9px 14px;font-weight:800;cursor:pointer}.history-topic-tabs button.active{background:#fff;color:var(--history-ink)}
.history-timeline{position:relative;margin:20px 0;padding-right:34px}.history-timeline:before{content:"";position:absolute;right:12px;top:8px;bottom:8px;width:3px;border-radius:99px;background:linear-gradient(var(--history-gold),var(--history-green))}.history-timeline-item{position:relative;background:#fff;border:1px solid var(--history-border);border-radius:18px;padding:15px 17px;margin-bottom:13px}.history-timeline-item:before{content:"";position:absolute;right:-30px;top:20px;width:14px;height:14px;border:4px solid #f8f5ee;background:var(--history-green);border-radius:50%}.history-timeline-item time{display:inline-block;background:#fff1bd;color:#5c470e;border-radius:8px;padding:4px 7px;font-size:11px;font-weight:900}.history-timeline-item h3{color:var(--history-ink);margin:8px 0 5px}.history-timeline-item p{margin:0;color:var(--history-muted);line-height:1.55}
.history-evidence-board{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.history-evidence-card{background:#fff;border:1px solid var(--history-border);border-radius:20px;padding:19px}.history-evidence-card strong{color:var(--history-ink);display:block;font-size:17px}.history-evidence-card p{color:var(--history-muted);line-height:1.55;margin:7px 0 0}.history-evidence-card span{display:inline-block;color:var(--history-green);font-size:11px;font-weight:900;margin-bottom:9px}
.history-flash-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}.history-flashcard{perspective:1000px;min-height:360px}.history-flashcard-inner{position:relative;min-height:360px;transition:transform .55s;transform-style:preserve-3d}.history-flashcard.flipped .history-flashcard-inner{transform:rotateY(180deg)}.history-flash-face{position:absolute;inset:0;backface-visibility:hidden;border-radius:30px;padding:34px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:var(--history-shadow);cursor:pointer}.history-flash-front{background:var(--history-ink);color:#fff}.history-flash-back{background:#fff;border:1px solid var(--history-border);transform:rotateY(180deg)}.history-flash-face small{font-weight:900;opacity:.75}.history-flash-face h2{font-size:clamp(26px,4vw,42px);line-height:1.25;margin:20px 0}.history-flash-back h2{color:var(--history-ink);font-size:23px}.history-flash-back ul{margin:0;padding-right:22px;line-height:1.75}.history-flash-hint{font-size:12px;font-weight:800;opacity:.75}.history-card-controls{display:flex;gap:9px;justify-content:center;margin-top:18px}.history-card-controls button{min-width:150px}.history-flash-sidebar{background:#fff;border:1px solid var(--history-border);border-radius:22px;padding:20px;position:sticky;top:96px}.history-flash-sidebar h3{margin:0 0 14px;color:var(--history-ink)}.history-flash-sidebar p{color:var(--history-muted);line-height:1.5}.history-flash-counter{font-size:32px;color:var(--history-green);font-weight:900}.history-flash-dots{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}.history-flash-dots span{width:10px;height:10px;border-radius:50%;background:#d9dfdf}.history-flash-dots span.done{background:var(--history-green)}.history-flash-dots span.current{outline:3px solid #b8dcca}
.history-answer-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr);gap:22px;align-items:start}.history-answer-workspace,.history-rubric-panel{background:#fff;border:1px solid var(--history-border);border-radius:24px;padding:23px;box-shadow:0 8px 24px rgba(23,50,77,.06)}.history-answer-workspace h2,.history-rubric-panel h2{color:var(--history-ink);margin:0}.history-selected-source{margin-top:15px;padding:16px;border:2px solid #99cdb5;border-radius:16px;background:var(--history-green-soft)}.history-selected-source.general{border-color:var(--history-border);background:#f7f8f6}.history-selected-source h2{font-size:1.1rem;margin:2px 0 7px}.history-selected-source p{margin:0 0 10px;line-height:1.6}.history-selected-source .history-eyebrow{margin-bottom:4px}.history-question-prompt{background:var(--history-paper);border-right:5px solid var(--history-gold);padding:17px;border-radius:14px;margin:16px 0;line-height:1.7;font-weight:700}.history-prompt-kind{display:block;width:max-content;max-width:100%;margin-bottom:8px;padding:4px 9px;border-radius:999px;background:#fff0b8;color:#5d4700;font-size:.78rem;font-weight:900}.history-question-prompt small{display:block;margin-top:9px;color:var(--history-muted);font-weight:650}.history-keyword-helper{margin:14px 0;padding:14px;border:1px dashed #d0b45d;border-radius:14px;background:#fffdf5}.history-keyword-helper>strong{color:var(--history-ink)}.history-keyword-helper>p{margin:5px 0 10px;color:var(--history-muted);line-height:1.5}.history-answer-label{display:block;font-weight:900;color:var(--history-ink);margin:18px 0 8px}.history-answer-textarea{width:100%;min-height:260px;border:2px solid #d5deda;border-radius:18px;padding:16px;line-height:1.7;resize:vertical;background:#fff}.history-answer-textarea:focus{outline:3px solid rgba(47,132,102,.17);border-color:var(--history-green)}.history-answer-tools{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-top:13px}.history-answer-tools>div{display:flex;gap:8px;flex-wrap:wrap}.history-rubric-panel{position:sticky;top:96px}.history-rubric-panel>p{color:var(--history-muted);line-height:1.55}.history-rubric-preview{display:grid;gap:8px;margin-top:15px}.history-rubric-preview div{display:flex;gap:9px;align-items:flex-start;border-radius:13px;padding:10px;background:#f6f7f4}.history-rubric-preview span{color:var(--history-green);font-weight:900}.history-model-answer{margin-top:20px;border-top:1px solid var(--history-border);padding-top:18px}.history-model-answer h3{color:var(--history-ink)}.history-model-answer p{line-height:1.78}.history-model-answer mark{background:#ffe585;padding:0 3px}.history-feedback-panel{margin-top:18px;border-radius:20px;padding:20px}.history-feedback-panel.pass{background:var(--history-green-soft);border:1px solid #aad3bf}.history-feedback-panel.retry{background:#fff1e4;border:1px solid #e6b793}.history-score-ring{display:grid;place-items:center;width:92px;height:92px;border-radius:50%;background:conic-gradient(var(--history-green) calc(var(--score,0)*10%),#dfe6e3 0);position:relative}.history-score-ring:after{content:"";position:absolute;inset:9px;background:#fff;border-radius:50%}.history-score-ring strong{position:relative;z-index:1;color:var(--history-ink);font-size:25px}.history-feedback-head{display:flex;gap:16px;align-items:center}.history-feedback-head h3{margin:0;color:var(--history-ink)}.history-feedback-head p{margin:4px 0 0}.history-feedback-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.history-feedback-columns section{background:rgba(255,255,255,.62);border-radius:14px;padding:13px}.history-feedback-columns h4{margin:0 0 8px;color:var(--history-ink)}.history-feedback-columns ul{margin:0;padding-right:20px;line-height:1.6}
.history-draft-status{display:block;color:var(--history-muted);margin-top:7px;font-weight:700}
.history-exam-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.history-exam-card{background:#fff;border:1px solid var(--history-border);border-radius:20px;padding:19px}.history-exam-card.done{border-color:#8cc5ac;background:#f4fbf7}.history-exam-card header{display:flex;justify-content:space-between;gap:10px}.history-exam-card h3{margin:0;color:var(--history-ink)}.history-exam-card p{color:var(--history-muted);font-size:13px;line-height:1.5}.history-exam-links{display:flex;flex-wrap:wrap;gap:8px}.history-exam-links a{font-size:12px;font-weight:900;color:var(--history-ink-2)}.history-check-row{display:flex;align-items:center;gap:8px;margin-top:14px;border-top:1px solid #e8e6df;padding-top:12px;font-weight:800}.history-check-row input{width:20px;height:20px;accent-color:var(--history-green)}
.history-notebook-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}.history-notebook-summary article{background:#fff;border:1px solid var(--history-border);border-radius:19px;padding:18px}.history-notebook-summary strong{display:block;font-size:25px;color:var(--history-ink)}.history-notebook-summary span{color:var(--history-muted);font-size:12px}.history-note-list{display:grid;gap:12px}.history-note{background:#fff;border:1px solid var(--history-border);border-radius:20px;padding:18px}.history-note header{display:flex;justify-content:space-between;gap:10px}.history-note h3{margin:0;color:var(--history-ink)}.history-note time{color:var(--history-muted);font-size:11px}.history-note p{line-height:1.6}.history-note ul{line-height:1.65}.history-note-actions{display:flex;gap:8px}.history-note-actions button{border:0;background:transparent;color:var(--history-green);font-weight:800;cursor:pointer}.history-empty{background:#fff;border:1px dashed #b9c5c0;border-radius:24px;padding:36px;text-align:center}.history-empty span{font-size:38px}.history-empty h2{color:var(--history-ink)}
.history-media-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.history-media-card{overflow:hidden;background:#fff;border:1px solid var(--history-border);border-radius:24px}.history-media-visual{min-height:160px;display:grid;place-items:center;background:linear-gradient(135deg,var(--history-ink),#34617d);color:#fff;font-size:48px;position:relative}.history-media-visual:after{content:"";position:absolute;inset:18px;border:1px solid rgba(255,255,255,.25);border-radius:18px}.history-media-copy{padding:20px}.history-media-copy h3{margin:0;color:var(--history-ink)}.history-media-copy p{color:var(--history-muted);line-height:1.55}.history-media-status{display:inline-block;border-radius:99px;padding:6px 9px;background:#fff2c4;color:#6b5316;font-weight:900;font-size:11px}
.history-story-panel{background:#fff;border:1px solid var(--history-border);border-radius:26px;padding:25px}.history-story-panel h2{color:var(--history-ink);margin-top:0}.history-story-panel p{line-height:1.75}.history-story-evidence{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}.history-story-evidence div{background:var(--history-paper);border:1px solid #e4dece;border-radius:15px;padding:13px}.history-story-evidence strong{display:block;color:var(--history-ink);margin-bottom:4px}.history-story-evidence span{font-size:12px;color:var(--history-muted)}
.history-modal{width:min(620px,calc(100% - 28px));border:0;border-radius:26px;padding:27px;box-shadow:0 30px 100px rgba(16,35,50,.35);color:var(--history-text)}.history-modal::backdrop{background:rgba(15,32,44,.6);backdrop-filter:blur(3px)}.history-modal h2{margin:0 0 16px;color:var(--history-ink)}.history-modal-close{position:absolute;top:15px;left:15px;border:0;background:#eef1ef;border-radius:50%;width:36px;height:36px;font-size:24px;cursor:pointer}.history-sync-status{display:flex;gap:12px;background:var(--history-blue-soft);border-radius:17px;padding:15px;margin:15px 0}.history-sync-status-icon{font-size:25px}.history-sync-status p{margin:4px 0 0;color:var(--history-muted);font-size:13px}.history-sync-login label{display:block;font-weight:800;margin-top:14px}.history-sync-login>div{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:7px}.history-sync-login input{min-width:0;border:1px solid var(--history-border);border-radius:12px;padding:12px}.history-sync-connected>div:last-child{display:flex;gap:8px;align-items:center}.history-form-error{color:var(--history-red);font-weight:800}.history-source-modal ul{line-height:1.7}
.history-toast{position:fixed;z-index:150;left:50%;bottom:90px;transform:translate(-50%,30px);opacity:0;pointer-events:none;background:#17324d;color:#fff;border-radius:16px;padding:14px 18px;max-width:min(520px,calc(100% - 28px));box-shadow:0 14px 40px rgba(0,0,0,.24);font-weight:800;transition:.25s}.history-toast.show{opacity:1;transform:translate(-50%,0)}.history-toast.success{background:#176249}.history-toast.warm{background:#75510c}
.history-mobile-nav{display:none}
@media(max-width:1060px){
  body.history-body{padding-bottom:78px}
  .history-desktop-nav{display:none}
  .history-hero{grid-template-columns:1fr 300px}
  .history-mobile-nav{display:grid;grid-template-columns:repeat(6,1fr);position:fixed;bottom:0;left:0;right:0;z-index:90;background:rgba(255,255,255,.97);border-top:1px solid rgba(23,50,77,.14);padding:7px 7px calc(7px + env(safe-area-inset-bottom))}
  .history-mobile-nav button{border:0;background:transparent;font-size:10px;font-weight:800;padding:5px 1px;border-radius:11px}.history-mobile-nav button span{display:block;font-size:18px;margin-bottom:2px}.history-mobile-nav button.active{background:var(--history-green-soft);color:#176249}
}
@media(max-width:780px){
  body.history-body{padding-bottom:78px}
  .history-topbar{height:66px;padding:0 12px;gap:8px}.history-brand-mark{width:38px;height:38px;border-radius:12px}.history-brand strong{font-size:14px}.history-brand small{font-size:10px}
  .history-subject-switch span:last-child,.history-sync-pill span:last-child{display:none}.history-subject-switch,.history-sync-pill{width:40px;height:40px;padding:0;justify-content:center}
  .history-hero{grid-template-columns:1fr;padding:36px 0}.history-countdown-card{padding:20px}.history-countdown-card>strong{font-size:48px}
  .history-stats{grid-template-columns:1fr 1fr;margin-top:14px}.history-stat{padding:13px}.history-stat span{width:36px;height:36px}.history-stat strong{font-size:19px}
  .history-page{padding:30px 0 55px}.history-page-header{display:block}.history-page-header .history-button{margin-top:15px}
  .history-topic-grid,.history-exam-grid,.history-media-grid,.history-evidence-board,.history-exam-reference-list{grid-template-columns:1fr}.history-mode-picker{grid-template-columns:1fr}
  .history-quick-task{grid-template-columns:1fr}.history-quick-task .history-button{width:100%}
  .history-pattern-card{padding:17px}.history-pattern-card header{grid-template-columns:auto 1fr}.history-repeat-badge{grid-column:2}
  .history-flash-layout,.history-answer-layout{grid-template-columns:1fr}.history-flash-sidebar,.history-rubric-panel{position:static}.history-flash-face{padding:24px}.history-flashcard,.history-flashcard-inner{min-height:390px}.history-card-controls{flex-direction:column}.history-card-controls button{width:100%}
  .history-feedback-columns{grid-template-columns:1fr}.history-notebook-summary{grid-template-columns:1fr 1fr}.history-story-evidence{grid-template-columns:1fr}
  .history-mobile-nav{grid-template-columns:repeat(6,1fr)}
  .history-mobile-nav button{border:0;background:transparent;font-size:10px;font-weight:800;padding:5px 1px;border-radius:11px}.history-mobile-nav button span{display:block;font-size:18px;margin-bottom:2px}.history-mobile-nav button.active{background:var(--history-green-soft);color:#176249}
}
@media(max-width:460px){
  .history-shell{width:min(100% - 22px,1180px)}.history-stats{grid-template-columns:1fr 1fr;gap:8px}.history-stat{display:block}.history-stat span{margin-bottom:7px}
  .history-notebook-summary{grid-template-columns:1fr}.history-page-header h1{font-size:32px}.history-hero h1{font-size:40px}
  .history-answer-workspace,.history-rubric-panel{padding:16px}.history-answer-textarea{min-height:230px}.history-feedback-head{align-items:flex-start}.history-score-ring{width:76px;height:76px;flex:0 0 76px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* אימון זיכרון — שאלה 3א */
.memdrill{--ink:#17324d;--ink2:#244c68;--paper:#fffdf7;--warm:#f4efe4;--gold:#e2b84c;--coral:#dc6b5f;--green:#2f8466;--green-soft:#e2f3eb;--blue-soft:#e8f1f6;--violet:#75569c;--violet-soft:#f0eaf8;--red:#a04444;--border:#d8d3c7;--text:#22313c;--muted:#5d6b73;--shadow:0 18px 48px rgba(23,50,77,.11);--r:24px}
.memdrill{scroll-behavior:smooth}
.memdrill{margin:0;min-height:100vh;background:linear-gradient(180deg,#f8f5ee 0,#edf4f2 100%);color:var(--text);font-family:"Rubik",Arial,sans-serif;line-height:1.55;-webkit-text-size-adjust:100%}
.memdrill .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.memdrill :focus-visible{outline:3px solid #1b6fb5;outline-offset:2px}
.memdrill .top{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(255,253,247,.95);backdrop-filter:blur(14px);border-bottom:1px solid rgba(23,50,77,.12)}
.memdrill .brand{display:flex;align-items:center;gap:9px;min-width:0}
.memdrill .mark{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:var(--ink);box-shadow:0 8px 18px rgba(23,50,77,.18)}
.memdrill .mark svg{width:22px;height:22px}
.memdrill .brand strong{display:block;font-size:15px;line-height:1.15}
.memdrill .brand small{display:block;font-size:11px;color:var(--muted)}
.memdrill .nbbtn{margin-inline-start:auto;display:flex;align-items:center;gap:7px;border:1px solid rgba(23,50,77,.16);background:#fff;border-radius:14px;padding:9px 12px;font-weight:800;font-size:12.5px;cursor:pointer;min-height:44px}
.memdrill .nbbtn:hover{border-color:var(--green)}
.memdrill .nbbtn .cnt{display:grid;place-items:center;min-width:22px;height:22px;border-radius:99px;background:var(--gold);color:var(--ink);font-size:12px;padding:0 5px}
.memdrill .nbbtn.pulse .cnt{animation:md-pop .6s}
.memdrill .wrap{width:min(640px,calc(100% - 24px));margin:0 auto;padding:14px 0 120px}
.memdrill .btn,.history-drill-launch .history-button,.history-pdf-link{scroll-margin-bottom:96px}
.memdrill .prog{margin:2px 0 10px}
.memdrill .chips{display:flex;gap:6px;overflow:auto;scrollbar-width:none;padding-bottom:4px}
.memdrill .chip{flex:none;font-size:11.5px;font-weight:800;color:var(--muted);background:#fff;border:1px solid var(--border);border-radius:99px;padding:4px 10px}
.memdrill .chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.memdrill .chip.done{background:var(--green-soft);color:#176249;border-color:rgba(47,132,102,.35)}
.memdrill .track{height:11px;border-radius:99px;background:#dfe6e6;overflow:hidden;margin-top:6px}
.memdrill .track>span{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,var(--green),#5eb28f);transition:width .45s ease}
.memdrill .cap{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-weight:800;margin-top:6px}
.memdrill .card{position:relative;background:#fff;border:1px solid rgba(23,50,77,.1);border-radius:var(--r);box-shadow:var(--shadow);padding:20px 18px;margin-top:10px}
.memdrill #stage.enter .card{animation:md-rise .35s ease}
.memdrill .eyebrow{margin:0 0 6px;color:var(--green);font-size:12px;font-weight:900;letter-spacing:.03em}
.memdrill .eyebrow.rev{color:var(--violet)}
.memdrill h1, .memdrill h2{margin:0;color:var(--ink);line-height:1.2}
.memdrill h1{font-size:26px}
.memdrill h2{font-size:22px}
.memdrill .sub{margin:8px 0 0;color:var(--muted);font-size:15px}
.memdrill .big{font-size:20px;font-weight:800;color:var(--ink);margin:6px 0}
.memdrill .qbox{display:flex;gap:12px;align-items:center}
.memdrill .qbox .letter{flex:none;display:grid;place-items:center;width:66px;height:66px;border-radius:20px;color:#fff;font-size:42px;font-weight:800}
.memdrill .ans{display:flex;gap:8px;margin-top:14px}
.memdrill .ans input[type=text]{flex:1;min-width:0;border:2px solid var(--border);border-radius:14px;padding:12px 14px;font-size:18px;background:#fff;color:var(--text);min-height:50px}
.memdrill .ans input[type=text]:focus{border-color:var(--green);outline:none;box-shadow:0 0 0 4px rgba(47,132,102,.16)}
.memdrill .btn{border:0;border-radius:14px;padding:12px 18px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;min-height:48px;font-size:15px}
.memdrill .btn.primary{background:var(--green);color:#fff;box-shadow:0 9px 20px rgba(47,132,102,.25)}
.memdrill .btn.primary:hover{background:#236f55}
.memdrill .btn.secondary{background:#fff;border:1px solid var(--border);color:var(--ink)}
.memdrill .btn.hintb{background:var(--violet-soft);color:#4b3470;border:1px solid rgba(117,86,156,.3)}
.memdrill .btn.block{width:100%}
.memdrill .btn:disabled{opacity:.55;cursor:default}
.memdrill .link{border:0;background:transparent;color:var(--green);font-weight:900;text-decoration:underline;text-underline-offset:4px;cursor:pointer;padding:10px 4px;min-height:44px}
.memdrill .row{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
.memdrill .hint{margin-top:14px;border-radius:18px;padding:14px;background:var(--violet-soft);border:1px solid rgba(117,86,156,.25);animation:md-rise .3s ease}
.memdrill .hint h3{margin:0 0 6px;font-size:13px;color:var(--violet);font-weight:900}
.memdrill .hint .hrow{display:flex;gap:12px;align-items:center}
.memdrill .hint img{flex:none;width:84px;height:84px;border-radius:16px;object-fit:cover;border:2px solid #fff;box-shadow:0 6px 14px rgba(23,50,77,.15)}
.memdrill .hint p{margin:0;font-size:15.5px}
.memdrill .mask{display:inline-block;direction:rtl;letter-spacing:.18em;font-weight:900;color:var(--ink);font-size:20px;margin-top:6px}
.memdrill .opts{display:grid;gap:8px;margin-top:10px}
.memdrill .opt{border:2px solid var(--border);background:#fff;border-radius:14px;padding:12px 14px;font-weight:700;font-size:16px;text-align:start;cursor:pointer;min-height:50px}
.memdrill .opt:hover{border-color:var(--violet)}
.memdrill .opt.picked{border-color:var(--ink);background:var(--blue-soft)}
.memdrill .fb{margin-top:14px;border-radius:18px;padding:14px 16px;font-size:16px}
.memdrill .fb.good{background:var(--green-soft);border:1px solid rgba(47,132,102,.35);color:#14543d}
.memdrill .fb.warm{background:#fff4e0;border:1px solid #f0cf8d;color:#6a4a0a}
.memdrill .fb.nudge{background:var(--blue-soft);border:1px solid #bcd6e4;color:var(--ink)}
.memdrill .fb b.ansx{background:#fff;border-radius:8px;padding:1px 7px;color:var(--ink)}
.memdrill .trick{margin-top:10px;background:#fff;border-radius:14px;padding:10px 12px;border-inline-start:5px solid var(--gold);font-size:15px;color:var(--text)}
.memdrill .trick small{display:block;color:var(--violet);font-weight:900;margin-bottom:2px}
.memdrill .copy{margin-top:10px}
.memdrill .copy label{display:block;font-size:13px;font-weight:800;margin-bottom:4px}
.memdrill .copy input{width:100%;border:2px dashed #c9b27a;border-radius:12px;padding:9px 12px;font-size:16px;min-height:44px;background:#fff}
.memdrill .copy .ok{color:var(--green);font-weight:900}
.memdrill .ladder{margin-top:12px;display:grid;gap:6px}
.memdrill .lrow{display:flex;align-items:center;gap:10px;border-radius:14px;padding:6px 8px;background:#f8f6f0;border:2px solid transparent;min-height:46px;transition:.25s}
.memdrill .lrow .lt{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;color:#fff;font-weight:800;font-size:24px;opacity:.55}
.memdrill .lrow .lm{font-size:15px;color:var(--muted)}
.memdrill .lrow.cur{background:#fff;border-color:var(--ink);box-shadow:0 6px 16px rgba(23,50,77,.12)}
.memdrill .lrow.cur .lt{opacity:1}
.memdrill .lrow.cur .lm{color:var(--ink);font-weight:800}
.memdrill .lrow.ok .lt{opacity:1}
.memdrill .lrow.ok .lm{color:#14543d;font-weight:700}
.memdrill .lrow.help .lt{opacity:1}
.memdrill .lrow.help .lm{color:#8a5a00;font-weight:700}
.memdrill .lrow .mk{margin-inline-start:auto;font-size:15px}
.memdrill .say{background:linear-gradient(135deg,#17324d,#244c68);color:#fff}
.memdrill .say h2{color:#fff}
.memdrill .say .quote{white-space:pre-line;margin:12px 0;font-size:20px;font-weight:800;line-height:1.5;background:rgba(255,255,255,.1);border-radius:16px;padding:14px}
.memdrill .say .btn.secondary{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.35)}
.memdrill .say .link{color:#ffd878}
.memdrill .mic{width:46px;height:46px;border-radius:50%;background:var(--gold);display:grid;place-items:center;margin-bottom:8px}
.memdrill .mic svg{width:24px;height:24px}
.memdrill .imag{background:linear-gradient(135deg,#f0eaf8,#e8f1f6)}
.memdrill .imag ol{margin:10px 0 0;padding:0;list-style:none;display:grid;gap:8px;counter-reset:n}
.memdrill .imag li{counter-increment:n;background:#fff;border-radius:14px;padding:10px 12px 10px 12px;display:flex;gap:10px;align-items:flex-start}
.memdrill .imag li:before{content:counter(n);flex:none;width:26px;height:26px;border-radius:50%;background:var(--violet);color:#fff;font-weight:800;display:grid;place-items:center;font-size:14px}
.memdrill .sent{margin:12px 0;background:var(--warm);border-radius:16px;padding:14px;font-size:19px;font-weight:700;line-height:1.9;color:var(--ink)}
.memdrill .blank{display:inline-block;min-width:64px;border-bottom:3px dotted var(--violet);text-align:center;color:var(--green);font-weight:900;padding:0 4px}
.memdrill .cta{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.memdrill .sum{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}
.memdrill .sum div{background:var(--blue-soft);border-radius:16px;padding:10px;text-align:center}
.memdrill .sum strong{display:block;font-size:26px;color:var(--ink)}
.memdrill .sum small{font-size:12px;color:var(--muted);font-weight:700}
.memdrill .offer{margin-top:14px;border-radius:18px;padding:14px;background:#fff8e6;border:1px solid #f0cf8d;animation:md-rise .3s ease}
.memdrill .offer p{margin:0 0 8px}
.memdrill .foot{text-align:center;color:var(--muted);font-size:12.5px;font-weight:700;padding:12px 10px 22px}
.memdrill .dlg-back{position:fixed;inset:0;z-index:100;background:rgba(16,35,50,.5);display:flex;align-items:flex-end;justify-content:center}
.memdrill .dlg{width:min(560px,100%);max-height:86vh;overflow:auto;background:var(--paper);border-radius:26px 26px 0 0;padding:20px 18px 26px;box-shadow:0 -20px 80px rgba(16,35,50,.35)}
.memdrill .dlg header{display:flex;align-items:center;gap:10px}
.memdrill .dlg header h2{flex:1}
.memdrill .x{border:0;background:var(--warm);width:44px;height:44px;border-radius:14px;font-size:20px;cursor:pointer}
.memdrill .nbi{background:#fff;border:1px solid var(--border);border-radius:16px;padding:12px;margin-top:10px;border-inline-start:6px solid var(--gold)}
.memdrill .nbi b{display:block;color:var(--ink)}
.memdrill .nbi p{margin:4px 0 0;font-size:14px;color:var(--muted)}
.memdrill .nbi.mine{border-inline-start-color:var(--green);background:var(--green-soft)}
.memdrill .nbe{margin-top:12px;color:var(--muted)}
.memdrill .burst{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:var(--r)}
.memdrill .burst i{position:absolute;top:46%;left:50%;width:9px;height:14px;border-radius:3px;opacity:0;animation:md-fly .95s ease-out forwards}
.memdrill .checkpop{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--green);color:#fff;font-size:18px;animation:md-pop .5s;margin-inline-end:8px;vertical-align:middle}
.memdrill .toast{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:9px 16px;border-radius:99px;font-size:13px;font-weight:700;z-index:120;max-width:90%;text-align:center}
@keyframes md-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes md-pop{0%{transform:scale(.4)}60%{transform:scale(1.25)}100%{transform:scale(1)}}
@keyframes md-fly{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rot))}}
@media (min-width:620px){.memdrill .wrap{padding-top:26px} .memdrill .card{padding:26px} .memdrill h1{font-size:30px}}
.memdrill .exp{margin-top:10px;background:#fffbe9;border:1px solid #f0dc9a;border-radius:14px;padding:10px 12px;font-size:15.5px;line-height:1.7;color:var(--text);animation:md-rise .3s ease}
.memdrill .exp small{display:block;color:#8a5a00;font-weight:900;font-size:12px;margin-bottom:2px}
.memdrill .exp b, .memdrill .at b{background:linear-gradient(transparent 52%,#ffe66d 52%);font-weight:800;color:var(--ink)}
.memdrill details.lrow{display:block;padding:6px 8px}
.memdrill details.lrow>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:34px}
.memdrill details.lrow>summary::-webkit-details-marker{display:none}
.memdrill details.lrow .chev{color:var(--muted);font-size:14px;transition:transform .2s}
.memdrill details.lrow[open] .chev{transform:rotate(180deg)}
.memdrill details.lrow .exp{margin:6px 0 4px;font-size:14.5px}
.memdrill .alls{margin-top:14px;display:grid;gap:10px}
.memdrill .all{background:#faf8f2;border:1px solid var(--border);border-radius:16px;padding:8px 12px}
.memdrill .all>summary{font-weight:900;font-size:16px;cursor:pointer;min-height:40px;display:flex;align-items:center}
.memdrill .ar{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-top:1px solid #ece7d9}
.memdrill .ar .lt{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:11px;color:#fff;font-weight:800;font-size:21px;margin-top:2px}
.memdrill .ar .at{font-size:14.5px;line-height:1.65;color:var(--text);margin-top:2px}
.memdrill .exp .sent2{display:block;user-select:text;-webkit-user-select:text}
.memdrill .expnote{margin:8px 0 0;padding-top:6px;border-top:1px dashed #e3cf84;font-size:13px;color:#7a5a12;font-weight:700}

.memdrill .top{position:relative;top:auto}
.history-drill-launch{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0 0 18px;padding:18px 18px 16px;border-radius:22px;background:linear-gradient(135deg,#17324d,#244c68);color:#fff;box-shadow:var(--history-shadow)}
.history-drill-launch p{margin:0;color:#dbe7ee;line-height:1.55}
.history-drill-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%}
.history-drill-launch .history-button{background:#e2b84c;color:#17324d;box-shadow:none;min-height:48px}
.history-drill-launch .history-button:hover{background:#f0c85c}
.history-drill-launch a.history-pdf-link,.history-topic-tabs a.history-pdf-link{background:#fff;color:#17324d;text-decoration:none;box-shadow:none;min-height:48px}
.history-topic-tabs a.history-pdf-link{min-height:40px;border-radius:99px}
.history-drill-launch a.history-pdf-link:hover,.history-topic-tabs a.history-pdf-link:hover{background:#fff8e6}
.history-owner-footer{margin:28px 0 4px;text-align:center;color:var(--history-muted);font-size:12.5px;font-weight:700}
.memdrill-page{padding-top:18px}
@media(max-width:780px){
  .history-drill-launch .history-button{width:100%}
}

.memdrill{min-height:0;background:transparent}
.memdrill .toast{bottom:96px}
@media (prefers-reduced-motion:reduce){.memdrill *{animation:none!important;transition:none!important}}
