/* Concrete Block Calculator, tool styles.
   Scoped to .ftb-tool-cb, every value a token (section 4.2). Inputs, labels,
   buttons, messages, tables and focus rings come from core.css and the
   theme; this file only adds what is new. Kept small: core.css and
   style.css already transfer about 11,050 of the 12,288-byte page budget. */

.ftb-tool-cb .ftb-cb-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-cb legend{padding:0 var(--ftb-space-2);font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-bold)}
.ftb-tool-cb .ftb-field{min-width:0}
.ftb-tool-cb .ftb-cb-grid{display:grid;gap:0 var(--ftb-space-4);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr))}
.ftb-tool-cb [aria-invalid=true]{border-color:var(--ftb-error)}

/* One wall or opening per row: its name, the inputs, then Remove, all on a
   shared baseline; the row wraps to a column on a phone. */
.ftb-tool-cb .ftb-cb-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--ftb-space-2) var(--ftb-space-4);
  padding-bottom:var(--ftb-space-4);margin-bottom:var(--ftb-space-4);border-bottom:1px solid var(--ftb-border)}
.ftb-tool-cb .ftb-cb-row .ftb-field{flex:1 1 7rem;margin-bottom:0}
.ftb-tool-cb .ftb-cb-rowh{flex:1 0 100%;margin:0;font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi)}
.ftb-tool-cb .ftb-cb-del{flex:0 0 auto}
.ftb-tool-cb .ftb-cb-add{margin-bottom:var(--ftb-space-2)}

/* Height reserved so the first result never shifts the page (section 10). */
.ftb-tool-cb .ftb-cb-results{min-height:calc(var(--ftb-space-24) + var(--ftb-space-16))}
.ftb-tool-cb .ftb-cb-h{margin:0 0 var(--ftb-space-3);font-size:var(--ftb-text-lg);font-weight:var(--ftb-fw-semi)}
.ftb-tool-cb .ftb-cb-h3{margin:var(--ftb-space-5) 0 var(--ftb-space-2);font-size:var(--ftb-text-sm);
  font-weight:var(--ftb-fw-semi);color:var(--ftb-text-muted)}
.ftb-tool-cb .ftb-cb-headline{padding:var(--ftb-space-4) var(--ftb-space-5);background:var(--ftb-surface-2);border-radius:var(--ftb-radius)}
.ftb-tool-cb .ftb-cb-big{margin: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-cb .ftb-cb-sub{margin:var(--ftb-space-2) 0 0}
.ftb-tool-cb .ftb-cb-boxes{display:grid;gap:var(--ftb-space-3);margin-top:var(--ftb-space-4);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr))}
.ftb-tool-cb .ftb-cb-box{padding:var(--ftb-space-4);background:var(--ftb-surface);
  border:1px solid var(--ftb-border);border-radius:var(--ftb-radius);min-width:0}
.ftb-tool-cb .ftb-cb-k{margin:0;font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-semi);color:var(--ftb-text-muted)}
.ftb-tool-cb .ftb-cb-v{margin:var(--ftb-space-1) 0 0;font-size:var(--ftb-text-xl);font-weight:var(--ftb-fw-bold);
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ftb-tool-cb .ftb-cb-table{width:100%;font-size:var(--ftb-text-sm);font-variant-numeric:tabular-nums}

.ftb-tool-cb .ftb-cb-work{margin-top:var(--ftb-space-4)}
.ftb-tool-cb .ftb-cb-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-cb .ftb-cb-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-cb .ftb-cb-steps li+li{margin-top:var(--ftb-space-2)}
.ftb-tool-cb .ftb-cb-note{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-cb .ftb-cb-set{padding:var(--ftb-space-3)}
}
