:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16233f;
  --muted: #5d6779;
  --line: #dfe3ea;
  --accent: #1f4fd1;
  --accent-ink: #ffffff;
  --tag: #ffd23f;
  --ok: #157f3b;
  --warn: #a15c00;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 35, 63, .06), 0 2px 8px rgba(22, 35, 63, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522;
    --card: #182133;
    --ink: #e8ecf4;
    --muted: #9aa5b8;
    --line: #2a3550;
    --accent: #6d95ff;
    --accent-ink: #0b1220;
    --tag: #ffd23f;
    --ok: #4ccb7a;
    --warn: #f0b04a;
    --danger: #ff7b6e;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: .2em 0 .4em; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 1em 0 .5em; }
h3 { font-size: 1rem; margin: 1.1em 0 .4em; }
h2.section { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 1.6em; }
p { margin: .4em 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.warn { color: var(--warn); }
.err { color: var(--danger); min-height: 1.2em; }
.empty { color: var(--muted); padding: 1em 0; text-align: center; }
.row { display: flex; align-items: center; }
.gap { gap: .6rem; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.stack { display: grid; gap: .9rem; }
[hidden] { display: none !important; }

main { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 7rem; }

/* ---------------- header + menu */
header.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; padding-top: max(.55rem, env(safe-area-inset-top));
  background: var(--ink); color: var(--bg);
}
@media (prefers-color-scheme: dark) { header.top { background: #0a0f19; color: var(--ink); border-bottom: 1px solid var(--line); } }
header.top .logo { display: flex; }
.top-title { flex: 1; min-width: 0; }
.top-title .t1 { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title .t2 { font-size: .75rem; opacity: .75; }
header.top .icon-btn, header.top .linklike { color: inherit; }
nav.menu {
  display: none; position: sticky; top: 52px; z-index: 19; background: var(--card); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: .4rem 0;
}
nav.menu.open { display: grid; }
nav.menu a, nav.menu button { padding: .75rem 1.2rem; text-decoration: none; color: var(--ink); text-align: left; font-size: 1rem; }
nav.menu a:hover, nav.menu button:hover { background: var(--bg); }
@media (min-width: 900px) {
  nav.menu { display: flex !important; flex-wrap: wrap; justify-content: center; padding: 0; position: static; }
  nav.menu a, nav.menu button { padding: .6rem .9rem; font-size: .92rem; }
  header.top > .icon-btn[aria-label="Menu"] { display: none; }
}

/* ---------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn.big { width: 100%; min-height: 58px; font-size: 1.1rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  background: none; border: 0; font: inherit; font-size: 1.35rem; line-height: 1; padding: .35rem .5rem;
  min-width: 40px; min-height: 40px; color: var(--ink); cursor: pointer; text-decoration: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.linklike { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: .3rem 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
input[type=file] { padding: .5rem; }
label { display: grid; gap: .3rem; font-weight: 550; font-size: .95rem; }
label.radio, label.switch, label.check-card, label.inline { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
label.inline input { width: 6.5rem; min-height: 36px; padding: .35rem .5rem; }
.radios { display: grid; gap: .5rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
.check-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .75rem; cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------------- cards + lists */
.list { display: grid; gap: .55rem; }
.card {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; text-align: left; font: inherit; width: 100%;
}
button.card { cursor: pointer; }
a.card:hover, button.card:hover { border-color: var(--accent); }
.card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card.off { opacity: .55; }
.card.block { display: block; }
.card.draft { display: block; margin-top: .7rem; border-style: dashed; }
.card.tools { display: grid; gap: .6rem; margin: .6rem 0 1rem; }
.req-main { min-width: 0; }
.req-title { font-weight: 650; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.chip {
  display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 650; padding: .2rem .55rem;
  border-radius: 999px; background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--ink);
}
.st-submitted { background: var(--tag); color: #3a2c00; }
.st-in_progress { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.st-tags_made, .st-printed { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); }
.st-delivered { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.st-cancelled { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

dl.summary { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: .6rem 0 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
dl.summary dt { color: var(--muted); font-size: .9rem; }
dl.summary dd { margin: 0; }

ol.timeline { list-style: none; padding: 0 0 0 1.1rem; margin: 0; border-left: 2px solid var(--line); }
ol.timeline li { position: relative; padding: 0 0 .9rem .6rem; }
ol.timeline li::before { content: ""; position: absolute; left: -1.53rem; top: .35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }

/* ---------------- new request */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; list-style: none; padding: 0; margin: 0 0 .6rem; }
.stepper button { width: 100%; background: none; border: 0; border-bottom: 3px solid var(--line); padding: .5rem .2rem;
  font: inherit; font-size: .85rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; justify-content: center; cursor: pointer; }
.stepper button:disabled { cursor: default; opacity: .6; }
.stepper .n { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); font-size: .75rem; font-weight: 700; color: var(--ink); }
.stepper li.on button { color: var(--ink); border-color: var(--accent); font-weight: 650; }
.stepper li.on .n { background: var(--accent); color: var(--accent-ink); }
.stepper li.done .n { background: var(--ok); color: #fff; }
.step-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; gap: .3rem; justify-items: center;
  padding: .7rem 1rem; padding-bottom: max(.7rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.step-foot:empty { display: none; }
.step-foot > * { max-width: 728px; }
.add-store { margin-top: 1.4rem; padding-top: .4rem; border-top: 1px dashed var(--line); }
.add-store .row input { flex: 1; }
@media (max-width: 480px) { .add-store .row { flex-direction: column; align-items: stretch; } }
.scan-row { display: flex; gap: .5rem; }
.scan-row input.scan { font-size: 1.05rem; min-height: 50px; }
.scan-row .btn { white-space: nowrap; }
@media (max-width: 480px) { .scan-row { flex-direction: column; } .scan-row .btn { min-height: 50px; } }
.results { display: grid; gap: .4rem; margin: .6rem 0; }
.item-line { min-width: 0; }
.cart { margin-top: 1rem; }
.cart-row { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .6rem .7rem; margin-bottom: .45rem; }
.cart-info { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.qty { display: flex; align-items: center; gap: .1rem; font-weight: 700; }
.qty span { min-width: 1.4rem; text-align: center; }
.icon-btn.del { font-size: 1.05rem; opacity: .7; }

.cam { position: relative; margin: .7rem 0; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 55vh; }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame { position: absolute; inset: 28% 10%; border: 3px solid var(--tag); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.cam-msg { position: absolute; top: .6rem; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; padding: 0 .8rem; }
.cam-bar { position: absolute; bottom: .6rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; }

.done { text-align: center; padding: 2rem 0; }
.big-check { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--ok); color: #fff; font-size: 2.4rem; display: grid; place-items: center; }

/* ---------------- admin */
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: .7rem; padding-bottom: .2rem; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .4rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.row.gap.wrap > input[type=search] { flex: 1 1 220px; width: auto; }
.row.gap.wrap > select { flex: 0 1 220px; width: auto; }
.dist-pick { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.dist-pick select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; width: 100%; }
.stats div { display: grid; }
.stats b { font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: .85rem; }
.card.person { align-items: flex-start; }
progress { width: 100%; height: 10px; margin: .6rem 0; }

/* ---------------- login */
.login { max-width: 420px; margin: 0 auto; padding: 12vh 1.2rem 2rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.35rem; margin-bottom: 1.4rem; }
.brand svg.logo-icon { width: 38px; height: 38px; }
.login form { display: grid; gap: .9rem; margin-top: 1.2rem; }
input.code { font-size: 1.8rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------------- sheet + toast + spinner */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-back.open { opacity: 1; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; border-radius: 16px 16px 0 0; padding: .4rem 1rem 1.4rem; padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); transform: translateY(20px); transition: transform .18s; }
.sheet-back.open .sheet { transform: none; }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg); }
.sheet-head h2 { margin: .6em 0; }
.sheet-body { display: grid; gap: .6rem; }
.toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 60; transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; max-width: calc(100vw - 2rem); transition: all .2s; font-weight: 550; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }
.toast.scan { background: #d62828; color: #fff; box-shadow: 0 4px 16px rgba(214, 40, 40, .35); }
.center-msg { display: grid; justify-items: center; gap: .8rem; padding: 3rem 1rem; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .toast, .sheet, .sheet-back { transition: none; } }

dd .linklike { margin-left: .5rem; }

/* store templates */
.chip.tmpl { background: color-mix(in srgb, var(--tag) 70%, transparent); color: #3a2c00; }
.check-card.tmpl { border-color: var(--tag); background: color-mix(in srgb, var(--tag) 14%, var(--card)); }
.tmpl-note { margin-bottom: .5rem; }
.store-picks { display: grid; gap: .35rem; max-height: 40vh; overflow: auto; padding: .2rem; }
.takeover { display: grid; gap: .5rem; border-style: dashed; margin-bottom: .4rem; }
.logo-prev img { max-width: 220px; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.templates a { font-weight: 600; }
ul.small { margin: 0; padding-left: 1.2rem; }
.by-box { border-color: var(--tag); background: color-mix(in srgb, var(--tag) 10%, var(--card)); margin-top: .8rem; }
.by-line { display: grid; gap: .3rem; padding-top: .2rem; }
.by-line input.price { width: 5.5rem; }

/* tag maker */
.sheet.wide { max-width: 760px; }
.tm-line { display: flex; flex-direction: column; gap: .4rem; padding: .6rem .7rem; }
.tm-prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.tm-price { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); gap: .15rem; }
.tm-price input { min-height: 36px; padding: .3rem .45rem; font-size: .95rem; width: 100%; }
.tm-opts { gap: .35rem; }
@media (max-width: 420px) { .tm-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tm-busy { display: grid; gap: .45rem; padding: .75rem .9rem; border-color: var(--accent); }
.tm-busy[hidden] { display: none; }
.tm-busy .row { align-items: center; }
.tm-busy progress { width: 100%; max-width: none; justify-self: stretch; height: 10px; accent-color: var(--accent); }
.tm-step { font-size: .9rem; color: var(--muted); }
.tm-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
.row.between { justify-content: space-between; gap: .6rem; }
.row.between h2.section { margin-bottom: .6em; }
.list.finished .card.req { opacity: .75; }
/* logo */
.brand svg.logo-lockup { width: min(280px, 80vw); height: auto; }
header.top .logo svg.logo-icon { width: 32px; height: 32px; display: block; }
.chip.printer { background: color-mix(in srgb, #ffd23f 45%, transparent); color: inherit; }
.printer-pick { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.printer-pick select { width: auto; flex: 1 1 200px; }
li.ok { color: #1c7c3c; font-weight: 600; }
/* new request steps */
.foot-row { align-items: stretch; }
.foot-row > .btn.back { flex: 0 0 auto; }
.foot-row > .btn.primary.wide, .foot-row > .btn.wide { flex: 1 1 auto; }
.picked-store { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin-bottom: .4rem; }
.picked-store .linklike { margin-left: auto; }
.special-box { margin-top: .6rem; }
label.switch.inline { display: inline-flex; margin-right: .8rem; }
details.tm-more { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; background: var(--card); }
details.tm-more > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.tm-more[open] > summary { margin-bottom: .6rem; }
.tm-summary { margin: .3rem 0 0; }
.tm-formula { border-left: 3px solid var(--line); padding-left: .7rem; }
.type-hint { text-align: center; padding: 1.2rem .5rem; }
/* distributor band (top of My requests / Request queue) */
.dist-band { display: flex; align-items: center; gap: .9rem; background: #16233f; color: #fff; border-radius: 14px; padding: .8rem .9rem; margin-bottom: .9rem; }
.dist-band[hidden] { display: none; }
.dist-logo { background: #fff; border-radius: 10px; padding: .35rem .5rem; flex: 0 0 auto; display: flex; }
.dist-logo img { height: 46px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.dist-info { min-width: 0; font-size: .88rem; line-height: 1.35; }
.dist-info b { font-size: 1rem; display: block; }
.dist-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .15rem; }
.dist-links a { color: #ffd23f; text-decoration: none; font-weight: 600; }
.dist-links a:hover { text-decoration: underline; }
label.switch.inline input[type=checkbox] { width: 20px !important; height: 20px !important; min-height: 0 !important; }
@media (max-width: 520px) {
  .stepper button { flex-direction: column; gap: .15rem; font-size: .72rem; padding: .35rem .1rem; }
}
.stepper { align-items: stretch; } .stepper li { display: flex; margin: 0; } .stepper li button { align-self: stretch; }
a.card.pdf-link { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.pdf-ic { flex: none; background: #c62828; color: #fff; font-weight: 800; font-size: .7rem; border-radius: 6px; padding: .45rem .4rem; letter-spacing: .03em; }

/* PrintATag admin: "Working as" bar under the header */
.working-as { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--card, #f3f5fa);
  border-bottom: 1px solid var(--line); font-size: 14px; }
.working-as span { color: var(--muted); white-space: nowrap; }
.working-as select { flex: 1; min-width: 0; max-width: 420px; padding: 6px 8px; font-weight: 600; }
.working-as.on { background: #fff4c7; }
.working-as.on span { color: #5a4600; }
@media (prefers-color-scheme: dark) { .working-as.on { background: #3a3210; } .working-as.on span { color: #ffe08a; } }
.btn.download { margin: 4px 0 8px; }
.bill .bill-amt { font-size: 1.15rem; }
.bill .chip { font-size: .72rem; vertical-align: middle; }
.tm-file { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.tm-file .tm-file-info { flex: 1; min-width: 10rem; }
.tm-file .tm-file-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.tm-send { margin-top: .4rem; }

/* camera scanner: a red laser line sweeping up and down inside the frame */
.cam-frame { overflow: hidden; }
.cam-laser { position: absolute; left: 4%; right: 4%; height: 3px; top: 0; border-radius: 2px;
  background: #ff2a2a; box-shadow: 0 0 8px 2px rgba(255, 42, 42, .85), 0 0 18px 6px rgba(255, 42, 42, .35);
  animation: laser 1.8s ease-in-out infinite alternate; }
@keyframes laser { from { top: 4%; } to { top: calc(96% - 3px); } }
@media (prefers-reduced-motion: reduce) { .cam-laser { animation-duration: 4s; } }
/* billing v2 */
.chip.bs-active { background: color-mix(in srgb, #2e9d4f 22%, transparent); }
.chip.bs-due { background: color-mix(in srgb, #ffb020 35%, transparent); }
.chip.bs-paused { background: #c62828; color: #fff; }
.chip.bs-cancelled, .chip.bs-not_billing { opacity: .75; }
.terms ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.terms li { margin: .2rem 0; }
.ledger.pay b { color: #2e9d4f; }
.paused-band { background: #fdecea; border: 1px solid #f5b5ae; color: #8a1c13; border-radius: 12px; padding: .7rem .9rem; margin: 0 0 .8rem; }
@media (prefers-color-scheme: dark) { .paused-band { background: #3a1512; border-color: #6e2a24; color: #ffb4ab; } }
/* My requests: delete a request the rep printed himself */
.req-wrap { display: flex; align-items: stretch; gap: .4rem; }
.req-wrap > .card.req { flex: 1; min-width: 0; }
.req-wrap > .req-del { align-self: center; flex: none; width: 2.6rem; height: 2.6rem; border: 1px solid var(--line, #d8dde6); border-radius: 10px; background: transparent; }
.req-wrap > .req-del:hover { border-color: #c62828; background: color-mix(in srgb, #c62828 10%, transparent); }
.list.finished .req-wrap > .card.req { opacity: .75; }

/* ---------------- sign-in page links */
.login-more { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .95rem; }
.login-more > a { font-weight: 650; font-size: 1.05rem; }
.login-more p { margin: .7rem 0 0; }

/* ---------------- public pages (How it works, Get in touch) */
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 980px; margin: 0 auto; padding: .9rem 1rem; }
.pub-logo svg { height: 40px; width: auto; display: block; }
main.pub { max-width: 980px; margin: 0 auto; padding: 0 1rem 3rem; }
.hw-hero h1 { margin: .6rem 0 .3rem; font-size: clamp(1.6rem, 5vw, 2.3rem); }
.hw-hero p { max-width: 40rem; }
.hw-demo { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; justify-content: center; margin: 1.4rem 0 1rem; }
.hw-side { flex: 1 1 16rem; max-width: 26rem; }
.hw-cap h2 { margin: .2rem 0 .3rem; }
.hw-cap p { margin: 0 0 .8rem; min-height: 3em; }
.hw-num { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.hw-dots { display: flex; gap: .45rem; margin-bottom: .9rem; }
.hw-dot { width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.hw-dot.on { background: var(--accent); width: 28px; border-radius: 6px; transition: width .25s; }
.hw-list { padding-left: 1.3rem; } .hw-list li { margin: .45rem 0; }
.hw-cta { text-align: center; margin-top: 2rem; padding: 1.4rem 1rem; }
.hw-cta h2 { margin: 0 0 .3rem; }

/* the phone */
.hw-phone { position: relative; width: 250px; height: 440px; flex: none; border-radius: 34px; background: var(--card);
  border: 8px solid #16233f; box-shadow: 0 12px 40px rgba(22, 35, 63, .25); overflow: hidden; }
.hw-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: #16233f; border-radius: 0 0 12px 12px; z-index: 3; }
.hw-scene { position: absolute; inset: 0; padding: 34px 14px 14px; display: none; font-size: .82rem; }
.hw-scene.on { display: block; animation: hw-in .35s ease-out; }
@keyframes hw-in { from { opacity: 0; transform: translateX(14px); } }
.hw-scene.on * { animation-fill-mode: both; }

/* 1 - store search */
.hw-search { display: flex; align-items: center; gap: .4rem; border: 2px solid var(--accent); border-radius: 10px; padding: .45rem .6rem; margin-bottom: .7rem; }
.hw-typed { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--accent); width: 0; }
.hw-scene.on .hw-typed { animation: hw-type .8s steps(7) .2s forwards, hw-caret .6s step-end 1s 4; }
@keyframes hw-type { to { width: 7.5ch; } }
@keyframes hw-caret { 50% { border-color: transparent; } }
.hw-row { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .6rem; margin-bottom: .45rem; opacity: 0; }
.hw-scene.on .hw-row { animation: hw-up .3s ease-out var(--d) forwards; }
.hw-scene.on .hw-pick { animation: hw-up .3s ease-out var(--d) forwards, hw-tap .5s ease-out 2.4s forwards; }
@keyframes hw-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hw-tap { 40% { transform: scale(.96); } 100% { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } }

/* 2 - tag checkboxes */
.hw-check { display: flex; align-items: center; gap: .6rem; padding: .7rem .6rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; }
.hw-box { width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 5px; flex: none; position: relative; }
.hw-scene.on .hw-on .hw-box { animation: hw-checked .25s ease-out var(--d) forwards; }
.hw-scene.on .hw-on { animation: hw-row-on .25s ease-out var(--d) forwards; }
@keyframes hw-checked { to { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); } }
@keyframes hw-row-on { to { border-color: var(--accent); } }

/* 3 - scanning */
.hw-cam { position: relative; height: 230px; border-radius: 14px; background: #1b1f27; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.hw-bottle { width: 80px; height: 210px; background: linear-gradient(90deg, #2d4a2a, #4c7a46 45%, #2d4a2a); border-radius: 30px 30px 8px 8px; position: relative; }
.hw-bottle::before { content: ''; position: absolute; left: 30px; top: -30px; width: 20px; height: 40px; background: #2d4a2a; border-radius: 6px 6px 0 0; }
.hw-label { position: absolute; left: 8px; right: 8px; top: 80px; background: #f4ecd8; border-radius: 4px; padding: 8px 6px 4px; }
.hw-bars { height: 34px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 12px); }
.hw-upc { font: 600 7px/1.4 ui-monospace, monospace; color: #111; text-align: center; }
.hw-laser { position: absolute; left: 10%; right: 10%; top: 20%; height: 3px; background: #ff2b2b; box-shadow: 0 0 10px 3px rgba(255, 43, 43, .7); border-radius: 2px; }
.hw-scene.on .hw-laser { animation: hw-laser 1.1s ease-in-out infinite alternate; }
@keyframes hw-laser { to { top: 75%; } }
.hw-pop { margin-top: .7rem; background: #c62828; color: #fff; font-weight: 700; border-radius: 10px; padding: .55rem .6rem; opacity: 0; }
.hw-scene.on .hw-pop { animation: hw-pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.6s forwards; }
@keyframes hw-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.hw-cart { margin-top: .6rem; color: var(--muted); }
.hw-count::after { content: '3'; }
.hw-scene.on .hw-count::after { animation: hw-count 0s 1.6s forwards; }
@keyframes hw-count { to { content: '4'; } }

/* 4 - send */
.hw-field { margin-bottom: .9rem; }
.hw-lbl { font-weight: 650; margin-bottom: .35rem; }
.hw-select { position: relative; border: 1px solid var(--line); border-radius: 10px; height: 2.4rem; overflow: hidden; }
.hw-select span { position: absolute; left: .6rem; right: .6rem; top: .6rem; }
.hw-sel-b { opacity: 0; font-weight: 650; }
.hw-scene.on .hw-sel-a { animation: hw-fade-out .2s .9s forwards; }
.hw-scene.on .hw-sel-b { animation: hw-fade-in .2s 1s forwards; }
.hw-scene.on .hw-select { animation: hw-row-on .2s .9s forwards; }
@keyframes hw-fade-out { to { opacity: 0; } }
@keyframes hw-fade-in { to { opacity: 1; } }
.hw-send { background: var(--accent); color: var(--accent-ink); text-align: center; font-weight: 700; padding: .7rem; border-radius: 10px; }
.hw-scene.on .hw-send { animation: hw-press .3s 1.8s; }
@keyframes hw-press { 50% { transform: scale(.94); filter: brightness(.85); } }
.hw-done { margin-top: 1.4rem; text-align: center; font-size: 1.2rem; font-weight: 750; color: var(--ok); opacity: 0; }
.hw-scene.on .hw-done { animation: hw-pop .4s cubic-bezier(.3, 1.6, .5, 1) 2.2s forwards; }
.hw-tick { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ok); color: #fff; margin-right: .4rem; }
.hw-tick.big { width: 3.2rem; height: 3.2rem; font-size: 1.6rem; margin: 0 auto .4rem; display: grid; }

/* 5 - print */
.hw-sheet { background: #fff; border-radius: 6px; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.hw-tag { background: #ffd23f; border-radius: 3px; height: 50px; padding: 4px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; color: #16233f; }
.hw-tag i { display: block; height: 4px; width: 80%; background: rgba(22, 35, 63, .35); border-radius: 2px; }
.hw-tag b { font-size: .78rem; text-align: right; }
.hw-scene.on .hw-tag { animation: hw-up .25s ease-out var(--d) forwards; }
.hw-printer { position: relative; margin: 1rem auto 0; width: 170px; height: 64px; background: #2b3447; border-radius: 10px; overflow: visible; }
.hw-printer::before { content: ''; position: absolute; left: 20px; right: 20px; top: 26px; height: 6px; background: #0e131c; border-radius: 3px; }
.hw-paper { position: absolute; left: 30px; right: 30px; top: 30px; height: 0; background: repeating-linear-gradient(#fff 0 10px, #ffe9a3 10px 14px); border-radius: 0 0 3px 3px; }
.hw-scene.on .hw-paper { animation: hw-paper 1.4s ease-in-out 1.9s forwards; }
@keyframes hw-paper { to { height: 70px; } }

@media (prefers-reduced-motion: reduce) {
  .hw-scene.on, .hw-scene.on * { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}

/* ---------------- Get in touch */
.contact-form { max-width: 34rem; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { text-align: center; max-width: 34rem; }
.inq.is-new { border-left: 4px solid var(--accent); }
.inq-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip.inq-new { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.chip.inq-won { background: color-mix(in srgb, #2e9d4f 22%, transparent); }
.chip.inq-lost { opacity: .7; }
/* Deep Deal option under the tag boxes */
.deep-wrap:empty { display: none; }
.deep-opt { margin-top: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; gap: .6rem; align-items: center; }
.hw-check { padding: .55rem .6rem; margin-bottom: .4rem; }
.hw-more { color: var(--muted); text-align: center; font-style: italic; margin-top: .3rem; opacity: 0; }
.hw-scene.on .hw-more { animation: hw-fade-in .3s 2.8s forwards; }
.hw-kinds { display: flex; flex-wrap: wrap; gap: .5rem; }
.hw-kind { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem; font-weight: 600; }
.hw-kind::before { content: ''; display: inline-block; width: .7em; height: .7em; border-radius: 2px; background: var(--tag); margin-right: .45em; vertical-align: -.05em; }
.hw-kind.more { color: var(--muted); font-weight: 500; font-style: italic; }
.hw-kind.more::before { display: none; }
.hw-tag { height: 56px; padding: 4px 5px; }
.hw-tag-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 3px; }
.hw-img { display: block; width: 14px; height: 34px; background: center bottom / contain no-repeat; flex: none; }
.hw-img.wine { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2012%2032%22%3E%3Cpath%20d%3D%22M4.5%200h3v9c0%202%203.5%203%203.5%207v14.5c0%20.8-.7%201.5-1.5%201.5h-7C1.7%2032%201%2031.3%201%2030.5V16c0-4%203.5-5%203.5-7z%22%20fill%3D%22%235b1a2b%22/%3E%3Crect%20x%3D%222%22%20y%3D%2218%22%20width%3D%228%22%20height%3D%228%22%20rx%3D%221%22%20fill%3D%22%23f4ecd8%22/%3E%3Crect%20x%3D%223.3%22%20y%3D%2220%22%20width%3D%225.4%22%20height%3D%221.2%22%20fill%3D%22%235b1a2b%22/%3E%3Crect%20x%3D%224%22%20y%3D%220%22%20width%3D%224%22%20height%3D%223%22%20fill%3D%22%23c9a227%22/%3E%3C/svg%3E"); }
.hw-img.beer { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2012%2032%22%3E%3Cpath%20d%3D%22M4.6%200h2.8v8c0%202%203.6%203.5%203.6%206.5v16c0%20.8-.7%201.5-1.5%201.5h-7C1.7%2032%201%2031.3%201%2030.5v-16C1%2011.5%204.6%2010%204.6%208z%22%20fill%3D%22%238a4b12%22/%3E%3Cellipse%20cx%3D%226%22%20cy%3D%2222%22%20rx%3D%224%22%20ry%3D%224.5%22%20fill%3D%22%23f2c94c%22/%3E%3Crect%20x%3D%224.4%22%20y%3D%220%22%20width%3D%223.2%22%20height%3D%222%22%20fill%3D%22%23333%22/%3E%3C/svg%3E"); }
.hw-img.can { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2028%22%3E%3Crect%20x%3D%221%22%20y%3D%222%22%20width%3D%2214%22%20height%3D%2225%22%20rx%3D%222.5%22%20fill%3D%22%23c62828%22/%3E%3Crect%20x%3D%222%22%20y%3D%220.5%22%20width%3D%2212%22%20height%3D%223%22%20rx%3D%221.2%22%20fill%3D%22%23b0b7c3%22/%3E%3Cpath%20d%3D%22M1%2013c4-3%2010%203%2014%200v4c-4%203-10-3-14%200z%22%20fill%3D%22%23fff%22/%3E%3C/svg%3E"); width: 17px; height: 28px; }
/* Why PrintATag */
.hw-why { margin: 1.6rem 0 1rem; }
.hw-why h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); margin: 0 0 .3rem; }
.hw-why-lead { font-size: 1.08rem; max-width: 46rem; margin: 0 0 1rem; }
.hw-why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.hw-why-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.hw-why-card b { display: block; font-size: 1.02rem; margin: .25rem 0 .2rem; }
.hw-why-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.hw-why-ic { font-size: 1.5rem; line-height: 1; }
.hw-why-end { margin: 1rem 0 0; font-size: 1.05rem; }
.hw-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px; }
.hw-tag b { font-size: .72rem; white-space: nowrap; }
.hw-label { top: 70px; }
.hw-wine { font: 700 9px/1.1 Georgia, serif; color: #5b1a2b; text-align: center; }
.hw-ml { font: 600 6px/1.2 system-ui, sans-serif; color: #333; text-align: center; margin-bottom: 3px; }
.hw-upc { white-space: nowrap; font-size: 6px; letter-spacing: -.02em; }
/* step 5: realistic shelf tags (2 x 3 on a letter sheet) */
.hw-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 7px; border-radius: 2px;
  background: #fdfdfb; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 6px 18px rgba(0,0,0,.18); }
.hw-tag { height: 78px; padding: 3px 3px 3px 2px; display: flex; flex-direction: row; justify-content: flex-start; gap: 2px;
  background: linear-gradient(#fff, #fbfbf8); border: .5px dashed #c9c9c4; border-radius: 0; color: #111; font-family: Arial, Helvetica, sans-serif; }
.hw-pic { flex: none; width: 21px; display: flex; align-items: flex-end; padding-bottom: 2px; }
.hw-pic svg { width: 100%; height: auto; max-height: 70px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.hw-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hw-name { font-weight: 800; font-size: 8.5px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-size { font-size: 6.5px; color: #444; font-weight: 600; }
.hw-price { margin-top: 2px; background: #ffd23f; border-radius: 1.5px; padding: 1px 3px 0; text-align: center;
  font: 900 17px/1.05 Rockwell, "Rockwell Extra Bold", "Roboto Slab", Georgia, serif; color: #111; white-space: nowrap; }
.hw-dollar, .hw-price sup { font-size: 9px; vertical-align: 6px; }
.hw-save { font-size: 5.6px; font-weight: 700; color: #c62828; margin-top: 1.5px; white-space: nowrap; }
.hw-code { margin-top: auto; display: flex; align-items: flex-end; gap: 2px; font-size: 5px; color: #333; }
.hw-mini-bars { display: block; width: 30px; height: 7px;
  background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 2px, #111 2px 2.5px, transparent 2.5px 4px, #111 4px 5.5px, transparent 5.5px 6px); }
.hw-printer { margin-top: .7rem; height: 48px; }
.hw-printer::before { top: 20px; }
.hw-paper { top: 24px; }
@keyframes hw-paper { to { height: 54px; } }
/* Nothing to buy, nothing to install */
.hw-easy { margin: 1.8rem 0 1rem; }
.hw-easy h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); margin: 0 0 .8rem; }
.hw-easy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; }
.hw-easy-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tag); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.hw-easy-card b { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.hw-easy-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.hw-devices { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.hw-device { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .65rem; font-size: .88rem; white-space: nowrap; }
/* scan step: the realistic bottle */
.hw-bottle { width: 72px; height: 226px; background: none; border-radius: 0; margin-bottom: -6px; }
.hw-bottle::before { display: none; }
.hw-bottle > svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.hw-bottle .hw-label { left: 13%; right: 13%; top: 57%; padding: 5px 3px 3px; border-radius: 2px; background: linear-gradient(90deg, #e4d8bd, #fbf6ea 50%, #e4d8bd); z-index: 1; }
.hw-cam { background: radial-gradient(ellipse at 50% 30%, #3a3f4a, #15181e 75%); }
.hw-bottle .hw-upc { font-size: 5px; letter-spacing: -.04em; overflow: hidden; }
/* Home links on the public pages */
.pub-nav { display: flex; align-items: center; gap: 1rem; }
.pub-nav > a:not(.btn) { font-weight: 600; text-decoration: none; }
.pub-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; max-width: 980px; margin: 0 auto; padding: 1.2rem 1rem 2rem; border-top: 1px solid var(--line); font-size: .95rem; }
main .pub-foot { margin-top: 2rem; }
/* line icons */
svg.ic { width: 1.05em; height: 1.05em; vertical-align: -.17em; flex: none; }
.btn svg.ic, a svg.ic { margin-right: .4em; }
.icon-btn svg.ic { margin: 0; width: 1.15em; height: 1.15em; }
/* How it works: the phone on the left edge, the steps beside it */
.hw-demo { flex-direction: row; justify-content: flex-start; gap: 2.5rem; }
.hw-side { max-width: 30rem; }
@media (max-width: 640px) { .hw-demo { justify-content: flex-start; } }
.hw-why-ic { color: var(--accent); }
.hw-why-ic svg.ic { width: 1.5rem; height: 1.5rem; }
.hw-device { display: inline-flex; align-items: center; gap: .35rem; }
.hw-device svg.ic { color: var(--accent); }
.hw-mag svg.ic { color: var(--muted); }
.pub-nav a svg.ic, .pub-foot a svg.ic { margin-right: .3em; }
nav.menu a svg.ic { margin-right: .45em; }
.chip svg.ic { margin-right: .25em; width: .95em; height: .95em; }
