/* screen-palette: #f4f6f9 #e8eaed #202124 #5f6368 #80868b #1e8e3e #e6f4ea #e8f0fe #f9ab00 */
/* Product screens: the real iPad app + owner dashboard look (app/src/screens/theme.ts), drawn in HTML inside ink device frames. */

.app {
  --a-bg: #f4f6f9; --a-card: #FFFFFF; --a-border: #e8eaed; --a-text: #202124; --a-muted: #5f6368; --a-faint: #80868b;
  --a-blue: #1565C0; --a-tint: #e8f0fe; --a-ok: #1e8e3e; --a-ok-tint: #e6f4ea; --a-warn: #f9ab00;
  font: 400 13px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--a-text);
  background: var(--a-bg);
  text-transform: none;
  letter-spacing: 0;
}
.app p, .app b, .app small, .app em, .app dl, .app dd { margin: 0; }
.app-brand { color: var(--a-blue); font-weight: 700; font-size: 15px; }
.app-muted { color: var(--a-muted); }
.app-small { font-size: 11px; }
.app-label { font-size: 10px; font-weight: 600; color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.app-card { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 10px; padding: 14px; }
.app-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--a-border); border-radius: 999px; padding: 3px 9px; font-size: 11px; color: var(--a-muted); background: var(--a-card); white-space: nowrap; }
.app-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--a-faint); }
.app-pill--ok { color: var(--green); }
.app-pill--ok::before { background: var(--a-ok); }
.app-pill--info { color: var(--a-blue); background: var(--a-tint); border-color: var(--a-tint); }
.app-pill--info::before { display: none; }
.app-pill--ok-line { color: var(--green); border-color: var(--green); font-weight: 700; letter-spacing: 0.06em; }
.app-pill--ok-line::before { display: none; }
.app-btn { display: inline-block; background: var(--a-blue); color: var(--a-card); border-radius: 8px; padding: 8px 12px; font-weight: 600; font-size: 12px; text-align: center; }
.app-btn--ghost { background: var(--a-card); color: var(--a-blue); border: 1px solid var(--a-blue); }
.app-btn--big { font-size: 15px; padding: 12px 16px; letter-spacing: 0.04em; }
.app-btn--block { display: block; }
.app-dl { display: grid; gap: 6px; margin: 10px 0 12px; }
.app-dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--a-border); padding-bottom: 6px; }
.app-dl dt { color: var(--a-muted); }
.app-dl dd { font-weight: 600; text-align: right; }
.app-select { border: 1px solid var(--a-border); border-radius: 8px; padding: 7px 10px; margin: 4px 0 10px; background: var(--a-card); }
.app-tabs { display: flex; gap: 5px; }
.app-tabs span { border: 1px solid var(--a-border); border-radius: 7px; padding: 4px 9px; background: var(--a-card); color: var(--a-muted); font-size: 11px; white-space: nowrap; }
.app-tabs .is-on { background: var(--a-blue); color: var(--a-card); border-color: var(--a-blue); }
.app-status { display: flex; gap: 5px; margin-left: auto; }
.ph { display: grid; place-items: center; background: var(--paper); border: 1px dashed var(--rule); color: var(--graphite); font: 400 9px/1.2 var(--mono); text-align: center; padding: 4px; }
.ph--sq { width: 64px; height: 64px; flex: none; border-radius: 8px; }
.ph--xs { width: 30px; height: 30px; border-radius: 6px; padding: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }
.dot--ok { background: var(--a-ok); }

/* ---------- device frames ---------- */
.frame-browser { border: 1px solid var(--ink); background: var(--white); overflow: hidden; }
.frame-browser__bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--ink); background: var(--paper); }
.frame-browser__bar i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink); }
.frame-browser__bar span { margin-left: 12px; font: 400 11px/1 var(--mono); color: var(--graphite); border: 1px solid var(--rule); background: var(--white); padding: 4px 10px; min-width: 40%; }
.frame-ipad { border: 12px solid var(--ink); border-radius: 26px; background: var(--ink); overflow: hidden; aspect-ratio: 4 / 3; }
.frame-ipad > .app { height: 100%; border-radius: 12px; overflow: hidden; }
.frame-ipad--sm { border-width: 9px; border-radius: 20px; }

