/* The wishlist. Same two states as the rest of the site: an answered step is solid,
   a step still to come is hatched, and the one you are on is yellow. */

.wizard-page { background: var(--sea); }
.wizard-title { font-weight: 650; font-size: 0.9375rem; color: var(--ink-soft); }
.wizard-wrap { padding-bottom: var(--space); }
.wizard { max-width: 46rem; }

.wizard h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-top: 1.75rem; }
.wizard h1:focus { outline: none; }
.step-lead { margin-top: 1rem; font-size: 1.1875rem; line-height: 1.45; max-width: 40rem; }

/* ---- progress ---------------------------------------------------------------------- */

.progress-text { font-size: 0.9375rem; font-weight: 650; color: var(--ink-soft); }
.progress ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 0.5rem; }
.progress li { height: 0.875rem; border: 1px solid var(--ink); border-radius: 1px; background: var(--hatch); position: relative; }
.progress li.is-done { background: var(--ink); }
.progress li.is-current { background: var(--provisional); }
.progress button { position: absolute; inset: -6px 0; width: 100%; border: 0; background: transparent; cursor: pointer; }

/* ---- fields ---------------------------------------------------------------------------- */

.step { margin-top: 2.5rem; display: grid; gap: 2.5rem; }
.field { min-width: 0; }
.field[hidden] { display: none; }

.field legend, .label { display: block; font-size: 1.1875rem; font-weight: 700; line-height: 1.3; max-width: 40rem; }
.required, .hint-inline { font-weight: 400; font-size: 0.9375rem; color: var(--ink-soft); }
.help { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.9375rem; max-width: 38rem; }

.options { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.options-inline { display: flex; flex-wrap: wrap; }

.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.option-text {
  display: block;
  padding: 0.75rem 1rem 0.65rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--land);
  font-weight: 600;
  line-height: 1.3;
}
.option-text small { display: block; margin-top: 0.15rem; font-size: 0.875rem; font-weight: 400; color: var(--ink-soft); }
.option:hover .option-text { background: #eef4f4; }
/* A chosen answer is decided, so it is solid. */
.option input:checked + .option-text { background: var(--ink); color: var(--land); }
.option input:checked + .option-text small { color: inherit; opacity: 0.85; }
.option input:focus-visible + .option-text { outline: 3px solid var(--provisional); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
.options-inline .option-text { padding: 0.6rem 1.1rem 0.5rem; }

/* "Choose any" answers carry a tick box, so they cannot be mistaken for "choose one". */
.option input[type='checkbox'] + .option-text { padding-left: 2.75rem; }
.option input[type='checkbox'] + .option-text::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 0.8rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid currentColor;
  border-radius: 2px;
}
.options-inline .option input[type='checkbox'] + .option-text::before { top: 0.62rem; }
.option input[type='checkbox']:checked + .option-text::before { background: var(--provisional); border-color: var(--provisional); box-shadow: inset 0 0 0 2px var(--ink); }

/* A matrix is a list of small questions that share one scale. */
.matrix { margin-top: 1rem; border-top: 1px solid var(--line); }
.matrix-row { display: grid; gap: 0.5rem 1.5rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .matrix-row { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: center; } }
.matrix-label { font-weight: 600; }
.matrix .options { margin-top: 0; gap: 0.35rem; }
.options-scale .option-text { padding: 0.45rem 0.75rem 0.35rem; font-size: 0.9375rem; border-width: 1.5px; }

.field input[type='text'], .field input[type='email'], .field input[type='number'], .field input[type='time'], .field select, .field textarea {
  display: block;
  width: 100%;
  max-width: 30rem;
  margin-top: 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--land);
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 0.7rem 0.85rem 0.6rem;
}
.field textarea { max-width: 40rem; resize: vertical; }
.field input.is-narrow { width: 8rem; }
.with-unit { display: flex; align-items: baseline; gap: 0.6rem; }
.pair { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pair select { width: auto; min-width: 9rem; }

.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; align-items: start; max-width: 40rem; font-weight: 600; cursor: pointer; }
.check input { width: 1.4rem; height: 1.4rem; margin: 0.1rem 0 0; accent-color: var(--ink); }

.error { margin-top: 0.6rem; color: var(--alert); font-weight: 650; }
.error[hidden], .form-alert[hidden] { display: none; }
.has-error .option-text, .has-error input, .has-error select, .has-error textarea { border-color: var(--alert); }
.form-alert { padding: 0.9rem 1rem 0.8rem; border-left: 6px solid var(--alert); background: var(--land); font-weight: 650; max-width: 40rem; }

.step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 0.5rem; }
.link-button { font: inherit; color: inherit; background: none; border: 0; padding: 0.25rem 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.link-button:hover { text-decoration-thickness: 0.16em; }

.saved-note { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-soft); max-width: 40rem; }

.wizard-footer { display: block; }
.wizard-footer p { max-width: 40rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; margin-top: 0.75rem; }
.site-footer .inline-links li + li { margin-top: 0; }

