/* Ma'alim Companion · Exams (admin): term board, part detail, term result, term plan */
.ex-h{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:2px 2px 14px}
.ex-h h1{margin:0;font-size:26px;font-weight:800;letter-spacing:-.02em}
.ex-h p{margin:4px 0 0;color:var(--mute);font-size:13.5px;font-weight:500;line-height:1.5;max-width:560px}
.ex-acts{display:flex;gap:6px}
.ex-acts .act{height:38px;padding:0 14px;border-radius:999px;font-size:13px;font-weight:700}
.ex-back{display:inline-block;margin-bottom:10px}

/* class + term pickers */
.ex-pick{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.ex-seg{display:flex;gap:3px;padding:3px;background:#E1E4E8;border-radius:14px;overflow-x:auto;scrollbar-width:none;align-self:flex-start;max-width:100%}
.ex-seg::-webkit-scrollbar{display:none}
.ex-seg button{flex:none;height:38px;padding:0 13px;border-radius:11px;font-size:13.5px;font-weight:700;color:var(--ink2);white-space:nowrap}
.ex-seg button[aria-selected=true]{background:var(--ink);color:#fff}
.ex-seg button.none{color:#9AA0A9}
.ex-seg.sm{background:var(--field)}
.ex-seg.sm button{height:36px}
.ex-seg.sm button[aria-selected=true]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(14,17,22,.18)}

/* the row of parts */
.ex-strip{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.ex-part{display:grid;grid-template-columns:62px minmax(0,1fr) auto;grid-template-areas:"tag name st" "tag meta st";align-items:center;column-gap:12px;row-gap:1px;padding:12px 14px;border-radius:18px;background:#fff;box-shadow:var(--shadow);text-align:left;border:2px solid transparent}
.ex-part .tag{grid-area:tag}
.ex-part b{grid-area:name;font-size:16px;font-weight:800;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ex-part small{grid-area:meta;font-size:12px;font-weight:600;color:var(--mute)}
.ex-part .st{grid-area:st;font-size:12px;font-weight:800;display:flex;align-items:center;gap:6px;white-space:nowrap}
.ex-part.sel{border-color:var(--ink)}
.ex-part.total{background:var(--ink);color:#fff}
.ex-part.total small{color:#C9CBD2}
.ex-part.total.sel{border-color:#7C8BC9}
.d{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none;background:#B7BBC2}
.d.ok{background:#2E9E6B}.d.wait{background:#D9A400}.d.blue{background:var(--blue)}.d.gray{background:#B7BBC2}
.tag{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:3px 7px;border-radius:999px;text-align:center;white-space:nowrap;align-self:center;justify-self:start}
.tag.tw{background:#DCE6FF;color:#0B1E4F}.tag.to{background:#E6DDFF;color:#2E1A6B}.tag.ts{background:#F6EFC0;color:#5A4A00}.tag.tt{background:#2B303A;color:#fff}

/* part detail */
.ex-detail{display:flex;flex-direction:column;gap:12px}
.ex-dh{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ex-dh .kick{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--mute)}
.ex-dh h2{margin:3px 0 0;font-size:22px;font-weight:800;letter-spacing:-.01em}
.ex-dh h2 span{font-size:14px;font-weight:700;color:var(--mute);letter-spacing:0}
.ex-dacts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
label.ex-share:not(.hz *){flex-direction:row;align-items:center;gap:10px;font-size:13.5px;font-weight:700;color:var(--ink2);min-height:42px;padding:0 14px;border-radius:14px;background:var(--field);cursor:pointer}
label.ex-share.on:not(.hz *){background:#E6F5EC;color:#0F5A2B}
.ex-share input{width:18px;height:18px;accent-color:#0F5A2B;margin:0}
.ex-hint{margin:0;font-size:12.5px;font-weight:600;color:var(--mute);line-height:1.45}
.ex-warn{margin:0;font-size:13px;font-weight:700;color:#7A4B00;background:#FFF3D1;border-radius:12px;padding:8px 12px}
.ex-empty{margin:0;font-size:13.5px;font-weight:600;color:var(--mute);padding:6px 0}

/* syllabus: one card per subject */
.ex-subs{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.ex-sub{border:1.5px solid var(--line);border-radius:18px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;transition:opacity .2s}
.ex-sub.dim{opacity:.5}
.ex-sub header{display:flex;align-items:center;gap:8px}
.ex-sub h3{margin:0;flex:1;min-width:0;font-size:15.5px;font-weight:800}
.ex-sub header > span{font-size:12.5px;font-weight:700;color:var(--mute);white-space:nowrap}
.ex-edit{height:32px;padding:0 14px;border-radius:999px;background:var(--field);font-size:12.5px;font-weight:700;color:var(--ink2)}
.ex-sub ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px}
.ex-sub li{display:flex;flex-direction:column;gap:5px;padding:3px 0 3px 10px;border-left:3px solid #DCE6FF}
.ex-sub li .t{font-size:14px;font-weight:600}
.ex-sub li em{font-style:normal;font-size:12.5px;font-weight:700;color:var(--mute)}
.ex-rec{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;min-height:30px;padding:3px 12px 3px 3px;border-radius:999px;background:#EEF2FF;font-size:12px;font-weight:700;color:#0B1E4F;max-width:100%}
.ex-rec i,.ex-rec .pl{font-style:normal;width:24px;height:24px;border-radius:50%;background:var(--ink);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:9px;flex:none}
.ex-rec .x{width:24px;height:24px;border-radius:50%;background:#fff;color:#9A2C12;font-weight:800;margin-right:-8px;flex:none}
.ex-rec .x.sure{width:auto;padding:0 8px;border-radius:999px;background:#C2410C;color:#fff;font-size:11.5px}
.ex-addsub{height:48px;border-radius:16px;border:1.5px dashed #C9CDD3;font-size:14px;font-weight:700;color:var(--blue);background:transparent}

/* editing one subject */
.ex-sub.editing{border-color:var(--ink);box-shadow:0 10px 26px -14px rgba(14,17,22,.45);gap:10px}
.ex-sub .eh{display:grid;grid-template-columns:minmax(0,1fr) 84px;grid-template-areas:"s m" "d d";gap:8px;align-items:end}
.ex-sub .eh label:first-child{grid-area:s}.ex-sub .eh .mk{grid-area:m}
.ex-sub .eh .field{height:44px;font-size:16px;font-weight:800;padding:0 12px}
.ex-sub .eh .mk .field{text-align:center;padding:0 6px;-moz-appearance:textfield}
.ex-sub .eh .mk .field::-webkit-outer-spin-button,.ex-sub .eh .mk .field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.btn.ex-done:not(.hz *){grid-area:d;height:44px;font-size:14px}
.ex-lines{display:flex;flex-direction:column}
.ex-line{display:flex;align-items:flex-start;gap:6px;padding:8px 0;border-top:1px solid var(--line)}
.ex-line .grip{color:#B7BBC2;font-size:13px;letter-spacing:-2px;padding-top:11px;width:12px;flex:none}
.ex-line .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.ex-line .body > .field{height:40px;font-size:15px;font-weight:700;padding:0 10px;border-radius:12px}
.ex-line .opt{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
.ex-line .opt .field{height:36px;font-size:13px;font-weight:600;padding:0 10px;border-radius:12px}
.ex-line .recs{display:flex;flex-wrap:wrap;gap:6px}
.ex-more{position:relative;flex:none}
.ex-more .dots{width:40px;height:40px;border-radius:12px;background:var(--field);font-size:18px;font-weight:800;color:var(--ink2);line-height:1}
.ex-more .dots[aria-expanded=true]{background:var(--ink);color:#fff}
.ex-menu{position:absolute;right:0;top:44px;z-index:6;min-width:220px;background:#fff;border-radius:16px;box-shadow:0 18px 40px -14px rgba(14,17,22,.45),0 0 0 1px var(--line);padding:6px;display:flex;flex-direction:column}
.ex-menu .mi,label.mi:not(.hz *){position:relative;display:flex;flex-direction:row;align-items:center;height:42px;padding:0 12px;border-radius:10px;font-size:14px;font-weight:700;color:var(--ink);text-align:left;cursor:pointer;gap:0}
.ex-menu .mi:hover{background:var(--field)}
.ex-menu .mi.bad{color:#9A2C12}
.ex-menu .mi input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.ex-newline{display:flex;align-items:center;gap:8px;padding-top:8px;border-top:1px solid var(--line)}
.ex-newline span{width:12px;color:var(--blue);font-weight:800;text-align:center}
.ex-newline .field{height:42px;font-size:14.5px;font-weight:600;padding:0 10px;border-radius:12px;background:#F7F8FA;border:1.5px dashed #C9CDD3}
.ex-newline .field:focus{border-style:solid}
.ex-rm{align-self:flex-start;height:36px;padding:0 4px;font-size:13px;font-weight:700;color:#9A2C12}
.ex-rm[data-sure="1"]{padding:0 12px;border-radius:999px;background:#C2410C;color:#fff}

/* term result */
.ex-pub:not(.hz *){width:auto;height:44px;padding:0 20px;font-size:14px}
.ex-check{border-radius:16px;background:#FFF6DE;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.ex-check b{font-size:14px;font-weight:800;color:#5A4A00}
.ex-check div{display:flex;flex-wrap:wrap;gap:6px}
.ex-check span{font-size:12.5px;font-weight:700;padding:5px 10px;border-radius:999px;background:#fff;color:var(--ink2)}
.ex-check span.ok{background:#DDF3E4;color:#0F5A2B}
.ex-check.ready{background:#E6F5EC}.ex-check.ready b{color:#0F5A2B}
.ex-result .rs td sup{font-size:10px;color:var(--mute)}
.ex-result .rs td .wait{font-size:11.5px;font-weight:700;color:#9AA0A9}
.ex-result .rs-wrap{box-shadow:none;border:1.5px solid var(--line);margin:0}
.ex-detail .rs-wrap{box-shadow:none;border:1.5px solid var(--line);margin:0}

/* term plan */
.ex-plan{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:12px}
.ex-grp{display:flex;flex-direction:column;gap:10px;padding:18px!important}
.ex-grp header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.ex-grp h2{margin:0;font-size:19px;font-weight:800}
.chip.pur:not(.hz *){background:#E6DDFF;color:#2E1A6B}
.chip.gray:not(.hz *){background:var(--field);color:var(--mute)}
.ex-grp ol{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.ex-grp li{display:grid;grid-template-columns:62px minmax(0,1fr);grid-template-areas:"t n" "t o";align-items:center;column-gap:8px;padding:8px 10px;border-radius:14px;background:#F6F7F9}
.ex-grp li .tag{grid-area:t}
.ex-grp .pn{grid-area:n;min-width:0;text-align:left;font-size:14px;font-weight:700;line-height:1.3;color:var(--ink);text-decoration:underline;text-decoration-color:#C9CDD3;text-underline-offset:3px;overflow-wrap:anywhere}
.ex-grp .o{grid-area:o;font-size:12px;font-weight:700;color:var(--mute)}
.ex-addpart{height:40px;border-radius:12px;border:1.5px dashed #C9CDD3;font-size:13.5px;font-weight:700;color:var(--ink2)}
.ex-grp .tt{font-size:12.5px;font-weight:700;color:var(--ink2);border-top:1px solid var(--line);padding-top:10px}
.ex-kinds{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.ex-kinds div{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.ex-kinds p{margin:0;font-size:13.5px;font-weight:500;color:var(--ink2);line-height:1.5}
.btn.danger:not(.hz *){color:#9A2C12;border-color:#E5B4A6}
.hint.left{text-align:left}

@media (min-width:640px){
  .ex-pick{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between}
  .ex-seg button{padding:0 11px}
  .ex-subs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ex-sub.editing{grid-column:1/-1}
  .ex-sub .eh{grid-template-columns:minmax(0,1fr) 96px auto;grid-template-areas:"s m d"}
  .btn.ex-done:not(.hz *){width:auto;padding:0 22px}
  .ex-line .opt{grid-template-columns:200px minmax(0,1fr)}
  .ex-plan{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ex-kinds{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:1100px){
  .ex-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
  .ex-part{grid-template-columns:minmax(0,1fr);grid-template-areas:"tag" "name" "meta" "st";row-gap:4px;padding:14px;align-content:start}
  .ex-part .st{margin-top:6px}
}
@media (min-width:1400px){.ex-plan{grid-template-columns:repeat(4,minmax(0,1fr))}}
.ps-score[hidden]{display:none!important}
.ex-who{font:inherit;font-weight:700;color:var(--ink);text-align:left;text-decoration:underline;text-decoration-color:#C9CDD3;text-underline-offset:3px;padding:0;background:none;border:0;cursor:pointer}
.ex-result .rs td .fr-g{height:22px;min-width:28px;font-size:12px;border-radius:7px;margin-left:4px}
/* remarks on the term result */
.ex-rem{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--line)}
.ex-remh{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ex-remh h3{margin:0;font-size:17px;font-weight:800}
.ex-remh p{margin:2px 0 0;font-size:12.5px;font-weight:600;color:var(--mute)}
.ex-remh .act{height:40px;padding:0 14px;border-radius:999px;font-size:13px;font-weight:700}
.ex-phr{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.ex-phr::-webkit-scrollbar{display:none}
.ex-phr button{flex:none;height:36px;padding:0 12px;border-radius:999px;background:#EEF2FF;color:#0B1E4F;font-size:12.5px;font-weight:700;white-space:nowrap}
.ex-rlist{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
label.ex-rrow:not(.hz *){position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;font-size:13px;font-weight:700;color:var(--ink2)}
.ex-rrow textarea{min-height:56px;resize:vertical;font-size:14px;line-height:1.4;padding:8px 10px;font-weight:500}
.ex-rrow i{position:absolute;right:8px;top:0;font-style:normal;font-size:11.5px;font-weight:700;color:#0F5A2B;opacity:0;transition:opacity .2s}
.ex-rrow i.ok{opacity:1}.ex-rrow i.ok::after{content:"Saved"}
@media (min-width:900px){.ex-rlist{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ex-rrow textarea{font-family:inherit}

.ex-share.off{opacity:.55}
