/* SecureBasis design system 1.1.0: COMPONENTS. Load after tokens.css.
   Plain CSS, no framework, no CDN, no inline styles needed (works under a strict CSP).

   House rules (founder, TRACKER BP-124 / BP-125):
   - One instruction, one primary action and one result per screen; then Next.
   - One treatment per element class, on EVERY sibling: every primary button is the 3D blue keycap,
     every choice is a square 3D tile, every status is a chip, everywhere.
   - Icons sit LEFT of labels and replace serial numbers in lists (numbers only for true sequences).
   - Nothing that carries meaning is drawn smaller than about 28px (badges >= 32px, chips >= 28px tall).

   Naming: .bp-block, .bp-block__part, .bp-block--variant; tones and states are attributes
   (data-tone="positive|critical|negative|info|neutral|attested", data-state = the API value).
   Custom properties starting with --_ are private to a component; tokens (--bp-*) live in tokens.css.
   .is-hover / .is-active / .is-focus are static demo states for style guides only.

   Cascade layers: every rule here lives in a layer, and UNLAYERED CSS BEATS ANY LAYER whatever its
   specificity. Older CSS that shares a page with these components (the product's style.css, site CSS)
   must therefore go into the lowest layer, `legacy`, declared below and in tokens.css:
     @import url("style.css") layer(legacy);      or wrap the file in  @layer legacy { ... }
   New page CSS may stay unlayered but must never restyle a .bp-* class. See design/README.md. */

@layer legacy, bp.tokens, bp.base, bp.components;

