/* Partner Team Survey — builds on styles.css brand tokens */

.sv { min-height: 100vh; display: flex; flex-direction: column; background: var(--white); }
.sv [hidden] { display: none !important; }
kbd { font-family: inherit; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; border: 1px solid currentColor; opacity: .75; }

/* Header + progress */
.sv-top { position: sticky; top: 0; z-index: 20; background: var(--black); color: var(--white); }
.sv-top-in { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); height: 76px; display: flex; align-items: center; justify-content: space-between; }
.sv-logo { height: 46px; width: auto; }
@media (max-width: 600px) { .sv-logo { height: 40px; } }
.sv-count { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.8); }
.sv-bar { height: 4px; background: #1d1d22; }
.sv-bar span { display: block; height: 100%; width: 0; background: var(--accent-gradient); transition: width .45s cubic-bezier(.2,.8,.2,1); }

.sv-main { flex: 1; display: flex; position: relative; }
.sv-loading { margin: auto; color: var(--gray-600); }
#sv-form { flex: 1; display: flex; }
.sv-step { flex: 1; display: flex; justify-content: center; position: relative; overflow: hidden; padding: clamp(36px, 7vh, 80px) var(--gutter) clamp(48px, 8vh, 96px); }
.sv-in { animation: svIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes svIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.shake { animation: svShake .35s ease; }
@keyframes svShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Dark screens (welcome / thanks) */
body.sv-dark .sv-main { background: var(--black); color: var(--white); }
body.sv-dark .sv-foot { background: var(--black); color: rgba(255,255,255,.55); border-top-color: #1d1d22; }
body.sv-dark .sv-foot a { color: rgba(255,255,255,.8); }
.sv-hero-g { position: absolute; inset: 0; background: url("hero-network.webp") right center / cover no-repeat; opacity: .9; pointer-events: none; }
.sv-hero-g::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.1) 100%); }
.sv-welcome { position: relative; width: 100%; max-width: 1100px; align-self: center; }
.sv-welcome h1 { font-size: clamp(40px, 6vw, 72px); max-width: 760px; }
.sv-welcome .lead { color: rgba(255,255,255,.86); max-width: 600px; }
.sv-welcome .overline { color: var(--steel); }
.sv-meta { list-style: none; padding: 0; margin: 34px 0 38px; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.sv-meta li { border-left: 3px solid; border-image: var(--accent-gradient) 1; padding-left: 14px; }
.sv-meta strong { display: block; font-size: 18px; }
.sv-meta span { font-size: 14px; color: rgba(255,255,255,.7); }
.sv-start { font-size: 18px; padding: 18px 34px; }
.sv-small { font-size: 14px; color: rgba(255,255,255,.6); margin-top: 16px; }
@media (max-width: 760px) { .sv-welcome .sv-small:last-child { display: none; } .sv-hero-g { opacity: .45; background-position: 70% center; } }

/* Question layout */
.sv-q { width: 100%; max-width: 760px; }
.sv-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--purple); margin-bottom: 14px; }
.sv-q h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; outline: none; }
.sv-q h1:focus, .sv-welcome h1:focus { outline: none; }
.sv-help { color: var(--gray-600); font-size: 17px; margin: 12px 0 0; }
.sv-q > .sv-chips, .sv-q > .sv-rating, .sv-q > .sv-alloc, .sv-q > .sv-text, .sv-q > .sv-counter { margin-top: 28px; }
.sv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* About fields */
.sv-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.sv-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; }
.sv-field input { font: inherit; font-size: 18px; font-weight: 400; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--gray-300); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.sv-field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(117,25,249,.16); }
.sv-fs { border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
.sv-fs legend { font-size: 14px; font-weight: 700; margin-bottom: 10px; padding: 0; }
.sv-fs .sv-chips { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 600px) { .sv-fields { grid-template-columns: 1fr; } }

/* Chips */
.sv-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sv-chip { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--gray-300); background: #fff; cursor: pointer; font-size: 16px; font-weight: 500; line-height: 1.3; transition: border-color .15s ease, background .15s ease, transform .1s ease, opacity .15s ease; user-select: none; }
.sv-chip:hover { border-color: var(--steel); }
.sv-chip:active { transform: scale(.99); }
.sv-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sv-chip:focus-within { box-shadow: 0 0 0 4px rgba(125,118,242,.25); }
.sv-key { flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--gray-300); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--gray-600); }
.sv-chip-t { flex: 1; }
.sv-tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--violet); transform: scale(0); transition: transform .18s cubic-bezier(.3,1.6,.5,1); }
.sv-tick svg { width: 14px; height: 14px; }
.sv-chip.on { border-color: var(--violet); background: #f6f0ff; }
.sv-chip.on .sv-key { border-color: var(--violet); color: var(--violet); }
.sv-chip.on .sv-tick { transform: scale(1); }
.sv-chip.dim { opacity: .45; cursor: not-allowed; }
.sv-counter { font-size: 14px; font-weight: 700; color: var(--purple); margin-bottom: -14px; }
@media (max-width: 600px) { .sv-chips { grid-template-columns: 1fr; } .sv-key { display: none; } }

/* Rating */
.sv-rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sv-rate { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 8px 16px; border-radius: 14px; border: 1.5px solid var(--gray-300); cursor: pointer; text-align: center; transition: all .15s ease; }
.sv-rate input { position: absolute; opacity: 0; }
.sv-rate strong { font-size: 32px; line-height: 1; }
.sv-rate span { font-size: 13px; color: var(--gray-600); line-height: 1.25; }
.sv-rate:hover { border-color: var(--steel); }
.sv-rate:focus-within { box-shadow: 0 0 0 4px rgba(125,118,242,.25); }
.sv-rate.on { background: var(--black); border-color: var(--black); color: #fff; }
.sv-rate.on span { color: rgba(255,255,255,.75); }
@media (max-width: 560px) { .sv-rate { padding: 14px 4px 12px; } .sv-rate strong { font-size: 24px; } .sv-rate span { font-size: 11px; } }

/* Allocation */
.sv-alloc { border: 1px solid var(--gray-100); border-radius: 16px; padding: 22px 22px 14px; }
.sv-stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--gray-100); }
.sv-stack span { display: block; height: 100%; transition: width .2s ease; }
.sv-total { margin: 12px 0 8px; font-size: 15px; color: var(--gray-600); }
.sv-total strong { font-size: 20px; color: var(--black); margin-right: 4px; }
.sv-total.ok strong { color: var(--purple); }
.sv-total.over strong { color: #c2360f; }
.sv-alloc-row { display: grid; grid-template-columns: 1fr 1.1fr 84px; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--gray-100); }
.sv-alloc-row label { font-size: 15.5px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.sv-alloc-row label i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex-shrink: 0; }
.sv-alloc-row input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--c) var(--p, 0%), var(--gray-100) var(--p, 0%)); outline: none; }
.sv-alloc-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: grab; }
.sv-alloc-row input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--c); cursor: grab; }
.sv-alloc-row input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(125,118,242,.35); }
.sv-num { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.sv-num input { width: 58px; font: inherit; font-weight: 700; font-size: 16px; text-align: right; padding: 8px; border-radius: 10px; border: 1.5px solid var(--gray-300); -moz-appearance: textfield; }
.sv-num input::-webkit-outer-spin-button, .sv-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sv-num input:focus { outline: none; border-color: var(--violet); }
.sv-balance { margin-top: 8px; background: none; border: 0; padding: 6px 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--violet); cursor: pointer; }
.sv-balance:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .sv-alloc { padding: 16px 14px 10px; }
  .sv-alloc-row { grid-template-columns: 1fr 74px; gap: 8px 12px; }
  .sv-alloc-row label { grid-column: 1 / -1; }
}

