/* Compact source chooser; existing header navigation and sync remain available. */
.header{position:relative;z-index:9;background:var(--paper);gap:20px}
.header-sources{flex:none}
.header-sources>summary{display:flex;align-items:center;justify-content:center;gap:9px;min-height:38px;padding:9px 14px;list-style:none;cursor:pointer;white-space:nowrap;font-size:12px}
.header-sources>summary::-webkit-details-marker{display:none}
.header-sources>summary:focus-visible{outline:2px solid #71664d;outline-offset:4px}
.header-sources[open]>summary{background:var(--ink);border-color:var(--ink);color:var(--sheet)}
.source-panel-chevron{font-size:14px;line-height:1}
.header-sources[open] .source-panel-chevron{transform:rotate(180deg)}
.header-sources>.source-panel{position:absolute;right:var(--gutter);top:calc(100% - 5px);width:min(640px,calc(100vw - 2 * var(--gutter)));max-height:calc(100dvh - 110px);overflow:auto;overscroll-behavior:contain;padding:22px;border:1px solid var(--line);border-radius:14px;background:var(--sheet);box-shadow:0 16px 48px #25252526;scrollbar-width:thin}
.source-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.source-panel-heading h2{margin:0;font-size:19px;font-weight:500;letter-spacing:-.025em}
.source-panel-heading .plain{font-size:24px;width:32px;height:32px;display:grid;place-items:center;line-height:1;padding:0;border-radius:50%}
.source-panel-heading .plain:hover{background:var(--paper)}
.header-sources .project-destination{margin:0 0 16px;padding:9px 11px;border-radius:7px;background:var(--paper);font-size:11px;justify-content:space-between}
.header-sources .project-destination span{min-width:0}
.header-sources .project-destination button{flex:none}
.header-sources .source-form>label{font-size:9px;color:var(--muted);line-height:1.5;margin-bottom:9px}
.header-sources .source-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.header-sources .source-controls input{width:100%;height:40px;background:var(--paper);border-radius:6px}
.header-sources .source-controls .pill{margin:0;min-height:40px;padding:10px 17px;font-size:12px}
.header-sources #defaultSource{grid-column:1/-1;justify-self:start;font-size:10px;padding:7px 12px}
.header-sources .source-help{margin-top:14px}
.header-sources .source-help>summary{font-size:11px;color:var(--muted);cursor:pointer}
.header-sources .source-form #sourceHelp{font-size:11px;line-height:1.6;margin:8px 0 0}
.header-sources #sourceStatus,.header-sources #projectStatus{font-size:12px;overflow-wrap:anywhere;line-height:1.5;margin:14px 0 0}
.header-sources .local-source-controls{border-top:1px solid var(--line);padding-top:16px;margin-top:18px;gap:10px}
.header-sources .local-source-controls .outline{min-height:38px;background:var(--paper)}
.header-sources .local-source-controls span{font-size:10px}
.main>.toolbar{border-top:0}
@media(min-width:1101px){.header-source{min-width:0;max-width:18%}.header .descriptor{margin-left:8px}.header-sync .sync-state{max-width:190px}}
@media(min-width:721px) and (max-width:1100px){.header{gap:12px}.header-sync .sync-state{max-width:170px}.header-sources>summary{font-size:11px;padding-inline:12px}}
@media(max-width:720px){
 .header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;height:auto;align-items:center}
 .header .brand{grid-area:1/1;min-width:0;width:min(135px,100%)}
 .header .brand img{display:block;width:100%;height:auto}
 .header #headerSourceLink{grid-area:3/1/4/-1;justify-self:end;margin:0}
 .header-sources{grid-area:1/2;margin:0}
 .header-sync{grid-area:2/1/3/-1;width:100%;min-width:0;margin:0;gap:8px}
 .header-sync .sync-state{flex:1;min-width:0;max-width:none;font-size:10px;text-align:left;white-space:normal;overflow-wrap:normal;word-break:normal}
 .header-sync #refresh{flex:none}
 .header-sources>summary{min-height:38px;padding:8px 12px;font-size:11px}
 .header-sources>.source-panel{right:12px;width:calc(100vw - 24px);padding:18px;max-height:calc(100dvh - 145px);border-radius:12px}
 .header-sources .source-controls input{font-size:16px}
 .header-sources .source-controls .pill{padding:10px 12px;font-size:11px}
}

/* Keep every header status on one line; use available width before truncating. */
.header-sync{flex-shrink:1;min-width:0}
.header-sync .sync-state{min-width:0;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal}
.header-source{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Optical alignment of the two uppercase lines with the logo artwork. */
@media(min-width:1101px){.header .descriptor{align-self:center;transform:translateY(2px)}}
