/* Ma'alim Companion · marks tables (admin Exams) and term results (families) */
.rs-wrap{overflow-x:auto;background:#fff;border-radius:22px;box-shadow:var(--shadow);margin:0 -4px}
.rs{border-collapse:separate;border-spacing:0;width:100%;font-size:13.5px}
.rs th,.rs td{padding:6px 5px;border-bottom:1px solid var(--line);text-align:center;white-space:nowrap}
.rs thead th{font-size:11.5px;font-weight:800;color:var(--ink2);vertical-align:bottom;padding-top:12px;background:#fff}
.rs thead th span{display:block;max-width:86px;white-space:normal;line-height:1.2;margin:0 auto}
.rs thead th small,.rs td small{display:block;font-size:10.5px;font-weight:700;color:var(--mute)}
.rs tr.g th{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);padding-top:10px;border-bottom:0}
.rs th[scope=row],.rs thead tr:last-child th:first-child,.rs tfoot th{position:sticky;left:0;background:#fff;text-align:left;z-index:1;padding-left:14px;box-shadow:1px 0 0 var(--line)}
.rs th[scope=row] span{display:block;width:128px;white-space:normal;font-size:13px;font-weight:700;line-height:1.25}
.rs-in{width:52px;height:38px;border:2px solid transparent;border-radius:10px;background:var(--field);text-align:center;font:inherit;font-size:15px;font-weight:800;color:var(--ink);outline:none}
.rs-in:focus{border-color:var(--ink);background:#fff}
.rs-in.ed{background:#FFF6D6}
.rs-in.ab{color:#9A2C12}
.rs-in.bad{border-color:#C2410C;background:#FFE6DD}
.rs td.tot b{font-size:15px;font-weight:800}
.rs tfoot th,.rs tfoot td{font-size:12px;font-weight:800;color:var(--mute);border-bottom:0;padding:10px 5px}
@media (min-width:900px){.rs-wrap{margin:0}.rs th[scope=row] span{width:220px}}

/* grade chips (admin term result) */
.fr-g{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:28px;padding:0 7px;border-radius:9px;font-size:13.5px;font-weight:800}
.fr-g.g-a{background:#DDF3E4;color:#0F5A2B}.fr-g.g-b{background:#DCE6FF;color:#0B1E4F}.fr-g.g-c{background:#FFF1C9;color:#5A4A00}
.fr-g.g-d{background:#FCE3DA;color:#8A2A10}.fr-g.g-ab,.fr-g.g-none{background:#ECEEF1;color:#5A606B}

/* the report card parents see: paper, handwriting, ink stamp */
.rc{position:relative;margin:2px 2px 14px;background:#FBF7EC;border-radius:6px;box-shadow:0 1px 0 #E6DFCC,0 18px 34px -18px rgba(60,48,20,.45);
  padding:24px 20px 22px 40px;display:flex;flex-direction:column;gap:16px;color:#2A2416;transform-origin:50% 0;animation:rcUp .7s cubic-bezier(.2,.9,.3,1) both}
.rc::before{content:"";position:absolute;top:0;bottom:0;left:26px;border-left:1.5px solid rgba(214,94,80,.35)}
.rc > *{position:relative}
.rc-defs{position:absolute;width:0;height:0}
.rc-grain{position:absolute !important;inset:0;width:100%;height:100%;border-radius:6px;pointer-events:none}
.rc-head{display:flex;align-items:center;gap:12px}
.rc-head img{width:38px;height:44px;object-fit:contain}
.rc-head span{font-size:10.5px;font-weight:700;letter-spacing:.16em;color:#6B5F45}
.rc-head h2{margin:0;font-family:'Fraunces',Georgia,serif;font-size:26px;font-weight:700;letter-spacing:-.01em;color:#2A2416}
.rc-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}
.rc-fields > div{display:flex;align-items:baseline;gap:8px;border-bottom:1px solid #D8CFB8;padding-bottom:3px;min-width:0}
.rc-fields .full{grid-column:1/-1}.rc-fields .full .rc-hand{white-space:normal}
.rc-fields > div > span:first-child{font-size:11px;font-weight:700;color:#6B5F45;flex:none}
.rc-hand{white-space:nowrap;font-family:'Caveat','Segoe Print',cursive;font-size:22px;font-weight:700;color:#1E3A8A;line-height:1}
.rc-hand > span{display:inline-block;animation:rcWrite .3s ease-out both}
.rc-hand.big{font-size:24px}.rc-hand.xl{font-size:32px}.rc-hand.ab{color:#9A2C12}
.rc-none{color:#B8AE95;font-weight:700}
.rc-table{width:100%;border-collapse:collapse;font-size:13px}
.rc-table caption{text-align:left;font-family:'Fraunces',Georgia,serif;font-size:15px;font-weight:700;padding-bottom:6px}
.rc-table thead tr{border-bottom:1.5px solid #2A2416}
.rc-table thead th{font-size:10.5px;font-weight:700;color:#6B5F45;padding:4px 2px;text-align:center;text-transform:uppercase;letter-spacing:.04em}
.rc-table thead th:first-child{text-align:left;letter-spacing:.08em}
.rc-table tbody tr{border-bottom:1px solid #D8CFB8}
.rc-table tbody th{text-align:left;font-weight:600;padding:7px 4px 7px 0;line-height:1.25}
.rc-table td{text-align:center;width:42px}
.rc-boxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rc-box{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 10px;border:1px solid #D8CFB8;border-radius:4px}
.rc-box.col{flex-direction:column;align-items:stretch;padding:7px 10px 9px}
.rc-box.col > div{display:flex;align-items:baseline;justify-content:space-between}
.rc-box > span:first-child,.rc-box.col > div > span:first-child{font-size:12px;font-weight:700;color:#6B5F45}
.rc-box small,.rc-row small,.rc-part h3 small{font-size:11.5px;font-weight:600;color:#8A7F66}
.rc-part{display:flex;flex-direction:column}
.rc-part h3{display:flex;align-items:baseline;gap:8px;margin:0;border-bottom:1.5px solid #2A2416;padding-bottom:3px}
.rc-part h3 > span:first-child{flex-grow:1;font-family:'Fraunces',Georgia,serif;font-size:15px;font-weight:700}
.rc-row{display:grid;grid-template-columns:minmax(0,1fr) 78px 32px 32px;align-items:center;column-gap:6px;padding:5px 0;border-bottom:1px solid #D8CFB8}
.rc-row .s{font-size:13px;font-weight:600;line-height:1.25}
.rc-row .rc-hand{text-align:right;font-size:21px}
.rc-bar{position:relative;display:block;height:10px;box-sizing:border-box;border:1.2px solid #8A7F66;border-radius:3px}
.rc-bar i{position:absolute;top:1px;bottom:1px;left:1px;border-radius:2px;background:repeating-linear-gradient(-55deg,#1E3A8A 0 1.6px,transparent 1.6px 3.6px);animation:rcShade .9s cubic-bezier(.3,.9,.4,1) .4s both}
.rc-bar.big{height:16px;border:1.6px solid #2A2416;border-radius:4px}
.rc-bar.big i{top:2px;bottom:2px;left:2px;background:repeating-linear-gradient(-55deg,#1E3A8A 0 2px,transparent 2px 4.2px);animation-duration:1.2s}
.rc-bar.big b{position:absolute;top:-4px;bottom:-4px;border-left:1.5px dashed #9A2C12}
.rc-total{display:flex;flex-direction:column;gap:8px;padding:8px 0;border-top:1.5px solid #2A2416;border-bottom:3px double #2A2416}
.rc-total > div{display:flex;align-items:baseline;gap:8px}
.rc-total > div > span:first-child{flex-grow:1;font-family:'Fraunces',Georgia,serif;font-size:16px;font-weight:700}
.rc-total small{font-size:13px;font-weight:700;color:#6B5F45}
.rc-total em{font-style:normal;font-size:11px;font-weight:600;color:#6B5F45}
.rc-remark{margin:0;font-family:'Caveat','Segoe Print',cursive;font-size:21px;font-weight:600;color:#1E3A8A;line-height:1.15}
.rc-foot{min-height:140px;display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.rc-stamp{flex:none;width:124px;height:124px;padding:0;border:0;background:transparent;color:#2F4FB3;mix-blend-mode:multiply;cursor:pointer;
  animation:rcPress .7s cubic-bezier(.3,1.1,.5,1) 1.4s both}
.rc-stamp.again{animation:rcPress2 .7s cubic-bezier(.3,1.1,.5,1) both}
.rc-stamp svg{width:100%;height:100%;display:block}
.rc-stamp text{font-family:'Inter Tight',system-ui,sans-serif}
.rc-sign{flex:none;width:146px;display:flex;flex-direction:column;gap:3px}
.rc-sign .ink{height:56px;display:flex;align-items:flex-end;justify-content:center}
.rc-sign img{max-width:100%;max-height:56px;object-fit:contain;mix-blend-mode:multiply;animation:rcFade .8s ease-out 1.8s both}
.rc-sign > span{border-top:1.5px solid #2A2416;padding-top:4px;font-size:11px;font-weight:700;color:#6B5F45;text-align:center}
.rc-note{margin:-6px 0 0;font-size:11.5px;font-weight:600;color:#8A7F66}
.rc-old summary{cursor:pointer;font-size:14px;font-weight:700;color:var(--blue);padding:8px 4px}
.sheet .rc{margin:4px 0 12px}
@keyframes rcUp{from{opacity:0;transform:translateY(26px) rotate(.6deg)}to{opacity:1;transform:translateY(0) rotate(-.4deg)}}
@keyframes rcWrite{from{opacity:0;transform:translateY(-3px) rotate(-6deg)}to{opacity:1;transform:translateY(0) rotate(-3deg)}}
@keyframes rcShade{from{width:0}}
@keyframes rcFade{from{opacity:0;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}
@keyframes rcPress{0%{opacity:0;transform:rotate(-16deg) scale(1.9)}55%{opacity:1;transform:rotate(-11deg) scale(.94)}75%{transform:rotate(-12deg) scale(1.03)}100%{opacity:.9;transform:rotate(-12deg) scale(1)}}
@keyframes rcPress2{0%{opacity:0;transform:rotate(-16deg) scale(1.9)}55%{opacity:1;transform:rotate(-11deg) scale(.94)}75%{transform:rotate(-12deg) scale(1.03)}100%{opacity:.9;transform:rotate(-12deg) scale(1)}}
@media (prefers-reduced-motion: reduce){.rc,.rc *{animation:none !important}}

/* one part published on its own */
.rc-slip{margin-bottom:12px}
.rc-head.mini{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.rc-head.mini>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.rc-mtot{display:flex;align-items:baseline;gap:4px;flex:none}
.rc-sp{flex:1}
