/* r22.5.55 – Tools cards, scoped to the Tools page.
   Unifies visual hierarchy without modifying control behavior. */
body:has(.bt-tools-hero) .bt-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  width: 100%;
}
body:has(.bt-tools-hero) .bt-tools-grid > .bt-tool-tile {
  width: 100%;
  max-width: none;
  min-width: 0;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  gap: .65rem;
  padding: clamp(1.15rem, 2.6vw, 1.5rem);
  border: 1px solid rgba(10,95,168,.15);
  border-radius: 16px;
  background: linear-gradient(180deg,#fff,#fbfdff);
  box-shadow: 0 6px 18px rgba(14,51,83,.045);
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified h2 {
  margin: 0 0 .45rem;
  color: #183e59;
  font-size: clamp(1.05rem,1.7vw,1.25rem);
  line-height: 1.3;
  letter-spacing: -.012em;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified p {
  max-width: 80ch;
  line-height: 1.55;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > .btn,
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > div > .btn,
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > [data-port-submit],
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified .diagnostics-action-row > .btn {
  align-self: flex-start;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: .7rem 1.15rem;
  text-align: center;
  border-radius: 9px;
  font-weight: 650;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified .diagnostics-action-row {
  display: flex;
  justify-content: flex-start;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified .diagnostics-api-grid,
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified .diagnostics-fields {
  width: 100%;
  min-width: 0;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified pre {overflow-x:auto;max-width:100%}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified :focus-visible {outline: 3px solid #2a8ec8;outline-offset: 3px}
@media(max-width: 540px) {
  body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified {padding: 1.05rem}
  body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > .btn,
  body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > div > .btn,
  body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified > [data-port-submit],
  body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified .diagnostics-action-row > .btn {width:100%}
}

/* r22.5.60 – schede senza pittogrammi aggiuntivi, come Domain Security Check. */
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified h2 {margin-top:0;}

/* r22.5.61 – top-of-card pictograms: same footprint as the original
   Domain Security Check ::before; no icon wrapper, badge or border. */
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-mail::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22m4%208%208%206%208-6%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-isp::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%224%22%20y%3D%223%22%20width%3D%2216%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M4%209h16M9%203v18M9%2013h3M14%2013h3M14%2017h3%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-port::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%203v6M15%203v6M7%209h10v4a5%205%200%200%201-10%200V9ZM12%2018v3%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-health::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2012h4l3-6%204%2012%203-6h4%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-live::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22m8%209%203%203-3%203m5%200h3%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}
body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-webhook::before {
  content:"";
  display:block;
  flex:none;
  width:46px;
  height:46px;
  background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%229%22%20r%3D%222%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2218%22%20r%3D%222%22%2F%3E%3Cpath%20d%3D%22m8%207%208%202M7%208l2%208m3%201%205-6%22%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:.9;
}

body:has(.bt-tools-hero) .bt-tools-grid .bt-tool-unified.bt-icon-mailtls::before{content:"";display:block;flex:none;width:46px;height:46px;background:transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364a7ce%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22m4%209%208%206%208-6%22%2F%3E%3Cpath%20d%3D%22m15%204%202%202%204-4%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;border:0;border-radius:0;box-shadow:none;opacity:.9}

/* r22.5.68: AI Calculator last; left-hand BETA label in red text. */
body:has(.bt-tools-hero) .bt-tools-grid .bt-ai-beta-card{position:relative;overflow:hidden;padding-left:clamp(2.35rem,4.5vw,3rem)}
body:has(.bt-tools-hero) .bt-tools-grid .bt-ai-beta-card .bt-ai-beta-ribbon{position:absolute;left:0;top:0;bottom:0;width:1.75rem;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;transform:rotate(180deg);background:#fff2f3;color:#b51932;font-size:.72rem;font-weight:800;letter-spacing:.2em;border-left:1px solid #f1c5ca;box-shadow:2px 0 8px rgba(110,12,32,.055)}
/* Brain outline pictogram, same 46px footprint and stroke treatment as other Tools. */
body:has(.bt-tools-hero) .bt-tools-grid .bt-icon-ai::before{content:"";display:block;flex:none;width:46px;height:46px;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364a7ce' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6a3.5 3.5 0 0 0-6.5-1.7A3.5 3.5 0 0 0 3.7 10a3.4 3.4 0 0 0 .5 5.9A3.5 3.5 0 0 0 8 20a4 4 0 0 0 4-4V6Zm0 0a3.5 3.5 0 0 1 6.5-1.7 3.5 3.5 0 0 1 1.8 5.7 3.4 3.4 0 0 1-.5 5.9A3.5 3.5 0 0 1 16 20a4 4 0 0 1-4-4'/%3E%3Cpath d='M8 8c-2 .5-2.6 2.3-2 3.7M8 15c1-.5 2.5-.1 4 1M16 8c2 .5 2.6 2.3 2 3.7M16 15c-1-.5-2.5-.1-4 1'/%3E%3C/svg%3E") no-repeat center/contain;border:0;border-radius:0;box-shadow:none;opacity:.9}
