body.palette-page {
  background: #f6f7f8;
}

/* .page, .tool-header, .tool-subtitle live in base.css (shared shell) */

/* --- Tool card: the palette is the focal point, chrome stays neutral -- */

.palette-app {
  max-width: 460px;
  margin: 0 auto 2rem;
  padding: 1rem 1rem 1.25rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
  .palette-app {
    max-width: 640px;
    padding: 1.75rem 1.75rem 2rem;
  }
}

/* --- Palette: large color blocks, stacked on mobile, side by side once
   there's room. Fixed height (not aspect-ratio) so five swatches read as
   one continuous band rather than five separate squares. -------------- */

.palette {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .palette {
    flex-direction: row;
    gap: 0;
    height: 260px;
  }
}

.swatch {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100px;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .swatch {
    flex: 1;
    min-height: 0;
    height: 100%;
    border-radius: 0;
  }

  .swatch:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }

  .swatch:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }
}

.swatch-label {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.0);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  transition: background-color 120ms ease;
}

.swatch:hover .swatch-label,
.swatch:focus-visible .swatch-label {
  background: rgba(255, 255, 255, 0.18);
}

.swatch.is-copied .swatch-label {
  background: rgba(255, 255, 255, 0.28);
}

/* --- Generate button: deliberately neutral/dark so the swatches above
   stay the visually dominant element on the page. ---------------------- */

.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: #111827;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.generate-button:hover {
  background: #000000;
}

.kbd-hint {
  display: none;
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #6b7280;
}

@media (hover: hover) and (pointer: fine) {
  .kbd-hint {
    display: block;
  }
}

.noscript-banner {
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

/* --- Explainer + FAQ: static, indexable without JS -------------------- */

.explainer,
.faq {
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 0 0.25rem;
}

.explainer h2,
.faq h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.explainer ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: #374151;
  line-height: 1.6;
}

.explainer p {
  color: #374151;
  line-height: 1.6;
}

.faq details {
  border-bottom: 1px solid #e5e5e5;
}

.faq summary {
  padding: 0.9rem 0.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  color: #4b5563;
}

.faq details p {
  margin: 0 0.25rem 1rem;
  color: #374151;
  line-height: 1.6;
}
