:root {
  --lav-50: #faf7fd;
  --lav-100: #f3edfa;
  --lav-200: #e8ddf5;
  --lav-300: #d8c5ee;
  --lav-400: #c1a9e3;
  --lav-500: #a78bd6;
  --lav-600: #7c5cad;
  --lav-700: #5f468c;
  --lav-800: #47356b;
  --ink: #2b2438;
  --ink-soft: #5a5268;
  --ink-faint: #8b8399;
  --card: #ffffff;
  --border: #e9e1f4;
  /* Product colours (match the Soaps / Creams image backgrounds) */
  --soap-bg: #ecd8c7;
  --soap-border: #d9b894;
  --soap-ink: #6b4f2e;
  --soap-tint: #f6ece0;
  --cream-bg: #dae7dc;
  --cream-border: #a9c4ad;
  --cream-ink: #3d5a41;
  --cream-tint: #eaf3ec;
  --shadow: 0 10px 30px rgba(95, 70, 140, 0.08);
  --shadow-lg: 0 20px 50px rgba(95, 70, 140, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, #f0e6fa 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, #f7f0fb 0%, transparent 55%),
    var(--lav-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lav-600); text-decoration: none; }
a:hover { color: var(--lav-700); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(250, 247, 253, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lav-200), var(--lav-100));
  border: 1px solid var(--lav-300);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-name em { font-style: normal; color: var(--lav-600); font-size: 0.9rem; display: block; font-weight: 500; }
.site-nav { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.site-nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { background: var(--lav-100); color: var(--ink); }
.nav-pill {
  background: var(--lav-600) !important;
  color: #fff !important;
}
.nav-pill:hover { background: var(--lav-700) !important; }

.site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* Flash */
.flash-stack { position: fixed; top: 80px; right: 20px; z-index: 50; display: grid; gap: 0.5rem; }
.flash {
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  max-width: 320px;
  border-left: 4px solid var(--lav-400);
}
.flash-error { border-left-color: #d96a6a; background: #fdf3f3; }
.flash-info { border-left-color: var(--lav-500); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 1rem;
}
.hero-copy .eyebrow {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--lav-100);
  border: 1px solid var(--lav-300);
  color: var(--lav-700);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-copy p.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 1rem 0 1.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary {
  background: var(--lav-600);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 92, 173, 0.35);
}
.btn-primary:hover { background: var(--lav-700); transform: translateY(-1px); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--lav-700);
  border: 1.5px solid var(--lav-400);
}
.btn-ghost:hover { background: var(--lav-100); color: var(--lav-700); }
.hero-art {
  display: grid;
  place-items: center;
}
.hero-art .art-card {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--lav-200) 0%, var(--lav-100) 55%, #fff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.hero-img {
  width: 88%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Activation gate */
.activate-wrap {
  max-width: 460px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.activate-card {
  padding: 2.5rem 2rem;
  text-align: center;
}
.activate-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lav-600);
  background: var(--lav-100);
  border: 1px solid var(--lav-300);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.activate-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 0.75rem;
}
.activate-lede {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
}
.activate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}
.activate-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.activate-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
.activate-form input:focus {
  outline: none;
  border-color: var(--lav-500);
  box-shadow: 0 0 0 3px var(--lav-100);
}
.btn-activate {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}
.activate-hint {
  margin: 1.5rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Product cards */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.product-card .swatch-img {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.product-card .swatch-img {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.product-card .swatch-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.product-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.product-card p { color: var(--ink-soft); font-size: 0.88rem; margin: 0; }
.swatch-soap { background: linear-gradient(135deg, #e8d9c4, #f4ece0); }
.swatch-cream { background: linear-gradient(135deg, #d9e8dc, #eef5f0); }

/* Sections */
.section { margin: 3.5rem 0; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.section-head .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--lav-300);
  line-height: 1;
}
.section-head h2 { margin: 0; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; max-width: 60ch; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }

/* Forms */
label { font-weight: 500; font-size: 0.9rem; color: var(--ink); display: block; margin-bottom: 0.35rem; }
.hint { color: var(--ink-faint); font-size: 0.8rem; margin-top: 0.25rem; }
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--lav-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--lav-50);
  color: var(--ink);
  transition: border-color 0.12s ease, background 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--lav-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(167, 139, 214, 0.15);
}
textarea { min-height: 90px; resize: vertical; }

.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Radio + checkbox pills */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.5rem; }
.choice-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--lav-300);
  border-radius: var(--radius-sm);
  background: var(--lav-50);
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.12s ease;
}
.choice-pill:hover { background: var(--lav-100); }
.choice-pill input { accent-color: var(--lav-600); }
.choice-pill.checked,
.choice-pill:has(input:checked) {
  border-color: var(--lav-600);
  background: var(--lav-200);
  color: var(--lav-800);
  font-weight: 600;
}
/* Product-coloured choice pills (Section 1) */
.choice-pill.choice-soap {
  background: var(--soap-tint);
  border-color: var(--soap-border);
  color: var(--soap-ink);
}
.choice-pill.choice-soap:hover { background: #f0e2d2; }
.choice-pill.choice-soap input { accent-color: var(--soap-ink); }
.choice-pill.choice-soap.checked,
.choice-pill.choice-soap:has(input:checked) {
  background: var(--soap-bg);
  border-color: var(--soap-ink);
  color: var(--soap-ink);
  font-weight: 600;
}
.choice-pill.choice-cream {
  background: var(--cream-tint);
  border-color: var(--cream-border);
  color: var(--cream-ink);
}
.choice-pill.choice-cream:hover { background: #e1eee4; }
.choice-pill.choice-cream input { accent-color: var(--cream-ink); }
.choice-pill.choice-cream.checked,
.choice-pill.choice-cream:has(input:checked) {
  background: var(--cream-bg);
  border-color: var(--cream-ink);
  color: var(--cream-ink);
  font-weight: 600;
}
/* Product-tinted text inputs */
input.input-soap,
textarea.input-soap { background: var(--soap-tint); border-color: var(--soap-border); }
input.input-soap:focus { border-color: var(--soap-ink); box-shadow: 0 0 0 3px rgba(107, 79, 46, 0.12); }
input.input-cream,
textarea.input-cream { background: var(--cream-tint); border-color: var(--cream-border); }
input.input-cream:focus { border-color: var(--cream-ink); box-shadow: 0 0 0 3px rgba(61, 90, 65, 0.12); }

/* Likert */
.likert-title {
  width: 100%;
  margin: 1.5rem 0 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid transparent;
}
.likert-title-soap {
  background: var(--soap-bg);
  border-color: var(--soap-border);
  color: var(--soap-ink);
}
.likert-title-cream {
  background: var(--cream-bg);
  border-color: var(--cream-border);
  color: var(--cream-ink);
}
.likert-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--border);
}
.likert-row:last-child { border-bottom: none; }
.likert-row .label { font-weight: 600; font-size: 0.92rem; }
.likert-row .label small { display: block; color: var(--ink-faint); font-weight: 400; font-size: 0.75rem; }
.likert-row .label small:only-child { color: var(--ink-faint); }
.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}
.likert-scale label {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.5rem 0.4rem;
  margin: 0;
  border: 1.5px solid var(--lav-300);
  border-radius: var(--radius-sm);
  background: var(--lav-50);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--ink-soft);
  transition: all 0.12s ease;
}
.likert-scale label:hover { background: var(--lav-100); }
.likert-scale label.checked,
.likert-scale label:has(input:checked) {
  border-color: var(--lav-600);
  background: var(--lav-200);
  color: var(--lav-800);
  font-weight: 700;
}
/* Per-product colours for the Likert boxes */
.likert-scale label.likert-soap {
  background: var(--soap-tint);
  border-color: var(--soap-border);
  color: var(--soap-ink);
}
.likert-scale label.likert-soap:hover { background: #f0e2d2; }
.likert-scale label.likert-soap.checked,
.likert-scale label.likert-soap:has(input:checked) {
  background: var(--soap-bg);
  border-color: var(--soap-ink);
  color: var(--soap-ink);
  font-weight: 700;
}
.likert-scale label.likert-cream {
  background: var(--cream-tint);
  border-color: var(--cream-border);
  color: var(--cream-ink);
}
.likert-scale label.likert-cream:hover { background: #e1eee4; }
.likert-scale label.likert-cream.checked,
.likert-scale label.likert-cream:has(input:checked) {
  background: var(--cream-bg);
  border-color: var(--cream-ink);
  color: var(--cream-ink);
  font-weight: 700;
}
.likert-scale input { position: absolute; opacity: 0; pointer-events: none; }

/* Blend key (numbered cards) */
.blend-key {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.blend-chip {
  aspect-ratio: auto;
  padding: 1.5rem 0;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1.5px solid var(--lav-300);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--lav-600);
  box-shadow: var(--shadow);
}
.blend-chip .sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
/* Product-coloured recipe chips (admin recipes page) */
.blend-chip.recipe-chip-soap {
  background: var(--soap-tint);
  border-color: var(--soap-border);
  color: var(--soap-ink);
}
.blend-chip.recipe-chip-soap .sub { color: var(--soap-ink); opacity: 0.7; }
.blend-chip.recipe-chip-cream {
  background: var(--cream-tint);
  border-color: var(--cream-border);
  color: var(--cream-ink);
}
.blend-chip.recipe-chip-cream .sub { color: var(--cream-ink); opacity: 0.7; }
/* Row layout: image on the left, number + label on the right */
.blend-chip.recipe-chip-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.recipe-chip-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}
.recipe-chip-text {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 600;
}
/* Save button: not full-width, centered in card */
.recipe-save-btn {
  width: 60%;
  margin: 0 auto;
  justify-content: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* Survey sections */
.survey-section { margin: 2rem 0; }
.survey-section > h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}
.survey-section > h2 .chip {
  background: var(--lav-100);
  border: 1px solid var(--lav-300);
  color: var(--lav-700);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* Login */
.auth-card {
  max-width: 420px;
  margin: 3rem auto;
}
.auth-card .card { padding: 2rem; }
.auth-title { text-align: center; margin-bottom: 0.25rem; }
.auth-sub { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Stats */
.stats-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.stat-card .n {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--lav-700);
  line-height: 1;
}
.stat-card .l { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.35rem; }

.stat-block { margin: 2rem 0; }
.stat-block h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }

.dist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.dist-table th, .dist-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.dist-table th:first-child, .dist-table td:first-child { text-align: left; font-weight: 600; }
.dist-table th { color: var(--ink-faint); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.dist-bar {
  display: inline-block;
  height: 8px;
  border-radius: 999px;
  background: var(--lav-400);
  vertical-align: middle;
  margin-right: 0.4rem;
}
.dist-bar-soap { background: var(--soap-border); }
.dist-bar-cream { background: var(--cream-border); }

/* Bar + value cells: bar on its own line (capped to the column), number below — never overflows */
td.cell-bar { vertical-align: top; padding-top: 0.4rem; }
td.cell-bar .dist-bar { display: block; width: auto; max-width: 100%; margin-bottom: 0.3rem; }
td.cell-bar .cell-val { display: block; }

/* ---- Dashboard product colours ---- */
.stat-card-soap { background: var(--card); border-color: var(--soap-border); }
.stat-card-soap .n { color: var(--soap-ink); }
.stat-card-soap .l { color: var(--soap-ink); }
.stat-card-cream { background: var(--card); border-color: var(--cream-border); }
.stat-card-cream .n { color: var(--cream-ink); }
.stat-card-cream .l { color: var(--cream-ink); }

.stat-card-soap-block { background: var(--soap-tint); border-color: var(--soap-border); }
.stat-card-cream-block { background: var(--cream-tint); border-color: var(--cream-border); }

/* White rating cards with a tinted title bar */
.stat-card-white { background: var(--card); }
.rating-card { background: var(--card); padding: 0; overflow: hidden; }
.rating-card-soap { border-color: var(--soap-border); }
.rating-card-cream { border-color: var(--cream-border); }
.product-title-bar {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
  padding: 0.7rem 1.25rem;
}
.product-title-bar-soap { background: var(--soap-tint); color: var(--soap-ink); }
.product-title-bar-cream { background: var(--cream-tint); color: var(--cream-ink); }
.rating-card .dist-table { margin: 0; }
.rating-card .dist-table th, .rating-card .dist-table td { padding-left: 1.25rem; }
.rating-card .dist-table th:first-child, .rating-card .dist-table td:first-child { padding-left: 1.25rem; }
.soap-heading { color: var(--soap-ink); }
.cream-heading { color: var(--cream-ink); }
.dist-table-soap th { color: var(--soap-ink); }
.dist-table-cream th { color: var(--cream-ink); }

.fav-col-soap { color: var(--soap-ink); }
.fav-col-cream { color: var(--cream-ink); }
.fav-col-soap-wrap { border-left: 3px solid var(--soap-border); padding-left: 0.9rem; }
.fav-col-cream-wrap { border-left: 3px solid var(--cream-border); padding-left: 0.9rem; }

/* Attribute rows (what people like / turned off): label + capped bar + value, always one line */
.attr-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; }
.attr-label { width: 180px; flex: 0 0 180px; font-size: 0.88rem; }
.attr-bar-wrap { flex: 1 1 auto; min-width: 0; display: flex; }
.attr-bar-wrap .dist-bar { flex: 0 0 auto; max-width: 100%; }
.attr-val { flex: 0 0 auto; font-size: 0.8rem; color: var(--ink-faint); }

.recipe-card-soap { background: var(--soap-tint); border-color: var(--soap-border); }
.recipe-card-soap h3 { color: var(--soap-ink); }
.recipe-card-cream { background: var(--cream-tint); border-color: var(--cream-border); }
.recipe-card-cream h3 { color: var(--cream-ink); }

.open-card-soap { background: var(--card); border-color: var(--soap-border); }
.open-card-soap h3 { color: var(--soap-ink); }
.open-card-cream { background: var(--card); border-color: var(--cream-border); }
.open-card-cream h3 { color: var(--cream-ink); }

/* Product-word emphasis: bold + assigned colour */
.soap-word { color: var(--soap-ink); font-weight: 700; }
.cream-word { color: var(--cream-ink); font-weight: 700; }

.yesno {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.yesno .bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}
.yesno .bar .tag { font-weight: 700; font-size: 0.85rem; }
.yesno .bar .pct { color: var(--ink-soft); font-size: 0.8rem; }
.yesno .bar .track {
  flex: 1;
  height: 10px;
  background: var(--lav-100);
  border-radius: 999px;
  overflow: hidden;
}
.yesno .bar .fill { height: 100%; background: var(--lav-500); border-radius: 999px; }
.yesno .bar.yes .fill { background: var(--lav-600); }
.yesno .bar.no .fill { background: var(--ink-faint); }

.open-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.open-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}
.open-list li .meta { font-size: 0.75rem; color: var(--ink-faint); margin-bottom: 0.2rem; }
.open-list li .txt { font-size: 0.92rem; color: var(--ink); }

