/* Aqeeb Studio: main stylesheet. Neutral UI so the colors on the page stay the focus. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f3;
  --text: #111318;
  --muted: #5b626c;
  --border: #e3e3de;
  --border-strong: #c9c9c2;
  --accent: #111318;
  --accent-text: #ffffff;
  --link: #1d4ed8;
  --focus: #2563eb;
  --ok: #0f7a3d;
  --warn: #8a5300;
  --bad: #b42318;
  --swatch-ring: rgba(17, 19, 24, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 28px rgba(16, 24, 40, 0.07);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1140px;
  --narrow: 760px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --surface: #12151a; --surface-2: #171b21; --text: #f2f3f5; --muted: #a3aab5;
    --border: #262b33; --border-strong: #3a414c; --accent: #f2f3f5; --accent-text: #0b0d10;
    --link: #8ab4ff; --focus: #7aa7ff; --ok: #5bd68a; --warn: #f0b35b; --bad: #ff8b7e;
    --swatch-ring: rgba(255, 255, 255, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10; --surface: #12151a; --surface-2: #171b21; --text: #f2f3f5; --muted: #a3aab5;
  --border: #262b33; --border-strong: #3a414c; --accent: #f2f3f5; --accent-text: #0b0d10;
  --link: #8ab4ff; --focus: #7aa7ff; --ok: #5bd68a; --warn: #f0b35b; --bad: #ff8b7e;
  --swatch-ring: rgba(255, 255, 255, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- layout ---------- */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2rem, var(--narrow)); margin-inline: auto; }
