/* Dental Insurance Cost Estimator — tool styles.
   Every value from a design token (§4.2). Scoped to .ftb-tool-dce.
   Inputs, checkboxes, buttons and messages come from core.css.
   Kept small: core.css and style.css already transfer about 11,000 of the
   12,288-byte page budget (§10). */

.ftb-tool-dce .ftb-dce-indep{margin:0 0 var(--ftb-space-5);font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi)}
.ftb-tool-dce .ftb-dce-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-dce legend{padding:0 var(--ftb-space-2);font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-bold)}
.ftb-tool-dce .ftb-dce-lead{margin:0 0 var(--ftb-space-4)}
.ftb-tool-dce .ftb-dce-grid{display:grid;gap:0 var(--ftb-space-4);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,7rem),1fr))}
.ftb-tool-dce .ftb-field{margin-bottom:var(--ftb-space-4);min-width:0}
.ftb-tool-dce .ftb-dce-opts{padding-bottom:0;border-bottom:0}
.ftb-tool-dce [aria-invalid=true]{border-color:var(--ftb-error)}

/* A procedure row. Phones: procedure on its own line, then cost and Remove
   side by side. From 768px: procedure, cost, silver rate, Remove. */
.ftb-tool-dce .ftb-dce-rows{margin:0;padding:0;list-style:none}
.ftb-tool-dce .ftb-dce-row{display:grid;gap:0 var(--ftb-space-3);align-items:end;
  grid-template-columns:minmax(0,1fr) auto;
  padding-bottom:var(--ftb-space-1);border-bottom:1px solid var(--ftb-border);margin-bottom:var(--ftb-space-4)}
.ftb-tool-dce .ftb-dce-proc{grid-column:1/-1}
@media (min-width:768px){
  .ftb-tool-dce .ftb-dce-row{grid-template-columns:minmax(0,3fr) minmax(0,1fr) minmax(0,1fr) auto}
  .ftb-tool-dce .ftb-dce-proc{grid-column:auto}
}
.ftb-tool-dce .ftb-dce-remove{margin-bottom:var(--ftb-space-4);justify-self:start}

/* ---------------------------------------------------------------- results */

/* Height reserved so the first estimate never shifts the page (§10). */
.ftb-tool-dce .ftb-dce-results{margin-top:var(--ftb-space-6);min-height:calc(var(--ftb-space-24) + var(--ftb-space-8))}
.ftb-tool-dce .ftb-dce-h{margin:0 0 var(--ftb-space-3);font-size:var(--ftb-text-lg);font-weight:var(--ftb-fw-semi)}
.ftb-tool-dce .ftb-dce-summary{margin:0 0 var(--ftb-space-4)}
.ftb-tool-dce .ftb-dce-sum{display:grid;gap:var(--ftb-space-3);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr))}
.ftb-tool-dce .ftb-dce-box{padding:var(--ftb-space-4);background:var(--ftb-surface-2);border-radius:var(--ftb-radius)}
.ftb-tool-dce .ftb-dce-k{margin:0;font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi)}
.ftb-tool-dce .ftb-dce-v{margin:var(--ftb-space-1) 0 0;font-size:var(--ftb-text-2xl);font-weight:var(--ftb-fw-bold);
  font-variant-numeric:tabular-nums}

.ftb-tool-dce .ftb-table-scroll{margin:var(--ftb-space-5) 0 var(--ftb-space-3)}
.ftb-tool-dce .ftb-dce-table{width:100%;border-collapse:collapse;font-size:var(--ftb-text-sm);font-variant-numeric:tabular-nums}
.ftb-tool-dce .ftb-dce-table th,
.ftb-tool-dce .ftb-dce-table td{padding:var(--ftb-space-2) var(--ftb-space-3);text-align:start;border-bottom:1px solid var(--ftb-border)}
.ftb-tool-dce .ftb-dce-table thead th{color:var(--ftb-text-muted);background:var(--ftb-surface-2)}
.ftb-tool-dce .ftb-dce-table tbody th{font-weight:var(--ftb-fw-medium)}
.ftb-tool-dce .ftb-dce-table tfoot{font-weight:var(--ftb-fw-bold)}
.ftb-tool-dce .ftb-dce-table .is-num{text-align:end;white-space:nowrap}
.ftb-tool-dce .ftb-dce-tag{color:var(--ftb-text-muted);font-weight:var(--ftb-fw-normal)}

.ftb-tool-dce .ftb-dce-notes,
.ftb-tool-dce .ftb-dce-work ol{margin:var(--ftb-space-4) 0 0;padding-inline-start:var(--ftb-space-6);
  font-size:var(--ftb-text-sm);line-height:var(--ftb-lh-snug)}
.ftb-tool-dce .ftb-dce-notes li + li,
.ftb-tool-dce .ftb-dce-work li + li{margin-top:var(--ftb-space-2)}
.ftb-tool-dce .ftb-dce-work{margin-top:var(--ftb-space-4)}
.ftb-tool-dce .ftb-dce-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-dce .ftb-dce-work summary:focus-visible{outline:2px solid var(--ftb-primary);outline-offset:2px}

.ftb-tool-dce .ftb-dce-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);
  line-height:var(--ftb-lh-snug);color:var(--ftb-text-muted)}

@media (max-width:479px){
  .ftb-tool-dce .ftb-dce-set{padding:var(--ftb-space-3)}
  .ftb-tool-dce .ftb-tool-actions .ftb-btn{flex:1 1 auto}
}
