/* Student completion and read-only records. No changes to submission/answer data. */
html:has(.completed-mode),body:has(.completed-mode),html:has(.record-mode),body:has(.record-mode){height:auto;overflow:auto}
body:has(.completed-mode),body:has(.record-mode){background:#fcfdfa!important}
main.completed-mode,main.record-mode{display:flex;flex-direction:column;width:100%;height:100vh;height:100dvh;max-height:none;min-height:0;margin:0;padding:0;border:0;background:radial-gradient(ellipse at 50% 60%,#f0f7f1 0,transparent 70%),#fcfdfa!important;overflow:visible;box-shadow:none}
.completed-mode>h1,.record-mode>h1,.completed-mode>.notice:empty,.record-mode>.notice:empty{display:none}
.completed-mode>.notice:not(:empty),.record-mode>.notice:not(:empty){position:fixed;z-index:5;right:24px;bottom:20px;width:min(420px,calc(100% - 48px));margin:0;padding:12px 16px;border:1px solid #d5e2dc;border-radius:10px;background:#fff;color:#23564a;box-shadow:0 8px 24px #20453712}
main.completed-mode #completed,main.record-mode #record{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex:1;min-height:0;width:100%;height:100%;padding:0;color:#092c3c;font-family:var(--entry-font-family);font-weight:400;line-height:1.5;animation:none}
main.completed-mode #completed{overflow:auto}
main.record-mode #record{overflow:hidden}
:is(#completed,#record) .student-end-header{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:none;min-height:clamp(72px,10dvh,104px);padding:12px clamp(20px,4vw,64px);border-bottom:1px solid #e1e9e2;background:#ffffffb8}
:is(#completed,#record) .student-end-brand{--brand-unit:clamp(.68px,.065104167vw,1px);flex:none;width:calc(var(--brand-unit) * 340);height:calc(var(--brand-unit) * 58);background-image:url('/assets/student-profile-reference.png');background-size:calc(var(--brand-unit) * 1536) calc(var(--brand-unit) * 1024);background-position:calc(var(--brand-unit) * -76) calc(var(--brand-unit) * -48);background-repeat:no-repeat}
:is(#completed,#record) .student-end-brand>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
:is(#completed,#record) .student-end-nav{display:flex;align-items:center;gap:24px;flex:none;font-size:18px;font-weight:600;white-space:nowrap}
:is(#completed,#record) .student-end-nav>span:first-child{padding-right:24px;border-right:1px solid #bacac7;line-height:1}
:is(#completed,#record) .student-end-tag{padding:5px 13px;border-radius:99px;background:#eaf4ee;color:#007e70;font-size:15px}
:is(#completed,#record) button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-width:174px;min-height:52px;margin:0;padding:12px 24px;border:1px solid #078175;border-radius:9px;font-family:inherit;font-size:18px;font-weight:600;line-height:1.4;letter-spacing:.02em;box-shadow:none;transform:none;transition:background-color .15s,color .15s}
:is(#completed,#record) button svg{width:22px;height:22px;flex:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:is(#completed,#record) .student-end-primary{background:linear-gradient(115deg,#078d80,#087065);color:#fff}
:is(#completed,#record) .student-end-primary:hover{background:#076b60}
:is(#completed,#record) .student-end-secondary{background:#fff;color:#007c70}
:is(#completed,#record) .student-end-secondary:hover{background:#edf6f0}
:is(#completed,#record) button:focus-visible{outline:2px solid #008277;outline-offset:4px}
/* Scale the full result composition together, using the login page's visual hierarchy. */
#completed{--completion-unit:min(1px,.1dvh,.08vw)}
#completed .completed-body{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;padding:calc(var(--completion-unit) * 24) 0}
#completed .completed-card{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--student-flow-content-width);min-height:calc(var(--completion-unit) * 820);padding:calc(var(--completion-unit) * 44) calc(var(--completion-unit) * 64);border:1px solid #ccddd5;border-radius:18px;background:#ffffffed;box-shadow:0 14px 44px #194b3509;text-align:center}
#completed .completed-check{display:grid;place-items:center;flex:none;width:calc(var(--completion-unit) * 112);height:calc(var(--completion-unit) * 112);margin:0 auto calc(var(--completion-unit) * 22);border:1px solid #d0e8dc;border-radius:50%;background:#e7f4ec;color:#008372}
#completed .completed-check svg{width:54%;height:54%;stroke:currentColor;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round}
#completed .completed-topic{margin:0 0 calc(var(--completion-unit) * 12);color:#008071;font-size:calc(var(--completion-unit) * 28);font-weight:600;overflow-wrap:anywhere}
#completed h2{margin:0 0 calc(var(--completion-unit) * 12);color:#092c3c;font-family:inherit;font-size:calc(var(--completion-unit) * 58);font-weight:600;line-height:1.3;letter-spacing:.01em}
#completed .completed-description{margin:0;color:#72828c;font-size:calc(var(--completion-unit) * 26);line-height:1.6}
#completed .completed-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(var(--completion-unit) * 24);width:100%;margin:calc(var(--completion-unit) * 36) 0 0}
#completed .completed-overview>div{min-width:0;min-height:calc(var(--completion-unit) * 154);padding:calc(var(--completion-unit) * 24) calc(var(--completion-unit) * 18);border:1px solid #e1ece5;border-radius:12px;background:#edf5f0}
#completed .completed-overview dt{margin-bottom:calc(var(--completion-unit) * 12);color:#708279;font-size:calc(var(--completion-unit) * 22);font-weight:600}
#completed .completed-overview dd{display:flex;align-items:baseline;justify-content:center;gap:calc(var(--completion-unit) * 10);margin:0;color:#173e43;font-size:calc(var(--completion-unit) * 22)}
#completed .completed-overview dd strong{color:#007d70;font-size:calc(var(--completion-unit) * 46);font-weight:600;line-height:1.2}
#completed .completed-overview .completed-status{align-items:center;color:#007d70;font-size:calc(var(--completion-unit) * 30);font-weight:600}
#completed .completed-status svg{width:calc(var(--completion-unit) * 28);height:calc(var(--completion-unit) * 28);stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#completed .completed-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:calc(var(--completion-unit) * 24);width:100%;margin-top:calc(var(--completion-unit) * 36)}
#completed .completed-actions button{min-width:calc(var(--completion-unit) * 280);min-height:calc(var(--completion-unit) * 72);padding:calc(var(--completion-unit) * 18) calc(var(--completion-unit) * 32);font-size:calc(var(--completion-unit) * 26)}
#completed .completed-actions button svg{width:calc(var(--completion-unit) * 26);height:calc(var(--completion-unit) * 26)}
#record .record-container{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;width:var(--student-flow-content-width);margin:0 auto}
#record .record-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none;padding:12px 0 18px}
#record .record-page-heading>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 20px;min-width:0}
#record .record-page-heading h2{margin:0;color:#092c3c;font-family:inherit;font-size:clamp(28px,2.2vw,34px);font-weight:600;line-height:1.4}
#record .record-page-heading p{margin:0;color:#78868d;font-size:16px;line-height:1.5}
#record .record-readonly{display:flex;align-items:center;gap:7px;padding:6px 13px;border:1px solid #d8e5dc;border-radius:99px;background:#eff6f1;color:#4d7368;font-size:14px;font-weight:600;white-space:nowrap}
#record .record-readonly svg{width:17px;height:19px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#record #readonly-record{display:grid;grid-template-columns:minmax(240px,27%) minmax(0,1fr);gap:24px;flex:1;min-width:0;min-height:0;padding:0;overflow:hidden}
#record .record-context{min-width:0;min-height:0;padding:24px;border:1px solid #d0e0d7;border-radius:12px;background:#fff;overflow:auto;scrollbar-width:thin;scrollbar-gutter:stable}
#record .record-eyebrow{display:block;margin-bottom:8px;color:#008371;font-size:15px;font-weight:600}
#record .record-context h3{margin:0 0 18px;color:#092c3c;font-family:inherit;font-size:23px;font-weight:600;line-height:1.5}
#record .record-context p{margin:0;color:#4a6069;font-size:17px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}
#record .record-question-list{display:flex;flex-direction:column;gap:20px;min-width:0;min-height:0;padding-right:4px;overflow:auto;scrollbar-width:thin;scrollbar-gutter:stable;overscroll-behavior-y:contain}
#record .record-question-card{flex:none;min-width:0;overflow:hidden;border:1px solid #d0e0d7;border-radius:12px;background:#fff}
#record .record-question-heading{display:flex;align-items:center;gap:13px;padding:16px 24px;border-bottom:1px solid #e0e9e2;background:#f2f8f4}
#record .record-question-number{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:#e0f0e7;color:#007e70;font-size:18px;font-weight:600;line-height:1}
#record .record-question-heading h3{min-width:0;flex:1;margin:0;color:#173d43;font-family:inherit;font-size:20px;font-weight:600;line-height:1.5}
#record .record-answer-total{flex:none;color:#6e867c;font-size:13px;white-space:nowrap}
#record .record-question-body{padding:24px}
#record .record-question-prompt{margin:0 0 20px;color:#284650;font-size:19px;font-weight:600;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
#record .record-answer{padding:16px 20px;border:1px solid #e0e9e3;border-radius:9px;background:#f9fcfa}
#record .record-answer+.record-answer{margin-top:12px}
#record .record-answer-label{display:block;margin-bottom:8px;color:#008071;font-size:14px;font-weight:600}
#record .record-answer p{margin:0;color:#304d56;font-size:18px;font-weight:600;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}
#record .record-empty{margin:0;padding:18px;border:1px dashed #d4e3d9;border-radius:9px;background:#f8fbf8;color:#7c8b83;font-size:15px}
#record .record-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:none;margin:0;padding:14px 0 16px}
@media(max-width:900px){
  #record #readonly-record{grid-template-columns:minmax(200px,27%) minmax(0,1fr);gap:16px}
  #record .record-context{padding:18px}
  #record .record-question-heading{flex-wrap:wrap;gap:10px;padding:16px}
  #record .record-answer-total{margin-left:auto}
  #record .record-question-heading h3{font-size:18px}
  #record .record-question-body{padding:18px}
}
@media(max-width:720px){
  main.completed-mode,main.record-mode{height:auto;min-height:100dvh}
  main.record-mode #record{height:auto;min-height:100dvh;overflow:visible}
  :is(#completed,#record) .student-end-header{gap:12px;min-height:72px;padding:14px 16px}
  :is(#completed,#record) .student-end-brand{--brand-unit:.62px}
  :is(#completed,#record) .student-end-nav{gap:0;font-size:14px}
  :is(#completed,#record) .student-end-nav>span:first-child{padding:0;border:0}
  :is(#completed,#record) .student-end-tag{display:none}
  :is(#completed,#record) button{min-width:0;min-height:48px;padding:11px 16px;font-size:16px}
  #completed{--completion-unit:1px}
  #completed .completed-body{padding:24px 16px}
  #completed .completed-card{width:100%;min-height:0;padding:28px 20px;border-radius:13px}
  #completed .completed-check{width:80px;height:80px;margin-bottom:16px}
  #completed .completed-topic{font-size:16px}
  #completed h2{font-size:32px;line-height:1.35}
  #completed .completed-description{font-size:16px}
  #completed .completed-overview{gap:8px;margin-top:24px}
  #completed .completed-overview>div{min-height:0;padding:16px 6px}
  #completed .completed-overview dt{font-size:12px}
  #completed .completed-overview dd{gap:5px;font-size:14px}
  #completed .completed-overview dd strong{font-size:24px}
  #completed .completed-overview .completed-status{font-size:16px}
  #completed .completed-status svg{width:18px;height:18px}
  #completed .completed-actions{gap:12px;margin-top:24px}
  #completed .completed-actions button{width:100%;min-width:0;min-height:48px;padding:12px 16px;font-size:18px}
  #completed .completed-actions button svg{width:22px;height:22px}
  #record .record-container{width:calc(100% - 32px)}
  #record .record-page-heading{padding:22px 0 20px;gap:12px}
  #record .record-page-heading>div{display:block}
  #record .record-page-heading h2{font-size:26px}
  #record .record-page-heading p{margin-top:5px;font-size:14px}
  #record #readonly-record{display:block;min-height:0;overflow:visible}
  #record .record-context{margin-bottom:18px;overflow:visible;scrollbar-gutter:auto}
  #record .record-context h3{font-size:21px}
  #record .record-context p{font-size:15px}
  #record .record-question-list{gap:16px;padding:0;overflow:visible;scrollbar-gutter:auto;overscroll-behavior-y:auto}
  #record .record-question-heading{padding:16px}
  #record .record-question-heading h3{font-size:17px}
  #record .record-question-prompt{font-size:16px}
  #record .record-question-body{padding:16px}
  #record .record-answer{padding:14px}
  #record .record-answer p{font-size:16px}
  #record .record-actions{position:sticky;bottom:0;gap:12px;padding:14px 0;background:#fcfdfa}
  #record .record-actions button{flex:1;gap:8px;white-space:normal}
}
@media(prefers-reduced-motion:reduce){:is(#completed,#record) *{transition:none!important}}
