/* NEXUS biopsychosocial pain simulator: question cards, result profile. Uses the site's tokens (styles.css). */
.bps-widget {
  --bps-body: var(--accent);
  --bps-mind: var(--accent-2);
  --bps-env: #a59ccb;
  --bps-lv0: #8fa89a;
  --bps-lv1: #a9b57c;
  --bps-lv2: #c9a961;
  --bps-lv3: #d4935a;
  --bps-lv4: #c1795a;
  --bps-alert: #d9826a;
  font-family: var(--font-body);
  color: var(--text);
  margin: 8px 0 48px;
}
.bps-widget .bps-ic { width: 1.25em; height: 1.25em; flex: none; }
/* the article body justifies and hyphenates every paragraph; inside the widget text stays left-aligned unless a block centres it */
.bps-widget p { text-align: left; text-align-last: auto; hyphens: manual; max-width: none; }
.bps-widget .bps-hero-p, .bps-widget .bps-cap { text-align: center; }
.bps-widget .bps-hero-p { max-width: 44ch; }
.bps-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 34px); position: relative; overflow: hidden; }
.bps-card + .bps-card, .bps-res > * + * { margin-top: 18px; }
.bps-in { animation: bpsIn .45s var(--ease, ease) both; }
@keyframes bpsIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.bps-h { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 1.8rem); line-height: 1.25; margin: 14px 0 8px; text-wrap: balance; }
.bps-lead { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin: 0 0 20px; }
.bps-note { color: var(--text-faint); font-size: 12.5px; line-height: 1.6; margin: 18px 0 0; }
.bps-k { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.bps-sub { color: var(--text-dim); font-size: 14px; margin: 4px 0 14px; }
.bps-cap { color: var(--text-faint); font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; text-align: center; }

.bps-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 13px; }
.bps-pill-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }

/* buttons */
.bps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 16px 22px; border-radius: 14px; font: 600 15px var(--font-body); letter-spacing: .02em; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); cursor: pointer; transition: filter .25s, transform .15s, background .25s; }
.bps-btn:hover { filter: brightness(1.1); }
.bps-btn:active { transform: scale(.985); }
.bps-btn--ghost { background: transparent; color: var(--text-dim); border-color: var(--line-strong); margin-top: 18px; }
.bps-btn--ghost:hover { color: var(--text); border-color: var(--text-faint); filter: none; }
.bps-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 8px 4px; background: none; border: 0; color: var(--text-dim); font: 500 14px var(--font-body); cursor: pointer; }
.bps-link:hover { color: var(--text); }
.bps-widget button:focus-visible, .bps-widget a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* warning signs */
.bps-flags { display: grid; gap: 10px; margin: 6px 0 22px; }
.bps-flag { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 15px/1.45 var(--font-body); cursor: pointer; transition: border-color .2s, background .2s; }
.bps-flag:hover { border-color: var(--line-strong); }
.bps-flag-box { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--line-strong); color: transparent; transition: all .2s; }
.bps-flag.is-on { border-color: var(--bps-alert); background: color-mix(in srgb, var(--bps-alert) 10%, var(--surface-2)); }
.bps-flag.is-on .bps-flag-box { background: var(--bps-alert); border-color: var(--bps-alert); color: var(--bg); }

.bps-alert { text-align: left; }
.bps-alert-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; font-size: 26px; background: color-mix(in srgb, var(--bps-alert) 16%, transparent); color: var(--bps-alert); }
.bps-alert.is-soon .bps-alert-ic { color: var(--bps-lv2); background: var(--accent-soft); }
.bps-alert.is-now { border-color: color-mix(in srgb, var(--bps-alert) 55%, var(--line)); }

/* questions */
.bps-card[style*="--pc"]::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%; background: radial-gradient(closest-side, color-mix(in srgb, var(--pc) 18%, transparent), transparent); pointer-events: none; }
.bps-qtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.bps-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pc); }
.bps-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 20%, transparent); }
.bps-count { font-family: var(--font-display); font-style: italic; color: var(--text-dim); font-size: 15px; font-variant-numeric: tabular-nums; }
.bps-seg { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 14px 0 26px; position: relative; }
.bps-seg i { height: 4px; border-radius: 2px; background: var(--line-strong); transition: background .3s; }
.bps-seg i.is-done { background: var(--c); }
.bps-seg i.is-now { background: color-mix(in srgb, var(--c) 55%, var(--line-strong)); }
.bps-qhead { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; position: relative; }
.bps-qic { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; font-size: 26px; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); }
.bps-qh { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 3.2vw, 1.6rem); line-height: 1.25; margin: 0; text-wrap: balance; }
.bps-opts { display: grid; gap: 10px; position: relative; }
.bps-opt { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 15px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 15.5px/1.4 var(--font-body); cursor: pointer; transition: transform .2s, border-color .2s, background .2s; }
.bps-opt:hover { border-color: var(--line-strong); transform: translateX(3px); }
.bps-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--lv); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lv) 18%, transparent); transition: box-shadow .2s; }
.bps-opt.is-on { border-color: var(--lv); background: color-mix(in srgb, var(--lv) 11%, var(--surface-2)); }
.bps-opt.is-on .bps-dot { box-shadow: 0 0 0 6px color-mix(in srgb, var(--lv) 30%, transparent); }

