/**
 * HexCopy Tool-Specific Stylesheet
 * Detailed component styling for all 6 tools, palettes, home, and preview
 *
 * @package HexCopy
 */

/* ==========================================================================
   Homepage & Hero Section
   ========================================================================== */
.hexcopy-hero {
  padding: 56px 0 36px;
  text-align: center;
}

.hexcopy-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hc-primary-light);
  color: var(--hc-primary);
  padding: 6px 14px;
  border-radius: var(--hc-radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}
[data-theme="dark"] .hexcopy-hero-badge,
body.hexcopy-dark .hexcopy-hero-badge {
  background: rgba(102, 56, 249, 0.18);
  color: #c4b5fd;
}

.hexcopy-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--hc-radius-full);
  background: var(--hc-teal);
}

.hexcopy-hero-title {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--hc-text);
}

.hexcopy-hero-desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--hc-text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}

/* Quick Bar: Search & Hex Input at the top */
.hexcopy-quick-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 780px;
  margin: 0 auto 28px;
  flex-wrap: wrap;
}

.hexcopy-quick-search-form,
.hexcopy-quick-hex-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 6px;
  box-shadow: var(--hc-shadow-sm);
  flex: 1;
  min-width: 260px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hexcopy-quick-search-form:focus-within,
.hexcopy-quick-hex-form:focus-within {
  border-color: var(--hc-primary);
  box-shadow: 0 0 0 3px rgba(102, 56, 249, 0.15);
}

.hexcopy-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.hexcopy-input-icon,
.hexcopy-input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hc-text-subtle);
  font-weight: 600;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}

.hexcopy-input-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  display: block !important;
}

.hexcopy-quick-input,
input[type="text"].hexcopy-quick-input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 8px 12px 8px 44px !important;
  font-size: 14px;
  font-family: var(--hc-font-sans);
  color: var(--hc-text);
  box-sizing: border-box;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.hexcopy-quick-input:focus,
input[type="text"].hexcopy-quick-input:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.hexcopy-quick-hex-wrap {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.hexcopy-quick-hex-wrap .hexcopy-quick-hex-form {
  width: 100%;
}

.hexcopy-input-inline-error {
  margin-top: 6px;
  font-size: 13px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--hc-radius-sm);
  padding: 6px 10px;
  text-align: left;
  line-height: 1.4;
}

.hexcopy-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hexcopy-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hexcopy-quick-tag-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hc-text-subtle);
}

.hexcopy-tag-pill {
  padding: 4px 12px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-full);
  font-size: 13px;
  color: var(--hc-text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}
.hexcopy-tag-pill:hover {
  border-color: var(--hc-primary);
  color: var(--hc-primary);
  background: var(--hc-surface-hover);
}

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================= */
.hexcopy-section {
  padding: 48px 0;
}

.hexcopy-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.hexcopy-section-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hc-teal);
  margin-bottom: 6px;
}

.hexcopy-section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--hc-text);
}

.hexcopy-page-header {
  text-align: center;
  padding: 44px 0 32px;
  max-width: 760px;
  margin: 0 auto;
}

.hexcopy-page-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--hc-text);
}

.hexcopy-page-desc {
  font-size: 17px;
  color: var(--hc-text-muted);
  margin: 0;
  line-height: 1.5;
}

.hexcopy-link-arrow {
  color: var(--hc-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.hexcopy-link-arrow:hover {
  opacity: 0.8;
}

/* ==========================================================================
   Palette Library & Cards
   ========================================================================== */
.hexcopy-filter-panel {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 18px 20px;
  box-shadow: var(--hc-shadow-sm);
  margin-bottom: 32px;
}

.hexcopy-filter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hexcopy-filter-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 260px;
}
.hexcopy-filter-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hc-text-subtle);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
}
.hexcopy-filter-search .hexcopy-input,
.hexcopy-filter-search input[type="text"].hexcopy-input {
  padding-left: 44px !important;
  padding-right: 36px;
}
.hexcopy-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--hc-text-subtle);
  cursor: pointer;
}
.hexcopy-search-clear:hover {
  color: var(--hc-text);
}

.hexcopy-format-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hc-bg);
  padding: 4px;
  border-radius: var(--hc-radius-md);
  border: 1px solid var(--hc-border);
}
.hexcopy-format-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hc-text-muted);
  padding: 0 6px;
}
.hexcopy-format-btn {
  background: transparent;
  border: none;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hc-text-muted);
  border-radius: var(--hc-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hexcopy-format-btn.is-active {
  background: var(--hc-surface);
  color: var(--hc-primary);
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-filter-dropdowns-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.hexcopy-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}
.hexcopy-select-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-text-subtle);
}

.hexcopy-filter-status {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hc-text-muted);
}

/* Saved Palettes Page Toolbar */
.hexcopy-saved-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-saved-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hexcopy-saved-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--hc-text);
}

.hexcopy-saved-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hexcopy-privacy-badge-banner.hexcopy-storage-notice {
  margin-bottom: 20px;
}

/* Palette Card Grid (Strictly TWO cards per row on desktop) */
.hexcopy-palettes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.hexcopy-palette-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 20px;
  box-shadow: var(--hc-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hexcopy-palette-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hc-shadow-md);
  border-color: rgba(102, 56, 249, 0.3);
}

.hexcopy-palette-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.hexcopy-palette-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.hexcopy-palette-style-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--hc-text-subtle);
}

.hexcopy-palette-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--hc-text);
}

