/* Daniel Smith Watercolor Database — warm, earthy palette */

:root {
  /* Warm off-white, watercolor paper */
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-alt: #F3EFE7;
  --border: #E3DCCD;
  --border-strong: #C9BFA9;
  --text: #2C2418;
  --text-muted: #6E5F46;
  --text-faint: #9C8F74;
  --accent: #1B3A8C;       /* ultramarine-inspired DS blue */
  --accent-hover: #112968;
  --accent-soft: #E4EAF7;
  --warm: #A0522D;         /* burnt sienna */
  --warm-soft: #F3E3D3;
  --success: #437A22;
  --error: #A12C7B;
  --warning: #964219;

  /* Product line colors */
  --line-extra: #1B3A8C;
  --line-extra-soft: #E4EAF7;
  --line-prima: #B07028;
  --line-prima-soft: #F7ECD4;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(68, 52, 30, 0.06), 0 1px 1px rgba(68, 52, 30, 0.04);
  --shadow-md: 0 4px 12px rgba(68, 52, 30, 0.08), 0 2px 4px rgba(68, 52, 30, 0.04);
  --shadow-lg: 0 12px 32px rgba(68, 52, 30, 0.16), 0 4px 8px rgba(68, 52, 30, 0.06);

  --font-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Zodiak", Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg: #1A1917;
  --surface: #242220;
  --surface-alt: #2D2A27;
  --border: #3A3632;
  --border-strong: #524C44;
  --text: #EDE5D2;
  --text-muted: #B0A389;
  --text-faint: #7C7362;
  --accent: #6B8FD4;
  --accent-hover: #90ADE2;
  --accent-soft: #23304E;
  --warm: #D48250;
  --warm-soft: #3B2C20;
  --line-extra: #6B8FD4;
  --line-extra-soft: #23304E;
  --line-prima: #DCA457;
  --line-prima-soft: #3A2E18;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.7), 0 4px 8px rgba(0,0,0,0.4);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-feature-settings: "ss01", "ss02";
}

/* Subtle paper texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(160, 82, 45, 0.03), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(27, 58, 140, 0.03), transparent 60%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(212, 130, 80, 0.05), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(107, 143, 212, 0.04), transparent 60%);
}

.wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 24px;
}
.brand { display: flex; align-items: center; gap: 14px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 44px; height: 44px; flex: 0 0 44px; color: var(--text-muted); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.brand-sub {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color .2s, color .2s, background .2s;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-alt); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- Main ---------- */
.main { padding: 28px 24px 80px; }

/* Stats */
.stats {
  display: flex; gap: 28px; flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* Search */
.search-bar {
  margin-bottom: 18px;
}
.search-by-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.search-by-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.search-by-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.search-by-option input[type="radio"] {
  cursor: pointer;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}
.search-input-row {
  position: relative;
}
.search-input-row input {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  padding: 16px 44px 16px 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input-row input::placeholder { color: var(--text-faint); }
.search-input-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--text-faint); pointer-events: none;
}
.clear-search {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; font-size: 20px; line-height: 1;
  background: transparent; border: none; color: var(--text-faint); border-radius: 50%;
  display: none;
}
.clear-search:hover { background: var(--surface-alt); color: var(--text); }
.clear-search.visible { display: grid; place-items: center; }

/* Line tabs */
.line-tabs {
  display: flex; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.line-tab {
  flex: 1; min-width: max-content;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 10px;
  transition: background .2s, color .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.line-tab:hover { background: var(--surface-alt); color: var(--text); }
.line-tab.active {
  background: var(--text);
  color: var(--bg);
}
.line-tab.active .count { color: var(--bg); opacity: 0.7; }
.line-tab .count {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  background: transparent;
}

/* Filters */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-group { }
.filter-group > summary {
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--text);
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::before {
  content: "›";
  display: inline-block;
  transition: transform .2s;
  color: var(--text-muted);
  font-size: 1.1em;
}
.filter-group[open] > summary::before { transform: rotate(90deg); }

.filter-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px 20px;
  margin-top: 10px;
}
.filter-row {
  display: flex; flex-direction: column; gap: 6px;
}
.filter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="dark"] .chip.active { color: var(--text); }