/* ======================================================================== BASE */
@layer bp.base{
  *,*::before,*::after{box-sizing:border-box}
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{margin:0;background:var(--bp-bg);color:var(--bp-text);font-family:var(--bp-font-sans);font-size:var(--bp-text-base);
    line-height:var(--bp-leading-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
  h1,h2,h3,h4{margin:0;line-height:var(--bp-leading-tight);color:var(--bp-text);font-weight:var(--bp-weight-semibold);letter-spacing:-.01em;text-wrap:balance}
  h1{font-size:clamp(28px,3vw + 12px,var(--bp-text-4xl));font-weight:var(--bp-weight-bold)}
  h2{font-size:clamp(22px,1.6vw + 14px,var(--bp-text-3xl))}
  h3{font-size:var(--bp-text-xl)}
  h4{font-size:var(--bp-text-lg)}
  p{margin:0 0 var(--bp-space-3)}
  a{color:var(--bp-accent-text);text-decoration-thickness:1px;text-underline-offset:3px}
  a:hover{color:var(--bp-accent-text-hover);text-decoration-thickness:2px}
  code,kbd,samp,pre{font-family:var(--bp-font-mono);font-size:.9em}
  img,svg{max-width:100%}
  ::selection{background:var(--bp-surface-tint);color:var(--bp-text)}
  [hidden]{display:none !important}
  /* Focus: a gold ring outside a 2px gap, with a navy (light) or near-black (dark) edge, so one layer
     always reaches 3:1. The transparent outline keeps a visible ring in Windows forced colours. */
  :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid transparent;outline-offset:3px;
    box-shadow:0 0 0 2px var(--bp-focus-gap),0 0 0 5px var(--bp-focus),0 0 0 6.5px var(--bp-focus-edge)}
  :where(h1,h2,h3,main)[tabindex="-1"]:focus{outline:none;box-shadow:none}
}

@layer bp.components{

/* ======================================================================== LAYOUT HELPERS */
.bp-container{width:100%;max-width:1200px;margin-inline:auto;padding-inline:var(--bp-gutter)}
.bp-sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.bp-sprite{position:absolute;width:0;height:0;overflow:hidden}
.bp-skip{position:absolute;inset-inline-start:-9999px;top:8px;z-index:100;padding:10px 16px;border-radius:var(--bp-radius-md);
  background:var(--bp-brand-blue);color:var(--bp-text-on-accent);font-weight:var(--bp-weight-semibold)}
.bp-skip:focus{inset-inline-start:8px}
.bp-eyebrow{margin:0;font-size:var(--bp-text-sm);font-weight:var(--bp-weight-bold);letter-spacing:var(--bp-tracking-caps);text-transform:uppercase;color:var(--bp-accent-text)}
.bp-muted{color:var(--bp-text-muted)}
.bp-mono,.bp-hash{font-family:var(--bp-font-mono)}
.bp-hash{font-size:var(--bp-text-sm);overflow-wrap:anywhere;word-break:break-all}
.bp-card{background:var(--bp-surface);border:1px solid var(--bp-border);border-radius:var(--bp-radius-lg);box-shadow:var(--bp-elev-2);padding:var(--bp-space-6)}

/* ======================================================================== ICONS (three tiers)
   1. inline glyph  .bp-icon         next to a label (20px in buttons, 24px in text)
   2. flat chip     .bp-ichip        dense lists and banners (32 / 40px)
   3. 3D badge      .bp-badge        guide cards, tiles, rail, results, empty states (32..96px)   */
.bp-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;overflow:visible}
.bp-icon--24{width:24px;height:24px}
.bp-icon--28{width:28px;height:28px}

.bp-ichip{--_s:40px;display:inline-grid;place-items:center;flex:none;width:var(--_s);height:var(--_s);border-radius:25%;
  background:var(--bp-surface-tint);color:var(--bp-accent);border:1px solid var(--bp-border-brand)}
.bp-ichip>.bp-icon{width:calc(var(--_s) * .55);height:calc(var(--_s) * .55)}
.bp-ichip--sm{--_s:32px}
.bp-ichip[data-tone="positive"]{background:var(--bp-positive-bg);color:var(--bp-positive);border-color:var(--bp-positive-border)}
.bp-ichip[data-tone="critical"]{background:var(--bp-critical-bg);color:var(--bp-critical);border-color:var(--bp-critical-border)}
.bp-ichip[data-tone="negative"]{background:var(--bp-negative-bg);color:var(--bp-negative);border-color:var(--bp-negative-border)}
.bp-ichip[data-tone="neutral"]{background:var(--bp-neutral-bg);color:var(--bp-neutral);border-color:var(--bp-neutral-border)}
.bp-ichip[data-tone="attested"]{background:var(--bp-attested-bg);color:var(--bp-attested);border-color:var(--bp-attested-border)}

/* 3D floating badge: rounded square at 23% of its side, vertical gradient, 1.5px border, drop shadow
   dy = 4.8% / blur = 13.5% of the side (= dy 5 / stdDeviation 7 at the founder's 104px). */
.bp-badge{--_s:56px;--_top:var(--bp-badge-top);--_bottom:var(--bp-badge-bottom);--_border:var(--bp-badge-border);--_glyph:var(--bp-badge-glyph);
  position:relative;display:inline-grid;place-items:center;flex:none;width:var(--_s);height:var(--_s);border-radius:var(--bp-radius-badge);
  background:linear-gradient(180deg,var(--_top),var(--_bottom));border:1.5px solid var(--_border);color:var(--_glyph);
  box-shadow:inset 0 1px 0 var(--bp-badge-highlight),0 calc(var(--_s) * .048) calc(var(--_s) * .135) var(--bp-badge-shadow)}
.bp-badge>.bp-icon{width:calc(var(--_s) * .6);height:calc(var(--_s) * .6);stroke-width:1.75}
.bp-badge--xs{--_s:32px}
.bp-badge--sm{--_s:40px}
.bp-badge--md{--_s:56px}
.bp-badge--lg{--_s:72px}
.bp-badge--xl{--_s:96px}
.bp-badge--xl>.bp-icon{stroke-width:1.5}
.bp-badge[data-tone="positive"]{--_top:var(--bp-badge-positive-top);--_bottom:var(--bp-badge-positive-bottom);--_border:var(--bp-badge-positive-border);--_glyph:var(--bp-badge-positive-glyph)}
.bp-badge[data-tone="critical"]{--_top:var(--bp-badge-critical-top);--_bottom:var(--bp-badge-critical-bottom);--_border:var(--bp-badge-critical-border);--_glyph:var(--bp-badge-critical-glyph)}
.bp-badge[data-tone="negative"]{--_top:var(--bp-badge-negative-top);--_bottom:var(--bp-badge-negative-bottom);--_border:var(--bp-badge-negative-border);--_glyph:var(--bp-badge-negative-glyph)}
.bp-badge[data-tone="neutral"]{--_top:var(--bp-badge-neutral-top);--_bottom:var(--bp-badge-neutral-bottom);--_border:var(--bp-badge-neutral-border);--_glyph:var(--bp-badge-neutral-glyph)}
.bp-badge[data-tone="attested"]{--_top:var(--bp-badge-attested-top);--_bottom:var(--bp-badge-attested-bottom);--_border:var(--bp-badge-attested-border);--_glyph:var(--bp-badge-attested-glyph)}

/* ======================================================================== 3D BUTTONS
   A keycap: gradient face, top inner highlight, a solid bottom edge (--_e tall, --_e0 at rest) and a
   soft navy drop shadow. Hover lifts the face 2px and the edge grows by the same amount, so the base
   stays put; active presses the face down 3px (never past a 1px edge). Disabled is flat. Focus adds
   the gold ring on top of the 3D shadow. Under reduced motion the travel is 0 (tokens).
   Hover changes no colour (no filter): the lift says "hover", and the label contrast that
   tools/contrast.py proves for the resting face therefore holds while hovered too.
   Labels never clip: a button is never narrower than its label (min-width:auto keeps a flex or grid
   item at least as wide as its unwrapped label), and where width is constrained (--block, narrow
   guide cards) the label wraps inside the keycap instead. */
.bp-btn{--_h:var(--bp-control-h);--_e0:4px;--_e:var(--_e0);--_press:min(var(--bp-press),calc(var(--_e0) - 1px));--_edge:transparent;--_hl:transparent;
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:var(--_h);
  padding:6px 22px;margin:0;border:1px solid transparent;border-radius:var(--bp-radius-md);
  font-family:var(--bp-font-sans);font-size:var(--bp-text-base);font-weight:var(--bp-weight-semibold);line-height:1.25;letter-spacing:.005em;
  text-align:center;text-decoration:none;white-space:nowrap;max-width:100%;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;
  transform:translateY(0);
  transition:transform var(--bp-dur-base) var(--bp-ease-lift),box-shadow var(--bp-dur-base) var(--bp-ease-standard),
    background-color var(--bp-dur-fast) var(--bp-ease-standard),color var(--bp-dur-fast) var(--bp-ease-standard)}
.bp-btn:hover{text-decoration:none}
.bp-btn--lg{--_h:var(--bp-control-h-lg);padding-inline:28px;font-size:var(--bp-text-lg)}
.bp-btn--sm{--_h:var(--bp-control-h-sm);--_e0:3px;padding-inline:16px;font-size:15px}
.bp-btn--block{display:flex;width:100%;white-space:normal}
.bp-btn--icon{padding:0;width:var(--_h)}
.bp-btn .bp-icon{width:20px;height:20px}
.bp-btn--lg .bp-icon{width:22px;height:22px}

/* the 3D family: primary, secondary, danger */
.bp-btn:is(.bp-btn--primary,.bp-btn--secondary,.bp-btn--danger){
  box-shadow:inset 0 1px 0 var(--_hl),inset 0 -1px 0 rgba(0,0,0,.10),0 var(--_e) 0 var(--_edge),
    0 calc(var(--_e) + 5px) calc(var(--_e) * 2 + 8px) -3px var(--bp-btn-drop)}
/* The mid stop sits at 25% (tools/contrast.py reads it from this file): white labels
   keep 4.5:1 from 15% to 85% of the height, which covers a label that wraps to two lines. */
.bp-btn--primary{--_edge:var(--bp-btn-primary-edge);--_hl:rgba(255,255,255,.38);color:var(--bp-btn-primary-text);border-color:var(--bp-btn-primary-border);
  background:linear-gradient(180deg,var(--bp-btn-primary-top) 0%,var(--bp-btn-primary-mid) 25%,var(--bp-btn-primary-bottom) 100%);
  text-shadow:0 -1px 0 rgba(0,0,0,.18)}
.bp-btn--secondary{--_edge:var(--bp-btn-secondary-edge);--_hl:var(--bp-badge-highlight);color:var(--bp-btn-secondary-text);border-color:var(--bp-btn-secondary-border);
  background:linear-gradient(180deg,var(--bp-btn-secondary-top) 0%,var(--bp-btn-secondary-bottom) 100%)}
.bp-btn--danger{--_edge:var(--bp-btn-danger-edge);--_hl:rgba(255,255,255,.30);color:var(--bp-btn-danger-text);border-color:var(--bp-btn-danger-border);
  background:linear-gradient(180deg,var(--bp-btn-danger-top) 0%,var(--bp-btn-danger-mid) 25%,var(--bp-btn-danger-bottom) 100%);
  text-shadow:0 -1px 0 rgba(0,0,0,.2)}
.bp-btn--primary:hover,.bp-btn--primary.is-hover{color:var(--bp-btn-primary-text)}
.bp-btn--secondary:hover,.bp-btn--secondary.is-hover{color:var(--bp-btn-secondary-text)}
.bp-btn--danger:hover,.bp-btn--danger.is-hover{color:var(--bp-btn-danger-text)}
@media (hover:hover){
  .bp-btn:is(.bp-btn--primary,.bp-btn--secondary,.bp-btn--danger):hover:not(:disabled,[aria-disabled="true"],[aria-busy="true"]){
    --_e:calc(var(--_e0) - var(--bp-lift));transform:translateY(var(--bp-lift))}
}
.bp-btn:is(.bp-btn--primary,.bp-btn--secondary,.bp-btn--danger).is-hover{--_e:calc(var(--_e0) - var(--bp-lift));transform:translateY(var(--bp-lift))}
.bp-btn:is(.bp-btn--primary,.bp-btn--secondary,.bp-btn--danger):is(:active,.is-active):not(:disabled,[aria-disabled="true"],[aria-busy="true"]){
  --_e:calc(var(--_e0) - var(--_press));transform:translateY(var(--_press));transition-duration:var(--bp-dur-press)}
.bp-btn:is(.bp-btn--primary,.bp-btn--secondary,.bp-btn--danger):is(:focus-visible,.is-focus){outline:2px solid transparent;outline-offset:3px;
  box-shadow:0 0 0 2px var(--bp-focus-gap),0 0 0 5px var(--bp-focus),0 0 0 6.5px var(--bp-focus-edge),
    inset 0 1px 0 var(--_hl),0 var(--_e) 0 var(--_edge),0 calc(var(--_e) + 5px) calc(var(--_e) * 2 + 8px) -3px var(--bp-btn-drop)}

/* tertiary: quiet text button, flat everywhere (Back, Cancel, Learn more) */
.bp-btn--tertiary{color:var(--bp-accent-text);background:transparent;border-color:transparent;box-shadow:none;padding-inline:14px}
.bp-btn--tertiary:hover,.bp-btn--tertiary.is-hover{color:var(--bp-accent-text-hover);background:var(--bp-surface-tint)}

/* disabled: flat, no edge, no lift (also for aria-disabled links). A busy button is aria-disabled
   too, but keeps its 3D look so the user sees the action they started running. */
.bp-btn:is(:disabled,[aria-disabled="true"]):not([aria-busy="true"]),.bp-btn:is(:disabled,[aria-disabled="true"]):not([aria-busy="true"]):hover{
  color:var(--bp-btn-disabled-text);background:var(--bp-btn-disabled-bg);border-color:var(--bp-btn-disabled-border);
  box-shadow:none;text-shadow:none;transform:none;cursor:not-allowed}
.bp-btn--tertiary:is(:disabled,[aria-disabled="true"]){background:transparent;border-color:transparent}
/* busy: keeps its size and 3D look, shows a spinner in place of the icon, ignores pointer clicks.
   Keyboard activation (Enter, Space) still fires on a live <button>, so a handler must return early
   while aria-disabled="true" (README "Using it"). */
.bp-btn[aria-busy="true"]{transform:none;pointer-events:none}
.bp-btn[aria-busy="true"]>.bp-icon{display:none}

/* spinner (busy buttons, inline waits) */
.bp-spinner{display:inline-block;flex:none;width:20px;height:20px;border-radius:50%;border:2.5px solid currentColor;border-inline-end-color:transparent;
  animation:bp-spin .8s linear infinite}
@keyframes bp-spin{to{transform:rotate(360deg)}}

/* ======================================================================== SQUARE 3D TILES
   Choices such as Basis / Infra / Modules and each module. A <button aria-pressed>, a link, or a
   <label> wrapping a visually hidden radio. 168 x 168 by default; fluid inside .bp-tiles. */
.bp-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:20px 16px;padding-bottom:6px}
.bp-tile{--_e0:4px;--_e:var(--_e0);--_press:min(var(--bp-press),calc(var(--_e0) - 1px));--_s:var(--bp-tile-size);
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  width:var(--_s);min-height:var(--_s);padding:18px 12px 16px;margin:0;
  border:1px solid var(--bp-border);border-radius:var(--bp-radius-xl);
  background:linear-gradient(180deg,var(--bp-surface) 0%,var(--bp-surface-2) 100%);color:var(--bp-text);
  font:inherit;text-align:center;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;
  box-shadow:inset 0 1px 0 var(--bp-badge-highlight),0 var(--_e) 0 var(--bp-tile-edge),0 calc(var(--_e) + 6px) 18px -6px var(--bp-btn-drop);
  transform:translateY(0);
  transition:transform var(--bp-dur-base) var(--bp-ease-lift),box-shadow var(--bp-dur-base) var(--bp-ease-standard),border-color var(--bp-dur-fast)}
