/* One interface scale for platform, management and standalone format tool.
   Word clipboard HTML and MathJax's editable-document fonts are not affected. */
:root {
  --ui-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-size-12: 12px; --ui-size-13: 13px; --ui-size-14: 14px;
  --ui-size-15: 15px; --ui-size-16: 16px; --ui-size-18: 18px;
  --ui-size-20: 20px; --ui-size-24: 24px; --ui-size-28: 28px;
  --ui-size-32: 32px; --ui-size-40: 40px; --ui-size-48: 48px;
  --ui-weight-400: 400; --ui-weight-500: 500; --ui-weight-600: 600;
  --ui-weight-700: 700; --ui-weight-800: 800;
  --ui-radius: 12px; --ui-control-height: 40px;
}
body { font-family: var(--ui-font); font-size: var(--ui-size-15); line-height: 1.6; }
button, input, select, textarea { font-family: var(--ui-font); }
button, a[class*="button"], .download { min-height: var(--ui-control-height); }
button:hover, a[class*="button"]:hover, .download:hover { transform: none !important; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #3478d4; outline-offset: 3px; }
:where(.manage-dialog,.platform-dialog) { max-width: calc(100vw - 32px); }
:where(.manage-table-wrap,.table-wrap) { max-width: 100%; overflow-x: auto; }
.manage-table { min-width: 760px; }
.manage-table td:first-child { min-width: 160px; max-width: 280px; }
.manage-table td:last-child { min-width: 140px; }
:where(.manage-table td,.diagnostic-next-step,.diagnostic-original) { overflow-wrap: anywhere; }
:where(.diagnostic-next-step) { margin: 6px 0; font-size: var(--ui-size-14); line-height: 1.6; color: #475569; }
:where(.diagnostic-original) { white-space: pre-wrap; font-size: var(--ui-size-13); }
@media(max-width:640px) {
  :root { --ui-control-height: 44px; }
  button { min-width: 44px !important; }
  html[data-account-role] #accountProfileDialog .profile-close,
  html[data-account-role] #accountProfileDialog .profile-tabs button,
  html[data-account-role] #accountProfileDialog .profile-signout,
  html[data-account-role] #accountProfileDialog .manage-form button { min-height: 44px !important; }
  #page-tasks .task-search-control { height: 44px; }
  #page-tasks .task-search-control button { width: 44px; height: 44px; }
  button, a[class*="button"], .download, .platform-select-trigger, summary { min-height: var(--ui-control-height) !important; }
  :where(.dialog-actions,.manage-dialog-actions,.account-dialog-actions,.task-cleanup-actions) { gap: 12px; flex-wrap: wrap; }
  :where(label:has(input[type="checkbox"]),label:has(input[type="radio"]),.switch-row label) { min-height: 44px; display: flex; align-items: center; }
}
@media(prefers-reduced-motion:reduce) {
  :where(button,a[class*="button"],.standard-card,.mode-card,.file-picker) { transition: none !important; }
}

/* Readable task details: isolate records from the task summary. */
body[data-active-page] #page-tasks .task-technical-route { display: block; flex-basis: 100%; width: 100%; min-width: 0; }
body[data-active-page] #page-tasks .task-technical-route:empty { display: none; }
body[data-active-page] #page-tasks .task-route-overview { margin-top: 8px; border-top: 1px solid #e8edf5; padding-top: 12px; }
body[data-active-page] #page-tasks .task-route-overview dl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px 24px; margin: 0 0 12px; }
body[data-active-page] #page-tasks .task-route-overview dt { color: #64748b; font-size: var(--ui-size-12); margin-bottom: 4px; }
body[data-active-page] #page-tasks .task-route-overview dd { margin: 0; color: #334155; overflow-wrap: anywhere; font-size: var(--ui-size-14); }
body[data-active-page] #page-tasks .task-route-disclosure { border-top: 1px solid #e8edf5; padding: 8px 0; }
body[data-active-page] #page-tasks .task-route-disclosure > summary { color: #475569; font-size: var(--ui-size-13); min-height: 32px; display: list-item; cursor: pointer; }
body[data-active-page] #page-tasks .task-route-overview :is(p, h4) { margin: 8px 0; white-space: normal; -webkit-line-clamp: unset; }
body[data-active-page] #page-tasks .task-route-note { color: #64748b; font-size: var(--ui-size-12); }
body[data-active-page] #page-tasks .task-route-table-scroll { overflow: auto; max-height: 360px; max-width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; margin: 10px 0; }
body[data-active-page] #page-tasks .task-route-table-scroll table { border-collapse: collapse; min-width: 680px; width: 100%; font-size: var(--ui-size-13); }
body[data-active-page] #page-tasks .task-route-table-scroll :is(th, td) { padding: 10px 12px; border-bottom: 1px solid #e8edf5; text-align: left; vertical-align: top; color: #475569; overflow-wrap: anywhere; }
body[data-active-page] #page-tasks .task-route-table-scroll th { background: #f5f7fb; font-weight: var(--ui-weight-600); }
body[data-active-page] #page-tasks .task-route-table-scroll td { min-width: 72px; max-width: 320px; }
body[data-active-page] #page-tasks .task-technical-details .task-manager-progress > p { margin: 6px 0 0; width: 100%; -webkit-line-clamp: unset; text-align: left; }
body[data-active-page] #page-tasks .task-technical-details .task-manager-progress > div:first-child { justify-content: flex-start; gap: 12px; margin-bottom: 0; }
body[data-active-page] #page-tasks .task-technical-details > div { align-items: flex-start; }
body[data-active-page] .result-technical-diagnostics { margin: 12px 0; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #64748b; }
body[data-active-page] .result-technical-diagnostics > summary { color: #64748b; font-size: var(--ui-size-13); }
body[data-active-page] .result-technical-diagnostics > p { font-size: var(--ui-size-13); margin: 10px 0; }
body[data-active-page] :is(.result-technical-diagnostics, .diagnostics-panel .technical-details) pre { max-height: 280px; overflow: auto; background: #f1f5f9; color: #475569; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--ui-size-12); }
body[data-active-page] .final-acceptance-issue-list .diagnostic-next-step { margin: 4px 0 0; color: #64748b; font-size: var(--ui-size-13); }
@media (max-width: 640px) {
 body[data-active-page] #page-tasks .task-route-overview dl { grid-template-columns: 1fr; gap: 10px; }
 body[data-active-page] #page-tasks .task-route-disclosure > summary { min-height: 44px; }
}

body[data-active-page] .final-acceptance-issue-list > li.delivery-check-warning { color: #475569; }
body[data-active-page] .delivery-check-label { display: inline-block; margin-right: 8px; font-weight: var(--ui-weight-600); }

/* Keep primary actions with the task heading; details have their own full row. */
body[data-active-page] #page-tasks .task-manager-item { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
body[data-active-page] #page-tasks .task-manager-main { grid-column: 1; grid-row: 1; min-width: 0; gap: 12px; }
body[data-active-page] #page-tasks .task-manager-copy { max-width: none; }
body[data-active-page] #page-tasks .task-manager-icon { width: 38px; height: 38px; font-size: var(--ui-size-16); }
body[data-active-page] #page-tasks .task-manager-side { grid-column: 2; grid-row: 1; min-width: 0; width: auto; max-width: 380px; align-self: start; justify-content: flex-start; }
body[data-active-page] #page-tasks .task-manager-actions { align-items: center; }
body[data-active-page] #page-tasks .task-manager-item > .task-technical-details { grid-column: 1 / -1; grid-row: 2; min-width: 0; margin: 0 0 0 50px; }
body[data-active-page] #page-tasks .task-manager-item.task-selection-mode > .task-technical-details { margin-left: 90px; }
@media(max-width:760px) {
 body[data-active-page] #page-tasks .task-manager-item { grid-template-columns: minmax(0, 1fr); }
 body[data-active-page] #page-tasks .task-manager-side { grid-column: 1; grid-row: 2; width: 100%; max-width: none; margin-left: 0; }
 body[data-active-page] #page-tasks .task-manager-actions { justify-content: flex-start; }
 body[data-active-page] #page-tasks .task-manager-item > .task-technical-details { grid-column: 1; grid-row: 3; margin-left: 0; }
 body[data-active-page] #page-tasks .task-manager-item.task-selection-mode > .task-technical-details { margin-left: 0; }
}

body[data-active-page] #page-practice .practice-quality > .practice-quality__details { grid-column: 1 / -1; }
body[data-active-page] #page-task .task-execution-actions { margin: 12px 0 20px; }
body[data-active-page] #page-practice .practice-math { min-width: 0; max-width: 100%; overflow-x: auto; }
@media(max-width:760px) {
 body[data-active-page] #page-practice .practice-quality { grid-template-columns: 34px minmax(0, 1fr); }
 body[data-active-page] #page-practice .practice-quality__actions { grid-column: 2; justify-content: flex-start; min-width: 0; }
 body[data-active-page] #page-practice .practice-quality > .practice-quality__details { grid-column: 1 / -1; }
}

/* Execution selection must not display hidden omission notes. */
#examStructureReviewModal [data-exclusion-note][hidden] { display: none !important; }

/* Approved existing-brand refinement: presentation only, no workflow gates. */
body[data-active-page] :is(.platform-home-header h1,.brand-button strong){font-family:var(--ui-font)}
body[data-active-page="home"] .platform-home{padding-top:48px}
body[data-active-page="home"] .platform-home-header{margin-bottom:28px}
body[data-active-page="home"] .platform-home-header h1{font-size:clamp(30px,3.2vw,44px);line-height:1.25;letter-spacing:-.025em}
body[data-active-page="home"] .platform-home-header p{margin-top:12px;font-size:var(--ui-size-16)}
body[data-active-page="home"] .home-hero-accents{opacity:.45}
body[data-active-page="home"] .business-domain-card{min-height:350px;box-shadow:0 10px 26px rgba(44,77,133,.065);transition:border-color .16s ease,box-shadow .16s ease}
body[data-active-page="home"] .business-domain-card:hover{transform:none!important;box-shadow:0 12px 30px rgba(44,77,133,.09)}
body[data-active-page="home"] .business-domain-card:hover .domain-art img{animation:none!important}
body[data-active-page="home"] .domain-copy h2{margin-top:23px;font-size:clamp(28px,2.4vw,36px);line-height:1.25}
body[data-active-page="home"] .exam-domain>.domain-copy{padding:30px 0 28px 32px}
body[data-active-page="home"] .domain-primary-actions{margin-top:45px}
body[data-active-page="home"] button.home-primary-action{min-width:200px;min-height:52px;font-size:var(--ui-size-18)!important;box-shadow:var(--p-home-action-shadow,0 7px 18px rgba(31,104,220,.16))!important}
body[data-active-page="home"] .generation-domain-head{min-height:206px;padding:30px 32px 20px}
body[data-active-page="home"] .generation-domain-art{height:211px}
body[data-active-page="home"] .generation-mode-list{padding:0 32px}
body[data-active-page="home"] .generation-mode-row{min-height:70px}
body[data-active-page="home"] button.generation-entry-link{font-size:var(--ui-size-18)!important}
body[data-active-page="home"] button.home-primary-action:hover i,
body[data-active-page="home"] button.generation-entry-link:hover i{transform:none}
body[data-active-page="home"] .home-utility-entry{margin-top:16px;background:rgba(255,255,255,.72);box-shadow:0 5px 16px rgba(56,83,128,.035)}
body[data-active-page] .page{animation:none}
body[data-active-page] :is(.page-title h2,.task-model-title h2){line-height:1.3}
body[data-active-page] :is(.knowledge-model-note span,.practice-current-model-strip strong){white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.6}
body[data-active-page] :is(.knowledge-model-note,.practice-current-model-strip){min-width:0}
body[data-active-page] .knowledge-model-note>div{min-width:0}
body[data-active-page] .knowledge-model-note .knowledge-model-button{min-height:44px}
body[data-active-page] .question-detail-content p{max-width:82ch;line-height:1.9;overflow-wrap:anywhere}
body[data-active-page] .question-detail-content h4{color:#43516b;font-size:var(--ui-size-15);line-height:1.5}
body[data-active-page] .question-detail-header{flex-wrap:wrap}
body[data-active-page] .question-detail-header h3{min-width:0;overflow-wrap:anywhere}
body[data-active-page] :is(.original-question-block,.question-detail-pane){min-width:0}
body[data-active-page] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea,select){transition:border-color .15s ease,box-shadow .15s ease}
body[data-active-page] :is(input,textarea,select):focus-visible{outline:2px solid #3478d4;outline-offset:2px}
body[data-active-page] :is(.primary-button,.practice-workflow-actions__primary):disabled{background:#e5ebf4!important;border-color:#d6deeb!important;color:#53627a!important;opacity:1!important;box-shadow:none!important;cursor:not-allowed}
.material-availability{margin:4px 0 0!important;font-size:var(--ui-size-13)!important;line-height:1.5!important;font-weight:var(--ui-weight-400)!important;color:#556680!important}
.material-availability[hidden]{display:none!important}
label:has(>.accessible-file-input){position:relative}
.accessible-file-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
label:has(>.accessible-file-input:focus-visible){outline:3px solid #3478d4;outline-offset:3px}
body[data-active-page] .task-empty-state{line-height:1.7}
body[data-active-page] :is(.task-manager-actions,.dialog-actions,.sticky-page-actions){gap:10px}
@media(max-width:900px){
 body[data-active-page="home"] .exam-domain{grid-template-columns:minmax(0,1fr)}
 body[data-active-page="home"] .exam-domain-art{width:48%;opacity:.65}
 body[data-active-page="home"] .domain-copy p{max-width:72%}
}
@media(max-width:640px){
 body[data-active-page="home"] .platform-home{padding-top:30px}
 body[data-active-page="home"] .platform-home-header{margin-bottom:24px}
 body[data-active-page="home"] .business-domain-card{min-height:290px}
 body[data-active-page="home"] .exam-domain>.domain-copy{padding:26px 24px}
 body[data-active-page="home"] .domain-primary-actions{margin-top:28px}
 body[data-active-page="home"] .generation-domain-head{min-height:174px;padding:26px 24px 18px}
 body[data-active-page="home"] .generation-domain-art{height:176px;opacity:.7}
 body[data-active-page="home"] .generation-mode-list{padding:0 24px}
 body[data-active-page="home"] .generation-mode-row{min-height:68px;gap:12px}
 body[data-active-page="home"] .domain-copy h2{font-size:var(--ui-size-28);margin-top:17px}
 body[data-active-page="home"] .domain-copy p{max-width:80%;font-size:var(--ui-size-14)}
 body[data-active-page] .question-detail-pane{padding:18px}
 body[data-active-page] .original-question-block{padding:18px}
 body[data-active-page] .knowledge-model-note .knowledge-model-button{margin-left:0}
 .material-availability{font-size:var(--ui-size-12)!important}
}
@media(prefers-reduced-motion:reduce){
 body[data-active-page] *,body[data-active-page] *::before,body[data-active-page] *::after{scroll-behavior:auto!important}
 body[data-active-page] :is(.business-domain-card,.domain-art img,input,textarea,select){animation:none!important;transition:none!important}
}

/* Full-site readable locked values and model hierarchy; state gates stay native. */
#examModelSelectionTitle{font-size:var(--ui-size-24);line-height:1.4}
.model-route-guidance{color:#53627a;font-size:var(--ui-size-13);margin:8px 0 12px}
.platform-select-trigger:disabled{opacity:1!important;color:#53627a!important;background:#f1f5f9!important}

html[data-account-role] #accountProfileDialog button[type="submit"]:disabled{opacity:1!important;background:#e5ebf4!important;color:#53627a!important;border:1px solid #cbd5e1!important}
body[data-active-page] .secondary-button:disabled,
#page-keys button:disabled,#page-monitor button:disabled{opacity:1!important;background:#e5ebf4!important;color:#53627a!important;box-shadow:none!important;cursor:not-allowed}