.clear-all {
  align-self: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  transition: color .15s, border-color .15s, background-color .15s, box-shadow .15s;
}
.clear-all:hover { color: var(--text); border-color: var(--border-strong); }
.clear-all:disabled { opacity: 0.4; cursor: default; }
.clear-all:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
[data-theme="dark"] .clear-all:not(:disabled) { color: var(--text); }
.clear-all:not(:disabled):hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  text-align: left;
  color: inherit;
  font: inherit;
  position: relative;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.card-head { display: flex; align-items: flex-start; gap: 14px; }

.swatch {
  width: 72px; height: 72px; flex: 0 0 72px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.08);
}
[data-theme="dark"] .swatch { border-color: rgba(255,255,255,0.12); }
.swatch-img {
  width: 100%; height: 100%;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}
.swatch.swatch-missing::before,
.modal-swatch.swatch-missing::before {
  content: "!";
  position: absolute; bottom: -1px; right: -1px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #e53e3e;
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid #fff;
  z-index: 3;
}
[data-theme="dark"] .swatch.swatch-missing::before,
[data-theme="dark"] .modal-swatch.swatch-missing::before { border-color: #1a1a2e; }
.modal-swatch.swatch-missing::before { width: 22px; height: 22px; font-size: 13px; bottom: -2px; right: -2px; }

.card-title-wrap { flex: 1; min-width: 0; }
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0 0 4px;
  word-break: break-word;
}
.card-ci {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.card-pigment {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.35;
}

.line-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.line-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.line-badge.line-Extra-Fine { background: var(--line-extra-soft); color: var(--line-extra); }
.line-badge.line-PrimaTek { background: var(--line-prima-soft); color: var(--line-prima); }
.line-badge.line-Luminescent {
  background: linear-gradient(100deg,#FFE0C4 0%, #D0E0FF 35%, #E4D0FF 65%, #FFD0E4 100%);
  color: #5A3A70;
}
[data-theme="dark"] .line-badge.line-Luminescent {
  background: linear-gradient(100deg,#4A3A28 0%, #2A3850 35%, #3A2A50 65%, #4A2838 100%);
  color: #E8D0E8;
}
.line-badge.sub {
  background: var(--surface-alt);
  color: var(--text-muted);
}

.series-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.prop-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.prop-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface-alt);
  display: inline-flex; align-items: center; gap: 5px;
}
.prop-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.prop-badge.lf-Excellent .dot { background: var(--success); }
.prop-badge.lf-Very-Good .dot { background: #7DA94F; }
.prop-badge.lf-Good .dot { background: var(--warning); }
.prop-badge.lf-Fugitive .dot { background: var(--error); }
.prop-badge.gran-Granulating { background: color-mix(in srgb, var(--warm-soft) 80%, var(--surface-alt)); color: var(--warm); border-color: color-mix(in srgb, var(--warm) 30%, var(--border)); }
.prop-badge.stain-Non-Staining { }
.prop-badge.stain-Medium-Staining .dot,
.prop-badge.stain-High-Staining .dot { background: var(--accent); }
.prop-badge.trans-Transparent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.74rem; color: var(--text-faint);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.card-foot .sizes { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.card-foot .size-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--text-muted);
}
.card-foot .sku { color: var(--text-faint); font-weight: 400; }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer p { margin: 0; max-width: 760px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 15, 8, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,0.7); }
.modal-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.3,1.2,.5,1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 24px; line-height: 1;
  display: grid; place-items: center;
  z-index: 2;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }

