@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/IBMPlexSans-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/IBMPlexSans-Italic-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --paper: #F4F1EA;
  --surface: #FFFCF8;
  --surface-2: #F7F3EC;
  --ink: #1C2A26;
  --muted: #5A655F;
  --line: #E2DDD3;
  --line-strong: #D3CDC2;
  --primary: #2C6A56;
  --primary-hover: #245748;
  --primary-soft: #E4F0EA;
  --primary-text: #FFFFFF;
  --accent: #C4A36A;
  --focus: #2C6A56;
  --shadow: 0 1px 2px rgba(28, 42, 38, 0.06), 0 8px 24px rgba(28, 42, 38, 0.05);
  --sidebar: 256px;
  --radius: 8px;
  --radius-lg: 12px;
  --status-ok-bg: #E4F0EA;
  --status-ok-fg: #1E5C48;
  --status-check-bg: #F8EEDC;
  --status-check-fg: #8A5A12;
  --status-link-bg: #F3E4DC;
  --status-link-fg: #8B3F2A;
  --status-disc-bg: #F5E1E0;
  --status-disc-fg: #8B2E2E;
  --status-sup-bg: #F3EAD0;
  --status-sup-fg: #6E5A16;
  --status-out-bg: #EEEBE6;
  --status-out-fg: #5A655F;
  --status-newm-bg: #D9E4F2;
  --status-newm-fg: #1E3A5F;
  --status-newp-bg: #E3F0D8;
  --status-newp-fg: #2A4A1E;
  --status-news-bg: #F6E4EF;
  --status-news-fg: #6B2A52;
  --status-upd-bg: #F8E6C8;
  --status-upd-fg: #7A4E00;
  --m-us-bg: #E6ECF4;
  --m-us-fg: #2B4C7E;
  --m-au-bg: #E4F0EA;
  --m-au-fg: #1E5C48;
  --m-uk-bg: #E8EAF2;
  --m-uk-fg: #2C3A5A;
  --m-ca-bg: #F3E6E6;
  --m-ca-fg: #8B3A3A;
  --danger: #8B2E2E;
  --danger-soft: #F5E1E0;
  --valid-bg: #F8EEE8;
  --valid-fg: #8B3F2A;
  --success-bg: #E4F0EA;
  --success-fg: #1E5C48;
  --info-bg: #EEF3F1;
  --warn-bg: #F8EEDC;
  --warn-fg: #8A5A12;
}

.theme-dark {
  --paper: #121A17;
  --surface: #1B2622;
  --surface-2: #16201C;
  --ink: #EDE8DF;
  --muted: #A8B0AB;
  --line: #2C3833;
  --line-strong: #3A4842;
  --primary: #7FB8A3;
  --primary-hover: #95C6B4;
  --primary-soft: #243832;
  --primary-text: #121A17;
  --accent: #D4B57A;
  --focus: #7FB8A3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --status-ok-bg: #1E3D32;
  --status-ok-fg: #9ED4C0;
  --status-check-bg: #3D3118;
  --status-check-fg: #E8C684;
  --status-link-bg: #3A241C;
  --status-link-fg: #E0A08E;
  --status-disc-bg: #3A1E1E;
  --status-disc-fg: #E39A9A;
  --status-sup-bg: #3A3318;
  --status-sup-fg: #DCC88A;
  --status-out-bg: #2A302D;
  --status-out-fg: #A8B0AB;
  --status-newm-bg: #1C2C42;
  --status-newm-fg: #A8C4E6;
  --status-newp-bg: #24351C;
  --status-newp-fg: #B5D49A;
  --status-news-bg: #3A2432;
  --status-news-fg: #E0B0CC;
  --status-upd-bg: #3A2C14;
  --status-upd-fg: #E8C07A;
  --m-us-bg: #1C2C42;
  --m-us-fg: #A8C4E6;
  --m-au-bg: #1E3D32;
  --m-au-fg: #9ED4C0;
  --m-uk-bg: #242A3C;
  --m-uk-fg: #B4B8D0;
  --m-ca-bg: #3A1E1E;
  --m-ca-fg: #E0A0A0;
  --danger: #E39A9A;
  --danger-soft: #3A1E1E;
  --valid-bg: #3A241C;
  --valid-fg: #E0A08E;
  --success-bg: #1E3D32;
  --success-fg: #9ED4C0;
  --info-bg: #1A2622;
  --warn-bg: #3D3118;
  --warn-fg: #E8C684;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: default; }

/* ===== App shell ===== */
.app {
  display: flex;
  width: 1440px;
  min-height: var(--shot-h, 1100px);
  background: var(--paper);
  color: var(--ink);
}
.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 32px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  display: block;
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 450;
}
.nav a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.side-block h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.work-market {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.progress-row { margin-bottom: 10px; }
.progress-row .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.progress-row .meta strong { color: var(--ink); font-weight: 600; }
.bar {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}
.unsaved {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.4;
}
.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}
.appearance {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
.appearance span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 550;
  padding: 5px 0;
  border-radius: 99px;
  color: var(--muted);
}
.appearance span.is-on {
  background: var(--primary);
  color: var(--primary-text);
}
.signed {
  font-size: 12px;
  color: var(--muted);
}
.signed .email { color: var(--ink); display: block; font-weight: 500; margin-bottom: 6px; word-break: break-all; }
.linkish {
  color: var(--primary);
  font-weight: 550;
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
}

