/*! TodoFórmulas Calculadoras - tf.css (GPL-2.0-or-later) */
.tf-tool,.tf-list,.tf-cats,.tf-hero,.tf-rel,.tf-why{
	--tf-ink:#0f1f3d;--tf-blue:#1d4ed8;--tf-blue-d:#1e3a8a;--tf-soft:#eef4ff;--tf-line:#c9d8f5;--tf-mute:#4a5b7a;--tf-bg:#f8fbff;
	color:var(--tf-ink);line-height:1.55;font-family:inherit;box-sizing:border-box;
}
.tf-tool *,.tf-list *,.tf-cats *,.tf-hero *,.tf-rel *,.tf-why *{box-sizing:border-box}

/* ---- Herramienta ---- */
.tf-tool{background:#fff;border:1px solid var(--tf-line);border-radius:16px;padding:18px;margin:0 0 24px;box-shadow:0 2px 12px rgba(29,78,216,.08)}
.tf-fields{display:grid;grid-template-columns:1fr;gap:12px}
.tf-field label{display:block;font-weight:700;font-size:.95rem;margin:0 0 4px;color:var(--tf-ink)}
.tf-field input,.tf-field select{width:100%;min-height:50px;padding:10px 12px;font-family:inherit;font-size:1.05rem;color:var(--tf-ink);background:#fff;border:1.5px solid var(--tf-line);border-radius:12px}
.tf-field input:focus,.tf-field select:focus,.tf-search input:focus{outline:3px solid rgba(29,78,216,.35);outline-offset:1px;border-color:var(--tf-blue)}
.tf-field [aria-invalid="true"]{border-color:#b42318;background:#fff6f5}
.tf-hint{display:block;margin-top:3px;color:var(--tf-mute);font-size:.85rem}
.tf-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.tf-btn{flex:1 1 140px;min-height:50px;padding:10px 18px;border-radius:12px;border:1.5px solid transparent;font-family:inherit;font-weight:700;font-size:1rem;cursor:pointer}
.tf-go{background:var(--tf-blue);color:#fff}
.tf-go:hover{background:var(--tf-blue-d)}
.tf-ex{background:var(--tf-soft);color:var(--tf-blue-d);border-color:var(--tf-line)}
.tf-clear{background:#fff;color:var(--tf-ink);border-color:var(--tf-line)}
.tf-btn:focus-visible,.tf-chip:focus-visible,.tf-card:focus-visible,.tf-cat:focus-visible{outline:3px solid rgba(29,78,216,.45);outline-offset:2px}
.tf-msg:empty{display:none}
.tf-msg{margin-top:14px}
.tf-err{margin:0 0 8px;padding:12px 14px;background:#fff1ef;border:1.5px solid #e2574c;border-radius:12px;color:#7a1b12;font-weight:600}
.tf-out{margin-top:18px}
.tf-out:empty{display:none}
.tf-res{background:var(--tf-blue-d);color:#fff;border-radius:14px;padding:16px;font-size:1.25rem;font-weight:700;line-height:1.5;word-break:break-word}
.tf-h{margin:18px 0 8px;font-weight:800;font-size:1.05rem}
.tf-steps{margin:0;padding:0;list-style:none;counter-reset:tfs}
.tf-steps li{counter-increment:tfs;position:relative;margin:0 0 8px;padding:12px 12px 12px 52px;background:var(--tf-soft);border-radius:12px;word-break:break-word}
.tf-steps li:before{content:counter(tfs);position:absolute;left:12px;top:12px;width:28px;height:28px;border-radius:50%;background:var(--tf-blue);color:#fff;font-weight:700;font-size:.9rem;display:flex;align-items:center;justify-content:center}
.tf-steps b{color:var(--tf-blue-d)}
.tf-loading{margin:0;color:var(--tf-mute)}
.tf-fr{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;margin:0 .2em;line-height:1.15;font-size:.92em}
.tf-fr span:first-child{padding:0 .25em;border-bottom:1.5px solid currentColor}
.tf-fr span:last-child{padding:0 .25em}

/* ---- Listado, buscador y categorías ---- */
.tf-search{margin:0 0 14px}
.tf-search label{display:block;font-weight:700;margin-bottom:6px}
.tf-search input{width:100%;min-height:52px;padding:10px 14px;font-family:inherit;font-size:1.05rem;color:var(--tf-ink);background:#fff;border:1.5px solid var(--tf-line);border-radius:12px}
.tf-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.tf-chip{min-height:42px;padding:8px 14px;border-radius:999px;border:1.5px solid var(--tf-line);background:#fff;color:var(--tf-ink);font-family:inherit;font-weight:600;font-size:.92rem;cursor:pointer}
.tf-chip[aria-pressed="true"]{background:var(--tf-blue);border-color:var(--tf-blue);color:#fff}
.tf-grid,.tf-cats{display:grid;grid-template-columns:1fr;gap:12px}
.tf-card,.tf-cat{display:flex;gap:14px;align-items:flex-start;padding:16px;background:#fff;border:1.5px solid var(--tf-line);border-radius:16px;color:var(--tf-ink);text-decoration:none}
.tf-card[hidden]{display:none}
.tf-card:hover,.tf-cat:hover{border-color:var(--tf-blue);box-shadow:0 4px 14px rgba(29,78,216,.14)}
.tf-glyph{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 8px;border-radius:12px;background:var(--tf-soft);color:var(--tf-blue);font-weight:800;font-size:1.1rem;border:1.5px solid var(--tf-line);white-space:nowrap}
.tf-card-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.tf-card-cat{font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--tf-blue)}
.tf-card-title{font-size:1.05rem;color:var(--tf-ink)}
.tf-card-desc{font-size:.92rem;color:var(--tf-mute)}
.tf-empty{margin:12px 0;padding:12px 14px;border-radius:12px;background:var(--tf-soft);font-weight:600}
.tf-empty[hidden]{display:none}

/* ---- Portada ---- */
.tf-hero{padding:28px 18px;border:1px solid var(--tf-line);border-radius:20px;background-color:var(--tf-bg);background-image:linear-gradient(rgba(29,78,216,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(29,78,216,.09) 1px,transparent 1px);background-size:24px 24px;margin:0 0 24px}
.tf-brand{display:inline-flex;align-items:center;gap:10px;margin:0 0 12px;font-weight:800;font-size:1.1rem}
.tf-brand .tf-mark{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:var(--tf-blue);color:#fff;font-style:italic;font-size:1rem;font-weight:800}
.tf-hero h1{margin:0 0 10px;font-size:1.75rem;line-height:1.2;color:var(--tf-ink)}
.tf-hero p{margin:0 0 16px;max-width:620px;color:var(--tf-mute);font-size:1.05rem}
.tf-hero a.tf-cta{display:inline-block;min-height:50px;padding:13px 24px;border-radius:12px;background:var(--tf-blue);color:#fff;font-weight:700;text-decoration:none}
.tf-hero a.tf-cta:hover{background:var(--tf-blue-d);color:#fff}
.tf-why{display:grid;grid-template-columns:1fr;gap:12px;margin:0 0 24px}
.tf-why>div{background:var(--tf-soft);border-radius:14px;padding:14px 16px}
.tf-why b{display:block;margin-bottom:2px;color:var(--tf-blue-d)}
.tf-why p{margin:0;font-size:.95rem}

/* ---- Relacionadas ---- */
.tf-rel{margin:0 0 20px;padding:0;list-style:none;display:grid;gap:8px}
.tf-rel li{margin:0}
.tf-rel a{display:block;padding:12px 14px;border:1.5px solid var(--tf-line);border-radius:12px;background:#fff;color:var(--tf-blue-d);font-weight:600;text-decoration:none}
.tf-rel a:hover{border-color:var(--tf-blue);background:var(--tf-soft)}

@media (min-width:640px){
	.tf-tool{padding:24px}
	.tf-fields{grid-template-columns:1fr 1fr}
	.tf-grid,.tf-cats{grid-template-columns:repeat(2,1fr)}
	.tf-why{grid-template-columns:repeat(3,1fr)}
	.tf-hero{padding:44px 32px}
	.tf-hero h1{font-size:2.3rem}
	.tf-rel{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:960px){
	.tf-grid{grid-template-columns:repeat(3,1fr)}
}