/* Text */
.sv-text { position: relative; }
.sv-text textarea { width: 100%; font: inherit; font-size: 18px; line-height: 1.5; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--gray-300); resize: vertical; min-height: 150px; }
.sv-text textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(117,25,249,.16); }
.sv-tc { position: absolute; right: 14px; bottom: 12px; font-size: 12.5px; color: var(--gray-600); }

/* Nav */
.sv-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; }
.sv-back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-weight: 700; color: var(--gray-600); cursor: pointer; padding: 12px 4px; }
.sv-back:hover { color: var(--black); }
.sv-back:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; border-radius: 8px; }
.sv-next-wrap { display: flex; align-items: center; gap: 16px; }
.sv-hint { font-size: 13px; color: var(--gray-600); }
.sv-next { font-size: 17px; padding: 15px 28px; }
.sv-next.busy { opacity: .85; cursor: progress; }
.sv-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: svSpin .7s linear infinite; }
@keyframes svSpin { to { transform: rotate(360deg); } }
.sv-err { min-height: 24px; margin: 14px 0 0; color: #c2360f; font-weight: 700; font-size: 15px; text-align: right; }
.sv-err a { color: var(--violet); }
@media (max-width: 600px) {
  .sv-hint { display: none; }
  .sv-nav { position: sticky; bottom: 0; background: linear-gradient(0deg, #fff 70%, rgba(255,255,255,0)); padding: 16px 0 calc(8px + env(safe-area-inset-bottom)); margin-top: 24px; }
  .sv-next-wrap { flex: 1; justify-content: flex-end; }
  .sv-next { flex: 1; justify-content: center; max-width: 260px; }
  .sv-err { text-align: left; }
}

/* Thanks */
.sv-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-gradient); color: #fff; margin-bottom: 26px; animation: svPop .6s cubic-bezier(.3,1.6,.5,1); }
.sv-check svg { width: 38px; height: 38px; }
@keyframes svPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.sv-stamp { margin: 22px 0 0; font-size: 17px; color: #fff; }
.sv-stamp span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); margin-bottom: 4px; }
.sv-badge-n { display: inline-block; margin: 18px 0 0; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); font-weight: 700; font-size: 15px; }
.sv-thanks .btn { margin-top: 32px; }

