/* Black Canyon Software: the shell.
 *
 * Generated by brandkit. There is not one colour in this file - every one is a
 * custom property out of theme.css, which is what lets a palette change in one
 * place and reach everything. The sizes come out of tokens.css the same way.
 * Import them in this order:
 *
 *   @import url("theme/theme.css");
 *   @import url("template/fonts.css");
 *   @import url("template/tokens.css");
 *   @import url("template/base.css");
 *   @import url("template/components.css");
 *   @import url("template/layout.css");
 */

/* The texture, where the brand asked for one, goes on the frame: the
   header, the sidebars and the footer. Those are the large flat slabs
   around the content, and a faint pattern is what stops them reading as
   slabs. A card is small and already has a border and a shadow doing
   that work. It is "none" for most brands, which draws nothing. */
.bk-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--s-4); height: var(--header-h); padding: 0 var(--s-5); background: var(--texture), color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bk-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--accent) 60%, transparent); }
.bk-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.bk-brand img { height: 28px; width: auto; vertical-align: middle; } .bk-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.bk-product { padding-inline-start: var(--s-3); border-inline-start: 1px solid var(--line); font-weight: 700; color: var(--mute); }
.bk-nav { display: flex; gap: var(--s-1); margin-inline-start: var(--s-4); } .bk-nav a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 700; } .bk-nav a:hover { background: var(--hover); color: var(--accent); } .bk-nav a[aria-current="page"] { color: var(--accent); background: var(--selected); }
.bk-search { margin-inline-start: auto; width: min(320px, 28vw); } .bk-search .input { background: var(--page); }
.bk-actions { display: flex; align-items: center; gap: var(--s-2); }
.bk-menu-toggle { display: none; }


/* The foot of the page, on one row.
 *
 * The legal line at the near side, the secondary links pushed to the far side
 * by their *own* margin, and this brand's symbol at the very end. The margin
 * used to be on the symbol, which put the links hard against the copyright
 * with the whole gap on the other side of them.
 *
 * A maker's mark - "by SomeCompany" - is deliberately not here: under a logo
 * it belongs, and in the foot of an application it sits beside that
 * application's own symbol and reads as a claim about the page. */
.bk-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  padding: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--mute);
  background: var(--texture), var(--card);
}
/* A row, not the two stacked lines this used to be: a copyright and a domain
   are one sentence about who made the page, and giving them a line each made
   the foot taller than anything in it. */
.bk-small {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--s-3);
  font-size: var(--fs-sm);
}
.bk-small a { color: var(--accent); }

.bk-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin-inline-start: auto;
  font-size: var(--fs-sm);
}
.bk-footer nav a { color: var(--mute); }

.bk-footmark {
  width: 28px;
  height: 28px;
  margin-inline-start: var(--s-2);
  flex: 0 0 auto;
}

/* Too narrow for one row: the copyright and the symbol keep the first line -
   the two corners, which is the arrangement worth preserving - and the links
   take a line of their own underneath. */
@media (max-width: 820px) {
  .bk-footer nav { order: 3; flex-basis: 100%; margin-inline-start: 0; }
  .bk-footmark { margin-inline-start: auto; }
}
.app { --lw: var(--sidebar-w); --rw: var(--right-w); display: grid; grid-template-columns: var(--lw) minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); transition: grid-template-columns var(--t-med) var(--ease); }
.app.has-right { grid-template-columns: var(--lw) minmax(0, 1fr) var(--rw); }
.app.collapsed { --lw: var(--sidebar-w-collapsed); } .app.right-collapsed { --rw: var(--sidebar-w-collapsed); }
/* the toggle lives at the top of the sidebar, beside the primary action; the arrow points the way the sidebar will go */
.side-top { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.side-top .btn { flex: 1 1 auto; min-width: 0; } .side-top h3 { flex: 1 1 auto; font-size: var(--fs-md); margin: 0; }
.side-top .icon-btn { flex: none; } .side-top .icon-btn svg { transition: rotate var(--t-med) var(--ease); }
.sidebar.right { border-inline-end: 0; border-inline-start: 1px solid var(--line); }
.sidebar.right .panel { display: grid; gap: var(--s-4); align-content: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s-4); margin: 0; font-size: var(--fs-sm); } .kv dt { color: var(--mute); } .kv dd { margin: 0; text-align: end; font-weight: 700; }
.sidebar { width: 100%; /* fill its grid track; without it the right one shrank to content and floated 34px off the edge */ position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow: auto; padding: var(--s-4) var(--s-3); border-inline-end: 1px solid var(--line); background: var(--texture), var(--card); display: flex; flex-direction: column; gap: var(--s-1); }
.sidebar .grp { margin: var(--s-4) var(--s-3) var(--s-1); } .sidebar .grp:first-child { margin-top: 0; }
.side-link { display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; position: relative; }
.side-link:hover { background: var(--hover); } .side-link[aria-current="page"] { background: var(--selected); color: var(--accent); }
.side-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-link .count { margin-inline-start: auto; }
.app.collapsed .side-link span, .app.collapsed .sidebar:not(.right) .grp, .app.collapsed .side-link .count, .app.collapsed .side-foot, .app.collapsed .side-top .label { display: none; }
.app.collapsed .sidebar:not(.right) .side-top { flex-direction: column-reverse; } .app.collapsed .side-top .btn { flex: none; width: 44px; padding: 0; }
.app.right-collapsed .sidebar.right > :not(.side-top) { display: none; } .app.right-collapsed .sidebar.right .side-top h3 { display: none; }
.app.collapsed .side-link { justify-content: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-2); padding-top: var(--s-4); }
.content { padding: var(--s-6) var(--s-6) var(--s-8); max-width: var(--content-max); width: 100%; margin-inline: auto; }
.page-h { display: flex; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); } .page-h .crumbs { margin-bottom: var(--s-2); } .page-h p { margin-top: var(--s-2); color: var(--mute); max-width: 60ch; }
.section { margin-top: var(--s-7); } .section > header { margin-bottom: var(--s-4); padding-inline-start: var(--s-4); border-inline-start: 4px solid var(--brand); border-radius: 2px; } .section > header p { color: var(--mute); margin-top: 4px; max-width: 70ch; }
.section > header .piece { display: inline-block; margin-top: var(--s-2); }
.sw { border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; background: var(--card); } .sw i { display: block; height: 64px; } .sw div { padding: var(--s-2) var(--s-3); font-size: var(--fs-xs); } .sw b { display: block; font-size: var(--fs-sm); } .sw span { color: var(--mute); font-family: var(--mono); }
.assets { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.asset { display: grid; gap: var(--s-2); } .asset .stage { display: grid; place-items: center; min-height: 120px; padding: var(--s-4); border-radius: var(--r-md); border: 1px solid var(--line); } .asset .stage img { max-width: 100%; max-height: 80px; } .asset code { justify-self: start; font-size: 11px; cursor: copy; } .asset code:hover { border-color: var(--line-strong); color: var(--accent); } .asset code.copied::after { content: " ¹3 copied"; color: var(--ok); }
.asset .stage { transition: border-color var(--t-fast); } .asset:hover .stage { border-color: var(--line-strong); }
.stage.on-light { background: var(--page-light); } .stage.on-dark { background: var(--page-dark); } .stage.on-brand { background: var(--brand); } .stage.checker { background: conic-gradient(var(--line) 25%, transparent 0 50%, var(--line) 0 75%, transparent 0) 0 0 / 16px 16px; }
.type-row { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-4); align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); } .type-row:last-child { border: 0; }
.icon-cell { display: grid; place-items: center; gap: 6px; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); font-size: var(--fs-xs); color: var(--mute); }
.space-bar { height: 12px; background: var(--brand); border-radius: 3px; } .radius-box { height: 56px; border: 2px solid var(--accent); background: var(--selected); }
.elev { height: 72px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--card); font-size: var(--fs-sm); color: var(--mute); }
.auth { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; } .auth .side { padding: var(--s-6); background: var(--brand); color: var(--on-brand); display: grid; align-content: space-between; gap: var(--s-6); } .auth .side img { width: min(100%, 306px); height: auto; justify-self: start; } .auth .form { padding: var(--s-6); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; } .skip:focus { left: 8px; }

