/* redoal - the skin over portal's own stylesheet
   (site.yaml `stylesheet`, loaded after main.css, so these rules win). */

/* The way in sits beside the wordmark on every page. redoal.com is read
   and answered without an account, so the invitation is not shown.
   Whoever edits the site still signs in at /auth/login directly, and
   once signed in the nav keeps its name and its way out. */
.session:has(a[href^="/auth/login"]) {
  display: none;
}

/* Without :has(), the link alone goes and the empty nav stays. */
.session a[href^="/auth/login"] {
  display: none;
}

/* Portal's announcement strip (.announce, a live event page in the
   header) climbs 2rem up into the hero's top padding - from when that
   padding was 4rem. It is 1.75rem now, and nothing at all on a page
   with pictures, so on /exhibition the strip sat 42px above the
   viewport with a sliver showing, and on the front page it touched the
   top edge. No climb; and on a slideshow page, where the header has no
   padding to lend, the strip brings its own. */
.announce {
  margin-top: 0;
}

.hero-slides .announce {
  padding: 1rem 1.5rem 0;
  box-sizing: border-box;
}

/* The wordmark is centred on every page. Portal centres it on a plain
   page but, on a page with pictures, sets the bar's row space-between
   with the sign-in at the far end - which here is hidden, so the mark
   sat alone at the left edge on /exhibition. Centre the row; a session
   that is there (an editor signed in) goes to the right edge the way it
   does on a plain page, without pushing the mark off centre. */
.hero-bar .hero-top {
  justify-content: center;
}

.hero-bar .hero-top .session {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* The Releases card (portal's .item-card.releases, a grid) carries the
   Arch install lines in a <pre>. Portal wraps that pre, but the repo
   URL is one long word with no break in it, so as a grid item the pre
   grows to the word's width and at 390px pushes the card, and the page,
   9px past the viewport edge. Let the word break where it must; copying
   the lines still gives the unbroken text. */
.releases pre {
  overflow-wrap: anywhere;
}
