/* MH Interactive Tools — shared design system
 * Modern, light, editorial. Clean system sans for UI + an elegant serif for the
 * display moments (question + result title). Scoped to .mhf. Hard-resets buttons
 * and forces fonts so the host theme's global styles (dark button fills, uppercase,
 * legacy font) can never bleed in. No explicit font-sizes: text inherits the
 * theme's natural sizing (buttons use font-size:inherit so they don't collapse to
 * the tiny UA form-control default). Pads the host page (page-id-14393).
 */

.mhf {
  --mhf-accent: #b76a4f;
  --mhf-accent-ink: #9a5138;
  --mhf-accent-2: #cf8a6f;
  --mhf-ink: #2c2621;
  --mhf-muted: #948a82;
  --mhf-line: #efe8e1;
  --mhf-tint: #fbf6f1;
  --mhf-paper: #ffffff;
  --mhf-radius: 22px;
  --mhf-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mhf-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  font-family: var(--mhf-sans) !important;
  color: var(--mhf-ink);
  margin: 2.25rem auto;
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf7 100%);
  border: 1px solid var(--mhf-line);
  border-radius: var(--mhf-radius);
  padding: clamp(1.5rem, 5vw, 2.75rem);
  box-shadow: 0 1px 2px rgba(80, 50, 35, 0.04), 0 20px 50px -26px rgba(150, 90, 60, 0.38);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
.mhf *, .mhf *::before, .mhf *::after { box-sizing: border-box; }

/* NOTE: page 14393 (Beziehungsmethoden-Test) used to be classic content with a
   per-page-id host rule here. It is now a native Elementor page like the other
   tools, so that rule was removed to keep all four tool pages visually identical. */

/* --- reusable tool-page wrapper (used if a tool page wraps content in
       <div class="mhf-toolpage">, e.g. classic-content fallback) --- */
.mhf-toolpage {
  max-width: 1400px; margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.1rem, 5vw, 2.5rem) clamp(3rem, 8vw, 5rem);
  box-sizing: border-box;
}
.mhf-toolpage .mhf-hero-title {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif !important;
  font-size: clamp(2.1rem, 5.2vw, 3.15rem); line-height: 1.08; font-weight: 500;
  letter-spacing: -0.02em; color: #2c2621; margin: 0 0 .7rem; max-width: 24ch;
}
.mhf-toolpage .mhf-lead {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.5; color: #8a8078;
  font-weight: 400; margin: 0 0 2.6rem; max-width: 54ch;
}

/* progress */
.mhf__steps { display: flex; align-items: center; gap: 12px; margin-bottom: 1.9rem; }
.mhf__bar { display: flex; gap: 6px; flex: 1; list-style: none; margin: 0; padding: 0; }
.mhf__bar li { height: 3px; flex: 1; border-radius: 3px; background: var(--mhf-line); transition: background .35s ease; }
.mhf__bar li[data-on="1"] { background: var(--mhf-accent); }
.mhf__stepnum { font-family: var(--mhf-sans) !important; letter-spacing: .05em; color: var(--mhf-muted); white-space: nowrap; font-weight: 500; opacity: .9; }

/* question — editorial serif */
.mhf .mhf__q {
  font-family: var(--mhf-serif) !important;
  line-height: 1.24; font-weight: 500; letter-spacing: -0.01em;
  margin: 0 0 .5rem; color: var(--mhf-ink);
}
.mhf .mhf__hint { font-family: var(--mhf-sans) !important; color: var(--mhf-muted); font-weight: 400; margin: 0 0 1.3rem; }