.empty-note { color: var(--ink-faint); font-style: italic; font-size: 0.9rem; }

/* Source tags + delete */
.source-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.source-online { background: var(--lav-100); color: var(--lav-700); border: 1px solid var(--lav-300); }
.source-manual { background: #eef1f6; color: #4a5568; border: 1px solid #d5dce6; }
.del-btn {
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  transition: all 0.12s ease;
}
.del-btn:hover { background: #fdecec; color: #b34040; }
.edit-btn {
  display: inline-block;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.25rem;
  transition: all 0.12s ease;
}
.edit-btn:hover { background: var(--lav-100); color: var(--lav-700); }

/* Recipe preformatted text */
.recipe-pre {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--lav-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
}

/* Thank you */
.thanks-card {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
  padding: 3rem 2rem;
}
.thanks-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--lav-100);
  border: 1px solid var(--lav-300);
  display: grid;
  place-items: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--lav-100);
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-brand { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.footer-login {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--lav-600);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--lav-300);
  transition: all 0.12s ease;
}
.footer-login:hover { background: var(--lav-100); color: var(--lav-700); }
.footer-admin a { margin-left: 1rem; }

/* Ingredients */
.ing-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ing-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.ing-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.ing-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lav-500);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .products { grid-template-columns: 1fr 1fr; }
  .blend-key { grid-template-columns: repeat(3, 1fr); }
  .stats-hero { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .ing-cols { grid-template-columns: 1fr; }
}