/* ===== Stepper / guidance ===== */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 22px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.step .num {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex: 0 0 28px;
  background: var(--surface);
}
.step.is-done .num {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.step.is-now .num {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.step .label {
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  padding-top: 5px;
  line-height: 1.25;
}
.step.is-now .label { color: var(--ink); font-weight: 650; }
.step.is-done .label { color: var(--ink); }
.step-join {
  flex: 0 0 28px;
  height: 1.5px;
  background: var(--line-strong);
  margin: 13px 6px 0;
}
.step.is-done + .step-join,
.step-join.done { background: var(--primary); opacity: 0.55; }

.page-head { margin-bottom: 18px; }
.page-head h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.what {
  background: var(--primary-soft);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.45;
}
.what strong { font-weight: 650; }
.what .label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2px;
}
.theme-dark .what .label { color: var(--primary); }

.teach {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.teach h2 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 12px;
}
.teach ol { list-style: none; display: grid; gap: 10px; }
.teach li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.teach .tnum {
  width: 22px; height: 22px; border-radius: 99px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 12px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 22px; margin-top: 1px;
}
.teach li span b { font-weight: 650; }
.teach li span .hint { color: var(--muted); }

/* ===== Controls ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); height: auto; padding: 6px 0; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.field .hint, .hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; font-weight: 400; }
.input, .select, .textarea, input[type="search"], input[type="text"] {
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.textarea, textarea {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  resize: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.input:focus, .select:focus, input:focus, textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}
.input.is-invalid, input.is-invalid, textarea.is-invalid {
  border-color: var(--status-link-fg);
  background: color-mix(in srgb, var(--valid-bg) 50%, var(--surface));
}
.valid {
  background: var(--valid-bg);
  color: var(--valid-fg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.4;
}
.ok-note {
  background: var(--success-bg);
  color: var(--success-fg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--status-out-bg);
  color: var(--status-out-fg);
}
.pill-ok { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.pill-iherb { background: var(--warn-bg); color: var(--warn-fg); }
.pill-unchecked { background: var(--surface-2); color: var(--muted); }
.pill-check { background: var(--status-check-bg); color: var(--status-check-fg); }
.pill-link { background: var(--status-link-bg); color: var(--status-link-fg); }
.pill-disc { background: var(--status-disc-bg); color: var(--status-disc-fg); }
.pill-sup { background: var(--status-sup-bg); color: var(--status-sup-fg); }
.pill-out { background: var(--status-out-bg); color: var(--status-out-fg); }
.pill-newm { background: var(--status-newm-bg); color: var(--status-newm-fg); }
.pill-newp { background: var(--status-newp-bg); color: var(--status-newp-fg); }
.pill-news { background: var(--status-news-bg); color: var(--status-news-fg); }
.pill-upd { background: var(--status-upd-bg); color: var(--status-upd-fg); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.chip .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.chip-us { background: var(--m-us-bg); color: var(--m-us-fg); }
.chip-au { background: var(--m-au-bg); color: var(--m-au-fg); }
.chip-uk { background: var(--m-uk-bg); color: var(--m-uk-fg); }
.chip-ca { background: var(--m-ca-bg); color: var(--m-ca-fg); }
.chip-on { box-shadow: inset 0 0 0 1.5px currentColor; }

/* ===== Lists / tables ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.panel-pad { padding: 16px 18px; }
.panel h2 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.split { display: grid; gap: 20px; align-items: start; }
.split-2 { grid-template-columns: 280px 1fr; }
.split-makers { grid-template-columns: 300px 1fr; }

.maker-list { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.maker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  width: 100%;
  flex: 0 0 auto;
  cursor: pointer;
}
.maker-item:hover { background: var(--primary-soft); }
.maker-item:last-child { border-bottom: 0; }
.maker-item.is-selected { background: var(--primary-soft); }
.maker-item .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.maker-item .name { font-weight: 550; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tr.is-selected td { background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line); }
.table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--primary), inset 0 -1px 0 var(--line); }
.table tr.is-hoverable:hover td { background: var(--surface-2); }
.prod-name { font-weight: 600; }
.prod-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.markets-cell { display: flex; flex-wrap: wrap; gap: 4px; }

.empty {
  padding: 28px 24px;
  text-align: left;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.empty h3 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 52ch; }

.banner {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.45;
}
.banner-success { background: var(--success-bg); color: var(--success-fg); }
.banner-warn { background: var(--warn-bg); color: var(--warn-fg); }
.banner-info { background: var(--info-bg); border: 1px solid var(--line); }
.banner strong { font-weight: 650; }
.banner .next { margin-top: 4px; }

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.action-bar .note { font-size: 13px; color: var(--muted); max-width: 52ch; }
.action-bar .actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.market-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.market-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.market-card.is-focus { box-shadow: inset 0 0 0 1.5px var(--primary); }
.market-card.is-invalid { box-shadow: inset 0 0 0 1.5px var(--status-link-fg); }
.market-card h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.section { margin-top: 22px; }
.section-title {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
}
.section-rule { font-size: 13px; color: var(--muted); margin-bottom: 12px; max-width: 70ch; }

.preview-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.preview-box h2 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px;
}
.stat .n { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 550; margin-top: 2px; }

.supplier-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.supplier-card:last-child { border-bottom: 0; }
.supplier-card h3 { font-size: 15px; font-weight: 650; }
.supplier-card .url { font-size: 12.5px; color: var(--primary); margin-top: 2px; }
.supplier-card .meta { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.supplier-card .tags { margin-top: 4px; }
.supplier-card .found { margin-top: 2px; }
.found { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.search-row { display: flex; gap: 10px; align-items: end; }
.search-row .field { flex: 1; }

.back {
  font-size: 13px;
  color: var(--primary);
  font-weight: 550;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Brand sheet */
.sheet {
  width: 1440px;
  background: var(--paper);
  color: var(--ink);
  padding: 48px 56px 56px;
  font-family: var(--font);
}
.sheet-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.sheet-hero h1 { font-size: 36px; font-weight: 650; letter-spacing: -0.03em; }
.sheet-kicker { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 28px; }
.sheet h2 { font-size: 18px; font-weight: 650; margin: 28px 0 12px; letter-spacing: -0.02em; }
.sheet-lead { font-size: 16px; color: var(--muted); max-width: 72ch; margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 132px; }
.swatch .chip-color {
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.swatch .hex { font-size: 11px; color: var(--muted); font-weight: 500; }
.swatch .name { font-size: 13px; font-weight: 600; }
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.type-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.type-card .sample { font-size: 32px; font-weight: 650; letter-spacing: -0.03em; }
.type-card .meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.space-row { display: flex; align-items: end; gap: 16px; }
.space-box { background: var(--primary-soft); border-radius: 4px; }
.row-btns, .row-pills, .row-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sheet-table { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mark-set { display: flex; gap: 16px; align-items: end; }
.mark-set figure { text-align: center; }
.mark-set img, .mark-set svg { display: block; }
.mark-set figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.dark-well { background: #121A17; color: #EDE8DF; border-radius: 12px; padding: 20px; }
.dark-well h3 { font-size: 14px; font-weight: 650; margin-bottom: 12px; color: #EDE8DF; }

.contact {
  width: 2400px;
  background: #E8E4DB;
  color: #1C2A26;
  padding: 48px 48px 56px;
  font-family: var(--font);
}
.contact h1 { font-size: 32px; font-weight: 650; letter-spacing: -0.03em; }
.contact .sub { color: #5A655F; margin: 6px 0 28px; font-size: 16px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 22px; }
.contact-grid .span-3 { grid-column: 1 / -1; }
.contact-card figcaption {
  font-size: 13px;
  font-weight: 650;
  margin-top: 8px;
}
.contact-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(28,42,38,0.12);
  background: #fff;
}

input.input, .market-card .input {
  min-width: 0;
}
.market-card input.input {
  font-size: 13px;
}

/* ===== Path v2: market, suppliers, scan, export ===== */
.nav-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 6px 10px;
}
.nav.secondary a { color: var(--muted); }
.nav.secondary a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}
.step .label { max-width: 9.5em; }
.stepper { gap: 0; margin-bottom: 20px; }

.market-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.market-pick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 168px;
}
.market-pick h3 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.market-pick .meta { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.market-pick .btn { margin-top: auto; align-self: flex-start; }

.scan-plan { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.scan-plan .stat { background: var(--surface-2); border-radius: var(--radius); padding: 14px; }
.progress-lg { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
.progress-lg > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.scan-now {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.scan-now h2 { font-size: 18px; font-weight: 650; margin-bottom: 6px; }
.shop-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; padding: 0; list-style: none; }
.shop-list li { font-size: 13px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px; }

.diff-add td { background: var(--status-newp-bg); }
.diff-remove td { background: var(--status-disc-bg); }
.diff-change td { background: var(--status-upd-bg); }
.old { text-decoration: line-through; color: var(--muted); margin-right: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filter-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.filter-chip.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.sheet-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.sheet-tabs { display: flex; gap: 0; background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 0 8px; }
.sheet-tab {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.sheet-tab.is-on { color: var(--primary); border-bottom-color: var(--primary); background: var(--surface); }

.sheet-preview .table th:first-child, .sheet-preview .table td:first-child { padding-left: 8px; }
.col-order { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 12px; }
.col-order .col {
  font-size: 11.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink);
  line-height: 1.3;
}
.col-order .col b { font-weight: 650; color: var(--muted); margin-right: 4px; }
.sheet-preview .sheet-grid {
  table-layout: fixed;
  width: 100%;
  font-size: 10.5px;
}
.sheet-preview .sheet-grid th,
.sheet-preview .sheet-grid td {
  padding: 6px 5px;
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: top;
  line-height: 1.3;
}
.sheet-preview .sheet-grid th { font-size: 9.5px; letter-spacing: 0.02em; }


.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.check .box {
  width: 18px; height: 18px; border-radius: 4px; flex: 0 0 18px; margin-top: 2px;
  background: var(--primary); color: var(--primary-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.check .box.is-off { background: var(--surface); border: 1.5px solid var(--line-strong); color: transparent; }
.check .txt { font-size: 14px; }
.check .txt .hint { margin-top: 2px; }

.compare-pick { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.compare-pick .field { min-width: 260px; }

/* ===== Row detail (spreadsheet columns, grouped) ===== */
.opt-kicker {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
tr.is-open td { background: var(--primary-soft); }
.detail-wrap td {
  background: var(--surface-2);
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.detail {
  padding: 16px 18px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
}
.detail h4 {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail .kv { font-size: 13.5px; margin-bottom: 8px; line-height: 1.45; }
.detail .kv .k {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.detail .kv .v { color: var(--ink); }
.detail .span-2 { grid-column: 1 / -1; }
.toggle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: 0;
  padding: 0;
}
.long-label { font-weight: 600; font-size: 12.5px; line-height: 1.35; }


/* App shell fills the browser. The style mocks were a fixed 1440px frame. */
html, body { min-height: 100%; }
.app { width: 100%; min-height: 100vh; }
.sidebar { min-height: 100vh; position: sticky; top: 0; height: 100vh; overflow: auto; }
button, .btn, .nav a, .filter-chip, .toggle, .linkish { cursor: pointer; }
.sign-in {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.sign-in .card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.sign-in h1 { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; margin: 16px 0 8px; }
.sign-in p { color: var(--muted); margin-bottom: 20px; }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; height: auto; position: static; }
  .market-grid, .stat-row, .detail, .form-grid { grid-template-columns: 1fr; }
}

.sort-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sort-row .hint { margin: 0; }
.sort-pick { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sort-pick select { width: auto; padding: 4px 8px; font-size: 13px; }
.select-all { display: flex; align-items: center; gap: 6px; margin: 0 0 6px 14px; font-weight: 600; }

.split-makers + .section { margin-top: 24px; clear: both; }
.split-makers > .panel:last-child { max-height: 560px; }

.supplier-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
/* .link-remove styles are in the pass-2 patch below (outlined danger button). */

/* Searching animation */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 28px 0; } }
.spinner { display:inline-block; width:16px; height:16px; margin-right:8px; vertical-align:-2px; border:2px solid var(--line); border-top-color:var(--primary); border-radius:50%; animation:spin .8s linear infinite; }
.spinner-sm { width:11px; height:11px; border-width:2px; margin-right:6px; vertical-align:-1px; }
.progress-lg.is-live > span { min-width:8%; background-image:linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 75%, transparent 75%, transparent); background-size:28px 28px; animation:stripes .9s linear infinite; transition:width .4s ease; }
.busy-toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:50; display:flex; align-items:center; padding:10px 16px; border-radius:99px; background:var(--surface); color:var(--ink); border:1px solid var(--line); box-shadow:0 6px 24px rgba(0,0,0,.25); font-size:14px; }
.busy-toast[hidden] { display:none; }
@media (prefers-reduced-motion: reduce) { .spinner, .progress-lg.is-live > span { animation-duration: 2.4s; } }

/* Links readable in both themes */
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
a:visited { color: var(--primary); }
/* Dark-mode link hover is set in the pass-2 patch below. */

/* Probiotic Catalogue — pass-2 style patch
   Drop this in after public/styles.css (commit 91cf8d6).
   Uses existing tokens and class names. Safe to append.
   Helene-facing copy and markup notes are in RECOMMENDATIONS.md.
*/

/* ===== Availability pills: icon + text, never colour alone ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}
.pill-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
}
.pill-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Not checked yet: a hairline so the pill does not disappear on surface-2 */
.pill-unchecked {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Not found: warm terracotta, distinct from the grey “not checked” pill.
   Reuses the existing status-link tokens (AA in light and dark). */
.pill-miss {
  background: var(--status-link-bg);
  color: var(--status-link-fg);
}

.pill-cluster {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence-link {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--primary);
  text-underline-offset: 2px;
}

/* ===== Links: AA in both themes, with a visible hover in dark ===== */
a {
  color: var(--primary);
  text-underline-offset: 2px;
}
a:hover { color: var(--primary-hover); }
a:visited { color: var(--primary); }
.theme-dark a:not(.btn):not(.nav a) { color: var(--primary); }
.theme-dark a:not(.btn):not(.nav a):hover { color: var(--primary-hover); }
.theme-dark .evidence-link { color: var(--primary); }
.theme-dark .evidence-link:hover { color: var(--primary-hover); }
.supplier-card .url { color: var(--primary); }
.supplier-card .url a { color: inherit; }

/* ===== Remove: compact danger button, not a muted underline ===== */
.supplier-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn.link-remove,
button.link-remove {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
.btn.link-remove:hover,
button.link-remove:hover,
.btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.remove-confirm {
  grid-column: 1 / -1;
  background: var(--danger-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 4px;
}
.remove-confirm p {
  font-size: 13.5px;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--ink);
  max-width: 56ch;
}
.remove-confirm .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.supplier-card.is-confirming {
  background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface));
}

.banner .banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* ===== Suggestion groups: two clearly separate cards ===== */
.suggest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px 28px;
  align-items: start;
  grid-auto-rows: min-content;
  align-content: start;
  flex: 0 0 auto;
  margin-top: 8px;
}
.suggest-group {
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 16px 12px;
  min-width: 0;
  height: auto;
  align-self: start;
}
.suggest-group .section-title { margin-top: 0; }
.suggest-group .panel {
  box-shadow: none;
  border-radius: var(--radius);
}
.suggest-group-outlets {
  background: var(--surface-2);
}
.suggest-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.suggest-group .action-bar {
  margin-top: 12px;
  padding-top: 12px;
  justify-content: flex-start;
  height: auto;
}

/* ===== Searching: calm motion, none when reduced ===== */
.search-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  height: 16px;
  vertical-align: -2px;
}
.search-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--primary);
  animation: search-pulse 1.6s ease-in-out infinite;
}
.search-dots i:nth-child(2) { animation-delay: 0.2s; }
.search-dots i:nth-child(3) { animation-delay: 0.4s; }

.search-dots-sm { height: 11px; margin-right: 6px; }
.search-dots-sm i { width: 5px; height: 5px; }


@keyframes search-pulse {
  0%, 80%, 100% { opacity: 0.28; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* Existing .spinner markup still works, but spins more slowly */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1.8s linear infinite;
}
.spinner-sm {
  width: 11px;
  height: 11px;
  border-width: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}

/* Drop the marching stripes. The bar only grows; the dots carry “live”. */
.progress-lg.is-live > span {
  min-width: 8%;
  background: var(--primary);
  background-image: none;
  animation: none;
  transition: width 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .spinner-sm,
  .search-dots i,
  .progress-lg.is-live > span {
    animation: none !important;
    transition: none !important;
  }
  .spinner,
  .spinner-sm {
    border-color: var(--primary);
    border-top-color: var(--primary);
    opacity: 1;
  }
  .search-dots i {
    opacity: 1;
    transform: none;
  }
}


/* Action bars must not squash the note into a one-word column */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.action-bar .note {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 52ch;
}
.suggest-group .action-bar .note {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
}
.action-bar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 0 1 auto;
  flex-shrink: 1;
}
.suggest-group .action-bar {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: none;
  height: auto;
  margin-top: 12px;
}
.suggest-group .action-bar .actions {
  justify-content: flex-start;
}

label.hint,
.select-all,
.supplier-actions label.hint,
.supplier-card > label.hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
label.hint input,
.select-all input {
  margin: 0;
  flex: 0 0 auto;
}

/* ===== Phone / narrow: usable targets, compact chrome ===== */
@media (max-width: 900px) {
  .suggest-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sidebar .side-block,
  .sidebar .nav-kicker,
  .sidebar .nav.secondary {
    display: none;
  }
  .sidebar {
    height: auto;
    position: static;
    min-height: 0;
    padding: 14px 16px 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
  }
  .sidebar .nav {
    display: none;
  }
  .sidebar .side-foot {
    margin-left: auto;
    padding-top: 0;
    gap: 8px;
  }
  .main { padding: 16px 16px 24px; }
  .page-head h1 { font-size: 22px; }

  .btn,
  .btn-sm,
  .btn.link-remove,
  button.link-remove,
  .filter-chip {
    min-height: 44px;
    height: auto;
    padding: 10px 14px;
  }
  .supplier-card {
    grid-template-columns: 1fr;
  }
  .supplier-actions {
    align-items: stretch;
    width: 100%;
    margin-top: 8px;
  }
  .supplier-actions .btn,
  .supplier-actions label.hint,
  .supplier-card > label.hint {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    width: 100%;
  }
  .select-all { margin-left: 0; min-height: 44px; }

  .stepper {
    gap: 0;
    overflow: hidden;
  }
  .step {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 0;
  }
  .step .label {
    max-width: none;
    font-size: 11px;
    padding-top: 0;
    line-height: 1.2;
  }
  .step-join {
    flex: 0 0 10px;
    margin: 13px 0 0;
  }
  .sidebar .signed { display: none; }
  .sidebar .brand-sub { display: none; }
  .sidebar .side-foot { flex: 0 0 auto; margin-left: 8px; width: auto; }
  .sidebar .appearance {
    width: 136px;
    min-width: 136px;
    flex: none;
    height: 32px;
    align-self: center;
  }
  .sidebar .appearance span { padding: 4px 8px; line-height: 1.2; }
  .sort-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-row { flex-direction: column; align-items: stretch; }
  .search-row .btn { width: 100%; }
}


button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
