:root {
  color-scheme: light;
  --ink: oklch(18% 0.006 240);
  --muted: oklch(42% 0.006 240);
  --paper: oklch(98.5% 0.003 95);
  --surface: oklch(94% 0.003 95);
  --surface-strong: oklch(90% 0.004 95);
  --line: oklch(82% 0.004 95);
  --heinemann-red: oklch(57% 0.235 25);
  --heinemann-navy: oklch(18% 0.006 240);
  --soft-red: oklch(94% 0.032 24);
  --focus: oklch(62% 0.16 42);
  --shadow: 0 18px 38px oklch(20% 0.006 240 / 12%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.staff-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: oklch(98.5% 0.003 95 / 94%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 78px;
  height: 38px;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.header-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 76px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.lang-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.lang-button.active {
  background: var(--heinemann-red);
  color: oklch(98% 0.01 78);
}

.staff-app {
  min-height: calc(100svh - 64px);
}

.workbench {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.briefing {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--heinemann-red);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--heinemann-navy);
  font-size: 1.75rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.lead {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.45;
}

.shift-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.shift-strip span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: oklch(99% 0.003 95);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.finder-panel {
  scroll-margin-top: 84px;
  display: grid;
  gap: 0;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
  box-shadow: var(--shadow);
}

.finder-panel.attention {
  border-color: var(--heinemann-red);
  box-shadow:
    0 0 0 5px oklch(57% 0.235 25 / 16%),
    var(--shadow);
}

.progress-row,
.panel-foot,
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-label,
.question-kicker,
#selection-note,
.meta,
.taste-note {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.ghost-button,
.back-button,
.continue-button,
.profile-open,
.secondary-action {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--heinemann-navy);
  cursor: pointer;
  font-weight: 850;
}

.ghost-button {
  min-height: 34px;
  font-size: 0.84rem;
}

.continue-button,
.secondary-action {
  border-color: var(--heinemann-red);
  background: var(--heinemann-red);
  color: oklch(98% 0.01 78);
}

.continue-button[hidden] {
  display: none;
}

.back-button:disabled,
.continue-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.progress-track {
  height: 8px;
  margin: 14px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: oklch(90% 0.018 78);
}

#progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.finder-panel h2 {
  margin: 0 0 18px;
  color: var(--heinemann-navy);
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.finder-panel.is-complete h2 {
  font-size: 1.35rem;
}

.finder-panel.is-complete .panel-foot {
  align-items: flex-start;
}

.finder-panel.is-complete .panel-foot #selection-note {
  flex-basis: 100%;
  text-align: left;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.option-button {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-weight: 850;
  line-height: 1.22;
  transition:
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.option-button:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: oklch(96.5% 0.003 95);
}

.option-button.selected {
  border-color: var(--ink);
  background: var(--soft-red);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.option-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--swatch, var(--heinemann-red));
  color: oklch(99% 0.003 95);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 2px oklch(99% 0.008 78);
}

.panel-foot {
  flex-wrap: wrap;
  min-height: 42px;
  margin-top: 14px;
}

.panel-foot #selection-note {
  flex: 1 1 170px;
  text-align: right;
}

.selection-band {
  scroll-margin-top: 84px;
  padding: 22px 16px 34px;
  background: var(--surface);
}

.section-heading {
  display: grid;
  gap: 8px;
}

.section-heading h2 {
  max-width: 24ch;
  margin: 0;
  color: var(--heinemann-navy);
  font-size: 1.35rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.results-toolbar {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0;
  margin: 16px 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
}

.results-toolbar > div {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 58px;
  padding: 10px 12px;
}

#result-count {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.results-toolbar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.results-toolbar .secondary-action {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
}

.answer-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.answer-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-label {
  color: var(--ink);
  font-weight: 920;
}

.answer-summary div span {
  border-radius: 999px;
  padding: 5px 8px;
  background: oklch(99% 0.003 95);
  color: var(--muted);
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  scroll-margin-top: 84px;
}

.match-notice {
  display: grid;
  gap: 4px;
  grid-column: 1 / -1;
  border: 1px solid oklch(72% 0.06 72);
  border-radius: 8px;
  padding: 12px 14px;
  background: oklch(96% 0.028 78);
  color: var(--ink);
}

.match-notice strong {
  font-size: 0.94rem;
  font-weight: 950;
}

.match-notice span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.empty-results {
  display: grid;
  gap: 8px;
  min-height: 148px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
  color: var(--muted);
  font-weight: 760;
}

.empty-results strong {
  color: var(--ink);
  font-size: 1.12rem;
}

.empty-results span {
  max-width: 52ch;
  line-height: 1.45;
}

.product-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(99% 0.003 95);
  min-height: 196px;
}

