/* Fatemi interactive article blocks. Uses the theme's own tokens, with
   fallbacks so the block still looks right if it is ever rendered outside it. */

.fxi {
  max-width: 760px;
  margin: 40px auto;
  padding: 26px 28px;
  background: var(--bg-subtle, #f8f9fa);
  border: 1px solid var(--border, #dee2e6);
  border-left: 4px solid var(--teal-500, #17b8a0);
  border-radius: var(--radius-xl, 16px);
}

.fxi-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text, #0b1d33);
}

.fxi-intro,
.fxi-foot {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #868e96);
}

.fxi-foot {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border, #dee2e6);
}

.fxi-progress {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #868e96);
}

.fxi-q {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text, #0b1d33);
}

/* answers */
.fxi-answers {
  display: grid;
  gap: 9px;
}

.fxi-answer {
  display: block;
  width: 100%;
  padding: 13px 16px;
  text-align: left;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text, #0b1d33);
  background: #fff;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}

.fxi-answer:hover,
.fxi-answer:focus-visible {
  border-color: var(--teal-500, #17b8a0);
  box-shadow: 0 0 0 3px rgba(23, 184, 160, .16);
  outline: none;
}

.fxi-answer:active { transform: translateY(1px); }

/* result card */
.fxi-result {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border, #dee2e6);
  background: #fff;
}

.fxi-result:focus { outline: none; }

.fxi-result h4 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.4;
}

.fxi-result p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
}

.fxi-result p:last-child { margin-bottom: 0; }

.fxi .fxi-result a:not(.fxi-btn) { color: var(--navy-700, #1e3a64); }

.fxi-urgent { border-left: 5px solid #c0392b; background: #fdf3f2; }
.fxi-urgent h4 { color: #a5281c; }
.fxi-warn   { border-left: 5px solid #d98324; background: #fdf8f1; }
.fxi-warn h4 { color: #8a5412; }
.fxi-calm   { border-left: 5px solid var(--teal-500, #17b8a0); }
.fxi-calm h4 { color: var(--navy-700, #1e3a64); }

/* calls to action */
.fxi-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

/* Scoped under .fxi so these beat the theme's prose link rules — `.fx-prose a`
   is (0,1,1) and was overriding both the colour and the underline, which left
   teal text on a navy button. */
.fxi .fxi-btn,
.fxi .fxi-btn:link,
.fxi .fxi-btn:visited {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--navy-700, #1e3a64);
  border-radius: 8px;
}

.fxi .fxi-btn:hover,
.fxi .fxi-btn:focus-visible {
  background: var(--navy-800, #0f2847);
  color: #fff;
  text-decoration: none;
}

.fxi .fxi-btn--ghost,
.fxi .fxi-btn--ghost:link,
.fxi .fxi-btn--ghost:visited {
  background: transparent;
  color: var(--navy-700, #1e3a64);
  border: 1px solid var(--navy-700, #1e3a64);
}

.fxi .fxi-btn--ghost:hover,
.fxi .fxi-btn--ghost:focus-visible {
  background: var(--navy-700, #1e3a64);
  color: #fff;
}

.fxi-restart {
  margin-top: 12px;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--muted, #868e96);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

.fxi-restart:hover { color: var(--text, #0b1d33); }

/* checklist */
.fxi-bar {
  height: 6px;
  margin-bottom: 16px;
  background: var(--border, #dee2e6);
  border-radius: 999px;
  overflow: hidden;
}

.fxi-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal-500, #17b8a0);
  transition: width .25s ease;
}

.fxi-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fxi-check li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.fxi-check input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--teal-500, #17b8a0);
  cursor: pointer;
}

.fxi-check label {
  font-size: 15px;
  line-height: 1.55;
  cursor: pointer;
}

.fxi-check input:checked + label {
  color: var(--muted, #868e96);
  text-decoration: line-through;
}

/* estimator */
.fxi-field { margin-bottom: 16px; }

.fxi-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.fxi-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.fxi-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--teal-500, #17b8a0);
}

.fxi-num {
  flex: 0 0 auto;
  min-width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--navy-700, #1e3a64);
}

.fxi-lines {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 16px;
  font-size: 15px;
}

.fxi-lines dt { color: var(--muted, #868e96); }

.fxi-lines dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text, #0b1d33);
}

@media (max-width: 540px) {
  .fxi { padding: 20px 18px; margin: 30px auto; }
  .fxi-cta { flex-direction: column; }
  .fxi-btn { text-align: center; }
  .fxi-num { min-width: 72px; }
}

@media print {
  .fxi-answers, .fxi-restart, .fxi-cta { display: none; }
}
