/* ============================================================
   Money & Finance Magazine — Book DNA Matcher
   ============================================================ */

:root {
  --mf-green:       #0d6e4e;
  --mf-green-dark:  #094f38;
  --mf-green-light: #e8f5f0;
  --mf-gold:        #c8992a;
  --mf-text:        #1a1a1a;
  --mf-muted:       #5a5a5a;
  --mf-border:      rgba(0,0,0,.1);
  --mf-radius:      14px;
  --mf-shadow:      0 2px 16px rgba(0,0,0,.07);
}

/* Wrapper */
.mf-dna-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  box-shadow: var(--mf-shadow);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mf-text);
  background: #fff;
}

/* Header */
.mf-dna-header {
  margin-bottom: 20px;
}
.mf-dna-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--mf-green-dark);
  letter-spacing: -.3px;
}
.mf-dna-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--mf-muted);
  line-height: 1.5;
}

/* Progress bar */
.mf-dna-progress {
  height: 6px;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 28px;
}
.mf-dna-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mf-green), var(--mf-gold));
  border-radius: 999px;
  transition: width .35s ease;
}

/* Question */
.mf-dna-qcount {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--mf-green);
  margin-bottom: 10px;
}
.mf-dna-qprompt {
  margin: 0 0 18px 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--mf-text);
}

/* Options */
.mf-dna-options {
  display: grid;
  gap: 10px;
}
.mf-dna-opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid var(--mf-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fff;
}
.mf-dna-opt:hover {
  border-color: var(--mf-green);
  background: var(--mf-green-light);
}
.mf-dna-opt--selected,
.mf-dna-opt:has(input:checked) {
  border-color: var(--mf-green);
  background: var(--mf-green-light);
}
.mf-dna-opt input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--mf-green);
  width: 17px;
  height: 17px;
}
.mf-dna-opt span {
  font-size: 15px;
  line-height: 1.45;
}

/* Controls */
.mf-dna-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.mf-dna-btn {
  padding: 11px 20px;
  border: 1.5px solid var(--mf-border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  color: var(--mf-text);
}
.mf-dna-btn:hover:not(:disabled) {
  border-color: var(--mf-green);
  color: var(--mf-green);
}
.mf-dna-btn.mf-dna-next {
  background: var(--mf-green);
  color: #fff;
  border-color: var(--mf-green);
}
.mf-dna-btn.mf-dna-next:hover {
  background: var(--mf-green-dark);
  border-color: var(--mf-green-dark);
  color: #fff;
}
.mf-dna-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Error */
.mf-dna-error {
  margin-top: 10px;
  color: #b00020;
  font-size: 14px;
  min-height: 18px;
  font-weight: 500;
}

/* Loading state */
.mf-dna-loading {
  opacity: .6;
  pointer-events: none;
}

/* ── Results ───────────────────────────────── */
.mf-dna-results-head {
  padding: 24px;
  background: var(--mf-green-light);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(13,110,78,.15);
}
.mf-dna-results-head h3 {
  margin: 0 0 10px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--mf-green-dark);
}
.mf-dna-code {
  font-family: "Courier New", monospace;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--mf-green);
  font-weight: 800;
}
.mf-dna-blurb {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--mf-muted);
}

/* Insight bullets */
.mf-dna-bullets {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(13,110,78,.15);
  border-radius: 10px;
}
.mf-dna-bullets ul {
  margin: 0;
  padding-left: 18px;
}
.mf-dna-bullets li {
  margin: 6px 0;
  font-size: 13px;
  color: var(--mf-muted);
  line-height: 1.5;
}

/* Matches heading */
.mf-dna-matches-title {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--mf-text);
}

/* Book grid */
.mf-dna-bookgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.mf-dna-book {
  padding: 14px;
  border: 1.5px solid var(--mf-border);
  border-radius: 14px;
  background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.mf-dna-book:hover {
  box-shadow: var(--mf-shadow);
  border-color: rgba(13,110,78,.3);
}
.mf-dna-booklink {
  text-decoration: none;
  color: inherit;
  display: block;
}
.mf-dna-cover {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  object-fit: cover;
}
.mf-dna-cover--empty {
  height: 240px;
  background: linear-gradient(135deg, #f0f7f4, #e8f0ed);
  border-radius: 10px;
}
.mf-dna-booktitle {
  margin: 12px 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mf-text);
}
.mf-dna-why {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--mf-green);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.mf-dna-excerpt {
  margin: 0;
  font-size: 13px;
  color: var(--mf-muted);
  line-height: 1.5;
}

/* Buy button */
.mf-dna-buywrap {
  margin: 12px 0 0;
}
.mf-dna-buy {
  display: inline-block;
  padding: 9px 14px;
  background: var(--mf-gold);
  color: #fff;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s;
  border: none;
}
.mf-dna-buy:hover {
  background: #a37820;
  color: #fff;
}

/* Empty state */
.mf-dna-empty {
  padding: 20px;
  text-align: center;
  color: var(--mf-muted);
  font-size: 14px;
  border: 1px dashed var(--mf-border);
  border-radius: 12px;
}

/* Reset */
.mf-dna-reset-wrap {
  margin-top: 20px;
  text-align: center;
}
.mf-dna-reset {
  font-size: 13px;
  color: var(--mf-muted);
}

/* Responsive */
@media (max-width: 600px) {
  .mf-dna-wrap {
    padding: 20px 16px;
  }
  .mf-dna-title {
    font-size: 20px;
  }
  .mf-dna-qprompt {
    font-size: 17px;
  }
  .mf-dna-bookgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .mf-dna-bookgrid {
    grid-template-columns: 1fr;
  }
}
