/* Print It Out customer website: the "press proof" look.
   Ink on paper-white with hairline rules, IBM Plex Sans for text and IBM Plex Mono for codes, prices and print
   specs, 4px corners, no soft shadows. Primary actions are solid ink. The magenta mark colour (--brand) is for the
   logo, the current step, selection dots and focus rings, never for text. Crop marks (.crop) frame the drop zone
   and the pickup ticket. Text colours reach 7:1 contrast (WCAG AAA) on their backgrounds.
   Brand outlets replace --brand / --primary / --primary-hover / --primary-soft from JavaScript (applyBrand). */

:root {
  /* colour */
  --brand: #c8175d;
  --primary: #111317;          /* 18.6:1 with white */
  --primary-hover: #2a2e36;
  --primary-soft: #f3f4f6;
  --primary-ink: #ffffff;
  --surface: #ffffff;
  --canvas: #edeef0;
  --ink: #111317;
  --ink-2: #434957;            /* 7.7:1 on canvas */
  --ink-3: #6b717d;            /* decoration and placeholders only */
  --line: #d9dce1;
  --line-strong: #c5c9d0;
  --mark: #8a909c;             /* crop marks, dashed drop zone */
  --chrome: #111317;
  --ok: #0f5130;      --ok-soft: #e9f5ee;
  --warn: #6b2e04;    --warn-soft: #fdf6ec;
  --err: #9a1b12;     --err-soft: #fdeeec;
  --cmyk-c: #00a3e0; --cmyk-m: #e0336f; --cmyk-y: #f5c400; --cmyk-k: #111317;

  /* type: fluid scale */
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --fs-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-xl: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.5rem + 1.8vw, 2.75rem);

  /* space: 4px base */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  /* shape and depth: hairlines, not shadows */
  --r-sm: 2px; --r-md: 4px; --r-lg: 4px; --r-pill: 999px;
  --e1: none;
  --e2: none;
  --e3: 0 12px 32px rgb(17 19 23 / 0.18);

  /* motion */
  --t-fast: 120ms; --t-normal: 200ms; --t-slow: 320ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --tap: 44px;
  --content: 720px;

  color-scheme: light;
  font-family: var(--font);
  font-size: 100%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #ff6b9a;
    --primary: #f2f3f5;
    --primary-hover: #ffffff;
    --primary-soft: #22252c;
    --primary-ink: #111317;
    --surface: #17191e;
    --canvas: #0e0f12;
    --ink: #f2f3f5;
    --ink-2: #b8bcc6;
    --ink-3: #8a909c;
    --line: #2a2e36;
    --line-strong: #3a3f4a;
    --mark: #6b717d;
    --chrome: #050607;
    --ok: #6fd497;   --ok-soft: #14261b;
    --warn: #f0a64a; --warn-soft: #2b2113;
    --err: #ff9a92;  --err-soft: #311715;
    --e3: 0 12px 32px rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink); font-size: var(--fs-base); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-base); font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
img { max-width: 100%; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.eyebrow { font-family: var(--font-num); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 28px; height: 28px; }
.skip { position: absolute; left: var(--s2); top: -60px; background: var(--surface); color: var(--ink); padding: var(--s2) var(--s3); border-radius: var(--r-sm); z-index: 20; }
.skip:focus { top: var(--s2); }

/* ---------------------------------------------------------------- layout */

.chrome {
  position: sticky; top: 0; z-index: 10; background: var(--chrome); color: #fff;
  padding: 0 max(var(--s4), env(safe-area-inset-left));
}
.chrome-in { max-width: var(--content); margin: 0 auto; height: 60px; display: flex; align-items: center; gap: var(--s3); }
.logo { display: flex; align-items: center; gap: var(--s3); color: #fff; text-decoration: none; min-width: 0; margin-right: auto; }
.logo img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; flex: none; }
.logo span { font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrome-link {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3);
  border-radius: var(--r-md); color: #fff; text-decoration: none; font-weight: 500; font-size: var(--fs-sm); white-space: nowrap;
  background: transparent; border: 1px solid rgb(255 255 255 / 0.22); cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.chrome-link:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.4); }

main { max-width: var(--content); margin: 0 auto; padding: var(--s6) var(--s4) 140px; }
.section + .section { margin-top: var(--s8); }
.stack > * + * { margin-top: var(--s3); }
.stack-lg > * + * { margin-top: var(--s6); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { justify-content: space-between; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: var(--s5); }
.panel-head { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s4) 0; }

/* ---------------------------------------------------------------- page header (shop) */

