
:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --primary:#111827;
  --shadow:0 12px 30px rgba(15,23,42,.06);
  --radius:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,#f8fafc 0%,#f5f7fb 100%);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.container{max-width:1180px;margin:0 auto;padding:0 18px}
.site-header{
  position:sticky;top:0;z-index:40;
  background:rgba(245,247,251,.88);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(226,232,240,.9);
}
.nav{display:flex;align-items:center;justify-content:space-between;min-height:68px}
.brand{font-weight:800;letter-spacing:-.02em;font-size:20px}
.nav-links{display:flex;gap:16px;color:var(--muted);font-size:14px}
.nav-links a:hover{color:var(--text)}
.hero{padding:46px 0 24px}
.hero-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:20px;align-items:center}
.eyebrow{
  margin:0 0 10px;color:#b45309;font-weight:700;font-size:12px;letter-spacing:.08em;text-transform:uppercase
}
h1{
  margin:0 0 14px;
  font-size:clamp(34px,6vw,56px);
  line-height:1.02;
  letter-spacing:-.04em;
}
.hero-copy{
  margin:0 0 20px;
  color:var(--muted);
  font-size:17px;
  line-height:1.6;
  max-width:720px;
}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.hero-meta{margin-top:12px;color:var(--muted);font-size:14px}
.hero-card,.app-shell{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.hero-card{padding:22px}
.hero-preview-swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:16px}
.hero-preview-swatches span{display:block;height:70px;border-radius:14px;border:1px solid rgba(15,23,42,.05)}
.hero-card-title{margin:0 0 8px;font-size:18px;font-weight:800}
.hero-list{margin:0;padding-left:18px;color:var(--muted);display:grid;gap:8px}
.section{padding:8px 0 40px}
.app-shell{padding:24px}
.section-title{margin:0 0 8px;font-size:26px;font-weight:800;letter-spacing:-.03em}
.section-copy{margin:0 0 16px;color:var(--muted);font-size:14px;line-height:1.5}
.grid{display:grid;gap:12px}
.form-grid{grid-template-columns:1fr 1fr}
.filters-grid{grid-template-columns:1fr 1fr 1fr}
.create-grid{display:grid;grid-template-columns:1.2fr .95fr .85fr auto;gap:12px;align-items:end}
label{display:block;margin-bottom:6px;font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.08em}
input,select,button{
  width:100%;
  min-height:48px;
  border-radius:14px;
  font:inherit;
  font-size:16px;
}
input,select{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  padding:12px 14px;
}
input:focus,select:focus{outline:2px solid rgba(59,130,246,.15);border-color:#cbd5e1}
.btn{
  border:0;
  cursor:pointer;
  font-weight:700;
  padding:12px 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-secondary{background:#eef2f7;color:var(--text)}
.toolbar{margin:14px 0}
.preview{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:14px;
  align-items:center;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
}
.swatch,.color-chip.large{
  width:64px;height:64px;border-radius:14px;border:1px solid rgba(15,23,42,.08)
}
.preview-title{font-weight:800}
.sub{color:var(--muted);font-size:12px;line-height:1.45}
.error{
  display:none;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#b42318;
  border-radius:14px;
}
.results,.palette-strip{display:grid;gap:14px;margin-top:16px}
.result-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
}
.result-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px;
  border-bottom:1px solid var(--border);
  background:#fcfdff;
}
.result-color{display:flex;align-items:center;gap:12px;min-width:0}
.color-chip{display:inline-block;width:18px;height:18px;border-radius:6px;border:1px solid rgba(15,23,42,.08);flex:0 0 auto}
.color-chip.large{width:72px;height:52px;border-radius:12px}
.hex{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:800;font-size:14px}
.tone-badge{
  min-width:52px;
  text-align:center;
  padding:8px 10px;
  border-radius:999px;
  background:#eef2f7;
  font-size:13px;
  font-weight:800;
}
.tone-badge.subtle{min-width:auto;font-weight:700}
.match-stack{display:grid;gap:10px;padding:12px}
.match-card{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:#fff;
}
.match-main{display:flex;gap:10px;align-items:flex-start;min-width:0}
.match-line{font-size:14px;line-height:1.4}
.match-side{display:grid;gap:8px;justify-items:end;flex:0 0 auto}
.delta{font-size:12px;color:var(--muted)}
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  font-weight:700;
  background:#f1f5f9;
}
.section-divider{height:1px;background:var(--border);margin:24px 0}
.suggest-wrap,.dropdown-wrap,.create-dropdown-wrap{position:relative}
.suggest-box,.dropdown-panel,.create-dropdown-panel{
  display:none;
  position:absolute;
  z-index:50;
  left:0;right:0;top:calc(100% + 6px);
  padding:8px;
  max-height:280px;
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:0 14px 30px rgba(15,23,42,.12);
}
.suggest-box.show,.dropdown-panel.open,.create-dropdown-panel.open{display:block}
.suggest-item,.dropdown-option,.create-dropdown-option{
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
}
.dropdown-option,.create-dropdown-option{display:flex;align-items:center;gap:10px}
.suggest-item:hover,.suggest-item.active,.dropdown-option:hover,.create-dropdown-option:hover{background:#f8fafc}
.suggest-main{font-size:14px}
.suggest-subline{margin-top:2px;color:var(--muted);font-size:12px}
.dropdown-trigger,.create-dropdown-trigger{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  text-align:left;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.dropdown-trigger::after,.create-dropdown-trigger::after{content:'▾';color:var(--muted);font-size:14px}
.dropdown-label,.create-dropdown-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dropdown-option input[type="checkbox"],.create-dropdown-option input[type="checkbox"]{
  width:16px;height:16px;min-height:16px;margin:0;accent-color:#111827
}
.hidden-select{display:none !important}
.site-footer{padding:28px 0 40px;color:var(--muted)}
.footer-grid{
  display:flex;justify-content:space-between;gap:20px;align-items:flex-start;
  border-top:1px solid var(--border);padding-top:20px
}
.footer-copy{margin:6px 0 0;font-size:14px}
.footer-links{display:flex;gap:14px}
.footer-links a:hover{color:var(--text)}
.stat-pill{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--border);background:#fff;border-radius:999px;
  padding:7px 12px;font-size:13px;color:var(--muted)
}
.db-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
@media (max-width: 980px){
  .hero-grid,.filters-grid,.create-grid{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .nav-links{display:none}
  .app-shell{padding:18px}
  .hero{padding:28px 0 18px}
}
@media (max-width: 640px){
  .container{padding:0 12px}
  .hero-card{padding:16px}
  .hero-preview-swatches span{height:54px}
  .preview{grid-template-columns:52px 1fr;padding:12px}
  .swatch,.color-chip.large{width:52px;height:52px}
  .result-head{flex-direction:column;align-items:flex-start}
  .tone-badge{min-width:auto}
  .match-card{flex-direction:column;align-items:flex-start}
  .match-side{justify-items:start}
  .dropdown-trigger,.create-dropdown-trigger,input,select,button{min-height:46px}
}