/* ---- result ------------------------------------------------------------------------------ */

.result { margin-top: 1rem; }
.result-block { margin-top: 3rem; padding-top: 1.5rem; border-top: 3px solid var(--ink); }
.result-block h2, .result-next h2 { font-size: 1.625rem; }
.result-lead { margin-top: 0.6rem; max-width: 40rem; }
.result-note { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--ink-soft); max-width: 40rem; }

.fit { margin-top: 1.25rem; display: grid; gap: 1rem; }
.fit dt { font-size: 1.375rem; font-weight: 800; line-height: 1.2; }
.fit dt::first-letter { text-transform: uppercase; }
.fit dd { margin-top: 0.15rem; color: var(--ink-soft); }

.result-directions { margin-top: 1.5rem; display: grid; gap: 1rem; }
.direction { padding: 1.25rem 1.4rem 1.2rem; background: var(--land); border: 2px dashed var(--ink); border-radius: 3px; }
.direction h3 { font-size: 1.375rem; }
.direction-level { margin-top: 0.15rem; font-weight: 700; }
.direction-stated { margin-top: 0.4rem; color: var(--ink-soft); }
.direction-tension { margin-top: 0.4rem; padding: 0.5rem 0.75rem 0.4rem; background: var(--provisional); font-weight: 600; border-radius: 2px; }
.reasons { margin-top: 0.9rem; display: grid; gap: 0.5rem; font-size: 0.9375rem; }
.reasons li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); }
.reasons li::before { font-weight: 800; }
.reasons .is-for::before { content: '+'; }
.reasons .is-against::before { content: '−'; }

.flags { margin-top: 1.25rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.flag { padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.flag-topic { font-weight: 700; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.flag-status { font-size: 0.8125rem; font-weight: 650; padding: 0.15em 0.5em 0.05em; border: 1.5px solid var(--ink); border-radius: 2px; }
.is-ok .flag-status { background: var(--ink); color: var(--land); }
.is-action .flag-status, .is-unknown .flag-status { background: var(--provisional); }
.is-no .flag-status { border-color: var(--alert); color: var(--alert); }
.flag p + p { margin-top: 0.3rem; max-width: 40rem; }

.cost-directions { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
@media (min-width: 40rem) { .cost-directions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cost-directions button { font: inherit; text-align: left; padding: 0.7rem 0.9rem 0.6rem; border: 2px solid var(--ink); border-radius: 3px; background: var(--land); color: var(--ink); cursor: pointer; }
.cost-directions button span, .cost-directions button strong { display: block; }
.cost-directions button strong { font-size: 1.125rem; font-weight: 800; white-space: nowrap; }
.cost-directions button[aria-pressed='true'] { background: var(--ink); color: var(--land); }

.cost-detail { margin-top: 1rem; }
.cost-detail .table-scroll { margin-top: 0; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.cost-table th, .cost-table td { text-align: left; vertical-align: top; padding: 0.6rem 0 0.5rem; border-bottom: 1px solid var(--line); font-weight: 400; }
.cost-table td { text-align: right; white-space: nowrap; padding-left: 1rem; font-weight: 600; }
.cost-table small { display: block; color: var(--ink-soft); font-size: 0.875rem; max-width: 32rem; }
.cost-table .tag-open { margin-left: 0.5rem; }
.cost-table .cost-head th, .cost-table .cost-head td { padding-top: 1.5rem; font-weight: 800; font-size: 1rem; border-bottom: 2px solid var(--ink); }
.cost-table .cost-total th, .cost-table .cost-total td { font-size: 1.25rem; font-weight: 800; border-bottom: 3px solid var(--ink); padding-block: 0.9rem 0.75rem; }

.budget-fit { margin-top: 1rem; padding: 0.8rem 1rem 0.7rem; background: var(--land); border-left: 6px solid var(--ink); max-width: 40rem; }
.budget-fit.is-tight, .budget-fit.is-over { border-left-color: var(--provisional); }

.assumptions { margin-top: 1.5rem; max-width: 40rem; }
.assumptions summary { cursor: pointer; font-weight: 700; }
.assumptions ul { margin-top: 0.75rem; list-style: disc; padding-left: 1.25rem; font-size: 0.9375rem; color: var(--ink-soft); }
.assumptions li + li { margin-top: 0.4rem; }

.result-next { margin-top: 3.5rem; padding: 1.75rem; background: var(--ink); color: var(--land); border-radius: 3px; }
.result-next p { margin-top: 0.75rem; max-width: 38rem; }
.result-next .step-actions { margin-top: 1.5rem; }
.result-next .button { background: var(--provisional); border-color: var(--provisional); color: var(--ink); }
.result-next .button-quiet { background: transparent; border-color: var(--land); color: var(--land); }
.result-next .button-quiet:hover { background: var(--land); color: var(--ink); }

.sent .plain-list { margin-top: 2rem; }
.sent .step-actions { margin-top: 2.5rem; }