/* Mobile: Likert rows must fit a phone screen */
@media (max-width: 640px) {
  .likert-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: start;
  }
  .likert-row .label {
    margin-bottom: 0;
  }
  .likert-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }
  .likert-scale label {
    padding: 0.45rem 0.2rem;
    font-size: 0.72rem;
    line-height: 1.15;
  }
  .likert-scale label span {
    font-size: 0.58rem !important;
    word-break: break-word;
  }
}

@media (max-width: 640px) {
  .site-main { padding: 1.25rem 1rem 3rem; }

  /* Tables that are wider than the screen get horizontal scroll */
  .card:has(table.dist-table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rating-card { overflow-x: auto; }

  /* Keep the mini bars + value on one line, capped so they fit */
  .dist-bar { max-width: 34px; margin-right: 0.3rem; }
  .fav-col-soap-wrap .dist-bar,
  .fav-col-cream-wrap .dist-bar,
  .open-card .dist-bar { max-width: 42px; }

  /* "What people like / turned off" rows: cap the bar, reserve space for the value */
  .attr-label { flex: 1 1 auto; width: auto; min-width: 0; }
  .attr-bar-wrap { flex: 0 0 34%; }
  .attr-bar-wrap .dist-bar { max-width: 100%; }

  /* Recent responses: email truncates, columns stay visible */
  .stat-block table td:nth-child(2) { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 420px) {
  .likert-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
  }
  .likert-scale label {
    padding: 0.4rem 0.15rem;
    font-size: 0.68rem;
  }
  .likert-scale label span {
    font-size: 0.55rem !important;
  }
}
