/* The survey uses a neutral color pair, with yellow rating stars. */
html { --survey-paper: #fffaf6; --survey-ink: #25211e; }
html[data-theme="dark"] { --survey-paper: #25211e; --survey-ink: #fffaf6; }

html body.survey-page-body { background: var(--survey-paper) !important; color: var(--survey-ink); }
html .survey-page { border-top-color: var(--survey-ink); }
html .survey-page :is(.survey-page-intro h1, .survey-title-dot, .survey-kicker, .survey-page-intro > p, .survey-progress-label, .survey-progress-hint, .survey-question legend, .survey-helper, .survey-subquestion, .survey-factor-name, .survey-rank-list strong, .survey-star-caption, .character-group-title, .survey-note, .survey-selection-summary small, .survey-page-footer, .survey-inline-status, .survey-confirmation) { color: var(--survey-ink) !important; }
html .survey-page :is(.survey-question, .survey-factor-row, .survey-factor-row:nth-child(even), .survey-rank-list li, .survey-rank-list li:nth-child(2n), .survey-character-picker, .survey-character-picker summary, .survey-character-picker[open] summary, .survey-confirmation) { background: var(--survey-paper); border-color: var(--survey-ink); }
html .survey-page :is(.survey-question, .survey-factor-row, .survey-rank-list li, .survey-character-picker, .survey-choice, .survey-bubble span, .survey-email input, .survey-writing textarea, .survey-select, .survey-short-answer, .survey-search, .character-pick) { box-shadow: none; }
html .survey-page .survey-question { border-color: color-mix(in srgb, var(--survey-ink) 23%, transparent); }
html .survey-page .survey-question:focus-within { border-color: var(--survey-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--survey-ink) 16%, transparent); }
html .survey-page .survey-number { color: var(--survey-paper); background: var(--survey-ink); }
html .survey-page .survey-progress { background: color-mix(in srgb, var(--survey-ink) 18%, var(--survey-paper)); }
html .survey-page .survey-progress span { background: var(--survey-ink); }

html .survey-page :is(.survey-email input[type="email"], .survey-writing textarea, .survey-select, .survey-short-answer, .survey-search) { color: var(--survey-ink); background-color: var(--survey-paper); border-color: color-mix(in srgb, var(--survey-ink) 30%, transparent); }
html .survey-page :is(input, textarea)::placeholder { color: color-mix(in srgb, var(--survey-ink) 55%, transparent); }
html .survey-page .survey-select { background-image: none; appearance: auto; }
html .survey-page :is(.survey-email input[type="email"], .survey-writing textarea, .survey-select, .survey-short-answer, .survey-search):focus { outline: 2px solid var(--survey-ink); outline-offset: 2px; border-color: var(--survey-ink); box-shadow: none; }

html .survey-page .survey-choice, html .survey-page .survey-choice:nth-child(3n), html .survey-page .survey-house-options .house-earth, html .survey-page .survey-house-options .house-fire, html .survey-page .survey-house-options .house-ice, html .survey-page .survey-house-options .house-wind { background: var(--survey-paper); color: var(--survey-ink); border-color: color-mix(in srgb, var(--survey-ink) 38%, transparent); }
html .survey-page .survey-choice:hover, html .survey-page .survey-choice:has(input:checked), html .survey-page .survey-house-options .house-earth:has(input:checked), html .survey-page .survey-house-options .house-fire:has(input:checked), html .survey-page .survey-house-options .house-ice:has(input:checked), html .survey-page .survey-house-options .house-wind:has(input:checked) { background: var(--survey-ink); color: var(--survey-paper); border-color: var(--survey-ink); box-shadow: none; }
html .survey-page .survey-choice input { background: var(--survey-paper); border-color: var(--survey-ink); }
html .survey-page .survey-choice input:checked { background: var(--survey-paper); border-color: var(--survey-paper); }
html .survey-page .survey-choice input:checked::after { background: var(--survey-ink); }
html .survey-page .survey-choice:has(input:focus-visible), html .survey-page .survey-house-options .survey-choice:has(input:focus-visible) { outline: 3px solid var(--survey-ink); outline-offset: 3px; }

html .survey-page .survey-bubble span, html .survey-page .survey-bubble:nth-child(2n) span, html .survey-page .survey-bubble:nth-child(3n) span { background: var(--survey-paper); border-color: var(--survey-ink); color: var(--survey-ink); }
html .survey-page .survey-bubble:hover span, html .survey-page .survey-bubble input:checked + span { background: var(--survey-ink); border-color: var(--survey-ink); color: var(--survey-paper); box-shadow: none; }
html .survey-page .survey-bubble input:focus-visible + span { outline: 3px solid var(--survey-ink); }

/* Zero/unselected stars are muted; only checked stars (and deliberate hover previews) are gold. */
html .survey-page .survey-stars .star-glyph { color: #bcb7b2; text-shadow: none; }
html .survey-page .survey-stars:has(input[value="1"]:checked) label:nth-child(-n+1) .star-glyph,
html .survey-page .survey-stars:has(input[value="2"]:checked) label:nth-child(-n+2) .star-glyph,
html .survey-page .survey-stars:has(input[value="3"]:checked) label:nth-child(-n+3) .star-glyph,
html .survey-page .survey-stars:has(input[value="4"]:checked) label:nth-child(-n+4) .star-glyph,
html .survey-page .survey-stars:has(input[value="5"]:checked) label:nth-child(-n+5) .star-glyph,
html .survey-page .survey-stars:has(label:nth-child(1):hover) label:nth-child(-n+1) .star-glyph,
html .survey-page .survey-stars:has(label:nth-child(2):hover) label:nth-child(-n+2) .star-glyph,
html .survey-page .survey-stars:has(label:nth-child(3):hover) label:nth-child(-n+3) .star-glyph,
html .survey-page .survey-stars:has(label:nth-child(4):hover) label:nth-child(-n+4) .star-glyph,
html .survey-page .survey-stars:has(label:nth-child(5):hover) label:nth-child(-n+5) .star-glyph { color: #f5b91e; text-shadow: none; }
html .survey-page .survey-stars label:has(input:focus-visible) { outline-color: var(--survey-ink); }

html .survey-page .rank-position, html .survey-page .survey-confirm-rank, html .survey-page .survey-submit, html .survey-page .character-pick[aria-pressed="true"] { background: var(--survey-ink); color: var(--survey-paper); border-color: var(--survey-ink); }
html .survey-page .rank-arrows button, html .survey-page .character-pick, html .survey-page .selected-character-list span { background: var(--survey-paper); color: var(--survey-ink); border-color: var(--survey-ink); }
html .survey-page .rank-arrows button:hover:not(:disabled), html .survey-page .character-pick:hover { background: var(--survey-ink); color: var(--survey-paper); }
html .survey-page .survey-character-picker[open] summary { border-bottom-color: color-mix(in srgb, var(--survey-ink) 30%, transparent); }
html .survey-page .character-group-title { color: var(--survey-ink); }
html .survey-page .survey-house-options .survey-choice:has(input:checked) { box-shadow: none; }
html .survey-page .survey-submit:hover { box-shadow: none; }
html .survey-page-footer { border-top-color: color-mix(in srgb, var(--survey-ink) 25%, transparent); }

/* Survey navigation also stays in the same two-color family. */
html body.survey-page-body .site-nav { background: var(--survey-paper); border-top-color: var(--survey-ink); border-bottom-color: var(--survey-ink); box-shadow: none; }
html body.survey-page-body .site-nav-logo img { filter: none; }
html[data-theme="dark"] body.survey-page-body .site-nav-logo img { filter: brightness(0) invert(1); }
html body.survey-page-body .site-nav-edition, html body.survey-page-body .site-nav-edition span, html body.survey-page-body .site-nav-link { color: var(--survey-ink); }
html body.survey-page-body .site-nav-link:hover, html body.survey-page-body .site-nav-link[aria-current] { color: var(--survey-paper); background: var(--survey-ink); border-color: var(--survey-ink); }
html body.survey-page-body .site-nav-register { color: var(--survey-ink); background: var(--survey-paper); border-color: var(--survey-ink); }
html body.survey-page-body .theme-toggle { color: var(--survey-ink); background: var(--survey-paper); border-color: var(--survey-ink); box-shadow: none; }
html body.survey-page-body .theme-toggle:hover { color: var(--survey-paper); background: var(--survey-ink); }

/* Incomplete required questions: visible even over two-tone theme overrides. */
html .survey-page .survey-question.survey-question-invalid,
html .survey-page .survey-question.survey-question-invalid:focus-within {
  border: 2px solid #cf253c !important;
  box-shadow: 0 0 0 3px rgba(207, 37, 60, .14) !important;
}
html .survey-page .survey-question.survey-question-invalid legend { color: #b61931 !important; }
.survey-question { scroll-margin-top: 115px; }
@keyframes tof-survey-attention {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}
.survey-question.survey-question-shake { animation: tof-survey-attention .36s ease-in-out 1; }
@media (prefers-reduced-motion: reduce) {
  .survey-question.survey-question-shake { animation: none; }
}