/* Footer */
.sv-foot { border-top: 1px solid var(--gray-100); padding: 18px var(--gutter); font-size: 12.5px; color: var(--gray-600); text-align: center; }
.sv-foot p { margin: 0 auto; max-width: 900px; }
.sv-foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .sv-in, .shake, .sv-check { animation: none; }
  .sv-bar span, .sv-tick { transition: none; }
}

/* ---------- Branching survey additions ---------- */
.sv-field-wide { margin-top: 26px; }
.sv-field em { font-style: normal; font-weight: 500; color: var(--gray-600); margin-left: 6px; }
.sv-field textarea { font: inherit; font-size: 17px; font-weight: 400; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--gray-300); resize: vertical; }
.sv-field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(117,25,249,.16); }
.sv-fs-role .sv-chips { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sv-fs-region .sv-chips { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .sv-fs-region .sv-chips { grid-template-columns: 1fr 1fr 1fr; } .sv-fs-region .sv-chip { justify-content: center; } .sv-fs-region .sv-tick { display: none; } }
.sv-chips-pick { grid-template-columns: 1fr 1fr; }
.sv-other { margin-top: 16px; max-width: 520px; }

/* Big number / currency input */
.sv-big { display: flex; align-items: baseline; gap: 12px; margin-top: 30px; border-bottom: 3px solid var(--gray-300); padding-bottom: 8px; max-width: 560px; transition: border-color .15s ease; }
.sv-big:focus-within { border-color: var(--violet); }
.sv-big-in { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: clamp(40px, 6vw, 64px); font-weight: 700; color: var(--black); background: transparent; padding: 0; font-variant-numeric: tabular-nums; }
.sv-big-in::placeholder { color: var(--gray-300); }
.sv-prefix { font-size: clamp(32px, 5vw, 52px); font-weight: 700; color: var(--gray-600); }
.sv-suffix { font-size: 17px; font-weight: 700; color: var(--purple); white-space: nowrap; }

/* Percent */
.sv-pct { margin-top: 30px; max-width: 620px; }
.sv-pct-num { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px; }
.sv-pct-num input { width: 150px; border: 0; border-bottom: 3px solid var(--gray-300); font: inherit; font-size: 64px; font-weight: 700; padding: 0; outline: none; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.sv-pct-num input:focus { border-color: var(--violet); }
.sv-pct-num input::-webkit-outer-spin-button, .sv-pct-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sv-pct-num span { font-size: 40px; font-weight: 700; color: var(--gray-600); }
.sv-pct input[type=range] { --c: var(--violet); -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--c) var(--p, 0%), var(--gray-100) var(--p, 0%)); outline: none; }
.sv-pct input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); box-shadow: 0 2px 8px rgba(0,0,0,.2); cursor: grab; }
.sv-pct input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--violet); cursor: grab; }
.sv-pct-scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--gray-600); margin-top: 10px; }

