#article-container:has(.tools-page) {
  padding: 0 !important;
  line-height: 1.6;
}

.tools-page {
  --tools-text: rgba(255, 255, 255, 0.92);
  --tools-subtle: rgba(255, 255, 255, 0.5);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

#article-container .tools-card {
  --tool-rgb: 143, 182, 255;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 0.8rem;
  min-height: 150px;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  color: var(--tools-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.26);
  text-decoration: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  isolation: isolate;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease;
}

#article-container .tools-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--tool-rgb), 0.22), transparent 30%),
    linear-gradient(90deg, rgba(var(--tool-rgb), 0.14), transparent 46%);
  opacity: 0.9;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#article-container .tools-card::after {
  content: '';
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--tool-rgb), 0.55), transparent);
  opacity: 0.5;
}

#article-container .tools-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)),
    rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 56px rgba(0, 0, 0, 0.36);
}

#article-container .tools-card:hover::before {
  opacity: 1;
  transform: scale(1.02);
}

.tools-card-blue {
  --tool-rgb: 143, 182, 255;
}

.tools-card-orange {
  --tool-rgb: 210, 104, 59;
}

.tools-card-green {
  --tool-rgb: 159, 216, 189;
}

.tools-card-mark {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.15rem;
  height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.tools-card-title {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 3;
  display: block;
  color: #fff;
  font-family:
    'Iowan Old Style', 'Palatino Linotype', 'Songti SC', 'STSong',
    'Noto Serif CJK SC', serif;
  font-size: clamp(1.22rem, 2.2vw, 1.56rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.tools-card-open {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(0, 0, 0, 0.18);
  transition:
    transform 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease;
}

#article-container .tools-card:hover .tools-card-open {
  color: #fff;
  border-color: rgba(var(--tool-rgb), 0.42);
  background: rgba(var(--tool-rgb), 0.18);
  transform: translate(2px, -2px);
}

@media (max-width: 768px) {
  .tools-grid {
    gap: 0.85rem;
  }

  #article-container .tools-card {
    min-height: 132px;
    padding: 1.1rem;
    border-radius: 22px;
  }

  .tools-card-open {
    top: 1rem;
    right: 1rem;
  }

  .tools-card-title {
    font-size: 1.18rem;
  }
}