.hexcopy-palette-desc {
  font-size: 13px;
  color: var(--hc-text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hexcopy-palette-meta {
  font-size: 12px;
  color: var(--hc-text-subtle);
  font-weight: 500;
}

.hexcopy-save-palette-btn {
  background: transparent;
  border: none;
  color: var(--hc-text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--hc-radius-sm);
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hexcopy-save-palette-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  display: block !important;
}
.hexcopy-save-palette-btn:not(.is-saved) svg {
  fill: none !important;
}
.hexcopy-save-palette-btn:hover {
  color: var(--hc-primary);
  transform: scale(1.1);
}
.hexcopy-save-palette-btn.is-saved {
  color: var(--hc-primary);
}
.hexcopy-save-palette-btn.is-saved svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Swatches Bar */
.hexcopy-swatches-bar {
  display: flex;
  height: 64px;
  border-radius: var(--hc-radius-md);
  overflow: hidden;
  margin: 12px 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.hexcopy-swatches-large {
  height: 96px;
}

.hexcopy-swatch {
  flex: 1;
  position: relative;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  transition: flex-grow 0.18s ease;
}
.hexcopy-swatch:hover,
.hexcopy-swatch:focus,
.hexcopy-swatch:focus-visible {
  flex-grow: 1.35;
  outline: none;
}
.hexcopy-swatch:focus-visible {
  outline: 2px solid var(--hc-primary);
  outline-offset: -2px;
}

.hexcopy-swatch-hex {
  font-family: var(--hc-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
}
.hexcopy-swatch:hover .hexcopy-swatch-hex,
.hexcopy-swatch:focus .hexcopy-swatch-hex,
.hexcopy-swatch:focus-visible .hexcopy-swatch-hex {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none), (max-width: 768px) {
  .hexcopy-swatch .hexcopy-swatch-hex {
    opacity: 0.95;
    transform: translateY(0);
    font-size: clamp(8px, 1.8vw, 10px);
    padding: 1px 3px;
    max-width: 96%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.hexcopy-swatch-copied {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--hc-navy);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}
.hexcopy-swatch.is-copied .hexcopy-swatch-copied {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hexcopy-palette-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hexcopy-tag {
  font-size: 11px;
  color: var(--hc-text-subtle);
  background: var(--hc-bg);
  padding: 2px 7px;
  border-radius: var(--hc-radius-sm);
}

.hexcopy-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hc-border);
}

.hexcopy-palette-extra-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hexcopy-open-preview-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  display: block !important;
}

.hexcopy-export-btn svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  display: block !important;
}

.hexcopy-copy-all-btn svg {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  display: inline-block !important;
}

/* Empty State */
.hexcopy-empty-state {
  text-align: center;
  padding: 64px 20px;
  background: var(--hc-surface);
  border: 1px dashed var(--hc-border);
  border-radius: var(--hc-radius-lg);
  max-width: 580px;
  margin: 32px auto;
}
.hexcopy-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--hc-radius-full);
  background: var(--hc-primary-light);
  color: var(--hc-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.hexcopy-empty-state h3 {
  font-size: 20px;
  margin: 0 0 8px;
}
.hexcopy-empty-state p {
  color: var(--hc-text-muted);
  margin: 0 0 20px;
  font-size: 15px;
}
.hexcopy-empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   Tool Cards Grid (Homepage)
   ========================================================================== */
.hexcopy-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.hexcopy-tool-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 28px;
  box-shadow: var(--hc-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hexcopy-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hc-shadow-md);
}

.hexcopy-tool-card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--hc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.hexcopy-tool-card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--hc-text);
}

.hexcopy-tool-card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--hc-text-muted);
  margin: 0 0 20px;
  flex-grow: 1;
}

.hexcopy-tool-card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--hc-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hexcopy-tool-card-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Generator Tool
   ========================================================================== */
.hexcopy-gen-toolbar {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--hc-shadow-sm);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hexcopy-gen-toolbar-left,
.hexcopy-gen-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hexcopy-kbd-shortcut {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--hc-font-mono);
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin-left: 6px;
}

.hexcopy-count-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  background: var(--hc-bg);
  padding: 2px;
}
.hexcopy-stepper-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--hc-text);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--hc-radius-sm);
}
.hexcopy-stepper-btn:hover {
  background: var(--hc-surface);
}
.hexcopy-stepper-val {
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.hexcopy-gen-hint {
  font-size: 13px;
  color: var(--hc-text-subtle);
  margin-bottom: 16px;
  text-align: center;
}

/* Generator Stage Columns */
.hexcopy-gen-stage {
  display: flex;
  height: 520px;
  border-radius: var(--hc-radius-lg);
  overflow: hidden;
  box-shadow: var(--hc-shadow-md);
  border: 1px solid var(--hc-border);
  margin-bottom: 32px;
}

.hexcopy-gen-col {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  box-sizing: border-box;
  transition: flex-grow 0.2s ease, background-color 0.2s ease;
}

.hexcopy-col-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.hexcopy-lock-btn {
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff !important;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--hc-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hexcopy-lock-btn:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: scale(1.05);
}
.hexcopy-lock-btn svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  flex-shrink: 0;
}
.hexcopy-lock-btn .hexcopy-lock-open {
  display: block !important;
}
.hexcopy-lock-btn .hexcopy-lock-closed {
  display: none !important;
}
.hexcopy-gen-col[data-locked="true"] .hexcopy-lock-btn {
  background: var(--hc-navy);
  color: var(--hc-teal) !important;
  box-shadow: 0 0 0 2px var(--hc-teal);
}
.hexcopy-gen-col[data-locked="true"] .hexcopy-lock-open {
  display: none !important;
}
.hexcopy-gen-col[data-locked="true"] .hexcopy-lock-closed {
  display: block !important;
}

.hexcopy-col-value-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hexcopy-col-hex-input {
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  font-family: var(--hc-font-mono);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--hc-radius-sm);
  width: 100px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.hexcopy-col-hex-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
}

