/* The bullshit meter: a white dial under glass, a frosted control panel and a
   hand-drawn field chart. Scoped to .bsm so the profile's styles and these never meet.
   --heat (0–1) is set by meter.js and warms the light behind the glass. */
.bsm-host { min-width: 0; max-width: 100%; }
.bsm { --ink: #16202e; --muted: #5b6878; --line: rgba(22, 32, 46, .14); --red: #d6262c; --red-deep: #a8161b; --amber: #e2a23b; --heat: 0;
  position: relative; isolation: isolate; overflow: hidden; margin-block: 40px; padding: clamp(28px, 5vw, 60px);
  color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; line-height: 1.5;
  background: #fff; border: 1px solid rgba(22, 32, 46, .1); border-radius: 22px; box-shadow: 0 30px 80px rgba(22, 32, 46, .12); }
.bsm::before, .bsm::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; transition: opacity .6s ease; }
.bsm::before { width: 70%; aspect-ratio: 1; left: -18%; top: -22%; background: radial-gradient(circle, rgba(120, 160, 220, .26), transparent 64%); }
.bsm::after { width: 78%; aspect-ratio: 1; right: -24%; top: 4%; background: radial-gradient(circle, rgba(232, 40, 46, .5), rgba(232, 40, 46, .12) 42%, transparent 66%); opacity: calc(.08 + var(--heat) * .92); }
.bsm *, .bsm *::before, .bsm *::after { box-sizing: border-box; }
.bsm button, .bsm input { font: inherit; color: inherit; }

.bsm-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 40px); }
.bsm-eyebrow { margin: 0 0 6px; color: var(--red-deep); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.bsm-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 72px); font-weight: 400; letter-spacing: -.04em; line-height: .95; color: var(--ink); }
.bsm-head p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 17px; }

.bsm-bench { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); gap: clamp(22px, 3vw, 36px); align-items: start; }
.bsm-instrument, .bsm-controls, .bsm-fields {
  background: linear-gradient(160deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5));
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 0 rgba(22, 32, 46, .05), 0 18px 44px rgba(22, 32, 46, .1); }
.bsm-instrument { position: sticky; top: 18px; padding: clamp(14px, 2vw, 22px); }
.bsm-controls { padding: clamp(18px, 2.4vw, 26px); }

