/* MiCyte — browse.css  ·  the signed-out browsing view's head (js/browse.js)
 *
 * The app's head in the site's own colours: one capsule (the three bars, the address bar,
 * reload), the tab strip under it, the menu that drops from the bars, and the prompt to get
 * the app. On a phone the capsule stands where the site's bar stood, as the app's does; on a
 * wide screen the site's bar stays and the capsule sits at the strip's end.
 */

.sb-i { width: 1.35rem; height: 1.35rem; flex: none; display: block; }
.sb-chrome {
  --sb-line: var(--rule);
  --sb-tab: #2a231a;
  --sb-w: 62rem;
  --sb-pad: max(clamp(0.75rem, 3vw, 1.5rem), calc((100% - var(--sb-w)) / 2));
  display: flex; align-items: flex-end; gap: 0.75rem;
  padding: 0.45rem var(--sb-pad) 0;
  border-bottom: 2px solid var(--sb-line);
  background: var(--substrate);
  font-family: var(--sans);
}
.sb-chrome:empty { display: none; }

/* ---------- the capsule ---------- */
.sb-head {
  order: 2; flex: 0 1 26rem; min-width: 0; margin: 0 0 0.45rem auto;
  display: flex; align-items: center; gap: 0.25rem;
  height: 2.75rem; padding: 0 0.3rem;
  border: 1px solid var(--sb-line); border-radius: 999px;
  background: var(--well); color: var(--hyphae);
}
.sb-head__btn {
  flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  margin: -1px 0; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--hyphae); cursor: pointer;
}
.sb-head__btn:hover { color: var(--ochre); }
.sb-head__btn:focus-visible { outline: 2px solid var(--ochre); outline-offset: -3px; }
.sb-head__btn[aria-expanded="true"] { color: var(--ochre); }
.sb-head__url {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent; color: var(--hyphae);
  font: 1rem var(--sans); text-align: center; text-overflow: ellipsis;
}
.sb-head__url:focus { text-align: left; }
.sb-head:focus-within { border-color: var(--ochre); }

/* ---------- the tab strip ---------- */
.sb-tabs { order: 1; display: flex; align-items: flex-end; gap: 0.35rem; min-width: 0; }
.sb-tab {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0;
  margin: 0 0 -2px; min-height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0;
  color: var(--hyphae-dim); text-decoration: none;
  font: 500 1rem/1 var(--sans);
}
a.sb-tab:hover { color: var(--hyphae); }
.sb-tab.is-open { border-color: var(--sb-line); background: var(--sb-tab); color: var(--hyphae); }
.sb-tab__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-tab__x { display: grid; place-items: center; margin-right: -0.5rem; padding: 0.3rem; color: var(--hyphae-dim); }
.sb-tab__x:hover { color: var(--hyphae); }
.sb-tab__x .sb-i { width: 1rem; height: 1rem; }

/* ---------- the menu ---------- */
.sb-drop {
  position: fixed; z-index: 220; width: min(17rem, calc(100vw - 1rem));
  padding: 0.35rem 0; border: 1px solid var(--sb-line, var(--rule)); border-radius: 12px;
  background: var(--raised); color: var(--hyphae);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  font-family: var(--sans);
}
.sb-drop[hidden] { display: none; }
.sb-drop__rows { margin: 0; padding: 0.15rem 0; list-style: none; }
.sb-drop__rows + .sb-drop__rows { border-top: 1px solid var(--rule); }
.sb-drop__row {
  display: flex; align-items: center; gap: 0.85rem; min-height: 2.75rem; padding: 0 1rem;
  color: var(--hyphae); text-decoration: none; font-size: 1rem;
}
.sb-drop__row .sb-i { color: var(--hyphae-dim); }
.sb-drop__row:hover, .sb-drop__row:focus-visible { background: var(--sb-tab, #2a231a); outline: 0; }
.sb-drop__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.5rem 0.6rem 0.3rem; border-top: 1px solid var(--rule); }
.sb-drop__quickBtn {
  display: grid; place-items: center; height: 2.75rem; padding: 0;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--well); color: var(--hyphae); cursor: pointer;
}
.sb-drop__quickBtn:hover { border-color: var(--hyphae-dim); }
.sb-drop__quickBtn:focus-visible { outline: 2px solid var(--ochre); outline-offset: 1px; }
.sb-drop__said { margin: 0.35rem 0.8rem 0.2rem; font: 0.85rem/1.4 var(--mono); color: var(--hyphae-dim); overflow-wrap: anywhere; user-select: all; }
.sb-drop__said[hidden] { display: none; }

