/* Prospect House survey + results pages. Builds on site.css (tokens, nav, buttons, footer). */

.survey-page { background: var(--bg); }
/* .btn, .s-thanks and .r-gate set their own display, which would beat the hidden attribute */
.survey-page [hidden] { display: none !important; }

/* ---------- banner ---------- */
.s-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--forest-950); color: #FFFFFF; padding: 136px 0 clamp(48px, 7vw, 84px); }
.s-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; z-index: -2; }
.s-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 22, 14, 0.9) 0%, rgba(8, 22, 14, 0.72) 55%, rgba(8, 22, 14, 0.45) 100%), linear-gradient(0deg, rgba(8, 22, 14, 0.7) 0%, rgba(8, 22, 14, 0) 50%); }
.s-hero__inner { max-width: calc(820px + var(--gutter) * 2); margin-left: 0; }
.s-hero__title { font-size: clamp(36px, 4.8vw, 62px); line-height: 1.04; font-weight: 600; letter-spacing: -0.025em; color: #FFFFFF; }
.s-hero__lede { margin-top: 20px; font-size: clamp(18px, 1.5vw, 20px); color: #E3E8DF; max-width: 60ch; }
.s-hero__facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.s-hero__facts li { font-family: var(--f-display); font-weight: 500; font-size: 16px; color: #F2F3EC; padding: 8px 16px; border-radius: 999px; background: rgba(242, 243, 236, 0.1); border: 1px solid rgba(242, 243, 236, 0.22); }

/* ---------- column ---------- */
.s-body { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 120px); }
.s-col { width: 100%; max-width: calc(800px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.s-about { display: grid; gap: 12px; padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 18px; }
.s-about p:first-child { color: var(--text); font-family: var(--f-display); font-size: clamp(20px, 1.8vw, 23px); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }

/* ---------- progress ---------- */
.s-progress { position: sticky; top: 84px; z-index: 5; margin: 0 0 24px; padding: 14px 18px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 30px -24px rgba(15, 42, 27, 0.45); }
.s-progress__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-soft); }
.s-progress__title { color: var(--heading); letter-spacing: 0; font-size: 17px; }
.s-progress__bar { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.s-progress__bar li { height: 6px; border-radius: 999px; background: var(--bg-alt); transition: background-color .4s var(--ease); }
.s-progress__bar li.is-done { background: var(--forest-700); }
.s-progress__bar li.is-now { background: var(--gold); }

/* ---------- steps + questions ---------- */
.s-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.s-step__head { display: flex; align-items: baseline; gap: 14px; padding: 0; margin-bottom: 18px; }
.s-step__num { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: #8A6A1F; letter-spacing: 0.04em; }
.s-step__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; color: var(--heading); letter-spacing: -0.02em; }
.s-step__intro { color: var(--text-soft); margin: -4px 0 18px; max-width: 62ch; }

.q { margin: 0 0 16px; padding: clamp(20px, 2.6vw, 30px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
fieldset.q { margin-inline: 0; }
/* a floated legend renders inside the card instead of on its top border */
fieldset.q > legend.q__label { float: left; width: 100%; margin: 0; }
fieldset.q > legend.q__label + * { clear: both; }
fieldset.q > legend.q__label + .q__opts { padding-top: 0; }
.q__eyebrow { display: block; font-family: var(--f-display); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8A6A1F; margin-bottom: 8px; }
.q__label { display: block; padding: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(19px, 1.6vw, 21px); line-height: 1.3; color: var(--heading); letter-spacing: -0.01em; }
.q__hint { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 16px; font-style: italic; color: var(--text-soft); }
.q__count { font-style: normal; font-weight: 600; color: var(--link); }
.q__intro { margin-top: 10px; font-size: 17px; color: var(--text-soft); }
.q__prompts { margin: 6px 0 0; padding-left: 22px; color: var(--text-soft); font-size: 17px; }
.q__prompts li { margin: 3px 0; }
.q__opts { margin-top: 16px; display: grid; gap: 8px; }
.q__more { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.q__more .s-field__label { font-family: var(--f-display); font-weight: 600; font-size: 17px; color: var(--heading); line-height: 1.35; }

/* option rows: real inputs, styled */
.opt { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 17px; line-height: 1.4; transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: rgba(201, 161, 59, 0.7); }
.opt input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid #6B7A70; border-radius: 6px; background: var(--surface); display: grid; place-content: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.opt input[type="radio"] { border-radius: 50%; }
.opt input::after { content: ""; width: 12px; height: 12px; transform: scale(0); transition: transform .15s var(--ease); background: var(--forest-950); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.opt input[type="radio"]::after { width: 10px; height: 10px; border-radius: 50%; clip-path: none; }
.opt input:checked { background: var(--gold); border-color: var(--gold); }
.opt input:checked::after { transform: scale(1); }
.opt input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt:has(input:checked) { border-color: var(--gold); background: rgba(201, 161, 59, 0.1); }
.opt:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.opt:has(input:disabled) input { cursor: not-allowed; }
.opt__text { flex: 1 1 auto; min-width: 0; }
.opt--other { flex-wrap: wrap; }
.opt__other { flex: 1 1 220px; min-width: 0; margin: -6px 0 -6px 0; }

.grid-row { margin-top: 18px; border: 0; padding: 0; min-width: 0; }
.grid-row legend { padding: 0; font-weight: 600; font-size: 17px; color: var(--heading); }
.grid-row .q__opts { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* text fields */
.s-field { display: grid; gap: 8px; min-width: 0; }
.s-field__label { font-size: 16px; font-weight: 600; color: var(--heading); }
.s-page input[type="text"], .s-page input[type="email"], .s-page input[type="password"], .s-page textarea,
.survey-page input[type="text"], .survey-page input[type="email"], .survey-page input[type="password"], .survey-page textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid rgba(14, 31, 21, 0.28); border-radius: 12px; padding: 12px 14px; min-height: 50px; transition: border-color .2s, box-shadow .2s;
}
.survey-page textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.survey-page input:focus, .survey-page textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 161, 59, 0.28); }
.q > .s-field, .q > input, .q > textarea { margin-top: 14px; }
.s-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.s-field__err { margin-top: 10px; color: #A5361F; font-size: 16px; font-weight: 600; }

/* privacy */
.s-privacy { margin: 8px 0 0; padding: clamp(20px, 2.6vw, 28px); border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); display: grid; gap: 10px; font-size: 16px; color: var(--text-soft); }
.s-privacy__title { font-size: 19px; font-weight: 600; color: var(--heading); }

.s-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* nav buttons */
.s-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.s-nav #s-next, .s-nav #s-submit { margin-left: auto; }
.s-btn-back { background: transparent; color: var(--heading); border-color: var(--line); }
.s-btn-back:hover { border-color: var(--heading); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.s-alert { margin: 20px 0 0; padding: 14px 18px; border-radius: 12px; background: rgba(165, 54, 31, 0.08); border: 1px solid rgba(165, 54, 31, 0.35); color: var(--text); font-weight: 500; }

/* thank you */
.s-thanks { text-align: center; padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; justify-items: center; gap: 16px; }
.s-thanks:focus { outline: none; }
.s-thanks img { width: 64px; height: auto; }
.s-thanks h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; font-weight: 600; max-width: 18ch; }
.s-thanks p { color: var(--text-soft); max-width: 52ch; }
.s-thanks__sign { display: grid; gap: 2px; margin: 4px 0 12px; }
.s-thanks__sign strong { font-family: var(--f-display); color: var(--heading); font-weight: 600; }
.s-thanks__sign span { font-family: var(--f-serif); font-style: italic; font-size: 20px; color: #8A6A1F; }

@media (prefers-color-scheme: dark) {
  .q__eyebrow, .s-thanks__sign span, .s-step__num { color: var(--gold-hi); }
  .opt input { border-color: #9AA89E; }
  .survey-page input[type="text"], .survey-page input[type="email"], .survey-page input[type="password"], .survey-page textarea { border-color: rgba(230, 233, 222, 0.28); }
  .s-field__err { color: #F0A08C; }
  .s-btn-back { color: var(--bone); }
}

.nav-back--short { display: none; }
@media (max-width: 480px) { .nav-back--long { display: none; } .nav-back--short { display: inline; } }

@media (max-width: 640px) {
  .s-hero { padding-top: 112px; }
  .s-progress { top: 80px; padding: 12px 14px 14px; }
  .s-pair { grid-template-columns: 1fr; }
  .opt { padding: 12px 14px; font-size: 16px; }
  .s-nav .btn { flex: 1 1 auto; }
  .grid-row .q__opts { grid-template-columns: 1fr 1fr; }
}

/* ---------- results page ---------- */
.r-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.r-head h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; }
.r-head p { color: var(--text-soft); margin-top: 6px; }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.r-actions .btn { min-height: 46px; font-size: 16px; }
.r-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); margin-bottom: 20px; }
.r-tabs button { appearance: none; border: 0; background: transparent; font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--text-soft); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.r-tabs button[aria-selected="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 2px 8px -4px rgba(15, 42, 27, 0.35); }
.r-q { margin: 0 0 16px; padding: clamp(18px, 2.4vw, 26px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.r-q h3 { font-size: 18px; line-height: 1.35; font-weight: 600; }
.r-q .q__eyebrow { margin-bottom: 6px; }
.r-n { margin-top: 4px; font-size: 15px; color: var(--text-soft); }
.r-bars { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.r-bar__top { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; line-height: 1.35; }
.r-bar__count { flex: none; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.r-bar__track { margin-top: 5px; height: 8px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.r-bar__fill { height: 100%; border-radius: 999px; background: var(--forest-700); }
@media (prefers-color-scheme: dark) { .r-bar__fill { background: var(--gold); } }
.r-sub { margin-top: 16px; font-weight: 600; font-size: 16px; color: var(--heading); }
.r-texts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.r-texts li { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.r-texts time { display: block; margin-top: 4px; font-size: 14px; color: var(--text-soft); }
.r-empty { color: var(--text-soft); font-style: italic; margin-top: 10px; font-size: 16px; }
.r-person { margin: 0 0 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.r-person summary { cursor: pointer; padding: 16px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-family: var(--f-display); font-weight: 600; color: var(--heading); }
.r-person summary span { font-family: var(--f-body); font-weight: 400; color: var(--text-soft); font-size: 15px; }
.r-person dl { margin: 0; padding: 0 20px 18px; display: grid; gap: 12px; }
.r-person dt { font-size: 15px; font-weight: 600; color: var(--text-soft); }
.r-person dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.r-gate { max-width: 520px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; }
.r-gate h2 { font-size: 26px; font-weight: 600; }
.r-gate p { color: var(--text-soft); font-size: 17px; }
