/*
Theme Name: Colourtoolsshift
Theme URI: https://example.com/colourtoolsshift
Author: Colourtoolsshift
Author URI: https://example.com
Description: A responsive dark neon WordPress theme with browser-based color picker, palette generator, gradient maker, color converter, contrast checker and image-to-palette tools.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: colourtoolsshift
Tags: custom-logo, custom-menu, featured-images, blog, one-column, accessibility-ready, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
:root {
  --bg: #050817;
  --bg-soft: #090d20;
  --panel: rgba(12, 17, 38, 0.82);
  --panel-strong: #0d1228;
  --panel-light: #121936;
  --text: #f7f8ff;
  --muted: #aeb6d1;
  --line: rgba(143, 160, 205, 0.18);
  --purple: #7c3aed;
  --pink: #ec2d96;
  --orange: #ff8a00;
  --blue: #1688ff;
  --green: #16c784;
  --cyan: #00c4d9;
  --radius: 24px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 22%, rgba(111, 47, 255, .12), transparent 34%),
    radial-gradient(circle at 20% 44%, rgba(20, 116, 255, .08), transparent 30%),
    linear-gradient(180deg, #040611 0%, #050817 52%, #040611 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.light {
  --bg: #f8f9ff;
  --bg-soft: #eff2ff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: #ffffff;
  --panel-light: #f7f7ff;
  --text: #111634;
  --muted: #626b88;
  --line: rgba(51, 58, 96, 0.12);
  --shadow: 0 24px 65px rgba(80, 68, 150, 0.16);
  color-scheme: light;
  background:
    radial-gradient(circle at 72% 22%, rgba(111, 47, 255, .12), transparent 34%),
    radial-gradient(circle at 20% 44%, rgba(20, 116, 255, .08), transparent 30%),
    linear-gradient(180deg, #ffffff, #f4f5ff);
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .17;
  pointer-events: none;
}
.glow-left { left: -260px; top: 320px; background: #1168ff; }
.glow-right { right: -280px; top: 270px; background: #ff5c00; }

.site-header {
  width: min(1480px, calc(100% - 64px));
  min-height: 98px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 42px;
  align-items: center;
  position: relative;
  z-index: 20;
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark { width: 58px; height: 58px; flex: 0 0 auto; }
.brand-name { font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: -1.2px; white-space: nowrap; }
.brand-name span { color: #7d40ff; }
.brand-name strong {
  font-weight: 800;
  background: linear-gradient(90deg, #ff2d86, #ff9d00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav { display: flex; justify-content: center; align-items: center; gap: clamp(20px, 2.8vw, 46px); }
.main-nav a { color: var(--muted); font-weight: 650; font-size: .98rem; position: relative; padding: 12px 0; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: 2px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 20px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .language-button, .favorite-button, .menu-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 16px;
  min-height: 44px;
  cursor: pointer;
}
.icon-button { width: 44px; display: grid; place-items: center; }
.icon-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.language-button { padding: 0 16px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.favorite-button {
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  border: 0;
  background: linear-gradient(100deg, #6b2cff, #dd2fbc 60%, #ff8a00);
  box-shadow: 0 10px 28px rgba(124, 58, 237, .28);
}
.favorite-button b {
  min-width: 20px; height: 20px; border-radius: 20px; display: grid; place-items: center;
  background: rgba(0,0,0,.2); font-size: .72rem;
}
.menu-button { display: none; width: 46px; padding: 11px; }
.menu-button span { display: block; height: 2px; background: currentColor; margin: 5px; border-radius: 4px; }

.hero {
  width: min(1480px, calc(100% - 64px));
  min-height: 560px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: minmax(370px, .76fr) minmax(640px, 1.36fr);
  gap: clamp(38px, 6vw, 90px);
  align-items: center;
}

.hero-copy { padding: 30px 0 26px 18px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 17px;
  margin-bottom: 24px;
  border: 1px solid rgba(141, 74, 255, .5);
  background: rgba(81, 36, 160, .12);
  border-radius: 999px;
  color: #d5d8e8;
  font-size: .93rem;
}
body.light .eyebrow { color: #383e62; }
.eyebrow span { color: #f254ff; }
.hero h1 {
  margin: 0;
  max-width: 590px;
  font-size: clamp(3rem, 4.6vw, 5.35rem);
  line-height: 1.04;
  letter-spacing: -3.6px;
}
.gradient-text {
  background: linear-gradient(90deg, #7c3aed 2%, #ec2d96 45%, #ff8a00 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy > p {
  margin: 24px 0 0;
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.75;
}
.hero-copy > p strong { color: #a855f7; }
.hero-actions { display: flex; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.primary-cta, .secondary-cta {
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 28px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 1rem;
}
.primary-cta {
  background: linear-gradient(105deg, #6f2cff, #d82bd4 58%, #ff8a00);
  box-shadow: 0 16px 36px rgba(125, 47, 255, .32);
}
.secondary-cta {
  border: 1px solid rgba(147, 169, 225, .35);
  background: rgba(5, 8, 23, .4);
  cursor: pointer;
}
body.light .secondary-cta { background: rgba(255,255,255,.65); }
.primary-cta:hover, .favorite-button:hover { transform: translateY(-2px); }
.primary-cta, .favorite-button { transition: transform .2s ease, box-shadow .2s ease; }

.trust-row { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.avatar-stack { display: flex; }
.avatar-stack span {
  width: 45px; height: 45px; border-radius: 50%; display: grid; place-items: center;
  margin-right: -10px; border: 2px solid var(--bg); font-weight: 850; font-size: .68rem;
  color: white;
  background: linear-gradient(140deg, #192349, #c2703f);
}
.avatar-stack span:nth-child(2) { background: linear-gradient(140deg, #6c2f70, #f2a56f); }
.avatar-stack span:nth-child(3) { background: linear-gradient(140deg, #173b63, #44a97c); }
.avatar-stack span:nth-child(4) { background: linear-gradient(140deg, #6b2841, #e88a8a); }
.stars { letter-spacing: 4px; color: #ffc400; font-size: 1.12rem; }
.trust-row small { color: var(--muted); font-size: .92rem; }

.tool-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    linear-gradient(115deg, #146cff, #8a35ff 50%, #ec2d96) border-box;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-sidebar {
  padding: 18px 11px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: rgba(5, 8, 23, .3);
}
body.light .tool-sidebar { background: rgba(246,247,255,.8); }
.tool-tab {
  width: 100%;
  min-height: 68px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 4px;
}
.tool-tab span { font-size: 1.55rem; line-height: 1; }
.tool-tab b { font-size: .74rem; }
.tool-tab:hover { background: rgba(124, 58, 237, .1); color: var(--text); }
.tool-tab.active {
  background: linear-gradient(150deg, #5b21b6, #7c3aed);
  color: white;
  box-shadow: 0 12px 25px rgba(124, 58, 237, .27);
}

.tool-content { min-width: 0; min-height: 492px; }
.tool-panel { display: none; min-height: 492px; padding: 22px 24px 20px; animation: panelIn .28s ease; }
.tool-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

.picker-layout { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(290px, .85fr); gap: 26px; }
.picker-visual { display: grid; place-items: center; min-width: 0; }
#colorCanvas { display: block; width: min(100%, 390px); height: auto; touch-action: none; cursor: crosshair; }
.picker-controls { padding: 10px 0; min-width: 0; }
.format-tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.format-tab {
  flex: 1; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 8px 4px 12px; font-weight: 800; border-bottom: 2px solid transparent;
}
.format-tab.active { color: #b65bff; border-color: #8a35ff; }
.value-display { display: grid; grid-template-columns: 1fr 52px; gap: 10px; margin-bottom: 18px; }
.value-display input, .value-display button, .channel-item, select, .converter-input input {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--text);
  border-radius: 11px;
}
.value-display input { min-width: 0; height: 48px; padding: 0 14px; font-weight: 750; letter-spacing: .4px; }
.value-display button { cursor: pointer; font-size: 1.2rem; }
.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.channel-item { min-width: 0; height: 45px; padding: 0 10px; display: flex; align-items: center; gap: 8px; }
.channel-item span { color: var(--muted); font-size: .8rem; font-weight: 800; }
.channel-item input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 750; }
.recent-block { margin-top: 22px; }
.section-label { color: var(--muted); font-size: .84rem; margin-bottom: 10px; }
.recent-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.recent-color {
  width: 38px; height: 38px; border-radius: 8px; border: 2px solid rgba(255,255,255,.08);
  cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.slider-row { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; margin-top: 13px; }
.slider-row label { color: var(--muted); font-size: .78rem; font-weight: 750; }
.slider-row output { color: var(--muted); font-size: .8rem; width: 40px; text-align: right; }
.slider-row input[type="range"] { width: 100%; cursor: pointer; }
.hue-range {
  appearance: none; height: 12px; border-radius: 99px;
  background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}
.alpha-range {
  appearance: none; height: 12px; border-radius: 99px;
  background:
    linear-gradient(90deg, transparent, var(--active-color, #7c3aed)),
    repeating-conic-gradient(#a5acc0 0 25%, #e2e5ee 0 50%) 0 / 16px 16px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 3px solid #7134ee; box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 1.9rem; letter-spacing: -1px; }
.mini-label, .section-kicker { font-size: .75rem; color: #bd5cff; font-weight: 850; letter-spacing: 1.2px; }
.small-action, .wide-action, .code-box button {
  border: 1px solid rgba(139, 92, 246, .45);
  background: rgba(124,58,237,.13);
  color: var(--text);
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
}
.small-action { padding: 10px 15px; }
.palette-settings, .gradient-fields, .contrast-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.palette-settings label, .gradient-fields label, .contrast-controls label, .converter-input {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
.palette-settings input, .palette-settings select, .gradient-fields input[type="color"], .contrast-controls input[type="color"], #converterColor {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  padding: 5px 8px;
}
.large-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.large-swatch {
  min-height: 210px; border-radius: 16px; position: relative; cursor: pointer; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.large-swatch span {
  position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(0,0,0,.55);
  color: white; text-align: center; padding: 7px 4px; border-radius: 8px; font-size: .75rem; font-weight: 800;
}
.wide-action { width: 100%; margin-top: 16px; min-height: 44px; }

.gradient-preview { height: 230px; border-radius: 20px; border: 1px solid var(--line); margin-bottom: 18px; }
.gradient-fields { grid-template-columns: 1fr 1fr 2fr; }
.gradient-fields label:last-child { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.gradient-fields label:last-child input { grid-column: 1 / -1; width: 100%; }
.code-box {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.035); padding: 10px 10px 10px 14px; border-radius: 12px;
}
.code-box code { overflow: auto; white-space: nowrap; color: #d5d9ee; }
body.light .code-box code { color: #303757; }
.code-box button { padding: 10px 14px; }

.converter-input { display: block; }
.converter-input > div { display: grid; grid-template-columns: 1fr 58px; gap: 10px; margin-top: 10px; }
.converter-input input[type="text"], #converterHex { height: 50px; padding: 0 15px; }
.conversion-results { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.conversion-result {
  border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 14px;
  padding: 15px; cursor: pointer;
}
.conversion-result span { color: var(--muted); font-size: .78rem; display: block; margin-bottom: 7px; }
.conversion-result strong { font-size: .95rem; word-break: break-word; }

.contrast-controls { grid-template-columns: 1fr 46px 1fr; align-items: end; }
.contrast-controls button { height: 46px; border: 1px solid var(--line); background: transparent; border-radius: 12px; cursor: pointer; }
.contrast-preview {
  min-height: 180px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px; gap: 12px; transition: .2s ease;
}
.contrast-preview strong { font-size: 1.8rem; }
.contrast-preview span { max-width: 440px; line-height: 1.6; }
.contrast-score {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 14px; padding: 14px 18px;
}
.contrast-score > div:first-child span { display: block; color: var(--muted); font-size: .78rem; }
.contrast-score > div:first-child strong { font-size: 1.6rem; }
.compliance-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.badge { padding: 7px 9px; border-radius: 8px; font-size: .72rem; font-weight: 800; }
.badge.pass { background: rgba(22,199,132,.17); color: #48e0a6; }
.badge.fail { background: rgba(239,68,68,.15); color: #ff7777; }

.drop-zone {
  min-height: 170px; border: 1.5px dashed #7844ed; border-radius: 18px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer; background: rgba(124,58,237,.06); text-align: center; padding: 22px;
}
.drop-zone.dragging { background: rgba(124,58,237,.18); border-color: #d15aff; }
.upload-icon { font-size: 2.5rem; color: #9d62ff; margin-bottom: 8px; }
.drop-zone small { color: var(--muted); margin-top: 6px; }
#imageCanvas { display: none; width: 100%; max-height: 205px; object-fit: contain; margin-top: 14px; border-radius: 14px; background: #080b17; }
.extracted-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.extracted-swatch { min-height: 62px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); cursor: pointer; position: relative; }
.extracted-swatch span { position: absolute; bottom: 5px; left: 5px; right: 5px; font-size: .62rem; font-weight: 800; color: white; background: rgba(0,0,0,.55); border-radius: 5px; padding: 4px; text-align: center; }

.popular-section { width: min(1480px, calc(100% - 64px)); margin: 46px auto 0; text-align: center; }
.popular-section h2 { margin: 7px 0 6px; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -1.6px; }
.popular-section > p { color: var(--muted); margin: 0; }
.tool-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 28px; }
.feature-card {
  min-width: 0; min-height: 126px; padding: 18px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center;
  gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 16px; color: var(--text);
  background: rgba(255,255,255,.022); cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.55); background: rgba(124,58,237,.065); }
.feature-card > span:nth-child(2) { min-width: 0; }
.feature-card b { display: block; margin-bottom: 8px; }
.feature-card small { color: var(--muted); line-height: 1.45; display: block; }
.feature-card i { font-style: normal; color: var(--muted); }
.card-icon { width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center; font-size: 1.45rem; color: white; }
.card-icon.purple { background: linear-gradient(145deg, #5b21b6, #8b5cf6); }
.card-icon.pink { background: linear-gradient(145deg, #be185d, #ff4ca5); }
.card-icon.blue { background: linear-gradient(145deg, #165dce, #1688ff); }
.card-icon.green { background: linear-gradient(145deg, #087c45, #16c784); }
.card-icon.orange { background: linear-gradient(145deg, #9b4a00, #ff8a00); }
.card-icon.cyan { background: linear-gradient(145deg, #087d98, #00c4d9); }

.benefits {
  width: min(1480px, calc(100% - 64px));
  margin: 28px auto 48px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(115deg, rgba(71,21,140,.65), rgba(13,18,40,.88) 42%, rgba(12,60,139,.55));
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.benefits article { display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 14px; border-right: 1px solid var(--line); }
.benefits article:last-child { border-right: 0; }
.benefits article > span { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 1.7rem; flex: 0 0 auto; }
.benefits strong, .benefits small { display: block; }
.benefits small { color: #c5cbe0; line-height: 1.45; margin-top: 4px; }

footer {
  width: min(1480px, calc(100% - 64px)); margin: 0 auto; border-top: 1px solid var(--line);
  min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .9rem;
}
.brand.compact .brand-name { font-size: 1.1rem; }

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 12px; background: #f8f9ff; color: #11152a; font-weight: 800;
  box-shadow: 0 16px 50px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1260px) {
  .main-nav { gap: 20px; }
  .main-nav a:nth-last-child(-n+2) { display: none; }
  .hero { grid-template-columns: .74fr 1.26fr; gap: 34px; }
  .tool-cards { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(3, 1fr); }
  .benefits article:nth-child(3) { border-right: 0; }
}

@media (max-width: 1020px) {
  .site-header, .hero, .popular-section, .benefits, footer { width: min(94%, 920px); }
  .site-header { grid-template-columns: auto 1fr; }
  .main-nav {
    display: none; position: absolute; top: 86px; left: 0; right: 0; padding: 14px;
    border: 1px solid var(--line); background: var(--panel-strong); border-radius: 18px; box-shadow: var(--shadow);
  }
  .main-nav.open { display: grid; grid-template-columns: repeat(3, 1fr); }
  .header-actions { justify-self: end; }
  .menu-button { display: block; }
  .hero { grid-template-columns: 1fr; margin-top: 10px; }
  .hero-copy { text-align: center; padding-left: 0; }
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .hero h1 { margin-inline: auto; }
  .tool-shell { min-height: 520px; }
  .tool-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header { min-height: 80px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 1.35rem; }
  .language-button, .favorite-button { display: none; }
  .main-nav.open { grid-template-columns: 1fr 1fr; }
  .hero h1 { letter-spacing: -2.4px; }
  .hero { width: min(94%, 620px); }
  .tool-shell { grid-template-columns: 1fr; }
  .tool-sidebar {
    flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; padding: 10px;
  }
  .tool-tab { min-width: 72px; min-height: 58px; }
  .picker-layout { grid-template-columns: 1fr; }
  #colorCanvas { max-width: 330px; }
  .tool-panel { padding: 18px 14px; }
  .palette-settings, .gradient-fields, .contrast-controls { grid-template-columns: 1fr; }
  .contrast-controls button { width: 100%; }
  .large-swatches { grid-template-columns: repeat(5, minmax(78px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
  .large-swatch { min-height: 165px; }
  .conversion-results { grid-template-columns: 1fr; }
  .contrast-score { align-items: flex-start; flex-direction: column; }
  .compliance-badges { justify-content: flex-start; }
  .tool-cards { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; padding: 20px; }
  .benefits article, .benefits article:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
  .benefits article:last-child { border-bottom: 0; padding-bottom: 0; }
  footer { flex-direction: column; justify-content: center; text-align: center; padding: 28px 0; }
}

@media (max-width: 460px) {
  .site-header, .hero, .popular-section, .benefits, footer { width: calc(100% - 28px); }
  .brand-name { font-size: 1.1rem; letter-spacing: -.8px; }
  .brand-mark { width: 38px; height: 38px; }
  .icon-button { display: none; }
  .hero-copy { padding-top: 12px; }
  .hero h1 { font-size: 2.65rem; }
  .hero-actions { flex-direction: column; }
  .primary-cta, .secondary-cta { width: 100%; }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-content { min-height: 620px; }
  .extracted-swatches { grid-template-columns: repeat(3, 1fr); }
}


/* WordPress integration */
.admin-bar .site-header { margin-top: 0; }
.custom-logo { width: 58px; height: 58px; object-fit: contain; display: block; }
.main-nav .menu-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 2.8vw, 46px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav .menu-list li { margin: 0; padding: 0; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--text); }
.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: 2px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 20px;
}

