/* Concept switcher. One source for every concept; each concept colours it with the variables below.
   Generalised from Senia's (7 Oct 2026), with the two faults found in the study fixed: on a phone it sat over a
   product card's corner, and its links were about 26 px tall. Now it is bottom-centre, links are 44 px, and the page
   gets room at its end so the bar never covers the last content. */
.concepts {
  position: fixed;
  z-index: 9990;
  right: 16px;
  bottom: calc(var(--sw-bottom, 16px) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--sw-line, rgba(0, 0, 0, .22));
  background: var(--sw-bg, #fff);
  color: var(--sw-ink, #111);
  font: 500 13px/1.2 var(--sw-font, system-ui, -apple-system, "Segoe UI", sans-serif);
  box-sizing: border-box;
}
.concepts__label { padding: 0 8px 0 6px; opacity: .65; white-space: nowrap; }
.concepts__links { display: inline-flex; align-items: center; gap: 2px; }
/* The note is always there (Paul, 27 Oct 2026: "write SOMEWHERE that these designs are ONLY just concepts"): beside the names on a desktop,
   under them on a phone, and it stays when the links step aside or when there is only one concept. */
.concepts__note { display: block; max-width: 24em; padding: 4px 8px 4px 10px; font-size: 12px; line-height: 1.35; opacity: .8; border-left: 1px solid var(--sw-line, rgba(0, 0, 0, .22)); }
.concepts--solo .concepts__note, .concepts.away .concepts__note { border-left: 0; }
.concepts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0 12px;
  color: var(--sw-ink, #111);
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.concepts a[aria-current] { background: var(--sw-on-bg, #111); color: var(--sw-on-ink, #fff); }
.concepts a:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
/* stepping aside hides the names, never the note */
.concepts.away .concepts__links, .concepts.away .concepts__label { display: none; }
html.has-concepts-solo { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
@media print { .concepts { display: none; } }

/* Phone: bottom-centre, 44 px targets (WCAG 2.2 asks 24, the kit asks 44), no label. A concept with its own sticky
   bar at the bottom edge sets --sw-bottom to that bar's height plus 8 px. */
@media (max-width: 759px) {
  .concepts {
    right: 0;
    left: 0;
    margin-inline: auto;
    width: fit-content;
    max-width: calc(100vw - 16px);
    bottom: calc(var(--sw-bottom, 12px) + env(safe-area-inset-bottom, 0px));
    font-size: 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .concepts__label { display: none; }
  .concepts__links { justify-content: center; }
  .concepts__note { max-width: none; border-left: 0; border-top: 1px solid var(--sw-line, rgba(0, 0, 0, .22)); text-align: center; padding: 6px 8px 4px; }
  .concepts--solo .concepts__note, .concepts.away .concepts__note { border-top: 0; padding: 4px 8px; }
  .concepts a { min-height: 44px; min-width: 44px; padding: 0 16px; }
  html.has-concepts { padding-bottom: calc(var(--sw-clear, 112px) + var(--sw-bottom, 12px) + env(safe-area-inset-bottom, 0px)); }
}
