:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Microsoft JhengHei",sans-serif;color:#163b3b;background:#f4f7f3;font-size:17px;line-height:1.7}*{box-sizing:border-box}body{margin:0}header{max-width:1000px;margin:auto;padding:25px 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d5dfd7}header a{text-decoration:none;font-size:26px;font-weight:800;letter-spacing:2px;color:#163b3b}header a span{color:#739681}.tag{font-size:13px;color:#49665c}main{max-width:900px;min-height:70vh;margin:0 auto;padding:45px 28px}h1{font-size:clamp(30px,5vw,48px);line-height:1.35;letter-spacing:.03em;margin:10px 0 24px}h2{font-size:22px;margin:0 0 15px}.hero{padding:10px 0 25px}.eyebrow{font-size:13px;font-weight:700;color:#497164;letter-spacing:.12em}.lead{font-size:20px;max-width:650px}.facts{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}.facts span{border:1px solid #cbd9cd;border-radius:24px;padding:5px 15px;font-size:14px}.panel,fieldset{background:white;border:1px solid #d5dfd7;border-radius:18px;padding:28px;margin:20px 0}.note{font-size:14px;color:#4e635c}.scale{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:25px 0}.scale span{text-align:center;font-size:13px;background:#f1f6f1;padding:12px 4px;border-radius:9px}.scale b{display:block;font-size:22px}button{border:1px solid #19554c;background:#19554c;color:white;border-radius:10px;padding:13px 24px;font:inherit;font-weight:600;cursor:pointer;min-height:48px}button:hover{background:#113f38}button.secondary{background:transparent;color:#19554c}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #be771d;outline-offset:4px}h1:focus,h2:focus{outline:none}nav{display:flex;gap:15px;justify-content:space-between;margin:30px 0}progress{width:100%;height:8px;accent-color:#19554c}fieldset{min-width:0;padding:24px}legend{font-size:19px;font-weight:650;padding:0 6px;max-width:100%}.qnumber{display:inline-block;color:#54766a;font-size:14px;margin-right:12px}.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}.choice{position:relative;cursor:pointer}.choice input{position:absolute;opacity:0;width:100%;height:100%;margin:0}.choice span{display:flex;align-items:center;gap:10px;border:1px solid #b8c9bd;border-radius:10px;padding:13px 12px;min-height:58px;font-size:15px}.choice b{font-size:20px}.choice input:checked+span{background:#e5f0e7;border:2px solid #19554c;padding:12px 11px}.choice input:focus-visible+span{outline:3px solid #be771d;outline-offset:2px}.clear{border:0;background:transparent;color:#426d60;padding:8px 2px;font-size:14px;text-decoration:underline;min-height:44px}.clear:hover{background:transparent;color:#163b3b}.counts{display:flex;gap:18px;flex-wrap:wrap;margin:25px 0}.counts span{background:#e8eee7;border-radius:12px;padding:14px 22px;font-size:14px}.counts b{font-size:26px;display:block}.review>div{border-bottom:1px solid #e2e9e2;padding-bottom:15px}.review>div:last-child{border:0}.review p{margin-bottom:5px}.review strong{margin-right:20px;font-size:15px}.consent{display:flex;gap:12px;align-items:flex-start;background:#f0f5f0;padding:16px;border-radius:10px}.consent input{margin-top:8px;width:20px;height:20px;flex-shrink:0;accent-color:#19554c}.score{font-size:88px;font-weight:700;letter-spacing:-4px;line-height:1.3}.score span{font-size:24px;letter-spacing:0;margin-left:15px;font-weight:400}.result-actions{justify-content:flex-start}details{padding:20px 0}summary{cursor:pointer;font-weight:600}footer{text-align:center;color:#607269;font-size:13px;padding:25px;border-top:1px solid #d5dfd7}footer small{font-size:11px}#save-status{padding:12px 0}noscript{display:block;padding:30px}@media(max-width:600px){main{padding:28px 18px}header{padding:18px}.tag{font-size:11px}.panel,fieldset{padding:20px 16px}.choices{grid-template-columns:repeat(2,1fr)}.scale{grid-template-columns:repeat(5,1fr);gap:4px}.scale span{font-size:11px}.counts{gap:8px}.counts span{padding:12px 16px}nav button{padding:12px 16px;font-size:15px}.score{font-size:72px}.lead{font-size:18px}}@media print{body{background:white;color:black}header,.result-actions,#retry,footer{display:none}main{max-width:none;padding:0}.panel{break-inside:avoid}details{display:block}details>*{display:block}summary{display:none}.score{font-size:60px}.counts span{border:1px solid #aaa}button{display:none}}

