/* ---------------------------------------------------------------
 * home.css — tool grid on the platform home page.
 * Per-tool accent colors come from data-slug, set by the template.
 * --------------------------------------------------------------- */

.hero-copy-tight {
  padding-top: 22px;
  padding-bottom: 0;
}

.hero-copy-tight .hero-subtitle {
  margin: 0 auto;
  text-align: center;
  max-width: 640px;
}

.hero-subtitle {
  max-width: 640px;
  margin: 14px auto 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  /* Generous gap to .topbar above — separates the brand+lang chrome
   * from the tools without needing a hero subtitle filler in between. */
  margin-top: 48px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 24px 24px 24px 22px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: var(--shadow-md);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

/* subtle accent bar across the top of each card */
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--tool-accent, linear-gradient(90deg, #0f172a, #334155));
  opacity: 0.9;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.tool-card.is-disabled {
  opacity: 0.78;
  cursor: not-allowed;
  pointer-events: none;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 28px;
  background: var(--tool-accent, linear-gradient(135deg, #0f172a 0%, #334155 100%));
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
  flex: 0 0 auto;
}

/* per-tool color tokens */
.tool-card[data-slug="wordgraph"] {
  --tool-accent: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
}
.tool-card[data-slug="wordcloud"] {
  --tool-accent: linear-gradient(135deg, #7c2d12 0%, #f59e0b 100%);
}

.tool-body {
  min-width: 0;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tool-desc {
  margin: 8px 0 0;
  font-size: 0.94rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #fcd34d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-arrow {
  font-size: 24px;
  color: var(--text-faint);
  transition: transform 0.18s ease, color 0.18s ease;
  flex: 0 0 auto;
}

.tool-card:hover .tool-arrow {
  transform: translateX(6px);
  color: var(--text);
}

@media (max-width: 480px) {
  .tool-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 20px;
  }
  .tool-arrow { display: none; }
}