/* result */
.bps-hero { text-align: center; padding-block: clamp(28px, 5vw, 44px); }
.bps-hero::before { content: ""; position: absolute; inset: -30% 10% auto; height: 90%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.bps-hero > * { position: relative; }
.bps-hero-ic { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; font-size: 34px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 8%, transparent); }
.bps-hero-k { margin-top: 20px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.bps-hero-h { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.9rem, 5.4vw, 2.6rem); line-height: 1.12; margin: 8px 0 12px; text-wrap: balance; }
.bps-hero-p { color: var(--text-dim); font-size: 17px; line-height: 1.55; max-width: 44ch; margin: 0 auto; }
.bps-also { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; font-size: 12px; color: var(--text-faint); }
.bps-also em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-dim); }
.bps-also .bps-ic { width: 14px; height: 14px; }

.bps-grid2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bps-grid2 { grid-template-columns: 5fr 7fr; } .bps-grid2 > .bps-card { margin-top: 0 !important; } }
.bps-gcard, .bps-rcard { display: flex; flex-direction: column; align-items: center; }
.bps-gcard .bps-k { align-self: flex-start; }
.bps-gauge { position: relative; width: min(240px, 100%); margin: 14px auto 0; }
.bps-gauge svg { display: block; width: 100%; height: auto; }
.bps-g-bg, .bps-g-fg { fill: none; stroke-width: 14; stroke-linecap: round; }
.bps-g-bg { stroke: var(--line-strong); }
.bps-g-fg { stroke: url(#bpsG); transition: stroke-dashoffset 1.2s var(--ease, ease); }
.bps-g-num { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-family: var(--font-display); }
.bps-g-num b { font-size: 2.8rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.bps-g-num span { color: var(--text-faint); font-size: 1rem; margin-left: 2px; }
.bps-lvl { margin-top: 10px; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.bps-radar { width: 100%; max-width: 360px; height: auto; overflow: visible; }
.bps-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 4px; font-size: 13px; color: var(--text-dim); }
.bps-legend span { display: inline-flex; align-items: center; gap: 7px; }
.bps-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bps-r-grid circle { stroke: var(--line); }
.bps-r-grid circle:last-child { stroke: var(--line-strong); }
.bps-r-spokes line { stroke: var(--line); }
.bps-r-shape { opacity: 0; transform-origin: 150px 150px; transform: scale(.6); transition: opacity .8s var(--ease, ease), transform .8s var(--ease, ease); }
.is-shown .bps-r-shape { opacity: 1; transform: none; }
.bps-r-shape polygon { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }

.bps-bars { display: grid; gap: 14px; margin-top: 16px; }
.bps-bar { display: grid; grid-template-columns: 96px 1fr 46px; align-items: center; gap: 12px; font-size: 14px; }
.bps-bar-n { color: var(--c); font-weight: 500; }
.bps-bar-t { height: 8px; border-radius: 4px; background: var(--line-strong); overflow: hidden; }
.bps-bar-t i { display: block; height: 100%; width: 0; background: var(--c); border-radius: 4px; transition: width 1.1s var(--ease, ease); }
.bps-bar b { font-family: var(--font-display); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }

.bps-sec { margin-top: 28px !important; }
.bps-levers { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bps-levers { grid-template-columns: repeat(3, 1fr); } }
.bps-lever { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--c); }
.bps-lever-top { display: flex; align-items: center; gap: 10px; }
.bps-lever-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 600; background: var(--c); color: var(--bg); flex: none; }
.bps-lever-ic { color: var(--c); font-size: 20px; display: grid; }
.bps-lever b { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.2; }
.bps-meter { display: flex; gap: 4px; margin: 12px 0; }
.bps-meter i { height: 5px; flex: 1; border-radius: 3px; background: var(--line-strong); }
.bps-meter i.on { background: var(--c); }
.bps-lever p { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.5; }

.bps-str { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.bps-str span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--text); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.bps-str .bps-ic { color: var(--c); width: 16px; height: 16px; }

.bps-step { display: flex; align-items: center; gap: 18px; margin-top: 28px !important; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }
.bps-step-ic { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; color: var(--bg); background: var(--accent); }
.bps-step p { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(1.1rem, 2.8vw, 1.3rem); line-height: 1.35; }

.bps-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.bps-links a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-dim); font-size: 14px; text-decoration: none; transition: all .2s; }
.bps-links a:hover { color: var(--text); border-color: var(--accent); }

@media (max-width: 480px) {
  .bps-bar { grid-template-columns: 88px 1fr 40px; gap: 8px; }
  .bps-qic { width: 46px; height: 46px; font-size: 22px; }
  .bps-step { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .bps-in { animation: none; }
  .bps-r-shape, .bps-g-fg, .bps-bar-t i { transition: none; }
}
