/* Khoshroo Academy — brushed gold, midnight navy and warm porcelain. */
:root{--brand-navy:#0d1728;--brand-gold:#c5a66b;--brand-ground:#f5f3ee;--brand-surface:#fffdf8;--brand-soft:#ece8df;--brand-ink:#17263c;--brand-muted:#5c6574;--brand-border:#b3a58b66;--brand-accent:#263d5b;--brand-on-accent:#fffdf8;
--ground:var(--brand-ground)!important;--canvas:var(--brand-soft)!important;--surface:var(--brand-surface)!important;--shell:var(--brand-surface)!important;--workspace:var(--brand-ground)!important;--card:var(--brand-surface)!important;--panel:var(--brand-surface)!important;--panel-soft:var(--brand-soft)!important;--soft:var(--brand-soft)!important;--field:var(--brand-surface)!important;--bg:var(--brand-ground)!important;--text:var(--brand-ink)!important;--ink:var(--brand-ink)!important;--muted:var(--brand-muted)!important;--line:var(--brand-border)!important;--accent:var(--brand-accent)!important;--accent-ink:var(--brand-on-accent)!important;--on-accent:var(--brand-on-accent)!important;--focus:#9a783d!important;--jade:var(--brand-accent)!important;--green:var(--brand-accent)!important;--gold:var(--brand-gold)!important;--matte-gold:var(--brand-gold)!important;--bone:#f4efe4!important;--charcoal:var(--brand-navy)!important;--lavender:#84632c!important;--teal:#84632c!important;--button:var(--brand-accent)!important;--button-ink:var(--brand-on-accent)!important;--wash:var(--brand-soft)!important;--available:#c5a66b!important;--gold-soft:#e9deca!important;--glass:#fffdf8f5!important;--menu:var(--brand-surface)!important;--glow-violet:#b9955010!important;--glow-teal:#1c365212!important;
--a-bg:var(--brand-ground)!important;--a-surface:var(--brand-surface)!important;--a-panel:var(--brand-surface)!important;--a-side:var(--brand-soft)!important;--a-soft:var(--brand-soft)!important;--a-ink:var(--brand-ink)!important;--a-muted:var(--brand-muted)!important;--a-accent:var(--brand-accent)!important;--a-accent-ink:var(--brand-on-accent)!important;--a-line:var(--brand-border)!important;--a-hover:#e8e0d2!important;--a-bubble:#eae6dd!important;--a-shadow:0 20px 70px #0d172812!important;color-scheme:light}
:root[data-theme=night]{--brand-ground:#0d1728;--brand-surface:#152238;--brand-soft:#1c2d45;--brand-ink:#f2ecdf;--brand-muted:#b8c2d0;--brand-border:#c5a66b40;--brand-accent:#cfb47b;--brand-on-accent:#101d30;--canvas:#091321!important;--glass:#101d30f5!important;--gold-soft:#273750!important;--lavender:#cfb47b!important;--teal:#cfb47b!important;--focus:#ddc48e!important;--glow-violet:#c5a66b0b!important;--glow-teal:#234a7320!important;--a-hover:#263b57!important;--a-bubble:#23344c!important;--a-shadow:0 20px 70px #02091266!important;color-scheme:dark}
body{background-color:var(--brand-ground);color:var(--brand-ink)}a,button,input,select,textarea{transition:background-color .18s,color .18s,border-color .18s,box-shadow .18s}button:focus-visible,a:focus-visible{outline-color:var(--focus)}
html body dialog[open]{background:var(--brand-surface)!important;color:var(--brand-ink);backdrop-filter:none!important}html[data-theme=night] body dialog[open]{background:#152238!important}
.site-header .brand,.footer-brand .brand,.portal-brand,.panel-brand,.auth-brand{display:flex!important;align-items:center;justify-content:center;min-width:76px;font-size:0!important;gap:0!important;background:none!important}
.site-header .brand>*,.footer-brand .brand>*,.portal-brand>*,.panel-brand>*,.auth-brand>*{display:none!important}
.site-header .brand:before,.footer-brand .brand:before,.portal-brand:before,.panel-brand:before,.auth-brand:before{content:'';display:block;width:86px;height:86px;background:url('/preview/assets/academy-emblem.webp?build=fc99d780ac6d9c8e06f9') center/contain no-repeat;flex:none;filter:drop-shadow(0 2px 3px #0d172820)}
.footer-brand .brand:before{width:140px;height:140px}.footer-word,.menu-wordmark{display:none!important}.site-header{padding-block:5px!important}.site-header .brand{min-width:100px}.portal-brand:before,.panel-brand:before{width:78px;height:78px}.portal-side,.panel-sidebar{background:var(--brand-soft)!important}.portal-link:hover,.panel-sidebar a:hover{background:var(--a-hover)!important;color:var(--brand-ink)!important}.a-btn.primary:hover,.primary:hover{filter:brightness(1.08)}
.about-intro,.about-manifesto,.intro-strip{background-color:var(--brand-surface)}
html[data-theme=night] .about-intro,html[data-theme=night] .about-manifesto{background:#152238!important}
@media(max-width:600px){.site-header .brand:before{width:68px;height:68px}.site-header .brand{min-width:70px}.site-header{padding-block:3px!important}.footer-brand .brand:before{width:122px;height:122px}}
@media(prefers-reduced-motion:reduce){a,button,input,select,textarea{transition:none}}

/* Date confirmation follows the same contrast pair as primary brand buttons. */
html body .jalali-picker .jalali-confirm{background:var(--brand-accent)!important;color:var(--brand-on-accent)!important}
html body .jalali-picker .jalali-confirm:hover:not(:disabled){filter:brightness(1.08)}

/* About: one closing action, readable editorial flow in both languages. */
.about-editorial .about-page-intro .about-disciplines{font-size:15px;line-height:2;color:var(--brand-accent)}
.about-editorial .about-values>h2{margin-bottom:28px}
.about-editorial .about-values .detail-card h3{font-size:21px;line-height:1.8;min-height:0}
.about-editorial .about-values .detail-card p{font-size:16px;line-height:2.2}
.about-editorial .about-ai h2{font-size:clamp(24px,2.6vw,34px);line-height:1.9}
.about-editorial .about-boundary{padding-top:20px;border-top:1px solid var(--line);color:var(--muted)}
.about-editorial .about-page-closing{background:var(--brand-surface);margin-top:64px}
.about-editorial .about-page-closing>div{align-items:center;gap:14px}
.about-editorial .about-page-closing .about-primary{min-height:54px;padding-inline:30px;background:var(--brand-accent);color:var(--brand-on-accent)}
.about-editorial .about-page-closing .about-secondary{min-height:48px;padding-inline:24px;background:transparent;border-color:var(--line);color:var(--ink)}
@media(max-width:600px){.about-editorial .about-page-closing{padding:30px 22px}.about-editorial .about-page-closing>div{flex-direction:column;gap:12px}.about-editorial .about-page-closing .button{width:100%;font-size:14px}.about-editorial .about-values .detail-card p{font-size:16px}.about-editorial .about-page-intro .about-disciplines{font-size:14px}}

.about-editorial .about-narrative{background:var(--brand-surface);border-color:var(--line);box-shadow:none}
.about-page.about-editorial .about-narrative h2{color:var(--ink)}
.about-page.about-editorial .about-narrative .narrative-copy p{color:var(--ink)}
.about-page.about-editorial .about-narrative .narrative-copy .about-boundary{color:var(--muted)}

/* Approved complete wordmark: footer only. */
.footer-brand .brand:before{background-image:url("/preview/assets/academy-footer-transparent.png?build=fc99d780ac6d9c8e06f9")!important;width:300px!important;height:300px!important;border-radius:18px;filter:none!important}.footer-brand .brand{justify-content:flex-start!important;max-width:100%}@media(max-width:600px){.footer-brand .brand{justify-content:center!important}.footer-brand .brand:before{width:260px!important;height:260px!important}}

.footer-brand .brand:before{background-color:transparent!important;border-radius:0!important;box-shadow:none!important}

/* Night palette sampled from the approved reference image (#020528). Day palette is unchanged. */
:root[data-theme=night]{--brand-navy:#020528;--brand-ground:#020528;--brand-surface:#0b0e32;--brand-soft:#13173c;--brand-on-accent:#020528;--canvas:#020528!important;--glass:#0b0e32f5!important;--gold-soft:#20244b!important;--glow-violet:#c5a66b07!important;--glow-teal:#252a680c!important;--a-hover:#20244b!important;--a-bubble:#171b40!important;--a-shadow:0 20px 70px #01021b66!important}
html[data-theme=night] body dialog[open],html[data-theme=night] .about-intro,html[data-theme=night] .about-manifesto{background:var(--brand-surface)!important}

/* Header controls stay together at the physical left. */
html body[data-runtime=production] .admin-topbar.panel-topbar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
html body[data-runtime=production] .admin-topbar.panel-topbar>span{flex:1;min-width:0}
html body[data-runtime=production] .admin-topbar.panel-topbar>div{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin:0!important}
html body[data-runtime=production] .admin-topbar.panel-topbar>.profile-icon-button{flex:0 0 auto;margin:0!important}
html[dir=ltr] body[data-runtime=production] .admin-topbar.panel-topbar>div{order:-2}
html[dir=ltr] body[data-runtime=production] .admin-topbar.panel-topbar>.profile-icon-button{order:-1}
html body[data-runtime=production] .portal-topbar{display:flex;gap:8px;align-items:center;flex-wrap:nowrap}
html body[data-runtime=production] .portal-topbar>span{flex:1;min-width:0}
html body[data-runtime=production] .portal-topbar>div{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin:0!important}
html[dir=ltr] body[data-runtime=production] .portal-topbar>div{order:-1}
html body[data-runtime=production] :is(.page-actions,.heading-actions,.settings-save){display:flex;gap:8px;align-items:center;justify-content:flex-end}
html body[data-runtime=production] .settings-save{justify-content:flex-start;direction:ltr}
@media(max-width:600px){html body[data-runtime=production] .admin-topbar.panel-topbar>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}html body[data-runtime=production] .admin-topbar.panel-topbar>div{gap:6px}}

html body[data-runtime=production] .chat-topbar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
html body[data-runtime=production] .chat-topbar>.chat-topbar-title{flex:1;min-width:0}
html body[data-runtime=production] .chat-topbar>.chat-tools{display:flex;align-items:center;gap:8px;margin:0!important;flex:0 0 auto}
html body[data-runtime=production] .chat-topbar>.profile-icon-button{margin:0!important;flex:0 0 auto}
html[dir=ltr] body[data-runtime=production] .chat-topbar>.chat-tools{order:-2}
html[dir=ltr] body[data-runtime=production] .chat-topbar>.profile-icon-button{order:-1}
html body[data-runtime=production] .panel-topbar>.panel-context{flex:1;min-width:0}
html body[data-runtime=production] .panel-topbar>.top-tools{display:flex;align-items:center;gap:8px;margin:0!important;flex:0 0 auto}
html[dir=ltr] body[data-runtime=production] .panel-topbar>.top-tools{order:-1}
