/* BandCraft guided tool: the progress stepper, the writing/speaking tabs, the popular-topic chips,
   the "tell us" exam line, the trust line under the tool, and the two-view switch (tool / result).
   Uses the tokens from styles.css; loaded after it. */

/* --- Progress stepper at the top of the tool --- */
.flow-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flow-steps li { display: flex; align-items: center; gap: 9px; padding-top: 10px; border-top: 3px solid var(--line); color: var(--muted); font: 600 .86rem/1.3 var(--font-ui); min-width: 0; }
.flow-num { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: .76rem; }
.flow-steps li.is-done { border-top-color: var(--teal-ink); color: var(--text); }
.flow-steps li.is-done .flow-num { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.flow-steps li.is-current { border-top-color: var(--gold); color: var(--navy); }
.flow-steps li.is-current .flow-num { background: var(--navy); border-color: var(--navy); color: var(--cream-ink); }

/* --- Writing / Speaking tabs: the first control of the tool --- */
.mode-control .seg { width: 100%; max-width: 420px; }
.mode-control .seg button { flex: 1; font-size: 1rem; }

/* --- Exam selects (writing and speaking): native <select>, styled like the text wells --- */
.exam-select {
  width: 100%; max-width: 420px; min-width: 0; min-height: 44px; box-sizing: border-box;
  padding: 8px 40px 8px 14px; font: 600 .95rem/1.3 var(--font-ui); color: var(--navy);
  background: var(--well); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer;
}
.exam-select:focus-visible { outline: none; border-color: var(--c-tr); box-shadow: var(--focus); }
.exam-select:disabled { opacity: .6; cursor: not-allowed; }

/* --- Mode-aware copy: flow.js sets <html data-mode>; without JS the writing version shows --- */
html[data-mode="speaking"] .for-writing { display: none; }
html:not([data-mode="speaking"]) .for-speaking { display: none; }
/* The About page shows both versions of its "how it works" steps. */
html[data-mode="both"] .for-writing, html[data-mode="both"] .for-speaking { display: revert; }

/* --- Popular-topic chips under the question box --- */
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.topic-chip {
  max-width: 100%; padding: 8px 14px; min-height: 40px; text-align: left; cursor: pointer;
  font: 500 .9rem/1.35 var(--font-ui); color: var(--navy); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 999px;
}
.topic-chip:hover { border-color: var(--gold); background: var(--gold-tint); }
.topic-chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* --- "Preparing for another exam? Tell us" --- */
.interest { flex-basis: 100%; margin: -10px 0 24px; }
.interest-toggle {
  padding: 4px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 600 .88rem var(--font-ui); color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px;
}
.interest-panel { margin-top: 8px; display: grid; gap: 8px; }
.interest-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: 500 .92rem var(--font-ui); }
.interest-item button:disabled { color: var(--teal-ink); }

/* --- Trust line under the tool --- */
.trust-line { margin: 12px 0 0; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.trust-line a { font: 600 .9rem var(--font-ui); color: var(--navy); border-bottom: 1.5px solid var(--gold); text-decoration: none; }

/* --- Hero on the About page and the Back link on Pricing --- */
.hero-about { padding-bottom: 0; }
.pricing-payments { margin: 22px 2px 0; font-size: .92rem; color: var(--muted); }
.pricing-back { margin: 18px 2px 0; }
.pricing-back a { font: 600 .92rem var(--font-ui); color: var(--navy); border-bottom: 1.5px solid var(--gold); text-decoration: none; }

/* --- Two views: while a result shows, the tool is hidden (body.view-result) --- */
.view-result [data-view="tool"] { display: none !important; }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.result-back { min-height: 40px; }

@media (max-width: 640px) {
  .flow-steps { gap: 6px; margin-bottom: 20px; }
  .flow-steps li { flex-direction: column; align-items: flex-start; gap: 5px; font-size: .74rem; }
  .kbd-hint { display: none; }
  .topic-chip { font-size: .86rem; }
}
