/* Sitewide header shell: logo + clickable subject/tool breadcrumb, plus an
   optional tab strip when a service has more than one tool page. Used by
   every service's pages (sorting, compression, control, certificates,
   interactives) instead of each one's old plain .topbar. Deliberately the
   one sitewide shared asset — everything else on this site is a standalone
   per-folder copy, but a single consistent header pattern only works if it
   really is shared. No sound/streak widgets here (unlike
   /arithmetic/games/css/games.css's shell) — those are specific to the
   number-systems games, not meaningful on a sorting visualizer or a
   certificate generator. Scoped under #site-shell-nav so including this on
   a page with its own design system doesn't change that page's own colors. */
#site-shell-nav {
    --primary: #2f66f3;
    --muted: #667085;
    --border: #e3e7ef;
    --border-strong: #cdd4e0;
    --surface: #ffffff;
    --ink: #0f1b2d;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    flex: 0 0 auto;
}

#site-shell-nav .shell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
#site-shell-nav .shell-logo { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
#site-shell-nav .shell-logo span { color: var(--primary); }
#site-shell-nav .shell-subtitle { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
#site-shell-nav .shell-subtitle a { color: var(--muted); text-decoration: none; }
#site-shell-nav .shell-subtitle a:hover { color: var(--primary); text-decoration: underline; }
#site-shell-nav .shell-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#site-shell-nav .shell-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-size: 15px;
}
#site-shell-nav .shell-icon-btn:hover { border-color: var(--primary); color: var(--primary); }

#site-shell-nav .shell-tabs {
    display: flex;
    gap: 2px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
#site-shell-nav .shell-tab {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
#site-shell-nav .shell-tab .num { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--border-strong); }
#site-shell-nav .shell-tab:hover { color: var(--ink); }
#site-shell-nav .shell-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
#site-shell-nav .shell-tab.active .num { color: var(--primary); }

@media (max-width: 700px) {
    #site-shell-nav .shell-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 16px; overflow-x: visible; }
    #site-shell-nav .shell-tab { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; white-space: normal; }
    #site-shell-nav .shell-tab.active { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
}
