/* NBA-ICLE Training Needs Survey — NBA portal palette (credentials look), made livelier. */
:root {
  --green: #008000; --green-deep: #006400; --honeydew: #F0FFF0; --gold: #FFD700; --lime: #7FFF00;
  --ink: #132A17; --ink-soft: #5E6E62; --line: #D8E8D8; --line-strong: #BFD6BF; --green-ink: #0B3D0B;
  --hero-deep: #002A00; --hero-mid: #004D00;
  --ring: 0 0 0 4px rgba(127, 255, 0, .35);
  --grad-btn: linear-gradient(135deg, #00A000 0%, #008000 55%, #006400 100%);
  --grad-gold: linear-gradient(135deg, #FFE55C, #FFD700 60%, #E6BE00);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink);
  background: var(--hero-deep); min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- animated backdrop ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1100px 620px at 50% -10%, #0A7A0A 0%, transparent 60%), linear-gradient(180deg, var(--hero-mid), var(--hero-deep)); }
.bg::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(127,255,0,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(127,255,0,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 80%); mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 80%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 16s ease-in-out infinite; }
.orb--gold { width: 420px; height: 420px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(255,215,0,.75), transparent 70%); }
.orb--lime { width: 360px; height: 360px; left: -140px; bottom: -120px; background: radial-gradient(circle, rgba(127,255,0,.45), transparent 70%); animation-delay: -6s; }
.orb--green { width: 300px; height: 300px; left: 40%; top: 55%; background: radial-gradient(circle, rgba(0,160,0,.6), transparent 70%); animation-delay: -10s; }
@keyframes float { 50% { transform: translate(40px, 30px) scale(1.08); } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 32px); padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(0, 42, 0, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(127,255,0,.15); }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255,215,0,.5), 0 0 18px rgba(127,255,0,.25); }
.brand__name { font-weight: 800; letter-spacing: -.01em; font-size: 15px; line-height: 1.1; margin-left: 4px; }
.brand__name small { display: block; font-weight: 600; font-size: 11px; color: rgba(230,255,230,.75); letter-spacing: .04em; }
.progress { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; min-width: 60px; }
.progress__fill { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--lime));
  box-shadow: 0 0 14px rgba(127,255,0,.6); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.counter { color: #E6FFE6; font-weight: 700; font-size: 12.5px; white-space: nowrap; min-width: 52px; text-align: right; }
.no-js .progress, .no-js .counter { display: none; }

/* ---------- stage & screens ---------- */
.stage { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: clamp(18px, 4vw, 40px) 16px 24px; display: flex; flex-direction: column; }
.screen { position: relative; border-radius: 24px; padding: clamp(22px, 5vw, 44px);
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(140deg, rgba(0,128,0,.5), rgba(255,215,0,.85) 45%, rgba(127,255,0,.45) 70%, rgba(0,128,0,.2)) border-box;
  border: 2px solid transparent; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), 0 2px 6px rgba(0,40,0,.08); margin-bottom: 18px; }
