/* The indifferent broccoli referral banner and block. Written by web/preview/ib/make.py: change it there.
   Their colours, read from their stylesheet: green #5eff0d, background #0a141e, surface #14293c. */
.ib { display: flex; align-items: stretch; position: relative; font: 13px/1.25 var(--text); background: var(--btn); }
.ib-go { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.ib-go:focus-visible, .ib-x:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.ib img, .ib-block img { display: block; flex: 0 0 auto; width: auto; }
.ib-lock { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 5px; }
.ib-x {
  all: unset; box-sizing: border-box; flex: 0 0 auto; display: grid; place-items: center; cursor: pointer;
  color: var(--grey); font: 400 20px/1 var(--label);
}
.ib-x:hover { background: #383838; }   /* the site's hover rule: the surface one step lighter, the text unchanged */
.ib-tag { flex: 0 0 auto; font: 700 9px/1 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--grey); white-space: nowrap; border: 1px solid var(--line); padding: 2px 4px; }
.ib-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ib-t b { font-size: 12px; line-height: 1.2; }
.ib-t span { font-size: 11px; line-height: 1.2; color: var(--grey); margin-top: 2px; }
.ib-br { flex: 0 0 100%; height: 0; }
.ib canvas, .ib-block canvas { display: block; flex: 0 0 auto; }
.ib-2, .ib-navy { background: #0a141e; }
.ib-2 .ib-go, .ib-navy .ib-go { color: #fff; }
.ib-2 .ib-t span, .ib-navy .ib-t span { color: #8fa1b3; }

/* the block for the text pages: their name and the badge, a few lines of text, in the page's column */
.ib-block { position: relative; margin: 24px 0 0; background: #0a141e; border: 1px solid #14293c; }
/* on a text page the block's place comes after the article, in the same column. The article takes the spare
   height, so the block ends up at the bottom of the page, just above the footer, however short the text is. */
.ib-slot {
  flex: 0 0 auto; width: 100%; max-width: 680px; margin: 0 auto;
  padding: 0 calc(16px + env(safe-area-inset-right, 0px)) 28px calc(16px + env(safe-area-inset-left, 0px));
}
.ib-slot:empty { display: none; }
/* under the picture of a Downloads item page, in its column (show.js) */
.ib-slot.ib-side { max-width: none; margin: 0; padding: 0; }
.ib-slot.ib-side .ib-block { margin-top: 20px; }
.ib-block .ib-go { display: grid; gap: 14px; padding: 30px 16px 16px; color: #fff; }
.ib-block .ib-pair { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.ib-block .ib-logo { height: 48px; }
.ib-block .ib-name { height: 44px; }
.ib-block .ib-badge { height: 44px; }
.ib-block .ib-t b { font: 700 17px/1.25 var(--label); }
.ib-block .ib-t span { font-size: 14px; line-height: 1.45; color: #b9c4cf; margin-top: 4px; white-space: normal; }
.ib-block .ib-tag { position: absolute; left: 16px; top: 10px; border-color: #2a4259; color: #8fa1b3; }
.ib-block .ib-x { position: absolute; right: 0; top: 0; width: 40px; height: 36px; color: #8fa1b3; }
.ib-block .ib-x:hover { background: #14293c; }

/* the referral card of the Downloads gallery (web/gallery.py, kind "referral"; user, 2026-11-25, design 1 of
   preview/ib/tile-mock.html): a gallery card on the same surface and frame, the logo and the partner badge side by
   side in the picture's lower right corner, straight on the artwork with a soft shadow, a close button in its upper
   right corner. Hidden until show.js knows the block may show. */
.doc .cards > li.ib-tli { position: relative; }
.ib-tile .ib-pic { display: block; position: relative; overflow: hidden; container-type: inline-size; }
.doc .card.ib-tile .ib-mlogo, .doc .card.ib-tile .ib-mbadge { width: auto; aspect-ratio: auto; background: none; display: block; }
.doc .card.ib-tile .ib-mlogo { height: 11cqw; }
.doc .card.ib-tile .ib-mbadge { height: 9cqw; }
.ib-tile .ib-marks { position: absolute; right: 4%; bottom: 5%; display: flex; align-items: center; gap: 2.5cqw; filter: drop-shadow(0 1px 6px rgba(0,0,0,.75)); }
.ib-tli .ib-tx { all: unset; box-sizing: border-box; position: absolute; z-index: 2; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--ink); background: var(--bar); }
.ib-tli .ib-tx:hover { background: #383838; }
.ib-tli .ib-tx:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.ib-tli .ib-tx svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 641px) {
/* as tall as the footer: the footer's own padding above and below is taken back */
body > footer .ib {
  flex: 0 0 auto; align-self: stretch; min-height: 36px;
  margin: -5px 0 calc(-5px - env(safe-area-inset-bottom, 0px)) 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px) 0;
  order: 1;
}
/* the Ko-fi cup stands to the right of the banner, at the footer's end (user, 2026-11-24); its label ends with it */
body > footer > #kofi, body > footer > .ib-cup { order: 2; }
body > footer > #kofi::after { left: auto; right: 0; transform: none; }
body > footer .ib-go { padding: 0 4px 0 12px; }
body > footer .ib-x { width: 36px; }
body > footer .ib-logo { height: 30px; }
body > footer .ib-name { height: 28px; }
body > footer .ib-badge { height: 28px; }
body > footer .ib-t { max-width: 290px; }
}
@media (max-width: 640px) {
body.ib-on footer {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: 0; padding: 0; background: none; align-items: stretch;
}
body.ib-on footer > p { grid-area: 1 / 1; margin: 0; background: var(--bar); padding: 5px 5px 5px calc(14px + env(safe-area-inset-left, 0px)); }
body.ib-on footer > #kofi, body.ib-on footer > .ib-cup { grid-area: 1 / 2; background: var(--bar); padding: 0 calc(14px + env(safe-area-inset-right, 0px)) 0 5px; }
body.ib-on footer > #kofi::after { left: auto; right: 6px; transform: none; }
body.ib-on footer > .ib { grid-area: 2 / 1 / 3 / 3; padding-bottom: env(safe-area-inset-bottom, 0px); }
body.ib-on .ib { min-height: 54px; }
body.ib-on .ib-go { padding: 7px 0 7px calc(14px + env(safe-area-inset-left, 0px)); }
body.ib-on .ib-x { width: calc(44px + env(safe-area-inset-right, 0px)); padding-right: env(safe-area-inset-right, 0px); }
body.ib-on .ib-logo { height: 36px; }
body.ib-on .ib-name { height: 34px; }
body.ib-on .ib-3 .ib-logo { height: 30px; }
body.ib-on .ib-3 .ib-badge { height: 26px; }
}