.content-shell {
  width: min(1180px, calc(100% - 64px));
  margin: 48px auto 70px;
}
.wp-entry,
.archive-header,
.not-found-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 52px);
}
.wp-entry + .wp-entry { margin-top: 24px; }
.entry-title,
.archive-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -1.8px;
}
.entry-title a:hover { color: #a855f7; }
.entry-meta { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.entry-content { color: var(--muted); font-size: 1.02rem; line-height: 1.8; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { color: var(--text); line-height: 1.25; }
.entry-content a { color: #b85cff; text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 16px; }
.entry-content blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid #8b5cf6;
  background: rgba(124,58,237,.08);
  border-radius: 0 12px 12px 0;
}
.entry-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin-bottom: 24px;
}
.read-more,
.post-navigation a,
.comment-reply-link,
.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #6b2cff, #dd2fbc 60%, #ff8a00);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.posts-navigation,
.post-navigation { margin: 28px 0; }
.nav-links { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.comments-area {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 22px;
  padding: clamp(22px, 4vw, 42px);
}
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-submit {
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: #7c3aed;
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important;
  width: auto; height: auto;
  top: 8px; left: 8px;
  z-index: 100000;
  padding: 12px 16px;
  background: #fff;
  color: #111;
  border-radius: 8px;
}
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: .86rem; }
.gallery-caption { color: var(--muted); }
.bypostauthor > .comment-body { border-left: 3px solid #8b5cf6; padding-left: 16px; }
.alignleft { float: left; margin: 0 22px 18px 0; }
.alignright { float: right; margin: 0 0 18px 22px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.sticky { border-color: rgba(168,85,247,.55); }
.wp-block-button__link { text-decoration: none !important; }

@media (max-width: 1020px) {
  .main-nav .menu-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
}
@media (max-width: 720px) {
  .content-shell { width: calc(100% - 28px); margin-top: 28px; }
  .main-nav .menu-list { grid-template-columns: 1fr 1fr; }
  .custom-logo { width: 44px; height: 44px; }
}
