/* HeyData product shell: one top bar + one left rail on every product surface (/live, /jobs, /capture, /app).
   Built on /hd.css tokens and the three themes from /theme.js. Markup is drawn by /shell.js. */
:root { --sh-top: 56px; --sh-rail: 240px; --sh-rail-mini: 64px; }
body.sh { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
body.sh.app { display: block; }

/* top bar */
.sh-top { position: sticky; top: 0; z-index: 1000; height: var(--sh-top); display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sh-top a.brand { font-size: 18px; gap: 10px; margin-right: 10px; flex: none; }
.sh-top a.brand .mark { width: 26px; height: 26px; border-radius: 8px; }
.sh-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tabs a { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; text-decoration: none; font: 400 15px var(--sans); color: var(--ink-2); }
.sh-tabs a:hover { color: var(--ink); background: var(--surface); }
.sh-tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); border-radius: 8px 8px 0 0; }
.sh-search { flex: 1 1 auto; max-width: 420px; margin: 0 auto; position: relative; }
.sh-search input { width: 100%; height: 36px; border-radius: 999px; border: 1px solid var(--line-2, rgba(128,128,128,.3)); background: var(--surface); color: var(--ink); padding: 0 12px 0 36px; font: 14px var(--sans); }
.sh-search input:focus { outline: none; border-color: var(--ink-3); background: var(--bg); }
.sh-search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.sh-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2, rgba(128,128,128,.35)); background: transparent; color: var(--ink); font: 500 14px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.sh-btn:hover { border-color: var(--ink-3); }
.sh-btn.go { background: var(--btn-bg, var(--accent)); border-color: var(--btn-bg, var(--accent)); color: var(--btn-ink, var(--on-accent)); }
.sh-btn.go:hover { opacity: .88; }
[data-theme="original"] .sh-btn.go { background: #e11d48; border-color: #e11d48; color: #fff; }
.sh-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.sh-icon:hover { background: var(--surface); color: var(--ink); }
.sh-icon svg { width: 18px; height: 18px; }
.sh-top .hd-theme { width: 34px; height: 34px; border-radius: 50%; }
.sh-av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 13px var(--sans); background: #3a3a40; color: #fff; text-decoration: none; }
.sh-burger { display: none; }

/* layout: rail + main */
.sh-body { display: grid; grid-template-columns: var(--sh-rail) minmax(0, 1fr); min-height: calc(100vh - var(--sh-top)); }
body.sh-mini .sh-body { grid-template-columns: var(--sh-rail-mini) minmax(0, 1fr); }
body.sh-norail .sh-body { grid-template-columns: minmax(0, 1fr); }
body.sh-norail .sh-rail { display: none; }
.sh-rail { position: sticky; top: var(--sh-top); height: calc(100vh - var(--sh-top)); overflow-y: auto; scrollbar-width: thin; background: var(--surface); border-right: 1px solid var(--line); padding: 10px 8px 24px; }
[data-theme="original"] .sh-rail, [data-theme="dark"] .sh-rail { background: color-mix(in srgb, var(--bg) 70%, #1a1a1d); }
.sh-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; }
.sh-rail-head b, .sh-sec > b { font: 400 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sh-sec { margin-top: 8px; }
.sh-sec > b { display: block; padding: 10px 8px 6px; }
.sh-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.sh-item:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.sh-item[aria-current="page"] { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.sh-item .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--sans); color: #fff; background: #3a3a40; overflow: hidden; }
.sh-item .ic svg { width: 18px; height: 18px; }
.sh-item .ic.plain { background: transparent; color: var(--ink-2); border-radius: 8px; }
.sh-item .tx { min-width: 0; display: grid; line-height: 1.25; }
.sh-item .tx b { font: 500 14px var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-item .tx span { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-item .rt { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sh-item .rt.off { color: var(--ink-3); }
.sh-live { width: 8px; height: 8px; border-radius: 50%; background: #ff2d55; flex: none; display: inline-block; }
.sh-empty { padding: 6px 8px; font-size: 13px; color: var(--ink-3); }
body.sh-mini .sh-item { grid-template-columns: 32px; justify-content: center; }
body.sh-mini .sh-item .tx, body.sh-mini .sh-item .rt, body.sh-mini .sh-sec > b, body.sh-mini .sh-rail-head b, body.sh-mini .sh-empty { display: none; }
body.sh-mini .sh-rail-head { justify-content: center; }
.sh-main { min-width: 0; padding: 24px clamp(16px, 2.6vw, 32px) 64px; outline: none; }
.sh-main.flush { padding: 0; }

/* shared product kit used on public product pages */
.sh-h1 { font: 400 clamp(26px, 2.6vw, 36px)/1.12 var(--sans); letter-spacing: -.03em; margin: 0; }
.sh-h2 { font: 400 22px/1.2 var(--sans); letter-spacing: -.02em; margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.sh-h2 a { font: 500 14px var(--sans); color: var(--hot, var(--accent)); text-decoration: none; margin-left: auto; }
[data-theme="light"] .sh-h2 a { color: var(--ink-2); }
.sh-sub { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.sh-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.sh-chips::-webkit-scrollbar { display: none; }
.sh-chip { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: 400 13px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.sh-chip:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.sh-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.sh-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: 400 12px var(--sans); text-decoration: none; white-space: nowrap; }

@media (max-width: 1000px) { .sh-search { max-width: 260px; } }
@media (max-width: 900px) {
  .sh-body, body.sh-mini .sh-body { grid-template-columns: minmax(0, 1fr); }
  .sh-rail { position: fixed; z-index: 60; left: 0; top: var(--sh-top); bottom: 0; height: auto; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .25s ease; background: var(--bg); }
  body.sh-mini .sh-item { grid-template-columns: 32px minmax(0, 1fr) auto; justify-content: stretch; }
  body.sh-mini .sh-item .tx, body.sh-mini .sh-item .rt, body.sh-mini .sh-sec > b, body.sh-mini .sh-empty { display: revert; }
  body.sh-open .sh-rail { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.45); }
  body.sh-open .sh-scrim { display: block; position: fixed; inset: var(--sh-top) 0 0 0; z-index: 55; background: rgba(0,0,0,.45); }
  .sh-burger { display: inline-grid; }
  .sh-collapse { display: none; }
  .sh-search { display: none; }
  .sh-top a.brand { margin-right: 2px; }
}
/* phone: tabs, search and sign-in live in the dropdown (.sh-drop, drawn by shell.js) */
.sh-more { display: none; }
.sh-drop { position: absolute; top: calc(var(--sh-top) - 1px); left: 0; right: 0; z-index: 1001; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(0,0,0,.5); padding: 12px 16px 18px; display: grid; gap: 12px; }
.sh-drop[hidden] { display: none; }
.sh-drop nav { display: grid; }
.sh-drop nav a { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 400 18px var(--sans); }
.sh-drop nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 3px 0 0 #ff2d55; padding-left: 12px; }
.sh-drop-search { position: relative; }
.sh-drop-search input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line-2, var(--line)); background: var(--surface); color: var(--ink); padding: 0 12px 0 38px; font: 16px var(--sans); }
.sh-drop-search svg { position: absolute; left: 12px; top: 14px; width: 16px; height: 16px; color: var(--ink-3); }
.sh-drop-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-drop-acts .sh-btn { height: 44px; font-size: 15px; }
@media (max-width: 700px) {
  .sh-top { gap: 6px; padding: 0 10px; }
  .sh-tabs, .sh-search, .sh-acts .sh-who { display: none !important; }
  .sh-more { display: inline-grid; }
  .sh-top a.brand { margin-right: auto; }
}
.sh-scrim { display: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--btn-bg); color: var(--btn-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
/* theme toggle icons (also in /hd.css; repeated so pages with their own CSS show one icon) */
.sh-top .hd-theme { display: inline-grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--line-2, rgba(128,128,128,.3)); background: transparent; color: var(--ink); cursor: pointer; }
.sh-top .hd-theme svg { width: 17px; height: 17px; display: none; }
:root:not([data-theme]) .sh-top .hd-theme .sun, [data-theme="light"] .sh-top .hd-theme .sun, [data-theme="dark"] .sh-top .hd-theme .moon, [data-theme="original"] .sh-top .hd-theme .spark { display: block; }
[data-theme="original"] .sh-top .hd-theme .spark { color: #22E58B; }
[data-theme="original"] .sh-tabs a[aria-current="page"] { box-shadow: inset 0 -2px 0 #22E58B; }

/* the Ask button in the top bar (added by shell.js) */
.sh-ask { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2, rgba(128,128,128,.35)); background: transparent; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.sh-ask:hover { border-color: var(--ink-3); }
.sh-ask svg { width: 16px; height: 16px; color: #22E58B; }
[data-theme="light"] .sh-ask svg { color: #0FA968; }
.sh-ask kbd { font: 11px var(--mono, monospace); color: var(--ink-2, #55555c); border: 1px solid var(--line, rgba(128,128,128,.3)); border-radius: 4px; padding: 0 4px; }
@media (max-width: 1100px) { .sh-ask kbd { display: none; } }
@media (max-width: 700px) { .sh-ask { width: 34px; padding: 0; justify-content: center; } .sh-ask span { display: none; } }

/* signed-in slot and avatar palette (shell.js colorClass): no inline styles */
.sh-who { display: contents; }
/* doubled class for specificity over .sh-item .ic and .sh-av */
.sh-c0.sh-c0.sh-c0 { background: #0b7a4b; } .sh-c1.sh-c1.sh-c1 { background: #7a2dff; } .sh-c2.sh-c2.sh-c2 { background: #e11d48; } .sh-c3.sh-c3.sh-c3 { background: #1f6feb; }
.sh-c4.sh-c4.sh-c4 { background: #c2410c; } .sh-c5.sh-c5.sh-c5 { background: #0e7490; } .sh-c6.sh-c6.sh-c6 { background: #a21caf; } .sh-c7.sh-c7.sh-c7 { background: #4d7c0f; }

/* notifications bell (shell.js bell) */
.sh-bellwrap { position: relative; display: inline-flex; }
.sh-bell { position: relative; }
.sh-badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e11d48; color: #fff; font: 700 10px/16px var(--sans); text-align: center; }
.sh-badge[hidden] { display: none; }
.sh-bell-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 20px)); z-index: 1002; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.55); overflow: hidden; }
.sh-bell-panel[hidden] { display: none; }
.sh-bell-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sh-bell-list { max-height: min(60vh, 420px); overflow-y: auto; }
.sh-nt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sh-nt:hover { background: var(--surface); }
.sh-nt.unread { box-shadow: inset 3px 0 0 #ff2d55; }
.sh-nt-tx { display: grid; gap: 2px; min-width: 0; }
.sh-nt-tx b { font: 600 14px var(--sans); }
.sh-nt:not(.unread) .sh-nt-tx b { font-weight: 500; color: var(--ink-2); }
.sh-nt-tx span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-nt time { font-size: 12px; color: var(--ink-3); }
.sh-nt-empty { margin: 0; padding: 18px 14px; color: var(--ink-3); font-size: 14px; }
.sh-bell-all { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; }
.sh-bell-all [hidden] { display: none; }
@media (max-width: 700px) { .sh-bell-panel { position: fixed; top: var(--sh-top); left: 10px; right: 10px; width: auto; } }
/* no sidebar on this page: no sidebar button */
body.sh-norail .sh-burger { display: none; }
/* keyboard focus: a visible ring on every control in the top bar, rail and phone menu */
.sh-top :focus-visible, .sh-rail :focus-visible, .sh-drop :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.sh-search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .sh-rail, .sh-drop { transition: none; } }

/* visually hidden text, read by screen readers */
.sh-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* phones: every tap target is at least 44px (WCAG 2.5.5). The bar stays 56px tall. */
@media (max-width: 700px) {
  .sh-top .sh-icon, .sh-top .hd-theme, .sh-top .sh-ask { width: 44px; height: 44px; min-width: 44px; }
  .sh-top a.brand { min-height: 44px; }
  .sh-chip { height: 44px; padding: 0 14px; }
  .sh-item { min-height: 44px; }
}
