/* BLU pairing guide (/en/tools/blu-pairing-guide/, /da/tools/blu-parringsguide/).
   Loaded through extraCss on those two pages only. Everything is the site's
   own: tokens from site.css, .sg-card for the card, .sg-note for callouts.
   There is no dark theme here because the site has none. */

/* ---- Beta banner (the LNM generator's, under its own name) ---------------- */
.blu-beta {
  margin: 0 0 18px; padding: 14px 18px; border: 1.5px solid var(--sg-amber-line); border-left-width: 6px;
  border-radius: var(--sg-r-sm); background: var(--sg-amber-bg); color: var(--sg-midnight);
}
.blu-beta p { margin: 0; line-height: 1.55; }
.blu-beta strong { font-weight: 800; }
.blu-beta a { color: var(--sg-navy); font-weight: 700; overflow-wrap: anywhere; }

#blu-root { scroll-margin-top: 76px; }

/* ---- Progress: four phases and one counter -------------------------------- */
.blu-phases { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.blu-phase > * {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; min-height: 44px; box-sizing: border-box;
  padding: 8px 10px; border-radius: var(--sg-r-sm); border: 1.5px solid var(--sg-line); background: var(--sg-paper);
  font: inherit; font-size: .86rem; font-weight: 700; line-height: 1.25; color: var(--sg-muted); text-align: left;
}
.blu-phase__n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sg-shell); color: var(--sg-muted); font-size: .8rem; font-weight: 800;
}
.blu-phase.is-active > * { border-color: var(--sg-navy); background: var(--sg-navy); color: #fff; }
.blu-phase.is-active .blu-phase__n { background: #fff; color: var(--sg-navy); }
.blu-phase.is-done > * { border-color: var(--sg-blue); color: var(--sg-navy); cursor: pointer; }
.blu-phase.is-done .blu-phase__n { background: var(--sg-blue); color: #fff; }
.blu-phase.is-done > button:hover { background: var(--sg-tint); }
.blu-countline { margin: 0 0 12px; font-size: .9rem; font-weight: 700; color: var(--sg-muted); }
@media (max-width: 620px) {
  .blu-phase > * { flex-direction: column; align-items: flex-start; gap: 4px; padding: 7px 8px; font-size: .74rem; }
  .blu-phase__n { width: 20px; height: 20px; font-size: .72rem; }
}

/* ---- The card ------------------------------------------------------------- */
.blu-card h2.blu-h { outline: none; }
.blu-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 8px 14px; cursor: pointer;
  font: inherit; font-weight: 800; color: var(--sg-navy); background: var(--sg-paper);
  border: 1.5px solid var(--sg-line); border-radius: 10px;
}
.blu-back:hover { background: var(--sg-tint); border-color: var(--sg-blue); }
.blu-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.blu-btn {
  font: inherit; font-weight: 800; padding: 11px 18px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--sg-navy); background: var(--sg-navy); color: #fff;
}
.blu-btn:hover { background: var(--sg-midnight); }
.blu-btn--ghost { background: #fff; color: var(--sg-navy); border-color: var(--sg-line); }
.blu-btn--ghost:hover { background: var(--sg-tint); border-color: var(--sg-blue); }
.blu-btn--small { padding: 7px 12px; font-size: .88rem; }
.blu-btn:disabled { opacity: .45; cursor: default; }
.blu-btn[aria-expanded="true"] { border-color: var(--sg-blue); background: var(--sg-tint); }
.blu-link {
  font: inherit; font-weight: 700; color: var(--sg-navy); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-align: left;
}
.blu-link:hover { color: var(--sg-blue); }
.blu-more { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; }
.blu-more--done { gap: 10px; margin: 0 0 16px; }

/* ---- Choices -------------------------------------------------------------- */
.blu-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0 0; }
.blu-choices--many { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.blu-choice {
  position: relative; display: grid; gap: 4px; justify-items: start; align-content: start; padding: 14px 16px; cursor: pointer;
  font: inherit; text-align: left; color: var(--sg-midnight);
  border: 1.5px solid var(--sg-line); border-radius: var(--sg-r-sm); background: var(--sg-paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.blu-choice:hover { border-color: var(--sg-blue); box-shadow: var(--sg-shadow); }
.blu-choice.is-on { border-color: var(--sg-blue); background: var(--sg-tint); }
.blu-choice strong { color: var(--sg-navy); line-height: 1.3; }
.blu-choice > span:last-child { font-size: .9rem; color: var(--sg-muted); line-height: 1.45; }
.blu-choice .blu-shot { width: 112px; justify-self: center; margin-bottom: 6px; }
.blu-badge {
  position: absolute; top: 10px; right: 10px; font-style: normal; font-size: .74rem; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; background: #ecfaf1; color: #14532d; border: 1px solid #b9e6cd;
}

/* ---- One box for every picture --------------------------------------------
   Product photos come in every shape (569×569, 900×536, 898×950). The box is
   square; the inner frame takes the photo's own aspect ratio and is centred,
   so every photo is as large as it can be inside the same box and a hotspot
   given in per cent of the photo lands on the photo. The lamp gets the same
   box. The box itself (.blu-shot, __in, __full) is in site.css, because the
   switch table uses it on the pairing guide too. */
.blu-shot--art > svg { display: block; width: 100%; height: 100%; }
.blu-shot--art { position: relative; }

.blu-lamp__glow { fill: #ffd45c; opacity: calc(var(--lvl, 0) * .85); }
.blu-lamp__bulb { fill: color-mix(in srgb, #ffd45c calc(var(--lvl, 0) * 100%), #fff); stroke: var(--sg-midnight); stroke-width: 1.5; }
.blu-lamp__base { fill: var(--sg-midnight); }
.is-lit { --lvl: 1; }
.is-ramp .blu-lamp__glow, .is-ramp .blu-lamp__bulb { transition: opacity 1.4s linear, fill 1.4s linear; }
.blu-rk { fill: #fefefe; stroke: #dde1e4; transition: fill .08s; }
.blu-rk.is-down { fill: #dfe5ea; }

/* ---- Animation ------------------------------------------------------------ */
.blu-anim { margin: 18px 0 0; padding: 16px; border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); background: var(--sg-shell); }
.blu-stage { --lvl: 0; }
.blu-cap { margin: 12px 0 0; min-height: 3em; font-weight: 800; color: var(--sg-midnight); text-align: center; line-height: 1.4; }
.blu-ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.blu-ctrl__n { min-width: 4.5em; text-align: center; font-size: .88rem; font-weight: 700; color: var(--sg-muted); }
.blu-credit { margin: 10px 0 0; font-size: .86rem; color: var(--sg-muted); text-align: center; }

.blu-scene { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; max-width: 560px; margin: 0 auto; }
.blu-scene__cell { display: grid; gap: 6px; min-width: 0; }
.blu-scene__cell .blu-shot { background: var(--sg-paper); border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); padding: 8px; box-sizing: border-box; }
.blu-scene__note { display: block; min-height: 2.6em; font-size: .78rem; font-weight: 700; color: var(--sg-muted); text-align: center; line-height: 1.3; overflow-wrap: anywhere; }
.blu-count { font-size: 1.05rem; font-weight: 800; color: var(--sg-navy); }
.blu-pct { display: block; font-size: .95rem; font-weight: 800; color: var(--sg-midnight); }
.blu-pct:not(:empty) + .blu-lamplabel { display: none; }
.blu-status { display: none; align-items: center; gap: 5px; justify-content: center; }
.blu-status.is-show { display: flex; }
.blu-status__dot { width: 9px; height: 9px; border-radius: 50%; background: #e5483b; animation: blu-blink 1s steps(2, start) infinite; }
.blu-status__dot--blue { background: #3d8bff; }
.blu-status__dot--melody, .blu-status__dot--tone, .blu-status__dot--none, .blu-status__dot--leds { display: none; }
@keyframes blu-blink { to { visibility: hidden; } }
.blu-hold { display: block; height: 5px; margin: 4px 8px 0; border-radius: 3px; background: var(--sg-line); overflow: hidden; }
.blu-hold i { display: block; height: 100%; width: 0; background: var(--sg-blue); }
.blu-hold.is-run i { width: 100%; transition: width 3.8s linear; }

.blu-ble { align-self: center; display: grid; place-items: center; margin-bottom: 2.6em; }
.blu-ble svg { width: 100%; height: auto; }
.blu-ble path { fill: none; stroke: var(--sg-blue); stroke-width: 2.5; stroke-linecap: round; opacity: .25; transition: opacity .15s; }
.blu-ble.is-act path, .blu-ble--wire path { opacity: 1; }

.blu-hot { position: absolute; transform: translate(-50%, -50%); border-radius: 8%; background: rgba(0, 60, 130, 0); transition: background .1s; }
.blu-hot--round { border-radius: 50%; }
.blu-hot.is-down { background: rgba(0, 60, 130, .3); }
.blu-fing {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; z-index: 3; pointer-events: none;
  background: rgba(69, 148, 209, .4); border: 2px solid var(--sg-blue); opacity: 0;
  transition: left .35s, top .35s, opacity .2s, transform .12s;
}
.blu-fing.is-show { opacity: 1; }
.blu-fing.is-tap { transform: scale(.7); background: rgba(0, 60, 130, .55); }
.blu-fing--mid { left: 50%; top: 50%; }
.blu-chip {
  position: absolute; transform: translate(-50%, -50%); z-index: 2; white-space: nowrap; opacity: 0; transition: opacity .4s;
  font-size: .62rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; color: #fff; background: var(--sg-navy);
}
.blu-chip.is-show { opacity: 1; }
.blu-chip--on { background: #2f8a57; }
.blu-chip--off { background: #b4372b; }
.blu-led { position: absolute; width: 8%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: transparent; transition: background .1s; }
.blu-led.is-on { background: #3d8bff; box-shadow: 0 0 8px #3d8bff; }
.blu-spin { position: absolute; transform: translate(-50%, -50%); width: 34%; color: var(--sg-blue); opacity: 0; transition: opacity .2s; z-index: 2; }
.blu-spin.is-show { opacity: 1; }
.blu-spin svg { display: block; width: 100%; animation: blu-rot 1.2s linear infinite; }
.blu-spin.is-ccw svg { animation-direction: reverse; }
@keyframes blu-rot { to { transform: rotate(360deg); } }

/* screenshots in a phone frame */
.blu-flow { display: flex; align-items: center; justify-content: center; gap: 18px; }
.blu-phone { width: min(230px, 62vw); padding: 8px; border-radius: 26px; background: var(--sg-midnight); box-shadow: var(--sg-shadow); }
.blu-phone__screen { position: relative; border-radius: 19px; overflow: hidden; background: #0e141b; }
.blu-scr { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.blu-scr.is-on { opacity: 1; }
.blu-tapdot {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; pointer-events: none; z-index: 2;
  background: rgba(255, 212, 92, .55); border: 2px solid #ffd45c; opacity: 0; transition: left .35s, top .35s, opacity .2s, transform .12s;
}
.blu-tapdot.is-show { opacity: 1; }
.blu-tapdot.is-press { transform: scale(.7); }
.blu-flow__lamp { width: 84px; display: grid; gap: 6px; }

/* ---- Done ----------------------------------------------------------------- */
.blu-chain { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; max-width: 480px; margin: 18px auto; }
.blu-chain .blu-shot { background: var(--sg-shell); border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); padding: 10px; box-sizing: border-box; }
.blu-chain__arrow { font-size: 1.4rem; font-weight: 800; color: var(--sg-blue); }

/* ---- Side panel ----------------------------------------------------------- */
.blu-panel { margin: 20px 0 0; padding: 16px 18px; border: 1.5px solid var(--sg-blue); border-radius: var(--sg-r-sm); background: var(--sg-tint); scroll-margin-top: 76px; }
.blu-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.blu-panel__head h3 { margin: 0; outline: none; color: var(--sg-midnight); }
.blu-panel > :last-child { margin-bottom: 0; }
.blu-panel li + li { margin-top: 8px; }
.blu-panel .blu-anim { background: var(--sg-paper); }
.blu-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.blu-tab {
  font: inherit; font-weight: 800; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--sg-line); background: var(--sg-paper); color: var(--sg-navy);
}
.blu-tab.is-on { border-color: var(--sg-navy); background: var(--sg-navy); color: #fff; }

@media (max-width: 620px) {
  .blu-anim { padding: 12px 10px; }
  .blu-scene { grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .blu-scene__cell .blu-shot { padding: 5px; }
  .blu-fing { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
  .blu-choice .blu-shot { width: 96px; }
  .blu-flow { gap: 10px; }
  .blu-flow__lamp { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .blu-fing, .blu-scr, .blu-tapdot, .blu-chip, .blu-hot, .blu-ble path { transition: none; }
  .blu-status__dot, .blu-spin svg { animation: none; }
  .is-ramp .blu-lamp__glow, .is-ramp .blu-lamp__bulb { transition: none; }
}
@media print {
  .blu-beta { display: block !important; break-inside: avoid; border: 1.5pt solid #000; border-left-width: 5pt; background: none; }
  .blu-ctrl, .blu-back { display: none; }
}