.hexcopy-col-copy-notice {
  font-size: 11px;
  font-weight: 700;
  background: #ffffff;
  color: var(--hc-navy);
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.hexcopy-col-picker-label {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--hc-radius-full);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hexcopy-col-picker-label:hover {
  background: rgba(0, 0, 0, 0.55);
}
.hexcopy-col-native-picker {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hexcopy-col-edit-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--hc-radius-full);
  background: rgba(0, 0, 0, 0.38);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hexcopy-col-edit-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  display: block !important;
  flex-shrink: 0;
}
.hexcopy-col-edit-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.08);
  border-color: #ffffff;
}

/* ==========================================================================
   Compact Popover for Swatch Color Picking (Desktop & Responsive)
   ========================================================================== */
.hexcopy-gen-popover {
  position: fixed;
  z-index: 99999;
  width: 228px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35), 0 10px 10px rgba(0, 0, 0, 0.22);
  padding: 12px;
  box-sizing: border-box;
  user-select: none;
  animation: hexcopyPopoverFade 0.14s ease-out;
}

@keyframes hexcopyPopoverFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.hexcopy-popover-sat-wrap {
  position: relative;
  width: 100%;
  height: 125px;
  border-radius: var(--hc-radius-sm);
  overflow: hidden;
  cursor: crosshair;
  background-color: #6638f9;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  touch-action: none;
}

.hexcopy-popover-sat-white {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.hexcopy-popover-sat-black {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.hexcopy-popover-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-sizing: border-box;
}

.hexcopy-popover-hue-wrap {
  margin: 10px 0 10px;
}

.hexcopy-popover-hue-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  display: block;
}

.hexcopy-popover-hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.hexcopy-popover-hue-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.hexcopy-popover-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hexcopy-popover-preview {
  width: 28px;
  height: 28px;
  border-radius: var(--hc-radius-sm);
  border: 1px solid var(--hc-border);
  flex-shrink: 0;
}

.hexcopy-popover-hex-wrap {
  display: flex;
  align-items: center;
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-sm);
  padding: 2px 6px;
  flex: 1;
  min-width: 0;
}

.hexcopy-popover-hash {
  font-family: var(--hc-font-mono);
  font-size: 13px;
  color: var(--hc-text-muted);
  user-select: none;
}

.hexcopy-popover-hex-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--hc-text);
  font-family: var(--hc-font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 4px;
  outline: none;
  text-transform: uppercase;
}

.hexcopy-popover-done-btn {
  background: var(--hc-primary);
  color: #ffffff !important;
  border: none;
  border-radius: var(--hc-radius-sm);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.hexcopy-popover-done-btn svg {
  width: 14px !important;
  height: 14px !important;
  stroke: #ffffff !important;
  stroke-width: 2.5px !important;
  fill: none !important;
  display: block !important;
}

.hexcopy-popover-done-btn:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .hexcopy-gen-popover {
    width: 280px;
    max-width: calc(100vw - 24px);
    padding: 14px;
    border-radius: var(--hc-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--hc-border);
  }
  .hexcopy-popover-sat-wrap {
    height: 140px;
  }
  .hexcopy-popover-handle {
    width: 22px;
    height: 22px;
  }
  .hexcopy-popover-hue-slider {
    height: 16px;
  }
  .hexcopy-popover-hue-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }
  .hexcopy-popover-hue-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
  .hexcopy-popover-preview {
    width: 34px;
    height: 34px;
  }
  .hexcopy-popover-hex-wrap {
    padding: 4px 8px;
  }
  .hexcopy-popover-hex-input {
    font-size: 15px;
  }
  .hexcopy-popover-done-btn {
    width: 34px;
    height: 34px;
  }
}

/* ==========================================================================
   Color Picker & Converter Layouts
   ========================================================================== */
.hexcopy-picker-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.hexcopy-picker-visual-card,
.hexcopy-picker-values-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 28px;
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-hero-swatch {
  height: 240px;
  border-radius: var(--hc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.hexcopy-hero-swatch-picker-label {
  cursor: pointer;
}
.hexcopy-picker-icon-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--hc-radius-full);
  font-weight: 700;
  font-size: 14px;
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease;
}
.hexcopy-picker-icon-wrap:hover {
  transform: scale(1.05);
}
#hexcopy-native-picker-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hexcopy-hero-swatch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.hexcopy-picker-large-hex {
  font-family: var(--hc-font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--hc-text);
  text-transform: uppercase;
}

.hexcopy-card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
}

.hexcopy-conversion-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hexcopy-conv-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hexcopy-conv-label {
  width: 50px;
  font-weight: 700;
  font-size: 13px;
  color: var(--hc-text-muted);
}
.hexcopy-conv-input {
  font-family: var(--hc-font-mono);
  font-weight: 600;
}

.hexcopy-fine-print {
  font-size: 12px;
  color: var(--hc-text-subtle);
  margin: 16px 0 20px;
  line-height: 1.4;
}

.hexcopy-picker-quick-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Scales & Tints Section */
.hexcopy-shades-tints-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}
.hexcopy-scales-block {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 22px;
  box-shadow: var(--hc-shadow-sm);
}
.hexcopy-scales-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
}
.hexcopy-scales-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 60px;
  border-radius: var(--hc-radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Harmonies Section */
.hexcopy-harmonies-section {
  margin-bottom: 36px;
}
.hexcopy-harmonies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.hexcopy-harmony-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 18px;
  box-shadow: var(--hc-shadow-sm);
}
.hexcopy-harmony-type {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--hc-text-muted);
}