.bp-tiles>.bp-tile{width:auto;aspect-ratio:1}
.bp-tile:hover{color:var(--bp-text)}
.bp-tile>input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.bp-tile__label{display:block;font-size:var(--bp-text-lg);font-weight:var(--bp-weight-semibold);line-height:1.25}
.bp-tile__status{display:inline-flex;align-items:center;gap:6px;font-size:var(--bp-text-sm);line-height:1.3;color:var(--bp-text-muted)}
.bp-tile__status::before{content:"";width:8px;height:8px;flex:none;border-radius:50%;background:currentColor}
.bp-tile__status:has(.bp-icon)::before{display:none}
.bp-tile__status .bp-icon{width:16px;height:16px}
.bp-tile__status[data-tone="positive"]{color:var(--bp-positive)}
.bp-tile__status[data-tone="critical"]{color:var(--bp-critical)}
.bp-tile__status[data-tone="negative"]{color:var(--bp-negative)}
.bp-tile__status[data-tone="info"]{color:var(--bp-info)}
.bp-tile__status[data-tone="attested"]{color:var(--bp-attested)}
@media (hover:hover){
  .bp-tile:hover:not([aria-disabled="true"],:has(input:disabled)){--_e:calc(var(--_e0) - var(--bp-lift));transform:translateY(var(--bp-lift));border-color:var(--bp-accent)}
}
.bp-tile.is-hover{--_e:calc(var(--_e0) - var(--bp-lift));transform:translateY(var(--bp-lift));border-color:var(--bp-accent)}
.bp-tile:is(:active,.is-active):not([aria-disabled="true"],:has(input:disabled)){--_e:calc(var(--_e0) - var(--_press));transform:translateY(var(--_press));transition-duration:var(--bp-dur-press)}
.bp-tile:is(:focus-visible,:has(input:focus-visible),.is-focus){outline:2px solid transparent;outline-offset:3px;
  box-shadow:0 0 0 2px var(--bp-focus-gap),0 0 0 5px var(--bp-focus),0 0 0 6.5px var(--bp-focus-edge),0 var(--_e) 0 var(--bp-tile-edge)}
/* selected: blue outline, tinted face, a check in the corner */
.bp-tile:is([aria-pressed="true"],[aria-checked="true"],[aria-current="true"],:has(input:checked)){
  border-color:var(--bp-accent);background:linear-gradient(180deg,var(--bp-surface) 0%,var(--bp-surface-tint) 100%);
  outline:1px solid var(--bp-accent);outline-offset:-2px}
.bp-tile:is([aria-pressed="true"],[aria-checked="true"],[aria-current="true"],:has(input:checked))::after{content:"";position:absolute;top:10px;inset-inline-end:10px;
  width:24px;height:24px;border-radius:50%;background:var(--bp-brand-blue);box-shadow:0 2px 4px var(--bp-btn-drop)}
