/* Math-equivalent NAFS achievement structure, adapted for reading and science */
#portfolioView .nafs-ach-statgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.nafs-ach-stat{padding:15px;border:1px solid #e0e6f0;border-radius:13px;background:#fff;min-width:0;display:flex;flex-direction:column;gap:4px}
.nafs-ach-stat strong{font-size:23px;color:#4b418c;line-height:1.5}
.nafs-ach-stat small{font-size:12px;font-weight:700;color:#637089}
.nafs-ach-stat span{font-size:11px;color:#6d7891}
.nafs-ach-guide{background:#f7f8fd;border:1px solid #e4e8f3;border-radius:12px;padding:14px 17px;line-height:1.85;font-size:13px;color:#4a5570;margin-top:12px}
.nafs-ach-section{border:1px solid #dfe5f0;border-radius:14px;background:#fff;padding:18px;margin-top:14px;min-width:0}
.nafs-ach-section>h2{font-size:18px;color:#3e377a;margin:0 0 12px}
.nafs-ach-small-head{font-size:14px;color:#4a4684;margin:14px 0 10px}
.nafs-ach-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}
.nafs-ach-domain{background:#fff;border:1px solid #e1e7ef;border-right:4px solid var(--ach,#4c8baf);border-radius:12px;padding:14px;min-width:0}
.nafs-ach-domain.main{background:#f8fbfd}
.nafs-ach-heading{display:flex;align-items:start;justify-content:space-between;gap:11px;margin-bottom:9px}
.nafs-ach-heading b{color:#373174;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.nafs-ach-heading span{font-size:11px;color:#647188;white-space:nowrap}
.nafs-ach-track{width:100%!important;position:relative!important;display:block!important;min-height:12px!important;height:12px!important;overflow:hidden!important;border-radius:999px!important;background:#e7edf5!important;box-sizing:border-box!important;direction:rtl!important;margin:8px 0!important;border:1px solid #dce5ed!important}
.nafs-ach-fill{display:block!important;position:absolute!important;inset-block:0!important;inset-inline-start:0!important;height:100%!important;max-width:100%!important;border-radius:999px!important;background:var(--ach,#269b94)!important;transition:width .15s ease!important}
.nafs-ach-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:11px}
.nafs-ach-trio>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.nafs-ach-trio small{color:#6c7891;font-size:10px}
.nafs-ach-trio strong{font-size:14px;color:#314261}
.nafs-ach-fold{margin-top:13px}
.nafs-ach-fold>summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:14px;padding:12px 14px;border:1px solid #e2e7f0;border-radius:10px;background:#f7f8fc;color:#494180;list-style:none}
.nafs-ach-fold>summary::-webkit-details-marker{display:none}
.nafs-ach-fold>summary:after{content:'⌄';font-size:17px}
.nafs-ach-fold[open]>summary:after{content:'⌃'}
.nafs-ach-scroll{overflow-x:auto;max-width:100%;margin:13px 0}
.nafs-ach-table{width:100%;min-width:630px;border-collapse:collapse;font-size:12px}
.nafs-ach-table th,.nafs-ach-table td{border-bottom:1px solid #e7eaf0;padding:10px;vertical-align:middle;text-align:right}
.nafs-ach-table th{background:#f1f3f8;color:#384670;white-space:nowrap}
.nafs-ach-criteria{display:grid;gap:10px;margin:13px 0}
.nafs-ach-criterion{border:1px solid #e4eaf2;border-radius:12px;padding:12px 14px;display:grid;grid-template-columns:minmax(140px,1.4fr) minmax(180px,1.3fr) auto;align-items:center;gap:15px;min-width:0}
.nafs-ach-crit-title{display:flex;flex-direction:column;min-width:0;gap:4px}
.nafs-ach-crit-title small{font-size:11px;color:#6e7a92}
.nafs-ach-crit-title strong{font-size:13px;color:#39436e;line-height:1.8;overflow-wrap:anywhere}
.nafs-ach-crit-progress{min-width:0}
.nafs-ach-crit-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:11px;color:#556581;line-height:1.7}
.nafs-ach-report{white-space:normal;min-height:36px;text-align:center}
.nafs-ach-select-label{display:block;margin:14px 0 6px;font-weight:700;font-size:12px}
.nafs-ach-select{width:100%;border:1px solid #d8e1ed;border-radius:10px;padding:10px;min-height:45px;background:#fff;color:#314267}
.nafs-ach-review{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 13px;border:1px solid #e3e8f0;border-radius:10px;margin-top:9px}
.nafs-ach-review>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.nafs-ach-review small{color:#6b7990}
.nafs-ach-review strong{font-size:13px;color:#433980;line-height:1.7}
.nafs-ach-review span{font-size:11px;color:#67758a}
.nafs-ach-empty{padding:13px;background:#f1f8f6;border-radius:10px;font-size:12px;line-height:1.7;color:#345948}
.nafs-ach-report-paper h3{font-size:15px!important;margin:17px 0 10px!important;color:#3c4380}
.nafs-ach-report-title{padding:9px 0 7px;border-bottom:1px solid #e6eaf0}
.nafs-ach-report-meta{padding:10px 12px;margin:11px 0;border:1px solid #dce7ed;background:#f4f8fa;border-radius:9px;font-size:12px;line-height:1.85}
.nafs-ach-q{border:1px solid #dfe6ef;border-radius:9px;margin:12px 0;padding:13px;break-inside:avoid-page;page-break-inside:avoid}
.nafs-ach-q-title{display:flex;justify-content:space-between;font-size:13px;color:#404179}
.nafs-ach-q-text{white-space:pre-wrap;line-height:2;font-size:13px}
.nafs-ach-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.nafs-ach-opt{display:flex;gap:8px;align-items:flex-start;min-width:0;border:1px solid #dce3ed;border-radius:8px;padding:9px;font-size:12px;line-height:1.8;white-space:pre-wrap}
.nafs-ach-opt>b{display:grid;place-items:center;flex:none;border-radius:7px;background:#edf0f7;color:#4f487d;min-width:23px;min-height:23px}
.nafs-ach-opt.correct{border-color:#97c8b0;background:#f3fbf6}
.nafs-ach-opt.chosen{outline:1px dashed #668fb0}
.nafs-ach-evidence,.nafs-ach-method{background:#f5f8fa;border-radius:8px;padding:9px 12px;margin:9px 0 0;font-size:12px;line-height:1.9}
.nafs-ach-evidence{color:#1b6c52;background:#edf8f2}
.nafs-ach-q-stat{color:#68758c;font-size:11px;margin:9px 0 0}
.nafs-ach-passage{white-space:pre-wrap;line-height:2;font-size:12px;border:1px solid #dee5f0;border-radius:8px;padding:12px;margin:8px 0}
.nafs-ach-image{display:block;max-width:100%;max-height:230px;object-fit:contain;margin:8px auto}
#criterionListing .nafs-ach-track{max-width:500px!important;margin:7px 0 3px!important}
#criterionListing .rowlist .nafs-ach-criterion-main{display:flex;flex-direction:column;min-width:0;flex:1}
#criterionListing .rowlist{align-items:center}
@media(max-width:900px){.nafs-ach-criterion{grid-template-columns:1fr;gap:7px}.nafs-ach-criterion .btn{justify-self:start}.nafs-ach-crit-progress{width:100%}}
@media(max-width:650px){#portfolioView .nafs-ach-statgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.nafs-ach-cards{grid-template-columns:1fr}.nafs-ach-heading{flex-direction:column;gap:4px}.nafs-ach-section{padding:12px}.nafs-ach-trio strong{font-size:13px}.nafs-ach-review{flex-direction:column;align-items:stretch}.nafs-ach-opts{grid-template-columns:1fr}.nafs-ach-stat strong{font-size:19px}#portfolioView .between{flex-wrap:wrap}}
@media print{.nafs-ach-report,.nafs-ach-section>button,.nafs-ach-review button{display:none!important}.nafs-ach-track,.nafs-ach-fill{print-color-adjust:exact;-webkit-print-color-adjust:exact}.nafs-ach-q{page-break-inside:avoid}}
/* The math-style portfolio PDF preview must not make the mobile page wider than the screen. */
@media screen{
 #reportView:not([hidden]){display:flex!important;flex-direction:column;align-items:stretch;gap:10px;min-width:0;width:100%;max-width:100%;box-sizing:border-box}
 #reportView>.between,#reportPreview{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 #reportView>.between{flex-wrap:wrap}
 #reportPreview{overflow:hidden;overflow-wrap:anywhere}
 #reportPreview>.nafs-print-sheet{max-width:100%;width:100%;box-sizing:border-box;min-width:0}
 #reportPreview .nafs-ach-section{max-width:100%;min-width:0;box-sizing:border-box}
 #reportPreview .nafs-ach-scroll{max-width:100%;overflow-x:auto;min-width:0}
 #reportPreview .nafs-ach-statgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
}
@media screen and (max-width:650px){#reportPreview .nafs-ach-statgrid{grid-template-columns:repeat(2,minmax(0,1fr))}#reportPreview .nafs-ach-cards{grid-template-columns:1fr}#reportPreview .nafs-ach-trio strong{font-size:12px}#reportView .reportHeader{flex-direction:column;align-items:flex-start}}
