/* The one top bar (#131): the main page (#toolbar, #search, #colsw) and the animal pages (.top and what is in it) share every rule here.
   One row: where you are (from the left edge), search, switches, sound. Phone: the same row, the search a round button; open, it covers the row and the switches come under it. Loaded after a page's own styles. */
:root { --tb1:60px; --tb:60px; --topH:60px; --tbq:clamp(200px,24vw,400px); --hd:#0b0c0e; --hl:rgba(255,255,255,.16); }
html #toolbar, html .app > .top { display:block; box-sizing:border-box; left:0; right:0; top:0; width:auto; height:var(--tb); padding:0; border:0; border-bottom:1px solid var(--hl); }
html #toolbar, .app > .top { background:var(--hd); }
html .app > .top { right:var(--shelfW); z-index:14; }
/* visually hidden: the site's name for screen readers and search engines (the main page's h1) */
.vh { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
/* where you are, a branch of the tree: the groups on it, the current one on the twig that leaves it, "you are here" right over its name; then the filters, chips of the filter panel */
.tb-where { --h:42px; position:absolute; box-sizing:border-box; left:20px; right:calc(50% + var(--tbq) / 2 + 18px); top:0; height:calc(var(--tb1) - 1px); overflow:hidden; color:#f4f2ec; font:500 12.5px/14px Manrope,system-ui,sans-serif; white-space:nowrap; text-align:left; }
.tb-where .w { display:flex; align-items:flex-end; height:var(--h); margin-top:calc((var(--tb1) - 1px - var(--h)) / 2); min-width:0; }
.tb-where :is(button, a) { all:unset; box-sizing:border-box; cursor:pointer; color:inherit; -webkit-tap-highlight-color:transparent; }
.tb-where .p { flex:0 2 auto; align-self:flex-start; min-width:0; max-width:150px; padding:0 0 14px; color:#c9c6be; overflow:hidden; text-overflow:ellipsis; } .tb-where .p:hover { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.tb-where .p.stub { flex:none; width:14px; font-size:0; text-overflow:clip; } .tb-where .p.stub::before { content:"…"; font-size:14px; }
.tb-where i { flex:none; align-self:flex-start; position:relative; box-sizing:border-box; pointer-events:none; --l:rgba(255,255,255,.36); } .tb-where .s { width:18px; height:1px; margin:7px 7px 0; background:var(--l); }
.tb-where .e { width:33px; height:100%; margin:0 7px 0 7px; } .tb-where .e::before { content:""; position:absolute; left:0; top:7px; width:12px; bottom:13px; border:solid var(--l); border-width:1px 1px 0 0; } .tb-where .e::after { content:""; position:absolute; box-sizing:border-box; left:11px; right:7px; bottom:13px; border-bottom:1px solid var(--l); }
.tb-where .c { position:relative; display:block; flex:0 1 auto; min-width:44px; height:100%; } .tb-where .c::before { content:""; position:absolute; left:-14px; bottom:10px; width:7px; height:7px; border-radius:50%; background:#f2c84b; } .tb-where .c:first-child::before { display:none; } .tb-where .c:last-child, .tb-where .c:has(+ .fs .t:nth-child(2)) { min-width:74px; }
.tb-where small { position:absolute; left:1px; top:1px; color:#f4f2ec; font:600 11px/13px Manrope,system-ui,sans-serif; }
.tb-where b { display:block; margin-top:14px; overflow:hidden; text-overflow:ellipsis; color:#f2c84b; font:600 23px/28px Manrope,system-ui,sans-serif; letter-spacing:-.01em; }
/* the filters: two rows when one is not enough, never a taller bar */
#where .fs { --ch:19px; display:flex; flex:0 10000 auto; flex-wrap:wrap; align-content:flex-end; gap:4px 5px; min-width:0; height:100%; margin-left:12px; }
#where :is(.t, .more) { flex:none; height:var(--ch); padding:0 7px; gap:5px; border-radius:0; font:400 10.5px/1 ui-monospace,Menlo,monospace; } #where .ic, #where .ic svg { width:13px; height:13px; } #where .fs:not(.two) { transform:translateY(-4px); } #where .t .lb { max-width:130px; overflow:hidden; text-overflow:ellipsis; } #where .t u { text-decoration:none; font-size:13px; } #where .t:hover u { opacity:1; }
#where .t.short:has(.ic, .dt) .lb { display:none; } #where .t.short .lb { max-width:56px; } #where .t .ic { color:#14120c !important; } #where .dt { box-shadow:0 0 0 1.5px #14120c; } #where .ai { position:relative; isolation:isolate; }
.tb-where .x { flex:none; align-self:flex-end; width:32px; height:28px; margin-left:4px; display:grid; place-items:center; color:#c9c6be; } .tb-where .x:hover { color:#fff; } .tb-where .x svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; display:block; }
/* the way back to the main view: the ph mark (brand/ph.svg), 2 px a cell */
.tb-where .h { flex:none; align-self:center; display:block; line-height:0; margin-right:16px; } .tb-where .h svg { display:block; width:30px; height:28px; } .tb-where .h:hover { opacity:.8; } .tb-where .h:focus-visible { outline:2px solid var(--accent,#f2c84b); outline-offset:3px; } .tb-where .h + .c::before { display:none; }
.tb-where :is(button, a):focus-visible { outline:2px solid #f4f2ec; outline-offset:-2px; } .tb-where [hidden] { display:none !important; }
/* the search: round, in the same place on every page */
html #search, html .top .search { position:absolute; box-sizing:border-box; left:calc(50% - var(--tbq) / 2); right:auto; top:12px; margin:0; width:var(--tbq); transform:none; border:0; background:none; }
html #search { position:fixed; z-index:6; display:flex; flex-direction:column; align-items:center; }
html #search #q, html .top .search { box-sizing:border-box; height:36px; border:1px solid var(--hl); border-radius:999px; background:rgba(0,0,0,.38); box-shadow:none; font:500 15px/1 Manrope,system-ui,sans-serif; color:#f4f2ec; }
html .top .search { display:block; padding:0; } html .top .search input { width:100%; height:34px; padding:0 18px 0 46px; font:500 15px/1 Manrope,system-ui,sans-serif; } html #search #q::placeholder, html .top .search input::placeholder { font:500 15px/1 Manrope,system-ui,sans-serif; letter-spacing:0; text-transform:none; color:#8f8c84; opacity:1; }
html #search #q:focus, html .top .search:focus-within { border-color:#f2c84b; box-shadow:none; }
html #q-i, html .top .search .sic { position:absolute; left:17px; top:9px; width:18px; height:18px; color:#f2c84b; pointer-events:none; } html .top .search .sic { left:16px; top:8px; } html .top .search .sic svg { width:18px; height:18px; }
html #search #q { padding:0 calc(var(--qf) + var(--cn,0px)) 0 47px; } html #q-f { right:0; top:0; width:52px; height:36px; border:0; border-radius:0 999px 999px 0; } html #fcount { right:60px; top:0; height:36px; line-height:36px; }
html #search #chips { display:none; } html #search #chips:has(em) { display:block; width:max(100%,352px); box-sizing:border-box; margin-top:11px; background:var(--hd); border:1px solid var(--hl); } html #search #chips b { display:none; } html #search #chips em { display:block; }
html #search #panel { width:max(100%,352px); box-sizing:border-box; margin-top:11px; border:1px solid var(--hl); border-top:0; background:var(--hd); } html #search #chips:has(em) + #panel { margin-top:0; }
html .top .results { left:50%; right:auto; transform:translateX(-50%); top:46px; width:max(calc(100% + 2px),352px); box-sizing:border-box; border:1px solid var(--hl); border-top:0; border-radius:0; background:var(--hd); box-shadow:none; }
html #colsw { display:flex; left:auto; right:64px; top:0; height:calc(var(--tb1) - 1px); } html .top #acad { position:absolute; right:116px; top:0; height:calc(var(--tb1) - 1px); display:flex; align-items:center; }
html #ambient-sw { top:calc((var(--tb1) - 35px) / 2); }
@media (max-width:1000px) and (min-width:701px) { html:has(#search.open) #col-t { visibility:hidden; } html #fcount .of { display:none; } }
/* a narrow tablet: the search is short until it is used; used, it is wide and the line steps back */
@media (max-width:820px) and (min-width:701px) { :root { --tbq:112px; } .tb-where { left:14px; right:calc(50% + var(--tbq) / 2 + 10px); font-size:12px; } .tb-where b { font-size:21px; } .tb-where .p { max-width:96px; } .tb-where .x { margin-left:0; width:28px; }
  html #search:not(.open) #fcount { display:none; } html #search:not(.open) #q::placeholder, html .top .search:not(.open) input::placeholder { color:transparent; }
  html #search.open, html .top .search.open { width:320px; left:calc(50% - 160px); } html:has(#search.open, .top .search.open) .tb-where { visibility:hidden; } }
@media (max-width:700px) {
  :root { --tb1:56px; --tb:56px; --topH:56px; --tbq:40px; }
  html .app > .top { height:calc(var(--tb) + env(safe-area-inset-top)); padding-top:env(safe-area-inset-top); } html .app > .top > * { margin-top:env(safe-area-inset-top); }
  .tb-where { --h:40px; left:14px; right:106px; font-size:12px; } .tb-where b { font-size:21px; margin-top:13px; line-height:27px; } .tb-where small { top:0; font-size:10.5px; } .tb-where .s { width:8px; margin:7px 5px 0; } .tb-where .e { width:28px; margin:0 5px; } .tb-where .e::before { width:9px; } .tb-where .e::after { left:8px; right:5px; } .tb-where .c::before { left:-12px; } .tb-where .p { max-width:86px; } #where .fs { --ch:18px; margin-left:8px; } #where .t.short .lb { max-width:34px; text-overflow:clip; } #where :is(.t, .more) { padding:0 6px; } .tb-where .x { margin-left:0; width:28px; } .tb-where .h { margin-right:12px; }
  html #search, html .top .search { left:auto; right:58px; top:8px; width:40px; }
  html #search #q, html .top .search { height:39px; font-size:16px; } html #search #q { width:100%; } html .top .search input { height:37px; font-size:16px; }
  html #q-i, html .top .search .sic { left:11px; top:11px; } html .top .search .sic { left:10px; top:10px; }
  html #search:not(.open) #q, html .top .search:not(.open) input { padding:0; color:transparent; caret-color:transparent; cursor:pointer; } html #search:not(.open) #q::placeholder, html .top .search:not(.open) input::placeholder { color:transparent; }
  html #search:not(.open) :is(#q-f, #fcount) { display:none; }
  html #search.open, html .top .search.open { left:12px; right:12px; width:auto; } html #search.open { align-items:stretch; pointer-events:none; } html #search.open :is(#q, #q-f, #panel, #chips) { pointer-events:auto; } html #search.open #q-i, html .top .search.open .sic { left:17px; }
  html #search #q-f, html #search #fcount { height:39px; line-height:39px; }
  html:has(#search.open, .top .search.open) :is(.tb-where, #ambient-sw) { visibility:hidden; }
  html #colsw, html .top #acad { display:none; }
  html:has(#search.open) #colsw, html .top .search.open ~ #acad { display:flex; box-sizing:border-box; left:0; right:0; top:55px; height:45px; justify-content:center; align-items:center; border:solid var(--hl); border-width:1px 0; background:var(--hd); z-index:6; }
  html #search :is(#panel, #chips:has(em)) { width:100vw; margin:52px 0 0 -12px; border-left:0; border-right:0; border-top:0; } html #search:not(.open) #chips:has(em) { position:fixed; left:0; top:var(--tb); margin:0; }
  html #search #chips:has(em) + #panel { margin-top:0; } html .top .results { left:-13px; transform:none; top:90px; width:100vw; border-left:0; border-right:0; }
  html #views { position:fixed; left:12px; top:calc(var(--tb) + 8px); } html #depth-stage #depth-locator { top:calc(var(--tb) + 8px) !important; }
}