.bp-tile:is([aria-pressed="true"],[aria-checked="true"],[aria-current="true"],:has(input:checked))::before{content:"";position:absolute;top:15px;inset-inline-end:18.5px;z-index:1;
  width:6px;height:11px;border:solid var(--bp-text-on-accent);border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
/* locked / not entitled: flat, neutral badge, still readable */
.bp-tile:is([aria-disabled="true"],:has(input:disabled)){cursor:not-allowed;background:var(--bp-surface-2);border-style:dashed;border-color:var(--bp-neutral-border);
  box-shadow:none;transform:none}
.bp-tile:is([aria-disabled="true"],:has(input:disabled)) .bp-badge{--_top:var(--bp-badge-neutral-top);--_bottom:var(--bp-badge-neutral-bottom);
  --_border:var(--bp-badge-neutral-border);--_glyph:var(--bp-badge-neutral-glyph);box-shadow:none}

/* ======================================================================== SHELL BAR
   SAP-style dark shell: product mark + name, a SID context switcher, an environment tag and the
   user menu, over a gold structural rule. Menus are <details> (work without JavaScript; the app
   may close them on outside click / Escape). */
.bp-shell{--bp-focus-gap:var(--bp-shell-bg);--bp-focus-edge:var(--bp-shell-bg);
  position:sticky;top:0;z-index:var(--bp-z-shell);background:var(--bp-shell-bg);color:var(--bp-shell-text);border-bottom:3px solid var(--bp-shell-rule)}
.bp-shell__inner{display:flex;align-items:center;gap:10px 14px;min-height:var(--bp-shell-h);padding-inline:var(--bp-gutter);margin-inline:auto}
.bp-shell__brand{display:flex;align-items:center;gap:12px;min-width:0;color:inherit;text-decoration:none;border-radius:var(--bp-radius-sm)}
.bp-shell__brand:hover{color:inherit}
.bp-shell__mark{width:32px;height:32px;flex:none;border-radius:23%;box-shadow:0 2px 6px rgba(0,0,0,.35)}
.bp-shell__name{font-size:var(--bp-text-md);font-weight:var(--bp-weight-bold);letter-spacing:var(--bp-tracking-brand);text-transform:uppercase;white-space:nowrap}
.bp-shell__product{font-size:var(--bp-text-md);color:var(--bp-shell-text-muted);white-space:nowrap;padding-inline-start:12px;border-inline-start:1px solid var(--bp-shell-control-border)}
.bp-shell__spacer{flex:1 1 auto}
.bp-shell__tag{display:inline-flex;align-items:center;gap:6px;font-size:var(--bp-text-xs);font-weight:var(--bp-weight-bold);letter-spacing:.06em;text-transform:uppercase;
  color:var(--bp-shell-tag);border:1px solid currentColor;border-radius:var(--bp-radius-pill);padding:3px 10px;white-space:nowrap}
.bp-shell__btn{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:4px 10px 4px 12px;border-radius:var(--bp-radius-md);
  border:1px solid var(--bp-shell-control-border);background:rgba(255,255,255,.05);color:var(--bp-shell-text);
  font:var(--bp-weight-semibold) var(--bp-text-md)/1.2 var(--bp-font-sans);cursor:pointer;list-style:none;white-space:nowrap;
  transition:background-color var(--bp-dur-fast),border-color var(--bp-dur-fast)}
.bp-shell__btn::-webkit-details-marker{display:none}
.bp-shell__btn:hover,.bp-menu[open]>.bp-shell__btn{background:var(--bp-shell-bg-hover);border-color:rgba(255,255,255,.55)}
.bp-shell__btn .bp-icon{width:20px;height:20px}
.bp-shell__sid{font-family:var(--bp-font-mono);font-weight:var(--bp-weight-bold);font-size:15px;letter-spacing:.04em}
.bp-shell__desc{font-weight:var(--bp-weight-regular);color:var(--bp-shell-text-muted)}
.bp-shell__who{display:grid;text-align:start;line-height:1.2}
.bp-shell__who b{font-weight:var(--bp-weight-semibold)}
.bp-shell__who span{font-size:var(--bp-text-xs);font-weight:var(--bp-weight-regular);color:var(--bp-shell-text-muted)}
.bp-menu__chev{transition:transform var(--bp-dur-fast) var(--bp-ease-standard)}
.bp-menu[open] .bp-menu__chev{transform:rotate(180deg)}
.bp-avatar{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;
  background:linear-gradient(180deg,var(--bp-btn-secondary-top),var(--bp-btn-secondary-bottom));color:var(--bp-btn-secondary-text);
  border:1.5px solid var(--bp-btn-secondary-border);font-size:13px;font-weight:var(--bp-weight-bold);letter-spacing:.02em;
  box-shadow:inset 0 1px 0 var(--bp-badge-highlight),0 2px 5px rgba(0,0,0,.25)}
@media (max-width:719px){
  .bp-shell__product,.bp-shell__desc,.bp-shell__who{display:none}
  .bp-shell__name{font-size:var(--bp-text-sm);letter-spacing:.1em}
  .bp-shell__inner{gap:8px}
  /* the environment tag (demo / evaluation licence) must stay visible: it becomes a 32px icon chip
     in the same gold outline, and its words stay in the page for screen readers (and as a title
     tooltip when the markup sets one). A tag without the icon + text markup is informational only
     (e.g. a version) and is hidden. */
  .bp-shell__tag:has(.bp-icon + .bp-shell__tag-text){width:32px;height:32px;padding:0;justify-content:center;flex:none}
  .bp-shell__tag:has(.bp-icon + .bp-shell__tag-text) .bp-icon{width:18px;height:18px}
  .bp-shell__tag-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .bp-shell__tag:not(:has(.bp-icon + .bp-shell__tag-text)){display:none}
}
@media (max-width:479px){
  /* phones: with a SID switcher and a user menu the mark alone names the product */
  .bp-shell__inner:has(.bp-menu) .bp-shell__name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .bp-shell__ctx-icon{display:none}
}
@media (max-width:359px){
  /* the smallest phones: any shell control (menu, segmented theme switch) leaves room for the mark only */
  .bp-shell__inner:has(.bp-segmented) .bp-shell__name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* menus and popovers */
.bp-menu{position:relative}
.bp-menu>summary{list-style:none}
.bp-menu>summary::-webkit-details-marker{display:none}
.bp-popover{position:absolute;inset-block-start:calc(100% + 10px);inset-inline-start:0;z-index:var(--bp-z-popover);
  min-width:300px;max-width:min(380px,calc(100vw - 2 * var(--bp-gutter)));padding:8px;
  background:var(--bp-surface);color:var(--bp-text);border:1px solid var(--bp-border);border-radius:var(--bp-radius-lg);box-shadow:var(--bp-elev-4);
  --bp-focus-gap:var(--bp-surface)}
.bp-popover--end{inset-inline-start:auto;inset-inline-end:0}
.bp-popover__head{padding:8px 12px 6px;margin:0;font-size:var(--bp-text-sm);font-weight:var(--bp-weight-semibold);color:var(--bp-text-muted)}
.bp-popover__list{list-style:none;margin:0;padding:0}
.bp-popover__item{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:8px 12px;border:0;border-radius:var(--bp-radius-md);
  background:none;color:var(--bp-text);font:inherit;text-align:start;text-decoration:none;cursor:pointer}
.bp-popover__item:hover{background:var(--bp-surface-2);color:var(--bp-text)}
.bp-popover__item[aria-current="true"]{background:var(--bp-surface-tint)}
.bp-popover__item>.bp-icon:last-child{margin-inline-start:auto;color:var(--bp-accent)}
.bp-popover__body{display:grid;min-width:0;line-height:1.3}
.bp-popover__body b{font-weight:var(--bp-weight-semibold)}
.bp-popover__body span{font-size:var(--bp-text-sm);color:var(--bp-text-muted)}
.bp-popover__sep{height:1px;margin:6px 4px;background:var(--bp-border);border:0}
@media (max-width:719px){
  .bp-shell .bp-popover{position:fixed;inset-block-start:calc(var(--bp-shell-h) + 10px);inset-inline:var(--bp-gutter);min-width:0;max-width:none}
}

/* ======================================================================== MISSION RAIL
   The journey (licence -> ... -> done) as stage badges. Wide containers (880px and up) show badges
   + labels joined by a track. Narrow ones (phones, side panels) show a row of 28px keys plus the
   "now" line. State is never colour alone (WCAG 1.4.1), in either layout:
     done = filled + a check, attention = filled + "!", current = filled + a dot inside a gold ring,
     todo = an empty well. In the narrow layout the "now" line must also name, in words, every stage
     that needs attention: <p class="bp-rail__now">... <span class="bp-chip" data-tone="critical">
     <svg ...warning/>Basis checks needs attention</span></p> (the suite checks it). */
.bp-rail{container-type:inline-size;width:100%}
.bp-rail__list{list-style:none;margin:0;padding:0;display:flex;gap:4px}
.bp-rail__item{flex:1 1 0;min-width:0;position:relative}
.bp-rail__item .bp-badge,.bp-rail__label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bp-rail__item::after{content:"";display:block;height:28px;border-radius:8px;background:var(--bp-surface-sunken);box-shadow:inset 0 0 0 1px var(--bp-border)}
.bp-rail__item[data-state="done"]::after{background:var(--bp-positive);box-shadow:inset 0 1px 0 rgba(255,255,255,.22)}
.bp-rail__item[data-state="current"]::after{background:var(--bp-accent);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 0 0 2px var(--bp-brand-gold)}
.bp-rail__item[data-state="attention"]::after{background:var(--bp-critical);box-shadow:inset 0 1px 0 rgba(255,255,255,.22)}
@container (width < 880px){
  /* the marks inside the keys; drawn in the surface colour, which reads at 5:1 or more on every fill */
  .bp-rail__item[data-state="done"]::before{content:"";position:absolute;z-index:1;inset-inline-start:50%;top:50%;width:6px;height:11px;
    border:solid var(--bp-surface);border-width:0 2.5px 2.5px 0;transform:translate(-50%,-62%) rotate(45deg)}
  [dir="rtl"] .bp-rail__item[data-state="done"]::before{transform:translate(50%,-62%) rotate(45deg)}
  .bp-rail__item[data-state="attention"]::before{content:"!";position:absolute;z-index:1;inset:0;display:grid;place-items:center;
    color:var(--bp-surface);font:var(--bp-weight-bold) 17px/1 var(--bp-font-sans)}
  .bp-rail__item[data-state="current"]::before{content:"";position:absolute;z-index:1;inset:0;margin:auto;width:8px;height:8px;border-radius:50%;
    background:var(--bp-surface)}
}
.bp-rail__now{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:14px 0 0;font-size:var(--bp-text-base);color:var(--bp-text-muted)}
.bp-rail__now b{color:var(--bp-text);font-weight:var(--bp-weight-semibold)}
@container (min-width:880px){
  .bp-rail__list{gap:0}
  .bp-rail__item{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding-inline:2px}
  .bp-rail__item::after{display:none}
  .bp-rail__item .bp-badge,.bp-rail__label{position:relative;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal}
  .bp-rail__item .bp-badge{--_s:40px;z-index:1;width:var(--_s);height:var(--_s)}
  .bp-rail__label{font-size:var(--bp-text-sm);line-height:1.3;color:var(--bp-text-muted);max-width:11ch}
  /* track between badge centres */
  .bp-rail__item+.bp-rail__item::before{content:"";position:absolute;top:18.5px;inset-inline-end:50%;width:100%;height:3px;border-radius:2px;background:var(--bp-border)}
  .bp-rail__item[data-state="done"]+.bp-rail__item::before{background:var(--bp-positive)}  /* travelled: the stage before is done */
  .bp-rail__item[data-state="done"] .bp-badge{--_top:var(--bp-badge-positive-top);--_bottom:var(--bp-badge-positive-bottom);--_border:var(--bp-badge-positive-border);--_glyph:var(--bp-badge-positive-glyph)}
  .bp-rail__item[data-state="todo"] .bp-badge{--_top:var(--bp-badge-neutral-top);--_bottom:var(--bp-badge-neutral-bottom);--_border:var(--bp-badge-neutral-border);--_glyph:var(--bp-badge-neutral-glyph);box-shadow:none}
  .bp-rail__item[data-state="attention"] .bp-badge{--_top:var(--bp-badge-critical-top);--_bottom:var(--bp-badge-critical-bottom);--_border:var(--bp-badge-critical-border);--_glyph:var(--bp-badge-critical-glyph)}
  .bp-rail__item[data-state="current"] .bp-badge{--_s:48px;margin-top:-4px;margin-bottom:-4px;
    box-shadow:0 0 0 3px var(--bp-surface),0 0 0 6px var(--bp-brand-gold),0 calc(var(--_s) * .048) calc(var(--_s) * .135) var(--bp-badge-shadow)}
  .bp-rail__item[data-state="current"] .bp-rail__label{color:var(--bp-text);font-weight:var(--bp-weight-semibold)}
  .bp-rail__item[data-state="done"] .bp-rail__label{color:var(--bp-text)}
  .bp-rail__item[data-state="attention"] .bp-rail__label{color:var(--bp-critical);font-weight:var(--bp-weight-semibold)}
  .bp-rail__now{display:none}
}
/* wide layout: done and attention badges carry a corner mark, so the state is not colour alone */
.bp-rail__item[data-state="attention"] .bp-badge::after{content:"!";position:absolute;inset-block-end:-5px;inset-inline-end:-5px;display:grid;place-items:center;
  width:16px;height:16px;border-radius:50%;background:var(--bp-critical);color:var(--bp-surface);box-shadow:0 0 0 2px var(--bp-surface);
  font:var(--bp-weight-bold) 11px/1 var(--bp-font-sans)}
.bp-rail__item[data-state="done"] .bp-badge::after{content:"";position:absolute;inset-block-end:-5px;inset-inline-end:-5px;width:16px;height:16px;border-radius:50%;
  background:var(--bp-positive);box-shadow:0 0 0 2px var(--bp-surface)}
.bp-rail__item[data-state="done"] .bp-badge::before{content:"";position:absolute;z-index:1;inset-block-end:-0.5px;inset-inline-end:0.5px;width:4px;height:7px;
  border:solid var(--bp-surface);border-width:0 2px 2px 0;transform:rotate(45deg)}

/* ======================================================================== GUIDE CARD
   ONE step: "Step N of M", one instruction headline, one line of why, ONE primary 3D action,
   one result, then Next. Before the result the action is the primary and Next is disabled; once
   the result is in, Next becomes the primary and the action drops to secondary ("Run again").
   The order never changes between states, so nothing jumps under the user's pointer:
     meta, badge, title, why, .bp-guide__action, then .bp-guide__wait OR .bp-result, then the footer.
   The footer is always Back (tertiary, left) and Next or the forward action (right); "Run again"
   lives in the action area. When the card's content box is under 400px (a phone, a side panel,
   400% zoom) the actions go full width and the footer stacks with the forward action on top. */
.bp-guide{--bp-focus-gap:var(--bp-surface);container:bp-guide/inline-size;position:relative;width:100%;max-width:720px;margin-inline:auto;
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:0;
  padding:40px 48px 32px;background:var(--bp-surface);border:1px solid var(--bp-border);border-radius:var(--bp-radius-2xl);box-shadow:var(--bp-elev-3)}
.bp-guide__meta{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 22px}
.bp-guide__step{font-size:var(--bp-text-sm);font-weight:var(--bp-weight-bold);letter-spacing:var(--bp-tracking-caps);text-transform:uppercase;color:var(--bp-accent-text)}
.bp-guide__badge{margin:0 0 22px}
.bp-guide__title{margin:0 0 12px;font-size:clamp(24px,1.4vw + 16px,var(--bp-text-3xl));font-weight:var(--bp-weight-semibold);line-height:1.22;max-width:30ch}
.bp-guide__why{margin:0 0 28px;font-size:var(--bp-text-lg);line-height:1.5;color:var(--bp-text-muted);max-width:52ch}
.bp-guide__action{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;width:100%;margin:0 0 24px}
.bp-guide__wait{display:grid;gap:10px;width:100%;max-width:440px;margin:0 0 24px;text-align:start}
.bp-guide .bp-result{width:100%;margin:0 0 24px;text-align:start}
.bp-guide__footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;width:100%;padding-top:20px;border-top:1px solid var(--bp-border)}
.bp-guide__footer>:only-child{margin-inline-start:auto}
@media (max-width:599px){
  .bp-guide{padding:28px 20px 22px;border-radius:var(--bp-radius-xl)}
  .bp-guide__badge{margin-bottom:18px}
  .bp-guide__why{font-size:var(--bp-text-base);margin-bottom:22px}
}
/* narrow card: full-width actions; the footer stacks with the forward action on top (the visual
   order is reversed, the tab order stays Back, then Next). A container query measures the content
   box: 400px of content is a 442px card on a phone, a 498px card at the desktop padding. Back +
   "Plan the change" need about 320px side by side, so wider cards keep the row. */
@container bp-guide (width < 400px){
  .bp-guide__action>.bp-btn{width:100%;white-space:normal}
  .bp-guide__footer{flex-direction:column-reverse;align-items:stretch;gap:8px}
  .bp-guide__footer>.bp-btn{width:100%;white-space:normal;padding-inline:16px}
  .bp-guide__footer>:only-child{margin-inline-start:0}
}

/* ======================================================================== RESULT BLOCK (inside a guide card)
   One icon, one sentence, one "evidence" link, the same everywhere. There is no visible title: the
   badge icon shows the tone (success / warning / error / information) and the sentence starts with
   the tone word for screen readers: <p class="bp-result__text"><span class="bp-sr-only">Warning: </span>...</p> */
.bp-result{--_tone:var(--bp-info);--_bg:var(--bp-info-bg);--_line:var(--bp-info-border);
  display:flex;align-items:flex-start;gap:16px;padding:16px 18px;border:1px solid var(--_line);border-inline-start:4px solid var(--_tone);
  border-radius:var(--bp-radius-lg);background:var(--_bg);color:var(--bp-text)}
.bp-result[data-tone="positive"]{--_tone:var(--bp-positive);--_bg:var(--bp-positive-bg);--_line:var(--bp-positive-border)}
.bp-result[data-tone="critical"]{--_tone:var(--bp-critical);--_bg:var(--bp-critical-bg);--_line:var(--bp-critical-border)}
.bp-result[data-tone="negative"]{--_tone:var(--bp-negative);--_bg:var(--bp-negative-bg);--_line:var(--bp-negative-border)}
.bp-result__body{flex:1;min-width:0;display:grid;gap:6px;padding-top:2px}
.bp-result__text{margin:0;font-size:var(--bp-text-base);line-height:1.5}
.bp-evidence{display:inline-flex;align-items:center;gap:6px;width:fit-content;font-weight:var(--bp-weight-semibold);color:var(--bp-accent-text);text-decoration:none;border-radius:var(--bp-radius-xs)}
.bp-evidence:hover{text-decoration:underline}
.bp-evidence .bp-icon{width:18px;height:18px}
.bp-evidence code{font-size:.92em;font-weight:var(--bp-weight-bold)}

/* ======================================================================== BANNER (page-level message strip) */
.bp-banner{--_tone:var(--bp-info);--_bg:var(--bp-info-bg);--_line:var(--bp-info-border);
  display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-areas:"icon text action close";align-items:center;
  padding:10px 12px 10px 14px;border:1px solid var(--_line);
  border-inline-start:4px solid var(--_tone);border-radius:var(--bp-radius-md);background:var(--_bg);color:var(--bp-text)}
.bp-banner>.bp-ichip,.bp-banner>.bp-badge,.bp-banner>.bp-icon{grid-area:icon;margin-inline-end:14px}
.bp-banner[data-tone="positive"]{--_tone:var(--bp-positive);--_bg:var(--bp-positive-bg);--_line:var(--bp-positive-border)}
.bp-banner[data-tone="critical"]{--_tone:var(--bp-critical);--_bg:var(--bp-critical-bg);--_line:var(--bp-critical-border)}
.bp-banner[data-tone="negative"]{--_tone:var(--bp-negative);--_bg:var(--bp-negative-bg);--_line:var(--bp-negative-border)}
.bp-banner[data-tone="neutral"]{--_tone:var(--bp-neutral);--_bg:var(--bp-neutral-bg);--_line:var(--bp-neutral-border)}
.bp-banner__text{grid-area:text;margin:0;font-size:15px;line-height:1.45}
.bp-banner__text b{font-weight:var(--bp-weight-semibold)}
.bp-banner__action{grid-area:action;margin-inline-start:16px;font-weight:var(--bp-weight-semibold);white-space:nowrap}
.bp-banner>.bp-banner__close{grid-area:close;margin-inline-start:6px}
@media (max-width:599px){
  .bp-banner{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"icon text close" ". action .";align-items:start}
  .bp-banner__action{margin:6px 0 2px;justify-self:start}
  .bp-banner>.bp-banner__close{margin-block-start:-4px}
}
.bp-banner__close,.bp-toast__close{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:0;border-radius:var(--bp-radius-sm);
  background:transparent;color:var(--bp-text-muted);cursor:pointer}
.bp-banner__close:hover{background:rgba(127,127,127,.14);color:var(--bp-text)}

/* ======================================================================== STATUS CHIPS
   data-state takes the API value directly (evidence states, run-step states). The icon is a child
   <svg class="bp-icon"> (see STATE_ICON in icons/icons.js); the word always carries the meaning. */
.bp-chip{--_tone:var(--bp-neutral);--_bg:var(--bp-neutral-bg);--_line:var(--bp-neutral-border);
  display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:3px 10px 3px 8px;border:1px solid var(--_line);border-radius:var(--bp-radius-sm);
  background:var(--_bg);color:var(--_tone);font-size:var(--bp-text-sm);font-weight:var(--bp-weight-semibold);line-height:1.2;white-space:nowrap;vertical-align:middle}
.bp-chip .bp-icon{width:16px;height:16px;stroke-width:2.25}
.bp-chip:is([data-tone="positive"],[data-state="verified"],[data-state="done"],[data-state="approved"]){--_tone:var(--bp-positive);--_bg:var(--bp-positive-bg);--_line:var(--bp-positive-border)}
.bp-chip:is([data-tone="attested"],[data-state="self_attested"],[data-state="awaiting_approval"],[data-state="waiting_approval"]){--_tone:var(--bp-attested);--_bg:var(--bp-attested-bg);--_line:var(--bp-attested-border)}
.bp-chip:is([data-tone="negative"],[data-state="failed"],[data-state="frozen"],[data-state="aborted"]){--_tone:var(--bp-negative);--_bg:var(--bp-negative-bg);--_line:var(--bp-negative-border)}
.bp-chip:is([data-tone="critical"],[data-state="stale"],[data-state="blocked"]){--_tone:var(--bp-critical);--_bg:var(--bp-critical-bg);--_line:var(--bp-critical-border)}
.bp-chip:is([data-tone="info"],[data-state="open"],[data-state="running"],[data-state="planned"],[data-state="pending"]){--_tone:var(--bp-info);--_bg:var(--bp-info-bg);--_line:var(--bp-info-border)}
.bp-chip:is([data-state="never_probed"],[data-state="skipped"]){border-style:dashed}
/* ranks EXPOSED < GUARDED < HARDENED < FORTIFIED < CLEARED (existing kit semantics) */
.bp-rank{--_tone:var(--bp-info);--_bg:var(--bp-info-bg);--_line:var(--bp-info-border);
  display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:3px 10px 3px 8px;border:1px solid var(--_line);border-radius:var(--bp-radius-sm);
  background:var(--_bg);color:var(--_tone);font-size:var(--bp-text-sm);font-weight:var(--bp-weight-bold);letter-spacing:var(--bp-tracking-caps);white-space:nowrap}
.bp-rank .bp-icon{width:16px;height:16px;stroke-width:2.25}
.bp-rank[data-rank="EXPOSED"]{--_tone:var(--bp-negative);--_bg:var(--bp-negative-bg);--_line:var(--bp-negative-border)}
.bp-rank[data-rank="CLEARED"]{--_tone:var(--bp-positive);--_bg:var(--bp-positive-bg);--_line:var(--bp-positive-border)}
/* count pill (nav, tabs): carries meaning ("Approvals 3"), so it meets the 28px floor */
.bp-count{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:14px;background:var(--bp-brand-blue);color:var(--bp-text-on-accent);
  font-size:var(--bp-text-sm);font-weight:var(--bp-weight-bold);line-height:1;vertical-align:middle}

/* ======================================================================== SEGMENTED CONTROL (small exclusive settings, e.g. theme)
   A <fieldset> of radios; not for choices that start work (those are tiles). */
.bp-segmented{display:inline-flex;gap:2px;margin:0;padding:3px;border:1px solid var(--bp-border);border-radius:var(--bp-radius-md);background:var(--bp-surface-sunken)}
.bp-segmented>legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bp-segmented label{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:4px 12px;border-radius:7px;
  color:var(--bp-text-muted);font-size:var(--bp-text-md);font-weight:var(--bp-weight-semibold);cursor:pointer;white-space:nowrap}
.bp-segmented input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.bp-segmented .bp-icon{width:18px;height:18px}
.bp-segmented label:hover{color:var(--bp-text)}
.bp-segmented label:has(input:checked){background:var(--bp-surface);color:var(--bp-text);box-shadow:var(--bp-elev-2)}
.bp-segmented label:has(input:focus-visible){box-shadow:0 0 0 2px var(--bp-focus-gap),0 0 0 5px var(--bp-focus),0 0 0 6.5px var(--bp-focus-edge)}
.bp-shell .bp-segmented{background:rgba(255,255,255,.06);border-color:var(--bp-shell-control-border)}
.bp-shell .bp-segmented label{color:var(--bp-shell-text-muted)}
.bp-shell .bp-segmented label:hover{color:var(--bp-shell-text)}
.bp-shell .bp-segmented label:has(input:checked){background:var(--bp-shell-bg-hover);color:var(--bp-shell-text);box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
@media (max-width:719px){ .bp-segmented--compact span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap} }

/* ======================================================================== ICON-LED LIST (icons replace serial numbers) */
.bp-list{list-style:none;margin:0;padding:0}
.bp-list__item{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:14px 0;border-bottom:1px solid var(--bp-border)}
.bp-list__item:last-child{border-bottom:0}
.bp-list__body{flex:1 1 200px;min-width:0;display:grid;gap:2px}
.bp-list__title{font-weight:var(--bp-weight-semibold);line-height:1.35}
.bp-list__meta{font-size:var(--bp-text-md);color:var(--bp-text-muted);line-height:1.4}
.bp-list__end{margin-inline-start:auto}
@media (max-width:599px){ .bp-list__item>.bp-ichip+.bp-list__body+.bp-list__end{margin-inline-start:54px} }

/* ======================================================================== PROGRESS (native <progress>) */
.bp-meter{display:grid;gap:8px}
.bp-meter__head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:var(--bp-text-md)}
.bp-meter__label{font-weight:var(--bp-weight-semibold);color:var(--bp-text)}
.bp-meter__value{font-family:var(--bp-font-mono);color:var(--bp-text-muted)}
.bp-progress{-webkit-appearance:none;appearance:none;display:block;width:100%;height:12px;border:0;border-radius:var(--bp-radius-pill);overflow:hidden;
  background:var(--bp-surface-sunken);color:var(--bp-accent);box-shadow:inset 0 1px 2px rgba(10,46,92,.14),inset 0 0 0 1px var(--bp-border)}
