/* Dentara identity. Anatomical swatches, model materials and callout colours
   are intentionally owned by their teaching modules, not this UI theme. */
:root{--forest:#123c3a;--green:#123c3a;--dark:#0b302e;--ink:#123c3a;--muted:#526a67;--paper:#f7f9f5;--bg:#f7f9f5;--line:#d6e3df;--sage:#e6f8f2;--soft:#e6f8f2;--mint:#5be0c3;--lime:#d6f56a;--lilac:#b8a5f7;--gold:#65568e}
body{color:var(--ink);background:var(--paper)}
a{color:var(--forest)}
h1,h2,h3{color:var(--ink)}
h1{font-weight:800;letter-spacing:-1.1px}h2{font-weight:750}
button,input,select,textarea{accent-color:var(--forest)}
button{touch-action:manipulation}
button:not(:disabled),a{transition:background-color .16s,border-color .16s,box-shadow .16s}
:focus-visible{outline:3px solid #62509a!important;outline-offset:3px}
.header,.site-header{background:#fff;border-bottom:1px solid var(--line);min-height:88px;height:auto;padding-block:12px;gap:24px}
.logo,.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);flex-shrink:0;direction:ltr}
.logo .brand-mark,.brand .brand-mark{display:block;width:51px;height:51px;flex-shrink:0}
.brand-lockup{display:flex;flex-direction:column;gap:3px}
.brand-word{font-family:'Manrope','Arial Rounded MT Bold',sans-serif;font-size:32px;font-weight:800;letter-spacing:-1.7px;line-height:1}
.brand-domain{font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;letter-spacing:1.8px;line-height:1.3;color:#526a67}
.header-note{color:var(--muted);border-color:var(--line);line-height:1.7}
.header-actions{flex-wrap:wrap;justify-content:flex-end}.header-actions button{border-radius:12px;color:var(--ink);border-color:var(--line);font-weight:600}
.header-actions .dark,.primary,.primary-button{background:var(--forest);border-color:var(--forest);color:white;border-radius:12px;font-weight:600}
.primary:hover,.primary-button:hover,.header-actions .dark:hover{background:var(--dark);color:#fff}
.secondary{background:#fff;color:var(--forest);border-color:#b8ceca;border-radius:11px;font-weight:600}
.shell{border-color:var(--line);border-radius:20px;box-shadow:0 8px 32px #123c3a08}
.navigation{background:#f1f7f4;border-color:var(--line)}
.nav-group>.eyebrow,.nav-bottom,.nav-item,.nav-item .nav-symbol{color:var(--muted)}
.nav-item{border-radius:12px;font-weight:550}
.nav-item.active{background:var(--forest);color:#fff;box-shadow:none}
.nav-item.active .nav-symbol{color:var(--mint)}
body[dir=rtl] .nav-item.active{box-shadow:none}
.nav-bottom strong,.nav-bottom a{color:var(--forest)}
.workspace-heading{position:relative;background:linear-gradient(105deg,#f0fbf6,#fff 70%);border-bottom:1px solid var(--line)}
.workspace-heading .eyebrow{display:inline-block;color:var(--forest);background:#e6f8f2;border:1px solid #c2e8dc;border-radius:20px;padding:5px 10px;letter-spacing:1.3px}
.workspace-heading h1{font-size:32px;margin:12px 0 8px;font-weight:800}
.toolbar{background:#fff}.toolbar-title,.picker-action,.tooth-picker-trigger small{color:var(--muted)}
.tooth-picker-trigger{border-color:#bbd4cd;border-radius:14px;gap:12px}
.tooth-id{background:var(--mint);color:var(--forest);border-radius:10px;font-weight:800}
.stage,.viewer{background:radial-gradient(ellipse at 48% 42%,#fff 0%,#f2f7f3 73%)}
.stage-label,.stage-bottom,.stage-bottom b,.help-bar,.viewer-help{color:var(--muted)}
.stage-actions button,.focus-toggle{background:#fff;color:var(--forest);border-color:#c4d8d1;border-radius:12px}
.stage-actions button.active{background:var(--mint);color:var(--forest)}
.controls-bar{background:#fff;gap:6px}.controls-bar button{border-radius:10px;color:var(--muted)}
.controls-bar button.active,.choice-row button.active{background:var(--mint);color:var(--forest);border-color:#399781;font-weight:700}
.inspector{background:#fff}.inspector h3,.field-label,.check-label,.inspector p,.inspector label.control{color:var(--muted)}
.badge,.chip{background:#f0ebff;color:#51436e;border-color:#d7ccef;border-radius:7px}
.stat-card,.score-card{background:#f2fae5;border-color:#d7e6bb;border-radius:14px}
.stat-card strong,.score-card strong{color:var(--forest)}
.stat-card span,.score-card span{color:var(--muted)}
.progress-track{background:#e5ece3}.progress-track i,.progress-track span{background:var(--forest)}
.note,.knowledge-note{background:#f1edfc;border-color:#dcd2f3;border-radius:12px;color:#51436e}
.note strong,.knowledge-note p{color:#51436e}
.tool-content>.lead,.small,.attribution,.term p,.term b,.model-card small,.source-list small,.section-footer,.studio-footer,.site-credit{color:var(--muted)}
.model-card,.term,.form-panel,.quiz-box{background:#fff;border-color:var(--line);border-radius:15px}
.model-card strong,.term strong{color:var(--forest)}
.model-card .model-glyph{color:#66538e}
.model-card:hover{border-color:#399781;background:#f0fbf6}
.text-field,select.field,.search{border-color:#bdd2cb;border-radius:10px;background:#fff;color:var(--ink)}
.answer-list button{border-color:#bdd2cb;border-radius:12px;color:var(--ink)}
.answer-list button.correct{background:#e8f6d2;border-color:#718e42}
.answer-list button.incorrect{background:#fff0e8;border-color:#b56844}
.feedback{background:#e8f6d2;color:#344d20}.feedback.wrong{background:#fff0e8;color:#784027}
.tooth-grid button{background:#f7f9f5;color:var(--forest);border-color:var(--line);border-radius:7px}
.tooth-grid button.active{background:var(--forest);color:white;border-color:var(--forest)}
.picker-tooth{background:#fff;border-color:var(--line);border-radius:12px}
.picker-tooth b{color:var(--forest)}.picker-tooth small{color:var(--muted)}
.picker-tooth.selected{background:#e6f8f2;border-color:#20725e}
.section-footer{background:#f7f9f5}.section-footer button,.section-footer a{color:var(--forest)}
th{background:#e6f8f2;color:var(--forest)}td,th{border-color:var(--line)}
.assembly-system-tabs>button{background:#fff;border-color:var(--line);border-radius:14px}
.assembly-system-tabs>button.active{background:#e6f8f2;border-color:var(--forest)}
.assembly-system-tabs small,.assembly-type,.assembly-introduction,.assembly-sources,.assembly-reference-list small{color:var(--muted)}
.assembly-modes{background:#f0ebff;border-radius:11px}.assembly-modes button.active{background:var(--forest);color:#fff;border-radius:8px}
.assembly-part-row{background:#fff;border-color:var(--line)}
.assembly-part-row>button.active{box-shadow:inset 0 0 0 2px #20725e;background:#e6f8f2}
.assembly-part-detail,.occlusal-detail{background:#f0f8f4;border-inline-start-color:#20725e}
.assembly-connection{color:var(--forest)!important}
.assembly-key-point{background:#f1edfc;border-color:#dcd2f3;border-radius:12px}
.assembly-slider output{color:var(--forest)}
.assembly-slider input,.assembly-part-row input{accent-color:var(--forest)}
.occlusal-key button{background:#fff;border-color:var(--line)}
.occlusal-key button.active{background:#e6f8f2;outline-color:#20725e}
.occlusal-scope{color:var(--muted)}
.mobile-tool-bar button{background:var(--forest);border-color:var(--forest);color:#fff;border-radius:12px}
.mobile-tool-bar>span{color:var(--muted)}
#notification,.toast{background:var(--forest);color:#fff}
/* Shared classic-atlas treatment. */
.site-header .main-nav{margin-left:24px}.site-header .main-nav button{color:var(--muted)}
.site-header .main-nav .nav-active{color:var(--forest);border-color:var(--forest)}
.avatar{background:var(--mint);color:var(--forest)}
.tooth-browser,.details-panel{background:#fff}.model-panel{background:#f7f9f5}
.group-row.active,.segmented .active,.numbering-switch .active{background:#e6f8f2;color:var(--forest)}
.segmented,.numbering-switch{background:#f0f4f1;border-color:var(--line)}
.detail-description,.key-fact,.anatomy-row p,.eruption-note,.layer-panel p,.source-inline,.detail-side,.group-row,.notes-status,.save-caption,.study-progress p,.range-labels,.intro p{color:var(--muted)}
.detail-description,.anatomy-row p{font-size:13px;line-height:1.8}
.dental-chart .selected{fill:#237461;stroke:var(--forest)}
.below-workspace{background:#f1edfc;border-color:#dcd2f3;border-radius:16px}
/* Layout safety for long English/Arabic copy and narrow touch screens. */
.workspace,.stage-column,.inspector,.tool-content,.toolbar,.tooth-picker-trigger>span{min-width:0}
.site-credit{line-height:1.8} .site-credit bdi{white-space:nowrap}
@media(min-width:1001px){.navigation{align-self:start;position:sticky;top:0;max-height:100dvh;overflow-y:auto}.workspace-heading{padding:30px}.shell{overflow:clip}}
@media(max-width:1100px){.header-note{display:none}.site-header{gap:16px}.site-header .main-nav{margin-left:0;gap:16px}}
@media(max-width:800px){.work-grid,.assembly-grid{display:flex;flex-direction:column}.inspector{border-inline-start:0;border-top:1px solid var(--line)}.assembly-grid .stage{height:460px;min-height:460px}}
@media(max-width:700px){
 .header,.site-header{padding:10px 16px;min-height:76px;gap:12px}
 .logo .brand-mark,.brand .brand-mark{width:42px;height:42px}.brand-word{font-size:28px}.brand-domain{font-size:10px;letter-spacing:1.4px}
 .header-actions{gap:6px}.header-actions button{padding:9px 11px;min-height:44px}
 main{padding:12px}.shell{border-radius:16px}.workspace-heading{padding:22px 18px}.workspace-heading h1{font-size:27px}
 .workspace-heading p{font-size:14px}.workspace-heading .eyebrow{font-size:9px;letter-spacing:.8px}
 .mobile-tool-bar{gap:8px}.mobile-tool-bar>span{font-size:12px;text-align:end}
 .nav-item{min-height:48px;font-size:13px}.navigation.is-open{padding:16px 12px}
 .toolbar{padding:14px 16px}.tooth-picker-trigger{max-width:100%;flex-wrap:wrap}.tooth-picker-trigger>span:nth-child(2){flex:1}.tooth-picker-trigger small{font-size:12px;line-height:1.5}
 .stage{height:440px;min-height:440px}.stage-label{max-width:calc(100% - 160px);font-size:9px;left:12px}.focus-toggle{right:12px;min-height:44px;padding:8px 10px}.stage-actions{top:80px}
 .stage-bottom{max-width:calc(100% - 80px);font-size:12px;line-height:1.5}
 .controls-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:6px}
 .controls-bar button{min-height:44px;font-size:12px;white-space:normal;line-height:1.4;padding:10px 6px;border:1px solid var(--line)}
 .controls-bar button.active{border-color:#399781}.help-bar{font-size:11px;padding:10px 14px}
 .inspector p,.inspector label.control,.tool-content>.lead{font-size:14px}.inspector h3{font-size:15px}
 .text-field,select.field,.search input{font-size:16px}.check-label{min-height:44px}.choice-row button{min-height:44px}
 .assembly-system-tabs strong{font-size:14px}.assembly-system-tabs small{font-size:12px}.assembly-system-tabs .assembly-type{font-size:10px}
 .assembly-system-tabs>button{min-height:128px}.assembly-system-tabs small{overflow-wrap:anywhere}
 .assembly-introduction{font-size:14px}.assembly-part-row>label{width:44px;flex-shrink:0}
 .assembly-modes button{min-height:44px}.assembly-reference-list small,.assembly-part-detail small{font-size:12px}
 .studio-footer{font-size:12px;gap:8px;padding:20px 4px}.site-credit{font-size:12px}
 .focus-stage{inset:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .focus-stage .stage{min-height:180px!important}.focus-stage .controls-bar{display:flex;flex-wrap:wrap}.focus-stage .controls-bar button{flex:1;min-width:60px;font-size:11px;padding:8px 5px}
 .site-header .learning-button{min-height:44px}.primary-button{min-height:44px}
 .viewer-actions button,.zoom-controls button,.view-presets button,.detail-tabs button,.layer-options button{min-height:44px}
}
@media(max-width:380px){.header{padding-inline:12px}.brand-word{font-size:25px}.logo .brand-mark{width:38px;height:38px}.logo{gap:6px}.brand-domain{font-size:9px}.header-actions button{font-size:12px}.navigation.is-open{grid-template-columns:1fr}.nav-group:first-child{grid-template-columns:1fr 1fr}.site-credit bdi{white-space:normal}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.header-actions .landing-link{font-size:12px;font-weight:600;text-underline-offset:4px;min-height:44px;display:inline-flex;align-items:center;padding:8px}
@media(max-width:600px){.header{flex-wrap:wrap}.header-actions{gap:4px}.header-actions .landing-link{font-size:11px;padding:6px}.header-actions{margin-inline-start:auto}}
