/* Homepage workspace + compact tool panels */

.hl-home-workspace .hl-home-layout {
  display: grid;
  grid-template-columns: minmax(210px, 250px) 1fr;
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}

@media (max-width: 900px) {
  .hl-home-workspace .hl-home-layout {
    grid-template-columns: 1fr;
  }
}

.hl-home-tool-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.65);
  color: #1a1625 !important;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.hl-home-tool-btn span {
  color: #1a1625 !important;
}

.hl-home-tool-btn small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #5c5670 !important;
  margin-top: 2px;
  opacity: 1 !important;
}

.hl-home-tool-btn:hover,
.hl-home-tool-btn.hl-home-tool-nav--active {
  color: #1a1625 !important;
  transform: translateX(4px);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 8px 24px -10px rgba(124, 58, 237, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.hl-home-tool-btn:hover span,
.hl-home-tool-btn.hl-home-tool-nav--active span {
  color: #1a1625 !important;
}

.hl-home-tool-btn:hover small,
.hl-home-tool-btn.hl-home-tool-nav--active small {
  color: #5c5670 !important;
}

.hl-home-tool-btn.hl-home-tool-nav--active {
  border-left: 3px solid #7c3aed;
  padding-left: 10px;
}

.hl-home-all-tools {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
}

.hl-home-all-tools:hover {
  text-decoration: underline;
}

.hl-home-panel-head--pulse {
  animation: hl-head-pulse 0.45s ease;
}

@keyframes hl-head-pulse {
  from { opacity: 0.6; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.hl-home-panels {
  position: relative;
  min-height: 200px;
}

.hl-home-panel {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hl-home-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.hl-home-panel.is-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.992);
}

.hl-home-panel.is-entering {
  opacity: 0;
  transform: translateY(16px) scale(0.992);
}

.hl-home-open-page {
  margin: 0.75rem 0 0;
  text-align: right;
  font-size: 12px;
}

.hl-home-open-page a {
  color: #5c5670;
  text-decoration: none;
  font-weight: 600;
}

.hl-home-open-page a:hover {
  color: #7c3aed;
}

/* Compact tool UI (homepage panels + compact="1") */
.hl-home-workspace .hlai-tool-wrap,
.hlai-tool-wrap--compact {
  max-width: 100%;
}

.hlai-tool-wrap--compact .hlai-tool-header {
  display: none;
}

.hlai-tool-wrap--compact .hlai-usage-bar {
  padding: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
}

.hlai-tool-wrap--compact .hlai-card {
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
}

.hlai-tool-wrap--compact .hlai-textarea {
  min-height: 110px;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
}

.hlai-tool-wrap--compact .hlai-tone-selector {
  margin: 0.65rem 0;
  gap: 0.5rem;
}

.hlai-tool-wrap--compact .hlai-tone-btn {
  min-width: 90px;
  padding: 0.5rem 0.65rem;
}

.hlai-tool-wrap--compact .hlai-action-row {
  margin-top: 0.5rem;
}

.hlai-tool-wrap--compact .hlai-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
}

.page .entry-content > p:first-of-type,
.page .entry-content > .hlai-tool-wrap {
  max-width: min(100%, 1100px);
  margin-left: auto;
  margin-right: auto;
}