.bp-progress::-webkit-progress-bar{background:transparent;border-radius:var(--bp-radius-pill)}
.bp-progress::-webkit-progress-value{border-radius:var(--bp-radius-pill);
  background:linear-gradient(180deg,var(--bp-btn-primary-top),var(--bp-btn-primary-bottom));box-shadow:inset 0 1px 0 rgba(255,255,255,.35);
  transition:inline-size var(--bp-dur-slow) var(--bp-ease-standard)}
.bp-progress::-moz-progress-bar{border-radius:var(--bp-radius-pill);background:linear-gradient(180deg,var(--bp-btn-primary-top),var(--bp-btn-primary-bottom))}
.bp-progress[data-tone="positive"]::-webkit-progress-value{background:var(--bp-positive)}
.bp-progress[data-tone="positive"]::-moz-progress-bar{background:var(--bp-positive)}
/* indeterminate: a 38% segment glides from end to end and back. Background-position 0% and 100% put
   the segment flush with each end, so the whole segment is on the track in every frame: the wait
   never reads as an empty (0%) or stalled bar. */
.bp-progress:indeterminate{background:linear-gradient(90deg,transparent,var(--bp-accent) 22%,var(--bp-accent) 78%,transparent) no-repeat,var(--bp-surface-sunken);
  background-size:38% 100%,auto;background-position:0% 0,0 0;animation:bp-indeterminate 1.1s ease-in-out infinite alternate}
