.tool-page {
  position: relative;
  padding: 36px 0 96px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-slate);
}

.breadcrumb a {
  color: var(--color-ash);
  transition: color 0.15s var(--ease);
}

.breadcrumb a:hover {
  color: var(--color-chalk);
}

.crumb-sep {
  color: var(--color-dim);
}

.breadcrumb [aria-current="page"] {
  color: var(--color-slate);
}

.tool-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-head-main {
  min-width: 0;
}

.tool-title {
  margin-top: 14px;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-chalk);
}

.tool-lead {
  max-width: 560px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-ash);
}

.tool-facts {
  display: flex;
  gap: 36px;
  flex: none;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dim);
}

.fact dd {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--color-chalk);
}

/* ---------- Table shell ---------- */

.table-shell {
  margin-top: 24px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-panel);
  background: var(--color-carbon);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-hairline);
}

.toolbar-hint {
  font-size: 13px;
  color: var(--color-slate);
}

.toolbar-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-table-meta);
  white-space: nowrap;
}

.table-scroll {
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

.arsenal-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
}

.arsenal-table thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  padding: 0;
  background: var(--color-carbon);
  border-bottom: 1px solid var(--color-hairline);
  text-align: left;
  font-weight: 500;
}

.th-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  background: transparent;
  color: var(--color-slate);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}

.th-btn:hover {
  color: var(--color-chalk);
}

.th-num .th-btn {
  justify-content: flex-end;
}

.caret {
  flex: none;
  opacity: 0.34;
  transition: opacity 0.15s var(--ease), transform 0.18s var(--ease);
}

.arsenal-table thead th[aria-sort="ascending"] .th-btn,
.arsenal-table thead th[aria-sort="descending"] .th-btn {
  color: var(--color-chalk);
}

.arsenal-table thead th[aria-sort="ascending"] .caret,
.arsenal-table thead th[aria-sort="descending"] .caret {
  opacity: 1;
  color: var(--accent-iris);
}

.arsenal-table thead th[aria-sort="ascending"] .caret {
  transform: rotate(180deg);
}

.arsenal-table tbody td {
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  color: var(--color-ash);
  vertical-align: middle;
}

.arsenal-table tbody tr {
  transition: background 0.12s var(--ease);
}

.arsenal-table tbody tr:hover {
  background: var(--color-row-wash);
}

.arsenal-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-type {
  white-space: nowrap;
}

.type-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.type-icon {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
  filter: grayscale(1) brightness(1.35);
}

.arsenal-table tbody td.cell-item {
  padding-top: 9px;
  padding-bottom: 9px;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.item-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-chip);
  background: var(--color-graphite);
}

.item-icon img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.item-icon.is-broken img {
  display: none;
}

.item-icon.is-broken::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--color-dim);
  border-radius: 2px;
}

.item-name {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--color-chalk);
}

.cell-num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--color-chalk);
  white-space: nowrap;
}

.rep-mark {
  margin-left: 4px;
  color: var(--accent-emerald);
  font-size: 11px;
  vertical-align: 1px;
}

.cell-limit {
  color: var(--color-ash);
}

.limit-none {
  color: var(--color-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .tool-page {
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .tool-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .tool-facts {
    gap: 28px;
  }

  .table-scroll {
    overflow-x: auto;
  }

  .arsenal-table thead th {
    position: static;
  }
}

@media (max-width: 560px) {
  .table-toolbar {
    padding: 12px 16px;
  }

  .toolbar-hint {
    display: none;
  }

  .arsenal-table tbody td {
    padding: 11px 14px;
  }

  .th-btn {
    padding: 11px 14px;
  }

  .item-icon {
    width: 32px;
    height: 32px;
  }
}