.shop-head { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: start; }
.shop-avatar {
  width: 56px; height: 56px; border-radius: var(--r-md); background: var(--primary); color: var(--primary-ink);
  display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; font-size: var(--fs-lg);
}
.shop-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s2); color: var(--ink-2); font-size: var(--fs-sm); }
.shop-meta span { display: inline-flex; align-items: center; gap: 6px; }
.shop-meta .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- controls */

button, input, select, textarea { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5); border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: var(--fs-base); text-decoration: none; cursor: pointer; white-space: nowrap;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink); padding: 0 var(--s2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.btn-ghost:hover:not(:disabled) { background: var(--primary-soft); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: var(--fs-lg); }
.btn .spinner { width: 18px; height: 18px; }
.btn[aria-busy="true"] { pointer-events: none; }

.field { display: block; }
.field + .field { margin-top: var(--s4); }
.label { display: block; font-weight: 500; font-size: var(--fs-sm); margin-bottom: 6px; }
.hint { display: block; color: var(--ink-2); font-size: var(--fs-xs); margin-top: 6px; }
.field-error { display: block; color: var(--err); font-size: var(--fs-sm); margin-top: 6px; font-weight: 600; }
.input {
  width: 100%; min-height: var(--tap); padding: 10px var(--s3); border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.input[aria-invalid="true"] { border-color: var(--err); }
textarea.input { min-height: 84px; resize: vertical; }
select.input {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234a4c5e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.prefix { display: flex; align-items: stretch; }
.prefix > span {
  display: grid; place-items: center; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md); background: var(--canvas); color: var(--ink-2); font-weight: 600;
}
.prefix > .input { border-radius: 0 var(--r-md) var(--r-md) 0; }

/* option cards: radio groups (paper, colour, sides…) */
.options { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.options.compact { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.option { position: relative; display: block; }
.option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.option > span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; min-height: 56px;
  padding: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.options.compact .option > span { align-items: center; min-height: var(--tap); padding: var(--s2); }
.option b { font-weight: 600; }
.option > span { position: relative; padding-right: var(--s8); }
.option small { color: var(--ink-2); font-size: var(--fs-xs); font-family: var(--font-num); }
.option:hover > span { border-color: var(--ink-3); }
.option > span::after { content: ""; position: absolute; top: 50%; right: var(--s3); width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 1px solid var(--line-strong); box-sizing: border-box; }
.options.compact .option > span { padding-right: var(--s2); }
.options.compact .option > span::after { display: none; }
.option input:checked + span { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.option input:checked + span::after { border: 3px solid var(--primary); background: var(--brand); }
.options.compact .option input:checked + span { background: var(--primary); color: var(--primary-ink); }
.options.compact .option input:checked + span small { color: inherit; }
.option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.option input:disabled + span { opacity: 0.45; cursor: not-allowed; }

/* segmented control */
.segmented { display: inline-flex; padding: 0; gap: 0; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-strong); max-width: 100%; overflow-x: auto; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: 0;
  font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.segmented label + label span { border-left: 1px solid var(--line-strong); }
.segmented input:checked + span { background: var(--primary); color: var(--primary-ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }

/* switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: var(--tap); cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 24px; border-radius: 2px; background: var(--line-strong); position: relative; flex: none; cursor: pointer; transition: background var(--t-normal) var(--ease); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 1px; background: var(--surface); transition: transform var(--t-normal) var(--ease); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(20px); }

/* stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.stepper button { width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; border-radius: var(--r-md); }
.stepper button:hover:not(:disabled) { background: var(--primary-soft); }
.stepper button:disabled { color: var(--ink-3); cursor: not-allowed; }
.stepper output { min-width: 40px; text-align: center; font-family: var(--font-num); font-size: var(--fs-base); font-weight: 600; }

/* ---------------------------------------------------------------- feedback */

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-family: var(--font-num); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: var(--canvas); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--primary-soft); color: var(--ink); }

.callout { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--primary-soft); border-left: 2px solid var(--ink); color: var(--ink); font-size: var(--fs-sm); }
.callout .icon { color: var(--ink); margin-top: 1px; }
.callout.warn { background: var(--warn-soft); border-left-color: var(--warn); } .callout.warn .icon { color: var(--warn); }
.callout.err { background: var(--err-soft); color: var(--err); border-left-color: var(--err); } .callout.err .icon { color: var(--err); }
.callout.ok { background: var(--ok-soft); border-left-color: var(--ok); } .callout.ok .icon { color: var(--ok); }
.callout strong { display: block; }

.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--canvas) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm); }
.sk-line { height: 14px; margin: 8px 0; }
.sk-title { height: 26px; width: 55%; margin-bottom: 12px; }
.sk-block { height: 120px; border-radius: var(--r-lg); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 4px; border-radius: 0; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); transition: width var(--t-normal) var(--ease); }
.progress.indeterminate > div { width: 35%; animation: slide 1.1s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: min(480px, calc(100% - 32px)); padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--chrome); color: #fff; box-shadow: var(--e3); font-size: var(--fs-sm); font-weight: 500;
  transition: opacity var(--t-normal) var(--ease), transform var(--t-normal) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fade-in { animation: fade-in var(--t-slow) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- dialog (guest details) */

.sheet-dialog {
  width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: var(--s6); margin: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--e3);
}
.sheet-dialog::backdrop { background: rgb(17 19 23 / 0.6); }
.sheet-dialog[open] { animation: dialog-in var(--t-normal) var(--ease) both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .sheet-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom)); }
  @keyframes dialog-in { from { transform: translateY(100%); } to { transform: none; } }
}

