/* The top-left brand and tool menu of every tool page (switcher.js). Uses the page's colour tokens when it has them. */
.ts { position: relative; display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; }
.ts-home { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 650; padding: 4px 6px 4px 2px; border-radius: 8px; }
.ts-home:hover { background: var(--hover, rgba(127,127,127,.12)); }
.ts-home .ts-logo { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.ts-btn { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font: inherit; font-weight: 500; color: var(--muted, #667085); background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.ts-btn span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-btn:hover, .ts-btn[aria-expanded="true"] { color: var(--fg, inherit); border-color: var(--border, rgba(127,127,127,.35)); background: var(--hover, rgba(127,127,127,.08)); }
.ts-btn:focus-visible, .ts-home:focus-visible { outline: 2px solid var(--accent, #635bff); outline-offset: 1px; }
.ts-caret { font-size: .8em; opacity: .8; }
.ts > small { margin-left: auto; }
.ts-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 1000; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto;
  background: var(--panel, var(--card, var(--bg, #fff))); color: var(--fg, #0a2540); border: 1px solid var(--border, rgba(127,127,127,.35)); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 8px; font-weight: 400; font-size: 14px; line-height: 1.4; text-align: left; }
.ts-find { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; margin: 0 0 6px; border-radius: 8px; border: 1px solid var(--border, rgba(127,127,127,.35)); background: var(--bg, transparent); color: inherit; }
.ts-list { display: grid; gap: 2px; }
.ts-item, .ts-all { display: block; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.ts-item[hidden] { display: none; }
.ts-item:hover, .ts-item:focus, .ts-all:hover, .ts-all:focus { background: var(--hover, rgba(127,127,127,.12)); outline: none; }
.ts-item[aria-current="page"] { background: var(--active, rgba(99,91,255,.12)); }
.ts-item[aria-current="page"] .ts-t::after { content: " · open"; color: var(--muted, #667085); font-weight: 400; }
.ts-t { display: block; font-weight: 600; }
.ts-d { display: block; color: var(--muted, #667085); font-size: .9em; }
.ts-all { margin-top: 4px; border-top: 1px solid var(--border, rgba(127,127,127,.25)); border-radius: 0 0 8px 8px; color: var(--accent, #635bff); font-weight: 600; }
.ts-none { color: var(--muted, #667085); padding: 6px 10px; margin: 0; }
/* the bar on simple pages that have no sidebar */
.ts-bar { max-width: 1100px; margin: 0 auto; padding: 4px 0 0; }
.ts-bar .ts { display: inline-flex; }
@media (prefers-color-scheme: dark) { .ts-menu { box-shadow: 0 12px 32px rgba(0,0,0,.5); } }
