/* CSS to Tailwind — light UI, dark code surfaces */
:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-panel: #f8fafc;
  --bg-code: #0f172a;
  --surface: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #e8eef5;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-dim: rgba(2, 132, 199, 0.1);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --header-h: 64px;
  --max: 1200px;
  --focus: 0 0 0 3px rgba(2, 132, 199, 0.35);
  --code-text: #e2e8f0;
  --code-muted: #94a3b8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(2, 132, 199, 0.08), transparent 55%),
    radial-gradient(700px 420px at 92% 0%, rgba(5, 150, 105, 0.05), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.hero-tool {
  width: min(100% - 1.5rem, 1600px);
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(2, 132, 199, 0.28);
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { font-size: 1.05rem; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--text);
  background: rgba(2, 132, 199, 0.08);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switcher {
  position: relative;
}
.lang-btn {
  appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem;
  display: none;
  z-index: 200;
}
.lang-menu.open { display: block; }
.lang-menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
}
.lang-menu a:hover,
.lang-menu a[aria-current="true"] {
  background: var(--accent-dim);
  color: var(--text);
}

.menu-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

.nav-mobile {
  display: none;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: 0.5rem 1rem 1rem;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-hover); color: #ffffff; }
.btn-secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(15, 23, 42, 0.05); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hero / converter */
.hero {
  padding: 1.75rem 0 1rem;
}
.hero-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 800;
}
.hero-sub {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46rem;
}

.converter {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.converter-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.toolbar-left { justify-content: flex-start; }
.toolbar-center { justify-content: center; }
.toolbar-right { justify-content: flex-end; }
[dir="rtl"] .toolbar-left { justify-content: flex-end; }
[dir="rtl"] .toolbar-right { justify-content: flex-start; }
.toolbar-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.toolbar-check input { accent-color: var(--accent); }

.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
.editor-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border-subtle);
}
.editor-pane:last-child { border-right: none; }
.editor-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.editor-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  flex: 1;
  min-height: 360px;
  background: var(--bg-code);
}
.line-numbers {
  padding: 1rem 0.5rem 1rem 0.75rem;
  text-align: right;
  color: #64748b;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  user-select: none;
  border-right: 1px solid #1e293b;
  overflow: hidden;
  white-space: pre;
}
.editor-wrap textarea {
  width: 100%;
  height: 100%;
  min-height: 360px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  padding: 1rem;
  tab-size: 2;
}
.editor-wrap textarea::placeholder { color: #64748b; }

.converter-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.meta-block {
  padding: 1rem;
  border-right: 1px solid var(--border);
  min-height: 120px;
}
.meta-block:last-child { border-right: none; }
.meta-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stats-list li { margin: 0.2rem 0; }
.stats-list .ok { color: var(--success); }
.stats-list .warn { color: var(--warning); }
.notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.notes-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #ffffff;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  display: inline-block;
}
.status-dot.ok { background: var(--success); }
.status-dot.warn { background: var(--warning); }
.status-dot.err { background: var(--danger); }

/* Benefits */
.benefits {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}
.benefit {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.benefit strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}
.benefit span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Sections */
.section {
  padding: 2.5rem 0;
}
.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.section-lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}
.step {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.step::before {
  counter-increment: step;
  content: "Step " counter(step);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.step-visual {
  padding: 0;
  overflow: hidden;
}
.step-visual img {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  background: #f1f5f9;
}
.step-visual .step-body {
  padding: 0.9rem 1rem 1.05rem;
}
.steps-visual .step-visual::before {
  content: attr(data-step);
  padding: 0.85rem 1rem 0;
  margin-bottom: 0;
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.use-cases li {
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.example-btn {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.example-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.example-btn strong { display: block; margin-bottom: 0.2rem; }
.example-btn span { color: var(--text-dim); font-size: 0.82rem; }

/* Cards / tools */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tool-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.tool-card .cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
}
.tool-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.tool-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}
.tool-card .cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* Content pages */
.page-hero {
  padding: 1.75rem 0 1rem;
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
  content: "→";
  margin-left: 0.35rem;
  color: var(--text-dim);
}
.breadcrumbs a { color: var(--text-muted); }
.prose {
  max-width: 46rem;
}
.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}
.prose p, .prose li {
  color: var(--text-muted);
}
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose code, .inline-code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: #0f172a;
}
.prose pre {
  background: var(--bg-code);
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--code-text);
}
.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