/* Multi-Format Converter Card Grid */
.hexcopy-converter-strip {
  height: 90px;
  border-radius: var(--hc-radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  margin-bottom: 28px;
  box-shadow: var(--hc-shadow-sm);
}
.hexcopy-conv-badge {
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--hc-radius-full);
  font-family: var(--hc-font-mono);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}
.hexcopy-conv-help {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: var(--hc-radius-sm);
}

.hexcopy-converter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 32px;
}
.hexcopy-converter-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 22px;
  box-shadow: var(--hc-shadow-sm);
  display: flex;
  flex-direction: column;
}
.hexcopy-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hexcopy-converter-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.hexcopy-rgb-inputs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.hexcopy-input-col {
  flex: 1;
}
.hexcopy-micro-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--hc-text-subtle);
  margin-bottom: 4px;
}
.hexcopy-cmyk-display-box {
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-sm);
  padding: 10px;
  font-family: var(--hc-font-mono);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.hexcopy-converter-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
}

/* ==========================================================================
   Contrast Checker Tool
   ========================================================================== */
.hexcopy-contrast-workspace {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 28px;
  box-shadow: var(--hc-shadow-sm);
  margin-bottom: 36px;
}

.hexcopy-contrast-inputs-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hexcopy-contrast-input-box {
  flex: 1;
  min-width: 220px;
}
.hexcopy-contrast-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.hexcopy-input-with-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hexcopy-swatch-picker-label {
  position: relative;
  cursor: pointer;
}
.hexcopy-swatch-preview {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: var(--hc-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.hexcopy-swatch-picker-label input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}
.hexcopy-swap-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--hc-radius-full);
}

.hexcopy-contrast-scoreboard {
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hexcopy-ratio-hero {
  display: flex;
  flex-direction: column;
}
.hexcopy-ratio-num {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hc-text);
  line-height: 1;
  margin-bottom: 4px;
}
.hexcopy-ratio-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--hc-teal);
}

.hexcopy-compliance-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hexcopy-compliance-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 12px 16px;
  min-width: 150px;
}
.hexcopy-compliance-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}
.hexcopy-compliance-desc {
  font-size: 11px;
  color: var(--hc-text-subtle);
  display: block;
  margin-bottom: 8px;
}
.hexcopy-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  gap: 8px;
  margin-bottom: 4px;
}

/* Live Preview Container */
.hexcopy-contrast-preview-container {
  border-radius: var(--hc-radius-lg);
  padding: 36px 30px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}
.hexcopy-sample-headline {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}
.hexcopy-sample-subhead {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}
.hexcopy-sample-paragraph {
  font-size: 16px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 20px;
}
.hexcopy-sample-ui-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hexcopy-sample-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--hc-radius-md);
  border: none;
  cursor: pointer;
}
.hexcopy-sample-chip {
  padding: 6px 14px;
  border-radius: var(--hc-radius-full);
  font-size: 13px;
  font-weight: 600;
}

.hexcopy-contrast-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--hc-bg);
  border-radius: var(--hc-radius-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--hc-text-muted);
}
.hexcopy-contrast-notice svg {
  color: var(--hc-teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.hexcopy-contrast-notice p {
  margin: 0;
}

/* ==========================================================================
   Gradient Generator Tool
   ========================================================================== */
.hexcopy-gradient-workspace {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 28px;
  box-shadow: var(--hc-shadow-sm);
  margin-bottom: 36px;
}

.hexcopy-gradient-preview-box {
  height: 280px;
  border-radius: var(--hc-radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  margin-bottom: 28px;
}

.hexcopy-gradient-preview-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
}
.hexcopy-gradient-tag {
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--hc-radius-full);
  font-size: 12px;
  font-weight: 600;
}

.hexcopy-gradient-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hexcopy-pill-selector {
  display: inline-flex;
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 3px;
  background: var(--hc-bg);
}
.hexcopy-pill-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: var(--hc-radius-sm);
  color: var(--hc-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hexcopy-pill-btn.is-active {
  background: var(--hc-surface);
  color: var(--hc-primary);
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-angle-field {
  flex: 1;
  max-width: 420px;
}
.hexcopy-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.hexcopy-field-label {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}
.hexcopy-angle-val-display {
  font-family: var(--hc-font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--hc-primary);
}
.hexcopy-range {
  width: 100%;
  accent-color: var(--hc-primary);
}
.hexcopy-angle-presets {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.hexcopy-angle-preset-btn {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--hc-border);
  background: var(--hc-surface);
  color: var(--hc-text-muted);
  border-radius: 4px;
  cursor: pointer;
}
.hexcopy-angle-preset-btn.is-active {
  background: var(--hc-primary);
  color: #ffffff;
  border-color: var(--hc-primary);
}

.hexcopy-stops-section {
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.hexcopy-stops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hexcopy-stops-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hexcopy-stop-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 8px 14px;
}
.hexcopy-stop-color-input {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.hexcopy-stop-hex-input {
  width: 90px;
  font-family: var(--hc-font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.hexcopy-stop-range {
  flex: 1;
  accent-color: var(--hc-primary);
}
.hexcopy-stop-pct-label {
  width: 44px;
  font-family: var(--hc-font-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.hexcopy-stop-delete-btn {
  background: transparent;
  border: none;
  color: var(--hc-text-subtle);
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
}
.hexcopy-stop-delete-btn:hover {
  color: var(--hc-danger);
}

.hexcopy-gradient-css-box {
  margin-bottom: 28px;
}
.hexcopy-css-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hexcopy-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.hexcopy-preset-card {
  height: 80px;
  border-radius: var(--hc-radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}
.hexcopy-preset-card:hover {
  transform: scale(1.03);
}

/* ==========================================================================
   Image Color Picker Tool
   ========================================================================== */
.hexcopy-privacy-badge-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 18px;
  border-radius: var(--hc-radius-md);
  font-size: 14px;
  margin-bottom: 24px;
}
[data-theme="dark"] .hexcopy-privacy-badge-banner,
body.hexcopy-dark .hexcopy-privacy-badge-banner {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.hexcopy-storage-notice {
  background: var(--hc-surface);
  border-color: var(--hc-border);
  color: var(--hc-text-muted);
}

.hexcopy-dropzone {
  position: relative;
  background: var(--hc-surface);
  border: 2px dashed var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  margin-bottom: 32px;
}
.hexcopy-dropzone:hover,
.hexcopy-dropzone.is-dragover {
  border-color: var(--hc-primary);
  background: var(--hc-surface-hover);
}
.hexcopy-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.hexcopy-dropzone-icon {
  color: var(--hc-primary);
  margin-bottom: 14px;
}
.hexcopy-dropzone-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}
.hexcopy-dropzone-meta {
  font-size: 14px;
  color: var(--hc-text-muted);
  margin: 0 0 20px;
}
.hexcopy-dropzone-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.hexcopy-upload-error {
  margin-top: 14px;
  color: var(--hc-danger);
  font-weight: 600;
  font-size: 13px;
}

.hexcopy-canvas-workspace {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--hc-shadow-sm);
}
.hexcopy-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.hexcopy-canvas-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.hexcopy-canvas-sub {
  font-size: 13px;
  color: var(--hc-text-muted);
  margin: 2px 0 0;
}

.hexcopy-canvas-viewport {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--hc-radius-md);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  margin-bottom: 28px;
}
#hexcopy-image-canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.hexcopy-canvas-loupe {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: var(--hc-radius-full);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transform: translate(-50%, -50%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: #000000;
}
.hexcopy-loupe-hex {
  position: absolute;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-family: var(--hc-font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}

.hexcopy-extracted-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.hexcopy-extracted-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Live Website Color Preview Component
   ========================================================================== */
.hexcopy-preview-component {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 24px;
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hc-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hexcopy-preview-roles-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hexcopy-roles-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hc-text-subtle);
  text-transform: uppercase;
}
.hexcopy-role-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hexcopy-role-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hc-text-muted);
}
.hexcopy-role-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-sm);
  padding: 3px 6px;
}
.hexcopy-role-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--hc-radius-full);
  display: inline-block;
}
.hexcopy-role-input {
  width: 66px;
  border: none;
  background: transparent;
  font-family: var(--hc-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--hc-text);
  padding: 0;
}
.hexcopy-role-input:focus {
  outline: none;
}