/* ---------------------------------------------------------------- tabs */

.tabs { display: flex; gap: var(--s6); border-bottom: 1px solid var(--line); margin-bottom: var(--s6); }
.tab {
  position: relative; min-height: var(--tap); padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; color: var(--ink-2); font-size: var(--fs-base);
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform var(--t-normal) var(--ease); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- steps (print flow) */

.flow-steps { display: flex; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s5); counter-reset: step; }
.flow-steps li { flex: 1; font-family: var(--font-num); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); counter-increment: step; }
.flow-steps li::before { content: ""; display: block; height: 3px; background: var(--line-strong); margin-bottom: 8px; transition: background var(--t-normal) var(--ease); }
.flow-steps li.done::before { background: var(--ink); }
.flow-steps li.current::before { background: var(--brand); }
.flow-steps li.current { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- upload */

.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2);
  padding: var(--s10) var(--s5); border: 1px dashed var(--mark); border-radius: var(--r-sm); margin: var(--s2);
  background: var(--primary-soft); cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: var(--surface); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.dropzone .icon-wrap { width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink); margin-bottom: var(--s1); }
.dropzone[aria-disabled="true"] { cursor: not-allowed; opacity: 0.6; }

.file-card { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; }
.file-icon { width: 44px; height: 56px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--ink); color: var(--ink); display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; }

/* ---------------------------------------------------------------- sheet preview */