/* options — hard reset so theme button styles cannot leak in */
.mhf__opts { display: grid; gap: .55rem; margin: 0; padding: 0; }
.mhf .mhf__opt {
  -webkit-appearance: none !important; appearance: none !important;
  display: flex !important; align-items: center; gap: .85rem;
  width: 100%; text-align: left !important; cursor: pointer;
  background: var(--mhf-paper) !important; color: var(--mhf-ink) !important;
  border: 1.5px solid var(--mhf-line) !important; border-radius: 14px !important;
  padding: 1.15rem 1.25rem !important; min-height: 62px;
  font-family: var(--mhf-sans) !important; font-size: inherit !important; font-weight: 400 !important;
  line-height: 1.45 !important; letter-spacing: normal !important; text-transform: none !important;
  box-shadow: none !important; text-shadow: none !important;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.mhf .mhf__opt:hover { border-color: var(--mhf-accent-2) !important; background: var(--mhf-tint) !important; }
.mhf .mhf__opt:active { transform: scale(.995); }
.mhf .mhf__opt:focus-visible { outline: 3px solid var(--mhf-accent) !important; outline-offset: 2px; }
.mhf .mhf__opt[aria-pressed="true"] {
  border-color: var(--mhf-accent) !important; border-width: 1.5px !important;
  background: var(--mhf-tint) !important; color: var(--mhf-accent-ink) !important; font-weight: 500 !important;
  box-shadow: 0 6px 18px -12px rgba(150, 90, 60, 0.55) !important;
}
.mhf__tick {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  border: 2px solid var(--mhf-line); background: transparent; position: relative;
  transition: border-color .15s, background .15s;
}
.mhf .mhf__opt:hover .mhf__tick { border-color: var(--mhf-accent-2); }
.mhf .mhf__opt[aria-pressed="true"] .mhf__tick {
  border-color: var(--mhf-accent);
  background: linear-gradient(135deg, var(--mhf-accent-2), var(--mhf-accent));
}
.mhf .mhf__opt[aria-pressed="true"] .mhf__tick::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.mhf__opt-label { flex: 1; }

/* nav — hard reset */
.mhf__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.7rem; gap: 1rem; }
.mhf .mhf__btn {
  -webkit-appearance: none !important; appearance: none !important;
  font-family: var(--mhf-sans) !important; font-size: inherit !important; font-weight: 500 !important;
  letter-spacing: normal !important; text-transform: none !important; cursor: pointer;
  border-radius: 999px !important; padding: .92rem 1.9rem !important;
  box-shadow: none !important; text-shadow: none !important; line-height: 1.2 !important;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.mhf .mhf__btn--primary {
  background: linear-gradient(135deg, var(--mhf-accent-2) 0%, var(--mhf-accent-ink) 100%) !important;
  color: #fff !important; border: 1.5px solid transparent !important;
  box-shadow: 0 8px 20px -10px rgba(150, 80, 55, 0.65) !important;
}
.mhf .mhf__btn--primary:hover { box-shadow: 0 10px 26px -10px rgba(150, 80, 55, 0.78) !important; transform: translateY(-1px); }
.mhf .mhf__btn--ghost { background: transparent !important; color: var(--mhf-muted) !important; border: 1.5px solid transparent !important; padding-inline: .5rem !important; }
.mhf .mhf__btn--ghost:hover { color: var(--mhf-accent-ink) !important; }
.mhf .mhf__btn:focus-visible { outline: 3px solid var(--mhf-accent) !important; outline-offset: 2px; }

/* computing / spinner */
.mhf__computing { text-align: center; padding: 2.75rem 0 3rem; animation: mhf-fade .3s ease both; }
.mhf__spinner {
  width: 40px; height: 40px; margin: 0 auto 1.25rem; border-radius: 50%;
  border: 2.5px solid var(--mhf-line); border-top-color: var(--mhf-accent);
  animation: mhf-spin .8s linear infinite;
}
.mhf .mhf__computing p { font-family: var(--mhf-sans) !important; color: var(--mhf-muted); font-weight: 400; margin: 0; }

/* result */
.mhf__result { animation: mhf-fade .45s ease both; }
.mhf .mhf__picked { font-family: var(--mhf-sans) !important; color: var(--mhf-muted); font-weight: 400; margin: 0 0 1.1rem; }
.mhf .mhf__result-kicker { font-family: var(--mhf-sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--mhf-accent); font-weight: 600; margin: 0 0 .6rem; }
.mhf .mhf__result-title {
  font-family: var(--mhf-serif) !important;
  line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 1.05rem; color: var(--mhf-ink);
}
.mhf .mhf__result-body { font-family: var(--mhf-sans) !important; line-height: 1.72; font-weight: 400; margin: 0 0 1rem; }
.mhf .mhf__note {
  font-family: var(--mhf-sans) !important; display: block; margin-top: 1.2rem; padding: .85rem 1.05rem;
  border-left: 3px solid var(--mhf-accent); background: var(--mhf-tint);
  border-radius: 0 12px 12px 0; line-height: 1.6; color: var(--mhf-muted); font-weight: 400;
}
.mhf__cta { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; margin-top: 1.7rem; }
.mhf .mhf__cta a.mhf__btn { text-decoration: none !important; display: inline-block; }

@keyframes mhf-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mhf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mhf *, .mhf__result, .mhf__computing, .mhf .mhf__btn--primary:hover { transition: none !important; animation: none !important; transform: none !important; }
  .mhf__spinner { animation: none !important; }
}
@media (max-width: 480px) {
  .mhf .mhf__cta .mhf__btn--primary { width: 100%; text-align: center; }
}
