/* FENa Calculator, tool styles.
   Scoped to .ftb-tool-fe, every value a token (section 4.2). Inputs, labels,
   option rows, buttons, messages and tables come from core.css and the
   theme; this file only adds what is new, and stays small because the page
   CSS budget is nearly spent (section 10). */

.ftb-tool-fe .ftb-fe-set{margin:0 0 var(--ftb-space-5);padding:var(--ftb-space-4) var(--ftb-space-5);
  border:1px solid var(--ftb-border);border-radius:var(--ftb-radius);background:var(--ftb-surface);min-width:0}
.ftb-tool-fe legend{padding:0 var(--ftb-space-2);font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-bold)}
.ftb-tool-fe .ftb-field{min-width:0}
.ftb-tool-fe .ftb-fe-grid{display:grid;gap:0 var(--ftb-space-4);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr))}
.ftb-tool-fe [aria-invalid=true]{border-color:var(--ftb-error)}

/* Height reserved so the first result never shifts the page (section 10). */
.ftb-tool-fe .ftb-fe-results{min-height:calc(var(--ftb-space-24) + var(--ftb-space-16))}
.ftb-tool-fe .ftb-fe-h{margin:0 0 var(--ftb-space-3);font-size:var(--ftb-text-lg);font-weight:var(--ftb-fw-semi)}
/* FENa and FEUrea side by side, stacked on a phone. */
.ftb-tool-fe .ftb-fe-pairs{display:grid;gap:var(--ftb-space-3);grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr))}
.ftb-tool-fe .ftb-fe-card{padding:var(--ftb-space-4) var(--ftb-space-5);background:var(--ftb-surface-2);border-radius:var(--ftb-radius);min-width:0}
.ftb-tool-fe .ftb-fe-k{margin:0;font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi);color:var(--ftb-text-muted)}
.ftb-tool-fe .ftb-fe-big{margin:var(--ftb-space-1) 0 0;font-size:var(--ftb-text-3xl);font-weight:var(--ftb-fw-bold);
  color:var(--ftb-primary);line-height:1.1;font-variant-numeric:tabular-nums}
.ftb-tool-fe .ftb-fe-pat{margin:var(--ftb-space-2) 0 0;font-size:var(--ftb-text-sm)}
/* Value plus its unit on one line; the unit menu never shrinks. */
.ftb-tool-fe .ftb-fe-pair{display:flex;gap:var(--ftb-space-2);min-width:0}
.ftb-tool-fe .ftb-fe-pair input{min-width:0;flex:1 1 auto}
.ftb-tool-fe .ftb-fe-pair select{flex:0 0 auto;width:auto}
.ftb-tool-fe .ftb-fe-warn{margin:var(--ftb-space-3) 0 0;padding:var(--ftb-space-3) var(--ftb-space-4) var(--ftb-space-3) var(--ftb-space-8);
  border-inline-start:3px solid var(--ftb-warning);background:var(--ftb-surface);font-size:var(--ftb-text-sm)}

.ftb-tool-fe .ftb-fe-work{margin-top:var(--ftb-space-4)}
.ftb-tool-fe .ftb-fe-work summary{display:flex;align-items:center;min-height:var(--ftb-tap);cursor:pointer;
  font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi);color:var(--ftb-primary)}
.ftb-tool-fe .ftb-fe-steps{margin:var(--ftb-space-3) 0 0;padding-inline-start:var(--ftb-space-6);
  font-size:var(--ftb-text-sm);line-height:var(--ftb-lh-snug)}
.ftb-tool-fe .ftb-fe-steps li+li{margin-top:var(--ftb-space-2)}
.ftb-tool-fe .ftb-fe-note{margin:0 0 var(--ftb-space-4);font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi)}
.ftb-tool-fe .ftb-fe-disclaimer{margin:var(--ftb-space-6) 0 0;padding:var(--ftb-space-4) var(--ftb-space-5);
  background:var(--ftb-surface-2);border-radius:var(--ftb-radius);font-size:var(--ftb-text-sm);color:var(--ftb-text-muted)}

@media (max-width:479px){
  .ftb-tool-fe .ftb-fe-set{padding:var(--ftb-space-3)}
}