.hexcopy-preview-contrast-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hc-bg);
  border: 1px solid var(--hc-border);
  padding: 6px 12px;
  border-radius: var(--hc-radius-full);
  font-size: 12px;
}
.hexcopy-pv-contrast-badge {
  background: #d1fae5;
  color: #065f46;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Mockup Frame */
.hexcopy-mockup-frame {
  border-radius: var(--hc-radius-md);
  border: 1px solid var(--hc-border);
  overflow: hidden;
  box-shadow: var(--hc-shadow-md);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hexcopy-mockup-browser-bar {
  background: #1e293b;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.hexcopy-mockup-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.hexcopy-mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--hc-radius-full);
  flex-shrink: 0;
}
.hexcopy-mockup-dots span:nth-child(1) { background: #ef4444; }
.hexcopy-mockup-dots span:nth-child(2) { background: #f59e0b; }
.hexcopy-mockup-dots span:nth-child(3) { background: #10b981; }

.hexcopy-mockup-url-bar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: var(--hc-radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  width: 200px;
  max-width: 200px;
  min-width: 0;
  flex-shrink: 1;
}
.hexcopy-mockup-url-bar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.hexcopy-mockup-preview-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--hc-radius-full);
  background: var(--hc-surface-hover);
  color: var(--hc-text-muted);
  border: 1px solid var(--hc-border);
  margin-left: auto;
  user-select: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.hexcopy-mockup-canvas {
  background-color: var(--pv-bg);
  color: var(--pv-text);
  padding: 24px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.hexcopy-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.hexcopy-mock-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  min-width: 0;
}
.hexcopy-mock-logo-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background-color: var(--pv-primary);
  flex-shrink: 0;
}
.hexcopy-mock-nav {
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  min-width: 0;
}
.hexcopy-demo-nav-link {
  cursor: pointer;
  transition: opacity 0.15s ease, text-decoration 0.15s ease;
  user-select: none;
}
.hexcopy-demo-nav-link:hover,
.hexcopy-demo-nav-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
  outline: none;
}
.hexcopy-mock-header-btn {
  background-color: var(--pv-primary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--hc-radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.hexcopy-mock-header-btn:hover,
.hexcopy-mock-header-btn:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
  outline: none;
}
.hexcopy-demo-feedback-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--hc-radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: hexcopyDemoToastIn 0.2s ease-out;
  white-space: nowrap;
}
@keyframes hexcopyDemoToastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.hexcopy-mock-hero {
  text-align: center;
  padding: 28px 0 36px;
  max-width: 520px;
  margin: 0 auto;
}
.hexcopy-mock-accent-pill {
  display: inline-block;
  background-color: var(--pv-surface);
  color: var(--pv-accent);
  border: 1px solid var(--pv-accent);
  padding: 4px 12px;
  border-radius: var(--hc-radius-full);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
}
.hexcopy-mock-hero-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 10px;
}
.hexcopy-mock-hero-lead {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.5;
  margin: 0 0 18px;
}
.hexcopy-mock-cta-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hexcopy-mock-primary-btn {
  background-color: var(--pv-primary);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--hc-radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.hexcopy-mock-outline-btn {
  background: transparent;
  color: var(--pv-text);
  border: 1px solid var(--pv-text);
  padding: 8px 16px;
  border-radius: var(--hc-radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.hexcopy-mock-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hexcopy-mock-card {
  background-color: var(--pv-surface);
  padding: 18px;
  border-radius: var(--hc-radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.hexcopy-mock-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--hc-radius-sm);
  background-color: var(--pv-bg);
  color: var(--pv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.hexcopy-mock-card h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.hexcopy-mock-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.4;
}

/* ==========================================================================
   FAQs & Guides Accordion
   ========================================================================== */
/* FAQ Section Header - Center-aligned on desktop and mobile */
.hexcopy-faq-section .hexcopy-section-header {
  justify-content: center;
  text-align: center;
  margin-bottom: 32px;
}
.hexcopy-faq-section .hexcopy-section-header > div {
  text-align: center;
  width: 100%;
  margin: 0 auto;
}
.hexcopy-faq-section .hexcopy-section-kicker,
.hexcopy-faq-section .hexcopy-section-title {
  text-align: center;
}

.hexcopy-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.hexcopy-faq-item {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.hexcopy-faq-item[open] {
  border-color: var(--hc-primary);
}
.hexcopy-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  text-align: left;
}
.hexcopy-faq-question span {
  flex: 1;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  text-align: left;
  line-height: 1.45;
}
.hexcopy-faq-question::-webkit-details-marker {
  display: none;
}
.hexcopy-faq-icon {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
  fill: none !important;
  color: var(--hc-text-subtle);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.hexcopy-faq-item[open] .hexcopy-faq-icon {
  transform: rotate(180deg);
  color: var(--hc-primary);
}
.hexcopy-faq-answer {
  padding: 0 22px 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--hc-text-muted);
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}
.hexcopy-faq-answer p {
  margin: 0;
  text-align: left;
}

/* Guides Grid */
.hexcopy-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.hexcopy-guide-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  overflow: hidden;
  box-shadow: var(--hc-shadow-sm);
  display: flex;
  flex-direction: column;
}
.hexcopy-guide-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.hexcopy-guide-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.hexcopy-guide-meta {
  font-size: 12px;
  color: var(--hc-text-subtle);
  margin-bottom: 8px;
}
.hexcopy-guide-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}
.hexcopy-guide-title a {
  color: var(--hc-text);
  text-decoration: none;
}
.hexcopy-guide-title a:hover {
  color: var(--hc-primary);
}
.hexcopy-guide-excerpt {
  font-size: 14px;
  color: var(--hc-text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}
.hexcopy-guide-read-more {
  color: var(--hc-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* Single Guide Article Container & Reading Typography */
.hexcopy-guide-article-wrap {
  max-width: 820px;
  margin: 40px auto 60px;
  padding: 0 24px;
  box-sizing: border-box;
}

.hexcopy-guide-article-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--hc-border);
  padding-bottom: 24px;
}

.hexcopy-guide-article-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hc-text);
  margin: 8px 0 0;
}

.hexcopy-guide-article-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--hc-text);
}