.product-image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 14px 10px;
}

.rank-pill {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--ink);
  color: oklch(98% 0.01 78);
  font-size: 0.68rem;
  font-weight: 920;
}

.product-body {
  min-width: 0;
  padding: 12px;
}

.sku-row {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.sku-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.sku-row strong {
  color: var(--heinemann-red);
  font-size: 1rem;
  font-weight: 950;
  white-space: nowrap;
}

.product-body h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--heinemann-navy);
  font-size: 0.98rem;
  line-height: 1.2;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta span,
.profile-meta span,
.profile-chips span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.staff-label {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taste-note {
  display: -webkit-box;
  min-height: 3.6em;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.3;
}

.profile-open {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  background: transparent;
}

.profile-open:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.profile-dialog {
  width: min(980px, calc(100vw - 18px));
  height: min(860px, calc(100svh - 18px));
  max-height: calc(100svh - 18px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.profile-dialog::backdrop {
  background: oklch(15% 0.006 240 / 72%);
}

.profile-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(340px, 48svh) 1fr;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.profile-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(99% 0.003 95 / 94%);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
}

.profile-media {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: oklch(96% 0.003 95);
}

.profile-media img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 22px;
  object-fit: contain;
  object-position: center;
}

.profile-content {
  padding: 18px;
}

.profile-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-price {
  margin-top: 12px;
  color: var(--heinemann-red);
  font-size: 1.45rem;
  font-weight: 950;
}

.profile-meta,
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-meta {
  margin-top: 12px;
}

.profile-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

.profile-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-facts dd {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-main {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
}

.footer-brand {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.footer-brand img {
  width: 92px;
  height: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.footer-links a:hover {
  color: var(--heinemann-red);
}

@media (min-width: 640px) {
  .staff-header {
    padding-inline: 22px;
  }

  .brand {
    width: 94px;
  }

  .language-switch {
    width: 82px;
  }

  .workbench,
  .selection-band {
    padding-inline: 24px;
  }

  h1 {
    max-width: 18ch;
    font-size: 2rem;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .sku-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .sku-row strong {
    font-size: 1.08rem;
  }

  .profile-facts {
    grid-template-columns: minmax(120px, 0.38fr) 1fr;
    gap: 8px 16px;
  }

  .profile-facts dd {
    margin-bottom: 0;
  }
}

@media (min-width: 1120px) {
  .staff-app {
    max-width: 1180px;
    margin: 0 auto;
  }

  .workbench {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding-top: 28px;
  }

  .briefing {
    position: sticky;
    top: 86px;
    padding-top: 4px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .lead {
    font-size: 1.03rem;
  }

  .finder-panel {
    padding: 20px;
  }

  .selection-band {
    padding-top: 28px;
  }

  .section-heading {
    grid-template-columns: 180px 1fr;
    align-items: end;
  }

  .results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 1fr;
    grid-template-rows: 190px 1fr;
  }

  .product-image {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .profile-shell {
    grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 0.58fr);
    grid-template-rows: 1fr;
    overflow: hidden;
  }

  .profile-media {
    height: 100%;
  }

  .profile-media img {
    padding: 32px;
  }

  .profile-content {
    overflow-y: auto;
    padding: 30px;
  }

  .footer-main {
    grid-template-columns: 1fr auto;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding-inline: 24px;
  }

  .footer-brand {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

@media (max-width: 639px) {
  .staff-header {
    grid-template-columns: auto auto;
    justify-content: start;
  }

  .header-title {
    display: none;
  }

  .language-switch {
    justify-self: start;
    width: 60px;
    padding: 2px;
  }

  .lang-button {
    min-height: 28px;
    font-size: 0.7rem;
  }
}

@media (max-width: 374px) {
  .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