/* ---------- workflow stage (static layout; motion.js adds the sticky swap) ---------- */
.stage { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.steps { position: sticky; top: 96px; display: grid; gap: 8px; }
.steps__chapter { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--graphite); margin-top: 14px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps a { display: flex; gap: 12px; padding: 9px 0 9px 14px; border-left: 2px solid var(--rule); text-decoration: none; font: 500 15px/1.2 var(--mono); color: var(--graphite); }
.steps a span { color: var(--graphite); }
.steps a:hover { color: var(--ink); }
.steps [data-active] a { border-left-color: var(--blue); color: var(--blue); }
.steps [data-active] a span { color: var(--blue); }
.steps__rail { display: none; }
.stage__screens { display: grid; gap: 72px; }
.shot { margin: 0; }
.shot figcaption, .tour figcaption { margin-top: 12px; font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--graphite); }

/* ---------- dashboard screens ---------- */
.dash { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 330px; }
.dash--full { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.dash__side { background: var(--a-card); border-right: 1px solid var(--a-border); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.dash__side .app-brand { margin: 0 0 12px 6px; }
.dash__side span { padding: 6px 8px; border-radius: 6px; color: var(--a-muted); font-size: 12px; }
.dash__side .is-on { background: var(--a-tint); color: var(--a-blue); font-weight: 600; }
.dash__main { padding: 18px 20px; display: grid; align-content: start; gap: 10px; }
.dash__title { font-size: 18px; font-weight: 700; }
.sync-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sq__row { display: flex; justify-content: space-between; align-items: center; }
.sq__mark { font: 800 16px/1 var(--sans); color: var(--a-text); border: 1.5px solid var(--a-text); border-radius: 6px; padding: 5px 8px; }
.sq__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.app-table { width: 100%; border-collapse: collapse; background: var(--a-card); border: 1px solid var(--a-border); border-radius: 10px; overflow: hidden; }
.app-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--a-muted); padding: 8px 12px; border-bottom: 1px solid var(--a-border); }
.app-table td { padding: 8px 12px; border-bottom: 1px solid var(--a-border); }
.app-table td:nth-child(2), .app-table td:nth-child(3) { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.app-table .is-changed td { background: var(--a-tint); }
.app-table s { color: var(--a-muted); margin-right: 4px; }

/* pairing */
.pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.pair__dialog { justify-items: center; text-align: center; padding: 26px 20px; gap: 12px; }
.pair__code { font: 600 clamp(34px, 4vw, 48px)/1 var(--mono); letter-spacing: 0.12em; color: var(--a-text); background: var(--a-bg); border: 1px solid var(--a-border); border-radius: 10px; padding: 14px 18px; }
.ipad-pair { display: grid; align-content: center; justify-items: center; gap: 12px; padding: 14px; background: var(--a-card); }
.ipad-pair__title { font-weight: 700; font-size: 15px; }
.ipad-pair__boxes { display: flex; gap: 5px; }
.ipad-pair__boxes span { width: 26px; height: 32px; border: 1px solid var(--a-border); border-bottom: 2px solid var(--a-blue); border-radius: 5px; display: grid; place-items: center; font: 600 15px/1 var(--mono); }

/* ---------- iPad screens ---------- */
.ipad { display: flex; flex-direction: column; }
.ipad__bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--a-card); border-bottom: 1px solid var(--a-border); }
.ipad__where { padding: 6px 12px 0; font-size: 11px; }
.hw { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; flex: 1; align-content: start; }
.hw__title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px 12px 12px; flex: 1; align-content: start; }
.tile { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 8px; padding: 6px; display: grid; gap: 2px; text-align: center; }
.tile.is-on { border: 2px solid var(--a-blue); }
.tile .ph { height: 46px; border-radius: 5px; margin-bottom: 4px; }
.tile b { font-size: 11px; line-height: 1.15; }
.tile small { color: var(--a-muted); font-size: 10px; }
.tile em { font-style: normal; font-weight: 700; font-size: 14px; }
.tile em i { font-style: normal; font-weight: 400; font-size: 10px; }
.wp { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 10px; padding: 10px; flex: 1; min-height: 0; }
.wp__left, .wp__right { display: grid; align-content: start; gap: 4px; padding: 10px; }
.wp__item { display: flex; gap: 10px; margin-bottom: 8px; }
.wp__item b { display: block; font-size: 14px; }
.wp__item small { display: block; color: var(--a-muted); font-size: 11px; }
.wp__item strong { color: var(--a-text); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 4px 0 10px; }
.chips span { border: 1px solid var(--a-border); border-radius: 7px; padding: 6px 7px; font-size: 10px; color: var(--a-muted); }
.chips .is-on { border: 2px solid var(--a-blue); color: var(--a-blue); background: var(--a-tint); font-weight: 600; }
.stepper { display: grid; grid-template-columns: 1fr 2fr 1fr; border: 1px solid var(--a-border); border-radius: 8px; text-align: center; margin-top: 4px; }
.stepper span { color: var(--a-blue); padding: 5px; }
.stepper b { padding: 5px; border-left: 1px solid var(--a-border); border-right: 1px solid var(--a-border); }
.wp__live { display: flex; justify-content: space-between; align-items: center; }
.wp__live .app-label { color: var(--a-blue); }
.wp__weight { font-weight: 800; font-size: clamp(34px, 4vw, 52px); line-height: 1; text-align: center; letter-spacing: -0.02em; }
.wp__weight .num { font-family: inherit; }
.wp__weight small { font-size: 0.45em; }
.wp__math { text-align: center; font-size: 12px; }
.wp__total { display: flex; justify-content: space-between; align-items: center; background: var(--a-tint); border: 1px solid var(--a-tint); border-radius: 8px; padding: 6px 12px; margin: 4px 0; font-weight: 800; color: var(--a-blue); font-size: 14px; }
.wp__total .num { font-weight: 800; font-size: 22px; line-height: 1; color: var(--a-text); font-family: inherit; }
.wp__preview { border: 1px solid var(--a-border); border-radius: 8px; padding: 6px; display: grid; gap: 4px; justify-items: center; }
.wp__preview .app-label { justify-self: start; }
.wp__actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 6px; margin-top: 4px; }

