/* "Sessions make PRs easier to review" story beat (src/_includes/pr-glassbox.njk). Centred like the other
   beats: words, then the box and its switch under them. */
.gb-beat .st-h { max-width: 30ch; }
.gb-beat .st-how-lead { text-wrap: pretty; }
.gb { container-type: inline-size; display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; min-width: 0; }

/* The box (src/_includes/pr-box-symbol.njk). On is green glass with the mark showing through; off is solid and
   dark. The colours ease, so it reads as a light coming on. */
.gb-box { flex: none; display: block; width: var(--gbw, 132px); height: calc(var(--gbw, 132px) * 1.154); overflow: visible; --bx-top: color-mix(in srgb, var(--gh-pr-open) 55%, white); --bx-left: color-mix(in srgb, var(--gh-pr-open) 80%, white); --bx-right: var(--gh-pr-open); --bx-edge: var(--gh-pr-open); --bx-mark: var(--theme-surface-raised); --bx-op: 0.5; }
.gb.is-off .gb-box { --bx-top: color-mix(in srgb, var(--palette-greyscale-900) 82%, white); --bx-left: color-mix(in srgb, var(--palette-greyscale-900) 90%, white); --bx-right: var(--palette-greyscale-900); --bx-edge: color-mix(in srgb, var(--palette-greyscale-900) 70%, white); --bx-mark: var(--palette-greyscale-900); --bx-op: 1; }

/* The switch. A real button, 44px or more to tap. Its label stays on one line and keeps one width, so the
   box does not shift when the word changes. */
.gb-sw { flex: none; display: grid; justify-items: center; gap: 10px; min-width: 44px; min-height: 44px; margin: 0; padding: 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.gb-l { min-width: 104px; font: 600 12px/1 var(--font-body); color: var(--theme-ink); text-align: center; white-space: nowrap; }
.gb-track { position: relative; display: block; width: 60px; height: 34px; border-radius: 999px; background: color-mix(in srgb, var(--palette-golden-300) 55%, var(--theme-surface-raised)); box-shadow: inset 0 0 0 1px var(--palette-golden-600), 0 0 0 5px color-mix(in srgb, var(--palette-golden-300) 40%, transparent); transition: background-color 400ms ease, box-shadow 400ms ease; }
.gb-knob { position: absolute; top: 3px; left: 3px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--palette-golden-300); transform: translateX(26px); transition: transform 400ms cubic-bezier(0.2, 0, 0, 1), background-color 400ms ease; }
.gb-knob img { width: 56%; height: 56%; filter: brightness(0); transition: opacity 400ms ease; }
.gb.is-off .gb-track { background: color-mix(in srgb, var(--theme-ink) 12%, var(--theme-surface-raised)); box-shadow: inset 0 0 0 1px var(--theme-line); }
.gb.is-off .gb-knob { transform: none; background: var(--theme-surface-raised); }
.gb.is-off .gb-knob img { opacity: 0.4; }
.gb-sw:focus-visible .gb-track { outline: 2px solid var(--theme-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gb-track, .gb-knob, .gb-knob img { transition: none; } }

@container (min-width: 400px) { .gb-box { --gbw: 170px; } }
@media (min-width: 720px) { .gb { gap: 40px; } .gb-l { min-width: 122px; font-size: 14px; } }
@media (min-width: 960px) { .gb-box { --gbw: 230px; } }