/* ---------- get the app ---------- */
.sb-prompt {
  position: fixed; z-index: 230;
  left: max(0.75rem, env(safe-area-inset-left, 0px)); right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.55rem 0.7rem 0.8rem;
  border: 1px solid var(--rule); border-radius: 14px;
  background: var(--raised); color: var(--hyphae);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  font-family: var(--sans);
}
.sb-prompt__mark { flex: none; width: 2.5rem; height: 2.5rem; }
.sb-prompt__text { flex: 1 1 auto; min-width: 0; margin: 0; display: grid; gap: 0.1rem; font-size: 0.8rem; line-height: 1.3; color: var(--hyphae-dim); }
.sb-prompt__text strong { color: var(--hyphae); font-size: 0.95rem; }
.sb-prompt__get {
  flex: none; display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.8rem;
  border-radius: 999px; background: var(--ochre); color: var(--substrate);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.sb-prompt__x { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: none; color: var(--hyphae-dim); cursor: pointer; }
.sb-prompt__x .sb-i { width: 1.1rem; height: 1.1rem; }

/* ---------- a phone: the capsule is the head ---------- */
@media (max-width: 700px) {
  html.has-browse-head body > .bar { display: none; }
  .sb-chrome { flex-wrap: wrap; gap: 0; padding: calc(0.4rem + env(safe-area-inset-top, 0px)) 0.75rem 0; }
  .sb-head { order: 0; flex: 1 1 100%; margin: 0 0 0.55rem; }
  .sb-head__url { font-size: 1.05rem; }
  .sb-tab { padding: 0 0.85rem; min-height: 2.5rem; font-size: 0.95rem; }
}

/* ---- A public page's head (2026-11-30): a channel is a webpage at its own address ----
   The app's mock-up, drawn by the portal's public page: its chips (Open channel, the host),
   its title, one line and Read more. Read more is a <details> whose body is the channel's
   directory — every county and kind of work at an anchor named by its slug, and how to be
   listed — in the HTML, so a reader that runs no script reads all of it. */
.pubhead {
  --pub-edge: #4a3f2f;
  --pub-pad: max(clamp(0.75rem, 3vw, 1.5rem), calc((100% - 62rem) / 2));
  padding: 0.9rem var(--pub-pad) 1rem;
  border-bottom: 2px solid var(--rule);
}
.pubhead__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.pub-tag {
  display: inline-flex; align-items: center; min-height: 1.75rem; max-width: 100%; padding: 0 0.55rem;
  border: 1px solid var(--pub-edge); border-radius: 2px;
  color: var(--hyphae-dim); font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none;
}
a.pub-tag { color: var(--hyphae); }
a.pub-tag:hover { border-color: var(--ochre); }
a.pub-tag:focus-visible { outline: 2px solid var(--ochre); outline-offset: 1px; }
.pubhead__title {
  margin: 0.7rem 0 0; color: var(--hyphae);
  font: 400 clamp(1.6rem, 4vw, 2.4rem)/1.1 var(--serif); letter-spacing: -0.01em; text-wrap: balance;
}
.pubhead__line { margin: 0.45rem 0 0; max-width: 60ch; font: 0.88rem/1.45 var(--sans); color: var(--hyphae-dim); }
.pub-more { margin: 0.45rem 0 0; }
.pub-more__line {
  display: flex; align-items: center; gap: 0.6rem; max-width: 60ch;
  list-style: none; cursor: pointer; font: 0.88rem/1.45 var(--sans); color: var(--hyphae-dim);
}
.pub-more__line::-webkit-details-marker { display: none; }
.pub-more__line:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.pub-more__text { min-width: 0; }
.pub-more__pill {
  flex: none; padding: 0.2rem 0.45rem; border: 1px solid var(--pub-edge); border-radius: 3px;
  font: 0.7rem/1 var(--sans); white-space: nowrap;
}
.pub-more__line:hover .pub-more__pill { color: var(--hyphae); border-color: var(--hyphae-dim); }
/* Open, the pill says Less; its words stay "Read more" in the HTML. */
.pub-more[open] .pub-more__pill { font-size: 0; }
.pub-more[open] .pub-more__pill::after { content: "Less"; font-size: 0.7rem; }
.pub-more__body { display: grid; gap: 1.4rem; max-width: 46rem; margin: 1rem 0 0.4rem; }
.pub-more__lede { margin: 0; font: 0.98rem/1.6 var(--serif); color: var(--hyphae); }
.pub-group { display: grid; gap: 0.15rem; }
.pub-group__title {
  margin: 0 0 0.4rem; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet);
}
.pub-entry { padding: 0.65rem 0 0.7rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.pub-entry__title { margin: 0; font: 400 1.08rem/1.3 var(--serif); color: var(--hyphae); }
.pub-entry:target .pub-entry__title { color: var(--ochre); }
.pub-entry__who { margin: 0.3rem 0 0; font: 0.92rem/1.5 var(--sans); color: var(--hyphae); }
.pub-entry__who a { color: inherit; text-decoration-color: var(--violet); text-underline-offset: 0.18em; }
.pub-entry__who a:hover { color: var(--ochre); }
.pub-entry__meta { margin: 0.25rem 0 0; font: 0.8rem/1.45 var(--sans); color: var(--hyphae-dim); }