/* mini label (reuses .label from site.css) */
.label--mini { padding: 8px 10px; border-radius: 6px; display: grid; gap: 3px; width: min(100%, 170px); font-size: 9px; }
.label--mini .label__name { font-size: 12px; margin: 0; }
.label--mini .label__total { font-size: 15px; margin: 2px 0 0; }
.label--mini .label__total span:first-child { font-size: 9px; }
.label--mini img { width: 100%; height: 22px; }
.label--mini .label__digits { font-size: 8px; margin: 0; letter-spacing: 0.1em; }

/* label peel */
.peel { position: relative; display: grid; justify-items: center; padding: 30px 20px 10px; border: 1px solid var(--ink); background: var(--white); min-height: 320px; align-content: end; }
.peel__label { width: 190px; transform: rotate(-4deg) translateY(18px); transform-origin: bottom center; position: relative; z-index: 1; border-color: var(--ink); }
.peel__printer { position: relative; width: min(80%, 320px); height: 110px; border: 2px solid var(--ink); border-radius: 18px 18px 8px 8px; background: var(--paper); }
.peel__slot { position: absolute; top: 18px; left: 15%; right: 15%; height: 6px; background: var(--ink); border-radius: 3px; }
.peel__badge { position: absolute; bottom: 14px; left: 18px; font: 600 11px/1 var(--mono); letter-spacing: 0.1em; }
.peel__led { position: absolute; bottom: 16px; right: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.peel__note { margin-top: 14px; font: 400 12px/1.4 var(--mono); color: var(--graphite); text-align: center; }

/* register */
.register { border: 1px solid var(--ink); background: var(--white); padding: 22px; display: grid; gap: 12px; min-height: 320px; align-content: center; font-family: var(--mono); }
.register__head { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--graphite); border-bottom: 1px solid var(--ink); padding-bottom: 10px; }
.register__ok { color: var(--green); font-weight: 600; }
.register__line { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; font-size: 16px; font-weight: 600; }
.register__code { font-size: 12px; color: var(--graphite); }
.register__total { display: flex; justify-content: space-between; font: 900 30px/1 var(--sans); font-stretch: 112%; text-transform: uppercase; border-top: 2px solid var(--ink); padding-top: 12px; }
.register__charge { justify-self: stretch; text-align: center; background: var(--ink); color: var(--paper); padding: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- product tour ---------- */
.tour { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.tour figure { margin: 0; }
.dash--tour { grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr); min-height: 360px; }
.dash__designer { border-left: 1px solid var(--a-border); background: var(--a-card); }
.store { display: grid; gap: 6px; }
.store__name { font-weight: 700; font-size: 14px; }
.store__row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--a-border); padding-top: 6px; }
.designer { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.label--designer { width: 160px; }
.label--designer .label__brand { padding-bottom: 6px; gap: 6px; }
.label--designer .label__logo { width: 24px; height: 24px; font-size: 8px; }
.label--designer .label__address { font-size: 7px; }
.label--designer .label__desc { font-size: 8px; margin: 0; }
.toggles { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.toggles li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--a-muted); }
.toggles li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--a-faint); }
.toggles .is-on { color: var(--a-text); }
.toggles .is-on::before { background: var(--a-blue); border-color: var(--a-blue); }
.tour__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.ipad--mini { font-size: 11px; }
.tiles--mini { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tiles--mini .ph { height: 26px; }
.tiles--mini .tile b { font-size: 9px; }
.tiles--mini .tile em { font-size: 11px; }
.mini-wp { display: grid; gap: 10px; padding: 14px; align-content: center; flex: 1; background: var(--a-card); }
.search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 4px; border: 2px solid var(--a-blue); border-radius: 999px; padding: 7px 12px; background: var(--a-card); }
.search__icon { width: 11px; height: 11px; border: 2px solid var(--a-muted); border-radius: 50%; }
.search__field { font-size: 13px; }
.caret { display: inline-block; width: 1px; height: 13px; background: var(--a-blue); margin-left: 1px; vertical-align: middle; }
.search__hint { padding: 0 16px 6px; }
.results { list-style: none; margin: 0; padding: 0 12px; display: grid; gap: 5px; }
.results li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--a-card); border: 1px solid var(--a-border); border-radius: 8px; padding: 5px 8px; }
.results .ph { grid-row: span 2; }
.results b { font-size: 11px; }
.results small { grid-column: 2; color: var(--a-muted); font-size: 9px; }
.results em { grid-row: 1 / span 2; grid-column: 3; font-style: normal; font-weight: 700; font-size: 11px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .dash--tour { grid-template-columns: 130px minmax(0, 1fr); }
  .dash__designer { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--a-border); }
  .tour__row { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 767px) {
  .stage, .stage__screens { grid-template-columns: minmax(0, 1fr); }
  .app-tabs { flex-wrap: wrap; }
  .app-status { flex-wrap: wrap; }
  .ipad__bar { flex-wrap: wrap; }
  .steps { display: none; }
  .stage__screens { gap: 48px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash__side { display: none; }
  .pair, .hw { grid-template-columns: 1fr; }
  .frame-ipad { aspect-ratio: auto; border-width: 8px; border-radius: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wp { grid-template-columns: 1fr; }
  .register__line { grid-template-columns: 1fr auto; }
  .register__line span:nth-child(2) { display: none; }
}

/* Size pass: keep every stage screen readable at one glance (one screen per step in the sticky stage). */
.stage__screens .shot { max-width: 820px; }
.stage__screens .frame-ipad { max-width: 760px; }
.tile .ph { height: 84px; }
.tile b { font-size: 13px; }
.tile small { font-size: 11px; }
.tile em { font-size: 17px; }
.hw__card { font-size: 14px; }
.wp__left, .wp__right { gap: 6px; }
.wp__weight { font-size: clamp(44px, 5vw, 68px); }
.wp .label--mini { width: 200px; }

/* ---------- live stage (motion.js adds .stage--live at >= 768px) ---------- */
.stage--live { min-height: calc(8 * 72vh); }
.stage--live .stage__screens { position: sticky; top: 96px; height: min(calc(100vh - 140px), 720px); display: block; }
.stage--live .shot {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path 0.42s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 0.42s;
}
.stage--live .shot[data-active] { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path 0.42s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s; }
.stage--live .stage__screens .frame-ipad { max-height: calc(100% - 40px); width: auto; aspect-ratio: 4 / 3; }
.stage--live .steps__rail { display: block; height: 2px; background: var(--rule); margin-top: 18px; }
.stage--live .steps__rail span { display: block; height: 100%; width: calc(var(--progress, 0) * 100%); background: var(--blue); transition: width 0.3s linear; }

/* in-screen moments, keyed off the active step */
@keyframes row-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes flash { 0%, 60% { background: var(--white); } 100% { background: #e8f0fe; } }
@keyframes peel { from { transform: rotate(0deg) translateY(120px); } 70% { transform: rotate(0deg) translateY(10px); } to { transform: rotate(-4deg) translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stage--live [data-screen="02"][data-active] .app-table tbody tr { animation: row-in 0.35s steps(6, end) both; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(2) { animation-delay: 0.12s; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(3) { animation-delay: 0.24s; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(4) { animation: row-in 0.35s steps(6, end) 0.36s both; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(4) td { animation: flash 1.6s ease-out 0.4s both; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(5) { animation-delay: 0.48s; }
.stage--live [data-screen="02"][data-active] .app-table tbody tr:nth-child(6) { animation-delay: 0.6s; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span { animation: pop 0.2s ease-out both; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span:nth-child(2) { animation-delay: 0.15s; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span:nth-child(3) { animation-delay: 0.3s; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span:nth-child(4) { animation-delay: 0.45s; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span:nth-child(5) { animation-delay: 0.6s; }
.stage--live [data-screen="03"][data-active] .ipad-pair__boxes span:nth-child(6) { animation-delay: 0.75s; }
.stage--live [data-screen="05"][data-active] .tile.is-on { animation: pop 0.3s ease-out 0.3s both; }
.stage--live [data-screen="06"][data-active] .wp__total,
.stage--live [data-screen="06"][data-active] .wp__preview { animation: pop 0.3s ease-out 0.5s both; }
.stage--live [data-screen="07"][data-active] .peel__label { animation: peel 1.4s cubic-bezier(0.3, 0, 0.2, 1) both; }
.stage--live [data-screen="08"][data-active] .register__ok,
.stage--live [data-screen="08"][data-active] .register__total { animation: pop 0.3s ease-out 0.4s both; }

@media (max-width: 767px) {
  .stage--live { min-height: 0; }
  .stage--live .stage__screens { position: static; height: auto; display: grid; }
  .stage--live .shot { position: static; visibility: visible; clip-path: none; }
}

/* Item photos (cropped from the app mockups): white background, like Square item images in the app. */
img.ph { display: block; width: 100%; border: 0; padding: 0; background: var(--white); object-fit: cover; }
img.ph--sq { width: 64px; height: 64px; object-fit: cover; }
img.ph--xs { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