.section { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section + .section { padding-top: 0; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.sr-only { position: absolute !important; 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: 0.75rem; top: -4rem; background: var(--accent); color: var(--accent-text); padding: 0.6rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 0.75rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand-name { font-size: 1.08rem; }
.site-nav { margin-left: 0.5rem; }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 0.45rem 0.75rem; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface-2); font-weight: 600; }
.header-search { margin-left: auto; position: relative; display: flex; gap: 0.4rem; align-items: center; }
.header-search .input { width: 230px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.nav-toggle { display: none; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}
.search-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; list-style: none; margin: 0; padding: 0.35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 70vh; overflow: auto; z-index: 60; }
.search-suggest li { margin: 0; }
.search-suggest a { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.55rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 0.93rem; }
.search-suggest a:hover, .search-suggest a[aria-selected="true"] { background: var(--surface-2); }
.search-suggest .swatch-inline { flex: none; }
.search-suggest .code { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { padding-top: 1rem; font-size: 0.875rem; color: var(--muted); width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.7rem 1.15rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); opacity: 0.88; }
.btn-secondary { background: var(--surface); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 3.9rem; padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.copy-btn:hover { background: var(--surface-2); }
.copy-btn.is-copied { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.9rem; }
.label { font-size: 0.875rem; font-weight: 600; }
.hint { font-size: 0.82rem; color: var(--muted); }
.input, .select, .textarea { width: 100%; padding: 0.62rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; min-height: 42px; }
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder { color: var(--muted); opacity: 0.85; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 0.85rem; margin: 0; }
.range { width: 100%; accent-color: var(--accent); }
.checkbox { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; cursor: pointer; }
.checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--text); padding: 0.4rem 0.85rem; border-radius: 999px; font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.segmented button[aria-checked="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); font-weight: 600; }
.color-input-row { display: flex; gap: 0.5rem; }
.color-input-picker { width: 52px; min-width: 52px; height: 42px; padding: 2px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.color-input-text { font-family: var(--mono); }

/* ---------- footer ---------- */
.site-footer { margin-top: 3rem; padding: 3rem 0 2rem; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 0.92rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.6fr repeat(4, 1fr); }
.footer-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-about p { max-width: 36ch; margin-top: 0.8rem; margin-bottom: 0.4rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.6rem !important; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer-bottom p { margin: 0; }

/* ---------- consent, toast ---------- */
.consent { position: fixed; z-index: 90; left: 1rem; right: 1rem; bottom: 1rem; max-width: 760px; margin-inline: auto; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.consent-text { margin: 0; flex: 1 1 320px; font-size: 0.9rem; }
.consent-actions { display: flex; gap: 0.5rem; }
.toast { position: fixed; z-index: 95; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--accent); color: var(--accent-text); padding: 0.6rem 1.1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow); }

/* ---------- swatches ---------- */
.swatch { display: block; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.swatch-inline { display: inline-block; width: 1.15rem; height: 1.15rem; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--swatch-ring); vertical-align: -0.2em; flex: none; }
.swatch-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); color: inherit; text-decoration: none; min-width: 0; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
a.swatch-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.swatch-card-color { display: block; aspect-ratio: 5 / 3; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.swatch-card-body { display: grid; gap: 0.1rem; padding: 0.6rem 0.8rem 0.7rem; min-width: 0; }
.swatch-card-name { font-weight: 600; font-size: 0.93rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-card-hex { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.swatch-card-note { font-size: 0.78rem; color: var(--muted); }
.swatch-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch-grid.is-large { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.swatch-strip { display: inline-flex; height: 1.4rem; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.swatch-strip > span { width: 1.4rem; height: 100%; }
.palette-strip { display: flex; height: 64px; border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.palette-strip > span { flex: 1; }
.preview { min-height: 160px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--swatch-ring); display: grid; place-items: center; padding: 1rem; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; background: var(--surface-2); cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--surface); }

/* ---------- cards, chips, badges, callouts ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.35rem; }
.card p:last-child { margin-bottom: 0; }
.card-meta { font-size: 0.85rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 0.85rem; text-decoration: none; cursor: pointer; font-family: inherit; }
a.chip:hover, button.chip:hover { background: var(--surface-2); text-decoration: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; border: 1px solid var(--border-strong); }
.badge-pass { color: var(--ok); border-color: var(--ok); }
.badge-fail { color: var(--bad); border-color: var(--bad); }
.callout { padding: 0.9rem 1.1rem; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.93rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-note { border-left-color: var(--link); }
.callout-warn { border-left-color: var(--warn); }

/* ---------- prose & tables ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }
.prose pre { overflow-x: auto; padding: 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose .callout { margin: 1.4em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }
.table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--surface-2); }
.table code { font-size: 0.88rem; }

/* ---------- values, code output ---------- */
.value-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.value-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--border); }
.value-row:last-child { border-bottom: 0; }
.value-label { width: 6.5rem; flex: none; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.value-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.93rem; }
.tool-output { position: relative; }
.tool-output pre { margin: 0; padding: 1rem 1rem 1rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; font-size: 0.85rem; line-height: 1.55; }
.tool-output .btn, .tool-output .copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.hero h1 { max-width: 16ch; margin-bottom: 0.4em; }
.hero .lede { margin-bottom: 1.5rem; }
.hero-search { display: flex; gap: 0.5rem; max-width: 520px; position: relative; }
.hero-search .input { min-height: 50px; font-size: 1.02rem; border-radius: 999px; padding-inline: 1.2rem; }
.hero-search .btn { min-height: 50px; padding-inline: 1.5rem; }
.hero-chips { margin-top: 1rem; }
.page-head { padding-block: 1.5rem 0.5rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 24ch; }
.page-head .lede { margin-top: 0.4rem; }

/* ---------- explorer (home) ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.5rem; align-items: center; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); }
.color-wheel { width: 100%; max-width: 340px; height: auto; cursor: crosshair; display: block; margin-inline: auto; }
.color-wheel path { stroke: var(--surface); stroke-width: 0.8; }
.color-wheel path:hover { stroke: var(--text); stroke-width: 1.4; }
.explorer-main { display: grid; gap: 1rem; min-width: 0; }
.explorer-swatch { height: 120px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--swatch-ring); display: flex; align-items: end; padding: 0.8rem 1rem; font-weight: 700; font-size: 1.15rem; }

/* ---------- color detail page ---------- */
.color-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: stretch; padding-block: 1.25rem 2rem; }
.color-hero-swatch { min-height: 280px; border-radius: calc(var(--radius) + 6px); box-shadow: inset 0 0 0 1px var(--swatch-ring); display: flex; align-items: flex-end; padding: 1.25rem 1.4rem; font-family: var(--mono); font-size: 1.5rem; font-weight: 700; }
.color-hero-body h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); }
.quick-answer { font-size: 1.08rem; line-height: 1.6; }
.color-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.relation { display: grid; gap: 0.5rem; margin-bottom: 1.6rem; }
.relation h3 { margin-bottom: 0; }
.relation p { color: var(--muted); font-size: 0.93rem; max-width: 70ch; margin-bottom: 0.5rem; }
.contrast-demo { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.stat-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.85rem; }

/* ---------- cards with strips (families, palettes, tools) ---------- */
.family-card { display: grid; gap: 0.7rem; }
.family-card .palette-strip { height: 44px; }
.tool-card { display: grid; gap: 0.35rem; }
.tool-card .card-meta { margin-top: 0.4rem; }
.az-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.5rem; }
.az-nav a { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.az-nav a:hover { background: var(--surface-2); }
.az-group { margin-bottom: 1.6rem; scroll-margin-top: 5rem; }
.az-group h3 { border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.name-list { display: grid; gap: 0.15rem 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); list-style: none; padding: 0; margin: 0; }
.name-list a { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.2rem; color: var(--text); text-decoration: none; border-radius: 6px; }
.name-list a:hover { background: var(--surface-2); }
.name-list .hex { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.palette-card { display: grid; gap: 0.8rem; }
.palette-card .palette-strip { height: 84px; }
.palette-colors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.palette-colors a, .palette-colors div { font-size: 0.78rem; color: var(--text); text-decoration: none; min-width: 0; }
.palette-colors .nm { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-colors .hx { display: block; font-family: var(--mono); color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.9rem; max-width: 74ch; }
.faq-item { padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-item h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.faq-item p { margin: 0; color: var(--muted); }

/* ---------- advertising (renders only when enabled) ---------- */
.ad-slot { margin: 2rem auto; max-width: 970px; min-height: 120px; text-align: center; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-label { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.35rem; }

/* ---------- misc ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 0.8rem; max-width: 74ch; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 0.9rem; }
.error-page { text-align: center; padding-block: 4rem; }
.error-page .lede { margin-inline: auto; }
.noscript-note { padding: 0.9rem 1.1rem; border: 1px solid var(--warn); border-radius: var(--radius-sm); }
@media print {
  .site-header, .site-footer, .consent, .toast, .ad-slot, .header-search { display: none !important; }
  body { background: #fff; color: #000; }
}

.swatch-item { display: grid; gap: 0.4rem; min-width: 0; }
.swatch-card-actions { display: flex; }

/* ---------- tint / shade scales ---------- */
.scale { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.5rem; }
.scale-step { display: grid; gap: 0.35rem; padding: 0.4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: center; min-width: 0; }
.scale-step:hover { border-color: var(--border-strong); background: var(--surface-2); }
.scale-swatch { display: block; height: 44px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--swatch-ring); }
.scale-step code { font-size: 0.72rem; color: var(--muted); }