.hexcopy-guide-article-content p {
  margin-bottom: 24px;
  color: var(--hc-text-muted);
}

.hexcopy-guide-article-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--hc-text);
}

.hexcopy-guide-article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--hc-text);
}

.hexcopy-guide-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hc-radius-md);
  margin: 24px 0;
  box-shadow: var(--hc-shadow-sm);
}

.hexcopy-guide-article-content pre,
.hexcopy-guide-article-content code {
  font-family: var(--hc-font-mono);
  background: var(--hc-surface-hover);
  border-radius: var(--hc-radius-sm);
}

.hexcopy-guide-article-content pre {
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--hc-border);
  margin-bottom: 24px;
}

.hexcopy-guide-article-content code {
  padding: 2px 6px;
  font-size: 14px;
}

/* ==========================================================================
   HexCopy Standard Informational Page Layout & Typography (800-900px)
   ========================================================================== */
.hexcopy-standard-page-main {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--hc-bg);
  color: var(--hc-text);
  min-height: calc(100vh - 180px);
}

.hexcopy-standard-container {
  width: 100%;
  max-width: 860px;
  margin: 48px auto 80px;
  padding: 0 24px;
  box-sizing: border-box;
}

.hexcopy-standard-article {
  width: 100%;
  box-sizing: border-box;
}

.hexcopy-standard-page-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hc-border);
}

.hexcopy-standard-page-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hc-text);
  margin: 0;
  letter-spacing: -0.02em;
}

.hexcopy-standard-content {
  font-family: var(--hc-font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--hc-text);
  word-wrap: break-word;
}

.hexcopy-standard-content p {
  margin: 0 0 24px;
  color: var(--hc-text-muted);
}

.hexcopy-standard-content h1,
.hexcopy-standard-content h2,
.hexcopy-standard-content h3,
.hexcopy-standard-content h4,
.hexcopy-standard-content h5,
.hexcopy-standard-content h6 {
  color: var(--hc-text);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hexcopy-standard-content h1 { font-size: 32px; }
.hexcopy-standard-content h2 { font-size: 26px; }
.hexcopy-standard-content h3 { font-size: 21px; }
.hexcopy-standard-content h4 { font-size: 18px; }
.hexcopy-standard-content h5 { font-size: 16px; }
.hexcopy-standard-content h6 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }

.hexcopy-standard-content a {
  color: var(--hc-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.hexcopy-standard-content a:hover {
  color: var(--hc-primary-hover);
}

.hexcopy-standard-content ul,
.hexcopy-standard-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
  color: var(--hc-text-muted);
}

.hexcopy-standard-content li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.hexcopy-standard-content blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--hc-primary);
  background: var(--hc-surface);
  border-radius: 0 var(--hc-radius-md) var(--hc-radius-md) 0;
  color: var(--hc-text-muted);
  font-style: italic;
}

.hexcopy-standard-content blockquote p:last-child {
  margin-bottom: 0;
}

.hexcopy-standard-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--hc-radius-md);
  box-shadow: var(--hc-shadow-sm);
  margin: 24px 0;
}

.hexcopy-standard-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}

.hexcopy-standard-content th,
.hexcopy-standard-content td {
  padding: 12px 16px;
  border: 1px solid var(--hc-border);
  text-align: left;
}

.hexcopy-standard-content th {
  background: var(--hc-surface);
  font-weight: 700;
  color: var(--hc-text);
}

.hexcopy-standard-content td {
  color: var(--hc-text-muted);
}

.hexcopy-standard-content hr {
  border: none;
  border-top: 1px solid var(--hc-border);
  margin: 40px 0;
}

.hexcopy-standard-content pre,
.hexcopy-standard-content code {
  font-family: var(--hc-font-mono);
  background: var(--hc-surface-hover);
  border-radius: var(--hc-radius-sm);
}

.hexcopy-standard-content pre {
  padding: 16px 20px;
  overflow-x: auto;
  border: 1px solid var(--hc-border);
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hc-text);
}

.hexcopy-standard-content code {
  padding: 2px 6px;
  font-size: 14px;
  color: var(--hc-primary);
}

.hexcopy-standard-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

/* Form Styles Strictly Scoped to HexCopy Standard Informational Pages (e.g. Contact Us) */
body.hexcopy-standard-page .hexcopy-standard-content input[type="text"],
body.hexcopy-standard-page .hexcopy-standard-content input[type="email"],
body.hexcopy-standard-page .hexcopy-standard-content input[type="url"],
body.hexcopy-standard-page .hexcopy-standard-content input[type="tel"],
body.hexcopy-standard-page .hexcopy-standard-content input[type="number"],
body.hexcopy-standard-page .hexcopy-standard-content textarea,
body.hexcopy-standard-page .hexcopy-standard-content select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-family: var(--hc-font-sans);
  font-size: 15px;
  color: var(--hc-text);
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  margin-top: 6px;
  margin-bottom: 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.hexcopy-standard-page .hexcopy-standard-content input:focus,
body.hexcopy-standard-page .hexcopy-standard-content textarea:focus,
body.hexcopy-standard-page .hexcopy-standard-content select:focus {
  outline: none;
  border-color: var(--hc-primary);
  box-shadow: 0 0 0 3px rgba(102, 56, 249, 0.15);
}

body.hexcopy-standard-page .hexcopy-standard-content input[type="submit"],
body.hexcopy-standard-page .hexcopy-standard-content button[type="submit"] {
  background: var(--hc-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--hc-radius-md);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

body.hexcopy-standard-page .hexcopy-standard-content input[type="submit"]:hover,
body.hexcopy-standard-page .hexcopy-standard-content button[type="submit"]:hover {
  background: var(--hc-primary-hover);
}

body.hexcopy-standard-page .hexcopy-standard-content label {
  font-size: 14px;
  font-weight: 600;
  color: var(--hc-text);
  display: block;
  margin-bottom: 4px;
}

.hexcopy-standard-content .page-links {
  margin: 32px 0;
  padding: 12px 0;
  font-weight: 600;
}

/* ==========================================================================
   404 Page (Not Found)
   ========================================================================== */
.hexcopy-404-main {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px;
  box-sizing: border-box;
  background-color: var(--hc-bg);
  color: var(--hc-text);
}

.hexcopy-404-card {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 56px 40px;
  box-shadow: var(--hc-shadow-md);
  box-sizing: border-box;
}

.hexcopy-404-badge-wrap {
  margin-bottom: 20px;
}

.hexcopy-404-code {
  display: inline-block;
  font-family: var(--hc-font-mono);
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--hc-primary) 0%, var(--hc-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hexcopy-404-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hc-text);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hexcopy-404-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--hc-text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

.hexcopy-404-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hexcopy-404-actions .hexcopy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* Color Detail Page */
.hexcopy-breadcrumb {
  font-size: 13px;
  color: var(--hc-text-subtle);
  margin: 20px 0 24px;
}
.hexcopy-breadcrumb a {
  color: var(--hc-text-muted);
  text-decoration: none;
}
.hexcopy-breadcrumb a:hover {
  color: var(--hc-primary);
}

.hexcopy-color-detail-hero {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  box-shadow: var(--hc-shadow-sm);
  margin-bottom: 28px;
  align-items: center;
}
.hexcopy-color-detail-swatch {
  height: 200px;
  border-radius: var(--hc-radius-md);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.hexcopy-color-detail-badge {
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--hc-radius-sm);
  font-family: var(--hc-font-mono);
  font-size: 14px;
  font-weight: 700;
}
.hexcopy-detail-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
}
.hexcopy-detail-desc {
  font-size: 15px;
  color: var(--hc-text-muted);
  line-height: 1.5;
  margin: 0 0 20px;
}
.hexcopy-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hexcopy-detail-conversions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.hexcopy-conv-box {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hexcopy-conv-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--hc-text-subtle);
}
.hexcopy-conv-code {
  font-family: var(--hc-font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--hc-text);
}

