/* The Book One Survey: a playful, softly rounded companion to the Temple site. */
.survey-page-body {
  background:
    radial-gradient(ellipse 280px 240px at 1% 14%, #f9ded9 0%, transparent 100%),
    radial-gradient(ellipse 310px 310px at 100% 36%, #e3f2eb 0%, transparent 100%),
    radial-gradient(ellipse 260px 260px at 4% 79%, #e5eafb 0%, transparent 100%),
    #fff9f3;
}
.survey-page { border-top: 4px solid #be9053; }
.survey-page-content { width: min(1080px, calc(100% - 48px)); padding-top: 78px; }
.survey-page-intro { max-width: 760px; margin-bottom: 55px; }
.survey-page-intro h1 { font-size: clamp(36px, 6.4vw, 70px); line-height: 1.13; }
.survey-title-dot { color: #ca825f; }
.survey-page-intro>p:not(.survey-kicker) { max-width: 570px; font-size: 15px; }
.survey-progress-label { color: #171717; }
.survey-progress { height: 5px; border-radius: 3px; background: #e5e3e0; }
.survey-progress span {
  border-radius: inherit;
  background: #171717;
  transition: width .25s ease;
}
.survey-progress-hint { margin-top: 14px !important; font: 500 12px/1.7 var(--sans) !important; color: #9b8a83 !important; }
.story-survey-form { gap: 22px; }
.survey-question {
  position: relative;
  border: 1px solid #ecdcd4;
  border-radius: 30px 34px 29px 33px;
  padding: 31px 35px 33px;
  background: rgba(255,253,250,.94);
  box-shadow: 0 8px 30px rgba(109,75,60,.045), 0 1px 2px rgba(109,75,60,.03);
  transition: border-color .22s, box-shadow .22s, transform .22s;
}
.survey-question:nth-child(4n + 2) { border-radius: 33px 29px 35px 27px; }
.survey-question:nth-child(4n + 3) { border-radius: 28px 35px 29px 36px; }
.survey-question:focus-within { border-color: #d9b5bb; box-shadow: 0 14px 34px rgba(109,75,60,.09); }
.survey-question[hidden] { display: none !important; }
.survey-question legend {
  font: 700 clamp(16px, 2.4vw, 20px)/1.5 var(--font-b);
  color: #302b32;
  letter-spacing: -.02em;
  margin-bottom: 13px;
  gap: 15px;
}
.survey-number {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  min-width: 39px;
  border-radius: 15px 17px 13px 18px;
  background: #f1eeeb;
  color: #171717;
  font: 800 11px/1 var(--sans);
  letter-spacing: .09em;
}
.survey-conditional { margin-left: 26px; width: calc(100% - 26px); }
.survey-helper { clear: both; margin: 1px 0 19px; font: 500 13px/1.7 var(--sans); color: #85736d; }
.survey-email input[type="email"],
.survey-select,
.survey-short-answer,
.survey-search {
  display: block;
  clear: both;
  width: 100%;
  min-height: 56px;
  background: #fffcfa;
  border: 1px solid #e6d8d4;
  border-radius: 18px 20px 17px 19px;
  padding: 15px 19px;
  color: #403735;
  font: 500 15px/1.5 var(--sans);
  box-sizing: border-box;
  transition: border-color .16s, box-shadow .16s;
}
.survey-email input[type="email"]:focus,
.survey-select:focus,
.survey-short-answer:focus,
.survey-search:focus { outline: 0; border-color: #b795b6; box-shadow: 0 0 0 4px #b795b624; }
.survey-select { appearance: none; padding-right: 48px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23957a81' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 19px center; }
.survey-short-answer {
  min-height: 55px;
  height: 55px;
  overflow-y: hidden;
  resize: none;
  padding-top: 15px;
  line-height: 1.6;
}
.survey-short-answer:focus { min-height: 86px; }
.survey-subquestion { display: block; margin: 21px 0 10px; font: 700 13px/1.5 var(--sans); color: #705b58; }
.survey-bubble-row { clear: both; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 4px 0 10px; }
.survey-bubble { position: relative; cursor: pointer; min-width: 0; }
.survey-bubble input { opacity: 0; position: absolute; width: 1px; height: 1px; }
.survey-bubble span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  max-height: 110px;
  border-radius: 42% 58% 52% 48% / 55% 46% 54% 45%;
  border: 2px solid #e8d5ce;
  background: #fff3ef;
  color: #8d6968;
  font: 800 clamp(20px, 4vw, 30px)/1 var(--sans);
  transition: background .22s, border-color .22s, transform .35s cubic-bezier(.16,1.7,.4,1), box-shadow .22s;
}
.survey-bubble:nth-child(2n) span { border-radius: 54% 46% 44% 56% / 45% 55% 46% 54%; background: #f6f1fe; }
.survey-bubble:nth-child(3n) span { background: #edf8f3; }
.survey-bubble small { font: 700 9px/1.4 var(--sans); letter-spacing: .04em; margin-top: 7px; text-align: center; }
.survey-bubble:hover span { transform: translateY(-4px) rotate(-3deg) scale(1.04); }
.survey-bubble input:checked + span { background: #cb8c7d; border-color: #b66f66; color: white; transform: scale(1.09) rotate(-2deg); box-shadow: 0 9px 20px #cb8c7d48; }
.survey-bubble input:focus-visible + span { outline: 3px solid #8366ac; outline-offset: 3px; }
/* Traditional five-star ratings: yellow is the only new accent color. */
.survey-stars { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.survey-stars label { display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; min-width: 0; }
.survey-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.survey-stars .star-glyph { color: #d9d1cc; font: 400 clamp(25px, 4vw, 35px)/1.25 Georgia,serif; transition: color .17s, transform .3s cubic-bezier(.16,1.6,.4,1), text-shadow .17s; }
.survey-stars-large { justify-content: center; gap: clamp(8px, 2vw, 17px); margin: 10px auto 8px; }
.survey-stars-large .star-glyph { font-size: clamp(43px, 7vw, 63px); }
.survey-stars label:hover .star-glyph { transform: translateY(-4px) scale(1.12); }
.survey-stars:has(input[value="1"]:checked) label:nth-child(-n+1) .star-glyph,
.survey-stars:has(input[value="2"]:checked) label:nth-child(-n+2) .star-glyph,
.survey-stars:has(input[value="3"]:checked) label:nth-child(-n+3) .star-glyph,
.survey-stars:has(input[value="4"]:checked) label:nth-child(-n+4) .star-glyph,
.survey-stars:has(input[value="5"]:checked) label:nth-child(-n+5) .star-glyph { color: #f5b91e; text-shadow: 0 2px 9px #eeb02a35; }
.survey-stars:has(label:nth-child(1):hover) label:nth-child(-n+1) .star-glyph,
.survey-stars:has(label:nth-child(2):hover) label:nth-child(-n+2) .star-glyph,
.survey-stars:has(label:nth-child(3):hover) label:nth-child(-n+3) .star-glyph,
.survey-stars:has(label:nth-child(4):hover) label:nth-child(-n+4) .star-glyph,
.survey-stars:has(label:nth-child(5):hover) label:nth-child(-n+5) .star-glyph { color: #f5b91e; }
.survey-stars label:has(input:focus-visible) { outline: 3px solid #9474aa; outline-offset: 2px; border-radius: 8px; }
.survey-star-caption { display: flex; justify-content: space-between; width: min(380px, 100%); margin: 10px auto 0; font: 800 10px/1.5 var(--sans); letter-spacing: .08em; color: #a38c82; }
.survey-rating-factors { clear: both; display: grid; gap: 10px; }
.survey-factor-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 20px; border: 1px solid #eadcd6; background: #fffaf7; border-radius: 17px 19px 17px 20px; }
.survey-factor-row:nth-child(even) { background: #f9f7fe; }
.survey-factor-name { font: 700 14px/1.5 var(--sans); color: #544648; }
.survey-options { display: flex; flex-wrap: wrap; gap: 11px; }
.survey-plain-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.survey-plain-options .survey-choice { min-width: 0; }
.survey-chip-options .survey-choice, .survey-house-options .survey-choice { flex: 1 1 auto; min-width: 110px; }
.survey-choice {
  min-height: 55px;
  border-radius: 22px 24px 19px 25px;
  padding: 12px 17px;
  border-color: #e8d8d3;
  background: #fffaf7;
  font-size: 13px;
  transition: transform .32s cubic-bezier(.16,1.6,.4,1), background .2s, border-color .2s, box-shadow .2s;
}
.survey-choice:nth-child(3n) { border-radius: 25px 19px 25px 21px; }
.survey-choice:hover { transform: translateY(-3px) scale(1.02); border-color: #c896a1; background: #fff5f6; }
.survey-choice:has(input:checked) { transform: scale(1.025); background: #fbe6e7; border-color: #c48d97; box-shadow: 0 6px 13px #c48d9725; }
.survey-choice input { width: 16px; height: 16px; border-color: #cbaeb0; }
.survey-choice input:checked { border-color: #b57283; }
.survey-choice input:checked:after { background: #b57283; }
.survey-house-options .survey-choice { flex: 1 1 calc(25% - 11px); justify-content: center; min-width: 116px; font: 700 17px/1.4 var(--font-b); }
.survey-house-options .survey-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.survey-house-options .survey-choice:has(input:focus-visible) { outline: 3px solid #9576b3; outline-offset: 3px; }
.survey-house-options .house-earth { background: #eaf2e7; color: #376950; border-color: #c9dac8; }
.survey-house-options .house-fire { background: #fbe9e3; color: #ac4237; border-color: #eec3b6; }
.survey-house-options .house-ice { background: #e9f4fd; color: #4a7ea7; border-color: #c3ddeb; }
.survey-house-options .house-wind { background: #fff; color: #243759; border-color: #ccd2dd; }
.survey-house-options .house-earth:has(input:checked) { background: #c0d6bb; border-color: #547b59; }
.survey-house-options .house-fire:has(input:checked) { background: #f4c9bc; border-color: #b95341; }
.survey-house-options .house-ice:has(input:checked) { background: #bcdff4; border-color: #4a8bb0; }
.survey-house-options .house-wind:has(input:checked) { background: #dfe5ef; border-color: #374c77; }
.survey-rank-list { clear: both; list-style: none; margin: 0 0 15px; padding: 0; display: grid; gap: 9px; }
.survey-rank-list li { display: flex; align-items: center; min-height: 57px; gap: 14px; padding: 8px 10px 8px 14px; border: 1px solid #eadcd6; background: #fffaf7; border-radius: 17px 19px 17px 20px; transition: background .2s, transform .2s; }
.survey-rank-list li:nth-child(2n) { background: #f9f7fe; }
.rank-position { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 12px; flex: none; background: #f4dfd9; color: #9f6470; font: 800 11px/1 var(--sans); }
.survey-rank-list strong { font: 700 14px/1.4 var(--sans); color: #544648; }
.rank-arrows { display: flex; gap: 5px; margin-left: auto; }
.rank-arrows button { width: 36px; height: 36px; border-radius: 13px; border: 1px solid #ead6d2; background: #fff; color: #98637d; font: 700 18px/1 var(--sans); cursor: pointer; transition: transform .2s, background .2s; }
.rank-arrows button:hover:not(:disabled) { transform: scale(1.13); background: #f9e8f0; }
.rank-arrows button:disabled { opacity: .28; cursor: default; }
.survey-confirm-rank { border: 0; background: #735c80; color: #fff; padding: 11px 18px; border-radius: 19px 16px 21px 18px; font: 800 10px/1.5 var(--sans); letter-spacing: .12em; cursor: pointer; transition: transform .3s cubic-bezier(.16,1.6,.4,1); }
.survey-confirm-rank:hover { transform: scale(1.045); }
.survey-inline-status { display: inline-block; font: 700 11px/1.5 var(--sans); color: #638f7d; margin-left: 10px; }
.survey-character-picker { clear: both; border: 1px solid #e5d3dc; border-radius: 22px; background: #fffafc; overflow: hidden; }
.survey-character-picker summary { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; cursor: pointer; list-style: none; color: #6e5263; font: 700 14px/1.5 var(--sans); }
.survey-character-picker summary::-webkit-details-marker { display: none; }
.survey-character-picker[open] summary { border-bottom: 1px solid #f0e2e8; }
.picker-chevron { font-size: 24px; transition: transform .2s; }
.survey-character-picker[open] .picker-chevron { transform: rotate(180deg); }
.survey-picker-panel { padding: 17px; }
.survey-search { min-height: 47px; font-size: 13px; background: #fff; margin-bottom: 15px; }
.survey-character-groups { max-height: 330px; overflow: auto; padding: 2px 2px 8px; }
.character-group-title { font: 800 10px/1.5 var(--sans); letter-spacing: .19em; color: #9a7e83; margin: 17px 4px 10px; }
.character-group-title:first-child { margin-top: 0; }
.character-group-items { display: flex; flex-wrap: wrap; gap: 8px; }
.character-pick { border: 1px solid #e9d9dc; background: #fff; border-radius: 100px; padding: 9px 14px; font: 700 12px/1.4 var(--sans); color: #695964; cursor: pointer; transition: transform .3s cubic-bezier(.16,1.6,.4,1), background .2s; }
.character-pick:hover { transform: scale(1.06) rotate(-2deg); background: #faf1fb; }
.character-pick[aria-pressed="true"] { color: #fff; background: #9474aa; border-color: #9474aa; transform: scale(1.04); }
.character-pick:disabled { opacity: .42; cursor: not-allowed; }
.survey-selection-summary { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.selected-character-list { display: flex; flex-wrap: wrap; gap: 7px; }
.selected-character-list span { font: 800 11px/1.5 var(--sans); color: #725a89; background: #f1eaf9; border-radius: 30px; padding: 6px 11px; }
.survey-selection-summary small { margin-left: auto; color: #a3818e; font: 800 10px/1.5 var(--sans); letter-spacing: .07em; }
.survey-submit-row { margin-top: 24px; }
.survey-submit { border-radius: 26px 30px 24px 28px; transition: transform .3s cubic-bezier(.16,1.6,.4,1), box-shadow .2s; }
.survey-submit:hover { transform: scale(1.04) rotate(-1deg); box-shadow: 0 10px 22px rgba(59,49,41,.18); }
.survey-confirmation { border-radius: 17px; }
@media (max-width: 700px) {
  .survey-page-content { padding-top: 56px; width: calc(100% - 26px); }
  .survey-page-intro { margin-bottom: 37px; }
  .survey-page-intro h1 { font-size: clamp(34px, 9vw, 48px); }
  .survey-page-intro>p:not(.survey-kicker) { font-size: 13px; }
  .survey-question { padding: 23px 19px 25px; border-radius: 25px !important; }
  .survey-question legend { font-size: 16px; gap: 10px; line-height: 1.45; }
  .survey-number { width: 33px; min-width: 33px; height: 33px; border-radius: 12px; }
  .survey-helper { font-size: 12px; }
  .survey-bubble-row { gap: 6px; }
  .survey-bubble span { font-size: 21px; }
  .survey-bubble small { font-size: 7px; margin-top: 4px; }
  .survey-stars-large .star-glyph { font-size: clamp(38px, 10vw, 52px); }
  .survey-factor-row { padding: 12px; gap: 6px; }
  .survey-factor-name { font-size: 12px; }
  .survey-factor-row .survey-stars { gap: 3px; }
  .survey-factor-row .star-glyph { font-size: clamp(22px, 7vw, 29px); }
  .survey-options { display: flex; flex-wrap: wrap; gap: 9px; }
  .survey-plain-options { display: grid; grid-template-columns: 1fr 1fr; }
  .survey-conditional { margin-left: 12px; width: calc(100% - 12px); }
  .survey-chip-options .survey-choice { flex: 1 1 auto; min-width: 100px; }
  .survey-house-options .survey-choice { flex: 1 1 calc(50% - 9px); }
  .survey-choice { padding: 10px 13px; min-height: 49px; }
  .survey-rank-list li { gap: 9px; }
  .survey-rank-list strong { font-size: 12px; }
  .rank-arrows button { width: 33px; height: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  .survey-page * { animation: none !important; transition-duration: .01ms !important; }
}
/* The adult confirmation is required before collecting survey responses. */
.survey-adult-confirmation{font:500 13px/1.5 sans-serif;color:inherit}

/* Signup as a full-sized survey card, not a footer checkbox. */
.survey-newsletter-question{margin:24px 0 18px!important}
.survey-newsletter-choice{display:flex!important;align-items:flex-start!important;gap:14px!important;margin:14px 0!important;color:inherit!important;letter-spacing:normal!important;font:600 16px/1.65 'DM Sans',Arial,sans-serif!important;cursor:pointer}
.survey-newsletter-choice input{flex:0 0 24px;width:24px;height:24px;min-width:24px;margin:3px 0 0;accent-color:#b68b38}
.survey-consent-help{font-size:13px;line-height:1.5;opacity:.75}
.survey-submit:disabled{background:#868686!important;color:#e6e6e6!important;border-color:#868686!important;opacity:.8;cursor:not-allowed;transform:none!important}
html[data-theme="dark"] .survey-newsletter-question{border-color:#8b6e51;background:#242220;color:#f5eadb}
html[data-theme="dark"] .survey-newsletter-choice{color:#f5eadb!important}
.survey-newsletter-question[hidden]{display:none!important}

/* Review request, mobile-first and accessible in both site themes. */
.survey-review-permission-prompt { margin: 22px 0 12px; font: 700 clamp(16px, 2.5vw, 19px)/1.5 var(--sans); }
.survey-review-permission-options { display: grid; grid-template-columns: 1fr; gap: 12px; }
.survey-review-permission-options .survey-choice { min-width: 0; display: flex; align-items: center; text-align: left; }
.survey-review-permission-options .survey-choice span { white-space: normal; }
.survey-review-question textarea { min-height: 112px; }
