.qf-calculator-root,
.qf-calc-home {
  --qf-bordeaux: #7f1d1d;
  --qf-bordeaux-dark: #5b1111;
  --qf-cream: #fff7ed;
  --qf-blue: #e0f2fe;
  --qf-green: #dcfce7;
  --qf-yellow: #fef9c3;
  --qf-red: #fee2e2;
  --qf-gray: #f8fafc;
  --qf-text: #1f2937;
  --qf-muted: #6b7280;
  --qf-border: #d1d5db;
  color: var(--qf-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.qf-calculator-root * { box-sizing: border-box; }
.qf-calc-shell { border: 1px solid var(--qf-border); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .08); margin: 24px 0; }
.qf-calc-header { background: var(--qf-bordeaux); color: #fff; padding: 22px 26px; }
.qf-calc-header h2 { margin: 0 0 8px; color: #fff; font-size: 1.55rem; line-height: 1.25; }
.qf-calc-header p { margin: 0; opacity: .92; }
.qf-calc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; background: var(--qf-cream); border-bottom: 1px solid var(--qf-border); }
.qf-calc-toolbar button,
.qf-calc-report-actions button { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; background: var(--qf-bordeaux); color: #fff; }
.qf-calc-toolbar button.secondary,
.qf-calc-report-actions button.secondary { background: #374151; }
.qf-calc-progress { padding: 0 20px 18px; background: var(--qf-cream); color: var(--qf-muted); font-size: .95rem; }
.qf-progress-bar { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.qf-progress-fill { height: 100%; background: var(--qf-bordeaux); width: 0; transition: width .2s ease; }
.qf-calc-body { padding: 18px 20px 26px; }
.qf-fieldset { border: 1px solid var(--qf-border); border-radius: 14px; margin: 0 0 18px; overflow: hidden; }
.qf-fieldset legend { background: var(--qf-bordeaux-dark); color: #fff; padding: 10px 14px; width: 100%; font-weight: 800; }
.qf-question { display: grid; grid-template-columns: 100px 1fr 230px; gap: 12px; padding: 14px; border-top: 1px solid #e5e7eb; align-items: start; }
.qf-question:nth-child(even) { background: #f8fafc; }
.qf-question-id { font-size: .8rem; font-weight: 800; color: var(--qf-bordeaux); }
.qf-question-text { line-height: 1.35; }
.qf-question-controls select,
.qf-question-controls textarea,
.qf-eval-data input { width: 100%; border: 1px solid var(--qf-border); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }
.qf-question-controls textarea { margin-top: 8px; min-height: 54px; resize: vertical; }
.qf-eval-data { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; padding: 16px; background: var(--qf-gray); border: 1px solid var(--qf-border); border-radius: 14px; }
.qf-eval-data label { font-size: .88rem; font-weight: 700; color: var(--qf-muted); }
.qf-results { padding: 20px; border-top: 1px solid var(--qf-border); background: #fff; }
.qf-dashboard { --qf-deep-green:#153f36; --qf-mint:#dff3ea; --qf-amber:#f4b942; --qf-terracotta:#c75b45; --qf-ink:#17342f; color:var(--qf-ink); }
.qf-dashboard-heading,.qf-section-heading { display:flex; justify-content:space-between; gap:24px; align-items:flex-end; margin-bottom:16px; }
.qf-dashboard-heading h2,.qf-section-heading h3 { margin:3px 0 0; color:var(--qf-deep-green); }
.qf-eyebrow { color:#52736c; font-size:.75rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.qf-completion { padding:7px 12px; border-radius:999px; background:#eef6f3; color:#365f56; font-size:.82rem; font-weight:750; white-space:nowrap; }
.qf-score-card { display:grid; grid-template-columns:minmax(175px,.7fr) 2fr; gap:28px; align-items:center; padding:26px; border:1px solid #cfe0da; border-radius:22px; background:linear-gradient(135deg,#f7fbf9,#edf6f2); margin-bottom:16px; box-shadow:0 16px 38px rgba(21,63,54,.09); }
.qf-score-visual { padding-right:24px; border-right:1px solid #cfe0da; }
.qf-score-number { font-size: 3rem; font-weight: 900; color: var(--qf-bordeaux); line-height: 1; }
.qf-score-number span { font-size:1.25rem; margin-left:2px; }
.qf-score-caption { margin-top: 6px; color: var(--qf-muted); font-weight: 700; }
.qf-score-label { font-size:1.35rem; font-weight:850; margin-bottom:4px; color:var(--qf-deep-green); }
.qf-score-card.qf-tone-low .qf-score-number { color:#24725d; }
.qf-score-card.qf-tone-medium .qf-score-number { color:#9a6710; }
.qf-score-card.qf-tone-high .qf-score-number { color:#b34d35; }
.qf-score-card.qf-tone-critical .qf-score-number { color:#8f2933; }
.qf-risk-scale { position:relative; height:10px; border-radius:999px; margin-top:16px; background:linear-gradient(90deg,#4aa984 0 25%,#e5b849 25% 50%,#df7d47 50% 75%,#b6404c 75%); }
.qf-risk-scale span { position:absolute; top:-5px; width:18px; height:18px; border:3px solid #fff; border-radius:50%; background:var(--qf-deep-green); box-shadow:0 1px 5px rgba(0,0,0,.3); }
.qf-risk-labels { display:grid; grid-template-columns:repeat(4,1fr); font-size:.68rem; color:#627972; margin-top:5px; }
.qf-risk-labels span:not(:first-child) { text-align:center; }
.qf-risk-labels span:last-child { text-align:right; }
.qf-kpi-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:18px 0 28px; }
.qf-kpi { display:flex; align-items:center; gap:12px; min-height:88px; padding:15px 17px; border:1px solid #dce7e3; border-radius:16px; background:#fff; }
.qf-kpi-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; font-size:1.2rem; font-weight:900; flex:0 0 auto; }
.qf-kpi strong,.qf-kpi span { display:block; }
.qf-kpi strong { font-size:1.55rem; line-height:1; }
.qf-kpi div span { margin-top:5px; color:#60756f; font-size:.84rem; font-weight:700; }
.qf-kpi-strength .qf-kpi-icon { background:#dcf4e9; color:#1d7159; }
.qf-kpi-gap .qf-kpi-icon { background:#fff1cd; color:#8b620f; }
.qf-kpi-alert .qf-kpi-icon { background:#fbe2dd; color:#a33f2e; }
.qf-dashboard-section { margin:28px 0; padding:22px; border:1px solid #dce7e3; border-radius:18px; background:#fbfdfc; }
.qf-section-heading p { max-width:370px; margin:0; color:#63766f; font-size:.82rem; text-align:right; }
.qf-axis-row { display:grid; grid-template-columns:minmax(190px,260px) 1fr 66px; gap:14px; align-items:center; margin:11px 0; }
.qf-axis-row small { display:block; margin-top:2px; color:#6a7e77; font-size:.72rem; }
.qf-axis-bar { height: 14px; border-radius: 999px; overflow: hidden; background: #e5e7eb; }
.qf-axis-fill { height:100%; background:#4aa984; width:0; }
.qf-axis-row.qf-tone-medium .qf-axis-fill { background:#e5b849; }
.qf-axis-row.qf-tone-high .qf-axis-fill { background:#df7d47; }
.qf-axis-row.qf-tone-critical .qf-axis-fill { background:#b6404c; }
.qf-axis-row.qf-tone-pending .qf-axis-fill { background:#aebbb7; }
.qf-action-card { display:grid; grid-template-columns:36px 1fr; gap:13px; padding:16px 0; border-top:1px solid #e1ebe7; }
.qf-action-card:first-of-type { border-top:0; }
.qf-action-rank { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--qf-deep-green); color:#fff; font-weight:850; }
.qf-action-card h4 { margin:4px 0 5px; color:var(--qf-ink); font-size:1rem; }
.qf-action-card p { margin:0 0 5px; }
.qf-action-card small { color:#697d76; }
.qf-empty-state { padding:16px; border-radius:12px; background:#eef8f4; color:#315e53; }
.qf-all-recommendations { margin-top:20px; border:1px solid #dce7e3; border-radius:14px; overflow:hidden; }
.qf-all-recommendations summary { padding:14px 17px; cursor:pointer; font-weight:800; color:#153f36; background:#f4f9f7; }
.qf-all-recommendations .qf-recommendations { padding:0 17px 12px; }
.qf-recommendations { margin-top: 18px; }
.qf-reco-item { border-left: 6px solid var(--qf-bordeaux); background: #fff; border-radius: 10px; margin: 10px 0; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.qf-reco-priority { display: inline-block; font-size: .78rem; font-weight: 900; padding: 4px 8px; border-radius: 999px; margin-bottom: 6px; }
.qf-prio-critico { background: var(--qf-red); color: #991b1b; }
.qf-prio-alto { background: var(--qf-yellow); color: #854d0e; }
.qf-prio-medio { background: var(--qf-blue); color: #075985; }
.qf-prio-pendiente { background: #e5e7eb; color: #374151; }
.qf-prio-conforme { background: var(--qf-green); color: #166534; }
.qf-calc-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.qf-calc-card { border: 1px solid var(--qf-border); border-radius: 16px; padding: 18px; text-decoration: none; background: #fff; display: flex; flex-direction: column; gap: 8px; color: var(--qf-text); }
.qf-calc-card-active { border-color: var(--qf-bordeaux); box-shadow: 0 8px 24px rgba(127, 29, 29, .12); }
.qf-calc-card-disabled { opacity: .55; }
.qf-calc-report { display: none; }
.qf-calc-report.is-visible { display: block; padding: 20px; border-top: 1px solid var(--qf-border); background: #fff; }
.qf-report-box { border: 1px solid var(--qf-border); border-radius: 16px; padding: 22px; }
.qf-report-box h2, .qf-report-box h3 { color: var(--qf-bordeaux); }
.qf-report-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.qf-report-table th, .qf-report-table td { border: 1px solid var(--qf-border); padding: 8px; text-align: left; vertical-align: top; }
.qf-report-table th { background: var(--qf-cream); }
@media (max-width: 760px) {
  .qf-question { grid-template-columns: 1fr; }
  .qf-eval-data { grid-template-columns: 1fr; }
  .qf-score-card { grid-template-columns: 1fr; }
  .qf-axis-row { grid-template-columns: 1fr; }
  .qf-score-visual { padding-right:0; padding-bottom:18px; border-right:0; border-bottom:1px solid #cfe0da; }
  .qf-kpi-grid { grid-template-columns:1fr; }
  .qf-dashboard-heading,.qf-section-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .qf-section-heading p { text-align:left; }
}
@media print {
  body * { visibility: hidden; }
  .qf-calc-report.is-visible, .qf-calc-report.is-visible * { visibility: visible; }
  .qf-calc-report.is-visible { position: absolute; left: 0; top: 0; width: 100%; }
  .qf-calc-report-actions { display: none; }
}
