/* Exam Hub: landing option cards, Competitive catalogue and exam page. Loaded after exam-hub.css. */

/* ---------- landing: compact header + both option cards above the fold ---------- */
.eh-lp{--eh-ink:#101a3d;--eh-copy:#55607a;--eh-line:#e6e8f2;--eh-brand:#5b55f6;--eh-grad:linear-gradient(135deg,#5B55F6 0%,#6D4AF0 50%,#8B3FE6 100%);
  position:relative;overflow:hidden;padding:30px 0 56px;background:linear-gradient(180deg,#f3f1ff 0%,#faf9ff 46%,#fff 100%)}
.eh-lp::before{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(91,85,246,.12) 1.2px,transparent 1.2px);background-size:22px 22px;mask-image:linear-gradient(180deg,#000 0%,transparent 70%);-webkit-mask-image:linear-gradient(180deg,#000 0%,transparent 70%);pointer-events:none}
.eh-lp-blob{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55;pointer-events:none}
.eh-lp-blob.b1{width:380px;height:380px;left:-120px;top:-140px;background:#c7d2fe}
.eh-lp-blob.b2{width:340px;height:340px;right:-100px;top:-80px;background:#fbcfe8}
.eh-lp-blob.b3{width:300px;height:300px;right:24%;bottom:-200px;background:#fde68a;opacity:.35}
.eh-lp-inner{position:relative}
.eh-lp-head{text-align:center;max-width:760px;margin:0 auto 26px}
.eh-lp-eyebrow{display:inline-flex;align-items:center;gap:8px;margin:0 0 10px;padding:6px 14px;border:1px solid #d9d3ff;border-radius:999px;background:rgba(255,255,255,.75);color:#4338ca;font-size:12.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.eh-lp-eyebrow svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.eh-lp-head h1{margin:0;font-family:var(--gmp-display,inherit);font-size:clamp(34px,4.4vw,52px);font-weight:850;line-height:1.05;letter-spacing:-.045em;background:linear-gradient(100deg,#101a3d 30%,#5b55f6 70%,#db2777);-webkit-background-clip:text;background-clip:text;color:transparent}
.eh-lp-intro{margin:10px 0 0;font-size:17px;line-height:1.5;color:var(--eh-copy)}
.eh-lp-chips{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:0;list-style:none}
.eh-lp-chips li{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#fff;box-shadow:0 4px 14px -8px rgba(30,27,95,.35);color:#334155;font-size:13.5px;font-weight:700}
.eh-lp-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;max-width:1120px;margin:0 auto}
.eh-lp-cards.is-single{grid-template-columns:minmax(0,560px);justify-content:center}
.eh-lp-card{position:relative;display:flex;align-items:center;gap:18px;min-height:220px;padding:18px 22px 18px 14px;border:1px solid var(--eh-line);border-radius:26px;background:#fff;color:var(--eh-ink);text-decoration:none;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,64,.04),0 20px 46px -20px rgba(30,27,95,.3);transition:transform .2s,box-shadow .2s,border-color .2s}
.eh-lp-card::after{content:"";position:absolute;inset:0 0 auto;height:5px;background:var(--eh-grad)}
.eh-lp-card.is-competitive::after{background:linear-gradient(90deg,#f59e0b,#ea580c,#db2777)}
.eh-lp-card:hover{transform:translateY(-4px);border-color:#c7c2fb;box-shadow:0 32px 64px -22px rgba(79,70,229,.4)}
.eh-lp-card:focus-visible{outline:3px solid #a5b4fc;outline-offset:3px}
.eh-lp-art{display:grid;place-items:center;flex:0 0 42%;max-width:240px;align-self:stretch;border-radius:18px;background:linear-gradient(160deg,#eef0ff,#f8f7ff)}
.eh-lp-card.is-competitive .eh-lp-art{background:linear-gradient(160deg,#fff1df,#fff8f1)}
.eh-lp-art img{width:100%;height:auto;max-height:190px;transition:transform .3s}
.eh-lp-card:hover .eh-lp-art img{transform:scale(1.05)}
.eh-lp-body{display:grid;gap:8px;flex:1;min-width:0}
.eh-lp-title{font-family:var(--gmp-display,inherit);font-size:28px;font-weight:850;letter-spacing:-.03em;line-height:1.1}
.eh-lp-text{font-size:15px;line-height:1.5;color:var(--eh-copy)}
.eh-lp-points{display:flex;flex-wrap:wrap;gap:6px}
.eh-lp-points span{padding:4px 10px;border-radius:999px;background:#f3f4fb;color:#3b4467;font-size:12.5px;font-weight:700}
.eh-lp-card.is-competitive .eh-lp-points span{background:#fff4e8;color:#7c2d12}
.eh-lp-cta{justify-self:start;display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:4px;padding:10px 20px;border-radius:999px;background:var(--eh-grad);color:#fff;font-size:15px;font-weight:800;box-shadow:0 12px 24px -12px rgba(91,85,246,.8)}
.eh-lp-card.is-competitive .eh-lp-cta{background:linear-gradient(135deg,#f59e0b,#ea580c 60%,#db2777);box-shadow:0 12px 24px -12px rgba(234,88,12,.7)}
@media(max-width:980px){
  .eh-lp-cards{grid-template-columns:minmax(0,1fr);max-width:640px}
}
@media(max-width:560px){
  .eh-lp{padding:20px 0 36px}
  .eh-lp-head{margin-bottom:18px}
  .eh-lp-eyebrow{font-size:11.5px;padding:5px 12px}
  .eh-lp-head h1{font-size:34px}
  .eh-lp-intro{font-size:15px;margin-top:6px}
  .eh-lp-chips{gap:6px;margin-top:10px}
  .eh-lp-chips li{font-size:12px;padding:5px 10px}
  .eh-lp-cards{gap:14px}
  .eh-lp-card{min-height:0;gap:12px;padding:16px 14px 14px 10px;border-radius:20px;align-items:flex-start}
  .eh-lp-art{flex:0 0 96px;max-width:96px;align-self:flex-start;padding:6px 0;border-radius:14px}
  .eh-lp-title{font-size:22px}
  .eh-lp-text{font-size:13.5px}
  .eh-lp-points{display:none}
  .eh-lp-cta{min-height:44px;padding:9px 16px;font-size:14px}
}
@media(max-width:380px) and (max-height:700px){.eh-lp-chips{display:none}.eh-lp-head h1{font-size:30px}}
@media(prefers-reduced-motion:reduce){.eh-lp-card,.eh-lp-art img{transition:none}}

/* ---------- competitive catalogue ---------- */
.eh-sub{margin:0 0 16px;font-family:var(--gmp-display,inherit);font-size:24px;font-weight:800;color:var(--eh-ink)}
.eh-exams{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:16px}
.eh-exam{display:flex;align-items:center;gap:16px;height:100%;min-height:104px;padding:18px 20px;border:1.5px solid var(--eh-line);border-radius:20px;background:#fff;color:var(--eh-ink);text-decoration:none;box-shadow:0 12px 30px -18px rgba(30,27,95,.25);transition:transform .2s,border-color .2s,box-shadow .2s;box-sizing:border-box}
.eh-exam:hover{transform:translateY(-3px);border-color:#a5a0fa;box-shadow:0 22px 44px -18px rgba(79,70,229,.35)}
.eh-exam.is-draft{border-style:dashed;opacity:.8}
.eh-exam-badge{display:grid;place-items:center;width:64px;height:64px;flex:none;border-radius:18px;font-family:var(--gmp-display,inherit);font-size:17px;font-weight:850;letter-spacing:.02em;color:#fff}
.tone-indigo .eh-exam-badge{background:linear-gradient(135deg,#5b55f6,#8b3fe6)}
.tone-amber .eh-exam-badge{background:linear-gradient(135deg,#f59e0b,#ea580c)}
.tone-teal .eh-exam-badge{background:linear-gradient(135deg,#14b8a6,#0e7490)}
.tone-rose .eh-exam-badge{background:linear-gradient(135deg,#fb7185,#be123c)}
.tone-violet .eh-exam-badge{background:linear-gradient(135deg,#a78bfa,#6d28d9)}
.tone-sky .eh-exam-badge{background:linear-gradient(135deg,#38bdf8,#2563eb)}
.eh-exam-body{display:grid;gap:3px;flex:1;min-width:0}
.eh-exam-body strong{font-size:19px;font-weight:850;overflow-wrap:anywhere}
.eh-exam-body small{font-size:13.5px;line-height:1.4;color:var(--eh-copy);overflow-wrap:anywhere}
.eh-exam-meta{font-size:12.5px;font-weight:800;color:var(--eh-brand)}
.eh-exam-go{font-size:22px;font-weight:800;color:var(--eh-brand)}

/* ---------- exam page ---------- */
.eh-back{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-bottom:10px;color:var(--eh-brand-deep);font-weight:800;text-decoration:none}
.eh-cats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px;margin-bottom:26px}
.eh-cat{display:flex;align-items:center;gap:12px;min-height:72px;padding:12px 16px;border:1.5px solid var(--eh-line);border-radius:18px;background:#fff;color:var(--eh-ink);text-decoration:none}
.eh-cat:hover{border-color:#a5a0fa}
.eh-cat[aria-current=page]{border-color:var(--eh-brand);background:linear-gradient(180deg,#f3f1ff,#fff);box-shadow:0 0 0 3px rgba(91,85,246,.14)}
.eh-cat-icon{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:14px;background:#f3f4fb;font-size:22px}
.eh-cat[aria-current=page] .eh-cat-icon{background:#fff}
.eh-cat-text{display:grid;gap:2px;min-width:0}
.eh-cat-text strong{font-size:15.5px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.eh-cat-text small{font-size:12.5px;font-weight:700;color:var(--eh-muted)}
.eh-res-wrap{scroll-margin-top:90px}
.eh-res-head{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin-bottom:12px}
.eh-res-head h2{margin:0;font-family:var(--gmp-display,inherit);font-size:clamp(24px,3vw,32px);font-weight:850;letter-spacing:-.03em;color:var(--eh-ink);overflow-wrap:anywhere}
.eh-res-head p{margin:4px 0 0;color:var(--eh-copy)}
.eh-res-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:12px}
.eh-res{display:flex;align-items:center;gap:14px 22px;padding:18px 20px;border:1px solid var(--eh-line);border-radius:18px;background:#fff;box-shadow:0 8px 22px -18px rgba(30,27,95,.3)}
.eh-res.is-draft{border-style:dashed}
.eh-res-main{flex:1;min-width:0}
.eh-res-main h3{margin:0;font-size:18px;font-weight:800;color:var(--eh-ink);overflow-wrap:anywhere}
.eh-res-main p{margin:6px 0 0;font-size:14.5px;line-height:1.5;color:var(--eh-copy)}
.eh-res-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.eh-res-chips span{padding:4px 10px;border-radius:999px;background:#f3f4fb;color:#3b4467;font-size:12.5px;font-weight:700}
.eh-res-chips .eh-src.src-faculty{background:#ede9fe;color:#5b21b6}
.eh-res-chips .eh-src.src-pyq{background:#e0f2fe;color:#075985}
.eh-res-chips .eh-src.src-mixed{background:#fef3c7;color:#92400e}
.eh-res-acts{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;flex:none;justify-content:flex-end;max-width:52%}
.eh-res-acts .eh-show-btn{text-decoration:none}
.eh-show-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.eh-show-btn:disabled{opacity:.7;cursor:progress}
@media(max-width:760px){
  .eh-res{flex-direction:column;align-items:stretch;padding:16px}
  .eh-res-acts{max-width:none;justify-content:flex-start}
  .eh-res-acts .eh-show-btn{flex:1 1 100%}
  .eh-exam{min-height:88px;padding:14px 16px}
  .eh-exam-badge{width:54px;height:54px;font-size:15px}
}

/* exam page: paper rows (same look as Academics results) */
.eh-ctable{margin-top:14px}
.eh-crow{display:grid;grid-template-columns:52px minmax(0,2.6fr) minmax(0,1fr) minmax(0,1.2fr) auto;align-items:center;gap:10px 16px;padding:12px 16px 12px 8px;border-top:1px solid #eef0f6}
.eh-crow:first-child{border-top:0}
.eh-crow.eh-row-head{padding-top:12px;padding-bottom:12px;background:#f7f7fc;font-size:13px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#6b7390}
.eh-crow.is-draft{background:repeating-linear-gradient(135deg,#fff,#fff 10px,#fbfaff 10px,#fbfaff 20px)}
.eh-crow .eh-res-chips{margin-top:4px}
.eh-desc{display:block;margin-top:4px;font-size:13.5px;line-height:1.45;color:var(--eh-copy)}
.eh-row-dl.is-busy{cursor:progress;opacity:.75}
@media(max-width:980px){
  .eh-crow{grid-template-columns:48px minmax(0,1fr) auto auto;grid-template-areas:"pick title title title" "pick a v d";padding:12px 14px 12px 6px}
  .eh-crow.eh-row-head{display:none}
  .eh-crow .eh-pick{grid-area:pick;align-self:start}
  .eh-crow .eh-title{grid-area:title}
  .eh-crow .eh-act-a{grid-area:a}.eh-crow .eh-act-v{grid-area:v}.eh-crow .eh-act-d{grid-area:d;justify-self:end}
  .eh-crow .eh-act-a:has(.eh-none),.eh-crow .eh-act-v:has(.eh-none){visibility:hidden}
}
@media(max-width:720px){
  .eh-crow{grid-template-columns:44px minmax(0,1fr);grid-template-areas:"pick title" "pick a" "pick v" "pick d";gap:4px 10px}
  .eh-crow .eh-act-a:has(.eh-none),.eh-crow .eh-act-v:has(.eh-none){display:none}
  .eh-crow .eh-act-d{justify-self:stretch;margin-top:4px}
  .eh-crow .eh-row-dl{width:100%;justify-content:center}
}
/* search by label + year */
.eh-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.eh-search{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:4px 0 14px}
.eh-search-box{position:relative;flex:1 1 320px;max-width:560px}
.eh-search-box svg{position:absolute;left:14px;top:50%;width:20px;height:20px;transform:translateY(-50%);fill:none;stroke:#6b7390;stroke-width:2.2;stroke-linecap:round;pointer-events:none}
.eh-search-box input{width:100%;min-height:48px;padding:10px 14px 10px 44px;border:1.5px solid #d9dcea;border-radius:13px;background:#fff;color:var(--eh-ink);font:inherit;font-size:16px;box-sizing:border-box}
.eh-search-box input:focus{outline:none;border-color:var(--eh-brand);box-shadow:0 0 0 3px rgba(91,85,246,.15)}
.eh-year{display:flex;align-items:center;gap:8px;font-weight:800;color:var(--eh-ink)}
.eh-year .eh-select{min-width:150px}
.eh-search-count{font-size:14px;font-weight:700;color:var(--eh-muted)}
.eh-ctable[hidden],[data-no-match][hidden]{display:none}
@media(max-width:720px){.eh-search-box{flex-basis:100%;max-width:none}.eh-year{flex:1}.eh-year .eh-select{flex:1}}
@media(prefers-reduced-motion:reduce){.eh-exam{transition:none}}

/* academics: search + cascading Class / Board / Subject in one compact row */
.eh-sbar{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:10px;margin:0}
.eh-sbar .eh-search-box{max-width:none}
.eh-sbar .eh-search-box input,.eh-sbar select{min-height:48px;border-radius:14px}
.eh-fs{min-width:0}
.eh-sbar-foot{display:flex;align-items:center;gap:12px;min-height:34px;margin:6px 2px 10px}
.eh-sbar-foot .eh-link{min-height:34px}
.eh-sbar-foot [hidden]{display:none}
@media(max-width:900px){.eh-sbar{grid-template-columns:repeat(3,minmax(0,1fr))}.eh-sbar .eh-search-box{grid-column:1/-1}}
@media(max-width:560px){.eh-sbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.eh-sbar .eh-fs:last-child{grid-column:1/-1}}

/* compact page header on Exam Hub inner pages, so the list starts near the top */
.eh-page .eh-head{padding:18px 0 14px}
.eh-page .eh-head-inner{align-items:center}
.eh-page .eh-crumbs{margin-bottom:2px;font-size:12.5px}
.eh-page .eh-head h1{font-size:clamp(26px,3vw,34px)}
.eh-page .eh-head p{margin-top:4px;font-size:15px}
.eh-page .eh-section-btn{min-height:44px;padding:8px 16px;font-size:15px;border-radius:13px}
.eh-page .eh-body{padding-top:16px}
@media(max-width:720px){.eh-page .eh-head{padding:12px 0 10px}.eh-page .eh-head h1{font-size:26px}.eh-page .eh-head p{font-size:14px}.eh-page .eh-body{padding-top:12px}}
.eh-gpath{font-weight:700;color:var(--eh-muted,#8a93a8)}
@media(max-width:720px){.eh-row .eh-act-a:has(.eh-none){display:none}}
/* no gap above the toolbar; hide the Academics/Competitive switch when it has only one option */
.eh-page .eh-results{margin-top:0}
.eh-page .eh-sections:has(> .eh-section-btn:only-child){display:none}
@media(max-width:720px){.eh-page .eh-toolbar{gap:8px;padding:10px}.eh-page .eh-toolbar-dl{gap:10px}}

/* selection bar: appears at the bottom only when papers are selected (instead of a permanent toolbar) */
.eh-selbar{position:fixed;left:50%;bottom:18px;z-index:80;display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;width:min(980px,calc(100vw - 150px));padding:10px 12px 10px 18px;border:1px solid #d9d4ff;border-radius:18px;background:rgba(255,255,255,.97);box-shadow:0 18px 50px -12px rgba(30,27,95,.45);transform:translateX(-50%);animation:ehBarIn .2s ease-out;box-sizing:border-box}
.eh-selbar[hidden]{display:none}
.eh-selbar-count{font-weight:850;color:var(--eh-ink,#101a3d);white-space:nowrap}
.eh-selbar .eh-dl-btn{margin-left:auto}
@keyframes ehBarIn{from{transform:translate(-50%,20px);opacity:0}}
body.eh-has-selbar .eh-page{padding-bottom:140px}
.eh-row-head .eh-pick{width:44px;height:44px}
@media(max-width:720px){
  .eh-selbar{left:8px;right:84px;bottom:10px;width:auto;transform:none;gap:8px 10px;padding:10px;animation:none}
  .eh-selbar-count{flex:1 1 auto}
  .eh-selbar .eh-analysis{order:3;flex:1 1 100%;min-height:36px;font-size:14px}
  .eh-selbar .eh-dl-btn{order:4;flex:1 1 100%;margin-left:0}
  .eh-row.eh-row-head{display:grid!important;grid-template-columns:44px minmax(0,1fr);grid-template-areas:none;padding:4px 14px 4px 6px;background:#f7f7fc}
  .eh-row.eh-row-head>span:not(:nth-child(2)){display:none}
}
@media(max-width:980px) and (min-width:721px){
  .eh-row.eh-row-head{display:grid!important;grid-template-columns:48px minmax(0,1fr);grid-template-areas:none}
  .eh-row.eh-row-head>span:not(:nth-child(2)){display:none}
}
@media(prefers-reduced-motion:reduce){.eh-selbar{animation:none}}
@media(max-width:980px){.eh-crow.eh-row-head{display:grid!important;grid-template-columns:48px minmax(0,1fr);grid-template-areas:none;padding:4px 14px 4px 6px}.eh-crow.eh-row-head>span:not(:nth-child(2)){display:none}}
@media(max-width:980px){.eh-row.eh-row-head .eh-pick,.eh-crow.eh-row-head .eh-pick{grid-area:auto;grid-column:1;grid-row:1;align-self:center}.eh-row.eh-row-head>span:nth-child(2),.eh-crow.eh-row-head>span:nth-child(2){grid-column:2;grid-row:1;align-self:center}}
.eh-included{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:13px;font-weight:800;white-space:nowrap}
.eh-res-chips .eh-cat-tag{font-weight:800}
.eh-res-chips .eh-cat-tag.ct-0{background:#ede9fe;color:#5b21b6}.eh-res-chips .eh-cat-tag.ct-1{background:#e0f2fe;color:#075985}
.eh-res-chips .eh-cat-tag.ct-2{background:#fef3c7;color:#92400e}.eh-res-chips .eh-cat-tag.ct-3{background:#dcfce7;color:#166534}
.eh-page .eh-back{margin-bottom:6px}

/* academics: class · board heading (the exam / syllabus) above its subjects */
.eh-exam-h{display:flex;align-items:center;gap:12px;margin:22px 0 4px;padding:12px 16px;border-radius:16px;background:linear-gradient(90deg,#eef0ff,#f8f7ff 60%,transparent);font-family:var(--gmp-display,inherit);font-size:20px;font-weight:700;color:var(--eh-ink,#101a3d)}
.eh-exam-h:first-child{margin-top:4px}
.eh-exam-h b{font-weight:850}
.eh-exam-h small{margin-left:auto;font-family:var(--gmp-body,inherit);font-size:13px;font-weight:700;color:var(--eh-muted,#8a93a8)}
.eh-exam-ico{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:12px;background:#fff;box-shadow:0 4px 12px -6px rgba(65,54,222,.4);font-size:19px}
.eh-exam-h+.eh-group{margin-top:12px}
.eh-group h3{font-size:18px}
@media(max-width:560px){.eh-exam-h{font-size:17px;padding:10px 12px}.eh-exam-ico{width:32px;height:32px;font-size:16px}}

/* class · board shown on each paper row */
.eh-title-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:3px}
.eh-exam-tag{display:inline-flex;align-items:center;padding:2px 9px;border-radius:999px;background:#eef0ff;color:#3730a3;font-size:12px;font-weight:800;white-space:nowrap}
.eh-group:first-child{margin-top:6px}