.sheets { display: flex; gap: var(--s5); overflow-x: auto; padding: var(--s1) var(--s1) var(--s3); scroll-snap-type: x proximity; }
.sheet { flex: none; scroll-snap-align: start; text-align: center; }
.sheet-faces { display: flex; gap: 6px; height: 140px; }
.face { height: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 0; padding: 4%; display: grid; gap: 3%; box-shadow: 2px 2px 0 var(--line); }
.slot { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.pg { display: grid; place-items: center; max-width: 100%; max-height: 100%; background: #fff; border: 1px solid #c5c9d0; color: #111317; font: 500 10px/1 var(--font-num); }
.pg.bordered { border-color: #111317; }
.face.colour .pg { background: linear-gradient(135deg, #d9f1fb, #fbe0ea 50%, #fdf3c4); }
.sheet-label { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-2); }
.sheet-more { flex: none; align-self: center; font-size: var(--fs-sm); color: var(--ink-2); padding: 0 var(--s3); }
.legend { display: flex; gap: var(--s4); font-size: var(--fs-xs); color: var(--ink-2); margin-top: var(--s2); }
.legend i { display: inline-block; width: 10px; height: 12px; border: 1px solid #c5c9d0; margin-right: 6px; vertical-align: -1px; background: #fff; }
.legend i.c { background: linear-gradient(135deg, #d9f1fb, #fbe0ea 50%, #fdf3c4); }

/* ---------------------------------------------------------------- disclosure */

.disclosure { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.disclosure > summary { list-style: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); cursor: pointer; min-height: var(--tap); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .chev { margin-left: auto; transition: transform var(--t-normal) var(--ease); color: var(--ink-2); }
.disclosure[open] > summary .chev { transform: rotate(180deg); }
.disclosure > .body { padding: 0 var(--s5) var(--s5); }

.group + .group { margin-top: var(--s6); }
.group-title { font-weight: 600; margin-bottom: var(--s3); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.group-title small { font-weight: 500; color: var(--ink-2); font-size: var(--fs-xs); }

/* ---------------------------------------------------------------- price summary and checkout bar */

.lines { display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.lines div { display: flex; justify-content: space-between; gap: var(--s4); }
.lines dt { color: var(--ink-2); } .lines dd { margin: 0; font-family: var(--font-num); font-weight: 600; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s3); margin-top: var(--s3); border-top: 1px solid var(--ink); font-weight: 600; }
.total-row .num { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.02em; }

.checkout {
  position: fixed; inset: auto 0 0 0; z-index: 9; background: var(--surface); border-top: 1px solid var(--line);
  padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom));
}
.checkout-in { max-width: var(--content); margin: 0 auto; display: flex; align-items: center; gap: var(--s4); }
.checkout .amount { flex: 1; min-width: 0; }
.checkout .amount .num { font-size: var(--fs-xl); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.checkout .amount .xs { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- store */

.products { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--t-fast) var(--ease); }
.product:hover { border-color: var(--line-strong); }
.product-img { aspect-ratio: 4 / 3; background: var(--primary-soft); border-bottom: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.product-name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-family: var(--font-num); font-weight: 600; font-size: var(--fs-base); }
.product .btn, .product .stepper { margin-top: auto; width: 100%; }
.product .stepper { justify-content: space-between; }

/* ---------------------------------------------------------------- orders */

.order-list { list-style: none; margin: 0; padding: 0; }
.order-list a { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: center; padding: var(--s4) var(--s5); color: inherit; text-decoration: none; transition: background var(--t-fast) var(--ease); }
.order-list li + li a { border-top: 1px solid var(--line); }
.order-list a:hover { background: var(--canvas); }
.tile-icon { width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; }

.pickup { text-align: center; }
.pickup-code { font-family: var(--font-num); font-weight: 600; font-size: var(--fs-2xl); letter-spacing: 0.18em; padding-left: 0.18em; }
.barcode { background: #fff; border-radius: var(--r-sm); padding: var(--s4); display: grid; place-items: center; }
.barcode svg { width: 100%; max-width: 420px; height: auto; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--s5) 36px; color: var(--ink-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); box-sizing: border-box; }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); background-size: 14px; background-repeat: no-repeat; background-position: center; }
.timeline li.done::after { background: var(--ok); }
.timeline li.now { color: var(--ink); }
.timeline li.now::before { border-color: var(--ink); background: radial-gradient(circle, var(--brand) 4px, var(--surface) 5px); }
.timeline b { display: block; font-weight: 600; }
.timeline small { font-size: var(--fs-xs); color: var(--ink-2); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); font-size: var(--fs-sm); }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------------------------------------------------------------- home */

.hero { padding: var(--s10) 0 var(--s8); }
.hero h1 { font-size: var(--fs-2xl); letter-spacing: -0.03em; max-width: 16ch; }
.hero p { margin-top: var(--s3); font-size: var(--fs-lg); color: var(--ink-2); max-width: 46ch; }
.how { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: how; }
.how li { list-style: none; padding: var(--s5); counter-increment: how; }
.how li::before { content: counter(how, decimal-leading-zero); display: block; padding-bottom: var(--s2); margin-bottom: var(--s3); border-bottom: 1px solid var(--ink); color: var(--ink); font: 600 var(--fs-sm) var(--font-num); }
.how b { display: block; margin-bottom: 4px; font-weight: 600; }
.how ol { padding: 0; margin: 0; }

footer.site { max-width: var(--content); margin: 0 auto; padding: var(--s8) var(--s4) 120px; color: var(--ink-2); font-size: var(--fs-xs); }
footer.site .foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line-strong); font-family: var(--font-num); font-size: 0.6875rem; }
footer.site a { color: var(--ink-2); }
footer.site a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- press-proof details */

/* Four registration colours, as on the edge of a proof sheet. */
.cmyk { display: inline-flex; gap: 2px; vertical-align: middle; }
.cmyk i { width: 6px; height: 6px; background: var(--cmyk-c); }
.cmyk i:nth-child(2) { background: var(--cmyk-m); }
.cmyk i:nth-child(3) { background: var(--cmyk-y); }
.cmyk i:nth-child(4) { background: var(--cmyk-k); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmyk i:nth-child(4) { background: #f2f3f5; } }

/* Crop marks just outside an element's corners. */
.crop { position: relative; }
.crop::before {
  content: ""; position: absolute; inset: -8px; pointer-events: none;
  --c: var(--mark);
  background:
    linear-gradient(var(--c), var(--c)) top left / 12px 1px, linear-gradient(var(--c), var(--c)) top left / 1px 12px,
    linear-gradient(var(--c), var(--c)) top right / 12px 1px, linear-gradient(var(--c), var(--c)) top right / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom left / 12px 1px, linear-gradient(var(--c), var(--c)) bottom left / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom right / 12px 1px, linear-gradient(var(--c), var(--c)) bottom right / 1px 12px;
  background-repeat: no-repeat;
}

@media (min-width: 720px) {
  main { padding-top: var(--s10); }
  .panel-pad { padding: var(--s6); }
}
