/* FATII: mobile compact layout & exam-only navigation (2026-11-17). */
/* Intentional separate override file; base training.css is unchanged. */
.in-attempt .exam-main .question-actions{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
 justify-content:stretch;align-items:stretch;border:0;padding:0;margin:16px 0 0
}
.in-attempt .exam-main .question-actions form{display:flex;min-width:0;margin:0}
.in-attempt .exam-main .question-actions .button{
 display:flex;width:100%;min-width:0;min-height:46px;margin:0;padding:11px 12px;
 justify-content:center;text-align:center;white-space:normal;line-height:1.3;
 font-size:14px;font-weight:700;border-radius:9px;touch-action:manipulation;
 transition:background-color .15s ease,border-color .15s ease
}
.in-attempt .exam-main .question-actions .button:disabled{
 opacity:1;cursor:not-allowed;color:#63738a;background:#e5eaf2;border:1px solid #cbd5e3
}
.in-attempt .exam-main .question-actions .button.primary:not(:disabled){background:#143f99;color:#fff}
.in-attempt .exam-main .question-body,
.in-attempt .exam-main .answer-option{overflow-wrap:anywhere}
/* Finish examination stays in its original top-right position. */
.in-attempt .exam-toolbar-finish{
 display:flex;justify-content:flex-end;align-items:center;
 margin:0 0 12px;gap:0
}
.in-attempt .exam-toolbar-finish .exam-finish{margin:0}
.in-attempt .exam-toolbar-finish .exam-finish summary{
 min-width:0;min-height:42px;padding:10px 16px
}
.in-attempt .exam-toolbar-finish .exam-finish-confirm{
 right:0;max-width:min(280px,calc(100vw - 36px))
}
@media (min-width:761px) and (max-width:1024px){
 .in-attempt .exam-content{padding:18px 28px 26px}
}
@media (max-width:760px){
 /* General candidate pages: useful content starts high, cards flow naturally. */
 .candidate-page .site-header{height:auto;min-height:68px;padding:8px 14px;gap:8px}
 .candidate-page .site-header .brand{gap:6px;font-size:18px;min-width:0}
 .candidate-page .site-header nav{gap:9px;flex-shrink:0}
 .candidate-page .site-header .text-button{padding:7px 0}
 .candidate-page main{min-height:0;padding:18px 14px 28px}
 .candidate-page .site-footer{padding:14px;gap:4px}
 .candidate-page .login-grid{gap:16px;align-items:start}
 .candidate-page .login-intro h1{font-size:clamp(30px,8vw,40px);line-height:1.14;margin-bottom:10px}
 .candidate-page .login-intro .lead{font-size:14px;line-height:1.5;margin:0}
 .candidate-page .eyebrow{margin-bottom:10px}
 .candidate-page .road-illustration{height:64px;margin-top:12px}
 .candidate-page .benefits{margin-top:10px;flex-wrap:wrap;gap:7px 12px;font-size:10px}
 .candidate-page .login-card{padding:19px 16px}
 .candidate-page .login-card h2{font-size:28px;margin:8px 0}
 .candidate-page .login-card>p{margin-bottom:16px}
 .candidate-page .login-card .button{margin-top:8px}
 .candidate-page .login-help{margin-top:15px;padding-top:12px}
 .candidate-page .page-heading{margin-bottom:18px}
 .candidate-page .page-heading h1{font-size:clamp(29px,8vw,40px);margin-bottom:10px}
 .candidate-page .page-heading .lead{line-height:1.5}
 .candidate-page .section-heading{margin:20px 0 12px}
 .candidate-page .section-heading h2{font-size:21px}
 .candidate-page .course-grid{gap:12px}
 .candidate-page .course-card{padding:16px}
 .candidate-page .course-card-top{margin-bottom:8px}
 .candidate-page .course-card h3{font-size:18px;line-height:1.3;margin-bottom:10px}
 .candidate-page .course-meta{padding:10px 0;margin-bottom:8px;gap:6px 12px;flex-wrap:wrap}
 .candidate-page .learning-note{margin:16px 0;padding:13px}
 .candidate-page .history-list>a{padding:13px 14px}
 .candidate-page .notice{padding:14px;margin-bottom:15px}
 .candidate-page .button{min-height:44px}
 /* Active exam: fullscreen mobile experience, no oversized gray frame. */
 body.in-attempt{background:#f3f6fb}
 .in-attempt .exam-shell{
  width:100%;max-width:none;min-height:100dvh;margin:0;border:0;border-radius:0;
  box-shadow:none;overflow:visible
 }
 .in-attempt .exam-shell::before,.in-attempt .exam-shell::after{height:3px}
 .in-attempt .exam-header{padding:7px 12px;min-height:0;gap:8px}
 .in-attempt .exam-header .brand-logo{width:66px;height:44px}
 .in-attempt .exam-brand{gap:2px}
 .in-attempt .exam-brand strong{font-size:clamp(15px,4.6vw,19px)}
 .in-attempt .exam-brand span{font-size:9px;line-height:1.3;max-width:215px}
 .in-attempt .exam-status{grid-template-columns:minmax(0,1fr) auto}
 .in-attempt .exam-statistics{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:3px 9px;padding:7px 9px;font-size:11px;line-height:1.35
 }
 .in-attempt .exam-status .timer{padding:6px 10px}
 .in-attempt .exam-status .timer strong{font-size:18px}
 /* All question numbers are visible; compact rows instead of sideways scrolling. */
 .in-attempt .exam-status .question-map{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(24px,1fr));
  overflow:visible;flex-wrap:wrap;padding:6px 9px;gap:3px;
  scroll-snap-type:none
 }
 .in-attempt .exam-status .question-map>span{
  width:100%;min-width:0;height:24px;flex:none;
  font-size:10px;scroll-snap-align:none
 }
 .in-attempt .exam-content{padding:10px 13px calc(102px + env(safe-area-inset-bottom))}
 .in-attempt .exam-toolbar-finish{margin:0 0 9px}
 .in-attempt .exam-toolbar-finish .exam-finish summary{
  min-height:38px;font-size:12px;padding:8px 13px
 }
 .in-attempt .exam-course-title{font-size:17px;line-height:1.3}
 .in-attempt .exam-candidate{font-size:13px;margin-bottom:2px}
 .in-attempt .exam-variant-label{font-size:11px;margin-bottom:11px}
 .in-attempt .exam-main .question-body{
  padding:11px;margin:0 0 8px;font-size:16px;line-height:1.4;border-radius:7px
 }
 .in-attempt .exam-main .answer-list{border:0;background:transparent;padding:0;gap:7px}
 .in-attempt .exam-main .answer-option{
  min-height:46px;padding:10px 11px;align-items:center;gap:8px;
  font-size:14px;line-height:1.4;font-weight:550;
  background:#fff;border:1px solid #d5dfea;border-radius:8px
 }
 .in-attempt .exam-main .answer-option>input{width:18px;height:18px;margin:0}
 .in-attempt .exam-main .answer-letter{font-size:13px}
 .in-attempt .exam-main .answer-option:has(input:checked){background:#e7efff;border-color:#143f99}
 .in-attempt .exam-main .field-help{margin:8px 0}
 .in-attempt .exam-main .feedback{padding:12px;margin-top:10px;border-radius:8px}
 /* Fixed bottom actions, with safe-area support for iOS/Android. */
 .in-attempt .exam-main .question-actions{
  position:fixed;z-index:20;left:0;right:0;bottom:0;width:100%;
  margin:0;padding:10px max(12px,env(safe-area-inset-left))
    calc(10px + env(safe-area-inset-bottom))
    max(12px,env(safe-area-inset-right));
  gap:9px;background:#fff;border-top:1px solid #d1daea;
  box-shadow:0 -4px 20px #1c31591a
 }
 .in-attempt .exam-main .question-actions .button{min-height:51px;padding:9px 5px;font-size:13px}
}
@media (max-width:380px){
 .in-attempt .exam-header .brand-logo{width:54px;height:38px}
 .in-attempt .exam-brand span{display:none}
 .in-attempt .exam-statistics{font-size:10px;gap:3px 6px}
 .in-attempt .exam-main .question-actions .button{font-size:12px}
 .candidate-page .site-header .brand{font-size:16px}
 .candidate-page .site-header .user-name{max-width:65px}
}