.modal-body { padding: 32px; }
.modal-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 22px; }
.modal-swatch {
  width: 220px; height: 220px; flex: 0 0 220px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.1);
  position: relative;
}
[data-theme="dark"] .modal-swatch { border-color: rgba(255,255,255,0.12); }

.modal-title-wrap { flex: 1; min-width: 0; }
.modal-title {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.modal-sub {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 0.85rem; color: var(--text-muted);
}

.modal-section { margin-top: 20px; }
.modal-section h3 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 8px;
}
.modal-pigments {
  display: flex; flex-direction: column; gap: 6px;
}
.modal-pigments li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  list-style: none;
}
.modal-pigments li span:last-child {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.prop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.prop-cell {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.prop-cell .prop-name {
  font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.prop-cell .prop-value {
  font-size: 0.95rem; color: var(--text); font-weight: 500;
  margin-top: 2px;
}

.modal-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-sizes .size-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
}

.line-note {
  background: var(--surface-alt);
  border-left: 3px solid var(--warm);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.line-note.lumi { border-left-color: #9070A0; }

.modal-actions {
  margin-top: 22px;
  display: flex; justify-content: flex-end;
}
.modal-actions a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; color: var(--accent);
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 500;
}
.modal-actions a:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent)); }

/* Responsive header */
@media (max-width: 560px) {
  .brand-title { font-size: 1.1rem; }
  .brand-sub { font-size: 0.72rem; }
  .brand-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .main { padding: 18px 14px 60px; }
  .wrap { padding: 0 14px; }
  .header-inner { padding: 14px; }
  .stats { gap: 18px; padding: 14px 16px; }
  .stat-value { font-size: 1.3rem; }
  .modal-body { padding: 22px; }
  .modal-head { flex-direction: column; align-items: flex-start; }
  .modal-swatch { width: 160px; height: 160px; flex-basis: 160px; }
  .modal-title { font-size: 1.5rem; }
  .prop-grid { grid-template-columns: 1fr; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .modal-panel { animation: none; }
}

/* Site top nav (duplicated from src/assets/styles.css so this page can show the nav without pulling in the full global stylesheet) */
.top-menu {
    position: relative;
    margin: 1.5rem auto 0;
    display: flex;
    gap: clamp(1rem, 4vw, 2.5rem);
    list-style: none;
    padding: 0 1rem;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    white-space: nowrap;
    justify-content: center;
    flex-wrap: wrap;
}

.top-menu a {
    text-decoration: none;
    color: black;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
    transition: transform 0.2s ease;
}

[data-theme="dark"] .top-menu a:not(.active) {
    color: var(--text);
}

.top-menu a:not(.active):hover {
    transform: translateY(-2px);
}

.top-menu a.active {
    border-bottom: 2px solid #5a7d9a;
    color: #5a7d9a;
    padding-bottom: 4px;
}

@media (max-width: 768px) {
    .top-menu {
        gap: 15px;
        margin-top: 1rem;
    }
}

/* ---------- CIELAB colour filters: swatch tiles ---------- */
.chips.swatches { gap: 8px; }
.swatch-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 6px 4px;
  min-width: 58px;
  cursor: pointer;
}
.swatch-tile::before {
  content: "";
  display: block;
  width: 100%;
  min-width: 46px;
  height: 26px;
  border-radius: 5px;
  background: var(--sw, var(--surface-alt));
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.swatch-tile > span {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--text-muted);
}
.swatch-tile:hover { border-color: var(--border-strong); }
.swatch-tile:hover > span { color: var(--text); }
.swatch-tile.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.swatch-tile.active > span { color: var(--accent); font-weight: 600; }
[data-theme="dark"] .swatch-tile.active > span { color: var(--text); }

/* ---------- Sort control ---------- */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.sort-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.sort-bar select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
}
.sort-bar select:hover { border-color: var(--border-strong); }

/* ---------- Modal CIELAB read-out ---------- */
.hue-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  margin-right: 6px;
  vertical-align: -1px;
}
.lab-note {
  margin-top: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-faint);
}
