/* OmniMerkez showcase. One bold element (the stock board); everything else stays quiet. */
:root {
  --paper: #eef1f4;
  --surface: #ffffff;
  --ink: #10203a;
  --ink-soft: #4a5a72;
  --line: #cfd7e0;
  --board: #142847;
  --board-deep: #0f1f39;
  --tile: #1d3760;
  --tile-text: #f4f2ec;
  --signal: #f2b233;
  --signal-ink: #3a2700;
  --ok: #1f7a55;
  --warn: #a8660b;
  --bad: #b3261e;
  --focus: #f2b233;
  --radius: 6px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0d1626;
    --surface: #132036;
    --ink: #e6ebf2;
    --ink-soft: #9aa8bc;
    --line: #26354d;
    --board: #18305a;
    --board-deep: #10213f;
    --tile: #234272;
    --ok: #5cc596;
    --warn: #e7a740;
    --bad: #f08a80;
  }
}
:root[data-theme='dark'] {
  --paper: #0d1626;
  --surface: #132036;
  --ink: #e6ebf2;
  --ink-soft: #9aa8bc;
  --line: #26354d;
  --board: #18305a;
  --board-deep: #10213f;
  --tile: #234272;
  --ok: #5cc596;
  --warn: #e7a740;
  --bad: #f08a80;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  font-variation-settings: 'wdth' 100;
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}
.fine {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- header ---------- */
.top {
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-variation-settings: 'wdth' 85;
  font-size: 19px;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  gap: 2px;
  padding: 4px;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--board);
}
.brand-mark i {
  border-radius: 1.5px;
  background: var(--tile-text);
}
.brand-mark i:first-child {
  background: var(--signal);
}
.top nav {
  display: flex;
  gap: 4px;
}
.top nav a {
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-soft);
}
.top nav a.login {
  margin-left: 6px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.top nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.top nav a.login:hover {
  background: var(--ink);
  color: var(--paper);
  opacity: 0.88;
}
@media (max-width: 620px) {
  .top nav a:not([href='#demo']):not(.login) {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 72px;
}
.hero-head {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}
@media (min-width: 960px) {
  .hero-head {
    grid-template-columns: 1.6fr 1fr;
    align-items: end;
    gap: 56px;
  }
}
h1 {
  font-size: clamp(40px, 7.2vw, 88px);
  line-height: 0.95;
  font-weight: 800;
  font-variation-settings: 'wdth' 72;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- the board ---------- */
.board {
  background: var(--board);
  color: var(--tile-text);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 48px -24px rgba(16, 32, 58, 0.55);
}
@media (min-width: 720px) {
  .board {
    padding: 28px 32px;
  }
}
.board-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(244, 242, 236, 0.14);
}
.board-product {
  font-size: 22px;
  font-weight: 700;
  font-variation-settings: 'wdth' 85;
}
.board-sku {
  font-size: 14px;
  color: rgba(244, 242, 236, 0.62);
}
.board-stock {
  display: flex;
  gap: 24px;
}
.board-stock dt {
  font-size: 13px;
  color: rgba(244, 242, 236, 0.62);
  margin-bottom: 6px;
}
.board-stock .avail dt {
  color: var(--signal);
}

/* Split-flap tiles: each character sits on its own tile with a hinge line. */
.flaps {
  display: inline-flex;
  gap: 3px;
}
.flap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.78em;
  height: 1.12em;
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 90;
  line-height: 1;
  border-radius: 4px;
  background: linear-gradient(var(--tile) 0 50%, color-mix(in srgb, var(--tile) 88%, black) 50% 100%);
  color: var(--tile-text);
  box-shadow: 0 2px 0 var(--board-deep);
}
.flap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--board-deep);
}
.flap.turn {
  animation: flap 90ms ease-in;
}
@keyframes flap {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.08);
  }
  100% {
    transform: scaleY(1);
  }
}
.avail .flap,
.board-rows .flap {
  color: var(--signal);
}
.board-rows .flap {
  font-size: 26px;
}

.board-rows {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.board-rows thead th {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: rgba(244, 242, 236, 0.55);
  padding: 12px 12px 8px 0;
}
.board-rows tbody th {
  text-align: left;
  font-weight: inherit;
}
.board-rows tbody th,
.board-rows td {
  padding: 12px 12px 12px 0;
  border-top: 1px solid rgba(244, 242, 236, 0.1);
  vertical-align: middle;
}
.board-rows td:last-child,
.board-rows th:last-child {
  padding-right: 0;
  text-align: right;
}
.ch-name {
  font-size: 20px;
  font-weight: 700;
  font-variation-settings: 'wdth' 80;
}
.ch-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.ch-state::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fd1a9;
}
.ch-state.pending {
  color: var(--signal);
}
.ch-state.pending::before {
  background: var(--signal);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.c-how,
.ch-how {
  color: rgba(244, 242, 236, 0.62);
  font-size: 14px;
}
@media (max-width: 760px) {
  .c-how,
  .ch-how {
    display: none;
  }
  .board-rows tbody th,
  .board-rows td,
  .board-rows thead th {
    padding-right: 8px;
  }
  .ch-state {
    font-size: 13px;
    gap: 6px;
  }
  .btn-order {
    padding: 6px 9px;
    font-size: 13px;
  }
  .board-stock {
    gap: 16px;
  }
  .board-rows .flap {
    font-size: 20px;
  }
  .flap {
    font-size: 26px;
  }
  .ch-name {
    font-size: 17px;
  }
}
.btn-order {
  white-space: nowrap;
  border: 1px solid rgba(244, 242, 236, 0.28);
  background: transparent;
  color: var(--tile-text);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-order:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--signal-ink);
}
.board-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 242, 236, 0.14);
}
.board-log {
  flex: 1 1 380px;
  min-height: 3.2em;
  font-size: 14px;
  color: rgba(244, 242, 236, 0.8);
}
.board-log li {
  display: flex;
  gap: 10px;
}
.board-log li + li {
  opacity: 0.55;
}
.board-log time {
  font-variant-numeric: tabular-nums;
  color: rgba(244, 242, 236, 0.5);
}
.board-actions {
  display: flex;
  gap: 8px;
}
.btn-board {
  border: 0;
  background: rgba(244, 242, 236, 0.1);
  color: var(--tile-text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}
.btn-board:hover:not(:disabled) {
  background: rgba(244, 242, 236, 0.18);
}
.btn-board:disabled {
  opacity: 0.4;
  cursor: default;
}
.board-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 80ch;
}

