/* One header for the public site, account area and project editors. */
:root{--studio-header-height:72px}
.studio-header{position:sticky;top:0;z-index:20;flex:none;min-height:var(--studio-header-height);border-bottom:1px solid var(--theme-line);background:var(--theme-surface);color:var(--theme-ink);font:500 13px/1.4 system-ui,sans-serif;letter-spacing:0}
.studio-header *{box-sizing:border-box}
.studio-header__inner{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:var(--studio-header-height);max-width:1440px;margin:0 auto;padding:12px 28px}
.studio-header a{text-decoration:none;color:inherit}
.studio-brand{display:inline-flex;align-items:center;gap:10px;flex:none;font-size:17px;letter-spacing:-.6px;white-space:nowrap}
.studio-brand b{font-weight:400}
.studio-brand__mark{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#b9462e;color:#fffaf3;font:600 26px/1 Georgia,serif}
.studio-nav{display:flex;align-items:center;gap:24px;min-width:0}
.studio-nav a{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;font-size:12px}
.studio-nav a:hover,.studio-nav a[aria-current]{color:var(--theme-focus);text-decoration:underline;text-underline-offset:5px}
.studio-header__actions{display:flex;align-items:center;gap:12px;flex:none}
.studio-header .studio-open{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:40px;padding:9px 14px;border:1px solid var(--theme-line);border-radius:7px;white-space:nowrap;font-size:12px}
.studio-header .studio-open:hover{border-color:var(--theme-focus);color:var(--theme-focus)}
.studio-header a:focus-visible{outline:2px solid var(--theme-focus);outline-offset:4px}
[data-account-page] .auth,[data-account-page] .app-shell{min-height:calc(100dvh - var(--studio-header-height))}
[data-account-page] .sidebar{top:var(--studio-header-height)}
[data-account-page] .studio-picker{margin-top:0}
[data-account-page] .topbar{min-height:62px;padding-top:14px;padding-bottom:14px}
[data-project-workspace] body{display:flex;flex-direction:column}
[data-project-workspace] .shell{height:auto;min-height:0;flex:1}
[data-project-workspace] .bar__top{display:flex;min-height:60px;gap:20px}
[data-project-workspace] .bar__top>.brand{display:none}
[data-project-workspace] .project-context{margin-left:auto}
@media(max-width:900px){
  :root{--studio-header-height:112px}
  .studio-header__inner{flex-wrap:wrap;gap:0 16px;padding:8px 24px 0}
  .studio-nav{order:3;width:100%;justify-content:center;gap:28px}
  .studio-header__actions{margin-left:auto}
}
@media(max-width:760px){
  [data-account-page] .auth-story{display:none}
  [data-account-page] .auth-panel{min-height:calc(100dvh - var(--studio-header-height))}
  [data-account-page] .sidebar{display:flex;align-items:stretch;gap:12px}
  [data-account-page] .studio-picker{width:100%;display:flex;align-items:center;gap:12px}
  [data-account-page] .studio-picker select{width:min(260px,100%);margin:0}
  [data-account-page] .studio-picker>.text-button{display:block;white-space:nowrap;font-size:11px}
  [data-account-page] .navigation{flex:none}
  [data-project-workspace] .bar__top{flex-wrap:wrap;gap:10px}
}
@media(max-width:540px){
  .studio-header__inner{padding:8px 14px 0;gap:0 8px}
  .studio-brand{gap:8px;font-size:14px}
  .studio-brand__mark{width:30px;height:30px;font-size:24px}
  .studio-header__actions{gap:5px}
  .studio-header .studio-open{padding:9px 8px;gap:5px;font-size:11px}
  .studio-nav{gap:0;justify-content:space-between}
  .studio-nav a{font-size:11px}
}

.studio-header~.docs-layout>.sidebar{top:calc(var(--studio-header-height) + 24px);max-height:calc(100dvh - var(--studio-header-height) - 24px)}
.docs-layout section[id],.docs-layout main[id],.site-shell section[id]{scroll-margin-top:calc(var(--studio-header-height) + 20px)}
@media(max-width:780px){.studio-header~.docs-layout>.sidebar{max-height:none}}

/* Keep the same brand and controls while giving signed-in pages one quiet row. */
:root:has([data-authenticated]),:root[data-project-workspace]{--studio-header-height:56px}
[data-authenticated] .studio-header__inner,[data-project-workspace] .studio-header__inner{min-height:calc(var(--studio-header-height) - 1px);padding:5px 24px;flex-wrap:nowrap}
[data-authenticated] .studio-nav a[href="/#labs"],[data-authenticated] .studio-nav a[href="/#plan"],
[data-project-workspace] .studio-nav a[href="/#labs"],[data-project-workspace] .studio-nav a[href="/#plan"]{display:none}
[data-authenticated] .studio-nav,[data-project-workspace] .studio-nav{order:0;width:auto;gap:24px}
[data-authenticated] .studio-open{display:none}
@media(max-width:760px){
 [data-authenticated] .studio-header__inner,[data-project-workspace] .studio-header__inner{padding:7px 16px}
 [data-authenticated] .studio-nav,[data-project-workspace] .studio-nav{display:none}
}