.language-options{display:flex;flex-wrap:wrap;gap:16px;margin-top:24px}.language-options button{flex:1;min-width:200px;padding:24px;font-size:22px}.language-panel{margin-bottom:50px}@media print{details p{break-inside:avoid}}
.answer-heading{font-weight:650;font-size:16px;margin-bottom:8px}.followup{border-top:1px solid #d5dfd7;margin-top:22px;padding-top:12px}.followup[hidden]{display:none}.report-item{border-bottom:1px solid #d5dfd7;padding:8px 0}.report-item p{margin:6px 0}.report h2:not(:first-child){margin-top:28px}.result-actions{flex-wrap:wrap}.choices:has(input[name="hours"]),.choices:has(input[name="continuous"]),.choices:has(input[name="rest"]),.choices:has(input[name="restEligible"]){grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:420px){.choices{grid-template-columns:1fr 1fr}.choices:has(input[name="hours"]),.choices:has(input[name="continuous"]),.choices:has(input[name="rest"]),.choices:has(input[name="restEligible"]){grid-template-columns:1fr}.choice span{font-size:14px;overflow-wrap:anywhere}nav{flex-wrap:wrap}}@media print{.panel.report{break-inside:auto}.report-item{break-inside:avoid}.report h2{break-after:avoid}a{color:black}#save-status{font-size:10pt}}
@media print{body{font-size:11pt;line-height:1.5}h1{font-size:26pt;margin:6pt 0 12pt}h2{font-size:16pt}.score{font-size:48pt}.counts{margin:12pt 0;gap:10pt}.counts span{padding:8pt 14pt}.counts b{font-size:20pt}.panel{padding:14pt;margin:12pt 0}.note{font-size:9pt}details{padding:8pt 0}details p{margin:8pt 0}}

/* Keep frequency choices in columns: 0/1, 2/3, 4/N/A at every width. */
.choices.frequency-choices{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,auto);grid-auto-flow:column}.frequency-choices .choice span{height:100%;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere}.references a{color:#19554c;text-decoration:underline}.references li{margin:16px 0;overflow-wrap:anywhere}.degree-summary .score{font-size:64px}@media(max-width:600px){.frequency-choices .choice span{font-size:12px;padding:12px 6px;min-height:72px}.frequency-choices .choice input:checked+span{padding:11px 5px}.degree-summary .score{font-size:56px}}@media print{.degree-summary{break-inside:avoid;page-break-inside:avoid}.references{break-inside:auto}.references li{break-inside:avoid;page-break-inside:avoid}.report h2{page-break-after:avoid}.report-item{page-break-inside:avoid}.references{font-size:9pt}}

.choices.degree-choices{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,auto);grid-auto-flow:column}.degree-choices .choice span{height:100%;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere}.index-caption{font-weight:650;color:#426d60;margin-top:0}.frequency-summary h1{font-size:clamp(25px,4vw,36px);margin-bottom:8px}.degree-summary h2{margin-bottom:8px}header a{font-size:24px;letter-spacing:1px}@media(max-width:600px){.degree-choices .choice span{font-size:12px;padding:12px 6px;min-height:72px}.degree-choices .choice input:checked+span{padding:11px 5px}header a{font-size:21px}.frequency-summary .score{font-size:56px}}@media print{.references{display:none!important}.frequency-summary{break-inside:avoid;page-break-inside:avoid}.frequency-summary h1{font-size:24pt}.index-caption{color:black}.degree-summary .score,.frequency-summary .score{font-size:42pt}}

.print-only{display:none}.usage-row{padding:12px 0;border-bottom:1px solid #d5dfd7}.usage-row:last-child{border-bottom:0}.usage-row p{margin:5px 0}.usage-prompt{font-size:14px;color:#4e635c}.usage-answer{font-weight:650}
@media print{
 @page{size:A4 portrait;margin:12mm}
 html,body{margin:0!important;padding:0!important;background:white!important;color:#111!important;font-size:10.5pt!important;line-height:1.25!important}
 body>header,body>footer,noscript,#app>*{display:none!important}
 main#app{display:block!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important}
 #app>#print-report{display:block!important}.print-page{position:relative;height:271mm;padding:0 0 10mm;break-after:page;page-break-after:always;box-sizing:border-box}.print-page:last-child{break-after:auto;page-break-after:auto}
 .print-header{display:flex;justify-content:space-between;gap:10mm;border-bottom:1px solid #78978c;padding-bottom:3mm;margin-bottom:4mm;font-size:10pt}.print-header b{font-size:15pt;color:#163b3b}.print-header span{text-align:right}
 #print-report h1{font-size:18pt!important;line-height:1.15;margin:0 0 4mm;letter-spacing:0}#print-report h2{font-size:12pt!important;line-height:1.2;margin:0 0 2mm}
 .print-meta{font-size:8.5pt;margin-bottom:3mm}.print-meta p{margin:1mm 0}.print-index{padding:4mm;border:1px solid #bdcbc3;border-radius:3mm;margin:0 0 4mm;break-inside:avoid;page-break-inside:avoid;font-size:10pt;line-height:1.25}.print-index p{margin:2mm 0}.print-index-head{display:flex;align-items:center;justify-content:space-between;gap:6mm}.print-index-head strong{font-size:25pt;line-height:1.15;white-space:nowrap}.print-index-head span{font-size:9pt}.print-counts{font-size:9pt;border-bottom:1px solid #d5dfd7;padding-bottom:2mm}.print-limit{font-size:9pt;line-height:1.25}.print-limit p{margin:2mm 0}
 .print-footer{position:absolute;bottom:0;left:0;right:0;border-top:1px solid #b7c6bd;padding-top:2mm;display:flex;justify-content:space-between;font-size:8pt}.print-demographics{padding:3mm;background:#f0f5f0;margin:0 0 4mm}.print-section-title{margin:4mm 0 2mm!important;border-bottom:1px solid #aabdb1;padding-bottom:1mm;break-after:avoid;page-break-after:avoid}.print-item{margin:0 0 3mm;padding:0 0 2mm;border-bottom:1px solid #e2e8e3;break-inside:avoid;page-break-inside:avoid}.print-item p{margin:0 0 1mm}.print-answer{font-size:9.5pt;color:#24463b}
 #print-report .usage-row{padding:2mm 0;break-inside:avoid;page-break-inside:avoid}#print-report .usage-row p{margin:1mm 0}#print-report .usage-prompt{font-size:9pt;line-height:1.2;color:#333}#print-report .usage-row .note{font-size:9pt;color:#333}.print-context-note{font-size:9pt;line-height:1.2;margin-top:3mm}
}

/* Let browser print engines place the footer with its content, without an
   absolutely positioned footer overflowing a fixed-height A4 container. */
@media print{
 #print-report .print-page{height:auto;min-height:0;padding:0;position:static;break-after:auto;page-break-after:auto;overflow:visible}
 #print-report .print-page+.print-page{break-before:page;page-break-before:always}
 #print-report .print-footer{position:static;inset:auto;margin-top:6mm;padding-top:2mm;break-inside:avoid;page-break-inside:avoid}
 #print-report .print-header{break-inside:avoid;page-break-inside:avoid;break-after:avoid;page-break-after:avoid}
}