.hexcopy-detail-contrast-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.hexcopy-detail-contrast-card {
  padding: 24px;
  border-radius: var(--hc-radius-md);
}
.hexcopy-contrast-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hexcopy-contrast-scenario {
  font-size: 12px;
  font-weight: 700;
}
.hexcopy-contrast-score-pill {
  background: rgba(0, 0, 0, 0.15);
  padding: 2px 8px;
  border-radius: var(--hc-radius-full);
  font-family: var(--hc-font-mono);
  font-size: 12px;
  font-weight: 700;
}
.hexcopy-contrast-sample-text {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}
.hexcopy-contrast-ratings {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .hexcopy-hero-title {
    font-size: 34px;
  }
  .hexcopy-hero-desc {
    font-size: 16px;
  }
  .hexcopy-picker-layout {
    grid-template-columns: 1fr;
  }
  .hexcopy-color-detail-hero {
    grid-template-columns: 1fr;
  }
  .hexcopy-gen-stage {
    flex-direction: column;
    height: auto;
  }
  .hexcopy-gen-col {
    min-height: 120px;
  }
  .hexcopy-col-content {
    flex-direction: row;
    width: 100%;
  }
  .hexcopy-mock-cards-grid {
    grid-template-columns: 1fr;
  }
  .hexcopy-detail-contrast-cards {
    grid-template-columns: 1fr;
  }
  .hexcopy-saved-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }
  .hexcopy-saved-toolbar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hexcopy-saved-actions-row {
    justify-content: flex-start;
    width: 100%;
  }
  .hexcopy-saved-actions-row .hexcopy-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  .hexcopy-palettes-grid {
    grid-template-columns: 1fr;
  }
  /* Live Website Color Preview Mobile Responsiveness */
  .hexcopy-preview-component {
    padding: 16px 12px;
  }
  .hexcopy-preview-toolbar {
    padding-bottom: 16px;
    margin-bottom: 18px;
    gap: 12px;
  }
  .hexcopy-preview-roles-row {
    gap: 10px;
    width: 100%;
  }
  .hexcopy-preview-contrast-pill {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .hexcopy-mockup-browser-bar {
    padding: 8px 10px;
    gap: 8px;
  }
  .hexcopy-mockup-url-bar {
    padding: 3px 8px;
    font-size: 10px;
    max-width: 150px;
    width: auto;
    flex: 1;
  }
  .hexcopy-mockup-preview-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  .hexcopy-mockup-canvas {
    padding: 18px 14px;
  }
  .hexcopy-mock-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hexcopy-mock-card {
    min-width: 0;
    box-sizing: border-box;
  }
  .hexcopy-standard-container {
    margin: 28px auto 48px;
    padding: 0 16px;
  }
  .hexcopy-standard-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }
  .hexcopy-standard-page-title {
    font-size: 28px;
  }
  .hexcopy-standard-content {
    font-size: 16px;
    line-height: 1.65;
  }
  .hexcopy-standard-content h1 { font-size: 26px; }
  .hexcopy-standard-content h2 { font-size: 22px; }
  .hexcopy-standard-content h3 { font-size: 19px; }
  .hexcopy-standard-content h4 { font-size: 17px; }
  .hexcopy-standard-content ul,
  .hexcopy-standard-content ol {
    margin-left: 20px;
  }
  .hexcopy-404-main {
    padding: 40px 16px 60px;
    min-height: auto;
  }
  .hexcopy-404-card {
    padding: 36px 20px;
  }
  .hexcopy-404-code {
    font-size: 68px;
  }
  .hexcopy-404-title {
    font-size: 22px;
  }
  .hexcopy-404-desc {
    font-size: 15px;
    margin-bottom: 24px;
  }
  .hexcopy-404-actions {
    flex-direction: column;
    width: 100%;
  }
  .hexcopy-404-actions .hexcopy-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  /* FAQ Header mobile margin & question padding */
  .hexcopy-faq-section .hexcopy-section-header {
    margin-bottom: 24px;
  }
  .hexcopy-faq-question {
    padding: 16px 18px;
    font-size: 15px;
    gap: 12px;
  }
  .hexcopy-faq-answer {
    padding: 0 18px 16px;
    font-size: 14px;
  }

  /* Live Preview: Keep StudioCore brand separate from sample nav by hiding decorative sample nav */
  .hexcopy-mock-nav {
    display: none;
  }
  .hexcopy-mock-header {
    padding-bottom: 18px;
  }
  .hexcopy-mock-brand {
    font-size: 15px;
  }
  .hexcopy-mock-hero {
    padding: 18px 0 22px;
  }
  .hexcopy-mock-hero-title {
    font-size: 20px;
    line-height: 1.25;
  }
  .hexcopy-mock-hero-lead {
    font-size: 12px;
    margin-bottom: 14px;
  }
}

@media (max-width: 480px) {
  .hexcopy-palettes-grid {
    grid-template-columns: 1fr;
  }
  .hexcopy-tools-grid {
    grid-template-columns: 1fr;
  }

  /* Reflow browser bar on narrow mobile screens (320px - 430px) */
  .hexcopy-mockup-browser-bar {
    padding: 8px;
    gap: 6px;
  }
  .hexcopy-mockup-dots {
    gap: 4px;
  }
  .hexcopy-mockup-dots span {
    width: 8px;
    height: 8px;
  }
  .hexcopy-mockup-url-bar {
    padding: 2px 6px;
    font-size: 10px;
    max-width: 105px;
  }
  .hexcopy-mockup-url-bar svg {
    display: none;
  }
  .hexcopy-mockup-preview-badge {
    font-size: 9px;
    padding: 2px 5px;
    letter-spacing: 0.2px;
  }

  /* Stack sample CTA buttons on narrow mobile screens */
  .hexcopy-mock-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .hexcopy-mock-primary-btn,
  .hexcopy-mock-outline-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 9px 12px;
  }
  .hexcopy-mock-card {
    padding: 14px;
  }
}