.bp-progress:indeterminate::-webkit-progress-bar{background:transparent}
.bp-progress:indeterminate::-moz-progress-bar{background:transparent}
@keyframes bp-indeterminate{from{background-position:0% 0,0 0}to{background-position:100% 0,0 0}}

/* ======================================================================== WIZARD: one question per screen */
.bp-question{display:grid;gap:10px;width:100%;max-width:560px;margin:0 auto;padding:0;border:0;min-width:0;text-align:start}
.bp-question__title{display:block;padding:0;margin:0 0 2px;font-size:clamp(22px,1vw + 16px,var(--bp-text-2xl));font-weight:var(--bp-weight-semibold);line-height:1.25;color:var(--bp-text)}
.bp-question__why{margin:0 0 8px;color:var(--bp-text-muted);font-size:var(--bp-text-base)}
.bp-field{display:grid;gap:8px}
.bp-label{font-size:var(--bp-text-md);font-weight:var(--bp-weight-semibold);color:var(--bp-text)}
.bp-input{width:100%;min-height:var(--bp-control-h);padding:10px 16px;border:1px solid var(--bp-border-control);border-radius:var(--bp-radius-md);
  background:var(--bp-surface);color:var(--bp-text);font:var(--bp-weight-regular) var(--bp-text-base)/1.4 var(--bp-font-sans);
  box-shadow:inset 0 1px 2px rgba(10,46,92,.08);transition:border-color var(--bp-dur-fast),box-shadow var(--bp-dur-fast)}
