/* School Results – lookup form and marksheet */
.sr-wrap{display:grid;gap:20px}
.sr-form{display:grid;grid-template-columns:2fr 1fr auto;gap:12px;align-items:end;background:#fff;border-radius:14px;padding:20px;box-shadow:0 2px 10px rgba(60,40,10,.08);border-top:4px solid #0B6B34}
.sr-form label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:15px}
.sr-form select,.sr-form input{font:inherit;font-size:16px;padding:10px 12px;border:1px solid #D9C4A0;border-radius:8px;background:#FBF6EE;min-height:46px;box-sizing:border-box;width:100%}
.sr-form button,.sr-actions button{font:inherit;font-weight:700;font-size:16px;background:#0B6B34;color:#fff;border:0;border-radius:8px;padding:12px 22px;min-height:46px;cursor:pointer}
.sr-form button:hover,.sr-actions button:hover{background:#0B5E2E}
.sr-msg{margin:0;padding:12px 16px;border-radius:8px;background:#F3E3C7}
.sr-error{background:#FBE4E5;color:#8E1419;border-left:4px solid #C81D24}

/* ---------- Official marksheet ---------- */
.sr-sheet{background:#fff;color:#111;max-width:820px;width:100%;margin:0 auto;box-sizing:border-box;padding:22px 26px 18px;border:1px solid #CFC3AE;box-shadow:0 4px 18px rgba(60,40,10,.10);position:relative;font-size:15px}
.sr-sheet::before{content:"";position:absolute;inset:7px;border:2px solid #0B6B34;pointer-events:none}
.sr-sheet p{margin:0}
.sr-lh{display:grid;grid-template-columns:80px 1fr 80px;align-items:center;gap:14px;padding:4px 6px 12px;border-bottom:3px double #0B6B34}
.sr-lh-logo{width:80px;height:80px;object-fit:contain}
.sr-lh-text{text-align:center}
.sr-lh-name{font-family:var(--wp--preset--font-family--heading);font-size:28px;line-height:1.25;color:#0B6B34}
.sr-lh-sub{font-size:13.5px;color:#333;line-height:1.5}
.sr-title{display:table;margin:14px auto 2px;padding:4px 26px;border:1.5px solid #0B6B34;border-radius:4px;font-family:var(--wp--preset--font-family--heading);font-size:20px;color:#0B6B34;letter-spacing:.5px;line-height:1.4}
.sr-subtitle{text-align:center;font-size:14.5px;color:#333;margin:2px 0 12px!important}
.sr-top{display:grid;grid-template-columns:1fr 168px;gap:12px;align-items:start;margin-bottom:12px}
.sr-sheet table{border-collapse:collapse;width:100%}
.sr-info th,.sr-info td,.sr-scale th,.sr-scale td,.sr-marks th,.sr-marks td{border:1px solid #9A8F7D;padding:5px 8px;line-height:1.35;vertical-align:middle}
.sr-info th{background:#F4EFE6;font-weight:600;text-align:left;white-space:nowrap;width:1%;font-size:14px}
.sr-info td{font-size:14.5px}
.sr-of{font-size:12.5px;color:#555}
.sr-pass{color:#0B6B34}.sr-fail{color:#B3141B}
.sr-scale{font-size:12.5px;text-align:center}
.sr-scale thead th{background:#0B6B34;color:#fff;font-weight:600}
.sr-scale td{padding:2.5px 6px}
.sr-marks{font-size:14.5px}
.sr-marks thead th{background:#0B6B34;color:#fff;font-weight:600;font-size:14px}
.sr-marks tbody tr:nth-child(even) td{background:#FBF8F2}
.sr-marks td.c,.sr-marks th.c{text-align:center}
.sr-marks th:nth-child(1){width:44px}
.sr-marks tr.is-fail td{color:#B3141B;font-weight:600}
.sr-marks tfoot th{background:#E8F3EC;color:#0B5E2E;font-weight:700}
.sr-marks tfoot th:nth-child(2){text-align:left}
.sr-note{font-size:12px;color:#555;margin-top:10px!important}
.sr-online{margin-top:12px!important;padding-top:6px;border-top:1px dashed #AAA;font-size:12px;color:#444;text-align:center}
.sr-actions{margin-top:14px!important;text-align:right}
.sr-marks-wrap{overflow-x:auto}

@media screen and (max-width:760px){
  .sr-form{grid-template-columns:1fr 1fr}
  .sr-form label:first-child,.sr-form button{grid-column:1/-1}
  .sr-sheet{padding:16px 14px 14px;font-size:14px}
  .sr-sheet::before{inset:5px}
  .sr-lh{grid-template-columns:52px 1fr;gap:10px}
  .sr-lh-logo{width:52px;height:52px}
  .sr-lh-space{display:none}
  .sr-lh-name{font-size:21px}
  .sr-lh-sub{font-size:12px}
  .sr-top{grid-template-columns:1fr}
  .sr-scale{display:none}
  .sr-info th{white-space:normal;font-size:13px}
  .sr-info td{font-size:13.5px}
  .sr-marks{font-size:13px}
  .sr-marks th,.sr-marks td{padding:5px 4px}
  .sr-marks thead th{font-size:12px}
  .sr-actions{text-align:center}
  .sr-actions button{width:100%}
}
@media screen and (max-width:420px){.sr-form{grid-template-columns:1fr}}

@page{size:A4 portrait;margin:10mm}
@media print{
  html,body{background:#fff!important;height:auto!important;margin:0!important;padding:0!important}
  #wpadminbar,header.wp-block-template-part,footer.wp-block-template-part,.lhs-ticker,
  .wp-block-post-title,.lhs-page-title,.wp-block-post-content > *:not(.sr-wrap),
  .sr-wrap > *:not(.sr-sheet),.sr-actions,.sr-no-print{display:none!important}
  .wp-site-blocks,.lhs-page,.wp-block-post-content,.sr-wrap{padding:0!important;margin:0!important;max-width:none!important;display:block!important}
  html{margin-top:0!important}
  .sr-sheet{max-width:none;width:100%;margin:0!important;box-shadow:none;border:1px solid #9A8F7D;padding:7mm 8mm 6mm;font-size:10.5pt;break-inside:avoid;page-break-inside:avoid;page-break-after:avoid}
  .sr-sheet::before{inset:2mm}
  .sr-lh{grid-template-columns:22mm 1fr 22mm}
  .sr-lh-logo{width:22mm;height:22mm}
  .sr-lh-name{font-size:20pt}
  .sr-lh-sub{font-size:9.5pt}
  .sr-title{font-size:14pt;margin-top:4mm}
  .sr-subtitle{font-size:10pt}
  .sr-top{grid-template-columns:1fr 40mm}
  .sr-scale{display:table!important;font-size:8.5pt}
  .sr-info th{font-size:9.5pt}.sr-info td{font-size:10pt}
  .sr-info th,.sr-info td,.sr-marks th,.sr-marks td{padding:1.4mm 2mm}
  .sr-scale td{padding:.6mm 1mm}
  .sr-marks{font-size:10pt}
  .sr-marks thead th{font-size:9.5pt}
  .sr-note{font-size:8pt}
  .sr-online{font-size:8.5pt}
  .sr-marks-wrap{overflow:visible}
  html[lang=en] .sr-marks th,html[lang=en] .sr-marks td{padding:1.05mm 2mm}
  html[lang=en] .sr-info th,html[lang=en] .sr-info td{padding:1.2mm 2mm}
  .sr-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
