/* Approved December 5: category tiles; default setup lives only in the tool chooser. */
.calculator :is(.tool-groups,.tool-picker-groups).category-tiles {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;
  width:100%;max-width:640px;margin:0 0 12px;padding:0;background:transparent;border:0;
}
.calculator #tools-screen > .category-tiles {max-width:640px;margin:0 0 12px;}
.calculator .category-tiles button {
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  min-width:0;min-height:76px;padding:12px 4px 8px;border:1px solid var(--border);border-radius:8px;
  color:var(--ink);background:var(--field);font-size:13px;font-weight:500;line-height:1.25;
  touch-action:manipulation;-webkit-touch-callout:none;user-select:none;
}
.calculator .category-tiles button[aria-pressed=true] {background:var(--green);color:var(--dark-on-primary,#fff);border-color:var(--green);font-weight:650;}
.calculator .category-tiles button:hover:not([aria-pressed=true]) {border-color:var(--green);}
.calculator .category-tiles button:focus-visible {outline:2px solid var(--green);outline-offset:3px;}
.calculator .category-tiles svg {fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.calculator .category-tiles .category-icon {width:24px;height:24px;}
.calculator .category-tiles .category-pin {position:absolute;right:4px;top:4px;width:13px;height:13px;}
.calculator .category-tiles .category-pin[hidden] {display:none;}
.category-name {overflow-wrap:anywhere;}
.tool-default-controls {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px;flex-wrap:wrap;}
.tool-default-controls h3 {margin:0;font-size:18px;font-weight:650;}
#tool-default-action {min-height:44px;padding:8px 12px;border:1px solid var(--green);border-radius:6px;color:var(--green);font-weight:600;}
#tool-default-action:focus-visible {outline:2px solid var(--green);outline-offset:3px;}
#tool-default-hint,#tool-default-feedback {font-size:13px;color:var(--muted);line-height:1.5;margin:16px 0 0;}
@media(max-width:359px) {.calculator :is(.tool-groups,.tool-picker-groups).category-tiles {grid-template-columns:repeat(2,minmax(0,1fr));}}