/* ═════ responsive ═════ */
@media (max-width: 1100px) {
  /* right sidebar becomes an overlay drawer; the Details button opens it */
  .app.has-right { grid-template-columns: var(--lw) minmax(0, 1fr); }
  .sidebar.right { position: fixed; z-index: 50; right: 0; top: var(--header-h); bottom: 0; width: min(340px, 100vw); translate: 100%; transition: translate var(--t-med) var(--ease); box-shadow: var(--shadow-3); }
  .app.right-open .sidebar.right { translate: 0; }
}
@media (max-width: 1000px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .bk-search { display: none; } .bk-product { display: none; }
}
@media (max-width: 820px) {
  .app, .app.collapsed, .app.has-right { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; left: 0; top: var(--header-h); bottom: 0; width: 280px; translate: -100%; transition: translate var(--t-med) var(--ease); box-shadow: var(--shadow-3); }
  .app.nav-open .sidebar:not(.right) { translate: 0; } #collapse-btn { display: none; } .side-top { margin-bottom: var(--s-3); } .app.collapsed .side-link span { display: inline; } .app.collapsed .side-link { justify-content: flex-start; }
  .bk-menu-toggle { display: inline-grid; } .bk-nav { display: none; }
  .content { padding: var(--s-5) var(--s-4) var(--s-7); }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } .auth { grid-template-columns: 1fr; } .type-row { grid-template-columns: 1fr; gap: 4px; }
  .bk-header { padding: 0 var(--s-4); gap: var(--s-2); }
}


/* A visible focus ring, on everything, always. An outline removed for being
   untidy is the single most common way a keyboard becomes unusable. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* One pair of images or glyphs per treatment, chosen by CSS rather than by
   script - a page that picks its own theme in JavaScript is the wrong colour
   until the script runs, which is a white flash on every load of a dark page.

   `revert` is avoided here for a related reason: it goes back to the browser's
   own value, which for an <img> is inline, so anything that wanted a block had
   to say so elsewhere - and somewhere else is exactly what causes this. */
.bk-only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .bk-only-light { display: none; }
  .bk-only-dark { display: inline-block; }
}
/* ...and the same again for an explicit choice, which beats the system one. */
:root[data-theme="dark"] .bk-only-light { display: none; }
:root[data-theme="dark"] .bk-only-dark { display: inline-block; }
:root[data-theme="light"] .bk-only-light { display: inline-block; }
:root[data-theme="light"] .bk-only-dark { display: none; }

/* Design standard: Material Design 3 (material). A top app bar is a flat 64 px
   surface with no rule under it; a navigation drawer item is a 56 px pill with
   its selection as a filled container, not a stripe on the edge. */
.bk-header { background: var(--card); backdrop-filter: none; border-bottom: 0; padding: 0 var(--s-4); }
.bk-header::after { display: none; }
.bk-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); font-weight: 500; }
.sidebar { padding: var(--s-3); }
.side-link { min-height: 56px; padding: 0 var(--s-4); border-radius: 28px; font: 500 var(--fs-sm) var(--font); letter-spacing: .1px; }
.side-link[aria-current="page"] { background: var(--selected); color: var(--ink); }
.side-link[aria-current="page"]::before { display: none; }
.bk-footer { border-top: 0; background: var(--card); }