.js .screen { display: none; margin: auto 0; }
.js .screen.is-active { display: block; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.js .screen.is-back { animation-name: rise-back; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@keyframes rise-back { from { opacity: 0; transform: translateY(-26px) scale(.985); } }
.no-js .screen.q[data-show-if] { border-style: dashed; }

/* ---------- intro & done ---------- */
.intro, .done { text-align: center; overflow: hidden; }
.intro::before, .done::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--green), var(--gold), var(--lime)); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green-deep); background: var(--honeydew); border: 1px solid rgba(0,128,0,.18); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(127,255,0,.3); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(127,255,0,0); } }
h1 { font-size: clamp(1.85rem, 5.4vw, 3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 900; color: var(--green-ink); margin: 18px auto 14px; max-width: 18ch; }
h1 em { font-style: normal; background: linear-gradient(transparent 58%, rgba(255,215,0,.75) 58%); padding: 0 .08em; }
.lede { font-size: clamp(15px, 2.2vw, 17px); color: var(--ink-soft); max-width: 56ch; margin: 0 auto 26px; }
.facts { list-style: none; padding: 0; margin: 0 auto 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; }
.facts li { border-radius: 16px; padding: 14px 8px; background: linear-gradient(160deg, var(--hero-mid), var(--hero-deep)); color: #fff; box-shadow: 0 12px 24px -14px rgba(0,60,0,.8); }
.facts strong { display: block; font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 900; color: var(--gold); line-height: 1.1; }
.facts span { font-size: 12px; font-weight: 600; color: rgba(230,255,230,.85); }
.privacy { font-size: 12.5px; color: var(--ink-soft); max-width: 60ch; margin: 22px auto 0; padding-top: 18px; border-top: 1px dashed var(--line-strong); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 14px;
  font: 700 15px var(--font); letter-spacing: .01em; cursor: pointer; border: 0; text-decoration: none; position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, .opt:focus-within, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--primary { background: var(--grad-btn); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 22px -10px rgba(0,128,0,.75); }
.btn--gold { background: var(--grad-gold); color: #3d3000; box-shadow: 0 12px 26px -10px rgba(200,160,0,.85); }
.btn--ghost { background: #fff; color: var(--green-ink); border: 1.5px solid var(--line-strong); }
.btn--ghost:hover { background: var(--honeydew); border-color: var(--green); }
.btn--xl { min-height: 60px; padding: 0 34px; font-size: 17px; border-radius: 16px; }
.btn--primary::after, .btn--gold::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn--primary:hover::after, .btn--gold:hover::after { left: 130%; }
.btn--xl { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 12px 34px -6px rgba(255,215,0,.95); } }
.arrow { transition: transform .2s; display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- question ---------- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; width: 100%; }
.q__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chip { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--green-deep); background: var(--honeydew); border: 1px solid rgba(0,128,0,.2); padding: 5px 12px; border-radius: 99px; }
.q__num { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9C8400; }
h2 { font-size: clamp(1.25rem, 3.4vw, 1.75rem); line-height: 1.22; letter-spacing: -.025em; font-weight: 800; color: var(--green-ink); margin: 0 0 8px; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.pill { font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 99px; background: #FFF8CC; color: #5C4A00; border: 1px solid #F2D95C; transition: background .2s, transform .2s; }
.pill.is-full { background: var(--green); color: #fff; border-color: var(--green); transform: scale(1.06); }

.opts { display: grid; gap: 10px; }
.opts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 44px 13px 13px; border-radius: 14px; cursor: pointer;
  background: #FCFEFC; border: 2px solid #DCEADC; transition: border-color .15s, background .15s, transform .15s, box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; user-select: none; }
.opt:hover { border-color: #8FC58F; transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(0,80,0,.45); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__key { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  color: var(--green-deep); background: #fff; border: 1.5px solid var(--line-strong); transition: all .15s; }
.opt__label { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.opt__tick { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all .2s; }
.opt:has(input:checked) { border-color: var(--green); background: linear-gradient(120deg, #EFFFEF, #fff 80%); box-shadow: 0 10px 22px -14px rgba(0,128,0,.7); }
.opt:has(input:checked) .opt__key { background: var(--grad-btn); color: #fff; border-color: transparent; }
.opt:has(input:checked) .opt__tick { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat;
  animation: pop .3s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.4); } }
.opt.is-dim { opacity: .45; }
.opt.is-dim:hover { transform: none; box-shadow: none; }
.opt--exclusive { border-style: dashed; }
.opts--scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.opts--scale .opt { flex-direction: column; text-align: center; padding: 16px 8px; gap: 8px; }
.opts--scale .opt__key { width: auto; height: auto; border: 0; background: none !important; font-size: 34px; line-height: 1; transition: transform .2s; }
.opts--scale .opt:has(input:checked) .opt__key { transform: scale(1.18); }
.opts--scale .opt__label { font-size: 12.5px; }
.opts--scale .opt__tick { display: none; }
.opt.is-flash { animation: flash .35s; }
@keyframes flash { 50% { background: #E3F9E3; } }

.other { margin-top: 12px; display: none; }
.other.is-open, .no-js .other { display: block; animation: rise .3s both; }
.other label, .branch label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
input[type=text], textarea, select { width: 100%; font: 500 15px var(--font); color: var(--ink); min-height: 52px; padding: 12px 14px;
  border: 2px solid #D3E3D3; border-radius: 14px; background: #FCFEFC; transition: border-color .15s, box-shadow .15s; }
input[type=text]:hover, textarea:hover, select:hover { border-color: #9CC59C; }
input[type=text]:focus, textarea:focus, select:focus { border-color: var(--green); background: #fff; outline: none; box-shadow: var(--ring); }
textarea { min-height: 150px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 44px;
  background: #FCFEFC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center/20px no-repeat; }

/* branch finder */
.finder { position: relative; }
.finder__input { padding-left: 46px !important; background: #FCFEFC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 15px center/20px no-repeat !important; }
.finder__list { list-style: none; margin: 10px 0 0; padding: 6px; max-height: 280px; overflow-y: auto; border-radius: 14px; border: 2px solid #DCEADC; background: #fff; overscroll-behavior: contain; }
.finder__list li { padding: 11px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.finder__list li:hover, .finder__list li.is-hi { background: var(--honeydew); }
.finder__list li[aria-selected=true] { background: var(--grad-btn); color: #fff; }
.finder__list li[aria-selected=true]::after { content: '✓'; font-weight: 900; }
.finder__list li.is-none { color: var(--ink-soft); cursor: default; font-weight: 500; }
.finder__list li.is-special { border-top: 1px dashed var(--line-strong); margin-top: 4px; }
.finder__picked { display: none; margin-top: 12px; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, #EFFFEF, #fff 80%); border: 2px solid var(--green); font-weight: 700; }
.finder__picked.is-on { display: flex; animation: rise .3s both; }
.finder__picked button { margin-left: auto; background: none; border: 0; color: var(--green); font: 700 13px var(--font); cursor: pointer; text-decoration: underline; }

.err { color: #B91C1C; font-weight: 700; font-size: 13.5px; margin: 12px 0 0; min-height: 0; }
.err:empty { display: none; }
.has-error .opts, .has-error textarea, .has-error select, .has-error .finder__input { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 26px; }
.nav .btn--primary, .nav .btn--gold { flex: 1; max-width: 320px; margin-left: auto; }
.no-js .nav { display: none; }
.no-js .q:last-of-type .nav { display: flex; }
.no-js [data-back] { display: none; }
.kbd { margin: 14px 0 0; font-size: 12px; color: var(--ink-soft); text-align: right; }
.no-js .kbd { display: none; }
kbd { font: 700 11px var(--font); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--honeydew); }
@media (hover: none) { .kbd { display: none; } }

.alert { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; padding: 14px 16px; border-radius: 14px; font-weight: 600; margin-bottom: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--green-ink); color: #fff; font-weight: 700;
  padding: 12px 20px; border-radius: 14px; width: max-content; text-align: center; font-size: 14px; border: 1px solid rgba(255,215,0,.6); box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); animation: rise .3s both; max-width: calc(100vw - 32px); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- done ---------- */
.done__badge { width: 92px; height: 92px; margin: 6px auto 4px; }
.done__badge svg { width: 100%; height: 100%; }
.done__badge circle { fill: var(--green); stroke: var(--gold); stroke-width: 3; transform-origin: center; animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.done__badge path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.share { margin-top: 8px; padding: 22px; border-radius: 18px; background: var(--honeydew); border: 1px solid rgba(0,128,0,.15); }
.share p { margin: 0 0 14px; font-weight: 600; }
.share__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }

.foot { text-align: center; color: rgba(230,255,230,.7); font-size: 12px; padding: 8px 16px max(18px, env(safe-area-inset-bottom)); }
.foot a { color: var(--gold); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .brand img:first-child { display: none; }
  .brand__name small { display: none; }
  .stage { padding: 14px 12px 16px; }
  .screen { border-radius: 20px; padding: 22px 16px; }
  .opts--grid { grid-template-columns: 1fr; }
  .opts--scale { grid-template-columns: 1fr; }
  .opts--scale .opt { flex-direction: row; text-align: left; padding: 12px 14px; gap: 14px; }
  .opts--scale .opt__key { font-size: 26px; }
  .opts--scale .opt__label { font-size: 14.5px; }
  .opt { padding: 12px 40px 12px 12px; }
  .opt__label { font-size: 14px; }
  .nav { position: sticky; bottom: 0; margin: 20px -16px -22px; padding: 14px 16px max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, #fff 30%); border-radius: 0 0 20px 20px; }
  .nav .btn { min-height: 52px; }
  .nav [data-back] { padding: 0 16px; }
  .facts { gap: 8px; }
  .kbd { display: none; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .eyebrow { letter-spacing: .1em; font-size: 10.5px; }
  .nav .btn--gold { font-size: 14px; padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
