/* Kofikou taste quiz: one calm column, one question per screen. Builds on styles.css tokens. */

.qz { width: min(40rem, 100% - 2.5rem); margin-inline: auto; padding-block: clamp(.5rem, 3vw, 2.5rem) 4rem; }
.qz:focus { outline: none; }
.qz h2 { font-weight: 400; }

/* intro */
.qz-intro { display: grid; gap: 1.25rem; }
.qz-intro h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); font-weight: 400; line-height: 1; letter-spacing: -.03em; }
.qz-intro h1 em { font-style: italic; font-weight: 300; color: var(--rust); }
.qz-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 .5rem; padding: 0; list-style: none; }
.qz-facts li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 99px;
  background: var(--milk);
  border: 1px solid var(--line);
  font-size: .95rem;
}
.qz-facts li::before { content: ""; width: .5rem; height: .72rem; border-radius: 50%; background: var(--caramel); transform: rotate(28deg); }
.qz-start { justify-self: start; min-width: 14rem; }

/* progress */
.qz-progress { display: flex; gap: 6px; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.qz-progress li { flex: 1; height: 6px; border-radius: 99px; background: var(--paper-deep); transition: background-color .3s ease; }
.qz-progress .is-done { background: var(--sage); }
.qz-progress .is-current { background: rgb(63 90 61 / .45); }

/* question */
.qz-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.qz-form legend { padding: 0; width: 100%; }
.qz-title { font-size: clamp(1.65rem, 5.2vw, 2.4rem); line-height: 1.12; }
.qz-count { display: block; margin-bottom: .7rem; font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }
.qz-hint { margin: .6rem 0 1.4rem; color: var(--ink-soft); }
.qz-options { display: grid; gap: .6rem; }

.qz-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  min-height: 3.75rem;
  padding: .9rem 1.1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--milk);
  font-weight: 400; /* shared label rule is bold */
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.qz-option:hover { border-color: var(--ink); }
.qz-option:has(:checked) { border-color: var(--sage); background: #e9ecdd; box-shadow: inset 0 0 0 1.5px var(--sage); }
.qz-option:has(:focus-visible) { border-color: var(--ink); }
.qz-option input {
  appearance: none;
  width: 1.35rem; height: 1.35rem;
  margin: 0;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--milk);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.qz-option input:checked { border-color: var(--sage); background: var(--sage); box-shadow: inset 0 0 0 3.5px var(--milk); }
.qz-option input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.qz-option strong { display: block; font-weight: 600; font-size: 1.06rem; line-height: 1.3; }
.qz-option small { display: block; margin-top: .15rem; font-size: .93rem; line-height: 1.4; color: var(--ink-soft); }
.qz-option svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.qz-error { flex-basis: 100%; color: var(--rust); font-weight: 600; }
.qz-error:not(:empty) { margin-bottom: .7rem; } /* stays rendered so the alert is announced */

/* on phones the bar sticks so Next stays under the thumb on long option lists */
.qz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 .6rem;
  margin-top: 1rem;
  padding-top: 1rem;
}
.qz-back { padding-inline: 1.1rem 1.4rem; gap: .35rem; }
.qz-back svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qz-next { min-width: 12rem; }

/* result */
.qz-result { display: grid; gap: 1.25rem; }
.qz-card { display: grid; gap: 1rem; padding: clamp(1.4rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 22px; background: var(--milk); }
.qz-card h2 { font-size: clamp(2.2rem, 7vw, 3.3rem); line-height: 1; letter-spacing: -.03em; outline-offset: 6px; }
.qz-result__text { font-size: 1.1rem; line-height: 1.55; }
.qz-notes { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.qz-notes li { padding: .3rem .85rem; border-radius: 99px; background: var(--paper-deep); font: italic 400 1.02rem/1.3 var(--serif); }
.qz-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.qz-meta dt { margin-bottom: .3rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.qz-meta dd { margin: 0; text-align: left; font-weight: 500; line-height: 1.4; }

.qz-plan { --focus: var(--caramel); display: grid; gap: .45rem; padding: clamp(1.4rem, 4vw, 1.8rem); border-radius: 22px; background: var(--forest); color: var(--cream); }
.qz-plan .eyebrow { color: var(--caramel); }
.qz-plan__name { font: 400 1.7rem/1.15 var(--serif); }
.qz-plan p:not(.eyebrow):not(.qz-plan__name) { color: rgb(247 235 217 / .82); }
.qz-plan .btn { justify-self: start; margin-top: .5rem; }
.qz-plan .qz-plan__fine { font-size: .875rem; }

.qz-more summary { font-size: 1.15rem; }
.qz-more details > p { padding: 0 0 1.2rem; }
.qz-why { display: grid; gap: .55rem; margin: 0; padding: 0 0 1rem; list-style: none; }
.qz-why li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.qz-why li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .75rem; border-radius: 50%; background: var(--caramel); transform: rotate(28deg); }
.qz-answers { margin: 0; padding-bottom: .8rem; }
.qz-answers div { padding-block: .55rem; }
.qz-answers div + div { border-top: 1px solid var(--line); }
.qz-answers dt { font-size: .9rem; color: var(--ink-soft); }
.qz-answers dd { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; font-weight: 600; }
.qz-change {
  flex: none;
  min-height: 2.75rem;
  padding: .5rem .25rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 .95rem/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: .25em;
  cursor: pointer;
}
.qz-change:hover { color: var(--rust); }

.qz-result__actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.qz-save { margin-top: .5rem; padding: clamp(1.4rem, 4vw, 1.8rem); border: 1px solid var(--line); border-radius: 22px; background: var(--paper-deep); }
.qz-save h3 { font-size: 1.4rem; }
.qz-save .fine a { font-weight: 600; color: var(--ink); }
.qz-save button:disabled { opacity: .6; cursor: progress; transform: none; }

@media (max-width: 600px) {
  .qz-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--paper) 70%, rgb(245 237 225 / 0));
  }
  .qz-start { justify-self: stretch; }
  .qz-next { flex: 1; min-width: 0; }
  .qz-option { padding: .85rem 1rem; gap: .8rem; }
  .qz-result__actions .btn { flex: 1; }
  .qz-plan .btn { justify-self: stretch; }
}
@media (max-width: 380px) {
  .qz-meta { grid-template-columns: 1fr; }
  .qz-option svg { display: none; }
}