/* Contextual internal-link clusters */
.related-cluster {
  margin: 2rem 0 1rem;
}
.related-cluster h2 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}
.related-cluster ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-cluster li {
  margin: 0;
}

/* Grouped topic directory on the homepage */
.link-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.link-group h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}
.link-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.link-group li {
  margin: 0 0 0.35rem;
}
.guide-intro {
  max-width: 46rem;
}
.callout {
  background: var(--accent-dim);
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

.faq-list details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  padding: 0.85rem 1rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.faq-list details p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
}

/* Forms */
.form {
  max-width: 36rem;
  display: grid;
  gap: 1rem;
}
.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  padding: 0.65rem 0.75rem;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.form-note {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Tool workspace */
.tool-workspace {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0 2rem;
  box-shadow: var(--shadow);
}
.tool-workspace textarea {
  width: 100%;
  min-height: 220px;
  background: var(--bg-code);
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.85rem;
  resize: vertical;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.color-row, .shadow-preview, .gradient-preview {
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0.75rem 0;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.field-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.field-row input, .field-row select {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.5rem;
  font: inherit;
}

/* cssgradient.io-style color converter */
.tool-workspace-visual {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 1rem 0 2rem;
}
.tool-workspace-visual .tool-actions,
.tool-workspace-visual > label[for="tool-output"],
.tool-workspace-visual > #tool-output,
.tool-workspace-visual > #tool-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cg-tool {
  display: grid;
  gap: 1rem;
}
.cg-preview {
  height: 88px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #2a7b9b;
  box-shadow: var(--shadow);
}
.cg-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}
.cg-picker-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.15rem;
  align-items: start;
}
.cg-sv {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, #2a7b9b);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.cg-sv-cursor {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45), 0 2px 6px rgba(15, 23, 42, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cg-controls {
  display: grid;
  gap: 0.75rem;
}
.cg-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.cg-field input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.5rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.cg-rgba {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.cg-slider {
  width: 100%;
  height: 16px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  outline: none;
  cursor: pointer;
}
.cg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(15, 23, 42, 0.35);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
.cg-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(15, 23, 42, 0.35);
}
.cg-hue {
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.cg-alpha {
  background:
    linear-gradient(to right, transparent, #2a7b9b),
    repeating-conic-gradient(#cbd5e1 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;
}
.cg-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.cg-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  cursor: pointer;
  padding: 0;
}
.cg-swatch:hover { transform: translateY(-1px); }
.cg-code {
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cg-code-head {
  padding: 0.7rem 1rem;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #1e293b;
}
.cg-code-body {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
  min-height: 8.5rem;
  white-space: pre-wrap;
}
.cg-copy {
  display: block;
  width: calc(100% - 1.5rem);
  margin: 0 0.75rem 0.75rem;
  background: #ffffff;
  color: #0f172a;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  padding: 0.8rem 1rem;
  cursor: pointer;
}
.cg-copy:hover { background: #f1f5f9; }

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  padding: 2.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.2rem 0;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

[dir="rtl"] .editor-pane { border-right: none; border-left: 1px solid var(--border-subtle); }
[dir="rtl"] .editor-pane:last-child { border-left: none; }
[dir="rtl"] .meta-block { border-right: none; border-left: 1px solid var(--border-subtle); }
[dir="rtl"] .meta-block:last-child { border-left: none; }
[dir="rtl"] .use-cases li {
  border-left: none;
  border-right: 3px solid var(--accent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.eeat-strip { margin: 1.25rem 0 1.75rem; }
.content-article { margin-top: 1.5rem; padding-bottom: 2rem; }
.content-article h2:first-child { margin-top: 0.5rem; }
.prose .hero-sub { font-size: 1.05rem; color: var(--text-muted); }
kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}
