/* Surveys & feedback module (agent C). Colours only via --plbm-* tokens. */
.svy-public { background: var(--plbm-bg); color: var(--plbm-text); min-height: 100vh; display: flex; flex-direction: column; }
.svy-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--plbm-surface); border-bottom: 1px solid var(--plbm-border); }
.svy-top .spacer { flex: 1; }
.svy-brand { font-family: var(--plbm-font-head); font-weight: 800; line-height: 1.1; }
.svy-brand small { display: block; font-family: var(--plbm-font); font-weight: 500; font-size: 11px; color: var(--plbm-text-muted); }
.svy-lang { font-size: 11px; font-weight: 700; margin-left: 2px; }
.svy-top .icon-btn { width: auto; min-width: 40px; padding: 0 8px; gap: 3px; display: inline-flex; align-items: center; justify-content: center; color: var(--plbm-text); text-decoration: none; background: transparent; }
.svy-wrap { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px; }
.svy-foot { text-align: center; padding: 16px; font-size: 12px; color: var(--plbm-text-muted); }
.svy-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.svy-card { padding: 18px; margin-bottom: 14px; border: 1px solid var(--plbm-border); }
.svy-card h1 { font-family: var(--plbm-font-head); font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.svy-kicker { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--plbm-text-muted); font-weight: 700; }
.svy-note { font-size: 13px; color: var(--plbm-text-muted); margin: 8px 0 0; }
.svy-for { font-weight: 600; color: var(--plbm-primary); margin: 4px 0 0; }
.svy-q { min-width: 0; }
.svy-q legend { float: left; width: 100%; font-size: 16px; font-weight: 600; line-height: 1.4; padding: 0; margin-bottom: 12px; }
.svy-num { color: var(--plbm-primary); }
.svy-card.has-error { border-color: var(--plbm-bad); box-shadow: 0 0 0 2px var(--plbm-bad-soft); }
.svy-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.svy-scale.nps { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 560px) { .svy-scale.nps { grid-template-columns: repeat(11, 1fr); } }
.svy-opt { position: relative; margin: 0; }
.svy-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.svy-opt span { display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--plbm-border); border-radius: 10px; font-weight: 700; font-size: 17px; background: var(--plbm-surface); color: var(--plbm-text); }
.svy-opt input:checked + span { background: var(--plbm-primary); border-color: var(--plbm-primary); color: var(--plbm-on-primary); }
.svy-opt input:focus-visible + span, .svy-choice input:focus-visible { outline: 3px solid var(--plbm-primary); outline-offset: 2px; }
.svy-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--plbm-text-muted); margin-top: 6px; }
.svy-choices { display: grid; gap: 8px; }
.svy-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--plbm-border); border-radius: 10px; background: var(--plbm-surface); cursor: pointer; margin: 0; }
.svy-choice input { width: 20px; height: 20px; flex: none; accent-color: var(--plbm-primary); }
.svy-choice:has(input:checked) { border-color: var(--plbm-primary); background: var(--plbm-primary-soft); }
.svy-actions { position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(transparent, var(--plbm-bg) 35%); }
.svy-actions .btn-p { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }
.svy-msg { text-align: center; padding: 36px 20px; }
.svy-msg-ico { font-size: 48px; color: var(--plbm-primary); }

/* builder / results */
.svy-q-row { padding: 14px 16px; margin-bottom: 10px; }
.svy-q-row .head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.svy-q-row .head .txt { flex: 1 1 240px; min-width: 0; }
.svy-q-row .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.svy-q-row details { margin-top: 10px; }
.svy-q-row summary { cursor: pointer; color: var(--plbm-primary); font-weight: 600; }
.svy-tile-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 768px) { .svy-tile-row { grid-template-columns: repeat(4, 1fr); } }
.svy-bar { display: grid; grid-template-columns: minmax(70px, 28%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0; }
.svy-bar .meter { height: 12px; }
.svy-nps { display: flex; height: 18px; border-radius: 99px; overflow: hidden; margin: 8px 0; background: var(--plbm-surface-2); }
.svy-nps span { display: block; height: 100%; }
.svy-nps .d { background: var(--plbm-bad); } .svy-nps .p { background: var(--plbm-warn); } .svy-nps .g { background: var(--plbm-good); }
.svy-delta.up { color: var(--plbm-good); font-weight: 700; } .svy-delta.down { color: var(--plbm-bad); font-weight: 700; }
.svy-theme { border: 1px solid var(--plbm-border); background: var(--plbm-surface-2); color: var(--plbm-text); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; text-decoration: none; display: inline-block; margin: 0 4px 4px 0; }
.svy-theme.on, .svy-theme:hover { background: var(--plbm-primary-soft); border-color: var(--plbm-primary); color: var(--plbm-primary); }
.svy-quote { border-left: 3px solid var(--plbm-border); padding: 4px 0 4px 12px; margin: 8px 0; }
.svy-quote small { color: var(--plbm-text-muted); display: block; }
.svy-link-url { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--plbm-surface-2); padding: 6px 8px; border-radius: 8px; display: block; }
.svy-qr svg { max-width: 140px; height: auto; border: 1px solid var(--plbm-border); border-radius: 8px; }
.svy-poster { max-width: 720px; margin: 0 auto; padding: 32px; text-align: center; background: #fff; color: #000; }
.svy-poster svg { width: 70%; max-width: 420px; height: auto; }
.svy-poster h1 { font-size: 34px; font-weight: 800; }
@media print { .no-print, .sidebar, .topbar { display: none !important; } .svy-poster { padding: 0; } body { background: #fff !important; } }
/* fieldset cards: drop the border so the legend does not straddle it; draw the edge with a shadow */
fieldset.svy-q { border: 0; box-shadow: 0 0 0 1px var(--plbm-border), var(--plbm-shadow); }
fieldset.svy-q.has-error { box-shadow: 0 0 0 2px var(--plbm-bad); }
.svy-q legend + * { clear: both; }
