/* Northwren AI · manufacturers page · the two live demos (order desk, enquiry desk) */
.demo { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-6); margin-top: var(--s-7); align-items: start; }
@media (max-width: 1023px) { .demo { grid-template-columns: minmax(0, 1fr); } }

.demo__panel { background: var(--p-surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); min-width: 0; }
.demo__label { font-size: 13px; color: var(--p-muted); margin: 0 0 var(--s-3); display: flex; align-items: center; gap: 8px; }
.demo__label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-muted); }
.demo__label .dot.on { background: #3ccf91; box-shadow: 0 0 0 4px color-mix(in oklab, #3ccf91 22%, transparent); }

/* sample picker */
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); }
.pick { font: inherit; font-size: 14px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong, var(--line)); background: transparent; color: var(--p-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pick:hover { border-color: var(--p-ink); }
.pick[aria-pressed="true"] { background: var(--p-ink); color: var(--p-bg); border-color: var(--p-ink); }
.pick .lock { width: 12px; height: 12px; opacity: .7; }

/* the input preview */
.inbox { border-radius: 14px; background: color-mix(in oklab, var(--p-bg) 70%, var(--p-surface)); border: 1px solid var(--line); padding: var(--s-4); min-height: 220px; }
.inbox__from { font-size: 12px; color: var(--p-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.inbox__from img { width: 14px; height: 14px; }
.bubble { white-space: pre-wrap; background: #1f3b33; color: #e7f5ef; border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 14px; line-height: 1.5; max-width: 96%; }
.bubble--mail { background: color-mix(in oklab, var(--p-ink) 7%, transparent); color: var(--p-ink); border-radius: 10px; }
.inbox__file { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.inbox__file img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; object-position: top; }
.inbox__open { display: inline-block; margin-top: 8px; font-size: 13px; }

/* "try your own" */
.own textarea { width: 100%; min-height: 150px; font: inherit; font-size: 14px; line-height: 1.5; color: var(--p-ink); background: var(--p-bg); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.own input[type="text"] { width: 100%; height: 40px; font: inherit; font-size: 14px; color: var(--p-ink); background: var(--p-bg); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; padding: 0 12px; }
.own .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.drop { margin-top: 10px; border: 1px dashed var(--line-strong, var(--line)); border-radius: 10px; padding: 14px; font-size: 14px; color: var(--p-muted); text-align: center; cursor: pointer; }
.drop.has-file { border-style: solid; color: var(--p-ink); }
.drop input { display: none; }
.own__or { text-align: center; font-size: 12px; color: var(--p-muted); margin: 10px 0 0; }
.own__hint { font-size: 12px; color: var(--p-muted); margin-top: 10px; }
.locked { text-align: center; padding: var(--s-6) var(--s-4); }
.locked svg { display: block; width: 28px; height: 28px; stroke: var(--p-muted); fill: none; stroke-width: 1.6; margin: 0 auto 10px; }
.locked p { margin: 0 auto 14px; max-width: 34ch; color: var(--p-muted); font-size: 14px; }

.demo__go { margin-top: var(--s-4); width: 100%; }
.demo__note { font-size: 12px; color: var(--p-muted); margin-top: 10px; }

/* progress */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--p-muted); }
.steps li .st { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong, var(--line)); flex: none; display: grid; place-items: center; }
.steps li.run .st { border-color: var(--p-accent); border-right-color: transparent; animation: mfgspin .8s linear infinite; }
.steps li.done { color: var(--p-ink); }
.steps li.done .st { border-color: #3ccf91; background: #3ccf91; }
.steps li.done .st::after { content: ""; width: 8px; height: 5px; border: 2px solid #0f2a1f; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@keyframes mfgspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.run .st { animation: none; } }

.empty { color: var(--p-muted); font-size: 14px; display: grid; place-items: center; min-height: 260px; text-align: center; }
.empty svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.4; margin: 0 auto 10px; display: block; opacity: .7; }

/* result: shared */
.res__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--s-4); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: color-mix(in oklab, var(--p-ink) 9%, transparent); color: var(--p-ink); white-space: nowrap; }
.chip--ok { background: color-mix(in oklab, #3ccf91 18%, transparent); color: #9ff0c9; }
.chip--check { background: color-mix(in oklab, #f5b740 20%, transparent); color: #ffd98a; }
.chip--warn { background: color-mix(in oklab, #ff7a59 20%, transparent); color: #ffb9a6; }
.chip--hot { background: var(--p-accent); color: var(--p-accent-ink); }
.chip--muted { background: transparent; border: 1px solid var(--line); color: var(--p-muted); }
.res__time { margin-left: auto; font-size: 13px; color: var(--p-muted); }
.res__time b { color: var(--p-accent); font-weight: 500; }
.res__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 16px; margin: 0 0 var(--s-4); font-size: 13.5px; }
.res__meta dt { color: var(--p-muted); font-size: 12px; }
.res__meta dd { margin: 2px 0 0; }
.res h4 { font-size: 13px; font-weight: 500; color: var(--p-muted); margin: var(--s-5) 0 8px; letter-spacing: .01em; }

/* order table */
.lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lines th { text-align: left; font-weight: 500; font-size: 12px; color: var(--p-muted); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.lines td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .code { font-size: 12px; color: var(--p-muted); font-variant-numeric: tabular-nums; }
.lines .wrote { font-size: 12px; color: var(--p-muted); margin-top: 3px; }
.lines .wrote::before { content: "Wrote: "; }
.lines .note { font-size: 12.5px; margin-top: 6px; color: #ffd98a; }
.lines tr.is-warn .note { color: #ffb9a6; }
.lines tfoot td { border-bottom: 0; padding-top: 8px; }
.lines tfoot tr.total td { font-weight: 500; font-size: 15px; border-top: 1px solid var(--line-strong, var(--line)); }
.lines tr.is-ok .note { color: var(--p-muted); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* phones: each order line becomes a small card instead of a squeezed table row */
@media (max-width: 639px) {
  .lines thead { display: none; }
  .lines, .lines tbody, .lines tfoot { display: block; width: 100%; }
  .lines tbody tr { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .lines tbody td { padding: 0; border: 0; }
  .lines tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .lines tbody td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  .lines tbody td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; color: var(--p-muted); }
  .lines tbody td:nth-child(4) { display: none; }
  .lines tbody td:nth-child(5) { grid-column: 3; grid-row: 2; }
  .lines tbody td:nth-child(6) { grid-column: 2 / 4; grid-row: 3; }
  .lines tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 6px 0; }
  .lines tfoot td { padding: 0; }
  .lines tfoot td:nth-child(1), .lines tfoot td:nth-child(4) { display: none; }
  .lines tfoot tr.total { border-top: 1px solid var(--line-strong, var(--line)); padding-top: 10px; margin-top: 4px; }
  .lines tfoot tr.total td { border-top: 0; }
}

.reply { background: #1f3b33; color: #e7f5ef; border-radius: 14px 14px 4px 14px; padding: 12px 14px; font-size: 14px; line-height: 1.55; margin-left: auto; max-width: 96%; white-space: pre-wrap; }
.reply__meta { font-size: 12px; color: var(--p-muted); text-align: right; margin-top: 6px; }
.res__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-4); }
.res__actions .btn { height: 40px; font-size: 14px; }

/* enquiry products and next steps */
.prods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prods li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.prods li span.code { display: block; font-size: 12px; color: var(--p-muted); }
.prods li b { font-weight: 500; white-space: nowrap; }
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.next li { display: flex; gap: 8px; align-items: flex-start; }
.next li::before { content: ""; width: 14px; height: 14px; margin-top: 3px; flex: none; border-radius: 50%; background: color-mix(in oklab, #3ccf91 30%, transparent); box-shadow: inset 0 0 0 4px var(--p-surface); outline: 1px solid #3ccf91; }
.inote { margin-top: var(--s-4); padding: 10px 12px; border-left: 3px solid var(--p-accent); background: color-mix(in oklab, var(--p-accent) 8%, transparent); font-size: 13.5px; border-radius: 0 8px 8px 0; }
.inote b { font-weight: 500; }

/* live banner */
.livebar { display: none; margin: 0 0 var(--s-5); padding: 10px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); background: var(--p-surface); }
.livebar.on { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.livebar.on .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf91; box-shadow: 0 0 0 4px color-mix(in oklab, #3ccf91 22%, transparent); }
.livebar.bad .dot { background: #f5b740; box-shadow: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; transition: opacity .25s, transform .25s; z-index: 60; background: var(--p-inv-bg); color: var(--p-inv-ink); padding: 12px 16px; border-radius: 12px; font-size: 14px; max-width: min(92vw, 440px); box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* who it's for */
.who { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.who li { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong, var(--line)); font-size: 15px; }
.demo [hidden] { display: none !important; }

.res__note { font-size: 13px; line-height: 1.5; color: var(--p-muted); margin: 10px 0 0; }