.bp-input::placeholder{color:var(--bp-text-muted);opacity:1}
.bp-input:hover{border-color:var(--bp-accent)}
.bp-input:focus-visible{border-color:var(--bp-accent);outline:2px solid transparent;
  box-shadow:0 0 0 2px var(--bp-focus-gap),0 0 0 5px var(--bp-focus),0 0 0 6.5px var(--bp-focus-edge)}
.bp-input--xl{min-height:60px;padding-inline:18px;font-size:var(--bp-text-xl)}
.bp-input--mono{font-family:var(--bp-font-mono);letter-spacing:.06em;text-transform:uppercase}
.bp-input[aria-invalid="true"]{border-color:var(--bp-negative);border-width:2px;padding-inline-start:15px}
.bp-input--xl[aria-invalid="true"]{padding-inline-start:17px}
.bp-input:disabled{background:var(--bp-surface-2);color:var(--bp-text-muted);cursor:not-allowed}
.bp-field__msg{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:var(--bp-text-md);line-height:1.4;color:var(--bp-text-muted)}
.bp-field__msg .bp-icon{width:18px;height:18px;margin-top:1px}
.bp-field__msg[data-tone="negative"]{color:var(--bp-negative)}
.bp-field__msg[data-tone="positive"]{color:var(--bp-positive)}
.bp-field__msg[data-tone="critical"]{color:var(--bp-critical)}
.bp-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:20px 16px;padding:4px 0 6px;margin:0;border:0}
.bp-choices>.bp-tile{width:auto;aspect-ratio:auto;min-height:150px}

