/* UX2 — stepper + hints + help overlay */

/* ============================
   Stepper (sticky strip under header)
   ============================ */
.stepper {
  position: sticky;
  top: var(--header-h);
  z-index: 18;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
}
body.expert-mode .stepper { display: none; }

.stepper__items {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  max-width: 1700px;
  width: 100%;
}
.step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  margin-right: 4px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 11px;
  font-family: var(--font-heading);
  font-weight: 600;
  transition: background 100ms, color 100ms;
  cursor: pointer;
}
.step::after {
  content: '\203A';
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 12px;
}
.step:last-child::after { display: none; }
.step__num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  background: var(--border);
  color: var(--text);
}
.step--done {
  color: var(--cobalt-700);
}
.step--done .step__num {
  background: #1e7a3a;
  color: white;
}
.step--current {
  background: var(--canary-300);
  color: var(--cobalt-900);
}
.step--current .step__num {
  background: var(--canary-500);
  color: var(--cobalt-900);
}
.step--todo {
  color: var(--text-muted);
}

/* Adjust zone header sticky offset to account for stepper height */
.zone__head {
  top: calc(var(--header-h) + 38px);
}
body.expert-mode .zone__head { top: var(--header-h); }

/* ============================
   Hints (subtle yellow callouts inside panels when empty/incomplete)
   ============================ */
.hint {
  background: var(--canary-300);
  color: var(--cobalt-900);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint::before {
  content: '\2192';
  font-size: 14px;
  flex-shrink: 0;
}
body.expert-mode .hint { display: none; }

/* ============================
   Tooltips on abbreviations
   ============================ */
[data-tip] {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
}
[data-tip]:hover::after,
[data-tip]:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cobalt-900);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: 2px 2px 0 rgba(10, 37, 64, 0.2);
  margin-bottom: 4px;
  letter-spacing: 0;
  text-transform: none;
}
[data-tip]:hover::before,
[data-tip]:focus::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--cobalt-900);
  z-index: 100;
  pointer-events: none;
}

/* ============================
   Help overlay (modal)
   ============================ */
.help-trigger {
  background: rgba(255, 255, 255, 0.10);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 100ms;
  margin-right: 4px;
}
.help-trigger:hover { background: rgba(255, 255, 255, 0.22); }

.help-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.help-overlay--open { display: block; }
.help-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.55);
}
.help-overlay__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(10, 37, 64, 0.25);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.help-overlay__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--cobalt-900);
  color: white;
}
.help-overlay__head h2 {
  margin: 0;
  font-size: 18px;
  color: white;
}
.help-overlay__close {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.help-overlay__close:hover { background: rgba(255, 255, 255, 0.15); }
.help-overlay__body {
  padding: 20px;
  overflow-y: auto;
}
.help-overlay__body section { margin-bottom: 20px; }
.help-overlay__body section:last-child { margin-bottom: 0; }
.help-overlay__body h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cobalt-700);
  margin: 0 0 10px;
}
.help-overlay__body a {
  color: var(--cobalt-700);
  text-decoration: underline;
}
.expert-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.expert-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--cobalt-700);
}
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.help-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.help-list kbd {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--cobalt-900);
  min-width: 24px;
  text-align: center;
}
.help-glossary {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.help-glossary > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  font-size: 13px;
}
.help-glossary dt {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--cobalt-700);
  margin: 0;
}
.help-glossary dd {
  margin: 0;
  color: var(--text);
}

@media (max-width: 600px) {
  .help-list { grid-template-columns: 1fr; }
  .help-glossary > div { grid-template-columns: 1fr; gap: 2px; }
}
