/* HAT Physics Suite 2027 — V1.4.0 contrast-compliant dark desktop tokens */
:root{--hat140-navy:#12293e;--hat140-navy2:#1c3b54;--hat140-action:#24465f;--hat140-text:#f6faff;--hat140-sub:#e7f1fb;--hat140-muted:#cadceb;--hat140-border:rgba(209,229,244,.30);--hat140-active:#158b69;--hat140-focus:#69d9b4;}
/* Review dock: text labels and icons must remain legible on dark controls. */
body.hat10-teaching #hat10Dock{background:var(--hat140-navy)!important;color:var(--hat140-text)!important;border:1px solid var(--hat140-border)!important;}
body.hat10-teaching #hat10Dock .hat10-dock-head,
body.hat10-teaching #hat10Dock .hat10-dock-head b,
body.hat10-teaching #hat10Dock .hat10-dock-tools,
body.hat10-teaching #hat10Dock .hat10-dock-tools button,
body.hat10-teaching #hat10Dock .hat10-dock-tools button small,
body.hat10-teaching #hat10Dock [class*="hint"],
body.hat10-teaching #hat10Dock [class*="label"]{color:var(--hat140-text)!important;opacity:1!important;text-shadow:none!important;}
body.hat10-teaching #hat10Dock .hat10-dock-head b{font-size:12px!important;letter-spacing:.025em!important;}
body.hat10-teaching #hat10Dock .hat10-dock-tools button,
body.hat10-teaching #hat10Dock .hat10-dock-head button{
  background:var(--hat140-action)!important;border:1px solid var(--hat140-border)!important;color:var(--hat140-text)!important;
  border-radius:10px!important;box-shadow:none!important;min-height:44px!important;opacity:1!important;
}
body.hat10-teaching #hat10Dock .hat10-dock-tools button small{font-size:12px!important;font-weight:600!important;line-height:1.28!important;display:block!important;color:var(--hat140-sub)!important;opacity:1!important;}
body.hat10-teaching #hat10Dock .hat10-dock-tools button:hover,
body.hat10-teaching #hat10Dock .hat10-dock-tools button:focus-visible{background:#315877!important;border-color:#83b4d0!important;color:#fff!important;}
body.hat10-teaching #hat10Dock .hat10-dock-tools button[aria-pressed="true"],
body.hat10-teaching #hat10Dock .hat10-dock-tools button.active{
  background:var(--hat140-active)!important;border-color:#7bdfbd!important;color:white!important;
}
body.hat10-teaching #hat10Dock .hat10-dock-tools button[aria-pressed="true"] small,
body.hat10-teaching #hat10Dock .hat10-dock-tools button.active small{color:white!important;}
body.hat10-teaching #hat10Dock button:disabled{opacity:.52!important;cursor:not-allowed!important;}
/* One coherent panel language, including resource tabs & properties. */
#hat063Context,#hat121Menu,#hat122Scratch,#hat130Pane,#hat069Gallery .hat069-window,
#hat33Library,#hat33Inspector{color:var(--hat140-text)!important;}
#hat063Context label,#hat121Menu label,#hat122Scratch label,#hat130Pane label,
#hat069Gallery label,#hat33Library label,#hat33Inspector label{color:var(--hat140-sub)!important;opacity:1!important;}
#hatDock .hat062-glyph,#hatDock small{opacity:1!important;}
#hat10Dock button:focus-visible,#hat063Context button:focus-visible,#hat069Gallery button:focus-visible,
#hat33Workspace button:focus-visible{outline:3px solid var(--hat140-focus)!important;outline-offset:2px!important;}
#hat111Status,#hat080BuildFooter{display:none!important;}
/* Reviewer badges: semantic status, not a false certification of unreviewed templates. */
#hat069Gallery .hat140-status{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-weight:750;font-size:11.5px;border:1px solid transparent;letter-spacing:.01em;margin:3px 0 5px;}
#hat069Gallery .hat140-reviewed{background:#0d6b52;color:#f6fff9;border-color:#42b68f;}
#hat069Gallery .hat140-candidate{background:#203f5f;color:#eaf5ff;border-color:#729abd;}
#hat069Gallery .hat140-needs_revision{background:#684219;color:#fff6e9;border-color:#dfa455;}
#hat069Gallery .hat140-draft{background:#364356;color:#f5f6ff;border-color:#8695a6;}
#hat069Gallery .hat140-deprecated{background:#5a333d;color:#fff0f3;border-color:#b77f8a;}
#hat069Gallery .hat069-item{position:relative;}
#hat069Gallery .hat069-item small{color:#c9dceb!important;opacity:1!important;line-height:1.4;}
#hat069Gallery .hat069-item .hat080-actions{gap:5px;flex-wrap:wrap;}
/* Expert inspection modal is separate from drawing surfaces. */
#hat140ReviewDialog[hidden]{display:none!important;}
#hat140ReviewDialog{position:fixed;inset:0;background:#06141fd4;display:grid;place-items:center;z-index:3000;padding:16px;}
#hat140ReviewDialog .hat140-card{background:#122a40;border:1px solid #68859b;color:#f5faff;border-radius:17px;width:min(760px,96vw);max-height:92dvh;overflow:auto;padding:20px 24px;box-shadow:0 20px 50px #0007;line-height:1.6;}
#hat140ReviewDialog .hat140-top{display:flex;align-items:start;justify-content:space-between;gap:16px;}
#hat140ReviewDialog h2,#hat140ReviewDialog h3{margin:0 0 8px;color:white;}
#hat140ReviewDialog p,#hat140ReviewDialog li,#hat140ReviewDialog dt{color:#e5eef8;}
#hat140ReviewDialog dl{display:grid;grid-template-columns:110px 1fr;gap:6px 12px;}
#hat140ReviewDialog dd{margin:0;overflow-wrap:anywhere;}
#hat140ReviewDialog button{background:#25516e;border:1px solid #8eb1c8;color:white;border-radius:10px;padding:9px 14px;min-height:38px;cursor:pointer;}
#hat140ReviewDialog button:hover{background:#346a89;}
#hat140ReviewDialog .hat140-note{background:#21425c;padding:12px 14px;border-left:3px solid #e2bd6c;border-radius:10px;}
#hat140ReviewDialog .hat140-check{display:flex;gap:10px;align-items:start;margin:10px 0;color:#fff;}
#hat140ReviewDialog input,#hat140ReviewDialog textarea{background:#f7fbff;border:1px solid #c2d0df;color:#1b3045;border-radius:9px;min-height:35px;padding:8px 10px;width:100%;}
#hat140ReviewDialog input[type="checkbox"]{width:18px;height:18px;flex-shrink:0;}
#hat140ReviewDialog .hat140-report{white-space:pre-wrap;background:#0a1e30;padding:12px;border-radius:10px;font-size:12px;}
@media(max-width:720px){#hat140ReviewDialog .hat140-card{padding:14px 16px;}#hat140ReviewDialog dl{grid-template-columns:90px 1fr;}}