/* Dial */
.bsm-dial { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 22px rgba(22, 32, 46, .16)); }
.bsm-case { stroke: rgba(22, 32, 46, .18); stroke-width: 1.2; }
.bsm-glass-rim { fill: none; stroke: rgba(22, 32, 46, .22); stroke-width: 1.4; }
.bsm-red-wash { fill: url(#bsm-red-fade); }
.bsm-band-safe { fill: #9fb4cc; }
.bsm-band-warn { fill: var(--amber); }
.bsm-band-red { fill: var(--red); }
.bsm-scale-line { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.bsm-ticks line { stroke: var(--ink); stroke-linecap: round; }
.bsm-ticks line.major { stroke-width: 2.4; }
.bsm-ticks line.minor { stroke-width: 1.1; opacity: .7; }
.bsm-ticks line.hot { stroke: var(--red-deep); }
.bsm-ticks .num { fill: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bsm-ticks .num.hot { fill: var(--red-deep); }
.bsm-scale-words text { fill: #3b4757; font-size: 13px; font-weight: 800; letter-spacing: .2em; }
.bsm-scale-words text.hot { fill: var(--red); }
.bsm-unit { fill: #8794a5; font-size: 13px; font-style: italic; letter-spacing: .06em; }
.bsm-maker { fill: #2c3746; font-size: 11.5px; font-weight: 800; letter-spacing: .18em; }
.bsm-maker.small { fill: #8794a5; font-size: 10px; font-weight: 500; letter-spacing: .08em; }
.bsm-trefoil-disc { fill: #f7cf2b; stroke: #1b1b1b; stroke-width: 1.4; }
.bsm-trefoil-mark, .bsm-trefoil-hub { fill: #1b1b1b; }
.bsm-trefoil-glow { fill: var(--red); opacity: calc(var(--heat) * .75); }
.bsm-lamp text { fill: #8794a5; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; }
.bsm-lamp-lens { fill: color-mix(in srgb, #ff2a2a calc(var(--lamp, 0) * 100%), #6d2124); stroke: rgba(0, 0, 0, .35); stroke-width: 1; }
.bsm-lamp-glow { fill: #ff3030; opacity: calc(var(--lamp, 0) * .9); }
.bsm-lamp-spec { fill: #fff; opacity: .7; }
.bsm-pin-head { fill: #c0c8d3; stroke: #5b6878; stroke-width: 1.2; }
.bsm-pin-label { fill: #8794a5; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.bsm.is-hypothetical .bsm-pin-label { fill: #3b4757; }
.bsm-needle-shadow path { fill: rgba(22, 32, 46, .32); }
.bsm-needle-body { fill: #121a26; }
.bsm-needle-tip { fill: var(--red); }
.bsm-needle-tail { fill: #121a26; }
.bsm-hub { fill: url(#bsm-bezel); stroke: rgba(22, 32, 46, .35); stroke-width: 1.2; }
.bsm-hub-cap { fill: #121a26; }
.bsm-streak { opacity: .55; }

/* Readout */
.bsm-readout { padding: 16px 6px 4px; text-align: center; }
.bsm-claim { margin: 0; color: var(--muted); font-family: Georgia, serif; font-size: 16px; font-style: italic; overflow-wrap: anywhere; }
.bsm-verdict { margin: 4px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 56px); letter-spacing: -.03em; line-height: 1.05; transition: color .3s ease; }
.bsm.is-red .bsm-verdict { color: var(--red); }
.bsm.is-hypothetical .bsm-verdict { color: #6a7686; font-style: italic; }
.bsm-note { max-width: 460px; margin: 8px auto 0; color: var(--muted); }
.bsm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.bsm-stats > div { padding: 10px 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: 12px; }
.bsm-stats dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.bsm-stats dd { margin: 2px 0 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bsm.is-red #bsm-cpm { color: var(--red); }
.bsm-sound { padding: 2px 14px; font-size: 14px !important; font-weight: 700; background: #fff; border: 1px solid rgba(22, 32, 46, .25); border-radius: 999px; cursor: pointer; }
.bsm-sound[aria-pressed="true"] { color: #fff !important; background: var(--ink); border-color: var(--ink); }

/* Controls */
.bsm-claim-field { display: grid; gap: 7px; }
.bsm-claim-field span, .bsm-axis b { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.bsm-claim-field input { width: 100%; padding: 12px 14px; background: rgba(255, 255, 255, .85); border: 1px solid rgba(22, 32, 46, .2); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(22, 32, 46, .08); }
.bsm-samples { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 6px; }
.bsm-samples button { padding: 6px 12px; font-size: 13px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(22, 32, 46, .16); border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s; }
.bsm-samples button:hover { background: #fff; border-color: rgba(22, 32, 46, .4); }
.bsm-axis { display: grid; gap: 6px; padding: 18px 0 16px; border-bottom: 1px solid var(--line); }
.bsm-axis:last-of-type { border-bottom: 0; }
.bsm-axis-head { display: flex; justify-content: space-between; align-items: baseline; }
.bsm-axis output { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bsm-axis small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.bsm-axis i { display: flex; justify-content: space-between; color: #8794a5; font-size: 12px; font-style: normal; }
.bsm-axis input[type="range"] { --fill: 50%; width: 100%; height: 26px; margin: 4px 0 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.bsm-axis input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ink) var(--fill), rgba(22, 32, 46, .12) var(--fill)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.bsm-axis input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(22, 32, 46, .12); }
.bsm-axis input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--ink); }
.bsm-axis input[type="range"]::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8px; -webkit-appearance: none; appearance: none; background: radial-gradient(circle at 35% 30%, #fff, #e3e8ef 60%, #c3ccd8); border: 1px solid rgba(22, 32, 46, .35); border-radius: 50%; box-shadow: 0 3px 8px rgba(22, 32, 46, .25); }
.bsm-axis input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; background: radial-gradient(circle at 35% 30%, #fff, #e3e8ef 60%, #c3ccd8); border: 1px solid rgba(22, 32, 46, .35); border-radius: 50%; box-shadow: 0 3px 8px rgba(22, 32, 46, .25); }
.bsm-rule { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-style: italic; }
.bsm input:focus-visible, .bsm button:focus-visible, .bsm .field:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }

/* Field chart */
.bsm-fields { margin: clamp(24px, 3vw, 36px) 0 0; padding: clamp(18px, 3vw, 32px); }
.bsm-fields figcaption { max-width: 720px; }
.bsm-fields h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 3vw, 34px); font-weight: 400; letter-spacing: -.02em; color: var(--ink); }
.bsm-fields figcaption p { margin: 8px 0 0; color: var(--muted); }
.bsm-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.bsm-chart .hand { fill: var(--ink); font-family: "Chalkboard SE", "Comic Neue", "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive; font-size: 21px; }
.bsm-chart .hand.small { font-size: 17px; fill: var(--muted); }
.bsm-chart .axis-title { font-size: 16px; letter-spacing: .14em; fill: var(--muted); }
.bsm-chart .axis, .bsm-chart .hypo-line, .bsm-chart .crisis { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bsm-chart .axis { stroke: var(--ink); stroke-width: 2.2; }
.bsm-chart .second { opacity: .45; stroke-width: 1.2; }
.bsm-chart .hypo-line { stroke: #8794a5; stroke-width: 1.6; stroke-dasharray: 7 7; }
.bsm-chart .hypo { fill: #6a7686; }
.bsm-chart .crisis { stroke: var(--red); stroke-width: 2.4; opacity: .75; }
.bsm-chart .crisis-label { fill: var(--red-deep); font-size: 19px; }
.bsm-chart .field { cursor: pointer; }
.bsm-chart .field-dot { fill: var(--ink); stroke: #fff; stroke-width: 2.5; transition: r .15s; }
.bsm-chart .field:hover .field-dot, .bsm-chart .field:focus-visible .field-dot { r: 9; }
.bsm-chart .field:hover .field-label { fill: var(--red-deep); }
.bsm-chart .field-halo { fill: var(--amber); opacity: .28; }
.bsm-chart .is-red .field-halo { fill: var(--red); opacity: .32; animation: bsm-glow 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bsm-chart .is-red .field-dot { fill: var(--red-deep); }
.bsm-chart .is-hypothetical .field-halo { fill: none; stroke: #8794a5; stroke-width: 1.6; stroke-dasharray: 4 5; opacity: 1; }
.bsm-chart .is-hypothetical .field-dot { fill: #8794a5; }
.bsm-chart .you { pointer-events: none; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.bsm-chart .you-ring { fill: rgba(59, 130, 246, .12); stroke: #2f6fde; stroke-width: 2; }
.bsm-chart .you-cross { stroke: #2f6fde; stroke-width: 2; stroke-linecap: round; }
.bsm-chart .you-label { fill: #2f6fde; font-size: 17px; }
@keyframes bsm-glow { 0%, 100% { transform: scale(.82); opacity: .22; } 50% { transform: scale(1.12); opacity: .42; } }

@media (max-width: 900px) {
  .bsm-bench { grid-template-columns: minmax(0, 1fr); }
  .bsm-instrument { position: static; }
}
@media (max-width: 560px) {
  .bsm { margin-inline: -4px; padding: 22px 16px; border-radius: 18px; }
  .bsm-stats { grid-template-columns: 1fr 1fr; }
  .bsm-sound-cell { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .bsm-fields { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bsm-fields figcaption { position: sticky; left: 0; max-width: calc(100vw - 72px); }
  .bsm-chart { width: 640px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bsm-chart .is-red .field-halo { animation: none; }
  .bsm-chart .you { transition: none; }
}