/* ======================================================================== TOASTS */
.bp-toasts{position:fixed;inset-inline:0;inset-block-end:24px;z-index:var(--bp-z-toast);display:flex;flex-direction:column;align-items:center;gap:10px;
  padding-inline:var(--bp-gutter);pointer-events:none}
.bp-toast{pointer-events:auto;display:flex;align-items:center;gap:12px;width:min(560px,100%);min-height:56px;padding:10px 8px 10px 12px;
  background:var(--bp-toast-bg);color:var(--bp-toast-text);border-radius:var(--bp-radius-lg);box-shadow:var(--bp-elev-4);
  animation:bp-toast-in var(--bp-dur-slow) var(--bp-ease-out)}
.bp-toast__text{flex:1;min-width:0;margin:0;font-size:15px;line-height:1.4}
.bp-toast__text span{color:var(--bp-toast-muted)}
.bp-toast__action{color:var(--bp-toast-link);font-weight:var(--bp-weight-semibold);white-space:nowrap}
.bp-toast__action:hover{color:var(--bp-toast-link)}
.bp-toast__close{color:var(--bp-toast-muted)}
.bp-toast__close:hover{color:var(--bp-toast-text);background:rgba(127,127,127,.2)}
.bp-toast{--bp-focus-gap:var(--bp-toast-bg)}
@keyframes bp-toast-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ======================================================================== EMPTY / LOADING / ERROR STATES + SKELETON */
.bp-state{display:flex;flex-direction:column;align-items:center;gap:14px;max-width:520px;margin-inline:auto;padding:40px 24px;text-align:center}
.bp-state__title{margin:6px 0 0;font-size:var(--bp-text-xl);font-weight:var(--bp-weight-semibold)}
.bp-state__text{margin:0;color:var(--bp-text-muted);max-width:44ch}
.bp-state__actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:6px}
.bp-state .bp-meter{width:min(320px,100%)}
.bp-skeleton{display:block;border-radius:var(--bp-radius-sm);
  background:linear-gradient(90deg,var(--bp-surface-sunken) 0%,var(--bp-surface) 50%,var(--bp-surface-sunken) 100%);background-size:200% 100%;
  box-shadow:inset 0 0 0 1px var(--bp-border);animation:bp-shimmer 1.6s linear infinite}
.bp-skeleton--title{height:26px;width:62%}
.bp-skeleton--text{height:14px;width:100%}
.bp-skeleton--short{width:44%}
.bp-skeleton--badge{width:56px;height:56px;border-radius:var(--bp-radius-badge)}
.bp-skeleton--button{width:168px;height:var(--bp-control-h);border-radius:var(--bp-radius-md)}
@keyframes bp-shimmer{from{background-position:100% 0}to{background-position:-100% 0}}

/* ======================================================================== REDUCED MOTION
   Tokens already zero the lift / press travel and shorten transitions; here the looping animations
   stop. Waits stay visible: the spinner pulses its opacity, the indeterminate bar stands still. */
@media (prefers-reduced-motion:reduce){
  .bp-spinner{animation:bp-pulse 1.6s ease-in-out infinite}
  .bp-progress:indeterminate{animation:none;background-position:50% 0,0 0}
  .bp-skeleton{animation:none}
  .bp-toast{animation:none}
  .bp-menu__chev{transition:none}
}
@keyframes bp-pulse{50%{opacity:.35}}

/* ======================================================================== FORCED COLOURS (Windows high contrast) */
@media (forced-colors:active){
  .bp-btn,.bp-tile,.bp-badge,.bp-ichip,.bp-chip,.bp-rank,.bp-result,.bp-banner,.bp-toast,.bp-guide,.bp-popover,.bp-shell__btn{border:1px solid CanvasText}
  .bp-tile:is([aria-pressed="true"],[aria-checked="true"],:has(input:checked)){outline:3px solid Highlight}
  .bp-rail__item[data-state="current"]::after,.bp-rail__item[data-state="current"] .bp-badge{outline:3px solid Highlight}
  .bp-progress{border:1px solid CanvasText}
}

/* ======================================================================== PRINT */
@media print{
  .bp-shell,.bp-toasts,.bp-skip{display:none !important}
  .bp-btn,.bp-tile,.bp-badge,.bp-guide,.bp-card{box-shadow:none !important}
  body{background:#fff}
}
}
