/* =====================================================================
   Page shell + page templates. Every page uses .ib-page with a header
   (.ib-pagehead), a main column and an optional info rail.
   ===================================================================== */
.ib-top { position: sticky; top: 0; z-index: 50; height: var(--ib-topbar); display: flex; align-items: center; gap: var(--s4);
  padding: 0 var(--s5); background: rgba(13, 15, 18, .94); backdrop-filter: blur(6px); border-bottom: var(--ib-bw) solid var(--ib-border); }
.ib-top__logo { display: flex; align-items: center; flex: none; }
.ib-top__logo img { height: 40px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.ib-top__logo { gap: 8px; text-decoration: none !important; }
.ib-top__tag { font: 700 var(--ib-fs-2xs) var(--ib-font-display); text-transform: uppercase; letter-spacing: .08em; color: var(--ib-text-muted);
  border: 1px solid var(--ib-border-strong); padding: 1px 5px; line-height: 1.4; white-space: nowrap; }
@media (max-width: 720px) { .ib-top__tag { display: none; } }
.ib-top__nav { display: flex; gap: 4px; margin-left: auto; }
@media (max-width: 1100px) { .ib-top__nav .ib-btn { padding: 0 18px; } .ib-top__nav .ib-btn span { display: none; } }
@media (max-width: 720px) { .ib-top { padding: 0 var(--s2); gap: var(--s2); } .ib-top__logo img { height: 28px; } .ib-top__nav { display: none; } }

.ib-hero { position: relative; min-height: 380px; display: grid; place-items: center; overflow: hidden; border-bottom: var(--ib-bw) solid var(--ib-border); }
.ib-hero::before { content: ""; position: absolute; inset: 0; background: url(../assets/hero.jpg) center 28% / cover; }
.ib-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,28,.1) 0%, rgba(20,24,28,.5) 55%, var(--ib-bg) 100%); }
.ib-hero__in { position: relative; z-index: 1; text-align: center; padding: var(--s6) var(--s4); width: min(760px, 100%); }
.ib-hero__logo { width: min(560px, 86vw); filter: drop-shadow(0 6px 0 rgba(0,0,0,.45)); }
.ib-hero__tag { margin: var(--s2) 0 var(--s5); font: 700 var(--ib-fs-sm) var(--ib-font-display); letter-spacing: .12em; color: #fff; text-shadow: var(--ib-text-shadow); text-transform: uppercase; }
.ib-hero .ib-search { max-width: none; }
.ib-hero .ib-search__box { height: 50px; font-size: var(--ib-fs-md); border-color: var(--ib-purple-500); }
.ib-hero__chips { margin-top: var(--s3); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.ib-main { max-width: var(--ib-max); margin: 0 auto; padding: var(--s5) var(--s5) var(--s8); }
@media (max-width: 720px) { .ib-main { padding: var(--s3); } }

.ib-crumbs { font-size: var(--ib-fs-xs); color: var(--ib-text-faint); margin-bottom: var(--s3); }
.ib-crumbs a { color: var(--ib-text-muted); }
.ib-crumbs span + span::before, .ib-crumbs a + span::before, .ib-crumbs span + a::before, .ib-crumbs a + a::before { content: " › "; color: var(--ib-text-faint); }

.ib-pagehead { display: flex; gap: var(--s4); align-items: center; margin-bottom: var(--s5); padding: var(--s4); background: var(--ib-surface);
  border: var(--ib-bw) solid var(--ib-border); box-shadow: var(--ib-bevel); border-left: 4px solid var(--kind, var(--ib-purple-500)); }
.ib-pagehead__icon { flex: none; width: 80px; height: 80px; display: grid; place-items: center; background: var(--ib-bg-deep); box-shadow: var(--ib-bevel-in); }
.ib-pagehead__icon .ib-icon { --sz: 64px; }
.ib-pagehead__t { min-width: 0; }
.ib-pagehead__id { font: var(--ib-fs-xs) var(--ib-font-mono); color: var(--ib-text-faint); }
.ib-pagehead__meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ib-pagehead__acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.ib-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--ib-rail); gap: var(--s5); align-items: start; }
.ib-cols > aside { position: sticky; top: calc(var(--ib-topbar) + var(--s4)); display: grid; gap: var(--s4); }
@media (max-width: 960px) { .ib-cols { grid-template-columns: 1fr; } .ib-cols > aside { position: static; } }

.ib-section { margin-bottom: var(--s6); }
.ib-section > .ib-h2:first-child { margin-top: 0; }
.ib-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 800px) { .ib-split { grid-template-columns: 1fr; } }

.ib-foot { border-top: var(--ib-bw) solid var(--ib-border); padding: var(--s5); text-align: center; color: var(--ib-text-faint); font-size: var(--ib-fs-xs); }
.ib-foot p { max-width: 900px; margin: 0 auto; line-height: 1.7; }

/* item browser grid */
.ib-itemgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 4px; }
.ib-itemgrid a { display: grid; place-items: center; height: 56px; background: var(--ib-bg-deep); box-shadow: inset 2px 2px 0 #000, inset -2px -2px 0 #3d424a; }
.ib-itemgrid a:hover { background: var(--ib-surface-3); }
.ib-itemgrid .ib-icon { --sz: 32px; }
.ib-filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.ib-select { background: var(--ib-bg-deep); color: var(--ib-text); border: var(--ib-bw) solid var(--ib-border-strong); padding: 6px 8px; font: var(--ib-fs-sm) var(--ib-font-body); }

.ib-loading { min-height: 60vh; display: grid; place-items: center; color: var(--ib-antos-500); font: var(--ib-fs-sm) var(--ib-font-mono); }