/* Team counts */
.sv-counts { margin-top: 28px; border: 1px solid var(--gray-100); border-radius: 16px; padding: 8px 22px 14px; max-width: 620px; }
.sv-count-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.sv-count-l { font-size: 17px; font-weight: 500; }
.sv-step-ctl { display: flex; align-items: center; gap: 6px; }
.sv-step-ctl button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--gray-300); background: #fff; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; color: var(--black); }
.sv-step-ctl button:hover { border-color: var(--violet); color: var(--violet); }
.sv-step-ctl input { width: 64px; text-align: center; font: inherit; font-size: 18px; font-weight: 700; padding: 8px 4px; border-radius: 10px; border: 1.5px solid var(--gray-300); -moz-appearance: textfield; }
.sv-step-ctl input::-webkit-outer-spin-button, .sv-step-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sv-step-ctl input:focus { outline: none; border-color: var(--violet); }
.sv-counts .sv-other { margin: 12px 0 4px; }
.sv-count-total { margin: 14px 0 0; color: var(--gray-600); }
.sv-count-total strong { color: var(--black); font-size: 18px; }
.sv-big-in { width: 100%; }
.sv-q { min-width: 0; }
@media (max-width: 600px) {
  .sv-chips-pick { grid-template-columns: 1fr; }
  .sv-big { flex-wrap: wrap; row-gap: 4px; }
  .sv-big-in { flex: 1 1 0; font-size: 44px; }
  .sv-prefix { font-size: 36px; }
  .sv-suffix { flex-basis: 100%; }
  .sv-pct-num input { font-size: 52px; width: 120px; }
  .sv-counts { padding: 4px 14px 12px; }
  .sv-count-l { font-size: 16px; }
}

.sv-open { display: inline-block; margin: 6px 0 0; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); font-size: 14px; font-weight: 700; color: #fff; }
.sv-welcome .lead + .lead { margin-top: 14px; }
.sv-foot p + p { margin-top: 6px; }

/* Returning-respondent dialog */
.sv-modal-open { overflow: hidden; }
.sv-modal-ov { position: fixed; inset: 0; z-index: 100; background: rgba(10, 0, 30, .62); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: svFade .2s ease; }
.sv-modal { position: relative; background: #fff; color: var(--black, #000); border-radius: 18px; max-width: 520px; width: 100%; padding: 34px 32px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: svPop .22s ease; }
.sv-modal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 18px 18px 0 0; background: var(--accent-gradient); }
.sv-modal h2 { font-size: 30px; line-height: 1.15; margin: 8px 0 12px; }
.sv-modal p { font-size: 17px; line-height: 1.5; margin: 0 0 10px; color: #333; }
.sv-modal .sv-small { font-size: 14px; color: #666; }
.sv-modal-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.sv-modal-no { background: transparent; border: 1.5px solid #cfcfd6; color: #222; }
.sv-modal-no:hover { border-color: #888; }
@keyframes svFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes svPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .sv-modal { padding: 28px 20px 22px; }
  .sv-modal h2 { font-size: 24px; }
  .sv-modal-btns { flex-direction: column-reverse; }
  .sv-modal-btns .btn { width: 100%; justify-content: center; }
}
.sv-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.sv-again { margin-top: 18px; opacity: .8; }
