.tp-mf-app {
  --tp-mf-primary: #ff6600;
  --tp-mf-accent: #111827;
  --tp-mf-selected-text: #111827;
  --tp-mf-text: #111827;
  --tp-mf-muted: #6b7280;
  --tp-mf-bg: linear-gradient(180deg, #fff 0%, #fff7f0 100%);
  --tp-mf-border: rgba(17, 24, 39, 0.08);
  color: var(--tp-mf-text);
  margin: 2rem 0;
}

.tp-mf-shell { max-width: 1100px; margin: 0 auto; }
.tp-mf-hero {
  background: radial-gradient(circle at top left, rgba(255,102,0,.18), transparent 38%),
              linear-gradient(135deg, #ffffff, #fff8f2 55%, #fff2e8);
  border: 1px solid var(--tp-mf-border);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 18px 60px rgba(17,24,39,.07);
  margin-bottom: 1.25rem;
}
.tp-mf-badge {
  display: inline-flex;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,102,0,.1);
  color: var(--tp-mf-primary);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .9rem;
}
.tp-mf-hero h2 { margin: 0 0 .65rem; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.1; }
.tp-mf-hero p { margin: 0; max-width: 780px; color: var(--tp-mf-muted); font-size: 1.05rem; }

.tp-mf-card, .tp-mf-results {
  background: #fff;
  border: 1px solid var(--tp-mf-border);
  border-radius: 28px;
  box-shadow: 0 18px 60px rgba(17,24,39,.07);
}
.tp-mf-card { padding: 1.25rem; overflow: hidden; }
.tp-mf-card.is-shaking { animation: tp-mf-shake .3s linear; }
@keyframes tp-mf-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.tp-mf-progress-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.tp-mf-progress-bar {
  flex: 1;
  height: 12px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}
.tp-mf-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--tp-mf-primary), #ff8a3d);
  transition: width .35s ease;
  border-radius: inherit;
}
.tp-mf-progress-text { font-size: .95rem; color: var(--tp-mf-muted); white-space: nowrap; }

.tp-mf-step { display: none; min-height: 290px; animation: tp-mf-fade .25s ease; }
.tp-mf-step.is-active { display: block; }
@keyframes tp-mf-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tp-mf-step h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); margin: .2rem 0 1rem; }

.tp-mf-options { display: grid; gap: 1rem; }
.tp-mf-options.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-mf-option {
  appearance: none;
  border: 1px solid rgba(17,24,39,.08);
  background: linear-gradient(180deg, #fff, #fbfbfc);
  min-height: 88px;
  padding: 1rem 1.1rem;
  text-align: left;
  border-radius: 22px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tp-mf-text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 8px 24px rgba(17,24,39,.04);
}
.tp-mf-option:hover {
  transform: translateY(-2px);
  border-color: rgba(255,102,0,.35);
}
.tp-mf-option.is-selected {
  border-color: var(--tp-mf-primary);
  background: linear-gradient(180deg, #ff8a3d, var(--tp-mf-primary));
  color: var(--tp-mf-selected-text);
  box-shadow: 0 10px 28px rgba(255,102,0,.24);
  text-shadow: none;
}
.tp-mf-option.is-selected:hover,
.tp-mf-option.is-selected:focus-visible,
.tp-mf-option.is-selected:active {
  color: var(--tp-mf-selected-text);
  border-color: #d45500;
  background: linear-gradient(180deg, #ff944d, #e45c00);
}

.tp-mf-range-wrap {
  background: var(--tp-mf-bg);
  border: 1px solid var(--tp-mf-border);
  border-radius: 24px;
  padding: 1.4rem;
}
.tp-mf-range-wrap input[type="range"] { width: 100%; }
.tp-mf-range-value { margin-top: 1rem; font-size: 1.05rem; }

.tp-mf-actions { display: flex; gap: .75rem; justify-content: flex-end; padding-top: .5rem; }
.tp-mf-nav, .tp-mf-submit, .tp-mf-cta {
  border: 0;
  text-decoration: none;
  min-height: 48px;
  padding: .8rem 1.15rem;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.tp-mf-nav:hover, .tp-mf-submit:hover, .tp-mf-cta:hover { transform: translateY(-1px); }
.tp-mf-prev { background: #f3f4f6; color: var(--tp-mf-text); }
.tp-mf-next, .tp-mf-submit, .tp-mf-cta {
  background: linear-gradient(90deg, var(--tp-mf-primary), #ff8a3d);
  color: #fff;
  box-shadow: 0 14px 32px rgba(255,102,0,.22);
}
.tp-mf-nav[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.tp-mf-results { margin-top: 1.25rem; padding: 1.25rem; }
.tp-mf-results-header h2 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
.tp-mf-results-header p { margin: 0 0 1rem; color: var(--tp-mf-muted); }
.tp-mf-results-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-mf-result-card {
  border: 1px solid var(--tp-mf-border);
  border-radius: 24px;
  padding: 1.15rem;
  background: linear-gradient(180deg, #fff, #fcfcfd);
}
.tp-mf-result-card.is-primary {
  border-color: rgba(255,102,0,.35);
  background: linear-gradient(180deg, rgba(255,102,0,.10), rgba(255,255,255,1));
}
.tp-mf-result-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.tp-mf-result-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tp-mf-muted); margin-bottom: .35rem; }
.tp-mf-result-card h3 { margin: 0; font-size: 1.45rem; }
.tp-mf-result-link {
  color: var(--tp-mf-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .14em;
  font-weight: 700;
}
.tp-mf-result-link:hover,
.tp-mf-result-link:focus-visible {
  color: #d45500;
}
.tp-mf-result-more {
  margin: 1rem 0 0;
}
.tp-mf-result-link--more {
  font-size: .96rem;
}
.tp-mf-result-summary { color: #374151; line-height: 1.6; }
.tp-mf-tag {
  display: inline-flex;
  padding: .38rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.tp-mf-tag--primary { background: var(--tp-mf-primary); color: #fff; }
.tp-mf-list { margin: .5rem 0 0 1rem; padding: 0; }
.tp-mf-list li { margin: 0 0 .45rem; }
.tp-mf-list--muted { color: #6b7280; }
.tp-mf-tradeoff, .tp-mf-debug { margin-top: .9rem; padding: .85rem; border-radius: 14px; background: #f9fafb; }
.tp-mf-debug { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.tp-mf-excluded-wrap { margin-top: 1.25rem; }
.tp-mf-excluded-grid { display: grid; gap: .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-mf-excluded-item { border: 1px solid var(--tp-mf-border); border-radius: 18px; padding: .95rem; background: #fcfcfd; }
.tp-mf-loading, .tp-mf-empty { padding: 2rem; text-align: center; }
.tp-mf-cta-wrap { margin-top: 1.25rem; display: flex; justify-content: center; }

@media (max-width: 860px) {
  .tp-mf-options.grid-2, .tp-mf-results-grid, .tp-mf-excluded-grid { grid-template-columns: 1fr; }
  .tp-mf-progress-wrap { flex-direction: column; align-items: stretch; }
  .tp-mf-actions { flex-wrap: wrap; }
}
