/* Opt-in survey invitation and questionnaire, shared by every public page. */
.sv-card,.sv-dialog {
  --sv-ink: #243c2a;
  --sv-muted: #65705f;
  --sv-line: #dfe7d6;
  --sv-green: #36563d;
  --sv-paper: #fffefa;
  --sv-sage: #eaf0df;
  font-family: "Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color: var(--sv-ink);
  line-height: 1.6;
  box-sizing: border-box;
}
.sv-card *,.sv-dialog * { box-sizing: border-box; }
.sv-card {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  width: min(340px,calc(100vw - 32px));
  padding: 20px 22px 16px;
  border: 1px solid var(--sv-line);
  border-radius: 20px;
  background: var(--sv-paper);
  box-shadow: 0 18px 50px #243c2a26,0 2px 0 #e3e9dc;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s,transform .3s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.sv-card.sv-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sv-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg,#9fbf7a,#e5b46a,#b9a3d6);
}
.sv-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #7a8b68;
}
.sv-title,.sv-dialog h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  padding-right: 24px;
}
.sv-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--sv-muted);
}
.sv-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sv-primary,.sv-ghost {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform .2s,box-shadow .2s,background .2s;
}
.sv-primary {
  border: 1px solid var(--sv-green);
  background: linear-gradient(125deg,#3d5e40,#284831);
  color: #fff;
  box-shadow: 0 3px 0 #203d2a;
}
.sv-primary:hover:not(:disabled) { transform: translateY(-1px); }
.sv-primary:disabled {
  opacity: .6;
  cursor: wait;
}
.sv-ghost {
  border: 1px solid #d1dfc7;
  background: var(--sv-paper);
  color: #4b6842;
  box-shadow: 0 2px 0 #e3e9dc;
}
.sv-ghost:hover { background: #ecf4df; }
.sv-link {
  display: block;
  margin: 10px 0 0;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: #7d8875;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.sv-link:hover { color: var(--sv-ink); }
.sv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6f7b68;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sv-close:hover {
  background: var(--sv-sage);
  color: var(--sv-ink);
}
.sv-card button:focus-visible,
.sv-dialog button:focus-visible,
.sv-dialog input:focus-visible+span,
.sv-dialog textarea:focus-visible {
  outline: 3px solid #61936b;
  outline-offset: 2px;
}
.sv-dialog {
  width: min(560px,calc(100vw - 32px));
  max-height: min(88vh,860px);
  padding: 0;
  border: 1px solid var(--sv-line);
  border-radius: 22px;
  background: var(--sv-paper);
  box-shadow: 0 30px 90px #243c2a33;
  overflow: hidden;
}
.sv-dialog::backdrop {
  background: #243c2a59;
  backdrop-filter: blur(3px);
}
.sv-form {
  display: flex;
  flex-direction: column;
  max-height: min(88vh,860px);
}
.sv-head {
  position: relative;
  padding: 22px 26px 14px;
  border-bottom: 1px solid var(--sv-line);
  background: linear-gradient(110deg,#eef4e4,#fbfcf5);
}
.sv-head .sv-text { margin-bottom: 0; }
.sv-head .sv-close {
  top: 16px;
  right: 16px;
}
.sv-body {
  padding: 8px 26px;
  overflow: auto;
}
.sv-question {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px dashed var(--sv-line);
}
.sv-question:last-child { border-bottom: 0; }
.sv-question legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
.sv-required { color: #c0663c; }
.sv-hint {
  margin: -6px 0 8px;
  font-size: 12px;
  color: var(--sv-muted);
}
.sv-options {
  display: grid;
  gap: 8px;
}
.sv-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--sv-line);
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s,border-color .2s;
}
.sv-options label:hover { background: #f5f9ee; }
.sv-options label:has(input:checked) {
  border-color: #8fb07a;
  background: #eef5e5;
}
.sv-options input {
  accent-color: var(--sv-green);
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.sv-rating {
  display: flex;
  gap: 8px;
}
.sv-rating label {
  flex: 1;
  cursor: pointer;
}
.sv-rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sv-rating span {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1px solid var(--sv-line);
  border-radius: 12px;
  font-weight: 600;
  transition: background .2s,border-color .2s,color .2s;
}
.sv-rating label:hover span { background: #f5f9ee; }
.sv-rating input:checked+span {
  background: var(--sv-green);
  border-color: var(--sv-green);
  color: #fff;
}
.sv-scale {
  display: flex;
  justify-content: space-between;
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--sv-muted);
}
.sv-dialog textarea {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid #d9e2d2;
  border-radius: 12px;
  background: #fffefa;
  font: inherit;
  font-size: 13px;
  color: var(--sv-ink);
  resize: vertical;
}
.sv-error {
  margin: 0;
  padding: 0 26px;
  min-height: 0;
  font-size: 13px;
  color: #b2482c;
}
.sv-error:not(:empty) { padding-bottom: 8px; }
.sv-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid var(--sv-line);
  background: #f6f9ef;
}
.sv-foot>span {
  font-size: 12px;
  color: var(--sv-muted);
}
.sv-foot>div {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.sv-thanks {
  padding: 40px 30px 34px;
  text-align: center;
}
.sv-thanks-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--sv-sage);
  color: var(--sv-green);
  font-size: 24px;
  font-weight: 700;
}
.sv-thanks h2 { padding: 0; }
@media(max-width:560px) {
  .sv-card {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
  .sv-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .sv-foot>div { justify-content: flex-end; }
  .sv-head,.sv-body,.sv-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .sv-error {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media(prefers-reduced-motion:reduce) {
  .sv-card,.sv-primary,.sv-ghost { transition: none; }
}
