/* Shared shell contract v1: keep page-specific selectors out of this file.
   See website/architecture/site-shell.md and the CI contract tests. */
html { scrollbar-gutter: stable; }
.skip-link { position: absolute; top: -100px; left: 24px; padding: 12px 20px; border-radius: 8px; background: var(--text); color: var(--bg); z-index: 2; }
.skip-link:focus { top: 12px; }
.app-header { display: flex; height: 60px; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 24px; padding: 0 32px; }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; white-space: nowrap; }
.workspace-label { width: 11ch; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
.logo { position: relative; width: 89.36px; height: 32px; flex: 0 0 89.36px; }
.logo-artwork { position: absolute; top: 0; left: 0; transform: scale(.4); transform-origin: top left; }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; }
.webring { display: flex; flex-shrink: 0; align-items: center; width: 344px; height: 36px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); border-radius: 8px; }
.webring a { display: flex; align-items: center; justify-content: center; height: 100%; }
.ring-neighbor { flex: 1; min-width: 0; padding: 0 12px; gap: 6px; }
.ring-neighbor span:not(.icon) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-index { flex: 0 0 88px; color: var(--muted); }
.webring a:hover { color: var(--accent); background: var(--raised); border-radius: 8px; }
.editor-tabs { display: flex; align-items: center; min-height: 45px; padding: 0 32px; background: var(--side); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.editor-tab { display: flex; align-items: center; height: 44px; color: var(--muted); white-space: nowrap; }
.editor-tab-link { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 20px; }
.editor-tab:has(.tab-close-form) .editor-tab-link { padding-right: 4px; }
.editor-tab.active { background: var(--bg); color: var(--text); }
.editor-tab:hover { color: var(--text); }
.tab-close-form { display: flex; margin: 0 12px 0 0; }
.tab-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.tab-close:hover { background: var(--raised); }
.app-header .icon-button { width: 44px; height: 44px; }

@media (min-width: 720px) and (max-width: 999px) {
    .app-header, .editor-tabs { padding-left: 24px; padding-right: 24px; }
    .workspace-label, .header-language { display: none; }
    .header-actions { gap: 12px; }
}

@media (max-width: 719px) {
    .brand, .header-language, .header-github, .desktop-theme, .editor-tabs { display: none; }
    .app-header { height: 69px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
    .header-actions { width: 100%; }
    .webring { width: 100%; height: 44px; }
    .ring-neighbor { gap: 4px; padding: 0 6px; }
    .ring-previous { min-width: 94px; }
    .ring-next { min-width: 102px; }
    .ring-index { flex-basis: 76px; }
    .webring .icon { --icon-size: 12px; }
}
