:root{--marga-orange:#eb5e15;--accent:#eb5e15;--ui-accent:#eb5e15;accent-color:#eb5e15}
#app .topbar .brand{display:flex;align-items:center;gap:12px;margin-right:20px;flex-direction:row;flex-shrink:0;position:static}
/* Account action follows the same compact rounded rectangles as the header tools. */
#app .topbar #logout{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:none;height:40px;padding:9px 14px;border:1px solid var(--ui-border,#dadada);border-radius:8px;background:var(--ui-raised,#fff);color:var(--ui-text,#333);font-family:inherit;font-size:13px;font-weight:600;line-height:20px;white-space:nowrap;transition:background-color .18s,color .18s,border-color .18s}
#app .topbar #logout:is(:hover,:focus-visible){background:#eb5e15;border-color:#eb5e15;color:#202020}
#app .topbar #logout:focus-visible{outline:2px solid #eb5e15;outline-offset:3px}
html.admin-smartphone #app .topbar #logout:is(:hover,:focus-visible){background:#eb5e15;border-color:#eb5e15;color:#202020}
@media(prefers-reduced-motion:reduce){#app .topbar #logout{transition:none}}
#app .topbar .brand .marga-brand-button,button.marga-brand-button{border:0;background:transparent;padding:0;border-radius:0;display:inline-flex;align-items:center;box-shadow:none;flex:none}
.marga-brand-button img{display:block;width:176px;height:auto;max-width:100%;filter:none;mix-blend-mode:normal}
#app .topbar .brand .platform-version{position:static;margin:0;font-size:11px;font-weight:500;color:#777;padding:4px 0;background:none;border:0}
#app .topbar .brand .marga-brand-button:hover{opacity:.72;background:transparent}
.marga-brand-button:focus-visible{outline:2px solid #eb5e15;outline-offset:7px}
html[data-theme=dark] #app .topbar .marga-brand-button img{filter:invert(1)}
#app .demo-band{font-size:10px}.marga-kicker{font-size:10px;font-weight:700;letter-spacing:2px}


/* Sign-in: graphic composition, ordinary functioning form. */
#app main.login{min-height:100svh;display:grid;grid-template-columns:1.08fr 1fr;margin:0;padding:0}
#app .marga-login-brand{background:#191919;color:#fff;position:relative;overflow:hidden;min-height:100svh;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;padding:clamp(28px,4.6vw,80px)}
.marga-login-top{display:flex;gap:16px;align-items:center;position:relative;z-index:1}.marga-login-top .marga-brand-button img{width:210px;filter:invert(1)}.marga-login-top .platform-version{color:#aaa}
.marga-login-editorial{position:relative;z-index:1;padding:65px 0 55px}.marga-login-editorial .marga-kicker{color:#b1b1b1;font-size:10px}
#app .marga-login-editorial h1{font-size:clamp(46px,5.3vw,88px);font-weight:760;line-height:1.02;letter-spacing:-.06em;margin:26px 0 27px;max-width:none;color:#fff}
#app .marga-login-editorial h1 span{color:#eb5e15}#app .marga-login-editorial p{font-size:14px;line-height:1.7;color:#bdbdbd;margin:0}
.marga-login-bottom{display:flex;align-items:center;gap:22px;position:relative;z-index:1}.marga-login-bottom img{width:126px;height:auto}.marga-login-bottom span{border-left:1px solid #555;padding-left:22px;font-size:10px;color:#aaa;line-height:1.7}

#app .login-main{background:#f8f7f3;color:#202020;padding:50px;display:flex;align-items:center;justify-content:center;min-width:0}
#app .login-main form{width:100%;max-width:345px;margin:0}.marga-login-form-mark{font-size:45px;font-weight:850;letter-spacing:-4px;line-height:1;margin-bottom:48px}.marga-login-form-mark span{color:#eb5e15}
#app .login-main .eyebrow{font-size:10px;letter-spacing:1.9px;font-weight:700;color:#777;margin-bottom:14px}#app .login-main h2{font-size:30px;font-weight:680;letter-spacing:-1px;line-height:1.18;margin:0 0 16px}#app .login-main .muted{color:#777;line-height:1.6;font-size:13px}
#app .login-main label{font-size:12px;font-weight:550;margin:24px 0 8px;display:block}#app .login-main input{background:transparent;border:1px solid #cbc9c3;border-radius:7px;min-height:47px;font-size:14px;color:#222}#app .login-main input:focus{outline:2px solid #eb5e15;outline-offset:2px}
#app .login-main .primary{width:100%;padding:14px;margin-top:25px;background:#eb5e15;border-color:#eb5e15;color:#fff}#app .login-main .primary:hover{filter:brightness(.94)}#app .login-main .tiny{font-size:11px;line-height:1.7}

html[data-theme=dark] #app .login-main{background:#222426;color:#f3f3f3}html[data-theme=dark] #app .login-main input{color:#eee;border-color:#555}html[data-theme=dark] #app .login-main .muted,html[data-theme=dark] #app .login-main .eyebrow{color:#b1b1b1}
/* Independent dialog keeps the current project and any already-open form intact. */
:root body dialog.marga-about{width:min(780px,calc(100vw - 32px));max-width:780px;max-height:calc(100svh - 32px);padding:26px 30px 22px;border:0;border-radius:16px;background:#faf9f5;color:#202020;box-shadow:0 30px 100px #0003;overflow:auto;overscroll-behavior:contain}
dialog.marga-about::backdrop{background:#10101080;backdrop-filter:blur(7px)}
.marga-about-head{display:flex;justify-content:space-between;align-items:center}.marga-about-head .marga-kicker{color:#79766d;font-size:9px;letter-spacing:2px}.marga-about .site-close-button{background:transparent!important;border:1px solid #c9c7c0!important;color:#202020!important;font-size:11px!important;padding:7px 11px!important}
.marga-about-lockup{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin:27px 0 26px}.marga-about-lockup>img{width:310px;max-width:65%;height:auto}.marga-about-lockup>span{font-size:12px;line-height:1.5;font-weight:500}
.marga-origin{display:grid;grid-template-columns:210px 1fr;gap:30px;padding:24px 0;border-top:1px solid #d9d6cd;border-bottom:1px solid #d9d6cd}
.marga-origin figure{margin:0;position:relative;display:flex;flex-direction:column;justify-content:end}.marga-origin figure>img{width:100%;height:242px;object-fit:cover;object-position:50% 20%;filter:grayscale(1);display:block}.marga-origin figcaption{font-size:9px;line-height:1.5;padding-top:9px;font-weight:600}.marga-origin figcaption span{color:#777;font-weight:400}
.marga-origin-copy{position:relative;padding-top:0}.marga-anniversary{display:flex;align-items:center;gap:18px;color:#eb5e15;margin:0 0 15px}.marga-anniversary>span{font-size:10px;letter-spacing:1.2px}.marga-anniversary>strong{font-size:39px;line-height:1;font-weight:760;letter-spacing:-2px}.marga-anniversary>strong>span{font-size:14px;letter-spacing:-.4px;margin-left:3px}
.marga-origin h2{font-size:27px;line-height:1.08;letter-spacing:-1px;margin:0 0 14px;font-weight:700}.marga-origin p{font-size:12px;line-height:1.6;margin:0 0 10px;color:#5a574f}.marga-origin p strong{color:#202020;font-weight:600}.marga-history-source{font-size:9px;color:#6b675e;text-decoration:none;border-bottom:1px solid #c7c1b5;padding-bottom:3px}
.marga-letters{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:21px 0 22px}.marga-letters>div{display:flex;flex-direction:column;gap:9px}.marga-letters strong{font-size:35px;font-weight:800;line-height:1;color:#eb5e15;letter-spacing:-1px}.marga-letters span{font-size:10px;font-weight:600}.marga-letters small{display:block;font-size:10px;font-weight:400;line-height:1.7;color:#777}
.marga-about-foot{border-top:1px solid #d9d6cd;padding-top:15px;font-size:9px;line-height:1.7;color:#777}.marga-about-foot span{display:block}.marga-about-foot b{font-weight:600;color:#45413b}
html[data-theme=dark] body dialog.marga-about{background:#232426;color:#eee}.marga-about :focus-visible{outline:2px solid #eb5e15;outline-offset:3px}html[data-theme=dark] .marga-about-lockup img{filter:invert(1)}html[data-theme=dark] .marga-origin p,html[data-theme=dark] .marga-about-foot,html[data-theme=dark] .marga-origin figcaption span,html[data-theme=dark] .marga-letters small{color:#b6b6b6}html[data-theme=dark] .marga-origin p strong,html[data-theme=dark] .marga-about-foot b{color:#fff}html[data-theme=dark] .marga-about .site-close-button{color:#eee!important;border-color:#555!important}html[data-theme=dark] .marga-origin,html[data-theme=dark] .marga-about-foot{border-color:#454545}html[data-theme=dark] .marga-history-source,html[data-theme=dark] .marga-about-head .marga-kicker{color:#aaa}
@media(max-width:1000px){#app .topbar .brand .marga-brand-button img{width:136px}#app .topbar .brand{margin-right:8px;gap:8px}#app .login-main{padding:32px}.marga-login-bottom{gap:12px}.marga-login-bottom img{width:95px}.marga-login-bottom span{padding-left:12px}}
@media(max-width:680px){#app main.login{grid-template-columns:1fr}#app .marga-login-brand{min-height:auto;padding:30px 28px}.marga-login-top .marga-brand-button img{width:170px}.marga-login-editorial{padding:35px 0}.marga-login-editorial .marga-kicker{font-size:8px}#app .marga-login-editorial h1{font-size:48px;margin:20px 0}.marga-login-bottom{padding-bottom:12px}#app .login-main{padding:40px 28px 85px}.marga-login-form-mark{display:none}.marga-about-lockup>img{width:230px}.marga-about-lockup>span{font-size:9px}:root body dialog.marga-about{padding:20px}.marga-origin{grid-template-columns:110px 1fr;gap:17px;padding:19px 0}.marga-origin figure{justify-content:start}.marga-origin figure>img{height:160px}.marga-origin figcaption{font-size:8px}.marga-origin h2{font-size:22px}.marga-origin p{font-size:11px}.marga-anniversary{gap:10px}.marga-anniversary>strong{font-size:30px}.marga-anniversary>span{font-size:8px}.marga-history-source{font-size:8px}.marga-letters{gap:6px}.marga-letters strong{font-size:27px}.marga-letters span,.marga-letters small{font-size:8px}.marga-about-foot{font-size:8px}}

/* Company signature aligned to the complete header wordmark. */
#app .topbar .brand .marga-brand-button{flex-direction:column;align-items:stretch;width:176px}
#app .topbar .brand .marga-brand-byline{display:block;width:100%;margin:5px 0 0;font-size:10.2px;line-height:1.2;letter-spacing:0;font-weight:400;color:#666;text-align:justify;text-align-last:justify;white-space:nowrap}
html[data-theme=dark] #app .topbar .brand .marga-brand-byline{color:#c4c6ca}
@media(max-width:1000px){#app .topbar .brand .marga-brand-button{width:136px}#app .topbar .brand .marga-brand-byline{font-size:7.9px;margin-top:4px}}

.marga-login-form-mark img{display:block;width:64px;height:64px;object-fit:contain;border-radius:16px}

.marga-login-top .marga-brand-button{flex-direction:column;align-items:stretch;width:210px}
.marga-login-top .marga-brand-byline{display:block;width:100%;margin:6px 0 0;font-size:12.1px;line-height:1.2;letter-spacing:0;font-weight:400;color:#bbb;text-align:justify;text-align-last:justify;white-space:nowrap}
@media(max-width:680px){.marga-login-top .marga-brand-button{width:170px}.marga-login-top .marga-brand-byline{font-size:9.8px;margin-top:5px}}

/* Full-width welcome when no projects have been created. */
#app .project-grid>.welcome-project{grid-column:1/-1;width:100%;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 32px;align-items:center;padding:32px 36px;border-radius:14px}
#app .project-grid>.welcome-project h2{grid-column:1/-1;font-size:26px;line-height:1.25;margin:0}
#app .project-grid>.welcome-project p{max-width:620px;margin:0;line-height:1.6}
#app .project-grid>.welcome-project button{margin:0;white-space:nowrap}
#catalog-palette .catalog-palette-item>.catalog-palette-orb{border-radius:12px}
@media(max-width:680px){#app .project-grid>.welcome-project{grid-template-columns:1fr;padding:24px;gap:16px}#app .project-grid>.welcome-project h2{font-size:22px}#app .project-grid>.welcome-project button{justify-self:start}}

/* Rounded-square material thumbnails, including every right-side inspector palette. */
#app .catalog-palette-orb{border-radius:10px}
.catalog-mini-menu .catalog-mini-option{border-radius:6px}
#inspector input.wall-color-swatch{border-radius:9px}
#inspector .wall-color-swatch::-webkit-color-swatch{border-radius:8px}
#inspector .wall-color-swatch::-moz-color-swatch{border-radius:8px}

#catalog-palette .catalog-palette-caption{inset:0 auto auto 0;display:block;width:92px;height:auto;line-height:14px;text-align:center;white-space:nowrap;transform:none}