/* ---------- sections ---------- */
section + section {
  border-top: 1px solid var(--line);
}
.day,
.channels,
.demo,
.setup {
  padding: 72px 0;
}
h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.02;
  font-weight: 800;
  font-variation-settings: 'wdth' 75;
  text-wrap: balance;
}
h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
}
.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 64ch;
}
@media (min-width: 960px) {
  .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 56px;
  }
}

/* ---------- a day: real sequence, so times lead each row ---------- */
.day-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 960px) {
  .day-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: 56px;
  }
  .day-intro {
    align-self: start;
  }
}
.day-intro p {
  margin-top: 16px;
  color: var(--ink-soft);
  max-width: 44ch;
}
.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}
.timeline time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 80;
  font-size: 18px;
  padding-top: 1px;
}
.timeline p {
  margin-top: 4px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- channel matrix ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mk {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
}
.mk.ok {
  background: var(--ink);
}
.mk.part {
  background: linear-gradient(135deg, var(--ink) 0 50%, transparent 50%);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.mk.no {
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink-soft);
  opacity: 0.6;
}
.mk.unk {
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
  opacity: 0.7;
}
.matrix-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 920px;
}
.matrix th,
.matrix td {
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.matrix tr:last-child th,
.matrix tr:last-child td {
  border-bottom: 0;
}
.matrix thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 14px 6px;
  text-align: center;
  vertical-align: bottom;
  line-height: 1.25;
}
.matrix tbody th {
  text-align: left;
  padding: 12px 16px;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--surface);
}
.matrix .ch {
  font-weight: 700;
  font-size: 17px;
  font-variation-settings: 'wdth' 85;
}
.matrix .ver {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}
.matrix .count {
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 16px;
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.matrix button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 52px;
  border: 0;
  background: none;
  cursor: pointer;
}
.matrix button:hover,
.matrix button[aria-pressed='true'] {
  background: color-mix(in srgb, var(--signal) 22%, transparent);
}
.cell-note {
  min-height: 3em;
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 80ch;
}
.cell-note strong {
  color: var(--ink);
}
.later {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .later {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
  }
}
.later p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}
.later + .fine {
  margin-top: 24px;
}

/* ---------- demo ---------- */
.app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.app-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.app-tabs button {
  border: 0;
  background: none;
  padding: 10px 14px;
  border-bottom: 3px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
}
.app-tabs button[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--signal);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.toolbar-msg {
  font-size: 14px;
  color: var(--ink-soft);
}
select,
.data input {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.data input {
  width: 90px;
  padding: 6px 8px;
}
.btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.table-scroll,
.matrix-scroll,
.board {
  position: relative;
}
.table-scroll {
  overflow-x: auto;
}
.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 600px;
}
.data th {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.data td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.data tr:last-child td {
  border-bottom: 0;
}
.data .num {
  text-align: right;
}
.data .low {
  color: var(--bad);
  font-weight: 600;
}
.status {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.status.picking {
  background: color-mix(in srgb, var(--signal) 30%, transparent);
}
.status.late {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.pad {
  padding: 12px 16px;
}
.conn-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.conn-list li:last-child {
  border-bottom: 0;
}
.conn-list p {
  grid-column: 1 / -1;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ---------- setup: a real sequence ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  font-variation-settings: 'wdth' 70;
  color: var(--ink-soft);
}
.steps li > p,
.keys {
  grid-column: 2;
  color: var(--ink-soft);
  max-width: 70ch;
}
@media (min-width: 960px) {
  .steps li {
    grid-template-columns: 64px 320px 1fr;
    gap: 24px;
  }
  .steps li::before {
    grid-row: auto;
  }
  .steps li > p,
  .keys {
    grid-column: 3;
  }
}
.keys-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.keys-tabs button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 14px;
  cursor: pointer;
}
.keys-tabs button[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.keys-body {
  min-height: 3.2em;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
}
.foot-inner {
  display: grid;
  gap: 8px;
}
.foot-inner p:first-child {
  max-width: 80ch;
  color: var(--ink-soft);
}

/* Narrow screens: each board row becomes two lines (name + stock, then status + action). */
@media (max-width: 560px) {
  .board-rows thead {
    display: none;
  }
  .board-rows,
  .board-rows tbody {
    display: block;
  }
  .board-rows tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'name qty'
      'state btn';
    align-items: center;
    gap: 8px 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(244, 242, 236, 0.1);
  }
  .board-rows tbody th,
  .board-rows td {
    display: block;
    padding: 0;
    border: 0;
  }
  .board-rows tr:first-child {
    border-top: 0;
  }
  .board-rows tbody th {
    grid-area: name;
  }
  .board-rows .c-qty {
    grid-area: qty;
    text-align: right;
  }
  .board-rows td:nth-child(3) {
    grid-area: state;
  }
  .board-rows td:last-child {
    grid-area: btn;
  }
  .board-rows td.ch-how {
    display: none;
  }
}
