.tool-count-simulator {
  display: grid;
  gap: 22px;
  margin: 34px 0;
  border: 1px solid rgba(23, 21, 18, 0.14);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 30px);
  background:
    linear-gradient(135deg, rgba(23, 21, 18, 0.96), rgba(36, 36, 31, 0.94)),
    #171512;
  color: #fffaf0;
  box-shadow: 0 26px 80px rgba(23, 21, 18, 0.18);
}

.article-shell pre {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(23, 21, 18, 0.12);
  border-radius: 8px;
  padding: 16px;
  background: rgba(23, 21, 18, 0.055);
  white-space: pre-wrap;
}

.article-shell pre code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tool-count-simulator h2,
.tool-count-simulator h3,
.tool-count-simulator p {
  margin: 0;
}

.tool-count-simulator h2 {
  color: #fffaf0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.tool-count-simulator p {
  max-width: 760px;
  color: rgba(255, 250, 240, 0.72);
  line-height: 1.65;
}

.tool-count-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-count-controls button {
  min-height: 42px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 6px;
  padding: 0 14px;
  background: rgba(255, 250, 240, 0.08);
  color: #fffaf0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

.tool-count-controls button[aria-pressed='true'] {
  border-color: rgba(183, 255, 82, 0.78);
  background: #b7ff52;
  color: #172007;
}

.tool-count-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.7fr);
  gap: 16px;
}

.tool-count-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 250, 240, 0.06);
}

.tool-count-field-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-count-field {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  border: 1px solid rgba(183, 255, 82, 0.24);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(183, 255, 82, 0.08);
}

.tool-count-field.is-missing {
  border-color: rgba(255, 122, 89, 0.5);
  background: rgba(255, 122, 89, 0.12);
}

.tool-count-field span,
.tool-count-stat span,
.tool-count-status span {
  color: rgba(255, 250, 240, 0.58);
  font-size: 0.72rem;
  font-weight: 920;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-count-field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fffaf0;
  font-size: 0.95rem;
}

.tool-count-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tool-count-stat,
.tool-count-status {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 6px;
  padding: 12px;
  background: rgba(255, 250, 240, 0.06);
}

.tool-count-stat strong {
  color: #b7ff52;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1;
}

.tool-count-status strong {
  color: #fffaf0;
  font-size: 1rem;
}

@media (max-width: 760px) {
  .tool-count-grid,
  .tool-count-stats,
  .tool-count-field {
    grid-template-columns: 1fr;
  }
}
