/* One discovery language: an account workspace, public index and quick window. */
.cosmos-discovery { width:min(1060px,100%); margin:24px auto; color:var(--cosmos-paper); }
.cosmos-discovery [hidden] { display:none!important; }
.cosmos-discovery__heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.cosmos-discovery__heading p,.cosmos-discovery__start>p:first-child { color:var(--cosmos-sky); font:600 .7rem/1.5 var(--cosmos-mono); letter-spacing:.12em; }
.cosmos-discovery__heading :is(h1,h2) { margin:10px 0 0; font:470 clamp(2.25rem,4.1vw,4.5rem)/1.04 var(--cosmos-font); letter-spacing:-.06em; }
.cosmos-discovery__intro { margin:16px 0 26px; color:var(--cosmos-soft); max-width:650px; font-size:.95rem; line-height:1.7; }
.cosmos-discovery__query { display:flex; gap:12px; align-items:center; min-height:66px; padding:8px 10px 8px 20px; background:var(--cosmos-night); border:1px solid var(--cosmos-line-strong); border-radius:var(--cosmos-radius-panel); transition:border-color var(--cosmos-responsive),box-shadow var(--cosmos-responsive); }
.cosmos-discovery__query:focus-within { border-color:var(--cosmos-sky); box-shadow:0 0 0 3px #a9cee911; }
.cosmos-discovery__query>svg { color:var(--cosmos-sky); flex-shrink:0; }
.cosmos-discovery__query input { min-width:0; width:100%; padding:9px 0; border:0; background:none; color:var(--cosmos-paper); font:400 1.05rem/1.5 var(--cosmos-font); box-shadow:none; outline:none; }
.cosmos-discovery__query input::-webkit-search-cancel-button { display:none; }
.cosmos-discovery button { color:inherit; }
.cosmos-discovery__query button,.cosmos-discovery__heading>button { display:grid; flex-shrink:0; width:44px; height:44px; place-items:center; border-radius:var(--cosmos-radius-control); }
.cosmos-discovery__query .cosmos-discovery__submit { background:var(--cosmos-sky); color:var(--cosmos-void); }
.cosmos-discovery__hint { margin:12px 0 26px; min-height:1.5em; color:var(--cosmos-muted); font-size:.78rem; line-height:1.6; }
.cosmos-discovery__body { display:grid; grid-template-columns:178px minmax(0,1fr); gap:34px; border-top:1px solid var(--cosmos-line); padding-top:24px; }
.cosmos-discovery__sources { display:flex; flex-direction:column; gap:5px; align-self:start; }
.cosmos-discovery__sources button { display:flex; align-items:center; gap:10px; min-height:44px; padding:11px 10px; text-align:left; border-left:2px solid transparent; color:var(--cosmos-muted); font-size:.83rem; transition:background var(--cosmos-instant); }
.cosmos-discovery__sources button[aria-pressed=true] { background:var(--cosmos-panel); border-left-color:var(--cosmos-sky); color:var(--cosmos-paper); }
.cosmos-discovery__sources svg { flex-shrink:0; }
.cosmos-discovery__main { min-width:0; }
.cosmos-discovery__status { margin:0 0 20px; color:var(--cosmos-muted); font-size:.78rem; line-height:1.6; }
.cosmos-discovery__errors>div { display:flex; align-items:start; gap:12px; padding:15px; margin-bottom:12px; border:1px solid #ddbb8955; border-radius:var(--cosmos-radius-control); color:var(--cosmos-warm); font-size:.84rem; line-height:1.6; }
.cosmos-discovery__errors svg { flex-shrink:0; margin-top:3px; }
.cosmos-discovery__errors span { flex:1; overflow-wrap:anywhere; }
.cosmos-discovery__errors button { min-height:32px; text-decoration:underline; text-underline-offset:4px; }
.cosmos-discovery__group { margin-bottom:28px; }
.cosmos-discovery__group>header { display:flex; justify-content:space-between; align-items:baseline; gap:12px; border-bottom:1px solid var(--cosmos-line); padding:0 0 10px; }
.cosmos-discovery__group h3 { margin:0; font-size:.9rem; font-weight:600; }
.cosmos-discovery__group>header span { color:var(--cosmos-muted); font:400 .7rem/1.6 var(--cosmos-mono); white-space:nowrap; }
.cosmos-discovery__row { display:flex; border-bottom:1px solid #23304488; align-items:center; }
.cosmos-discovery__row>a,.cosmos-discovery__path { min-width:0; flex:1; display:flex; gap:15px; align-items:center; padding:17px 8px; min-height:76px; color:var(--cosmos-paper); }
.cosmos-discovery__row svg,.cosmos-discovery__path>svg { flex-shrink:0; color:var(--cosmos-sky); }
.cosmos-discovery__row>a>span,.cosmos-discovery__path>span { flex:1; min-width:0; }
.cosmos-discovery__row strong,.cosmos-discovery__path strong { display:block; font-size:.93rem; font-weight:500; line-height:1.55; overflow-wrap:anywhere; }
.cosmos-discovery__row small,.cosmos-discovery__path small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:4px; color:var(--cosmos-muted); font-size:.8rem; line-height:1.6; overflow-wrap:anywhere; }
.cosmos-discovery__row em { display:flex; gap:8px; align-items:center; font-size:.72rem; font-style:normal; color:var(--cosmos-muted); white-space:nowrap; }
.cosmos-discovery__row>button { width:40px; height:44px; display:grid; place-items:center; flex-shrink:0; color:var(--cosmos-muted); }
.cosmos-discovery__row:hover,.cosmos-discovery__row:focus-within,.cosmos-discovery__path:hover { background:#a9cee908; }
.cosmos-discovery__more { min-height:44px; display:flex; gap:16px; align-items:center; margin-top:7px; color:var(--cosmos-sky)!important; font-size:.82rem; }
.cosmos-discovery__more span { color:var(--cosmos-muted); font-size:.7rem; }
.cosmos-discovery__start { counter-reset:discovery-path; }
.cosmos-discovery__start>p:first-child { margin-bottom:12px; color:var(--cosmos-muted); }
.cosmos-discovery__path { border-top:1px solid var(--cosmos-line); }
.cosmos-discovery__path::before { counter-increment:discovery-path; content:'0' counter(discovery-path); flex:0 0 27px; color:var(--cosmos-sky); font:500 .69rem/1 var(--cosmos-mono); }
.cosmos-discovery__path>svg:first-child { display:none; }
.cosmos-discovery__path strong { font-size:clamp(1rem,1.65vw,1.35rem); letter-spacing:-.025em; }
.cosmos-discovery__privacy { display:flex; align-items:center; gap:9px; color:var(--cosmos-muted); font-size:.73rem; line-height:1.6; margin-top:25px; }
.cosmos-discovery__privacy svg { flex-shrink:0; }
.cosmos-discovery__empty { padding:42px 12px; }
.cosmos-discovery__empty>svg { color:var(--cosmos-muted); margin-bottom:18px; }
.cosmos-discovery__empty h3 { font-size:1.3rem; letter-spacing:-.025em; }
.cosmos-discovery__empty p { max-width:430px; margin-top:12px; color:var(--cosmos-muted); font-size:.9rem; line-height:1.65; }
.cosmos-discovery__loading { display:grid; gap:18px; padding:16px 0; }
.cosmos-discovery__loading i { display:block; height:44px; border-radius:4px; background:var(--cosmos-panel); animation:cosmos-search-wait 1.2s ease-in-out infinite alternate; }
@keyframes cosmos-search-wait { to { opacity:.45; } }
.cosmos-discovery__footer { border-top:1px solid var(--cosmos-line); padding-top:17px; margin-top:28px; display:flex; gap:12px; align-items:center; justify-content:space-between; color:var(--cosmos-muted); font-size:.73rem; line-height:1.6; }
.cosmos-discovery__footer a,.cosmos-discovery__footer button { color:var(--cosmos-sky); min-height:36px; display:flex; align-items:center; }
.cosmos-discovery :is(a,button):focus-visible { outline:2px solid var(--cosmos-sky); outline-offset:3px; border-radius:4px; }
.cosmos-public-search { padding:clamp(110px,12vh,160px) var(--cosmos-gutter) 64px; }
.cosmos-discovery--public .cosmos-discovery__body { grid-template-columns:minmax(0,1fr); }
.cosmos-command-dialog { position:relative; display:flex; width:min(800px,calc(100% - 32px)); max-height:min(88dvh,800px); margin:6vh auto; padding:26px; background:var(--cosmos-night); border:1px solid var(--cosmos-line-strong); border-radius:var(--cosmos-radius-panel); box-shadow:var(--cosmos-shadow); overflow:hidden; }
.cosmos-discovery--command { margin:0; min-height:0; display:flex; flex-direction:column; }
.cosmos-discovery--command>:not(.cosmos-discovery__body) { flex-shrink:0; }
.cosmos-discovery--command .cosmos-discovery__heading h2 { font-size:1.9rem; }
.cosmos-discovery--command .cosmos-discovery__intro { display:none; }
.cosmos-discovery--command .cosmos-discovery__query { margin-top:22px; }
.cosmos-discovery--command .cosmos-discovery__body { display:flex; flex-direction:column; flex:1; min-height:0; gap:20px; padding-top:18px; overflow-y:auto; overscroll-behavior:contain; }
.cosmos-discovery--command .cosmos-discovery__sources { flex-direction:row; flex-wrap:wrap; gap:3px; flex-shrink:0; width:100%; }
.cosmos-discovery--command .cosmos-discovery__main { flex-shrink:0; }
.cosmos-discovery--command .cosmos-discovery__sources button { border-left:0; border-bottom:2px solid transparent; font-size:.76rem; }
.cosmos-discovery--command .cosmos-discovery__sources button[aria-pressed=true] { border-bottom-color:var(--cosmos-sky); }
/* Search is the principal instrument in the workspace. Its pale input stays
   visually distinct from result shelves and makes keyboard focus unmistakable. */
.cosmos-discovery--private { margin-top:8px; }
.cosmos-discovery--private .cosmos-discovery__intro { margin:12px 0 24px; }
.cosmos-discovery--private .cosmos-discovery__query,
.cosmos-discovery--command .cosmos-discovery__query {
  min-height:76px;
  border:0;
  border-radius:3px;
  background:#e5ece9;
  box-shadow:0 19px 52px #02080e38;
}
.cosmos-discovery--private .cosmos-discovery__query:focus-within,
.cosmos-discovery--command .cosmos-discovery__query:focus-within {
  box-shadow:0 0 0 3px #a8d2e667,0 24px 65px #02080e70;
}
.cosmos-discovery--private .cosmos-discovery__query :is(input,button),
.cosmos-discovery--command .cosmos-discovery__query :is(input,button) { color:#102329; }
.cosmos-discovery--private .cosmos-discovery__query input::placeholder,
.cosmos-discovery--command .cosmos-discovery__query input::placeholder { color:#53696e!important; opacity:1; }
.cosmos-discovery--private .cosmos-discovery__query>svg,
.cosmos-discovery--command .cosmos-discovery__query>svg { color:#315864; }
.cosmos-discovery--private .cosmos-discovery__query .cosmos-discovery__submit,
.cosmos-discovery--command .cosmos-discovery__query .cosmos-discovery__submit { background:#102c36; color:#eff5f1; }
.cosmos-discovery--private .cosmos-discovery__query .cosmos-discovery__submit:hover,
.cosmos-discovery--command .cosmos-discovery__query .cosmos-discovery__submit:hover { background:#315864; }
.cosmos-discovery--private .cosmos-discovery__body { border-top-color:#83a9ba33; }
.cosmos-discovery--private .cosmos-discovery__sources button[aria-pressed=true] { background:#e2ecea; color:#10272d; border-left-color:#e2ecea; }
.cosmos-discovery__group { --discovery-accent:var(--cosmos-sky); }
.cosmos-discovery__group[data-search-group="astrit"] { --discovery-accent:#d5c5a5; }
.cosmos-discovery__group[data-search-group="bobflix"] { --discovery-accent:#dfad77; }
.cosmos-discovery__group[data-search-group="connected"] { --discovery-accent:#8ad7df; }
.cosmos-discovery__group>header h3 { color:var(--discovery-accent); font-size:1.04rem; letter-spacing:-.015em; }
.cosmos-discovery__group .cosmos-discovery__row>a>svg:first-child { color:var(--discovery-accent); }
.cosmos-discovery__row:focus-within { background:#a8d2e614; box-shadow:inset 3px 0 var(--discovery-accent,var(--cosmos-sky)); }
.cosmos-discovery__row:hover { background:#a8d2e60d; }
.cosmos-command-dialog { border-color:#a8d2e63a; border-radius:4px; background:#0b141b; box-shadow:0 50px 150px #000d; }
.cosmos-discovery--command .cosmos-discovery__heading h2 { font-size:clamp(1.65rem,3.4vw,2.3rem); }
.cosmos-discovery--command .cosmos-discovery__query { min-height:64px; margin-top:18px; }
.cosmos-discovery--command .cosmos-discovery__body { gap:12px; padding-top:14px; }
@media(max-width:800px) {
  .cosmos-discovery__row em { font-size:0; gap:0; }
  .cosmos-discovery__body { gap:22px; grid-template-columns:154px minmax(0,1fr); }
}
@media(max-width:620px) {
  .cosmos-discovery { margin:12px auto; }
  .cosmos-discovery__heading :is(h1,h2) { font-size:2.2rem; }
  .cosmos-discovery__intro { margin:14px 0 22px; font-size:.86rem; }
  .cosmos-discovery--private { margin-top:0; }
  .cosmos-discovery--private .cosmos-discovery__heading h2 { font-size:2.1rem; }
  .cosmos-discovery--private .cosmos-discovery__intro { margin:7px 0 16px; }
  .cosmos-discovery--private .cosmos-discovery__query { min-height:62px; }
  .cosmos-discovery--private .cosmos-discovery__hint { margin:8px 0 17px; }
  .cosmos-discovery__body { grid-template-columns:minmax(0,1fr); gap:20px; padding-top:12px; }
  .cosmos-discovery__sources { flex-direction:row; overflow-x:auto; max-width:100%; gap:3px; padding-bottom:9px; scrollbar-width:thin; scrollbar-color:var(--cosmos-sky) var(--cosmos-line); }
  .cosmos-discovery--private .cosmos-discovery__sources::after { content:'SCROLL →'; position:sticky; right:0; z-index:1; flex:0 0 62px; align-self:stretch; display:grid; place-items:center; margin-left:-62px; border-left:1px solid var(--cosmos-line); color:var(--cosmos-sky); background:var(--cosmos-night); font:600 9px/1 var(--cosmos-mono); letter-spacing:.05em; pointer-events:none; }
  .cosmos-discovery__sources::-webkit-scrollbar { height:3px; }
  .cosmos-discovery__sources::-webkit-scrollbar-thumb { background:var(--cosmos-sky); }
  .cosmos-discovery__sources::-webkit-scrollbar-track { background:var(--cosmos-line); }
  .cosmos-discovery__sources button { flex-shrink:0; border-left:0; border-bottom:2px solid transparent; padding:10px; }
  .cosmos-discovery__sources button[aria-pressed=true] { border-bottom-color:var(--cosmos-sky); }
  .cosmos-discovery__query { padding:6px 5px 6px 12px; gap:8px; }
  .cosmos-discovery__query input { font-size:16px; }
  .cosmos-discovery__query>svg { width:18px; }
  .cosmos-discovery__query button { width:44px; }
  .cosmos-discovery__hint { margin-bottom:18px; }
  .cosmos-discovery__row>a,.cosmos-discovery__path { gap:11px; padding-inline:2px; }
  .cosmos-discovery__row strong { font-size:.88rem; }
  .cosmos-discovery__path { min-height:78px; }
  .cosmos-discovery__path strong { font-size:1rem; }
  .cosmos-discovery__footer>span { display:none; }
  .cosmos-discovery__errors>div { flex-wrap:wrap; }
  .cosmos-discovery__errors button { margin-left:30px; min-height:44px; }
  .cosmos-command-dialog { width:100%; max-height:var(--mobile-viewport-height,100dvh); height:var(--mobile-viewport-height,100dvh); margin:0; padding:calc(16px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); border:0; border-radius:0; }
  .cosmos-discovery--command .cosmos-discovery__sources { flex-wrap:nowrap; }
  .cosmos-public-search { padding-inline:18px; }
}
@media(prefers-reduced-motion:reduce) { .cosmos-discovery *, .cosmos-command-dialog { animation:none!important; transition:none!important; } }
@media(max-height:520px) {
  .cosmos-discovery--command .cosmos-discovery__heading p,.cosmos-discovery--command .cosmos-discovery__hint,.cosmos-discovery--command .cosmos-discovery__footer { display:none; }
  .cosmos-discovery--command .cosmos-discovery__heading h2 { margin:0; font-size:1.4rem; }
  .cosmos-discovery--command .cosmos-discovery__query { margin-top:12px; min-height:54px; }
  .cosmos-discovery--command .cosmos-discovery__body { margin-top:12px; }
}
